Skip to content
Snippets Groups Projects
Commit bed0d261 authored by Luke Roberts's avatar Luke Roberts
Browse files

port freegeopip to telize, still need to handle errors

parent 37525b3b
Branches
Tags
No related merge requests found
...@@ -47,10 +47,11 @@ module Geocoder ...@@ -47,10 +47,11 @@ module Geocoder
# #
def ip_services def ip_services
[ [
:baidu_ip,
:freegeoip, :freegeoip,
:maxmind, :maxmind,
:maxmind_local, :maxmind_local,
:baidu_ip :telize
] ]
end end
......
...@@ -143,6 +143,13 @@ module Geocoder ...@@ -143,6 +143,13 @@ module Geocoder
end end
end end
class Telize
private
def default_fixture_filename
"telize_74_200_247_59"
end
end
class Maxmind class Maxmind
private private
def default_fixture_filename def default_fixture_filename
......
...@@ -23,7 +23,7 @@ class LookupTest < GeocoderTestCase ...@@ -23,7 +23,7 @@ class LookupTest < GeocoderTestCase
def test_query_url_contains_values_in_params_hash def test_query_url_contains_values_in_params_hash
Geocoder::Lookup.all_services_except_test.each do |l| Geocoder::Lookup.all_services_except_test.each do |l|
next if l == :freegeoip || l == :maxmind_local # does not use query string next if [:freegeoip, :maxmind_local, :telize].include? l # does not use query string
set_api_key!(l) set_api_key!(l)
url = Geocoder::Lookup.get(l).query_url(Geocoder::Query.new( url = Geocoder::Lookup.get(l).query_url(Geocoder::Query.new(
"test", :params => {:one_in_the_hand => "two in the bush"} "test", :params => {:one_in_the_hand => "two in the bush"}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment