Class: Chake::Backend::Local

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

Instance Attribute Summary

Attributes inherited from Chake::Backend

#node

Instance Method Summary collapse

Methods inherited from Chake::Backend

backend_name, get, inherited, #rsync, #rsync_dest, #run, #run_as_root, #run_shell, #scp, #scp_dest, #to_s

Instance Method Details

#command_runnerObject



9
10
11
# File 'lib/chake/backend/local.rb', line 9

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

#shell_commandObject



13
14
15
# File 'lib/chake/backend/local.rb', line 13

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

#skip?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/chake/backend/local.rb', line 17

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