diff --git a/lib/geocoder/lookups/ovi.rb b/lib/geocoder/lookups/ovi.rb index 8831bc883d3bcad71e65f162387e15a9f708651a..5dcf91c5f3b7893e8982e40c83c3054232e25882 100644 --- a/lib/geocoder/lookups/ovi.rb +++ b/lib/geocoder/lookups/ovi.rb @@ -6,6 +6,18 @@ require 'geocoder/results/ovi' module Geocoder::Lookup class Ovi < Base + def name + "Ovi" + end + + def required_api_key_parts + [] + end + + def query_url(query) + "http://lbs.ovi.com/search/6.2/geocode.json?" + url_query_string(query) + end + private # --------------------------------------------------------------- def results(query) @@ -28,19 +40,15 @@ module Geocoder::Lookup end def api_key - if a=Geocoder::Configuration.api_key + if a=configuration.api_key return a.first if a.is_a?(Array) end end def api_code - if a=Geocoder::Configuration.api_key + if a=configuration.api_key return a.last if a.is_a?(Array) end end - - def query_url(query) - "http://lbs.ovi.com/search/6.2/geocode.json?" + url_query_string(query) - end end end diff --git a/test/fixtures/ovi_madison_square_garden.json b/test/fixtures/ovi_madison_square_garden similarity index 100% rename from test/fixtures/ovi_madison_square_garden.json rename to test/fixtures/ovi_madison_square_garden diff --git a/test/fixtures/ovi_no_results.json b/test/fixtures/ovi_no_results similarity index 100% rename from test/fixtures/ovi_no_results.json rename to test/fixtures/ovi_no_results