I just released rerun 0.7. It now uses the Listen library which uses
your OS’s built-in filesystem change monitoring features so CPU use is
much more efficient.
Source and docs:
GitHub - alexch/rerun: Restarts an app when the filesystem changes. Uses growl and FSEventStream if on OS X.
Installation:
gem install rerun
Usage:
rerun ruby my_sinatra_app.rb
rerun --dir config rails s
rerun -cx rake test
Rerun launches your program, then watches the filesystem. If a
relevant file changes, then it restarts your program. Rerun works for
both long-running processes (e.g. apps) and short-running ones (e.g.
tests). It’s basically a no-frills command-line alternative to Guard,
Shotgun, Autotest, etc. that doesn’t require config files and works on
any command, not just Ruby programs.
See the README at GitHub - alexch/rerun: Restarts an app when the filesystem changes. Uses growl and FSEventStream if on OS X. for many more examples.