class Shuttle::Target

Attributes

deploy_to[R]
host[R]
password[R]
user[R]

Public Class Methods

new(hash) click to toggle source
# File lib/shuttle/target.rb, line 6
def initialize(hash)
  @host      = hash[:host]
  @user      = hash[:user]
  @password  = hash[:password]
  @deploy_to = hash[:deploy_to]
end

Public Instance Methods

connection() click to toggle source
# File lib/shuttle/target.rb, line 13
def connection
  @connection ||= Net::SSH::Session.new(host, user, password)
end
validate!() click to toggle source
# File lib/shuttle/target.rb, line 17
def validate!
  raise Shuttle::ConfigError, "Host required"        if host.nil?
  raise Shuttle::ConfigError, "User required"        if user.nil?
  raise Shuttle::ConfigError, "Deploy path required" if deploy_to.nil?
end