README.rdoc in geoip-1.6.1 vs README.rdoc in geoip-1.6.2

- old
+ new

@@ -8,10 +8,12 @@ returns information about the country where the IP address is allocated, and the city, ISP and other information, if you have that database version. == FEATURES/PROBLEMS: +Does not support the new Maxmind v2 database formats. + Includes support for ASN data files, thanks to Roland Matiz. This release adds support for timezone names, thanks to Tonni Aagesen. If you have required 'io/extra' and have IO#pread, cross-process file-descriptor sharing is enabled. Each GeoIP instance keeps the file descriptor open, with a Mutex for thread-safety. @@ -59,9 +61,20 @@ request, ip, country_code, country_code2, country_code3, country_name, continent_code, region_name, city_name, postal_code, latitude, longitude, dma_code, area_code, timezone GeoIP.new('GeoIPASNum.dat').asn("www.fsb.ru") => ["AS8342", "RTComm.RU Autonomous System"] + +For testing or other purposes, you might wish to treat localhost IP addresses as +some other address - an external one. You can do this by assigning the desired +external IP address to the attribute local_ip_alias: + + g = GeoIP.new('GeoIP.dat') + g.city("127.0.0.1") + => nil + g.local_ip_alias = "173.194.112.35" + g.city("127.0.0.1") + #<struct GeoIP::City request="127.0.0.1", ip="173.194.112.35", country_code2="US", country_code3="USA", country_name="United States", continent_code="NA", region_name="CA", city_name="Mountain View", postal_code="94043", latitude=37.41919999999999, longitude=-122.0574, dma_code=807, area_code=650, timezone="America/Los_Angeles", real_region_name="California"> == REQUIREMENTS: You need one of the free GeoLite country, city or ASN databases, or a subscription database version. The last known download locations for the GeoLite database versions are