Sha256: 19ba905d815136af27b711e6cf546451ee4e9911270d9bad0f3a2df983c611ff
Contents?: true
Size: 570 Bytes
Versions: 1
Compression:
Stored size: 570 Bytes
Contents
module SSHKit module Backend class SshCommand < Printer def run instance_exec(host, &@block) end def within(directory, &block) (@pwd ||= []).push directory.to_s yield ensure @pwd.pop end def execute(*args, &block) host_url = String(host.hostname) host_url = '%s@%s' % [host.username, host_url] if host.username result = 'ssh %s -t "%s"' % [host_url, command(*args).to_command] output << Command.new(result) system(result) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
j-cap-recipes-0.0.16 | lib/sshkit/backends/ssh_command.rb |