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_bufferhas been renamed to#buffer_append. -
Whois#queryno longer raisesErrno::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_contactand#registrant_contacthave been renamed to#admin_contacts,#technical_contactsand#registrant_contactsand they now returns an array ofContact, instead of a singleContact.#admin_contact,#technical_contactand#registrant_contactstill exists in theWhois::Recordas a convenient shortcut. -
Whois::Record::Parser::Base.register_propertyhas been renamed toWhois::Record::Parser::Base.property_register.
Deprecations:
-
Whois::Answerhas been renamed toWhois::Record. This is one of the biggest changes. Please make sure to remove all the references toWhois::Answerin your code. - Comparing a
Whois::Recordto aStringhas been deprecated.
