Make logic more confusing
This commit is contained in:
parent
6aa27e2b19
commit
a613c26a6f
13
Guardfile
13
Guardfile
|
@ -10,12 +10,7 @@ module ::Guard
|
||||||
|
|
||||||
def run_spec(path)
|
def run_spec(path)
|
||||||
if File.exists?(path)
|
if File.exists?(path)
|
||||||
success = system "bundle exec bacon -Itest -q #{path}"
|
@success &&= system "bundle exec bacon -Itest -q #{path}"
|
||||||
|
|
||||||
if !success
|
|
||||||
@any_failed = true
|
|
||||||
end
|
|
||||||
|
|
||||||
puts
|
puts
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -25,16 +20,14 @@ module ::Guard
|
||||||
end
|
end
|
||||||
|
|
||||||
def run_on_changes(paths)
|
def run_on_changes(paths)
|
||||||
@any_failed = false
|
@success = true
|
||||||
paths.delete(:all)
|
paths.delete(:all)
|
||||||
|
|
||||||
paths.each do |path|
|
paths.each do |path|
|
||||||
file_changed(path)
|
file_changed(path)
|
||||||
end
|
end
|
||||||
|
|
||||||
if !@any_failed
|
run_all if @success
|
||||||
run_all
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue