Class: Chake::Backend::Ssh

Inherits:
Chake::Backend show all
Defined in:
lib/chake/backend/ssh.rb

Instance Attribute Summary

Attributes inherited from Chake::Backend

#node

Instance Method Summary collapse

Methods inherited from Chake::Backend

backend_name, get, inherited, #run, #run_as_root, #run_shell, #skip?, #to_s

Instance Method Details

#command_runnerObject



23
24
25
# File 'lib/chake/backend/ssh.rb', line 23

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

#rsyncObject



15
16
17
# File 'lib/chake/backend/ssh.rb', line 15

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

#rsync_destObject



19
20
21
# File 'lib/chake/backend/ssh.rb', line 19

def rsync_dest
  [ssh_target, node.path + '/'].join(':')
end

#scpObject



7
8
9
# File 'lib/chake/backend/ssh.rb', line 7

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

#scp_destObject



11
12
13
# File 'lib/chake/backend/ssh.rb', line 11

def scp_dest
  ssh_target + ':'
end

#shell_commandObject



27
28
29
# File 'lib/chake/backend/ssh.rb', line 27

def shell_command
  command_runner
end