public
Description: Ruby gem which process flat files from IANA
Homepage: http://yesmar.github.com/iana/
Clone URL: git://github.com/yesmar/iana.git
yesmar (author)
Tue Feb 10 10:12:28 -0800 2009
commit  45a7f1d24eb128491989d8ff49bbeea714d0f148
tree    71683a700056004c8a8459f8aa5984afa61df7ed
parent  71fca529d1608e689aa1e63ea59630bc0209d6ad
iana /
name age message
file .gitignore Mon Feb 09 21:41:01 -0800 2009 Corrected error in gemspec [yesmar]
file COPYRIGHT Mon Feb 09 21:35:22 -0800 2009 Updated to use github as rubygem host [yesmar]
file HISTORY Loading commit data...
file LICENSE Mon Feb 09 21:35:22 -0800 2009 Updated to use github as rubygem host [yesmar]
file README
file Rakefile
directory examples/ Sat Feb 23 18:38:04 -0800 2008 initial commit [Ramsey Dow]
file iana.gemspec
directory lib/
README
== 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

== 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.

== 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.

== 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.