Sha256: 3cf139b606c581e0d705a700e45b99224a3f887183012aa7040d3cb0b9d34c5c

Contents?: true

Size: 609 Bytes

Versions: 24

Compression:

Stored size: 609 Bytes

Contents

module Shuttle
  class Target
    attr_reader :host, :user, :password
    attr_reader :deploy_to

    def initialize(hash)
      @host      = hash[:host]
      @user      = hash[:user]
      @password  = hash[:password]
      @deploy_to = hash[:deploy_to]
    end

    def connection
      @connection ||= Net::SSH::Session.new(host, user, password)
    end

    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
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
shuttle-deploy-0.4.0 lib/shuttle/target.rb
shuttle-deploy-0.3.3 lib/shuttle/target.rb
shuttle-deploy-0.3.2 lib/shuttle/target.rb
shuttle-deploy-0.3.1 lib/shuttle/target.rb
shuttle-deploy-0.3.0 lib/shuttle/target.rb
shuttle-deploy-0.3.0.beta1 lib/shuttle/target.rb
shuttle-deploy-0.2.3 lib/shuttle/target.rb
shuttle-deploy-0.2.2 lib/shuttle/target.rb
shuttle-deploy-0.2.1 lib/shuttle/target.rb
shuttle-deploy-0.2.0 lib/shuttle/target.rb
shuttle-deploy-0.2.0.beta16 lib/shuttle/target.rb
shuttle-deploy-0.2.0.beta15 lib/shuttle/target.rb
shuttle-deploy-0.2.0.beta14 lib/shuttle/target.rb
shuttle-deploy-0.2.0.beta13 lib/shuttle/target.rb
shuttle-deploy-0.2.0.beta12 lib/shuttle/target.rb
shuttle-deploy-0.2.0.beta11 lib/shuttle/target.rb
shuttle-deploy-0.2.0.beta10 lib/shuttle/target.rb
shuttle-deploy-0.2.0.beta9 lib/shuttle/target.rb
shuttle-deploy-0.2.0.beta7 lib/shuttle/target.rb
shuttle-deploy-0.2.0.beta6 lib/shuttle/target.rb