guard-rails/README.md

25 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2011-06-05 11:27:02 +00:00
[![Build Status](http://travis-ci.org/johnbintz/guard-rails.png)](http://travis-ci.org/johnbintz/guard-rails)
2011-05-31 20:15:19 +00:00
Want to restart your Rails development server whilst you work? Now you can!
2011-05-27 18:55:23 +00:00
guard 'rails', :port => 5000 do
watch('Gemfile.lock')
watch(%r{^(config|lib)/.*})
end
2011-06-01 14:42:53 +00:00
Lots of fun options!
2011-05-27 18:55:23 +00:00
2011-05-31 20:15:19 +00:00
* `:port` is the port number to run on (default `3000`)
* `:environment` is the environment to use (default `development`)
* `:start_on_start` will start the server when starting Guard (default `true`)
* `:force_run` kills any process that's holding open the listen port before attempting to (re)start Rails (default `false`).
2011-06-01 17:17:35 +00:00
* `:daemon` runs the server as a daemon, without any output to the terminal that ran `guard` (default `false`).
2011-08-25 14:30:30 +00:00
* `:debugger` runs the server with the debugger enabled (default `false`). Required ruby-debug gem.
2011-06-01 14:42:53 +00:00
* `:timeout` waits this number of seconds when restarting the Rails server before reporting there's a problem (default `20`).
2011-09-14 18:06:07 +00:00
* `:server` lets you specify the webserver engine to use (try `:server => :thin`).
* `:rails_root` lets you specify the root directory of your app (try `:rails_root => 'test/dummy` for engines).
2011-05-27 18:55:23 +00:00
2011-05-31 20:15:19 +00:00
This is super-alpha, but it works for me! Only really hand-tested in Mac OS X. Feel free to fork'n'fix for other
2011-06-01 14:31:05 +00:00
OSes, and to add some more real tests.
2011-05-27 18:55:23 +00:00