Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Ruby port of client9/ipcat

wallin/ipcat-ruby

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ipcat-ruby

A ruby port of the ipcat library to classify IP addresses from known datacenters

Build Status Code Climate

Installation

With bundler:

# In Gemfile
gem 'ipcat'

Or with rubygems:

gem install ipcat

Usage

IPCat.datacenter?(ip_address)

It will return an IPCat::IPRange if ip_address is from a known datacenter; nil otherwise.

For example,

range = IPCat.datacenter?('52.95.252.0') # => instance of IPCat::IPRange
range.name # => 'Amazon AWS'

IPCat.datacenter?('127.0.0.1') # => nil

License

Copyright (c) 2013 Kickstarter, Inc

Released under an MIT License

About

Ruby port of client9/ipcat

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%