lib/geocoder/lookups/freegeoip.rb in geocoder-1.7.3 vs lib/geocoder/lookups/freegeoip.rb in geocoder-1.7.4
- old
+ new
@@ -15,17 +15,19 @@
# use https for default host
[:https]
end
end
- def query_url(query)
- "#{protocol}://#{host}/json/#{query.sanitized_text}"
- end
-
private # ---------------------------------------------------------------
- def cache_key(query)
- query_url(query)
+ def base_query_url(query)
+ "#{protocol}://#{host}/json/#{query.sanitized_text}?"
+ end
+
+ def query_url_params(query)
+ {
+ :apikey => configuration.api_key
+ }.merge(super)
end
def parse_raw_data(raw_data)
raw_data.match(/^<html><title>404/) ? nil : super(raw_data)
end