- Ruby 3.0+ is now required. If you're using Ruby 2.5, 2.6, or 2.7, please use version 1.2.0 of this gem.
- Deprecated
metro_code
onMaxMind::GeoIP2::Record::Location
. The code values are no longer being maintained.
MaxMind::GeoIP2::Client
now validates the IP address before making a request to the web service.MaxMind::GeoIP2::Client
now includes the version of Ruby, the version of the HTTP client library, and its own version in the User-Agent header.- The
anycast?
method was added toMaxMind::GeoIP2::Record::Traits
. This returnstrue
if the IP address belongs to an anycast network. This is available for the GeoIP2 Country, City Plus, and Insights web services and the GeoIP2 Country, City, and Enterprise databases.
- Exceptions from this gem now inherit from
MaxMind::GeoIP2::Error
. IP address related exceptions now inherit fromMaxMind::GeoIP2::AddressError
, which itself inherits fromMaxMind::GeoIP2::Error
. Pull Request by gr8bit. GitHub #35. - Support for mobile country code (MCC) and mobile network codes (MNC) was
added for the GeoIP2 ISP and Enterprise databases as well as the GeoIP2
City and Insights web services.
mobile_country_code
andmobile_network_code
attributes were added toMaxMind::GeoIP2::Model::ISP
for the GeoIP2 ISP database andMaxMind::GeoIP2::Record::Traits
for the Enterprise database and the GeoIP2 City and Insights web services. We expect this data to be available by late January, 2022.
- Ruby 2.4 is no longer supported. If you're using Ruby 2.4, please use version 0.7.0 of this gem.
- Expand accepted versions of the
http
gem to include 5.0+. - Bump version to 1.0.0 since we have been at 0.x for over a year. There is no breaking change.
- Ensured defaults are set when creating a
MaxMind::GeoIP2::Client
in the case when args are explicitly passed in asnil
. Pull Request by Manoj Dayaram. GitHub #31.
- Updated the
MaxMind::GeoIP2::Reader
constructor to support being called using keyword arguments. For example, you may now create aReader
usingMaxMind::GeoIP2::Reader.new(database: 'GeoIP2-Country.mmdb')
instead of using positional arguments. This is intended to make it easier to pass in optional arguments. Positional argument calling is still supported. - Proxy support was fixed. Pull request by Manoj Dayaram. GitHub #30.
- Added the
residential_proxy?
method toMaxMind::GeoIP2::Model::AnonymousIP
andMaxMind::GeoIP2::Record::Traits
for use with the Anonymous IP database and GeoIP2 Precision Insights.
- HTTP connections are now persistent. There is a new parameter that controls the maximum number of connections the client will use.
- Modules are now always be defined. Previously we used a shorthand syntax which meant including individual classes could leave module constants undefined.
- Added support for the GeoIP2 Precision web services: Country, City, and Insights.
- Added support for the Anonymous IP, ASN, Connection Type, Domain, and ISP databases.
- Added missing dependency on maxmind-db to the gemspec. Reported by Sean Dilda. GitHub #4.
- Initial implementation with support for location databases.