Skip to content
Browse files

Ensure automatic watchers doesn't match temp files, fix #26

  • Loading branch information...
1 parent effc866 commit 7f12d206a9a639dbfba38b5b6b6aa8a83a5d72d2 @rymai rymai committed
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/guard/haml.rb
  2. +1 −1 spec/guard/haml_spec.rb
View
2 lib/guard/haml.rb
@@ -17,7 +17,7 @@ def initialize(opts = {})
super(opts)
if options[:input]
- watchers << ::Guard::Watcher.new(%r{^#{options[:input]}/(.+(\.html)?\.haml)$})
+ watchers << ::Guard::Watcher.new(%r{^#{options[:input]}/([\w\-_]+(\.html)?\.haml)$})
end
end
View
2 spec/guard/haml_spec.rb
@@ -28,7 +28,7 @@
it 'generates watchers automatically' do
plugin.watchers.should have(1).item
- plugin.watchers[0].pattern.should eq %r{^markup/(.+(\.html)?\.haml)$}
+ plugin.watchers[0].pattern.should eq %r{^markup/([\w\-_]+(\.html)?\.haml)$}
end
end
end

0 comments on commit 7f12d20

Please sign in to comment.
Something went wrong with that request. Please try again.