From 2672550bbd526848c359fd0b3212e33d2add3fe5 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Fri, 10 Jun 2011 14:29:16 -0400 Subject: [PATCH] ok, there's a little bit that can be cached --- lib/jasmine/files_list.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/jasmine/files_list.rb b/lib/jasmine/files_list.rb index fe18b1d..f0cb693 100644 --- a/lib/jasmine/files_list.rb +++ b/lib/jasmine/files_list.rb @@ -40,6 +40,8 @@ module Jasmine coffeescript_run = [] files.collect { |file| + next @code_for_file[file] if @code_for_file[file] + coffeescript_run << file if (ext = File.extname(file)) == '.coffee' output = [] @@ -56,6 +58,8 @@ module Jasmine end end + @code_for_file[file] = output if output.length == 1 + output }.flatten.reject(&:empty?) end