提交 2296340e 编写于 作者: S Santiago Pastorino

Merge pull request #7783 from guilleiguaran/namespace-assets-cache-store

Assets cache shouldn't be shared between different environments
......@@ -57,7 +57,7 @@ def initialize(*)
@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 @@ def show_detailed_exceptions?() true end
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册