X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/34e3e51456774127d43408b7ab65c24f41373f62..8e404f3a468a2636481d52f245b816c41e9d5ac0:/lib/quova.rb diff --git a/lib/quova.rb b/lib/quova.rb index 70e5b4601..6cfc2ff92 100644 --- a/lib/quova.rb +++ b/lib/quova.rb @@ -1,12 +1,12 @@ ## # Load required libraries -require 'soap/wsdlDriver' +require "soap/wsdlDriver" ## # Monkey patch WSDL parser to stop it moaning module WSDL class Parser - def warn(msg) + def warn(_msg) end end end @@ -16,21 +16,21 @@ end module Quova ## # Access details for WSDL description - WSDL_URL="https://webservices.quova.com/OnDemand/GeoPoint/v1/default.asmx?WSDL" + WSDL_URL = "https://webservices.quova.com/OnDemand/GeoPoint/v1/default.asmx?WSDL" WSDL_USER = QUOVA_USERNAME WSDL_PASS = QUOVA_PASSWORD ## # Status codes - Success = 0 - IPV6NoSupport = 1 - InvalidCredentials = 2 - NotMapped = 3 - InvalidIPFormat = 4 - IPAddressNull = 5 - AccessDenied = 6 - QueryLimit = 7 - OutOfService = 10 + SUCCESS = 0 + IPV6_NO_SUPPORT = 1 + INVALID_CREDENTIALS = 2 + NOT_MAPPED = 3 + INVALID_IP_FORMAT = 4 + IP_ADDRESS_NULL = 5 + ACCESS_DENIED = 6 + QUERY_LIMIT = 7 + OUT_OF_SERVICE = 10 ## # Create SOAP endpoint @@ -47,7 +47,7 @@ module Quova # Class representing geolocation details for an IP address class IpInfo def initialize(ip_address) - @ipinfo = Quova::soap.GetIpInfo(:ipAddress => ip_address) + @ipinfo = Quova.soap.GetIpInfo(:ipAddress => ip_address) end def status