提交 0d48b3af 编写于 作者: S Santiago Pastorino

Revert "Provide a way to access to assets without using the digest, useful for...

Revert "Provide a way to access to assets without using the digest, useful for static files and emails"

This reverts commit 82afaa06.
上级 5f28c227
...@@ -43,7 +43,6 @@ namespace :assets do ...@@ -43,7 +43,6 @@ namespace :assets do
mkdir_p filename.dirname mkdir_p filename.dirname
asset.write_to(filename) asset.write_to(filename)
asset.write_to("#{filename}.gz") if filename.to_s =~ /\.(css|js)$/ asset.write_to("#{filename}.gz") if filename.to_s =~ /\.(css|js)$/
asset.write_to(target.join(logical_path))
end end
end end
end end
......
...@@ -12,9 +12,6 @@ ...@@ -12,9 +12,6 @@
*Rails 3.1.0 (unreleased)* *Rails 3.1.0 (unreleased)*
* Provide a way to access to assets without using the digest, useful for
static files and emails. [Santiago Pastorino]
* The default database schema file is written as UTF-8. [Aaron Patterson] * The default database schema file is written as UTF-8. [Aaron Patterson]
* Generated apps with --dev or --edge flags depend on git versions of * Generated apps with --dev or --edge flags depend on git versions of
......
...@@ -58,9 +58,7 @@ def app ...@@ -58,9 +58,7 @@ def app
Dir.chdir(app_path){ `bundle exec rake assets:precompile` } Dir.chdir(app_path){ `bundle exec rake assets:precompile` }
end end
files = Dir["#{app_path}/public/assets/application-*.js"] files = Dir["#{app_path}/public/assets/application-*.js"]
files << Dir["#{app_path}/public/assets/application.js"].first
files << Dir["#{app_path}/public/assets/foo/application-*.js"].first files << Dir["#{app_path}/public/assets/foo/application-*.js"].first
files << Dir["#{app_path}/public/assets/foo/application.js"].first
files.each do |file| files.each do |file|
assert_not_nil file, "Expected application.js asset to be generated, but none found" assert_not_nil file, "Expected application.js asset to be generated, but none found"
assert_equal "alert()", File.read(file) assert_equal "alert()", File.read(file)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册