Skip to content
Snippets Groups Projects
Commit eac42d33 authored by Alex Reisner's avatar Alex Reisner
Browse files

Minor code cleanup.

parent 46ab278a
No related branches found
No related tags found
No related merge requests found
...@@ -16,12 +16,8 @@ module Geocoder::Lookup ...@@ -16,12 +16,8 @@ module Geocoder::Lookup
:client => Geocoder::Configuration.api_client, :client => Geocoder::Configuration.api_client,
:channel => Geocoder::Configuration.api_channel :channel => Geocoder::Configuration.api_channel
}.reject{ |key, value| value.nil? } }.reject{ |key, value| value.nil? }
path = "/maps/api/geocode/json?#{hash_to_query(params)}" path = "/maps/api/geocode/json?#{hash_to_query(params)}"
"#{protocol}://maps.googleapis.com#{path}&signature=#{sign(path)}"
signature = sign(path)
"#{protocol}://maps.googleapis.com#{path}&signature=#{signature}"
end end
def sign(string) def sign(string)
...@@ -38,6 +34,5 @@ module Geocoder::Lookup ...@@ -38,6 +34,5 @@ module Geocoder::Lookup
def url_safe_base64_encode(raw) def url_safe_base64_encode(raw)
Base64.encode64(raw).tr('+/', '-_').strip Base64.encode64(raw).tr('+/', '-_').strip
end end
end end
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