Notifier calls .available? with options #408

merged 2 commits into from Mar 28, 2013


None yet

3 participants

amiel commented Mar 28, 2013

This allows FileNotifier to not be available? when it is not configured with a :path.

There are also a few other places where .available? uses a DEFAULTS hash to check availability, but could not consult user options. This would theoretically be a bug if the user configured a notifier in such a way that it would only be considered available with their options.

amiel commented Mar 28, 2013

There was one failing test before this pull-request. It is still failing.

  1) Guard::Dsl#callback creates callbacks for the guard
     Failure/Error: described_class.evaluate_guardfile(:guardfile_contents => '
       Guard received :add_guard with unexpected arguments
         expected: ("dummy", #<RSpec::Mocks::ArgumentMatchers::AnyArgMatcher:0x007f984135be30>, #<RSpec::Mocks::ArgumentMatchers::AnyArgMatcher:0x007f984135be08>, {:group=>:default})
              got: ("shell", [#<Guard::Watcher:0x007f98416bde70 @action=#<Proc:0x007f98416bde98@Inline Guardfile:11>, @pattern=".guard_result">], [], {:group=>:default})
     # ./lib/guard/dsl.rb:354:in `guard'
     # Inline Guardfile:10:in `instance_eval_guardfile'
     # ./lib/guard/dsl.rb:119:in `instance_eval'
     # ./lib/guard/dsl.rb:119:in `instance_eval_guardfile'
     # ./lib/guard/dsl.rb:74:in `evaluate_guardfile'
     # ./spec/guard/dsl_spec.rb:504:in `block (3 levels) in <top (required)>'

Changes Unknown when pulling abcb4e2 on amiel:available_options into * on guard:master*.

View Details

@netzpirat netzpirat merged commit abcb4e2 into guard:master Mar 28, 2013

1 check failed

Details default The Travis build failed

We have now an open commit bit policy and you're the first contributor! Welcome @amiel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment