s.add_runtime_dependency('autoparse', '>= 0.3.3')
s.add_runtime_dependency('faraday', '>= 0.9.0')
s.add_runtime_dependency('multi_json', '>= 1.0.0')
- s.add_runtime_dependency('extlib', '>= 0.9.15')
+ s.add_runtime_dependency('activesupport', '>= 3.2.0')
s.add_runtime_dependency('jwt', '>= 0.1.5')
s.add_runtime_dependency('retriable', '~> 1.4')
s.add_runtime_dependency('launchy', '>= 2.1.1')
require 'addressable/uri'
require 'multi_json'
-require 'google/inflection'
+require 'active_support/inflector'
require 'google/api_client/discovery/resource'
require 'google/api_client/discovery/method'
require 'google/api_client/discovery/media'
@discovery_document = discovery_document
metaclass = (class << self; self; end)
self.discovered_resources.each do |resource|
- method_name = Google::INFLECTOR.underscore(resource.name).to_sym
+ method_name = ActiveSupport::Inflector.underscore(resource.name).to_sym
if !self.respond_to?(method_name)
metaclass.send(:define_method, method_name) { resource }
end
end
self.discovered_methods.each do |method|
- method_name = Google::INFLECTOR.underscore(method.name).to_sym
+ method_name = ActiveSupport::Inflector.underscore(method.name).to_sym
if !self.respond_to?(method_name)
metaclass.send(:define_method, method_name) { method }
end
require 'addressable/uri'
-require 'google/inflection'
+require 'active_support/inflector'
require 'google/api_client/discovery/method'
@discovery_document = discovery_document
metaclass = (class <<self; self; end)
self.discovered_resources.each do |resource|
- method_name = Google::INFLECTOR.underscore(resource.name).to_sym
+ method_name = ActiveSupport::Inflector.underscore(resource.name).to_sym
if !self.respond_to?(method_name)
metaclass.send(:define_method, method_name) { resource }
end
end
self.discovered_methods.each do |method|
- method_name = Google::INFLECTOR.underscore(method.name).to_sym
+ method_name = ActiveSupport::Inflector.underscore(method.name).to_sym
if !self.respond_to?(method_name)
metaclass.send(:define_method, method_name) { method }
end
require 'addressable/uri'
require 'addressable/template'
-require 'google/inflection'
+require 'active_support/inflector'
require 'google/api_client/errors'
# puts schema_data.inspect
if schema_name
- api_name_string =
- Google::INFLECTOR.camelize(api.name)
- api_version_string =
- Google::INFLECTOR.camelize(api.version).gsub('.', '_')
+ api_name_string = ActiveSupport::Inflector.camelize(api.name)
+ api_version_string = ActiveSupport::Inflector.camelize(api.version).gsub('.', '_')
# This is for compatibility with Ruby 1.8.7.
# TODO(bobaman) Remove this when we eventually stop supporting 1.8.7.
args = []
# See the License for the specific language governing permissions and
# limitations under the License.
+require 'active_support/inflector'
+
module Google
class APIClient
class Service
# Handle resources.
root.discovered_resources.each do |resource|
- method_name = Google::INFLECTOR.underscore(resource.name).to_sym
+ method_name = ActiveSupport::Inflector.underscore(resource.name).to_sym
if !self.respond_to?(method_name)
metaclass.send(:define_method, method_name) do
Google::APIClient::Service::Resource.new(service, resource)
# Handle methods.
root.discovered_methods.each do |method|
- method_name = Google::INFLECTOR.underscore(method.name).to_sym
+ method_name = ActiveSupport::Inflector.underscore(method.name).to_sym
if !self.respond_to?(method_name)
metaclass.send(:define_method, method_name) do |*args|
if args.length > 1
+++ /dev/null
-# Copyright 2010 Google Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-module Google
- begin
- require 'active_support/inflector'
- INFLECTOR = ActiveSupport::Inflector
- rescue LoadError
- require 'extlib/inflection'
- INFLECTOR = Extlib::Inflection
- end
-end