From 6b2055f64270738843de2263bd606351e461c2f3 Mon Sep 17 00:00:00 2001 From: David Beveridge Date: Sun, 25 Aug 2013 20:02:30 -0700 Subject: [PATCH] remove .coffee extension on compiled version of CoffeeScript files When compiled, CoffeeScript files had names like "my_lib.coffee.js". This broke compatibility with RequireJS. Changing the naming convention to use only the .js extension allows files to be used as RequireJS modules. --- lib/jasmine/headless/coffee_script_cache.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/jasmine/headless/coffee_script_cache.rb b/lib/jasmine/headless/coffee_script_cache.rb index 5ae5efe..dc387c3 100644 --- a/lib/jasmine/headless/coffee_script_cache.rb +++ b/lib/jasmine/headless/coffee_script_cache.rb @@ -14,6 +14,11 @@ module Jasmine def action CoffeeScript.compile(File.read(file)) end + + def relative_cache_file + super.gsub(/.coffee$/, '') + end + end end end