class Hotdog::Commands::Ssh

Public Instance Methods

define_options(optparse, options={}) click to toggle source
# File lib/hotdog/commands/ssh.rb, line 283
def define_options(optparse, options={})
  super
  optparse.on("-D BIND_ADDRESS", "Specifies a local \"dynamic\" application-level port forwarding") do |bind_address|
    options[:dynamic_port_forward] = bind_address
  end
  optparse.on("-L BIND_ADDRESS", "Specifies that the given port on the local (client) host is to be forwarded to the given host and port on the remote side") do |bind_address|
    options[:port_forward] = bind_address
  end
end

Private Instance Methods

build_command_options(options={}) click to toggle source
# File lib/hotdog/commands/ssh.rb, line 294
def build_command_options(options={})
  arguments = super
  if options[:dynamic_port_forward]
    arguments << "-D" << options[:dynamic_port_forward]
  end
  if options[:port_forward]
    arguments << "-L" << options[:port_forward]
  end
  arguments
end