Skip to content
This repository
Browse code

Merge branch 'master' into 2.1.x

  • Loading branch information...
commit 4bc9c182c82fad74270c648cd49cc9e7d5cd122d 2 parents 794c26d + dc4e578
Joshua Peek authored
2  lib/sprockets/asset_attributes.rb
@@ -58,7 +58,7 @@ def extensions
58 58
     #     # => ".js"
59 59
     #
60 60
     def format_extension
61  
-      extensions.detect { |ext|
  61
+      extensions.reverse.detect { |ext|
62 62
         @environment.mime_types(ext) && !@environment.engines(ext)
63 63
       }
64 64
     end
2  lib/sprockets/version.rb
... ...
@@ -1,3 +1,3 @@
1 1
 module Sprockets
2  
-  VERSION = "2.0.2"
  2
+  VERSION = "2.0.3"
3 3
 end
4  test/test_asset_attributes.rb
@@ -53,6 +53,8 @@ class TestAssetAttributes < Sprockets::TestCase
53 53
     assert_equal ".js", pathname("jquery.min.js").format_extension
54 54
     assert_equal ".js", pathname("jquery.tmpl.js").format_extension
55 55
     assert_equal ".js", pathname("jquery.tmpl.min.js").format_extension
  56
+    assert_equal ".js", pathname("jquery.csv.js").format_extension
  57
+    assert_equal ".js", pathname("jquery.csv.min.js").format_extension
56 58
 
57 59
     env = Sprockets::Environment.new
58 60
     env.register_engine '.ms', Class.new
@@ -72,6 +74,8 @@ class TestAssetAttributes < Sprockets::TestCase
72 74
     assert_equal [".erb"], pathname("jquery.js.erb").engine_extensions
73 75
     assert_equal [".erb"], pathname("jquery.min.js.erb").engine_extensions
74 76
     assert_equal [".coffee"], pathname("jquery.min.coffee").engine_extensions
  77
+    assert_equal [".erb"], pathname("jquery.csv.min.js.erb").engine_extensions
  78
+    assert_equal [".coffee", ".erb"], pathname("jquery.csv.min.js.coffee.erb").engine_extensions
75 79
 
76 80
     env = Sprockets::Environment.new
77 81
     env.register_engine '.ms', Class.new

0 notes on commit 4bc9c18

Please sign in to comment.
Something went wrong with that request. Please try again.