From ae3b2fe4e1b237d4053f9750ff8602bd552f11a1 Mon Sep 17 00:00:00 2001 From: Ivan Tempik Date: Wed, 18 Feb 2015 20:33:29 +0300 Subject: [PATCH] Fixed filesname for .coffee files that contains '.' in name --- lib/coffee-rails-source-maps.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/coffee-rails-source-maps.rb b/lib/coffee-rails-source-maps.rb index 01983e7..1fe5cf9 100644 --- a/lib/coffee-rails-source-maps.rb +++ b/lib/coffee-rails-source-maps.rb @@ -22,7 +22,7 @@ def compile(script, options = {}) if pathname.nil? return Source.context.call("CoffeeScript.compile", script, options) else - clean_name = pathname.basename.to_s.split(".").first + clean_name = File.basename(pathname.basename, File.extname(pathname.basename)) rel_path = if pathname.to_s.start_with?(Bundler.bundle_path.to_s) Pathname('bundler').join(pathname.relative_path_from(Bundler.bundle_path)).dirname