From a0a8cf213bc654db77e92f61c70e3e31f0b59e3f Mon Sep 17 00:00:00 2001 From: John Bintz Date: Mon, 23 May 2011 20:59:20 -0400 Subject: [PATCH] javascript finder --- lib/guard/jasmine-headless-webkit.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/guard/jasmine-headless-webkit.rb b/lib/guard/jasmine-headless-webkit.rb index cc269c6..c6e3ed5 100644 --- a/lib/guard/jasmine-headless-webkit.rb +++ b/lib/guard/jasmine-headless-webkit.rb @@ -26,8 +26,8 @@ module Guard end end - class DSL - def matching_js_file(path) + class Dsl + def newest_js_file(path) Dir[path + '*.{js,coffee}'].sort { |left, right| File.mtime(right) <=> File.mtime(left) }.first end end