Sha256: 1db074b80072a04e4e00c24b5ccccee2b05ba21afbac11cd765050672cfd751b

Contents?: true

Size: 1.06 KB

Versions: 12

Compression:

Stored size: 1.06 KB

Contents

require "cfoundry/baseclient"

require "cfoundry/v1/app"
require "cfoundry/v1/framework"
require "cfoundry/v1/runtime"
require "cfoundry/v1/service"
require "cfoundry/v1/service_instance"
require "cfoundry/v1/user"
require "cfoundry/v1/base"
require "cfoundry/v1/client"

require "cfoundry/v2/app"
require "cfoundry/v2/framework"
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/user"
require "cfoundry/v2/organization"
require "cfoundry/v2/space"
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

12 entries across 12 versions & 1 rubygems

Version Path
cfoundry-0.4.21 lib/cfoundry/client.rb
cfoundry-0.4.19 lib/cfoundry/client.rb
cfoundry-0.4.18 lib/cfoundry/client.rb
cfoundry-0.4.17 lib/cfoundry/client.rb
cfoundry-0.4.16 lib/cfoundry/client.rb
cfoundry-0.4.15 lib/cfoundry/client.rb
cfoundry-0.4.14 lib/cfoundry/client.rb
cfoundry-0.4.13 lib/cfoundry/client.rb
cfoundry-0.4.12 lib/cfoundry/client.rb
cfoundry-0.4.11 lib/cfoundry/client.rb
cfoundry-0.4.10 lib/cfoundry/client.rb
cfoundry-0.4.9 lib/cfoundry/client.rb