Skip to content

joewils/ipcat-ruby

 
 

Repository files navigation

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', git: 'https://github.com/joewils/ipcat-ruby', branch: 'main'

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

Update IPCat

git submodule update --remote
rake data:generate

License

Copyright (c) 2013 Kickstarter, Inc

Released under an MIT License

About

Ruby port of kickstarter/ipcat-ruby

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%