From 98c112c074d740852ff536bdd8532b2a1547c3fa Mon Sep 17 00:00:00 2001 From: Thibaud Guillaume-Gentil Date: Tue, 19 Apr 2011 09:40:34 +0200 Subject: [PATCH] Fixed new_modified_files rerun conditions on Guard.run_on_change_for_all_guards --- CHANGELOG.rdoc | 5 +++++ lib/guard.rb | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rdoc b/CHANGELOG.rdoc index a810809..e22ec01 100644 --- a/CHANGELOG.rdoc +++ b/CHANGELOG.rdoc @@ -1,3 +1,8 @@ +== 0.3.3 (Avril 18, 2011) + +Bugs fixes: +- Fixed new_modified_files rerun conditions on Guard.run_on_change_for_all_guards + == 0.3.2 (Avril 17, 2011) Bugs fixes: diff --git a/lib/guard.rb b/lib/guard.rb index 2fb8235..f268b99 100644 --- a/lib/guard.rb +++ b/lib/guard.rb @@ -51,8 +51,8 @@ module Guard # Reparse the whole directory to catch new files modified during the guards run new_modified_files = listener.modified_files([Dir.pwd + '/'], :all => true) listener.update_last_event - unless new_modified_files.empty? - run { run_on_change_for_all_guards(new_modified_files) } if Watcher.match_files?(guards, files) + if !new_modified_files.empty? && Watcher.match_files?(guards, new_modified_files) + run { run_on_change_for_all_guards(new_modified_files) } end end