Extract capture_with_info

This commit is contained in:
David Heinemeier Hansson
2023-01-20 16:32:12 +01:00
parent 5d629d0600
commit 0388495819
3 changed files with 16 additions and 12 deletions

View File

@@ -2,7 +2,11 @@ require "sshkit"
require "sshkit/dsl"
class SSHKit::Backend::Abstract
def puts_by_host(host, output)
puts "App Host: #{host}\n#{output}\n\n"
def capture_with_info(*args)
capture(*args, verbosity: Logger::INFO)
end
def puts_by_host(host, output, type: "App")
puts "#{type} Host: #{host}\n#{output}\n\n"
end
end