diff options
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/tasks/tmp.rake | 4 | ||||
-rw-r--r-- | railties/test/application/assets_test.rb | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index 613c5b25f0..a7a35c2685 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -57,7 +57,7 @@ module Rails @assets.debug = false @assets.compile = true @assets.digest = false - @assets.cache_store = [ :file_store, "#{root}/tmp/cache/assets/" ] + @assets.cache_store = [ :file_store, "#{root}/tmp/cache/assets/#{Rails.env}/" ] @assets.js_compressor = nil @assets.css_compressor = nil @assets.initialize_on_precompile = true diff --git a/railties/lib/rails/tasks/tmp.rake b/railties/lib/rails/tasks/tmp.rake index 0968765b4f..0bb64ced95 100644 --- a/railties/lib/rails/tasks/tmp.rake +++ b/railties/lib/rails/tasks/tmp.rake @@ -6,7 +6,9 @@ namespace :tmp do 'tmp/cache', 'tmp/sockets', 'tmp/pids', - 'tmp/cache/assets' ] + 'tmp/cache/assets/development', + 'tmp/cache/assets/test', + 'tmp/cache/assets/production' ] tmp_dirs.each { |d| directory d } diff --git a/railties/test/application/assets_test.rb b/railties/test/application/assets_test.rb index 6e9ae6b74e..12223287ba 100644 --- a/railties/test/application/assets_test.rb +++ b/railties/test/application/assets_test.rb @@ -323,7 +323,8 @@ module ApplicationTests clean_assets! - files = Dir["#{app_path}/public/assets/**/*", "#{app_path}/tmp/cache/assets/*"] + files = Dir["#{app_path}/public/assets/**/*", "#{app_path}/tmp/cache/assets/development/*", + "#{app_path}/tmp/cache/assets/test/*", "#{app_path}/tmp/cache/assets/production/*"] assert_equal 0, files.length, "Expected no assets, but found #{files.join(', ')}" end |