livingsocial/humperdink — pull request #5 by doredesign (2014-04-11 17:25:16+00:00)
Title: Give DirtySet and Tracker common event listener methods

The main purpose here is to notify an event listener when `DirtySet#clean!` fires. Since `Tracker` and `RedisDirtySet` already had similar event listener methods, I just scooped them all together into a new module: `HasEventListener`.

The only change to the gem's API is that `Tracker#on_event` now uses the same name as the method doing the same thing over at `RedisDirtySet`: `notify_event`. I'm hoping this won't be a big deal since that method, although public, looks like it ought not to be part of the gem's public API. If this is concerning, I'd be happy to alias `Tracker#on_event` to get it back in the game. Personally, I prefer a consistent API.