diff options
| author | Santiago Pastorino <santiago@wyeworks.com> | 2012-09-28 15:49:04 -0700 | 
|---|---|---|
| committer | Santiago Pastorino <santiago@wyeworks.com> | 2012-09-28 15:49:04 -0700 | 
| commit | 2296340e2dbb5a38d68b8998a19dff78a2c767aa (patch) | |
| tree | c1c63f87b306cdb041fe2dfc78c8981005f67596 | |
| parent | a7f887258f59e2a94f3dd7f9a05b4726df8441c7 (diff) | |
| parent | a4c358f84c183743edec0c5d6ef113d8e1a5500f (diff) | |
| download | rails-2296340e2dbb5a38d68b8998a19dff78a2c767aa.tar.gz rails-2296340e2dbb5a38d68b8998a19dff78a2c767aa.tar.bz2 rails-2296340e2dbb5a38d68b8998a19dff78a2c767aa.zip | |
Merge pull request #7783 from guilleiguaran/namespace-assets-cache-store
Assets cache shouldn't be shared between different environments
| -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 | 
