cfoundry 0.5.1.rc2 → 0.5.1.rc3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/cc_api_stub.rb +17 -0
- data/lib/cc_api_stub/applications.rb +53 -0
- data/lib/cc_api_stub/domains.rb +16 -0
- data/lib/cc_api_stub/frameworks.rb +22 -0
- data/lib/cc_api_stub/helper.rb +131 -0
- data/lib/cc_api_stub/login.rb +21 -0
- data/lib/cc_api_stub/organization_users.rb +21 -0
- data/lib/cc_api_stub/organizations.rb +70 -0
- data/lib/cc_api_stub/routes.rb +26 -0
- data/lib/cc_api_stub/runtimes.rb +22 -0
- data/lib/cc_api_stub/service_bindings.rb +22 -0
- data/lib/cc_api_stub/service_instances.rb +22 -0
- data/lib/cc_api_stub/services.rb +25 -0
- data/lib/cc_api_stub/spaces.rb +49 -0
- data/lib/cc_api_stub/users.rb +84 -0
- data/lib/cfoundry/baseclient.rb +24 -0
- data/lib/cfoundry/errors.rb +16 -133
- data/lib/cfoundry/v1/app.rb +6 -2
- data/lib/cfoundry/v2/app.rb +16 -4
- data/lib/cfoundry/v2/base.rb +10 -11
- data/lib/cfoundry/v2/client.rb +4 -0
- data/lib/cfoundry/version.rb +1 -1
- data/spec/cc_api_stub/applications_spec.rb +69 -0
- data/spec/cc_api_stub/domains_spec.rb +19 -0
- data/spec/cc_api_stub/frameworks_spec.rb +19 -0
- data/spec/cc_api_stub/login_spec.rb +20 -0
- data/spec/cc_api_stub/organization_users_spec.rb +19 -0
- data/spec/cc_api_stub/organizations_spec.rb +103 -0
- data/spec/cc_api_stub/routes_spec.rb +19 -0
- data/spec/cc_api_stub/runtimes_spec.rb +19 -0
- data/spec/cc_api_stub/service_bindings_spec.rb +13 -0
- data/spec/cc_api_stub/service_instances_spec.rb +19 -0
- data/spec/cc_api_stub/services_spec.rb +12 -0
- data/spec/cc_api_stub/spaces_spec.rb +38 -0
- data/spec/cc_api_stub/users_spec.rb +107 -0
- data/spec/cfoundry/baseclient_spec.rb +42 -2
- data/spec/cfoundry/v2/app_spec.rb +95 -0
- data/spec/fixtures/fake_cc_application.json +24 -0
- data/spec/fixtures/fake_cc_application_summary.json +57 -0
- data/spec/fixtures/fake_cc_created_application.json +11 -0
- data/spec/fixtures/fake_cc_created_domain.json +10 -0
- data/spec/fixtures/fake_cc_created_organization.json +11 -0
- data/spec/fixtures/fake_cc_created_route.json +13 -0
- data/spec/fixtures/fake_cc_created_service_instance.json +11 -0
- data/spec/fixtures/fake_cc_created_space.json +11 -0
- data/spec/fixtures/fake_cc_created_user.json +11 -0
- data/spec/fixtures/fake_cc_empty_search.json +7 -0
- data/spec/fixtures/fake_cc_frameworks.json +20 -0
- data/spec/fixtures/fake_cc_organization.json +144 -0
- data/spec/fixtures/fake_cc_organization_domains.json +34 -0
- data/spec/fixtures/fake_cc_organization_search.json +37 -0
- data/spec/fixtures/fake_cc_organization_summary.json +19 -0
- data/spec/fixtures/fake_cc_organization_users.json +81 -0
- data/spec/fixtures/fake_cc_runtimes.json +20 -0
- data/spec/fixtures/fake_cc_service_binding.json +22 -0
- data/spec/fixtures/fake_cc_service_bindings.json +24 -0
- data/spec/fixtures/fake_cc_service_instance.json +81 -0
- data/spec/fixtures/fake_cc_service_instances.json +0 -0
- data/spec/fixtures/fake_cc_service_types.json +124 -0
- data/spec/fixtures/fake_cc_space.json +45 -0
- data/spec/fixtures/fake_cc_space_summary.json +86 -0
- data/spec/fixtures/fake_cc_stats.json +29 -0
- data/spec/fixtures/fake_cc_user.json +112 -0
- data/spec/fixtures/fake_cc_user_organizations.json +92 -0
- data/spec/fixtures/fake_cc_user_with_managers.json +85 -0
- data/spec/spec_helper.rb +3 -0
- data/spec/support/fake_helper.rb +0 -36
- data/spec/support/shared_examples/cc_api_stub_request_examples.rb +79 -0
- metadata +254 -144
    
        data/spec/spec_helper.rb
    CHANGED
    
    | @@ -5,6 +5,9 @@ require "cfoundry" | |
| 5 5 | 
             
            require "webmock/rspec"
         | 
| 6 6 | 
             
            require "ostruct"
         | 
| 7 7 | 
             
            require "timecop"
         | 
| 8 | 
            +
            require "active_support"
         | 
| 9 | 
            +
            require "active_support/core_ext"
         | 
| 10 | 
            +
            require "cc_api_stub"
         | 
| 8 11 |  | 
| 9 12 | 
             
            Dir[File.expand_path('../{support,fakes}/**/*.rb', __FILE__)].each do |file|
         | 
| 10 13 | 
             
              require file
         | 
    
        data/spec/support/fake_helper.rb
    CHANGED
    
    | @@ -39,7 +39,6 @@ module Fake | |
| 39 39 | 
             
              def fake(attributes = {})
         | 
| 40 40 | 
             
                fake_attributes(attributes).each do |k, v|
         | 
| 41 41 | 
             
                  send(:"#{k}=", v)
         | 
| 42 | 
            -
                  setup_reverse_relationship(v)
         | 
| 43 42 | 
             
                end
         | 
| 44 43 |  | 
| 45 44 | 
             
                self
         | 
| @@ -115,28 +114,6 @@ module CFoundry::V2 | |
| 115 114 | 
             
                    :guid => random_string("fake-#{object_name}-guid"))
         | 
| 116 115 | 
             
                end
         | 
| 117 116 |  | 
| 118 | 
            -
                def setup_reverse_relationship(v)
         | 
| 119 | 
            -
                  if v.is_a?(Array)
         | 
| 120 | 
            -
                    v.each do |x|
         | 
| 121 | 
            -
                      setup_reverse_relationship(x)
         | 
| 122 | 
            -
                    end
         | 
| 123 | 
            -
             | 
| 124 | 
            -
                    return
         | 
| 125 | 
            -
                  end
         | 
| 126 | 
            -
             | 
| 127 | 
            -
                  return unless v.is_a?(Model)
         | 
| 128 | 
            -
             | 
| 129 | 
            -
                  relation, type = find_reverse_relationship(v)
         | 
| 130 | 
            -
             | 
| 131 | 
            -
                  v.client = @client
         | 
| 132 | 
            -
             | 
| 133 | 
            -
                  if type == :one
         | 
| 134 | 
            -
                    v.send(:"#{relation}=", self)
         | 
| 135 | 
            -
                  elsif type == :many
         | 
| 136 | 
            -
                    v.send(:"#{relation}=", v.send(relation) + [self])
         | 
| 137 | 
            -
                  end
         | 
| 138 | 
            -
                end
         | 
| 139 | 
            -
             | 
| 140 117 | 
             
                def find_reverse_relationship(v)
         | 
| 141 118 | 
             
                  singular = object_name
         | 
| 142 119 | 
             
                  plural = plural_object_name
         | 
| @@ -221,17 +198,4 @@ module CFoundry::V2 | |
| 221 198 | 
             
                end
         | 
| 222 199 | 
             
              end
         | 
| 223 200 |  | 
| 224 | 
            -
             | 
| 225 | 
            -
              Model.objects.each_value do |klass|
         | 
| 226 | 
            -
                klass.to_many_relations.each do |plural, _|
         | 
| 227 | 
            -
                  Fake.define_many_association(klass, plural)
         | 
| 228 | 
            -
                end
         | 
| 229 | 
            -
             | 
| 230 | 
            -
                FakeClient.class_eval do
         | 
| 231 | 
            -
                  plural = klass.plural_object_name
         | 
| 232 | 
            -
             | 
| 233 | 
            -
                  attr_writer plural
         | 
| 234 | 
            -
                  Fake.define_many_association(self, plural)
         | 
| 235 | 
            -
                end
         | 
| 236 | 
            -
              end
         | 
| 237 201 | 
             
            end
         | 
| @@ -0,0 +1,79 @@ | |
| 1 | 
            +
            shared_examples_for 'a stubbed get request' do |*options|
         | 
| 2 | 
            +
              options = {:code => 200}.merge(options.first || {})
         | 
| 3 | 
            +
             | 
| 4 | 
            +
              it "stubs a get request" do
         | 
| 5 | 
            +
                subject
         | 
| 6 | 
            +
                response = Net::HTTP.get_response(URI.parse(url))
         | 
| 7 | 
            +
                check_response(response, options)
         | 
| 8 | 
            +
              end
         | 
| 9 | 
            +
            end
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            shared_examples_for 'a stubbed post request' do |*options|
         | 
| 12 | 
            +
              options = {:code => 201, :params => {}}.merge(options.first || {})
         | 
| 13 | 
            +
             | 
| 14 | 
            +
              it "stubs a post request" do
         | 
| 15 | 
            +
                subject
         | 
| 16 | 
            +
                response = Net::HTTP.post_form(URI.parse(url), options[:params])
         | 
| 17 | 
            +
                check_response(response, options)
         | 
| 18 | 
            +
              end
         | 
| 19 | 
            +
            end
         | 
| 20 | 
            +
             | 
| 21 | 
            +
            shared_examples_for 'a stubbed put request' do |*options|
         | 
| 22 | 
            +
              options = {:code => 200, :params => {}}.merge(options.first || {})
         | 
| 23 | 
            +
             | 
| 24 | 
            +
              it "stubs a put request" do
         | 
| 25 | 
            +
                subject
         | 
| 26 | 
            +
                uri = URI.parse(url)
         | 
| 27 | 
            +
                Net::HTTP.start(uri.host, uri.port) do |http|
         | 
| 28 | 
            +
                  request = Net::HTTP::Put.new(url, options[:params])
         | 
| 29 | 
            +
                  response = http.request(request)
         | 
| 30 | 
            +
                  check_response(response, options)
         | 
| 31 | 
            +
                end
         | 
| 32 | 
            +
              end
         | 
| 33 | 
            +
            end
         | 
| 34 | 
            +
             | 
| 35 | 
            +
            shared_examples_for 'a stubbed delete request' do |*options|
         | 
| 36 | 
            +
              options = {:code => 200, :ignore_response => true}.merge(options.first || {})
         | 
| 37 | 
            +
             | 
| 38 | 
            +
              it "stubs a delete request" do
         | 
| 39 | 
            +
                subject
         | 
| 40 | 
            +
                uri = URI.parse(url)
         | 
| 41 | 
            +
                Net::HTTP.start(uri.host, uri.port) do |http|
         | 
| 42 | 
            +
                  request = Net::HTTP::Delete.new(url)
         | 
| 43 | 
            +
                  response = http.request(request)
         | 
| 44 | 
            +
                  check_response(response, options)
         | 
| 45 | 
            +
                end
         | 
| 46 | 
            +
              end
         | 
| 47 | 
            +
            end
         | 
| 48 | 
            +
             | 
| 49 | 
            +
            def check_response(response, options)
         | 
| 50 | 
            +
              response.code.should == options[:code].to_s
         | 
| 51 | 
            +
             | 
| 52 | 
            +
              unless options[:ignore_response]
         | 
| 53 | 
            +
                json = JSON.parse(response.body)
         | 
| 54 | 
            +
                json.should be_a(Hash)
         | 
| 55 | 
            +
             | 
| 56 | 
            +
                if options[:including_json]
         | 
| 57 | 
            +
                  if Proc === options[:including_json]
         | 
| 58 | 
            +
                    options[:including_json][json]
         | 
| 59 | 
            +
                  else
         | 
| 60 | 
            +
                    json.should deep_hash_include(options[:including_json])
         | 
| 61 | 
            +
                  end
         | 
| 62 | 
            +
                end
         | 
| 63 | 
            +
              end
         | 
| 64 | 
            +
            end
         | 
| 65 | 
            +
             | 
| 66 | 
            +
            RSpec::Matchers.define :deep_hash_include do |expected|
         | 
| 67 | 
            +
              def deep_hash_include_rec(actual_hash, partial_hash)
         | 
| 68 | 
            +
                partial_hash.reduce(true) do |bool, (key, val)|
         | 
| 69 | 
            +
                  actual_val = actual_hash[key]
         | 
| 70 | 
            +
                  bool && ((Hash === actual_val) ?
         | 
| 71 | 
            +
                    deep_hash_include_rec(actual_val, partial_hash[key]) :
         | 
| 72 | 
            +
                    actual_val == val)
         | 
| 73 | 
            +
                end
         | 
| 74 | 
            +
              end
         | 
| 75 | 
            +
             | 
| 76 | 
            +
              match do |actual|
         | 
| 77 | 
            +
                deep_hash_include_rec(actual, expected)
         | 
| 78 | 
            +
              end
         | 
| 79 | 
            +
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,186 +1,201 @@ | |
| 1 | 
            -
            --- !ruby/object:Gem::Specification
         | 
| 1 | 
            +
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: cfoundry
         | 
| 3 | 
            -
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
               | 
| 3 | 
            +
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            +
              hash: 3541666271
         | 
| 5 5 | 
             
              prerelease: 6
         | 
| 6 | 
            +
              segments: 
         | 
| 7 | 
            +
              - 0
         | 
| 8 | 
            +
              - 5
         | 
| 9 | 
            +
              - 1
         | 
| 10 | 
            +
              - rc
         | 
| 11 | 
            +
              - 3
         | 
| 12 | 
            +
              version: 0.5.1.rc3
         | 
| 6 13 | 
             
            platform: ruby
         | 
| 7 | 
            -
            authors:
         | 
| 14 | 
            +
            authors: 
         | 
| 8 15 | 
             
            - Cloud Foundry Team
         | 
| 9 16 | 
             
            - Alex Suraci
         | 
| 10 17 | 
             
            autorequire: 
         | 
| 11 18 | 
             
            bindir: bin
         | 
| 12 19 | 
             
            cert_chain: []
         | 
| 13 | 
            -
             | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 16 | 
            -
             | 
| 17 | 
            -
               | 
| 20 | 
            +
             | 
| 21 | 
            +
            date: 2013-02-28 00:00:00 Z
         | 
| 22 | 
            +
            dependencies: 
         | 
| 23 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 24 | 
            +
              version_requirements: &id001 !ruby/object:Gem::Requirement 
         | 
| 18 25 | 
             
                none: false
         | 
| 19 | 
            -
                requirements:
         | 
| 26 | 
            +
                requirements: 
         | 
| 20 27 | 
             
                - - ~>
         | 
| 21 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 22 | 
            -
                     | 
| 23 | 
            -
             | 
| 28 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 29 | 
            +
                    hash: 13
         | 
| 30 | 
            +
                    segments: 
         | 
| 31 | 
            +
                    - 1
         | 
| 32 | 
            +
                    - 1
         | 
| 33 | 
            +
                    version: "1.1"
         | 
| 24 34 | 
             
              prerelease: false
         | 
| 25 | 
            -
               | 
| 35 | 
            +
              type: :runtime
         | 
| 36 | 
            +
              name: multipart-post
         | 
| 37 | 
            +
              requirement: *id001
         | 
| 38 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 39 | 
            +
              version_requirements: &id002 !ruby/object:Gem::Requirement 
         | 
| 26 40 | 
             
                none: false
         | 
| 27 | 
            -
                requirements:
         | 
| 41 | 
            +
                requirements: 
         | 
| 28 42 | 
             
                - - ~>
         | 
| 29 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 30 | 
            -
                     | 
| 31 | 
            -
             | 
| 43 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 44 | 
            +
                    hash: 9
         | 
| 45 | 
            +
                    segments: 
         | 
| 46 | 
            +
                    - 1
         | 
| 47 | 
            +
                    - 3
         | 
| 48 | 
            +
                    version: "1.3"
         | 
| 49 | 
            +
              prerelease: false
         | 
| 50 | 
            +
              type: :runtime
         | 
| 32 51 | 
             
              name: multi_json
         | 
| 33 | 
            -
              requirement:  | 
| 52 | 
            +
              requirement: *id002
         | 
| 53 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 54 | 
            +
              version_requirements: &id003 !ruby/object:Gem::Requirement 
         | 
| 34 55 | 
             
                none: false
         | 
| 35 | 
            -
                requirements:
         | 
| 56 | 
            +
                requirements: 
         | 
| 36 57 | 
             
                - - ~>
         | 
| 37 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 38 | 
            -
                     | 
| 39 | 
            -
             | 
| 58 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 59 | 
            +
                    hash: 25
         | 
| 60 | 
            +
                    segments: 
         | 
| 61 | 
            +
                    - 0
         | 
| 62 | 
            +
                    - 9
         | 
| 63 | 
            +
                    version: "0.9"
         | 
| 40 64 | 
             
              prerelease: false
         | 
| 41 | 
            -
               | 
| 42 | 
            -
                none: false
         | 
| 43 | 
            -
                requirements:
         | 
| 44 | 
            -
                - - ~>
         | 
| 45 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 46 | 
            -
                    version: '1.3'
         | 
| 47 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 65 | 
            +
              type: :runtime
         | 
| 48 66 | 
             
              name: rubyzip
         | 
| 49 | 
            -
              requirement:  | 
| 67 | 
            +
              requirement: *id003
         | 
| 68 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 69 | 
            +
              version_requirements: &id004 !ruby/object:Gem::Requirement 
         | 
| 50 70 | 
             
                none: false
         | 
| 51 | 
            -
                requirements:
         | 
| 71 | 
            +
                requirements: 
         | 
| 52 72 | 
             
                - - ~>
         | 
| 53 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 54 | 
            -
                     | 
| 55 | 
            -
             | 
| 73 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 74 | 
            +
                    hash: 29
         | 
| 75 | 
            +
                    segments: 
         | 
| 76 | 
            +
                    - 1
         | 
| 77 | 
            +
                    - 3
         | 
| 78 | 
            +
                    - 3
         | 
| 79 | 
            +
                    version: 1.3.3
         | 
| 56 80 | 
             
              prerelease: false
         | 
| 57 | 
            -
               | 
| 58 | 
            -
                none: false
         | 
| 59 | 
            -
                requirements:
         | 
| 60 | 
            -
                - - ~>
         | 
| 61 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 62 | 
            -
                    version: '0.9'
         | 
| 63 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 81 | 
            +
              type: :runtime
         | 
| 64 82 | 
             
              name: cf-uaa-lib
         | 
| 65 | 
            -
              requirement:  | 
| 83 | 
            +
              requirement: *id004
         | 
| 84 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 85 | 
            +
              version_requirements: &id005 !ruby/object:Gem::Requirement 
         | 
| 66 86 | 
             
                none: false
         | 
| 67 | 
            -
                requirements:
         | 
| 87 | 
            +
                requirements: 
         | 
| 68 88 | 
             
                - - ~>
         | 
| 69 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 70 | 
            -
                     | 
| 71 | 
            -
             | 
| 89 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 90 | 
            +
                    hash: 25
         | 
| 91 | 
            +
                    segments: 
         | 
| 92 | 
            +
                    - 0
         | 
| 93 | 
            +
                    - 9
         | 
| 94 | 
            +
                    version: "0.9"
         | 
| 72 95 | 
             
              prerelease: false
         | 
| 73 | 
            -
               | 
| 74 | 
            -
                none: false
         | 
| 75 | 
            -
                requirements:
         | 
| 76 | 
            -
                - - ~>
         | 
| 77 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 78 | 
            -
                    version: 1.3.3
         | 
| 79 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 96 | 
            +
              type: :development
         | 
| 80 97 | 
             
              name: rake
         | 
| 81 | 
            -
              requirement:  | 
| 98 | 
            +
              requirement: *id005
         | 
| 99 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 100 | 
            +
              version_requirements: &id006 !ruby/object:Gem::Requirement 
         | 
| 82 101 | 
             
                none: false
         | 
| 83 | 
            -
                requirements:
         | 
| 102 | 
            +
                requirements: 
         | 
| 84 103 | 
             
                - - ~>
         | 
| 85 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 86 | 
            -
                     | 
| 87 | 
            -
             | 
| 104 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 105 | 
            +
                    hash: 21
         | 
| 106 | 
            +
                    segments: 
         | 
| 107 | 
            +
                    - 2
         | 
| 108 | 
            +
                    - 11
         | 
| 109 | 
            +
                    version: "2.11"
         | 
| 88 110 | 
             
              prerelease: false
         | 
| 89 | 
            -
               | 
| 90 | 
            -
                none: false
         | 
| 91 | 
            -
                requirements:
         | 
| 92 | 
            -
                - - ~>
         | 
| 93 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 94 | 
            -
                    version: '0.9'
         | 
| 95 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 111 | 
            +
              type: :development
         | 
| 96 112 | 
             
              name: rspec
         | 
| 97 | 
            -
              requirement:  | 
| 113 | 
            +
              requirement: *id006
         | 
| 114 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 115 | 
            +
              version_requirements: &id007 !ruby/object:Gem::Requirement 
         | 
| 98 116 | 
             
                none: false
         | 
| 99 | 
            -
                requirements:
         | 
| 117 | 
            +
                requirements: 
         | 
| 100 118 | 
             
                - - ~>
         | 
| 101 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 102 | 
            -
                     | 
| 103 | 
            -
             | 
| 119 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 120 | 
            +
                    hash: 29
         | 
| 121 | 
            +
                    segments: 
         | 
| 122 | 
            +
                    - 1
         | 
| 123 | 
            +
                    - 9
         | 
| 124 | 
            +
                    version: "1.9"
         | 
| 104 125 | 
             
              prerelease: false
         | 
| 105 | 
            -
               | 
| 106 | 
            -
                none: false
         | 
| 107 | 
            -
                requirements:
         | 
| 108 | 
            -
                - - ~>
         | 
| 109 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 110 | 
            -
                    version: '2.11'
         | 
| 111 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 126 | 
            +
              type: :development
         | 
| 112 127 | 
             
              name: webmock
         | 
| 113 | 
            -
              requirement:  | 
| 128 | 
            +
              requirement: *id007
         | 
| 129 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 130 | 
            +
              version_requirements: &id008 !ruby/object:Gem::Requirement 
         | 
| 114 131 | 
             
                none: false
         | 
| 115 | 
            -
                requirements:
         | 
| 132 | 
            +
                requirements: 
         | 
| 116 133 | 
             
                - - ~>
         | 
| 117 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 118 | 
            -
                     | 
| 119 | 
            -
             | 
| 134 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 135 | 
            +
                    hash: 15
         | 
| 136 | 
            +
                    segments: 
         | 
| 137 | 
            +
                    - 1
         | 
| 138 | 
            +
                    - 0
         | 
| 139 | 
            +
                    version: "1.0"
         | 
| 120 140 | 
             
              prerelease: false
         | 
| 121 | 
            -
               | 
| 122 | 
            -
                none: false
         | 
| 123 | 
            -
                requirements:
         | 
| 124 | 
            -
                - - ~>
         | 
| 125 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 126 | 
            -
                    version: '1.9'
         | 
| 127 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 141 | 
            +
              type: :development
         | 
| 128 142 | 
             
              name: rr
         | 
| 129 | 
            -
              requirement:  | 
| 143 | 
            +
              requirement: *id008
         | 
| 144 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 145 | 
            +
              version_requirements: &id009 !ruby/object:Gem::Requirement 
         | 
| 130 146 | 
             
                none: false
         | 
| 131 | 
            -
                requirements:
         | 
| 132 | 
            -
                - -  | 
| 133 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 134 | 
            -
                     | 
| 135 | 
            -
             | 
| 147 | 
            +
                requirements: 
         | 
| 148 | 
            +
                - - ">="
         | 
| 149 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 150 | 
            +
                    hash: 3
         | 
| 151 | 
            +
                    segments: 
         | 
| 152 | 
            +
                    - 0
         | 
| 153 | 
            +
                    version: "0"
         | 
| 136 154 | 
             
              prerelease: false
         | 
| 137 | 
            -
               | 
| 138 | 
            -
                none: false
         | 
| 139 | 
            -
                requirements:
         | 
| 140 | 
            -
                - - ~>
         | 
| 141 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 142 | 
            -
                    version: '1.0'
         | 
| 143 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 155 | 
            +
              type: :development
         | 
| 144 156 | 
             
              name: gem-release
         | 
| 145 | 
            -
              requirement:  | 
| 157 | 
            +
              requirement: *id009
         | 
| 158 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 159 | 
            +
              version_requirements: &id010 !ruby/object:Gem::Requirement 
         | 
| 146 160 | 
             
                none: false
         | 
| 147 | 
            -
                requirements:
         | 
| 148 | 
            -
                - -  | 
| 149 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 150 | 
            -
                     | 
| 151 | 
            -
             | 
| 161 | 
            +
                requirements: 
         | 
| 162 | 
            +
                - - ">="
         | 
| 163 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 164 | 
            +
                    hash: 3
         | 
| 165 | 
            +
                    segments: 
         | 
| 166 | 
            +
                    - 0
         | 
| 167 | 
            +
                    version: "0"
         | 
| 152 168 | 
             
              prerelease: false
         | 
| 153 | 
            -
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 154 | 
            -
                none: false
         | 
| 155 | 
            -
                requirements:
         | 
| 156 | 
            -
                - - ! '>='
         | 
| 157 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 158 | 
            -
                    version: '0'
         | 
| 159 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 160 | 
            -
              name: timecop
         | 
| 161 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 162 | 
            -
                none: false
         | 
| 163 | 
            -
                requirements:
         | 
| 164 | 
            -
                - - ! '>='
         | 
| 165 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 166 | 
            -
                    version: '0'
         | 
| 167 169 | 
             
              type: :development
         | 
| 168 | 
            -
               | 
| 169 | 
            -
               | 
| 170 | 
            -
                none: false
         | 
| 171 | 
            -
                requirements:
         | 
| 172 | 
            -
                - - ! '>='
         | 
| 173 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 174 | 
            -
                    version: '0'
         | 
| 170 | 
            +
              name: timecop
         | 
| 171 | 
            +
              requirement: *id010
         | 
| 175 172 | 
             
            description: 
         | 
| 176 | 
            -
            email:
         | 
| 173 | 
            +
            email: 
         | 
| 177 174 | 
             
            - vcap-dev@googlegroups.com
         | 
| 178 175 | 
             
            executables: []
         | 
| 176 | 
            +
             | 
| 179 177 | 
             
            extensions: []
         | 
| 178 | 
            +
             | 
| 180 179 | 
             
            extra_rdoc_files: []
         | 
| 181 | 
            -
             | 
| 180 | 
            +
             | 
| 181 | 
            +
            files: 
         | 
| 182 182 | 
             
            - LICENSE
         | 
| 183 183 | 
             
            - Rakefile
         | 
| 184 | 
            +
            - lib/cc_api_stub/applications.rb
         | 
| 185 | 
            +
            - lib/cc_api_stub/domains.rb
         | 
| 186 | 
            +
            - lib/cc_api_stub/frameworks.rb
         | 
| 187 | 
            +
            - lib/cc_api_stub/helper.rb
         | 
| 188 | 
            +
            - lib/cc_api_stub/login.rb
         | 
| 189 | 
            +
            - lib/cc_api_stub/organization_users.rb
         | 
| 190 | 
            +
            - lib/cc_api_stub/organizations.rb
         | 
| 191 | 
            +
            - lib/cc_api_stub/routes.rb
         | 
| 192 | 
            +
            - lib/cc_api_stub/runtimes.rb
         | 
| 193 | 
            +
            - lib/cc_api_stub/service_bindings.rb
         | 
| 194 | 
            +
            - lib/cc_api_stub/service_instances.rb
         | 
| 195 | 
            +
            - lib/cc_api_stub/services.rb
         | 
| 196 | 
            +
            - lib/cc_api_stub/spaces.rb
         | 
| 197 | 
            +
            - lib/cc_api_stub/users.rb
         | 
| 198 | 
            +
            - lib/cc_api_stub.rb
         | 
| 184 199 | 
             
            - lib/cfoundry/auth_token.rb
         | 
| 185 200 | 
             
            - lib/cfoundry/baseclient.rb
         | 
| 186 201 | 
             
            - lib/cfoundry/chatty_hash.rb
         | 
| @@ -224,6 +239,19 @@ files: | |
| 224 239 | 
             
            - lib/cfoundry/version.rb
         | 
| 225 240 | 
             
            - lib/cfoundry/zip.rb
         | 
| 226 241 | 
             
            - lib/cfoundry.rb
         | 
| 242 | 
            +
            - spec/cc_api_stub/applications_spec.rb
         | 
| 243 | 
            +
            - spec/cc_api_stub/domains_spec.rb
         | 
| 244 | 
            +
            - spec/cc_api_stub/frameworks_spec.rb
         | 
| 245 | 
            +
            - spec/cc_api_stub/login_spec.rb
         | 
| 246 | 
            +
            - spec/cc_api_stub/organization_users_spec.rb
         | 
| 247 | 
            +
            - spec/cc_api_stub/organizations_spec.rb
         | 
| 248 | 
            +
            - spec/cc_api_stub/routes_spec.rb
         | 
| 249 | 
            +
            - spec/cc_api_stub/runtimes_spec.rb
         | 
| 250 | 
            +
            - spec/cc_api_stub/service_bindings_spec.rb
         | 
| 251 | 
            +
            - spec/cc_api_stub/service_instances_spec.rb
         | 
| 252 | 
            +
            - spec/cc_api_stub/services_spec.rb
         | 
| 253 | 
            +
            - spec/cc_api_stub/spaces_spec.rb
         | 
| 254 | 
            +
            - spec/cc_api_stub/users_spec.rb
         | 
| 227 255 | 
             
            - spec/cfoundry/auth_token_spec.rb
         | 
| 228 256 | 
             
            - spec/cfoundry/baseclient_spec.rb
         | 
| 229 257 | 
             
            - spec/cfoundry/client_spec.rb
         | 
| @@ -261,37 +289,90 @@ files: | |
| 261 289 | 
             
            - spec/fixtures/apps/with_vmcignore/non_ignored_dir/ignored_file.txt
         | 
| 262 290 | 
             
            - spec/fixtures/apps/with_vmcignore/non_ignored_file.txt
         | 
| 263 291 | 
             
            - spec/fixtures/empty_file
         | 
| 292 | 
            +
            - spec/fixtures/fake_cc_application.json
         | 
| 293 | 
            +
            - spec/fixtures/fake_cc_application_summary.json
         | 
| 294 | 
            +
            - spec/fixtures/fake_cc_created_application.json
         | 
| 295 | 
            +
            - spec/fixtures/fake_cc_created_domain.json
         | 
| 296 | 
            +
            - spec/fixtures/fake_cc_created_organization.json
         | 
| 297 | 
            +
            - spec/fixtures/fake_cc_created_route.json
         | 
| 298 | 
            +
            - spec/fixtures/fake_cc_created_service_instance.json
         | 
| 299 | 
            +
            - spec/fixtures/fake_cc_created_space.json
         | 
| 300 | 
            +
            - spec/fixtures/fake_cc_created_user.json
         | 
| 301 | 
            +
            - spec/fixtures/fake_cc_empty_search.json
         | 
| 302 | 
            +
            - spec/fixtures/fake_cc_frameworks.json
         | 
| 303 | 
            +
            - spec/fixtures/fake_cc_organization.json
         | 
| 304 | 
            +
            - spec/fixtures/fake_cc_organization_domains.json
         | 
| 305 | 
            +
            - spec/fixtures/fake_cc_organization_search.json
         | 
| 306 | 
            +
            - spec/fixtures/fake_cc_organization_summary.json
         | 
| 307 | 
            +
            - spec/fixtures/fake_cc_organization_users.json
         | 
| 308 | 
            +
            - spec/fixtures/fake_cc_runtimes.json
         | 
| 309 | 
            +
            - spec/fixtures/fake_cc_service_binding.json
         | 
| 310 | 
            +
            - spec/fixtures/fake_cc_service_bindings.json
         | 
| 311 | 
            +
            - spec/fixtures/fake_cc_service_instance.json
         | 
| 312 | 
            +
            - spec/fixtures/fake_cc_service_instances.json
         | 
| 313 | 
            +
            - spec/fixtures/fake_cc_service_types.json
         | 
| 314 | 
            +
            - spec/fixtures/fake_cc_space.json
         | 
| 315 | 
            +
            - spec/fixtures/fake_cc_space_summary.json
         | 
| 316 | 
            +
            - spec/fixtures/fake_cc_stats.json
         | 
| 317 | 
            +
            - spec/fixtures/fake_cc_user.json
         | 
| 318 | 
            +
            - spec/fixtures/fake_cc_user_organizations.json
         | 
| 319 | 
            +
            - spec/fixtures/fake_cc_user_with_managers.json
         | 
| 264 320 | 
             
            - spec/spec_helper.rb
         | 
| 265 321 | 
             
            - spec/support/fake_helper.rb
         | 
| 266 322 | 
             
            - spec/support/randoms.rb
         | 
| 323 | 
            +
            - spec/support/shared_examples/cc_api_stub_request_examples.rb
         | 
| 267 324 | 
             
            - spec/support/shared_examples/client_login_examples.rb
         | 
| 268 325 | 
             
            - spec/support/shared_examples/model_summary_examples.rb
         | 
| 269 326 | 
             
            - spec/support/v1_fake_helper.rb
         | 
| 270 327 | 
             
            homepage: http://github.com/cloudfoundry/vmc-lib
         | 
| 271 328 | 
             
            licenses: []
         | 
| 329 | 
            +
             | 
| 272 330 | 
             
            post_install_message: 
         | 
| 273 331 | 
             
            rdoc_options: []
         | 
| 274 | 
            -
             | 
| 332 | 
            +
             | 
| 333 | 
            +
            require_paths: 
         | 
| 275 334 | 
             
            - lib
         | 
| 276 | 
            -
            required_ruby_version: !ruby/object:Gem::Requirement
         | 
| 335 | 
            +
            required_ruby_version: !ruby/object:Gem::Requirement 
         | 
| 277 336 | 
             
              none: false
         | 
| 278 | 
            -
              requirements:
         | 
| 279 | 
            -
              - -  | 
| 280 | 
            -
                - !ruby/object:Gem::Version
         | 
| 281 | 
            -
                   | 
| 282 | 
            -
             | 
| 337 | 
            +
              requirements: 
         | 
| 338 | 
            +
              - - ">="
         | 
| 339 | 
            +
                - !ruby/object:Gem::Version 
         | 
| 340 | 
            +
                  hash: 3
         | 
| 341 | 
            +
                  segments: 
         | 
| 342 | 
            +
                  - 0
         | 
| 343 | 
            +
                  version: "0"
         | 
| 344 | 
            +
            required_rubygems_version: !ruby/object:Gem::Requirement 
         | 
| 283 345 | 
             
              none: false
         | 
| 284 | 
            -
              requirements:
         | 
| 285 | 
            -
              - -  | 
| 286 | 
            -
                - !ruby/object:Gem::Version
         | 
| 346 | 
            +
              requirements: 
         | 
| 347 | 
            +
              - - ">"
         | 
| 348 | 
            +
                - !ruby/object:Gem::Version 
         | 
| 349 | 
            +
                  hash: 25
         | 
| 350 | 
            +
                  segments: 
         | 
| 351 | 
            +
                  - 1
         | 
| 352 | 
            +
                  - 3
         | 
| 353 | 
            +
                  - 1
         | 
| 287 354 | 
             
                  version: 1.3.1
         | 
| 288 355 | 
             
            requirements: []
         | 
| 356 | 
            +
             | 
| 289 357 | 
             
            rubyforge_project: cfoundry
         | 
| 290 | 
            -
            rubygems_version: 1.8. | 
| 358 | 
            +
            rubygems_version: 1.8.24
         | 
| 291 359 | 
             
            signing_key: 
         | 
| 292 360 | 
             
            specification_version: 3
         | 
| 293 361 | 
             
            summary: High-level library for working with the Cloud Foundry API.
         | 
| 294 | 
            -
            test_files:
         | 
| 362 | 
            +
            test_files: 
         | 
| 363 | 
            +
            - spec/cc_api_stub/applications_spec.rb
         | 
| 364 | 
            +
            - spec/cc_api_stub/domains_spec.rb
         | 
| 365 | 
            +
            - spec/cc_api_stub/frameworks_spec.rb
         | 
| 366 | 
            +
            - spec/cc_api_stub/login_spec.rb
         | 
| 367 | 
            +
            - spec/cc_api_stub/organization_users_spec.rb
         | 
| 368 | 
            +
            - spec/cc_api_stub/organizations_spec.rb
         | 
| 369 | 
            +
            - spec/cc_api_stub/routes_spec.rb
         | 
| 370 | 
            +
            - spec/cc_api_stub/runtimes_spec.rb
         | 
| 371 | 
            +
            - spec/cc_api_stub/service_bindings_spec.rb
         | 
| 372 | 
            +
            - spec/cc_api_stub/service_instances_spec.rb
         | 
| 373 | 
            +
            - spec/cc_api_stub/services_spec.rb
         | 
| 374 | 
            +
            - spec/cc_api_stub/spaces_spec.rb
         | 
| 375 | 
            +
            - spec/cc_api_stub/users_spec.rb
         | 
| 295 376 | 
             
            - spec/cfoundry/auth_token_spec.rb
         | 
| 296 377 | 
             
            - spec/cfoundry/baseclient_spec.rb
         | 
| 297 378 | 
             
            - spec/cfoundry/client_spec.rb
         | 
| @@ -329,9 +410,38 @@ test_files: | |
| 329 410 | 
             
            - spec/fixtures/apps/with_vmcignore/non_ignored_dir/ignored_file.txt
         | 
| 330 411 | 
             
            - spec/fixtures/apps/with_vmcignore/non_ignored_file.txt
         | 
| 331 412 | 
             
            - spec/fixtures/empty_file
         | 
| 413 | 
            +
            - spec/fixtures/fake_cc_application.json
         | 
| 414 | 
            +
            - spec/fixtures/fake_cc_application_summary.json
         | 
| 415 | 
            +
            - spec/fixtures/fake_cc_created_application.json
         | 
| 416 | 
            +
            - spec/fixtures/fake_cc_created_domain.json
         | 
| 417 | 
            +
            - spec/fixtures/fake_cc_created_organization.json
         | 
| 418 | 
            +
            - spec/fixtures/fake_cc_created_route.json
         | 
| 419 | 
            +
            - spec/fixtures/fake_cc_created_service_instance.json
         | 
| 420 | 
            +
            - spec/fixtures/fake_cc_created_space.json
         | 
| 421 | 
            +
            - spec/fixtures/fake_cc_created_user.json
         | 
| 422 | 
            +
            - spec/fixtures/fake_cc_empty_search.json
         | 
| 423 | 
            +
            - spec/fixtures/fake_cc_frameworks.json
         | 
| 424 | 
            +
            - spec/fixtures/fake_cc_organization.json
         | 
| 425 | 
            +
            - spec/fixtures/fake_cc_organization_domains.json
         | 
| 426 | 
            +
            - spec/fixtures/fake_cc_organization_search.json
         | 
| 427 | 
            +
            - spec/fixtures/fake_cc_organization_summary.json
         | 
| 428 | 
            +
            - spec/fixtures/fake_cc_organization_users.json
         | 
| 429 | 
            +
            - spec/fixtures/fake_cc_runtimes.json
         | 
| 430 | 
            +
            - spec/fixtures/fake_cc_service_binding.json
         | 
| 431 | 
            +
            - spec/fixtures/fake_cc_service_bindings.json
         | 
| 432 | 
            +
            - spec/fixtures/fake_cc_service_instance.json
         | 
| 433 | 
            +
            - spec/fixtures/fake_cc_service_instances.json
         | 
| 434 | 
            +
            - spec/fixtures/fake_cc_service_types.json
         | 
| 435 | 
            +
            - spec/fixtures/fake_cc_space.json
         | 
| 436 | 
            +
            - spec/fixtures/fake_cc_space_summary.json
         | 
| 437 | 
            +
            - spec/fixtures/fake_cc_stats.json
         | 
| 438 | 
            +
            - spec/fixtures/fake_cc_user.json
         | 
| 439 | 
            +
            - spec/fixtures/fake_cc_user_organizations.json
         | 
| 440 | 
            +
            - spec/fixtures/fake_cc_user_with_managers.json
         | 
| 332 441 | 
             
            - spec/spec_helper.rb
         | 
| 333 442 | 
             
            - spec/support/fake_helper.rb
         | 
| 334 443 | 
             
            - spec/support/randoms.rb
         | 
| 444 | 
            +
            - spec/support/shared_examples/cc_api_stub_request_examples.rb
         | 
| 335 445 | 
             
            - spec/support/shared_examples/client_login_examples.rb
         | 
| 336 446 | 
             
            - spec/support/shared_examples/model_summary_examples.rb
         | 
| 337 447 | 
             
            - spec/support/v1_fake_helper.rb
         |