public
Rubygem
Description: Ruby gem which process flat files from IANA
Homepage: http://yesmar.github.com/iana/
Clone URL: git://github.com/yesmar/iana.git
iana /
== What
IANA Ruby module version 0.0.7
http://yesmar.github.com/iana/

I like to look stuff up, like TCP/IP port numbers, protocols, top-level
domains, et al. I get my data from the Internet Assigned Numbers Authority
(IANA) and like to make it available to my programs. Since I am open sourcing
this code you can add this functionality to your own programs as well.

== How
require 'iana'

The IANA Ruby module loads the data into conveniently searchable data
structures. The flat files the IANA Ruby module consume as data are hosted at
iana.org. You will need to fetch them so you can process the content locally.
I grab these files with with curl (but you can use wget or whatever if you
don't use curl):

curl -O http://www.iana.org/assignments/port-numbers
curl -O http://www.iana.org/assignments/protocol-numbers
curl -O http://data.iana.org/TLD/tlds-alpha-by-domain.txt

== Install
Installation is super easy!

  gem sources -a http://gems.github.com (you only have to do this once)
  sudo gem install yesmar-iana

That's it. See the programs in the examples directory to see how to use the
IANA gem.

== Examples
When you run the example programs, do it like so:

  ruby examples/ports.rb port-numbers

Use these example programs to see how you might use and otherwise integrate
IANA data functionality into your own programs.

== Notes
I have stared updating this code for use with YARV. Currently I am developing
with Ruby 1.9.1-p0. The ports and tld code seems to be working as expected.
The protocols code is broken, however.

Things to do:
- fix lib/iana/protocols.rb
- test gem with Ruby 1.9.1-p0
- delete RubyForge project (we're living exclusively at github now)

I'll get these things addressed shortly.

Going forward, I want to add support for IANA's Ether Types flatfile:
http://www.iana.org/assignments/ethernet-numbers

== Contribute
The source is availble at github: git://github.com/yesmar/iana.git. Feel free
to clone it and implement your own awesome ideas. You can also send your
patches by email to yesmar[at]speakeasy[dot]net.