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.
Mark and I have this idea that it might be better to auto-generate classes for
Command
,Query
andInteractor
that live in the application instead of the framework. These generated classes would then simplyinclude 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.