lib/geocoder/lookups/esri.rb in geocoder-1.4.9 vs lib/geocoder/lookups/esri.rb in geocoder-1.5.0

- old
+ new

@@ -2,19 +2,15 @@ require "geocoder/results/esri" require 'geocoder/esri_token' module Geocoder::Lookup class Esri < Base - + def name "Esri" end - def query_url(query) - base_query_url(query) + url_query_string(query) - end - private # --------------------------------------------------------------- def base_query_url(query) action = query.reverse_geocode? ? "reverseGeocode" : "find" "#{protocol}://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/#{action}?" @@ -29,20 +25,9 @@ if (doc['error'].nil?) return [ doc ] else return [] - end - end - - def cache_key(query) - base_query_url(query) + hash_to_query(cache_key_params(query)) - end - - def cache_key_params(query) - # omit api_key and token because they may vary among requests - query_url_params(query).reject do |key,value| - [:api_key, :token].include?(key) end end def query_url_params(query) params = {