Regeoip

Regeoip come with GeoLite2-City.mmdb so that it will resolve either IPv4 or IPv6 to country and city without a need for a request.

All you need is: Regeoip.resolve(ip)

Installation

Add this line to your application's Gemfile:

gem 'regeoip'

And then execute:

$ bundle

Or install it yourself as:

$ gem install regeoip

Usage

Get all location data: Regeoip.resolve(ip)

Get country data:

Regeoip.resolve_country(ip)

Get country code:

Regeoip.resolve_country_code(ip)

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/phuongnd08/regeoip.