Sha256: 1ad65a09b09cd3b95251ba4acd2f6fcfdfa061d1d6b7f6c7048d3ff88e4af1a5

Contents?: true

Size: 877 Bytes

Versions: 9

Compression:

Stored size: 877 Bytes

Contents

require "cfoundry/baseclient"

require "cfoundry/v1/client"

require "cfoundry/v2/app"
require "cfoundry/v2/framework"
require "cfoundry/v2/organization"
require "cfoundry/v2/runtime"
require "cfoundry/v2/service"
require "cfoundry/v2/service_binding"
require "cfoundry/v2/service_instance"
require "cfoundry/v2/service_plan"
require "cfoundry/v2/service_auth_token"
require "cfoundry/v2/space"
require "cfoundry/v2/user"
require "cfoundry/v2/domain"
require "cfoundry/v2/route"
require "cfoundry/v2/base"
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", :accept => :json)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cfoundry-0.4.8 lib/cfoundry/client.rb
cfoundry-0.4.7 lib/cfoundry/client.rb
cfoundry-0.4.6 lib/cfoundry/client.rb
cfoundry-0.4.5 lib/cfoundry/client.rb
cfoundry-0.4.4 lib/cfoundry/client.rb
cfoundry-0.4.3 lib/cfoundry/client.rb
cfoundry-0.4.2 lib/cfoundry/client.rb
cfoundry-0.4.1 lib/cfoundry/client.rb
cfoundry-0.4.0 lib/cfoundry/client.rb