Feature/hooks #72

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants

emoreth commented Jul 10, 2012

Added a hook after each web interface action, so users can easily extend functionality, like sending emails or logging.

Owner

tomlea commented Aug 21, 2012

Massive delay, due to massive busy. I'm going to use some 20% time add some tests to this, before I merge it in. This is the kind of functionality I'd end up accidentally breaking.

emoreth commented Aug 21, 2012

No problem!

Tell me if I can help!

Owner

tomlea commented Aug 21, 2012

As I start to write test for this stuff, I'm wondering if the hooks are at the right level. They all seem to lend themselves to being captured as a middleware. I'm going to call it quits for the day, but I'm proposing a simpler API, with just one hook, for when anything in the state changes (probably triggered by the reindex).

We can then pass params into the callback to provide info on what file has changed, and possibly how it's changed. Just providing the filename for the gem on disk could be enough to work with. If the file is no longer there, it's been deleted. If it is there, it's been modified/created. Either way the action should be to rebuild whatever you had in place already.

Is there a use case you have in mind that this does not cover?

Owner

tomlea commented Aug 22, 2012

I've done a quick bash at what I was talking about on the basic-hooks branch (4a6e34a). Would this work for you @emoreth?

@tomlea tomlea closed this Feb 15, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment