Permalink
Browse files

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

Assets cache shouldn't be shared between different environments
  • Loading branch information...
2 parents a7f8872 + a4c358f commit 2296340e2dbb5a38d68b8998a19dff78a2c767aa @spastorino spastorino committed Sep 28, 2012
@@ -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

0 comments on commit 2296340

Please sign in to comment.