From d8571344467fdc8c1a93a22d4dc3fffa7d046fd0 Mon Sep 17 00:00:00 2001 From: Michael Kessler Date: Tue, 27 Sep 2011 20:44:17 +0200 Subject: [PATCH] Fix code indention. --- lib/guard.rb | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/lib/guard.rb b/lib/guard.rb index 7d12926..6ddc608 100644 --- a/lib/guard.rb +++ b/lib/guard.rb @@ -25,6 +25,7 @@ module Guard # @option options [String] watchdir the director to watch # @option options [String] guardfile the path to the Guardfile # @option options [Boolean] watch_all_modifications watches all file modifications if true + # def setup(options = {}) @options = options @guards = [] @@ -192,21 +193,21 @@ module Guard catch group.options[:halt_on_fail] == true ? :task_has_failed : :no_catch do guards(:group => group.name).each do |guard| if task == :run_on_change - paths = Watcher.match_files(guard, files) - unless paths.empty? - if @watch_all_modifications - UI.debug "#{guard.class.name}##{task} with #{paths.inspect}" - supervised_task(guard, task, paths.select {|f| !f.start_with?('!') }) - deletions = paths.collect { |f| f.slice(1..-1) if f.start_with?('!') }.compact - unless deletions.empty? - UI.debug "#{guard.class.name}#run_on_deletion with #{deletions.inspect}" - supervised_task(guard, :run_on_deletion, deletions) - end - else - UI.debug "#{guard.class.name}##{task} with #{paths.inspect}" - supervised_task(guard, task, paths) - end + paths = Watcher.match_files(guard, files) + unless paths.empty? + if @watch_all_modifications + UI.debug "#{guard.class.name}##{task} with #{paths.inspect}" + supervised_task(guard, task, paths.select { |f| !f.start_with?('!') }) + deletions = paths.collect { |f| f.slice(1..-1) if f.start_with?('!') }.compact + unless deletions.empty? + UI.debug "#{guard.class.name}#run_on_deletion with #{deletions.inspect}" + supervised_task(guard, :run_on_deletion, deletions) + end + else + UI.debug "#{guard.class.name}##{task} with #{paths.inspect}" + supervised_task(guard, task, paths) end + end else supervised_task(guard, task) end