Merge branch 'master' of https://github.com/google/google-api-ruby-client
This commit is contained in:
commit
acf2b0ec61
11 files changed
+28
-22
No files matched your search
@@ -17,7 +17,7 @@ require 'addressable/uri'
|
||||
require 'addressable/template'
|
||||
require 'google/apis/core/http_command'
|
||||
require 'google/apis/errors'
|
||||
require 'multi_json'
|
||||
require 'json'
|
||||
require 'retriable'
|
||||
|
||||
module Google
|
||||
@@ -113,7 +113,7 @@ module Google
|
||||
# HTTP response body
|
||||
# @return [Hash]
|
||||
def parse_error(body)
|
||||
hash = MultiJson.load(body)
|
||||
hash = JSON.load(body)
|
||||
hash['error']['errors'].first
|
||||
rescue
|
||||
nil
|
||||
|
||||
@@ -303,6 +303,7 @@ module Google
|
||||
end
|
||||
req.header.update(header)
|
||||
req.options.timeout = options.timeout_sec
|
||||
req.options.open_timeout = options.open_timeout_sec
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -38,8 +38,8 @@ module Google
|
||||
def getter_fn(name)
|
||||
ivar_name = "@#{name}".to_sym
|
||||
lambda do |_|
|
||||
if respond_to?(:[])
|
||||
self[name] || instance_variable_get(ivar_name)
|
||||
if respond_to?(:fetch)
|
||||
fetch(name, instance_variable_get(ivar_name))
|
||||
else
|
||||
instance_variable_get(ivar_name)
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user