Permalink
Browse files

Fixed whois.educause.edu parser crash when the updated_on property is…

… `unknown'.
  • Loading branch information...
1 parent d1b8b99 commit a5145c0870b434d54c2a873dbd086af2acf00e67 @weppos committed Aug 16, 2011
View
@@ -9,6 +9,8 @@
* FIXED: whois.markmonitor.com parser crashes when the contacts are empty.
+* FIXED: whois.educause.edu parser crashes when the updated_on property is `unknown'.
+
== Release 2.0.6
@@ -52,7 +52,7 @@ class WhoisEducauseEdu < Base
property_supported :updated_on do
if content_for_scanner =~ /Domain record last updated:\s+(.+?)\n/
- Time.parse($1)
+ Time.parse($1) unless $1 == "unknown"
end
end
@@ -0,0 +1,2 @@
+#updated_on
+ should: %s == nil
@@ -0,0 +1,64 @@
+
+This Registry database contains ONLY .EDU domains.
+The data in the EDUCAUSE Whois database is provided
+by EDUCAUSE for information purposes in order to
+assist in the process of obtaining information about
+or related to .edu domain registration records.
+
+The EDUCAUSE Whois database is authoritative for the
+.EDU domain.
+
+A Web interface for the .EDU EDUCAUSE Whois Server is
+available at: http://whois.educause.net
+
+By submitting a Whois query, you agree that this information
+will not be used to allow, enable, or otherwise support
+the transmission of unsolicited commercial advertising or
+solicitations via e-mail. The use of electronic processes to
+harvest information from this server is generally prohibited
+except as reasonably necessary to register or modify .edu
+domain names.
+
+You may use "%" as a wildcard in your search. For further
+information regarding the use of this WHOIS server, please
+type: help
+
+--------------------------
+
+Domain Name: PCIHEALTH.EDU
+
+Registrant:
+ PCI Health Training Center
+ 8101 John Carpenter Freeway
+ Dallas, TX 75247-4720
+ UNITED STATES
+
+Administrative Contact:
+ Kelly Drake
+ admissions
+ PCI Health Training Center
+ 8101 John Carpenter Freeway
+ Dallas, TX 75247-4720
+ UNITED STATES
+ (214) 630-0568
+ kdrake@pcihealth.net
+
+Technical Contact:
+ daniel Roy
+ InfoTech Services
+ PCI Health Training Center
+ 8101 John Carpenter Freeway
+ Dallas, TX 75247-4720
+ UNITED STATES
+ (214) 215-1764
+ dan@nativetechnology.net
+
+Name Servers:
+ NS1.MAXIMUMASP.COM
+ NS2.MAXIMUMASP.COM
+
+Domain record activated: 12-Mar-2004
+Domain record last updated: unknown
+Domain expires: 31-Jul-2012
+
+
@@ -0,0 +1,29 @@
+# encoding: utf-8
+
+# This file is autogenerated. Do not edit it manually.
+# If you want change the content of this file, edit
+#
+# /spec/fixtures/responses/whois.educause.edu/properties_updated_on_unknown.expected
+#
+# and regenerate the tests with the following rake task
+#
+# $ rake genspec:parsers
+#
+
+require 'spec_helper'
+require 'whois/record/parser/whois.educause.edu.rb'
+
+describe Whois::Record::Parser::WhoisEducauseEdu, "properties_updated_on_unknown.expected" do
+
+ before(:each) do
+ file = fixture("responses", "whois.educause.edu/properties_updated_on_unknown.txt")
+ part = Whois::Record::Part.new(:body => File.read(file))
+ @parser = klass.new(part)
+ end
+
+ describe "#updated_on" do
+ it do
+ @parser.updated_on.should == nil
+ end
+ end
+end

0 comments on commit a5145c0

Please sign in to comment.