From 772d3a76710d0419d4590047700127955fa4dd58 Mon Sep 17 00:00:00 2001 From: Steven Bazyl Date: Mon, 30 Jan 2012 20:54:05 -0800 Subject: [PATCH 1/3] Remove stray requires of deleted files --- spec/google/api_client/discovery_spec.rb | 1 - spec/google/api_client_spec.rb | 1 - 2 files changed, 2 deletions(-) diff --git a/spec/google/api_client/discovery_spec.rb b/spec/google/api_client/discovery_spec.rb index 616248725..fdf1734b1 100644 --- a/spec/google/api_client/discovery_spec.rb +++ b/spec/google/api_client/discovery_spec.rb @@ -24,7 +24,6 @@ require 'signet/oauth_1/client' require 'google/api_client' require 'google/api_client/version' -require 'google/api_client/parsers/json_parser' describe Google::APIClient do before do diff --git a/spec/google/api_client_spec.rb b/spec/google/api_client_spec.rb index ee25dab9d..9ac14fe36 100644 --- a/spec/google/api_client_spec.rb +++ b/spec/google/api_client_spec.rb @@ -23,7 +23,6 @@ require 'signet/oauth_1/client' require 'google/api_client' require 'google/api_client/version' -require 'google/api_client/parsers/json_parser' shared_examples_for 'configurable user agent' do it 'should allow the user agent to be modified' do From 5b45f8f3518a5c460cabe692fadc1b1a751b04ba Mon Sep 17 00:00:00 2001 From: Steven Bazyl Date: Mon, 30 Jan 2012 23:28:55 -0800 Subject: [PATCH 2/3] Rename 'resources' method due to conflict with one of the APIs. --- lib/google/api_client/discovery/api.rb | 8 ++++---- lib/google/api_client/discovery/resource.rb | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/google/api_client/discovery/api.rb b/lib/google/api_client/discovery/api.rb index 57ca339bb..c02947135 100644 --- a/lib/google/api_client/discovery/api.rb +++ b/lib/google/api_client/discovery/api.rb @@ -44,7 +44,7 @@ module Google @document_base = Addressable::URI.parse(document_base) @discovery_document = discovery_document metaclass = (class < Date: Wed, 8 Feb 2012 11:35:39 -0800 Subject: [PATCH 3/3] Don't traverse ancestors when checking if schema is defined --- lib/google/api_client/discovery/schema.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/google/api_client/discovery/schema.rb b/lib/google/api_client/discovery/schema.rb index ba8195070..42e5ea192 100644 --- a/lib/google/api_client/discovery/schema.rb +++ b/lib/google/api_client/discovery/schema.rb @@ -74,20 +74,20 @@ module Google Google::INFLECTOR.camelize(api.name) api_version_string = Google::INFLECTOR.camelize(api.version).gsub('.', '_') - if Google::APIClient::Schema.const_defined?(api_name_string) - api_name = Google::APIClient::Schema.const_get(api_name_string) + if Google::APIClient::Schema.const_defined?(api_name_string, false) + api_name = Google::APIClient::Schema.const_get(api_name_string, false) else api_name = Google::APIClient::Schema.const_set( api_name_string, Module.new ) end - if api_name.const_defined?(api_version_string) - api_version = api_name.const_get(api_version_string) + if api_name.const_defined?(api_version_string, false) + api_version = api_name.const_get(api_version_string, false) else api_version = api_name.const_set(api_version_string, Module.new) end - if api_version.const_defined?(schema_name) - schema_class = api_version.const_get(schema_name) + if api_version.const_defined?(schema_name, false) + schema_class = api_version.const_get(schema_name, false) end end