QQWry
A Ruby interface to QQWry IP database.
Installation
Add this line to your application's Gemfile:
gem 'qqwry'
And then execute:
$ bundle
Or install it yourself as:
$ gem install qqwry
Usage
At first, you need to get the latest QQWry IP database from http://www.cz88.net
require 'rubygems'
require 'bundler/setup'
require 'qqwry'
db = QQWry::Database.new('QQWry.Dat')
r = db.query('8.8.8.8')
puts "#{r.country} #{r.area}"
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request