class Loom::HostSpec
Attributes
disabled[RW]
sshkit_host[R]
Public Class Methods
new(host_string)
click to toggle source
TODO: change this to take an sshkit_host
and make parse public. Stop calling parse from the ctor.
# File lib/loom/host_spec.rb, line 16 def initialize(host_string) @sshkit_host = parse host_string end
Public Instance Methods
is_localhost?()
click to toggle source
# File lib/loom/host_spec.rb, line 25 def is_localhost? hostname == "localhost" && port.nil? && user.nil? end
is_remote?()
click to toggle source
# File lib/loom/host_spec.rb, line 21 def is_remote? !is_localhost? end
Private Instance Methods
parse(host_string)
click to toggle source
# File lib/loom/host_spec.rb, line 30 def parse(host_string) host = SSHKit::Host.new host_string host.ssh_options = { :auth_methods => ['publickey'], :keys => ["~/.ssh/id_esd25519_2"], # :verbose => :debug, } Loom.log.debug1(self) { "parsing hoststring[#{host_string}] => #{host}" } Loom.log.debug1(self) { "netssh options for host[#{host}] => #{host.netssh_options}" } host end