From 2bde8becac05d17142da894184b3ba3cde0ca215 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Thu, 16 Jun 2011 10:48:34 -0400 Subject: [PATCH] clean up the run before stuff --- lib/guard/jasmine-headless-webkit.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/guard/jasmine-headless-webkit.rb b/lib/guard/jasmine-headless-webkit.rb index cbd964d..9ce863e 100644 --- a/lib/guard/jasmine-headless-webkit.rb +++ b/lib/guard/jasmine-headless-webkit.rb @@ -22,14 +22,14 @@ module Guard def run_all UI.info "Guard::JasmineHeadlessWebkit running all specs..." - JasmineHeadlessWebkitRunner.run if run_before and run_rails_assets and run_jammit + JasmineHeadlessWebkitRunner.run if run_all_things_before @ran_before = false end def run_on_change(paths) paths = filter_paths(paths) @ran_before = false - if run_before and run_rails_assets and run_jammit + if run_all_things_before @ran_before = true if !paths.empty? UI.info "Guard::JasmineHeadlessWebkit running the following: #{paths.join(' ')}" @@ -70,6 +70,10 @@ module Guard end end + def run_all_things_before + run_before and run_rails_assets and run_jammit + end + def run_program(name, command = nil) command ||= name UI.info "Guard::JasmineHeadlessWebkit running #{name}..."