Fix code indention.
This commit is contained in:
parent
7e6e52a2c9
commit
d857134446
29
lib/guard.rb
29
lib/guard.rb
@ -25,6 +25,7 @@ module Guard
|
|||||||
# @option options [String] watchdir the director to watch
|
# @option options [String] watchdir the director to watch
|
||||||
# @option options [String] guardfile the path to the Guardfile
|
# @option options [String] guardfile the path to the Guardfile
|
||||||
# @option options [Boolean] watch_all_modifications watches all file modifications if true
|
# @option options [Boolean] watch_all_modifications watches all file modifications if true
|
||||||
|
#
|
||||||
def setup(options = {})
|
def setup(options = {})
|
||||||
@options = options
|
@options = options
|
||||||
@guards = []
|
@guards = []
|
||||||
@ -192,21 +193,21 @@ module Guard
|
|||||||
catch group.options[:halt_on_fail] == true ? :task_has_failed : :no_catch do
|
catch group.options[:halt_on_fail] == true ? :task_has_failed : :no_catch do
|
||||||
guards(:group => group.name).each do |guard|
|
guards(:group => group.name).each do |guard|
|
||||||
if task == :run_on_change
|
if task == :run_on_change
|
||||||
paths = Watcher.match_files(guard, files)
|
paths = Watcher.match_files(guard, files)
|
||||||
unless paths.empty?
|
unless paths.empty?
|
||||||
if @watch_all_modifications
|
if @watch_all_modifications
|
||||||
UI.debug "#{guard.class.name}##{task} with #{paths.inspect}"
|
UI.debug "#{guard.class.name}##{task} with #{paths.inspect}"
|
||||||
supervised_task(guard, task, paths.select {|f| !f.start_with?('!') })
|
supervised_task(guard, task, paths.select { |f| !f.start_with?('!') })
|
||||||
deletions = paths.collect { |f| f.slice(1..-1) if f.start_with?('!') }.compact
|
deletions = paths.collect { |f| f.slice(1..-1) if f.start_with?('!') }.compact
|
||||||
unless deletions.empty?
|
unless deletions.empty?
|
||||||
UI.debug "#{guard.class.name}#run_on_deletion with #{deletions.inspect}"
|
UI.debug "#{guard.class.name}#run_on_deletion with #{deletions.inspect}"
|
||||||
supervised_task(guard, :run_on_deletion, deletions)
|
supervised_task(guard, :run_on_deletion, deletions)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
UI.debug "#{guard.class.name}##{task} with #{paths.inspect}"
|
UI.debug "#{guard.class.name}##{task} with #{paths.inspect}"
|
||||||
supervised_task(guard, task, paths)
|
supervised_task(guard, task, paths)
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
end
|
||||||
else
|
else
|
||||||
supervised_task(guard, task)
|
supervised_task(guard, task)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user