lib/guard/resque.rb in guard-resque-0.0.4 vs lib/guard/resque.rb in guard-resque-0.0.5

- old
+ new

@@ -1,7 +1,8 @@ require 'guard' require 'guard/guard' +require 'timeout' module Guard class Resque < Guard DEFAULT_SIGNAL = :QUIT @@ -13,10 +14,11 @@ # Allowable options are: # - :environment e.g. 'test' # - :task .e.g 'resque:work' # - :queue e.g. '*' # - :count e.g. 3 + # - :interval e.g. 5 # - :verbose e.g. true # - :vverbose e.g. true # - :trace e.g. true # - :stop_signal e.g. :QUIT or :SIGQUIT def initialize(watchers = [], options = {}) @@ -92,10 +94,11 @@ end def env var = Hash.new + var['INTERVAL'] = @options[:interval].to_s if @options[:interval] var['QUEUE'] = @options[:queue].to_s if @options[:queue] var['COUNT'] = @options[:count].to_s if @options[:count] var['RAILS_ENV'] = @options[:environment].to_s if @options[:environment] var['VERBOSE'] = '1' if @options[:verbose] @@ -103,5 +106,6 @@ return var end end end +