Factlink / pavlov

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

Cleanup operation #1

Closed marten closed 11 years ago

marten commented 11 years ago

As discussed with Mark on Friday night, here are some proposed changes to Operation that make it clearer. I've extracted everything from the initialize method.

I've made it so that forgetting to implement authorized? raises a NotImplementedError instead of claiming that it is simply never authorized. Both have the same effect, but the former is clearer about what's wrong.

I've also added attr_readers for all arguments given.

There are some things still that I would do different. For instance, I would do the authority check only before executing, not in the initializer, and definitely not before "finish_initialize".

jjoos commented 11 years ago

And your build failed on TravisCI, some time out.Could you restart it, or could you explain how I could do that.

jjoos commented 11 years ago

Could you mark the point about the NotImplemented class in the todo as done?

marten commented 11 years ago

@jjoos I'm not sure I can without pushing additional commits. I think as repo owner, for you there might be something here: Screenshot_1_14_13_6_44_PM However, if I push the TODO-update, it'll probably fix itself.

marten commented 11 years ago

Oh sure, and now the build failed because they were rebooting the VM while it was doing the build...