Project

ipcat

0.07
Low commit activity in last 3 years
No release in over a year
A ruby port of the ipcat library: https://github.com/rale/ipcat/
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 5.14
~> 13.0
 Project Readme

ipcat-ruby

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

gem minitest

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