Skip to content
Snippets Groups Projects
Unverified Commit 732bc80a authored by Alex Reisner's avatar Alex Reisner Committed by GitHub
Browse files

Merge pull request #1382 from mixergtz/feat/freegeoip-app

Add adjustment to freegeoip to use freegeoip.app
parents c47b97b1 b89bd0d0
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ module Geocoder::Lookup
def supported_protocols
if configuration[:host]
[:http, :https]
[:https]
else
# use https for default host
[:https]
......@@ -44,8 +44,8 @@ module Geocoder::Lookup
"city" => "",
"region_code" => "",
"region_name" => "",
"metrocode" => "",
"zipcode" => "",
"metro_code" => "",
"zip_code" => "",
"latitude" => "0",
"longitude" => "0",
"country_name" => "Reserved",
......@@ -54,7 +54,7 @@ module Geocoder::Lookup
end
def host
configuration[:host] || "freegeoip.net"
configuration[:host] || "freegeoip.app"
end
end
end
......@@ -35,6 +35,6 @@ class FreegeoipTest < GeocoderTestCase
Geocoder.configure(freegeoip: {host: "local.com"})
lookup = Geocoder::Lookup::Freegeoip.new
query = Geocoder::Query.new("24.24.24.23")
assert_match %r(http://local\.com), lookup.query_url(query)
assert_match %r(https://local\.com), lookup.query_url(query)
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment