Project

geoipdb

0.01
No commit activity in last 3 years
No release in over 3 years
Fast IPDB implementation for JRuby
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

GeoIPDB

Fast GeoIPDB implementation for JRuby.

Gem Version Build Status Code Climate Dependency Status

Installation

Add this line to your application's Gemfile:

gem 'geoipdb'

And then execute:

$ bundle

Or install it yourself as:

$ gem install geoipdb

Usage

db = IpDb.init "city_codes.csv", "ip_city.txt", "ip_city.cache"
ip_info = db.information_for_ip("178.0.0.1")
ip_info.inspect
=> #<IpInformation:0x101385c78 @city_name="eschborn", @city_code="ax5", @lng=8.55, @country_iso_code="de", @lat=50.133333, @is_mobile=true>

Contributing

  1. Fork it ( http://github.com/liquidm/geoipdb/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request