geoip
geoip copied to clipboard
Ruby C binding to Maxmind GeoIP Library
Fixes #18
I re-used `look_up`, but its class-level and doesn't take an IP. Might make sense to change the API signature, but functionality works.
Most failing tests were due to outdated IP resolutions, see https://gist.github.com/bbozo/5523578 Remaining fails are: ``` 1) Failure: test_blank_region_skips_region_name_set(GeoIPCityTest) [/home/bbozo/dev/geoip/test/test_geoip.rb:142]: expected but was . 2) Failure: test_character_encoding_converted_to_utf8_first(GeoIPCityTest) [/home/bbozo/dev/geoip/test/test_geoip.rb:136]: expected but was...
I've contacted MaxMind and they've been gracious enough to provide us with test databases that we can distribute along with the client library to simplify testing. This pull includes these...
I added GeoIP::ASN class, and fixed compiler warnings. Cheers, Matt
Using the latest version of the full database there are IP's (specifically Asian, Hong Kong in test) that don't have all fields. This method was causing issues encode_to_utf8_and_return_rb_str