diff --git a/lib/geocoder/lookups/google_premier.rb b/lib/geocoder/lookups/google_premier.rb index 4694d2ec62ab27660fb24770384de7242f38bc4a..31a033e700c0695f1d8e33a2e811198716078159 100644 --- a/lib/geocoder/lookups/google_premier.rb +++ b/lib/geocoder/lookups/google_premier.rb @@ -16,12 +16,8 @@ module Geocoder::Lookup :client => Geocoder::Configuration.api_client, :channel => Geocoder::Configuration.api_channel }.reject{ |key, value| value.nil? } - path = "/maps/api/geocode/json?#{hash_to_query(params)}" - - signature = sign(path) - - "#{protocol}://maps.googleapis.com#{path}&signature=#{signature}" + "#{protocol}://maps.googleapis.com#{path}&signature=#{sign(path)}" end def sign(string) @@ -38,6 +34,5 @@ module Geocoder::Lookup def url_safe_base64_encode(raw) Base64.encode64(raw).tr('+/', '-_').strip end - end end