Factlink / pavlov

Provides a Command/Query/Interactor framework.
MIT License
22 stars 4 forks source link

Remove built-in operation types #34

Closed marten closed 10 years ago

marten commented 11 years ago

Mark and I have this idea that it might be better to auto-generate classes for Command, Query and Interactor that live in the application instead of the framework. These generated classes would then simply include Pavlov::Operation and set up whatever rules they want based on that (e.g. Interactors are not authorized by default).

The generated classes are already in the new-api-proposal, so this branch merely has to remove the built-ins, and change the integration tests so that they require the generator templates (so that we don't need to duplicate them into the specs).

Like I add in the CHANGELOG, I think all you should have to do is gsub \n\s+include Pavlov:: for <. The generated classes have Resque compatibility commented out by default (it's provided as an example, but not everyone uses Resque so it's no longer enabled by default), so you'll have uncomment a bunch of lines there too.

Ofcourse, if someone thinks this is a bad idea feel free to speak up.

markijbema commented 11 years ago

For now this pullrequest is pending the release of 0.2.0