Skip to content
Snippets Groups Projects
Commit b887ba26 authored by Aaron Parecki's avatar Aaron Parecki
Browse files

fix reference to EsriToken, avoid using rails .minutes

parent 8ff8f078
No related branches found
No related tags found
No related merge requests found
...@@ -30,7 +30,7 @@ module Geocoder ...@@ -30,7 +30,7 @@ module Geocoder
Geocoder.log(:warn, response['error']) Geocoder.log(:warn, response['error'])
else else
token_value = response['access_token'] token_value = response['access_token']
expires_at = Time.now + expires.minutes expires_at = Time.now + (expires * 60)
new(token_value, expires_at) new(token_value, expires_at)
end end
end end
......
...@@ -51,7 +51,7 @@ module Geocoder::Lookup ...@@ -51,7 +51,7 @@ module Geocoder::Lookup
if configuration[:token] && configuration[:token].active? # if we have a token, use it if configuration[:token] && configuration[:token].active? # if we have a token, use it
configuration[:token].to_s configuration[:token].to_s
elsif configuration.api_key # generate a new token if we have credentials elsif configuration.api_key # generate a new token if we have credentials
token_instance = EsriToken.generate_token(*configuration.api_key) token_instance = Geocoder::EsriToken.generate_token(*configuration.api_key)
Geocoder.configure(:esri => {:token => token_instance}) Geocoder.configure(:esri => {:token => token_instance})
token_instance.to_s token_instance.to_s
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment