Class: Chake::Connection::Local

Inherits:
Chake::Connection show all
Defined in:
lib/chake/connection/local.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, #rsync, #rsync_dest, #run, #run_as_root, #run_shell, #scp, #scp_dest, #to_s

Instance Method Details

#command_runnerObject



6
7
8
# File 'lib/chake/connection/local.rb', line 6

def command_runner
  ['sh', '-c']
end

#shell_commandObject



10
11
12
# File 'lib/chake/connection/local.rb', line 10

def shell_command
  ENV.fetch('SHELL', Etc.getpwuid.shell)
end

#skip?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/chake/connection/local.rb', line 14

def skip?
  node.hostname != Socket.gethostname
end