support zeus to boost rails init
This commit is contained in:
parent
58f1523edb
commit
fb398d172a
@ -20,6 +20,7 @@ Lots of fun options!
|
|||||||
* `:timeout` waits this number of seconds when restarting the Rails server before reporting there's a problem (default `20`).
|
* `:timeout` waits this number of seconds when restarting the Rails server before reporting there's a problem (default `20`).
|
||||||
* `:server` lets you specify the webserver engine to use (try `:server => :thin`).
|
* `:server` lets you specify the webserver engine to use (try `:server => :thin`).
|
||||||
* `:pid_file` specify your pid_file, so that maybe you can run multiple instances with same rails_env (default `tmp/pids/[RAILS_ENV].pid`)
|
* `:pid_file` specify your pid_file, so that maybe you can run multiple instances with same rails_env (default `tmp/pids/[RAILS_ENV].pid`)
|
||||||
|
* `:zeus` support [zeus](https://github.com/burke/zeus) to boost rails init speed.
|
||||||
|
|
||||||
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
|
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
|
||||||
OSes, and to add some more real tests.
|
OSes, and to add some more real tests.
|
||||||
|
@ -42,7 +42,9 @@ module Guard
|
|||||||
rails_options << '-u' if options[:debugger]
|
rails_options << '-u' if options[:debugger]
|
||||||
rails_options << options[:server] if options[:server]
|
rails_options << options[:server] if options[:server]
|
||||||
|
|
||||||
%{sh -c 'cd #{Dir.pwd} && RAILS_ENV=#{options[:environment]} rails s #{rails_options.join(' ')} &'}
|
rails_command = options[:zeus] ? 'zeus' : 'rails'
|
||||||
|
|
||||||
|
%{sh -c 'cd #{Dir.pwd} && RAILS_ENV=#{options[:environment]} #{rails_command} s #{rails_options.join(' ')} &'}
|
||||||
end
|
end
|
||||||
|
|
||||||
def pid_file
|
def pid_file
|
||||||
|
Loading…
Reference in New Issue
Block a user