mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Assets cache shouldn't be shared between different environments
This commit is contained in:
parent
9eb72ac78f
commit
a4c358f84c
3 changed files with 6 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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 }
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue