aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorMark J. Titorenko <mark@titorenko.net>2011-10-04 23:10:11 +0100
committerJosé Valim <jose.valim@gmail.com>2011-10-05 01:25:01 +0200
commitee51cc30ff93201c9e76e7fcfa2d298e4e1568c3 (patch)
treebd65889689cce2de544ad6d2e815188d009ad3d8 /actionpack/lib
parentb41bd968c6734737d14c542c514b8deef30a3ffe (diff)
downloadrails-ee51cc30ff93201c9e76e7fcfa2d298e4e1568c3.tar.gz
rails-ee51cc30ff93201c9e76e7fcfa2d298e4e1568c3.tar.bz2
rails-ee51cc30ff93201c9e76e7fcfa2d298e4e1568c3.zip
don't munge the environment, let rake do that for us
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/sprockets/assets.rake8
1 files changed, 3 insertions, 5 deletions
diff --git a/actionpack/lib/sprockets/assets.rake b/actionpack/lib/sprockets/assets.rake
index 8f993b0abb..18fe9f05a0 100644
--- a/actionpack/lib/sprockets/assets.rake
+++ b/actionpack/lib/sprockets/assets.rake
@@ -2,15 +2,15 @@ require "fileutils"
namespace :assets do
def ruby_rake_task(task)
- args = [$0, task]
+ env = ENV['RAILS_ENV'] || 'production'
+ groups = ENV['RAILS_GROUPS'] || 'assets'
+ args = [$0, task,"RAILS_ENV=#{env}","RAILS_GROUPS=#{groups}"]
args << "--trace" if Rake.application.options.trace
ruby *args
end
desc "Compile all the assets named in config.assets.precompile"
task :precompile do
- ENV["RAILS_GROUPS"] ||= "assets"
- ENV["RAILS_ENV"] ||= "production"
ruby_rake_task "assets:precompile:all"
end
@@ -58,8 +58,6 @@ namespace :assets do
desc "Remove compiled assets"
task :clean do
- ENV["RAILS_GROUPS"] ||= "assets"
- ENV["RAILS_ENV"] ||= "production"
ruby_rake_task "assets:clean:all"
end