guard/guard — pull request #595 by e2 (2014-05-06 15:53:07+00:00)
Title: Synchronous guard

### For review only (WIP)

Get guard continuously switching between "doing something" and "waiting for input" (interactive mode) within the same main thread.

Also, gradually prepare the API for upcoming changes to Listen API, notably: triggering only "modify" events (no removed or added events) and supporting multiple, configurable listener instances.

##### Extra features / fixes:
- replaces PR: #589
- mostly fixes: #582
- fixes #571
- file change events are filtered (no more swap file events!) and optimized - even while guard is running tasks
- with less thread caveats, a lot of the existing code can be refactored with less worries and more confidence
- **new** : signal handling, so guard can asynchronously queue and process events from itself and plugins (currently supported: `:guard_pause`, `:guard_reload`, `:guard_show`, `:guard_run_all`)

##### Known issues:
RSpec uses it's `wants_to_quit` and somewhat ignores ctrl-c on the first try - then keeps dumping stuff on the screen after the interactor is reactivated. (#582)

##### TODO
- needs refactoring
- needs more tests