lib/magic_recipes/assets.rb in magic_recipes-0.1.8 vs lib/magic_recipes/assets.rb in magic_recipes-0.1.9
- old
+ new
@@ -68,11 +68,11 @@
end
if use_rvm
run <<-CMD
#{rvm_cmd} &&
cd #{latest_release} &&
- #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile
+ #{sudo if use_sudo} #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile
CMD
else
run "cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile"
end
end
@@ -92,10 +92,10 @@
set :rake, "rake"
set :rails_env, "production"
set :asset_env, "RAILS_GROUPS=assets"
DESC
task :clean, :roles => assets_role, :except => { :no_release => true } do
- run "cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:clean"
+ run "cd #{latest_release} && #{sudo if use_sudo} #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:clean"
end
end
end
end
\ No newline at end of file