Sha256: d7413c2f67c0eb4bde070355d17209dc46db6d63b29d26c259c8fec3085af791

Contents?: true

Size: 427 Bytes

Versions: 50

Compression:

Stored size: 427 Bytes

Contents

require "cfoundry/baseclient"

require "cfoundry/v1/client"
require "cfoundry/v2/client"

module CFoundry
  class Client < BaseClient
    def self.new(*args)
      target, _ = args

      base = super(target)

      case base.info[:version]
      when 2
        CFoundry::V2::Client.new(*args)
      else
        CFoundry::V1::Client.new(*args)
      end
    end

    def info
      get("info", nil => :json)
    end
  end
end

Version data entries

50 entries across 50 versions & 2 rubygems

Version Path
cfoundry-0.3.46 lib/cfoundry/client.rb
cfoundry-0.3.45 lib/cfoundry/client.rb
cfoundry-0.3.44 lib/cfoundry/client.rb
cfoundry-0.3.43 lib/cfoundry/client.rb
cfoundry-0.3.42 lib/cfoundry/client.rb
cfoundry-0.3.41 lib/cfoundry/client.rb
cfoundry-IronFoundry-0.3.40 lib/cfoundry/client.rb
cfoundry-0.3.40 lib/cfoundry/client.rb
cfoundry-IronFoundry-0.3.39 lib/cfoundry/client.rb
cfoundry-0.3.39 lib/cfoundry/client.rb
cfoundry-0.3.38 lib/cfoundry/client.rb
cfoundry-0.3.37 lib/cfoundry/client.rb
cfoundry-0.3.36 lib/cfoundry/client.rb
cfoundry-0.3.35 lib/cfoundry/client.rb
cfoundry-IronFoundry-0.3.34 lib/cfoundry/client.rb
cfoundry-0.3.34 lib/cfoundry/client.rb
cfoundry-0.3.33 lib/cfoundry/client.rb
cfoundry-0.3.32 lib/cfoundry/client.rb
cfoundry-0.3.31 lib/cfoundry/client.rb
cfoundry-0.3.30 lib/cfoundry/client.rb