Class: Chake::Connection::Ssh

Inherits:
Chake::Connection show all
Defined in:
lib/chake/connection/ssh.rb

Instance Attribute Summary

Attributes inherited from Chake::Connection

#node

Instance Method Summary collapse

Methods inherited from Chake::Connection

connection_name, get, inherited, #read_output, #run, #run_as_root, #run_shell, #skip?, #to_s

Instance Method Details

#command_runnerObject



20
21
22
# File 'lib/chake/connection/ssh.rb', line 20

def command_runner
  [ssh_prefix, 'ssh', ssh_config, ssh_options, ssh_target].flatten.compact
end

#rsyncObject



12
13
14
# File 'lib/chake/connection/ssh.rb', line 12

def rsync
  [ssh_prefix, 'rsync', rsync_ssh].flatten.compact
end

#rsync_destObject



16
17
18
# File 'lib/chake/connection/ssh.rb', line 16

def rsync_dest
  [ssh_target, "#{node.path}/"].join(':')
end

#scpObject



4
5
6
# File 'lib/chake/connection/ssh.rb', line 4

def scp
  ['scp', ssh_config, scp_options].flatten.compact
end

#scp_destObject



8
9
10
# File 'lib/chake/connection/ssh.rb', line 8

def scp_dest
  "#{ssh_target}:"
end

#shell_commandObject



24
25
26
# File 'lib/chake/connection/ssh.rb', line 24

def shell_command
  command_runner
end