Parent

Included Modules

SSHKit::Backend::Netssh

Attributes

pool[RW]

Public Class Methods

config() click to toggle source
# File lib/sshkit/backends/netssh.rb, line 103
def config
  @config ||= Configuration.new
end
configure() click to toggle source
# File lib/sshkit/backends/netssh.rb, line 99
def configure
  yield config
end

Public Instance Methods

background(*args) click to toggle source
# File lib/sshkit/backends/netssh.rb, line 69
def background(*args)
  warn "[Deprecated] The background method is deprecated. Blame badly behaved pseudo-daemons!"
  options = args.extract_options!.merge(run_in_background: true)
  _execute(*[*args, options]).success?
end
capture(*args) click to toggle source
# File lib/sshkit/backends/netssh.rb, line 75
def capture(*args)
  options = { verbosity: Logger::DEBUG }.merge(args.extract_options!)
  _execute(*[*args, options]).full_stdout.strip
end
download!(remote, local=nil, options = {}) click to toggle source
# File lib/sshkit/backends/netssh.rb, line 87
def download!(remote, local=nil, options = {})
  summarizer = transfer_summarizer('Downloading')
  with_ssh do |ssh|
    ssh.scp.download!(remote, local, options, &summarizer)
  end
end
execute(*args) click to toggle source
# File lib/sshkit/backends/netssh.rb, line 65
def execute(*args)
  _execute(*args).success?
end
run() click to toggle source
# File lib/sshkit/backends/netssh.rb, line 53
def run
  instance_exec(host, &@block)
end
test(*args) click to toggle source
# File lib/sshkit/backends/netssh.rb, line 57
def test(*args)
  options = args.extract_options!.merge(
    raise_on_non_zero_exit: false,
    verbosity: Logger::DEBUG
  )
  _execute(*[*args, options]).success?
end
upload!(local, remote, options = {}) click to toggle source
# File lib/sshkit/backends/netssh.rb, line 80
def upload!(local, remote, options = {})
  summarizer = transfer_summarizer('Uploading')
  with_ssh do |ssh|
    ssh.scp.upload!(local, remote, options, &summarizer)
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.