Merge pull request #20 from simplymeasured/feature/make-autorefresh-of-token-optional

incorporate style feedback from @sporkmonger on #19 ab23fe7539
This commit is contained in:
Steve Bazyl 2013-01-04 16:59:20 -08:00
commit ee6f8ae6f9
1 changed files with 7 additions and 7 deletions

View File

@ -101,7 +101,7 @@ module Google
# default authentication mechanisms.
self.authorization =
options.key?(:authorization) ? options[:authorization] : :oauth_2
self.auto_refresh_token = options.fetch(:auto_refresh_token){ true }
self.auto_refresh_token = options.fetch(:auto_refresh_token) { true }
self.key = options[:key]
self.user_ip = options[:user_ip]
@discovery_uris = {}
@ -167,12 +167,6 @@ module Google
return @authorization
end
##
# The application's API key issued by the API console.
#
# @return [String] The API key.
attr_accessor :key
##
# The setting that controls whether or not the api client attempts to
# refresh authorization when a 401 is hit in #execute.
@ -180,6 +174,12 @@ module Google
# @return [Boolean]
attr_accessor :auto_refresh_token
##
# The application's API key issued by the API console.
#
# @return [String] The API key.
attr_accessor :key
##
# The IP address of the user this request is being performed on behalf of.
#