Skip to content

Commit

Permalink
Merge pull request #2985 from kennyj/master
Browse files Browse the repository at this point in the history
fix #2582 (with testcase)
  • Loading branch information
spastorino committed Sep 12, 2011
1 parent 184d8a2 commit 7e26ab1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion actionpack/lib/sprockets/assets.rake
Expand Up @@ -44,7 +44,7 @@ namespace :assets do
end
end

File.open("#{manifest_path}/manifest.yml", 'w') do |f|
File.open("#{manifest_path}/manifest.yml", 'wb') do |f|
YAML.dump(manifest, f)
end
end
Expand Down
15 changes: 15 additions & 0 deletions railties/test/application/rake_test.rb
@@ -1,3 +1,4 @@
# coding:utf-8
require "isolation/abstract_unit"

module ApplicationTests
Expand Down Expand Up @@ -174,5 +175,19 @@ def test_loading_specific_fixtures
assert_equal 2, ::AppTemplate::Application::Product.count
assert_equal 0, ::AppTemplate::Application::User.count
end

def test_assets_precompile_with_utf8_filename
add_to_config <<-RUBY
config.assets.precompile = [ /\.png$$/, /application.(css|js)$/ ]
RUBY

Dir.chdir(app_path) do
`cp app/assets/images/rails.png app/assets/images/レイルズ.png`
`rake assets:precompile`
open("public/assets/manifest.yml") do |f|
assert_match(/レイルズ.png/, f.read)
end
end
end
end
end

0 comments on commit 7e26ab1

Please sign in to comment.