lib/guard/rails.rb in guard-rails-0.0.2 vs lib/guard/rails.rb in guard-rails-0.0.3

- old
+ new

@@ -10,22 +10,24 @@ DEFAULT_OPTIONS = { :port => 3000, :environment => 'development', :start_on_start => true, :force_run => false, - :timeout => 20 + :timeout => 20, + :server => nil } def initialize(watchers = [], options = {}) super @options = DEFAULT_OPTIONS.merge(options) @runner = RailsRunner.new(@options) end def start - UI.info "Guard::Rails will now restart your app on port #{options[:port]} using #{options[:environment]} environment." + server = options[:server] ? "#{options[:server]} and " : "" + UI.info "Guard::Rails will now restart your app on port #{options[:port]} using #{server}#{options[:environment]} environment." run_all if options[:start_on_start] end def run_all UI.info "Restarting Rails..." @@ -33,10 +35,10 @@ if runner.restart UI.info "Rails restarted, pid #{runner.pid}" Notifier.notify("Rails restarted on port #{options[:port]}.", :title => "Rails restarted!", :image => :success) else UI.info "Rails NOT restarted, check your log files." - Notifier.notify("Rails NOT restarted, check your log files.", :title => "Rails NOT restarted!", :image => :failure) + Notifier.notify("Rails NOT restarted, check your log files.", :title => "Rails NOT restarted!", :image => :failed) end end def stop Notifier.notify("Until next time...", :title => "Rails shutting down.", :image => :pending)