Add a command line option to specify the guardfile
This commit is contained in:
parent
ee8489fb83
commit
e3bbdbfa42
9
lib/core_ext/hash_with_indifferent_access.rb
Normal file
9
lib/core_ext/hash_with_indifferent_access.rb
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
class Thor
|
||||||
|
module CoreExt #:nodoc:
|
||||||
|
class HashWithIndifferentAccess < ::Hash #:nodoc:
|
||||||
|
def has_key?(key)
|
||||||
|
super(convert_key(key))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -1,3 +1,5 @@
|
|||||||
|
require 'core_ext/hash_with_indifferent_access'
|
||||||
|
|
||||||
module Guard
|
module Guard
|
||||||
|
|
||||||
autoload :UI, 'guard/ui'
|
autoload :UI, 'guard/ui'
|
||||||
|
@ -10,6 +10,8 @@ module Guard
|
|||||||
method_option :debug, :type => :boolean, :default => false, :aliases => '-d', :banner => "Print debug messages"
|
method_option :debug, :type => :boolean, :default => false, :aliases => '-d', :banner => "Print debug messages"
|
||||||
method_option :group, :type => :array, :default => [], :aliases => '-g', :banner => "Run only the passed groups"
|
method_option :group, :type => :array, :default => [], :aliases => '-g', :banner => "Run only the passed groups"
|
||||||
|
|
||||||
|
method_option :guardfile, :type => :string, :default => './Guardfile', :aliases => '-C', :banner => "Specify a Guardfile"
|
||||||
|
|
||||||
desc "start", "Starts Guard"
|
desc "start", "Starts Guard"
|
||||||
def start
|
def start
|
||||||
::Guard.start(options)
|
::Guard.start(options)
|
||||||
|
Loading…
Reference in New Issue
Block a user