Sha256: d6cf67283a6b6685361885ae0d70e8970e05e38c55802525579d3cbf183aef19

Contents?: true

Size: 613 Bytes

Versions: 11

Compression:

Stored size: 613 Bytes

Contents

require 'mulder'

module Mulder
  class Capistrano

    def initialize(config_file, application, environment)
      config       = ::Mulder::Config.from(:yaml, file: config_file)
      @connection  = ::Mulder::Connection.new(config)
      @application = application
      @environment = environment
    end

    def client(role)
      @client = ::Mulder::Client.new(@connection, @application, @environment, role)
    end

    def ips(role, use_private = false)
      type_of_ips = use_private ? :private_ip_address : :public_ip_address

      client(role).instances.collect(&type_of_ips).compact
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
mulder-0.4.0 lib/mulder/capistrano.rb
mulder-0.3.2 lib/mulder/capistrano.rb
mulder-0.3.1 lib/mulder/capistrano.rb
mulder-0.3.0 lib/mulder/capistrano.rb
mulder-0.2.1 lib/mulder/capistrano.rb
mulder-0.2.0 lib/mulder/capistrano.rb
mulder-0.1.0 lib/mulder/capistrano.rb
mulder-0.0.5 lib/mulder/capistrano.rb
mulder-0.0.4 lib/mulder/capistrano.rb
mulder-0.0.3 lib/mulder/capistrano.rb
mulder-0.0.2 lib/mulder/capistrano.rb