Whois 0.9.0: WHOIS parsers, CLI and performances

December 2nd, 2009 at 12:09 am • permalink1 comment

I’m happy to announce I’ve just released Whois 0.9.0. This release fixes a lot of bugs and introduces tons several features.

Updated server definitions

Whois 0.9.0 contains updates for the following TLD: .ec (#322), .gl (#323) and .md (#325). Also, there was an issue with all TLD definitions for the server whois.afilias-grs.info that causes the Client to use an invalid adapter (#342).

Improvements to WHOIS parsers

The WHOIS parser architecture has been refactored to provide additional flexibility and reduce code duplications. A new Whois::Answer::Parser::Ast is now available to simplify the creation of AST-based scanners.

New whois parser

The new release includes 15 new WHOIS parsers for 21 top level domains: .fr, .name, .ie, .edu, .info, .gov, .za.net, .eu.org, .za.org, .int/.arpa, .aero, .asia, .bz/.gi/.hn/.lc/.mn/.sc/.vc, .tv and .hu. The .hu and .tv are fully featured parsers while all the others exposes a small subset of properties.

ruby-whois command line improvements

The ruby-whois command line tool now accepts a timeout option to change the 5 seconds default value (#334).

$ ruby-whois google.com -t 20

Also, there was a small bug that prevents the CLI tool to use the right library version which is now fixed (#344).

Whois::Answer::Parser performance boost

The Whois::Answer::Parser no longer tries to require a parser file on every query if the class is already available in the current Ruby environment. This change provides multiple advantages:

  • You can add custom whois parsers without the need to store them in the default Gem directory. Just make sure the parser class is defined before the Answer tries to use it.
  • Huge performance improvements. Each time a require statement is call, Ruby scans all paths in the $LOAD_PATH searching for given file. This is an unnecessary step when the library has already been loaded (#340).

Additional changes

The Whois::Answer class now provides a #properties method to get all properties => values as Hash.

a = Whois.query "google.com"
a.properties
# => { :domain => "google.com", :created_at => ... }

Whois::Client#query automatically casts the qstring to String to prevent the library to crash when a different object is passed as argument (#339).

# because ["google", ".", "com"].to_s translates to "google.com"
# the following statement
a = Whois.query ["google", ".", "com"]

# is equal to
a = Whois.query "google.com"

The #supported method is now deprecated in favor of #property_supported?

a = Whois.query "google.com"
a.property_sUpported? :disclaimer
# => true

Installation/Update

As usual, you can install/upgrade the library via RubyGems.

$ gem install whois

The Gem is now served by Gemcutter.

  1. Ruby Whois 0.8.0
  2. New in Whois: Applying the Principle of Least Surprise
  3. Ruby Whois preview: WHOIS answer and parser
  4. Ruby Whois 1.0 is here!
  5. New in Whois: property is set?

Filed in Hosting / Domains, Programming • Tags: , , , ,

Comments

[...] 0.8.0 was released with a new command line tool to perform one-line WHOIS [...]

Add a Comment




Follow Me
    Random Quote