Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' into 2.1.x

  • Loading branch information...
commit 4bc9c182c82fad74270c648cd49cc9e7d5cd122d 2 parents 794c26d + dc4e578
Joshua Peek josh authored
2  lib/sprockets/asset_attributes.rb
View
@@ -58,7 +58,7 @@ def extensions
# # => ".js"
#
def format_extension
- extensions.detect { |ext|
+ extensions.reverse.detect { |ext|
@environment.mime_types(ext) && !@environment.engines(ext)
}
end
2  lib/sprockets/version.rb
View
@@ -1,3 +1,3 @@
module Sprockets
- VERSION = "2.0.2"
+ VERSION = "2.0.3"
end
4 test/test_asset_attributes.rb
View
@@ -53,6 +53,8 @@ class TestAssetAttributes < Sprockets::TestCase
assert_equal ".js", pathname("jquery.min.js").format_extension
assert_equal ".js", pathname("jquery.tmpl.js").format_extension
assert_equal ".js", pathname("jquery.tmpl.min.js").format_extension
+ assert_equal ".js", pathname("jquery.csv.js").format_extension
+ assert_equal ".js", pathname("jquery.csv.min.js").format_extension
env = Sprockets::Environment.new
env.register_engine '.ms', Class.new
@@ -72,6 +74,8 @@ class TestAssetAttributes < Sprockets::TestCase
assert_equal [".erb"], pathname("jquery.js.erb").engine_extensions
assert_equal [".erb"], pathname("jquery.min.js.erb").engine_extensions
assert_equal [".coffee"], pathname("jquery.min.coffee").engine_extensions
+ assert_equal [".erb"], pathname("jquery.csv.min.js.erb").engine_extensions
+ assert_equal [".coffee", ".erb"], pathname("jquery.csv.min.js.coffee.erb").engine_extensions
env = Sprockets::Environment.new
env.register_engine '.ms', Class.new
Please sign in to comment.
Something went wrong with that request. Please try again.