Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

Assets cache shouldn't be shared between different environments
  • Loading branch information...
commit 2296340e2dbb5a38d68b8998a19dff78a2c767aa 2 parents a7f8872 + a4c358f
@spastorino spastorino authored
View
2  railties/lib/rails/application/configuration.rb
@@ -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
View
4 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 }
View
3  railties/test/application/assets_test.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.