require 'RMagick'
require 'nokogiri'
+ if defined?(SystemTimer)
+ Timer = SystemTimer
+ else
+ require 'timeout'
+ Timer = Timeout
+ end
+
# The base class for API Errors.
class APIError < RuntimeError
def status
end
def self.IPToCountry(ip_address)
- Timeout::timeout(4) do
+ Timer.timeout(4) do
ipinfo = Quova::IpInfo.new(ip_address)
if ipinfo.status == Quova::Success then