README.md in rerun-0.7.1 vs README.md in rerun-0.8.0
- old
+ new
@@ -53,13 +53,13 @@
rerun --dir config rails s
Or if you're using Thin to run a Rack app that's configured in config.ru
but you want it on port 4000 and in debug mode, and only want to watch
-the `app` subdirectory:
+the `app` and `web` subdirectories:
- rerun --dir app -- thin start --debug --port=4000 -R config.ru
+ rerun --dir app,web -- thin start --debug --port=4000 -R config.ru
The `--` is to separate rerun options from cmd options. You can also
use a quoted string for the command, e.g.
rerun --dir app "thin start --debug --port=4000 -R config.ru"
@@ -102,26 +102,35 @@
rerun foreman start
# Options:
-`--dir` directory to watch (default = ".")
+`--dir` directory (or directories) to watch (default = "."). Separate multiple paths with ','.
`--pattern` glob to match inside directory. This uses the Ruby Dir glob style -- see <http://www.ruby-doc.org/core/classes/Dir.html#M002322> for details.
By default it watches files ending in: `rb,js,css,scss,sass,erb,html,haml,ru`.
It also ignores directories named `.rbx .bundle .git .svn log tmp vendor` and files named `.DS_Store`.
+`--signal` (or -s) use specified signal (instead of the default SIGTERM) to terminate the previous process.
+This may be useful for forcing the respective process to terminate as quickly as possible.
+(`--signal KILL` is the equivalent of `kill -9`)
+
`--clear` (or -c) clear the screen before each run
`--exit` (or -x) expect the program to exit. With this option, rerun checks the return value; without it, rerun checks that the launched process is still running.
+`--background` (or -b) disable on-the-fly commands, allowing the process to be backgrounded
+
+`--no-growl` don't use growl
+
Also --version and --help, naturally.
# Growl Notifications
If you have `growlnotify` available on the `PATH`, it sends notifications to
-growl in addition to the console.
+growl in addition to the console. If you have growl but don't want rerun to use it,
+set the `--no-growl` option.
Download [growlnotify here](http://growl.info/downloads.php#generaldownloads)
now that Growl has moved to the App Store.
# On-The-Fly Commands
@@ -130,30 +139,41 @@
* **r** -- restart (as if a file had changed)
* **c** -- clear the screen
* **x** or **q** -- exit (just like control-C)
+# Signals
+
+The current algorithm for killing the process is:
+
+* send [SIGTERM](http://en.wikipedia.org/wiki/SIGTERM)
+* if that doesn't work after 4 seconds, send SIGINT (aka control-C)
+* if that doesn't work after 2 more seconds, send SIGKILL (aka kill -9)
+
+This seems like the most gentle and unixy way of doing things, but it does
+mean that if your program ignores SIGTERM, it takes an extra 4 to 6 seconds to
+restart.
+
# To Do:
* Cooldown (so if a dozen files appear in a burst, say from 'git pull', it only restarts once)
* If the last element of the command is a `.ru` file and there's no other command then use `rackup`
* Exclude files beginning with a dot, unless the pattern explicitly says to include them
-* Allow multiple sets of directories and patterns
* --exclude pattern
* ".rerun" file to specify options per project or in $HOME.
* Test on Linux.
* On OS X, use a C library using growl's developer API <http://growl.info/developer/>
* Use growl's AppleScript or SDK instead of relying on growlnotify
* "Failed" icon
-* Get Rails icon working
* Figure out an algorithm so "-x" is not needed (if possible)
* Specify (or deduce) port to listen for to determine success of a web server launch
* Make sure to pass through quoted options correctly to target process [bug]
* Make it work on Windows, like Guard now does. See
* https://github.com/guard/guard/issues/59
* https://github.com/guard/guard/issues/27
* Optionally do "bundle install" before and "bundle exec" during launch
+
# Other projects that do similar things
* Restartomatic: <http://github.com/adammck/restartomatic>
* Shotgun: <http://github.com/rtomayko/shotgun>
* Rack::Reloader middleware: <http://github.com/rack/rack/blob/5ca8f82fb59f0bf0e8fd438e8e91c5acf3d98e44/lib/rack/reloader.rb>
@@ -234,11 +254,22 @@
* David Billskog <billskog@gmail.com>
* Jens B <https://github.com/dpree>
* Andrés Botero <https://github.com/anbotero>
* Dreamcat4
+* <https://github.com/FND>
+* Barry Sia <https://github.com/bsia>
# Version History
+
+* v0.8.0
+ * --background option (thanks FND!) to disable the keyboard listener
+ * --signal option (thanks FND!)
+ * --no-growl option
+ * --dir supports multiple directories (thanks Barry!)
+
+* v0.7.1
+ * bugfix: make rails icon work again
* v0.7.0
* uses Listen gem (which uses rb-fsevent for lightweight filesystem snooping)
# License