lib/capistrano/puma/monit.rb in capistrano3-puma-3.1.0 vs lib/capistrano/puma/monit.rb in capistrano3-puma-3.1.1
- old
+ new
@@ -20,12 +20,15 @@
fetch(:puma_monit_service_name, "puma_#{fetch(:application)}_#{fetch(:stage)}")
end
def sudo_if_needed(command)
if fetch(:puma_monit_use_sudo)
- sudo command
+ backend.sudo command
else
- execute command
+ puma_role = fetch(:puma_role)
+ backend.on(puma_role) do
+ backend.execute command
+ end
end
end
end
-end
\ No newline at end of file
+end