Compare commits

..

2 Commits

Author SHA1 Message Date
John Bintz 36d24c0c14 update maintainer message, thanks to @ranmocy for taking over 2013-01-22 10:24:11 -05:00
John Bintz c1344a98b7 bump version 2012-08-24 10:08:49 -04:00
5 changed files with 6 additions and 22 deletions

View File

@ -1,3 +1,5 @@
_This fork is no longer maintained. Visit [https://github.com/ranmocy/guard-rails](https://github.com/ranmocy/guard-rails) for the current official fork._
[![Build Status](http://travis-ci.org/johnbintz/guard-rails.png)](http://travis-ci.org/johnbintz/guard-rails)
Want to restart your Rails development server whilst you work? Now you can!
@ -17,7 +19,6 @@ Lots of fun options!
* `:debugger` runs the server with the debugger enabled (default `false`). Required ruby-debug gem.
* `: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`).
* `:rails_root` lets you specify the root directory of your app (try `:rails_root => 'test/dummy` for engines).
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.

View File

@ -14,8 +14,7 @@ module Guard
:force_run => false,
:timeout => 30,
:server => nil,
:debugger => false,
:rails_root => nil
:debugger => false
}
def initialize(watchers = [], options = {})

View File

@ -40,19 +40,11 @@ module Guard
rails_options << '-u' if options[:debugger]
rails_options << options[:server] if options[:server]
%{sh -c 'cd #{build_rails_path} && RAILS_ENV=#{options[:environment]} rails s #{rails_options.join(' ')} &'}
end
def build_rails_path
if options[:rails_root]
File.join(Dir.pwd, options[:rails_root])
else
Dir.pwd
end
%{sh -c 'cd #{Dir.pwd} && RAILS_ENV=#{options[:environment]} rails s #{rails_options.join(' ')} &'}
end
def pid_file
File.expand_path(File.join(options[:rails_root].to_s, "tmp/pids/#{options[:environment]}.pid"))
File.expand_path("tmp/pids/#{options[:environment]}.pid")
end
def pid

View File

@ -1,4 +1,4 @@
module GuardRails
VERSION = '0.1.0'
VERSION = '0.1.1'
end

View File

@ -63,14 +63,6 @@ describe Guard::RailsRunner do
runner.build_rails_command.should match(%r{thin})
end
end
context 'custom app path' do
let(:options) { default_options.merge(:app_path => 'spec/dummy') }
it "should have the app path" do
runner.build_rails_command.should match(%r{spec/dummy})
end
end
end
describe '#start' do