<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Simone Carletti&#039;s Blog &#187; Hosting / Domains</title>
	<atom:link href="http://www.simonecarletti.com/blog/categories/hosting-domains/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.simonecarletti.com/blog</link>
	<description>Simone Carletti&#039;s personal ramblings on programming, syndication, search engines &#38; marketing.</description>
	<lastBuildDate>Tue, 07 Feb 2012 08:48:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Google changes the maximum number of users for Google Apps</title>
		<link>http://www.simonecarletti.com/blog/2011/04/google-changes-the-maximum-number-of-users-for-google-apps/</link>
		<comments>http://www.simonecarletti.com/blog/2011/04/google-changes-the-maximum-number-of-users-for-google-apps/#comments</comments>
		<pubDate>Fri, 29 Apr 2011 07:31:13 +0000</pubDate>
		<dc:creator>Simone Carletti</dc:creator>
				<category><![CDATA[Hosting / Domains]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[google apps]]></category>

		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=1442</guid>
		<description><![CDATA[Starting from 10 May 2011, the new maximum number of users for a Google Apps for free account will be set to 10.]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-1443" title="Google Apps Circle" src="http://www.simonecarletti.com/blog/wp-content/uploads/2011/04/google-apps-circle-136x150.png" alt="" width="136" height="150" />I just received an email from Google about upcoming changes to the maximum number of users for <a title="Google Apps" href="http://google.com/a">Google Apps</a>. When Google Apps was released, Google allowed all accounts to create up to 500 users. <a title="Official Google Enterprise Blog: Serving businesses better with Google Apps" href="http://googleenterprise.blogspot.com/2009/01/serving-businesses-better-with-google.html">The limit was changed in 2009</a> for free accounts and reduced to 50 users.</p>
<p>Today, Google is changing this limit again to 10 users. Here&#8217;s the content of the email.</p>
<blockquote><p>Hello,</p>
<p>We recently announced upcoming changes to the maximum number of users for Google Apps. We want to let you know that, as a current customer, the changes will not affect you.</p>
<p>As of May 10, any organization that signs up for a new account will be required to use the paid Google Apps for Business product in order to create more than 10 users. We honor our commitment to all existing customers and will allow you to add more than 10 users to your account for DOMAIN at no additional charge, based on the limit in place when you joined us.</p>
<p>Sincerely,</p>
<p>The Google Apps Team</p></blockquote>
<p>Starting from 10 May 2011, the new maximum number of users for a <em>Google Apps for free</em> account will be set to 10.</p>
<p>Related posts<ol>
<li><a href='http://www.simonecarletti.com/blog/2009/01/google-serp-full-of-this-site-may-harm-your-computer-warnings/' rel='bookmark' title='Google SERP full of &#8220;This site may harm your computer&#8221; warnings'>Google SERP full of &#8220;This site may harm your computer&#8221; warnings</a></li>
<li><a href='http://www.simonecarletti.com/blog/2009/12/google-site-performance-tool-gzip/' rel='bookmark' title='Google Site performance tool says Google is not serving Gzipped resources'>Google Site performance tool says Google is not serving Gzipped resources</a></li>
<li><a href='http://www.simonecarletti.com/blog/2005/12/google-personalized-homepage-rmail-module/' rel='bookmark' title='Google Personalized Homepage RMail module'>Google Personalized Homepage RMail module</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.simonecarletti.com/blog/2011/04/google-changes-the-maximum-number-of-users-for-google-apps/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Whois 2.0</title>
		<link>http://www.simonecarletti.com/blog/2011/03/whois-2-0/</link>
		<comments>http://www.simonecarletti.com/blog/2011/03/whois-2-0/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 20:58:19 +0000</pubDate>
		<dc:creator>Simone Carletti</dc:creator>
				<category><![CDATA[Hosting / Domains]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rubywhois]]></category>
		<category><![CDATA[whois]]></category>

		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=1417</guid>
		<description><![CDATA[I'm very proud to announce the immediate availability of Whois 2.0.]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-606" title="Whois" src="http://www.simonecarletti.com/blog/wp-content/uploads/2009/09/whois-150x150.png" alt="" width="150" height="150" />One year after the <a title="Ruby Whois 1.0 is here!" href="http://www.simonecarletti.com/blog/2010/02/ruby-whois-1-0-is-here/">first major release</a>, almost 2 years after the first commit, 1k commits and 59 versions after, I&#8217;m very proud to announce the immediate availability of <strong>Whois 2.0</strong>.</p>
<p><a title="Ruby Whois - Ruby Whois Gem" href="http://www.ruby-whois.org/">Whois</a> is an intelligent, pure Ruby, <strong>WHOIS client and parser</strong>. It provides a flexible and programmable API to query WHOIS servers and look up IP, TLD, and domain WHOIS information. It also offers command-line interface to run WHOIS queries from the console.</p>
<p>This second major release, the 60th since I released the gem, is a very important milestones. I started working on this project with the idea of <strong>creating a Ruby parser for each TLD available and it took me two years and countless hours to reach this goal</strong>.<span id="more-1417"></span></p>
<h2>Some stats</h2>
<p>To give you a rough idea about the complexity of this project, here&#8217;s a few numbers about Whois 2.0.</p>
<ul>
<li>866,706 different WHOIS records (~3.3 GB of data) analyzed as of March 16th, 2011</li>
<li>425 RSpec test files</li>
<li>444 fixture files extracted from real WHOIS records</li>
<li>3787 RSpec examples and an unknown number of matches (sorry, I stopped keeping track of them when they reached 15k assertions) that probably makes this project one of the gems with the largest RSpec test suite</li>
<li>~20.000 lines of code, including the test files</li>
<li>168 different WHOIS parsers</li>
</ul>
<p>Oh, man. You can&#8217;t believe the amount of work required to cover all the existing WHOIS servers, their features and especially their whims.</p>
<h2>New and Notable</h2>
<p>The increasing support for all existing TLD servers is probably one of the most important changes for this milestone. But the CHANGELOG is very huge and there are a few other changes that are worth a mention.</p>
<p>I already blogged about a few of them.</p>
<ul>
<li>The <a href="http://www.simonecarletti.com/blog/2011/03/new-in-whois-nameservers-are-now-nameserver/"><code>#nameservers</code> property now returns a Nameserver object</a>. This change allows the parser to also extract name server IPv4 and IPv6 addresses.</li>
<li>A <a href="http://www.simonecarletti.com/blog/2011/02/new-in-whois-improved-caching/">new caching mechanism</a> reduces the number of instance variables created.</li>
<li>The library now supports the <a href="http://www.simonecarletti.com/blog/2011/02/new-in-whois-gem-testers/">Gem Testers project</a>.</li>
<li>You can now bind a different address or port to the WHOIS socket request.</li>
</ul>
<p>Last but not least, the <code>Whois::Answer</code> class has been renamed to <code>Whois::Record</code>.</p>
<p>There are a couple of backwards-incompatible changes to the API. These changes were necessary to evolve the API to better reflect the representation of the existing WHOIS responses.</p>
<h2>What&#8217;s Next?</h2>
<p>The Whois library is pretty stable. It is now used in production for several big projects.</p>
<p>The API is mature. A few changes have been made in this major release to support additional WHOIS properties, however I don&#8217;t expect big changes in the future.</p>
<p>The following releases will focus on increasing the list of supported properties for each parser, as well closing some of the <a href="https://github.com/weppos/whois/issues">existing issues</a>.</p>
<p>The biggest change in the API in the near future is likely to be the <a href="https://github.com/weppos/whois/issues#issue/2">standardization of the status property</a>.</p>
<p>In the last months I received some great feedback from people using my library with other platforms, such as Java and .NET. This is amazing.</p>
<p>If you have any case study, case history or feedback, please let me know. I would love to learn more about how you use the library.</p>
<h2>How to Upgrade</h2>
<p>To upgrade to Whois 2.0 please follow the instructions in the <a href="http://www.ruby-whois.org/manual/upgrading.html">documentation page</a>.</p>
<p>Related posts<ol>
<li><a href='http://www.simonecarletti.com/blog/2009/12/whois-0-9-0/' rel='bookmark' title='Whois 0.9.0: WHOIS parsers, CLI and performances'>Whois 0.9.0: WHOIS parsers, CLI and performances</a></li>
<li><a href='http://www.simonecarletti.com/blog/2010/01/new-in-whois-principle-of-least-surprise/' rel='bookmark' title='New in Whois: Applying the Principle of Least Surprise'>New in Whois: Applying the Principle of Least Surprise</a></li>
<li><a href='http://www.simonecarletti.com/blog/2010/01/new-in-whois-property-is-set/' rel='bookmark' title='New in Whois: property is set?'>New in Whois: property is set?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.simonecarletti.com/blog/2011/03/whois-2-0/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Introducing Public Suffix Service 0.5.0</title>
		<link>http://www.simonecarletti.com/blog/2010/09/introducing-public-suffix-service-0-5-0/</link>
		<comments>http://www.simonecarletti.com/blog/2010/09/introducing-public-suffix-service-0-5-0/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 19:56:20 +0000</pubDate>
		<dc:creator>Simone Carletti</dc:creator>
				<category><![CDATA[Hosting / Domains]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[public suffix list]]></category>
		<category><![CDATA[public suffix service]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=1198</guid>
		<description><![CDATA[An introduction to Public Suffix Service 0.5.0, the new release of the domain name Ruby parser based on the Public Suffix List.]]></description>
			<content:encoded><![CDATA[<p><a title="Public Suffix Service - Simone Carletti" href="http://www.simonecarletti.com/code/public_suffix_service">Public Suffix Service</a> is a <strong>Ruby domain name parser</strong> based on the <strong>Public Suffix List</strong>, the cross-vendor initiative to provide an accurate list of domain name suffixes.</p>
<p>Parsing a domain name is not as simple as you may suppose and, since <strong>there is no algorithmic method of finding the highest level at which a domain may be registered for a particular top-level domain</strong> (the policies differ with each registry), the only method is to create a list of all top-level domains and the level at which domains can be registered. This is the aim of the effective TLD list.</p>
<p>The Public Suffix Service Ruby library parses domain names using the definitions stored in the Public Suffix List.</p>
<p>This week I released <strong>Public Suffix Service 0.5.0</strong>. I normally don&#8217;t create a post for every minor release of my libraries, but this version is really worth a mention.<span id="more-1198"></span></p>
<p>Compared to the previous version, there are no public API changes. The only, <a href="http://github.com/weppos/public_suffix_service/pull/2">very significant change</a> is an internal refactoring by <a title="camilo's Profile - GitHub" href="http://github.com/camilo">Camilo Lopez</a> to the main definition lookup method which results in <strong>performance improvement by orders of magnitude</strong>.</p>
<p>Here&#8217;s a <a title="gist: 581287 -  GitHub" href="http://gist.github.com/581287">very simple benchmark</a> comparing Public Suffix Service 0.4.0 with 0.5.0.</p>
<div class="codecolorer-container text default code-bash" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ ruby bm_pss_gem.rb 0.4.0<br />
Rehearsal -------------------------------------------------<br />
Version 0.4.0 &nbsp; 5.540000 &nbsp; 0.170000 &nbsp; 5.710000 ( &nbsp;6.682396)<br />
---------------------------------------- total: 5.710000sec<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; user &nbsp; &nbsp; system &nbsp; &nbsp; &nbsp;total &nbsp; &nbsp; &nbsp; &nbsp;real<br />
Version 0.4.0 &nbsp; 5.320000 &nbsp; 0.130000 &nbsp; 5.450000 ( &nbsp;5.614912)<br />
<br />
$ ruby bm_pss_gem.rb 0.5.0<br />
Rehearsal -------------------------------------------------<br />
Version 0.5.0 &nbsp; 0.140000 &nbsp; 0.020000 &nbsp; 0.160000 ( &nbsp;0.155435)<br />
---------------------------------------- total: 0.160000sec<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; user &nbsp; &nbsp; system &nbsp; &nbsp; &nbsp;total &nbsp; &nbsp; &nbsp; &nbsp;real<br />
Version 0.5.0 &nbsp; 0.020000 &nbsp; 0.000000 &nbsp; 0.020000 ( &nbsp;0.019537)</div></td></tr></tbody></table></div>
<p>Yes, there&#8217;s no typo. Thanks to Camilo, the library performed the same execution in <strong>0.01 vs 5.16 seconds</strong>.</p>
<p>Public Suffix Service 0.4.0 uses the standard algorithm, <a href="http://publicsuffix.org/format/">described in the Public Suffix List website</a>, which is known to not be the most efficient. The new 0.5.0 release adds an internal index that dramatically increases definition lookup.</p>
<p>Thank you very much to Camilo Lopez for his high quality contribution. This patch is probably one of the best demonstrations of what can be the benefits of releasing your libraries as an open source projects. <a href="http://www.robodomain.com/">RoboDomain</a> can now take advantage of a much more efficient domain parsing library.</p>
<p>Public Suffix Service 0.5.1, released today, also includes an <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=576508">update to the definition file</a>.</p>
<p>Related posts<ol>
<li><a href='http://www.simonecarletti.com/blog/2010/06/public-suffix-list-library-for-ruby/' rel='bookmark' title='Introducing the Public Suffix List library for Ruby'>Introducing the Public Suffix List library for Ruby</a></li>
<li><a href='http://www.simonecarletti.com/blog/2009/10/updates-to-denic-de-whois-response/' rel='bookmark' title='Updates to Denic.de WHOIS response'>Updates to Denic.de WHOIS response</a></li>
<li><a href='http://www.simonecarletti.com/blog/2007/11/technorati-api/' rel='bookmark' title='Technorati: probably the worst and less reliable API service I have ever developed with!'>Technorati: probably the worst and less reliable API service I have ever developed with!</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.simonecarletti.com/blog/2010/09/introducing-public-suffix-service-0-5-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing the Public Suffix List library for Ruby</title>
		<link>http://www.simonecarletti.com/blog/2010/06/public-suffix-list-library-for-ruby/</link>
		<comments>http://www.simonecarletti.com/blog/2010/06/public-suffix-list-library-for-ruby/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 09:18:33 +0000</pubDate>
		<dc:creator>Simone Carletti</dc:creator>
				<category><![CDATA[Hosting / Domains]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[domains]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[parser]]></category>
		<category><![CDATA[public suffix list]]></category>
		<category><![CDATA[public suffix service]]></category>
		<category><![CDATA[robodomain]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=1066</guid>
		<description><![CDATA[Public Suffix Service is a Ruby domain name parser based on the Public Suffix List.]]></description>
			<content:encoded><![CDATA[<p>Have you ever found yourself looking for a solution to <strong>parse or validate a domain name</strong>? Probably, you spent several hours trying to find the most efficient and comprehensive regular expression, but the more examples you found, the more you realized that the final solution doesn&#8217;t seem to exist.</p>
<p>And you are right. <strong>There is no algorithmic method of finding the highest level at which a domain may be registered for a particular top-level domain</strong> (the policies differ with each registry), the only method is to create a list of all top-level domains and the level at which domains can be registered. This is the aim of the effective TLD list.</p>
<p>Here comes the <a title="The Public Suffix List" href="http://publicsuffix.org">Public Suffix List</a>.<span id="more-1066"></span></p>
<h2>What is the Public Suffix List?</h2>
<p>The Public Suffix List is a cross-vendor initiative to provide an accurate list of domain name suffixes.</p>
<p>The Public Suffix List is an initiative of the Mozilla Project, but is maintained as a community resource. It is available for use in any software, but was originally created to meet the needs of browser manufacturers.</p>
<p>A &#8220;public suffix&#8221; is one under which Internet users can directly register names. Some examples of public suffixes are &#8220;.com&#8221;, &#8220;.co.uk&#8221; and &#8220;pvt.k12.wy.us&#8221;. The Public Suffix List is a list of all known public suffixes.</p>
<h2>Does it work with Ruby?</h2>
<p>Yeah! <a href="http://www.simonecarletti.com/code/public_suffix_service">Public Suffix Service</a> is a Ruby domain name parser based on the Public Suffix List. To use it you don&#8217;t need to download the list or learn how it works. Just install the Gem and you&#8217;re done.</p>
<div class="codecolorer-container text default code-ruby" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ gem install public_suffix_service</div></td></tr></tbody></table></div>
<p>Here&#8217;s a few examples:</p>
<div class="codecolorer-container text default code-ruby" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># parse a very standard domain name<br />
domain = PublicSuffixService.parse(&quot;google.com&quot;)<br />
domain.tld<br />
# =&gt; &quot;com&quot;<br />
domain.domain<br />
# =&gt; &quot;google&quot;<br />
domain.subdomain<br />
# =&gt; nil<br />
<br />
# parse a less standard domain name<br />
domain = PublicSuffixService.parse(&quot;google.co.uk&quot;)<br />
domain.tld<br />
# =&gt; &quot;co.uk&quot;<br />
domain.domain<br />
# =&gt; &quot;google&quot;<br />
domain.subdomain<br />
# =&gt; nil<br />
<br />
# it works with subdomains too<br />
domain = PublicSuffixService.parse(&quot;www.google.co.uk&quot;)<br />
domain.tld<br />
# =&gt; &quot;co.uk&quot;<br />
domain.domain<br />
# =&gt; &quot;google&quot;<br />
domain.subdomain<br />
# =&gt; &quot;www&quot;</div></td></tr></tbody></table></div>
<h3>Domain validation</h3>
<p>The Public Suffix Service library offers a quick way to validate a domain.</p>
<div class="codecolorer-container text default code-ruby" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">PublicSuffixService.valid?(&quot;google.com&quot;)<br />
# =&gt; true<br />
PublicSuffixService.valid?(&quot;www.google.com&quot;)<br />
# =&gt; true</div></td></tr></tbody></table></div>
<p>The main difference compared with the regular expression based solutions is that this library actually validates the domain against a white/black list instead of running a soft check on the TLD size.</p>
<div class="codecolorer-container text default code-ruby" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">PublicSuffixService.valid?(&quot;google.xx&quot;)<br />
# =&gt; false<br />
PublicSuffixService.valid?(&quot;google.zip&quot;)<br />
# =&gt; false</div></td></tr></tbody></table></div>
<h3>Domain transformation</h3>
<p>The <code>PublicSuffixService::Domain</code> class provides a bunch of methods to validate and transform a domain name.</p>
<div class="codecolorer-container text default code-ruby" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">domain = PublicSuffixService.parse(&quot;www.google.com&quot;)<br />
<br />
domain.domain?<br />
# =&gt; true<br />
domain.is_a_domain?<br />
# =&gt; false<br />
domain.is_a_subdomain?<br />
# =&gt; true<br />
domain.subdomain<br />
# =&gt; &quot;www.google.com&quot;<br />
domain.domain<br />
# =&gt; &quot;google.com&quot;</div></td></tr></tbody></table></div>
<h2>Who uses the Public Suffic List?</h2>
<p>The list is used by well known browsers such as Google Chrome, Mozilla Firefox and Opera.</p>
<p>The <a href="http://www.simonecarletti.com/code/public_suffix_service">Public Suffix Service</a> Ruby library was created for <a title="RoboDomain" href="http://www.robodomain.com/">RoboDomain</a> and it has been used in production since November 2009.</p>
<p>Related posts<ol>
<li><a href='http://www.simonecarletti.com/blog/2010/09/introducing-public-suffix-service-0-5-0/' rel='bookmark' title='Introducing Public Suffix Service 0.5.0'>Introducing Public Suffix Service 0.5.0</a></li>
<li><a href='http://www.simonecarletti.com/blog/2009/08/ruby-has-a-new-whois-library/' rel='bookmark' title='Ruby has a new WHOIS library'>Ruby has a new WHOIS library</a></li>
<li><a href='http://www.simonecarletti.com/blog/2009/02/apache-log-regex-a-lightweight-ruby-apache-log-parser/' rel='bookmark' title='Apache Log Regex: a lightweight Ruby Apache log parser'>Apache Log Regex: a lightweight Ruby Apache log parser</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.simonecarletti.com/blog/2010/06/public-suffix-list-library-for-ruby/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Ruby Whois 1.0 is here!</title>
		<link>http://www.simonecarletti.com/blog/2010/02/ruby-whois-1-0-is-here/</link>
		<comments>http://www.simonecarletti.com/blog/2010/02/ruby-whois-1-0-is-here/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 12:54:32 +0000</pubDate>
		<dc:creator>Simone Carletti</dc:creator>
				<category><![CDATA[Hosting / Domains]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rubywhois]]></category>
		<category><![CDATA[whois]]></category>

		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=986</guid>
		<description><![CDATA[Whois 1.0 is now available: Whois is an intelligent pure Ruby WHOIS client and parser.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ruby-whois.org/">Whois</a> is an intelligent <strong>pure Ruby WHOIS client and parser</strong>.</p>
<p>It is a OS-independent library and doesn’t require external C libraries or Gems: it is a 100% Ruby software with all the advantages and disadvantages that it involves. This software was developed to power RoboDomain and it eventually become a standalone library.</p>
<p>Whois provides the following key features:</p>
<ul>
<li>Ability to query registry data for <a href="http://www.ruby-whois.org/manual/usage.html#usage-objects">IPv4, IPv6, TLDs, and domain names</a></li>
<li>Ability to <a href="http://www.ruby-whois.org/manual/parser.html">parse WHOIS responses</a></li>
<li>Flexible and extensible interface (e.g. You can define <a href="http://www.ruby-whois.org/manual/server.html">custom servers</a> on the fly)</li>
<li>Object oriented design, featuring 10 different design patterns</li>
<li>Pure Ruby library, without any external dependency other than Ruby itself</li>
<li>Compatible with <a href="http://www.ruby-whois.org/manual/installation.html#installation-requirements">Ruby 1.8.6 and greater</a>, including Ruby 1.9 branch</li>
<li>Successfully tested against several <a href="http://www.ruby-whois.org/manual/interpreters.html">Ruby implementations</a>, including Ruby, Ruby Enterprise Edition, JRuby, and MacRuby</li>
</ul>
<h2><span id="more-986"></span>Whois 1.0</h2>
<p>Whois 1.0 is the first major release since <a title="Ruby has a new WHOIS library  –  Simone Carletti's Blog" href="http://www.simonecarletti.com/blog/2009/08/ruby-has-a-new-whois-library/">I started working on the library one year ago</a>. It reached an high level of maturity and stability and you can safely consider it production ready.</p>
<p><a href="http://github.com/weppos/whois/compare/release-0.9.0...release-1.0.0">Compared with previous version</a>, Whois 1.0 includes a really huge CHANGELOG (more than 100 lines!). The most important features are:</p>
<ul>
<li>Updates to existing definitions</li>
<li>48 New WHOIS Parsers</li>
<li>Ability to check <a title="New in Whois: property is set?  –  Simone Carletti's Blog" href="http://www.simonecarletti.com/blog/2010/01/new-in-whois-property-is-set/">whether a property is set</a></li>
<li><a title="New in Whois: command line improvements  –  Simone Carletti's Blog" href="http://www.simonecarletti.com/blog/2010/02/new-in-whois-command-line-improvements/">Command Line Improvements</a></li>
<li><a title="New in Whois: Applying the Principle of Least Surprise  –  Simone Carletti's Blog" href="http://www.simonecarletti.com/blog/2010/01/new-in-whois-principle-of-least-surprise/">Changes to the internal Answer/Parser architecture</a> to improve usability</li>
</ul>
<p>Last but not least, <a title="Ruby Whois moved to ruby-whois.org  –  Simone Carletti's Blog" href="http://www.simonecarletti.com/blog/2010/02/ruby-whois-moved-to-ruby-whois-org/">a dedicated site</a> is now available at <a title="Ruby Whois - Ruby Whois Gem" href="http://www.ruby-whois.org/">ruby-whois.org</a>.</p>
<h2>A Retrospective</h2>
<p>Whois 1.0 is a really important milestone. The <a title="Ruby has a new WHOIS library  –  Simone Carletti's Blog" href="http://www.simonecarletti.com/blog/2009/08/ruby-has-a-new-whois-library/">first Whois release</a> was just another WHOIS library. Yes, it offered support for all existing TLDs, but that was just the beginning. My idea was to creare a library to be able to parse and access all WHOIS responses with a single, standardized, object oriented API.</p>
<p>The current Whois library perfectly fit this milestone. Unfortunately, there&#8217;s still a big number of unsupported server, but I&#8217;m working really hard to reduce the gap. Also, in the last months a small number of users contributed back with servers, patches, changes and I&#8217;m really grateful to them.</p>
<p>If you look at the CHANGELOG, Whois has improved day after day.</p>
<h2>The Client side</h2>
<p>Whois 1.0 is a pure Ruby WHOIS client. It means you can install and use it on any platform where Ruby is supported, including (but not limited to) Microsoft Windows, Linux, MacOSX and Solaris.</p>
<p>This is one of the most important feature, compared with other WHOIS libraries. Whois is shipped with a Command Line Interface you can use to lookup a domain.</p>
<div class="codecolorer-container text default code-bash" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ ruby-whois google.com</div></td></tr></tbody></table></div>
<p>And this works on Windows too!</p>
<p>Whois is an intelligent Whois client. It means, you don&#8217;t need to know anything about WHOIS, Dns or TLD. Simply feed the client with the domain you want to lookup, and wait for the response.</p>
<div class="codecolorer-container text default code-ruby" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">require 'rubygems'<br />
require 'whois'<br />
<br />
a = Whois.query &quot;google.com&quot;<br />
puts a</div></td></tr></tbody></table></div>
<p>Whois will automatically choose the best WHOIS server according to the given query. If the query is a domain, Whois will try to find a server for the corresponding TLD. If the query is an IPv4 or IPv6, Whois will send the request to the corresponding management authority.</p>
<p>TLD and IP definitions are included in the package and read when the library is loaded. You can always update/change them at runtime.</p>
<h2>The Parser side</h2>
<p>Until now, Whois just seems to be an other powerful-but-standard WHOIS client. But this is not true.</p>
<p>The biggest difference between Whois and other WHOIS libraries, is that Whois can parse and decompose a raw WHOIS response into a powerful Ruby object.<br />
This means, you can access WHOIS property calling a simple method rather than dealing with complex regular expressions in order to extract the data you need.</p>
<div class="codecolorer-container text default code-ruby" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">require 'rubygems'<br />
require 'whois'<br />
<br />
a = Whois.query &quot;google.it&quot;<br />
puts a.available?<br />
# =&gt; false<br />
<br />
a.nameservers.each do |nameserver|<br />
&nbsp; puts nameserver<br />
end<br />
# =&gt; ns1.google.com<br />
# =&gt; ns4.google.com<br />
# =&gt; ns2.google.com<br />
# =&gt; ns3.google.com<br />
<br />
puts a.created_on<br />
# =&gt; Fri Dec 10 00:00:00 +0100 1999<br />
puts a.expires_on<br />
# =&gt; Sat Nov 27 00:00:00 +0100 2010</div></td></tr></tbody></table></div>
<p>You can read more at <a title="Ruby Whois - Ruby Whois Gem" href="http://www.ruby-whois.org/">ruby-whois.org</a>.</p>
<h2>RoboDomain</h2>
<p>Whois library has been creates to power RoboDomain project. With Robodomain you can <strong>keep track of any domain in one single place</strong>: log transactions, store notes, check domain status and enjoy our network tools.</p>
<p>Be sure to signup for an <a title="RoboDomain" href="http://www.robodomain.com/">invitation code</a> if you want to join the beta program.</p>
<h2>Contribute</h2>
<p>Whois is an <a title="weppos's whois at master - GitHub" href="http://github.com/weppos/whois">open source project</a> and released under the terms of the MIT license.</p>
<p>You can contribute <a title="Issues - weppos/whois - GitHub" href="http://github.com/weppos/whois/issues">by suggesting new features and reporting bugs</a> or you can fork away the project and submit your changes.</p>
<p>Do you have a question? Need an help with the library? <a title="Ruby Whois |   Google Groups" href="http://groups.google.com/group/ruby-whois">Join the discussion group</a>.</p>
<p>Enjoy Ruby Whois 1.0.</p>
<div class="codecolorer-container text default code-bash" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ gem install whois</div></td></tr></tbody></table></div>
<p>Related posts<ol>
<li><a href='http://www.simonecarletti.com/blog/2009/09/ruby-whois-preview-answer-and-parser/' rel='bookmark' title='Ruby Whois preview: WHOIS answer and parser'>Ruby Whois preview: WHOIS answer and parser</a></li>
<li><a href='http://www.simonecarletti.com/blog/2009/12/whois-0-9-0/' rel='bookmark' title='Whois 0.9.0: WHOIS parsers, CLI and performances'>Whois 0.9.0: WHOIS parsers, CLI and performances</a></li>
<li><a href='http://www.simonecarletti.com/blog/2009/09/ruby-whois-0-8-0/' rel='bookmark' title='Ruby Whois 0.8.0'>Ruby Whois 0.8.0</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.simonecarletti.com/blog/2010/02/ruby-whois-1-0-is-here/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>New in Whois: command line improvements</title>
		<link>http://www.simonecarletti.com/blog/2010/02/new-in-whois-command-line-improvements/</link>
		<comments>http://www.simonecarletti.com/blog/2010/02/new-in-whois-command-line-improvements/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 20:18:26 +0000</pubDate>
		<dc:creator>Simone Carletti</dc:creator>
				<category><![CDATA[Hosting / Domains]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rubywhois]]></category>
		<category><![CDATA[whois]]></category>

		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=950</guid>
		<description><![CDATA[The new Whois version comes with an improved CLI with better error handling.]]></description>
			<content:encoded><![CDATA[<p>Whois 0.8.0 was released with a <a href="http://www.simonecarletti.com/blog/2009/12/whois-0-9-0/">new command line tool</a> to perform one-line WHOIS queries.</p>
<div class="codecolorer-container text default code-bash" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ ruby-whois google.com</div></td></tr></tbody></table></div>
<p>WHOIS requests can fail and, unfortunately, the existing version of the CLI doesn&#8217;t handle this case very well. When an exception is raised, the CLI exits printing an unfriendly Ruby stack trace.<span id="more-950"></span></p>
<div class="codecolorer-container text default code-bash" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ ruby-whois karnaugh.za.net<br />
/Users/weppos/.rvm/ruby-1.8.7-p174/lib/ruby/1.8/timeout.rb:60:in `ask_the_socket': execution expired (Timeout::Error)<br />
&nbsp; &nbsp; from /Users/weppos/.rvm/gems/ruby/1.8.7/gems/whois-0.8.1/lib/whois/server/adapters/base.rb:77:in `query_the_socket'<br />
&nbsp; &nbsp; from /Users/weppos/.rvm/gems/ruby/1.8.7/gems/whois-0.8.1/lib/whois/server/adapters/standard.rb:34:in `request'<br />
&nbsp; &nbsp; from /Users/weppos/.rvm/gems/ruby/1.8.7/gems/whois-0.8.1/lib/whois/server/adapters/base.rb:52:in `query'<br />
&nbsp; &nbsp; from /Users/weppos/.rvm/gems/ruby/1.8.7/gems/whois-0.8.1/lib/whois/server/adapters/base.rb:66:in `with_buffer'<br />
&nbsp; &nbsp; from /Users/weppos/.rvm/gems/ruby/1.8.7/gems/whois-0.8.1/lib/whois/server/adapters/base.rb:51:in `query'<br />
&nbsp; &nbsp; from /Users/weppos/.rvm/gems/ruby/1.8.7/gems/whois-0.8.1/lib/whois/client.rb:72:in `query'<br />
&nbsp; &nbsp; from /Users/weppos/.rvm/gems/ruby/1.8.7/gems/whois-0.8.1/lib/whois/client.rb:70:in `query'<br />
&nbsp; &nbsp; from /Users/weppos/.rvm/gems/ruby/1.8.7/gems/whois-0.8.1/bin/ruby-whois:37<br />
&nbsp; &nbsp; from /Users/weppos/.rvm/gems/ruby/1.8.7/bin/ruby-whois:19:in `load'<br />
&nbsp; &nbsp; from /Users/weppos/.rvm/gems/ruby/1.8.7/bin/ruby-whois:19</div></td></tr></tbody></table></div>
<p>I&#8217;m happy to say that now his is just a bad memory. In case of error, the new CLI writes the error message to <code>STDERR</code> then terminates the execution and sets the <a href="http://www.faqs.org/docs/abs/HTML/exit-status.html">exit status</a> to <code>1</code>.</p>
<div class="codecolorer-container text default code-bash" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ ruby-whois karnaugh.za.net<br />
Request Timeout<br />
<br />
$ ruby-whois google.es<br />
This TLD has no whois server, but you can access the whois database at `https://www.nic.es/'</div></td></tr></tbody></table></div>
<p>Related posts<ol>
<li><a href='http://www.simonecarletti.com/blog/2009/08/ruby-has-a-new-whois-library/' rel='bookmark' title='Ruby has a new WHOIS library'>Ruby has a new WHOIS library</a></li>
<li><a href='http://www.simonecarletti.com/blog/2009/09/ruby-whois-preview-answer-and-parser/' rel='bookmark' title='Ruby Whois preview: WHOIS answer and parser'>Ruby Whois preview: WHOIS answer and parser</a></li>
<li><a href='http://www.simonecarletti.com/blog/2009/12/whois-0-9-0/' rel='bookmark' title='Whois 0.9.0: WHOIS parsers, CLI and performances'>Whois 0.9.0: WHOIS parsers, CLI and performances</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.simonecarletti.com/blog/2010/02/new-in-whois-command-line-improvements/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ruby Whois moved to ruby-whois.org</title>
		<link>http://www.simonecarletti.com/blog/2010/02/ruby-whois-moved-to-ruby-whois-org/</link>
		<comments>http://www.simonecarletti.com/blog/2010/02/ruby-whois-moved-to-ruby-whois-org/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 19:08:44 +0000</pubDate>
		<dc:creator>Simone Carletti</dc:creator>
				<category><![CDATA[Hosting / Domains]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rubywhois]]></category>
		<category><![CDATA[whois]]></category>

		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=974</guid>
		<description><![CDATA[The Whois 1.0 release is just around the corner and to celebrate the first major release the library is changing home from my Codestuff site to www.ruby-whois.org.]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.simonecarletti.com/blog/tags/rubywhois/">Whois 1.0 release</a> is just around the corner and to celebrate the first major release the library is changing home from <a href="http://code.simonecarletti.com/">my Codestuff site</a> to <a href="http://www.ruby-whois.org">ruby-whois.org</a>.</p>
<p>The repository is still hosted on GitHub and in the next days I&#8217;ll probably migrate the issue management as well.</p>
<p>The design of the new Whois website is clearly influenced by this website and <a href="http://tomayko.com/src/rack-cache/">Rack::Cache</a>. All HTML files are automatically generated using <a href="http://github.com/mojombo/jekyll">Jekyll</a>. The new site contains all the existing documentation published on the legacy wiki, reorganized and updated. As soon as Whois 1.0 will be available, I promise to spend some time writing more details about the advanced features such as creating WHOIS parsers and using the answer object.</p>
<p>Related posts<ol>
<li><a href='http://www.simonecarletti.com/blog/2009/08/ruby-has-a-new-whois-library/' rel='bookmark' title='Ruby has a new WHOIS library'>Ruby has a new WHOIS library</a></li>
<li><a href='http://www.simonecarletti.com/blog/2009/09/ruby-whois-preview-answer-and-parser/' rel='bookmark' title='Ruby Whois preview: WHOIS answer and parser'>Ruby Whois preview: WHOIS answer and parser</a></li>
<li><a href='http://www.simonecarletti.com/blog/2010/02/ruby-whois-1-0-is-here/' rel='bookmark' title='Ruby Whois 1.0 is here!'>Ruby Whois 1.0 is here!</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.simonecarletti.com/blog/2010/02/ruby-whois-moved-to-ruby-whois-org/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New in Whois: property is set?</title>
		<link>http://www.simonecarletti.com/blog/2010/01/new-in-whois-property-is-set/</link>
		<comments>http://www.simonecarletti.com/blog/2010/01/new-in-whois-property-is-set/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 22:46:21 +0000</pubDate>
		<dc:creator>Simone Carletti</dc:creator>
				<category><![CDATA[Hosting / Domains]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rubywhois]]></category>
		<category><![CDATA[whois]]></category>

		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=937</guid>
		<description><![CDATA[The new Ruby Whois version will offer the ability to check whether a property is set using the standard method? Ruby convention.]]></description>
			<content:encoded><![CDATA[<p>The new <a href="http://code.simonecarletti.com/whois">Ruby Whois</a> version <a href="http://github.com/weppos/whois/commit/9f5132c2a70b1736799b2bb79b3c6b3f3c778c61">will offer</a> the ability to check whether a property is set using the standard <code>method?</code> Ruby convention. This means, you no longer need to check whether a property is supported, get the property value and compare it to <code>nil</code>.</p>
<div class="codecolorer-container text default code-ruby" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">a = Whois.query &quot;google.it&quot;<br />
a.created_on?<br />
# =&gt; true<br />
<br />
a = Whois.query &quot;notregistered.it&quot;<br />
a.created_on?<br />
# =&gt; false</div></td></tr></tbody></table></div>
<p><span id="more-937"></span>Two important aspects to keep in mind. First, this method works only at answer level.</p>
<div class="codecolorer-container text default code-ruby" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">a = Whois.query &quot;google.it&quot;<br />
a.created_on?<br />
# =&gt; true<br />
a.parser.created_on?<br />
# =&gt; NoMethodError</div></td></tr></tbody></table></div>
<p>Second, this method doesn&#8217;t care whether the property is supported or not. It returns <code>false</code> either if the property is not supported or the value is <code>nil</code>.</p>
<div class="codecolorer-container text default code-ruby" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">a = Whois.query &quot;notregistered.it&quot;<br />
<br />
# created_on is a property supported<br />
# by .it TLD parser and empty for this<br />
# specific query<br />
a.created_on?<br />
# =&gt; false<br />
<br />
# domain_is is not a property supported<br />
# by .it TLD parser<br />
a.domain_id?<br />
# =&gt; false</div></td></tr></tbody></table></div>
<p>Related posts<ol>
<li><a href='http://www.simonecarletti.com/blog/2010/01/new-in-whois-principle-of-least-surprise/' rel='bookmark' title='New in Whois: Applying the Principle of Least Surprise'>New in Whois: Applying the Principle of Least Surprise</a></li>
<li><a href='http://www.simonecarletti.com/blog/2009/10/ruby-whois-0-8-1/' rel='bookmark' title='Ruby Whois 0.8.1'>Ruby Whois 0.8.1</a></li>
<li><a href='http://www.simonecarletti.com/blog/2011/02/new-in-whois-improved-caching/' rel='bookmark' title='New in Whois: improved caching'>New in Whois: improved caching</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.simonecarletti.com/blog/2010/01/new-in-whois-property-is-set/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ruby Net::DNS 0.6.1 released</title>
		<link>http://www.simonecarletti.com/blog/2010/01/ruby-netdns-0-6-1-released/</link>
		<comments>http://www.simonecarletti.com/blog/2010/01/ruby-netdns-0-6-1-released/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 19:29:43 +0000</pubDate>
		<dc:creator>Simone Carletti</dc:creator>
				<category><![CDATA[Hosting / Domains]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Server / Apache]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[net-dns]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=955</guid>
		<description><![CDATA[Relesed Net::DNS 0.6.1, the first maintenance release for the Net::DNS 0.6.x series.]]></description>
			<content:encoded><![CDATA[<p><code>Net::DNS 0.6.1</code> is the first maintenance release for the <a href="http://www.simonecarletti.com/blog/2009/11/ruby-netdns-0-6-0/"><code>Net::DNS</code> 0.6.x series</a>.</p>
<p>It doesn&#8217;t provide any new feature, just delicious bug fixes including a major issue with Reverse DNS (<a href="http://github.com/bluemonk/net-dns/issues/issue/6">#6</a>) and <code>IPAddr</code> handling (<a href="http://github.com/bluemonk/net-dns/issues/issue/5">#5</a>). We also improved the test suite to ensure those bugs won&#8217;t show up in the future.<span id="more-955"></span></p>
<p>We are already working on the Net::DNS 0.7.x family. The new minor version will include some major internal refactoring to <a href="http://www.simonecarletti.com/blog/2010/01/how-slow-are-ruby-exceptions/">improve performance</a> and reliability. There are also some <a href="http://github.com/bluemonk/net-dns/issues/issue/9">open</a> <a href="http://github.com/bluemonk/net-dns/issues/issue/7">tickets</a> we would like to address.</p>
<p>As usual, upgrade/install with</p>
<div class="codecolorer-container text default code-bash" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ gem install net-dns</div></td></tr></tbody></table></div>
<p>Related posts<ol>
<li><a href='http://www.simonecarletti.com/blog/2009/11/ruby-netdns-0-6-0/' rel='bookmark' title='Ruby Net::DNS 0.6.0'>Ruby Net::DNS 0.6.0</a></li>
<li><a href='http://www.simonecarletti.com/blog/2011/03/whois-2-0/' rel='bookmark' title='Whois 2.0'>Whois 2.0</a></li>
<li><a href='http://www.simonecarletti.com/blog/2010/02/ruby-whois-moved-to-ruby-whois-org/' rel='bookmark' title='Ruby Whois moved to ruby-whois.org'>Ruby Whois moved to ruby-whois.org</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.simonecarletti.com/blog/2010/01/ruby-netdns-0-6-1-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New in Whois: Applying the Principle of Least Surprise</title>
		<link>http://www.simonecarletti.com/blog/2010/01/new-in-whois-principle-of-least-surprise/</link>
		<comments>http://www.simonecarletti.com/blog/2010/01/new-in-whois-principle-of-least-surprise/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 12:28:01 +0000</pubDate>
		<dc:creator>Simone Carletti</dc:creator>
				<category><![CDATA[Hosting / Domains]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rubywhois]]></category>
		<category><![CDATA[whois]]></category>

		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=939</guid>
		<description><![CDATA[Changes to the Whois::Answer object API.]]></description>
			<content:encoded><![CDATA[<p>In the past weeks I&#8217;ve been working to improve the <a href="http://code.simonecarletti.com/whois">Ruby Whois Gem</a>. While most of the effort is actually focused on creating new WHOIS parsers for the existing registries which are more than 400, I also took the time to add some new features.</p>
<p>One important change is strictly focused on applying the <a href="http://en.wikipedia.org/wiki/Ruby_%28programming_language%29#Philosophy">principle of least surprise</a> in the <code>Whois::Answer</code> design. Prior the changes, calling a method on a <code>Whois::Answer</code> instance to read a property value might result in 3 different behaviors:</p>
<div class="codecolorer-container text default code-ruby" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># the property is supported, return the value<br />
a = Whois.query &quot;google.it&quot;<br />
a.created_on?<br />
# =&gt; Fri Dec 10 00:00:00 +0100 1999<br />
<br />
# the property is supported but blank, return the value<br />
a = Whois.query &quot;notregistered.it&quot;<br />
a.created_on?<br />
# =&gt; nil<br />
<br />
# the property is not supported, raise an exception<br />
a = Whois.query &quot;google.it&quot;<br />
a.domain_id?<br />
# =&gt; PropertyNotSupported</div></td></tr></tbody></table></div>
<p><span id="more-939"></span>Whether the parser supports a property depends on the WHOIS record. For instance, a <code>.name</code> WHOIS response doesn&#8217;t contain the domain expiration thus the property <code>expires_on</code> is not supported. Contrariwise, the <code>.it</code> WHOIS response contains that value thus you can safely call <code>expires_on</code> to get the property value.</p>
<p>How do you deal with supported/unsupported properties? With the old Whois version you would have to check whether a property is supported before actually calling the getter method.</p>
<div class="codecolorer-container text default code-ruby" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># the property is supported, return the value<br />
a = Whois.query &quot;google.it&quot;<br />
if a.property_supported?(:domain_id)<br />
&nbsp; a.domain_id<br />
end</div></td></tr></tbody></table></div>
<p>That worked well but was&#8230; horrible. <a href="http://blog.stackoverflow.com/2010/01/eating-our-own-careers-dogfood/">Dogfooding</a> the library working on <a href="http://www.robodomain.com/">RoboDomain</a> I ended up with the conclusion this wasn&#8217;t the behavior an user would expect. For this reason, the new Whois version returns the value if the property is supported, <code>nil</code> otherwise regardless property status.</p>
<p><a href="http://github.com/weppos/whois/commit/d0ed5877d05cd9ccd288fbac52fd80ba65b943db">This change</a> only affects the answer object. If for some reason you need to know whether a property is supported, you can always use the <code>property_supported?</code> method or access the underlying parser implementation.</p>
<div class="codecolorer-container text default code-ruby" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">a = Whois.query &quot;google.it&quot;<br />
<br />
a.domain_id<br />
# =&gt; nil<br />
<br />
a.supported?(:domain_id)<br />
# =&gt; false<br />
<br />
a.parser.domain_id<br />
# =&gt; PropertyNotSupported</div></td></tr></tbody></table></div>
<p>Related posts<ol>
<li><a href='http://www.simonecarletti.com/blog/2010/01/new-in-whois-property-is-set/' rel='bookmark' title='New in Whois: property is set?'>New in Whois: property is set?</a></li>
<li><a href='http://www.simonecarletti.com/blog/2009/10/ruby-whois-0-8-1/' rel='bookmark' title='Ruby Whois 0.8.1'>Ruby Whois 0.8.1</a></li>
<li><a href='http://www.simonecarletti.com/blog/2009/09/ruby-whois-0-8-0/' rel='bookmark' title='Ruby Whois 0.8.0'>Ruby Whois 0.8.0</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.simonecarletti.com/blog/2010/01/new-in-whois-principle-of-least-surprise/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

