magic_recipes 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/magic_recipes/assets.rb +3 -3
- metadata +1 -1
data/lib/magic_recipes/assets.rb
CHANGED
@@ -70,10 +70,10 @@ module MagicRecipes
|
|
70
70
|
run <<-CMD
|
71
71
|
#{rvm_cmd} &&
|
72
72
|
cd #{latest_release} &&
|
73
|
-
#{sudo if use_sudo} #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile
|
73
|
+
#{"#{sudo} -i -u #{user}" if use_sudo} #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile
|
74
74
|
CMD
|
75
75
|
else
|
76
|
-
run "cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile"
|
76
|
+
run "cd #{latest_release} && #{"#{sudo} -i -u #{user}" if use_sudo} #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile"
|
77
77
|
end
|
78
78
|
end
|
79
79
|
|
@@ -94,7 +94,7 @@ module MagicRecipes
|
|
94
94
|
set :asset_env, "RAILS_GROUPS=assets"
|
95
95
|
DESC
|
96
96
|
task :clean, :roles => assets_role, :except => { :no_release => true } do
|
97
|
-
run "cd #{latest_release} && #{sudo if use_sudo} #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:clean"
|
97
|
+
run "cd #{latest_release} && #{"#{sudo} -i -u #{user}" if use_sudo} #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:clean"
|
98
98
|
end
|
99
99
|
end
|
100
100
|
end
|