Skip to content

Commit

Permalink
Use cache/assets instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Jul 13, 2011
1 parent d0f05a6 commit 675c20e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion railties/lib/rails/application/configuration.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def initialize(*)
@assets.precompile = [ /\w+\.(?!js|css).+/, /application.(css|js)$/ ] @assets.precompile = [ /\w+\.(?!js|css).+/, /application.(css|js)$/ ]
@assets.prefix = "/assets" @assets.prefix = "/assets"


@assets.cache_store = [ :file_store, "#{root}/tmp/assets_cache/" ] @assets.cache_store = [ :file_store, "#{root}/tmp/cache/assets/" ]
@assets.js_compressor = nil @assets.js_compressor = nil
@assets.css_compressor = nil @assets.css_compressor = nil
end end
Expand Down
2 changes: 1 addition & 1 deletion railties/lib/rails/generators/rails/app/app_generator.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def test


def tmp def tmp
empty_directory "tmp/cache" empty_directory "tmp/cache"
empty_directory "tmp/assets_cache" empty_directory "tmp/cache/assets"
end end


def vendor def vendor
Expand Down
3 changes: 1 addition & 2 deletions railties/lib/rails/tasks/tmp.rake
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace :tmp do


desc "Creates tmp directories for sessions, cache, sockets, and pids" desc "Creates tmp directories for sessions, cache, sockets, and pids"
task :create do task :create do
FileUtils.mkdir_p(%w( tmp/sessions tmp/cache tmp/sockets tmp/pids tmp/assets_cache )) FileUtils.mkdir_p(%w( tmp/sessions tmp/cache tmp/sockets tmp/pids tmp/cache/assets ))
end end


namespace :sessions do namespace :sessions do
Expand All @@ -18,7 +18,6 @@ namespace :tmp do
# desc "Clears all files and directories in tmp/cache" # desc "Clears all files and directories in tmp/cache"
task :clear do task :clear do
FileUtils.rm_rf(Dir['tmp/cache/[^.]*']) FileUtils.rm_rf(Dir['tmp/cache/[^.]*'])
FileUtils.rm_rf(Dir['tmp/assets_cache/[^.]*'])
end end
end end


Expand Down
2 changes: 1 addition & 1 deletion railties/test/generators/app_generator_test.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
vendor vendor
vendor/assets vendor/assets
vendor/plugins vendor/plugins
tmp/assets_cache
tmp/cache tmp/cache
tmp/cache/assets
) )


class AppGeneratorTest < Rails::Generators::TestCase class AppGeneratorTest < Rails::Generators::TestCase
Expand Down

0 comments on commit 675c20e

Please sign in to comment.