- Timer.timeout(4) do
- ipinfo = Quova::IpInfo.new(ip_address) if defined?(QUOVA_USERNAME)
-
- if ipinfo && ipinfo.status == Quova::SUCCESS
- country = ipinfo.country_code
- else
- country = http_client.get("http://api.hostip.info/country.php?ip=#{ip_address}").body
- country = "GB" if country == "UK"
- end