guard/guard — Issue #245: Listen gem integration
Author: thibaudgg
Created: 2012-02-28 13:47:44+00:00
State: open

Now that [Listen](https://github.com/guard/listen) seems ready to be used, it's time to integrate it inside Guard, yeah!

Doing so will engender some important change in Guard and I want to get your feedback about them. Listen gem will give us, modified, added and removed file paths, right now Guard only has modified and added files (given together, via `run_on_change`) and removed/moved file paths (via `run_on_deletion`) with the `-A/--watch-all-modifications` option (but there's an issue #212 with the implementation).

I propose:

- `-A/--watch-all-modifications` option should be removed as Listen gem will always watch all changes.
- `run_on_change` & `run_on_deletion` should be deprecated and replaced by `run_on_addition`, `run_on_modification` and `run_on_removals` (more about that below).
- `-I/--no-vendor` option could be removed as Listen gem handle that.
- `ext` & `lib/vendor` path could be removed, obviously.

I'm aware that deprecating `run_on_change` & `run_on_deletion` will warns on all guards but it will really be easy to upgrade (one or two methods to rename) for everyone and I think the whole guards ecosystem will benefice of that. We could just show a deprecation warning message for each deprecated guards when launching Guard with something like:

`DEPRECATION WARNING [Guard::XXX]: run_on_change is deprecated and will be removed in future releases, is it really easy to upgrade, please read "wiki-page-link"`

What do you think of that, do you see other alternative?