diff --git a/lib/geocoder/lookups/mapquest.rb b/lib/geocoder/lookups/mapquest.rb index 133c26bbf342b1b6132d68b611536180c9d1012c..7f53c093e1146a13258f529037b0217e3f7efb04 100644 --- a/lib/geocoder/lookups/mapquest.rb +++ b/lib/geocoder/lookups/mapquest.rb @@ -15,8 +15,7 @@ module Geocoder::Lookup def query_url(query) domain = configuration[:open] ? "open" : "www" - version = configuration[:version] || 1 - url = "#{protocol}://#{domain}.mapquestapi.com/geocoding/v#{version}/#{search_type(query)}?" + url = "#{protocol}://#{domain}.mapquestapi.com/geocoding/v1/#{search_type(query)}?" url + url_query_string(query) end diff --git a/test/unit/lookups/mapquest_test.rb b/test/unit/lookups/mapquest_test.rb index a15f26ea56feb3e46b914bd434aa9ab0a870fb7e..2387c93f65d20714593fc714f8c1e23bb07647f8 100644 --- a/test/unit/lookups/mapquest_test.rb +++ b/test/unit/lookups/mapquest_test.rb @@ -14,12 +14,6 @@ class MapquestTest < GeocoderTestCase assert_equal "http://www.mapquestapi.com/geocoding/v1/address?key=abc123&location=Bluffton%2C+SC", query.url end - def test_url_for_version_2 - Geocoder.configure(mapquest: {api_key: "abc123", version: 2}) - query = Geocoder::Query.new("Bluffton, SC") - assert_equal "http://www.mapquestapi.com/geocoding/v2/address?key=abc123&location=Bluffton%2C+SC", query.url - end - def test_url_for_open_street_maps Geocoder.configure(mapquest: {api_key: "abc123", open: true}) query = Geocoder::Query.new("Bluffton, SC")