Skip to content

Commit

Permalink
Update with Listen edge
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaudgg committed Apr 5, 2012
1 parent 904da83 commit 8af96c4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ elsif RbConfig::CONFIG['target_os'] =~ /mswin|mingw/i
gem 'win32console', :require => false
gem 'rb-notifu', '>= 0.0.4', :require => false
end

gem 'rb-fsevent', :git => 'git://github.com/thibaudgg/rb-fsevent.git'
gem 'listen', :git => 'git://github.com/guard/listen.git', :branch => 'fix_block'
10 changes: 5 additions & 5 deletions Guardfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ group :specs do
end
end

group :docs do
guard :ronn do
watch(%r{^man/.+\.ronn?$})
end
end
# group :docs do
# guard :ronn do
# watch(%r{^man/.+\.ronn?$})
# end
# end

# require 'guard/guard'
#
Expand Down
2 changes: 1 addition & 1 deletion lib/guard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def setup_listener
Dsl.reevaluate_guardfile if Watcher.match_guardfile?(modified)
runner.run_on_changes(modified, added, removed)
end
@listener = Listen.to(@watchdir, Hash.new(options)).change(&listener_callback)
@listener = Listen.to(@watchdir, {:relative_paths => true}).change(&listener_callback)
end

def setup_notifier
Expand Down
6 changes: 3 additions & 3 deletions spec/guard_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@
end

it "respect the watchdir option" do
::Guard.setup(:watchdir => "/foo/bar")
::Guard.listener.directory.should eql "/foo/bar"
::Guard.setup(:watchdir => "/usr")
::Guard.listener.directory.should eql "/usr"
end

it "logs command execution if the debug option is true" do
Expand Down Expand Up @@ -398,7 +398,7 @@ class Guard::FooBaz < Guard::Guard; end
end

it "return @groups without any argument" do
subject.groups.should have(5).items
subject.groups.should have(4).items

subject.reset_groups

Expand Down

0 comments on commit 8af96c4

Please sign in to comment.