Fork me on GitHub

Upgrade

The standard upgrade procedure only requires you to install the newer version via RubyGems.

$ gem install whois

Normally, you don’t need to change anything in your application. We have a very strict BC policy: mini and bugfix releases should never include changes that break BC with previous versions.

Major releases can break BC with previous version. If that happen, we are committed to provide a detailed changelog of not-compatibile changes to help you upgrading your existing codebase.

The CHANGELOG file contains a detailed list of all the changes, grouped by version.

Upgrading from 1.x to 2.0

Whois 2.0 contains a few not BC changes and several deprecations.

Backwards-incompatible changes:

  • Whois::Server::Adapters::Base#append_to_buffer has been renamed to #buffer_append.
  • Whois#query no longer raises Errno::ECONNRESET, Errno::EHOSTUNREACH, Errno::ECONNREFUSED, SocketError. The errors are now rescued and re-raised as “Whois::ConnectionError”:/manual/errors-reference/##errors-reference-connection.
  • #admin_contact, #technical_contact and #registrant_contact have been renamed to #admin_contacts, #technical_contacts and #registrant_contacts and they now returns an array of Contact, instead of a single Contact. #admin_contact, #technical_contact and #registrant_contact still exists in the Whois::Record as a convenient shortcut.
  • Whois::Record::Parser::Base.register_property has been renamed to Whois::Record::Parser::Base.property_register.

Deprecations:

  • Whois::Answer has been renamed to Whois::Record. This is one of the biggest changes. Please make sure to remove all the references to Whois::Answer in your code.
  • Comparing a Whois::Record to a String has been deprecated.