diff --git a/lib/core_ext/hash_with_indifferent_access.rb b/lib/core_ext/hash_with_indifferent_access.rb new file mode 100644 index 0000000..cfb83e7 --- /dev/null +++ b/lib/core_ext/hash_with_indifferent_access.rb @@ -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 diff --git a/lib/guard.rb b/lib/guard.rb index 8923320..607e759 100644 --- a/lib/guard.rb +++ b/lib/guard.rb @@ -1,3 +1,5 @@ +require 'core_ext/hash_with_indifferent_access' + module Guard autoload :UI, 'guard/ui' diff --git a/lib/guard/cli.rb b/lib/guard/cli.rb index 9bf323a..98c4fc8 100644 --- a/lib/guard/cli.rb +++ b/lib/guard/cli.rb @@ -10,6 +10,8 @@ module Guard 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 :guardfile, :type => :string, :default => './Guardfile', :aliases => '-C', :banner => "Specify a Guardfile" + desc "start", "Starts Guard" def start ::Guard.start(options)