whois 2.0.6 → 2.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. data/CHANGELOG.rdoc +12 -1
  2. data/lib/whois/record/parser/whois.dns.pt.rb +2 -2
  3. data/lib/whois/record/parser/whois.educause.edu.rb +1 -1
  4. data/lib/whois/record/parser/whois.markmonitor.com.rb +7 -4
  5. data/lib/whois/record/parser/whois.sgnic.sg.rb +13 -2
  6. data/lib/whois/version.rb +1 -1
  7. data/spec/fixtures/responses/whois.dns.pt/property_nameservers.expected +11 -0
  8. data/spec/fixtures/responses/whois.dns.pt/property_nameservers.txt +25 -0
  9. data/spec/fixtures/responses/whois.dns.pt/property_nameservers_without_host.expected +11 -0
  10. data/spec/fixtures/responses/whois.dns.pt/property_nameservers_without_host.txt +32 -0
  11. data/spec/fixtures/responses/whois.dns.pt/status_registered.expected +4 -4
  12. data/spec/fixtures/responses/whois.dns.pt/status_registered.txt +25 -32
  13. data/spec/fixtures/responses/whois.educause.edu/properties_updated_on_unknown.expected +2 -0
  14. data/spec/fixtures/responses/whois.educause.edu/properties_updated_on_unknown.txt +64 -0
  15. data/spec/fixtures/responses/whois.markmonitor.com/properties_empty_contacts.expected +17 -0
  16. data/spec/fixtures/responses/whois.markmonitor.com/properties_empty_contacts.txt +65 -0
  17. data/spec/fixtures/responses/whois.sgnic.sg/property_nameservers_schema_1.expected +11 -0
  18. data/spec/fixtures/responses/whois.sgnic.sg/property_nameservers_schema_1.txt +98 -0
  19. data/spec/fixtures/responses/whois.sgnic.sg/property_nameservers_schema_2.expected +11 -0
  20. data/spec/fixtures/responses/whois.sgnic.sg/property_nameservers_schema_2.txt +94 -0
  21. data/spec/fixtures/responses/whois.sgnic.sg/status_registered.expected +1 -1
  22. data/spec/fixtures/responses/whois.sgnic.sg/status_registered.txt +15 -19
  23. data/spec/whois/record/parser/responses/whois.dns.pt/property_nameservers_spec.rb +38 -0
  24. data/spec/whois/record/parser/responses/whois.dns.pt/property_nameservers_without_host_spec.rb +38 -0
  25. data/spec/whois/record/parser/responses/whois.dns.pt/status_registered_spec.rb +4 -4
  26. data/spec/whois/record/parser/responses/whois.educause.edu/properties_updated_on_unknown_spec.rb +29 -0
  27. data/spec/whois/record/parser/responses/whois.markmonitor.com/properties_empty_contacts_spec.rb +50 -0
  28. data/spec/whois/record/parser/responses/whois.sgnic.sg/property_nameservers_schema_1_spec.rb +38 -0
  29. data/spec/whois/record/parser/responses/whois.sgnic.sg/property_nameservers_schema_2_spec.rb +38 -0
  30. data/spec/whois/record/parser/responses/whois.sgnic.sg/status_registered_spec.rb +1 -1
  31. data/whois.gemspec +4 -4
  32. metadata +70 -57
data/CHANGELOG.rdoc CHANGED
@@ -1,9 +1,20 @@
1
1
  = Changelog
2
2
 
3
3
 
4
+ == Release 2.0.7
5
+
6
+ * CHANGED: whois.dns.pt changed nameservers response format.
7
+
8
+ * CHANGED: whois.sgnic.sg changed nameservers response format.
9
+
10
+ * FIXED: whois.markmonitor.com parser crashes when the contacts are empty.
11
+
12
+ * FIXED: whois.educause.edu parser crashes when the updated_on property is `unknown'.
13
+
14
+
4
15
  == Release 2.0.6
5
16
 
6
- * CHANGED: whois.gg has changed response format.
17
+ * CHANGED: whois.gg changed response format.
7
18
 
8
19
  * FIXED: whois.pnina.ps parser do not support `Active' status variants.
9
20
 
@@ -61,8 +61,8 @@ module Whois
61
61
 
62
62
 
63
63
  property_supported :nameservers do
64
- content_for_scanner.scan(/Nameserver:\s+(.+)\n/).flatten.map do |name|
65
- Record::Nameserver.new(name.chomp("."))
64
+ content_for_scanner.scan(/Nameserver:\s(?:.+\t)?(.+?)\.\n/).flatten.map do |name|
65
+ Record::Nameserver.new(name)
66
66
  end
67
67
  end
68
68
 
@@ -52,7 +52,7 @@ module Whois
52
52
 
53
53
  property_supported :updated_on do
54
54
  if content_for_scanner =~ /Domain record last updated:\s+(.+?)\n/
55
- Time.parse($1)
55
+ Time.parse($1) unless $1 == "unknown"
56
56
  end
57
57
  end
58
58
 
@@ -61,8 +61,8 @@ module Whois
61
61
 
62
62
  property_supported :registrar do
63
63
  Record::Registrar.new(
64
- :name => content_for_scanner[/Registrar Name: (.+)\n/, 1],
65
- :url => content_for_scanner[/Registrar Homepage: (.+)\n/, 1]
64
+ :name => content_for_scanner.slice(/Registrar Name: (.+)\n/, 1),
65
+ :url => content_for_scanner.slice(/Registrar Homepage: (.+)\n/, 1)
66
66
  )
67
67
  end
68
68
 
@@ -81,7 +81,7 @@ module Whois
81
81
 
82
82
 
83
83
  property_supported :nameservers do
84
- content_for_scanner[/Domain servers in listed order:\n\n((?:\s*[^\s\n]+\n)+)/, 1].split("\n").map do |line|
84
+ content_for_scanner.slice(/Domain servers in listed order:\n\n((?:\s*[^\s\n]+\n)+)/, 1).split("\n").map do |line|
85
85
  Record::Nameserver.new(line.strip)
86
86
  end
87
87
  end
@@ -90,7 +90,10 @@ module Whois
90
90
  private
91
91
 
92
92
  def contact(element, type)
93
- info = content_for_scanner[/#{element}\n((.+\n){6})/, 1].split("\n").map(&:strip)
93
+ match = content_for_scanner.slice(/#{element}\n((.+\n){6})/, 1)
94
+ return unless match
95
+
96
+ info = match.split("\n").map(&:strip)
94
97
  # 0 DNS Admin
95
98
  # 1 Google Inc.
96
99
  # 2 1600 Amphitheatre Parkway
@@ -57,8 +57,19 @@ module Whois
57
57
 
58
58
  property_supported :nameservers do
59
59
  if content_for_scanner =~ /Name Servers:\n((.+\n)+)\n/
60
- $1.split("\n").map do |name|
61
- Record::Nameserver.new(name.strip.downcase)
60
+ values = case value = $1.downcase
61
+ # schema-1
62
+ when /^(?:\s+([\w.-]+)\n){2,}/
63
+ value.split("\n").map(&:strip)
64
+ # schema-2
65
+ when /^(?:\s+([\w.-]+)){2,}/
66
+ value.strip.split(/\s+/)
67
+ else
68
+ Whois.bug!("Unknown nameservers format `#{value}'")
69
+ end
70
+
71
+ values.map do |name|
72
+ Record::Nameserver.new(name)
62
73
  end
63
74
  end
64
75
  end
data/lib/whois/version.rb CHANGED
@@ -13,7 +13,7 @@ module Whois
13
13
  module Version
14
14
  MAJOR = 2
15
15
  MINOR = 0
16
- PATCH = 6
16
+ PATCH = 7
17
17
  BUILD = nil
18
18
 
19
19
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join(".")
@@ -0,0 +1,11 @@
1
+ #nameservers
2
+ should: %s be_a(Array)
3
+ should: %s have(4).items
4
+ should: %s[0] be_a(_nameserver)
5
+ should: %s[0].name == "ns4.google.com"
6
+ should: %s[1] be_a(_nameserver)
7
+ should: %s[1].name == "ns2.google.com"
8
+ should: %s[2] be_a(_nameserver)
9
+ should: %s[2].name == "ns1.google.com"
10
+ should: %s[3] be_a(_nameserver)
11
+ should: %s[3].name == "ns3.google.com"
@@ -0,0 +1,25 @@
1
+ Nome de domínio / Domain Name: google.pt
2
+ Data de registo / Creation Date (dd/mm/yyyy): 09/01/2003
3
+ Data de expiração / Expiration Date (dd/mm/yyyy): 29/02/2012
4
+ Estado / Status: ACTIVE
5
+
6
+ Titular / Registrant
7
+ Google, Inc.
8
+ 1600 Amphitheatre Parkway
9
+ Mountain View, CA
10
+ 94043 null
11
+ Email: dns-admin@google.com
12
+
13
+ Entidade Gestora / Billing Contact
14
+ Markmonitor - CCOPS
15
+ Email: ccops@markmonitor.com
16
+
17
+ Responsável Técnico / Tech Contact
18
+ Markmonitor - CCOPS
19
+ Email: ccops@markmonitor.com
20
+
21
+ Nameserver Information
22
+ Nameserver: google.pt NS ns4.google.com.
23
+ Nameserver: google.pt NS ns2.google.com.
24
+ Nameserver: google.pt NS ns1.google.com.
25
+ Nameserver: google.pt NS ns3.google.com.
@@ -0,0 +1,11 @@
1
+ #nameservers
2
+ should: %s be_a(Array)
3
+ should: %s have(4).items
4
+ should: %s[0] be_a(_nameserver)
5
+ should: %s[0].name == "ns2.google.com"
6
+ should: %s[1] be_a(_nameserver)
7
+ should: %s[1].name == "ns4.google.com"
8
+ should: %s[2] be_a(_nameserver)
9
+ should: %s[2].name == "ns3.google.com"
10
+ should: %s[3] be_a(_nameserver)
11
+ should: %s[3].name == "ns1.google.com"
@@ -0,0 +1,32 @@
1
+ Nome de domínio / Domain Name: google.pt
2
+ Data de registo / Creation Date (dd/mm/yyyy): 09/01/2003
3
+ Estado / Status: ACTIVE
4
+
5
+ Titular / Registrant
6
+ Google, Inc.
7
+ 1600 Amphitheatre Parkway
8
+ Mountain View, CA
9
+ 94043
10
+ US
11
+ Email: dns-admin@google.com
12
+
13
+ Entidade Gestora / Billing Contact
14
+ Markmonitor - CCOPS
15
+ Email: ccops@markmonitor.com
16
+
17
+ Responsável Administrativo / Admin Contact
18
+ Markmonitor - CCOPS
19
+ Email: ccops@markmonitor.com
20
+
21
+ Responsável Técnico / Tech Contact
22
+ Markmonitor - CCOPS
23
+ Email: ccops@markmonitor.com
24
+
25
+ Nameserver Information
26
+ Nameserver: ns2.google.com.
27
+ Nameserver: ns4.google.com.
28
+ Nameserver: ns3.google.com.
29
+ Nameserver: ns1.google.com.
30
+
31
+
32
+
@@ -23,10 +23,10 @@
23
23
  should: %s be_a(Array)
24
24
  should: %s have(4).items
25
25
  should: %s[0] be_a(_nameserver)
26
- should: %s[0].name == "ns2.google.com"
26
+ should: %s[0].name == "ns4.google.com"
27
27
  should: %s[1] be_a(_nameserver)
28
- should: %s[1].name == "ns4.google.com"
28
+ should: %s[1].name == "ns2.google.com"
29
29
  should: %s[2] be_a(_nameserver)
30
- should: %s[2].name == "ns3.google.com"
30
+ should: %s[2].name == "ns1.google.com"
31
31
  should: %s[3] be_a(_nameserver)
32
- should: %s[3].name == "ns1.google.com"
32
+ should: %s[3].name == "ns3.google.com"
@@ -1,32 +1,25 @@
1
- Nome de domínio / Domain Name: google.pt
2
- Data de registo / Creation Date (dd/mm/yyyy): 09/01/2003
3
- Estado / Status: ACTIVE
4
-
5
- Titular / Registrant
6
- Google, Inc.
7
- 1600 Amphitheatre Parkway
8
- Mountain View, CA
9
- 94043
10
- US
11
- Email: dns-admin@google.com
12
-
13
- Entidade Gestora / Billing Contact
14
- Markmonitor - CCOPS
15
- Email: ccops@markmonitor.com
16
-
17
- Responsável Administrativo / Admin Contact
18
- Markmonitor - CCOPS
19
- Email: ccops@markmonitor.com
20
-
21
- Responsável Técnico / Tech Contact
22
- Markmonitor - CCOPS
23
- Email: ccops@markmonitor.com
24
-
25
- Nameserver Information
26
- Nameserver: ns2.google.com.
27
- Nameserver: ns4.google.com.
28
- Nameserver: ns3.google.com.
29
- Nameserver: ns1.google.com.
30
-
31
-
32
-
1
+ Nome de domínio / Domain Name: google.pt
2
+ Data de registo / Creation Date (dd/mm/yyyy): 09/01/2003
3
+ Data de expiração / Expiration Date (dd/mm/yyyy): 29/02/2012
4
+ Estado / Status: ACTIVE
5
+
6
+ Titular / Registrant
7
+ Google, Inc.
8
+ 1600 Amphitheatre Parkway
9
+ Mountain View, CA
10
+ 94043 null
11
+ Email: dns-admin@google.com
12
+
13
+ Entidade Gestora / Billing Contact
14
+ Markmonitor - CCOPS
15
+ Email: ccops@markmonitor.com
16
+
17
+ Responsável Técnico / Tech Contact
18
+ Markmonitor - CCOPS
19
+ Email: ccops@markmonitor.com
20
+
21
+ Nameserver Information
22
+ Nameserver: google.pt NS ns4.google.com.
23
+ Nameserver: google.pt NS ns2.google.com.
24
+ Nameserver: google.pt NS ns1.google.com.
25
+ Nameserver: google.pt NS ns3.google.com.
@@ -0,0 +1,2 @@
1
+ #updated_on
2
+ should: %s == nil
@@ -0,0 +1,64 @@
1
+
2
+ This Registry database contains ONLY .EDU domains.
3
+ The data in the EDUCAUSE Whois database is provided
4
+ by EDUCAUSE for information purposes in order to
5
+ assist in the process of obtaining information about
6
+ or related to .edu domain registration records.
7
+
8
+ The EDUCAUSE Whois database is authoritative for the
9
+ .EDU domain.
10
+
11
+ A Web interface for the .EDU EDUCAUSE Whois Server is
12
+ available at: http://whois.educause.net
13
+
14
+ By submitting a Whois query, you agree that this information
15
+ will not be used to allow, enable, or otherwise support
16
+ the transmission of unsolicited commercial advertising or
17
+ solicitations via e-mail. The use of electronic processes to
18
+ harvest information from this server is generally prohibited
19
+ except as reasonably necessary to register or modify .edu
20
+ domain names.
21
+
22
+ You may use "%" as a wildcard in your search. For further
23
+ information regarding the use of this WHOIS server, please
24
+ type: help
25
+
26
+ --------------------------
27
+
28
+ Domain Name: PCIHEALTH.EDU
29
+
30
+ Registrant:
31
+ PCI Health Training Center
32
+ 8101 John Carpenter Freeway
33
+ Dallas, TX 75247-4720
34
+ UNITED STATES
35
+
36
+ Administrative Contact:
37
+ Kelly Drake
38
+ admissions
39
+ PCI Health Training Center
40
+ 8101 John Carpenter Freeway
41
+ Dallas, TX 75247-4720
42
+ UNITED STATES
43
+ (214) 630-0568
44
+ kdrake@pcihealth.net
45
+
46
+ Technical Contact:
47
+ daniel Roy
48
+ InfoTech Services
49
+ PCI Health Training Center
50
+ 8101 John Carpenter Freeway
51
+ Dallas, TX 75247-4720
52
+ UNITED STATES
53
+ (214) 215-1764
54
+ dan@nativetechnology.net
55
+
56
+ Name Servers:
57
+ NS1.MAXIMUMASP.COM
58
+ NS2.MAXIMUMASP.COM
59
+
60
+ Domain record activated: 12-Mar-2004
61
+ Domain record last updated: unknown
62
+ Domain expires: 31-Jul-2012
63
+
64
+
@@ -0,0 +1,17 @@
1
+ #registrar
2
+ should: %s be_a(_registrar)
3
+ should: %s.id == nil
4
+ should: %s.name == "Markmonitor.com"
5
+ should: %s.url == "http://www.markmonitor.com"
6
+
7
+ #registrant_contacts
8
+ should: %s be_a(Array)
9
+ should: %s have(0).items
10
+
11
+ #admin_contacts
12
+ should: %s be_a(Array)
13
+ should: %s have(0).items
14
+
15
+ #technical_contacts
16
+ should: %s be_a(Array)
17
+ should: %s have(0).items
@@ -0,0 +1,65 @@
1
+
2
+ MarkMonitor is the Global Leader in Enterprise Brand Protection.
3
+
4
+ Domain Management
5
+ MarkMonitor Brand Protection™
6
+ AntiFraud Solutions
7
+ Corporate Consulting Services
8
+
9
+ Visit MarkMonitor at www.markmonitor.com
10
+ Contact us at 1 800 745 9229
11
+ In Europe, at +44 (0) 20 7840 1300
12
+
13
+
14
+ The Data in MarkMonitor.com's WHOIS database is provided by MarkMonitor.com
15
+ for information purposes, and to assist persons in obtaining information
16
+ about or related to a domain name registration record. MarkMonitor.com
17
+ does not guarantee its accuracy. By submitting a WHOIS query, you agree
18
+ that you will use this Data only for lawful purposes and that, under no
19
+ circumstances will you use this Data to: (1) allow, enable, or otherwise
20
+ support the transmission of mass unsolicited, commercial advertising or
21
+ solicitations via e-mail (spam); or (2) enable high volume, automated,
22
+ electronic processes that apply to MarkMonitor.com (or its systems).
23
+ MarkMonitor.com reserves the right to modify these terms at any time.
24
+ By submitting this query, you agree to abide by this policy.
25
+
26
+ Registrant:
27
+
28
+
29
+ Domain Name: zumbajams.com
30
+
31
+ Registrar Name: Markmonitor.com
32
+ Registrar Whois: whois.markmonitor.com
33
+ Registrar Homepage: http://www.markmonitor.com
34
+
35
+ Administrative Contact:
36
+
37
+ Technical Contact, Zone Contact:
38
+
39
+
40
+ Created on..............: 2010-03-05.
41
+ Expires on..............: 2015-03-05.
42
+ Record last updated on..: .
43
+
44
+ Domain servers in listed order:
45
+
46
+ c.ns.zerigo.net
47
+ a.ns.zerigo.net
48
+ d.ns.zerigo.net
49
+ e.ns.zerigo.net
50
+ b.ns.zerigo.net
51
+
52
+
53
+
54
+
55
+ MarkMonitor is the Global Leader in Enterprise Brand Protection.
56
+
57
+ Domain Management
58
+ MarkMonitor Brand Protection™
59
+ AntiFraud Solutions
60
+ Corporate Consulting Services
61
+
62
+ Visit MarkMonitor at www.markmonitor.com
63
+ Contact us at 1 800 745 9229
64
+ In Europe, at +44 (0) 20 7840 1300
65
+ --
@@ -0,0 +1,11 @@
1
+ #nameservers
2
+ should: %s be_a(Array)
3
+ should: %s have(4).items
4
+ should: %s[0] be_a(_nameserver)
5
+ should: %s[0].name == "ns1.google.com"
6
+ should: %s[1] be_a(_nameserver)
7
+ should: %s[1].name == "ns2.google.com"
8
+ should: %s[2] be_a(_nameserver)
9
+ should: %s[2].name == "ns3.google.com"
10
+ should: %s[3] be_a(_nameserver)
11
+ should: %s[3].name == "ns4.google.com"
@@ -0,0 +1,98 @@
1
+
2
+ ----------------------------------------------------------------------
3
+ SGNIC WHOIS Server
4
+ ----------------------------------------------------------------------
5
+
6
+ The following data is provided for information purposes only.
7
+
8
+ Registrar: MARKMONITOR INC
9
+ Registrant: GOOGLE INC.
10
+
11
+ Domain Name: GOOGLE.SG
12
+ Creation Date: 03-Jan-2005 12:00:00
13
+ Expiration Date: 03-Jan-2011 00:00:00
14
+ Domain Status: OK
15
+ Domain Status: CLIENT UPDATE PROHIBITED
16
+ Domain Status: CLIENT TRANSFER PROHIBITED
17
+ Domain Status: CLIENT DELETE PROHIBITED
18
+
19
+
20
+ Owner/Main Contact:
21
+
22
+ Name: GOOGLE INC. (SGNIC-ORG1076986)
23
+ Registered Address(line1): 1600 AMPHITHEATRE PARKWAY
24
+ Registered Address(line2):
25
+ Registered Address(line3):
26
+ Registered State: CA
27
+ Registered Country: US
28
+ Registered Postalcode: 94043
29
+
30
+
31
+
32
+ Administrative Contact:
33
+
34
+ Name: IP MIRROR PTE. LTD. - SGNIC ORGIP60218 (SGNIC-ORG1076985)
35
+ Registered Address(line1): 47 DUXTON ROAD
36
+ Registered Address(line2): IP MIRROR TECHHAUS
37
+ Registered Address(line3):
38
+ Registered State:
39
+ Registered Country: SG
40
+ Registered Postalcode: 089511
41
+
42
+
43
+
44
+ Technical Contact:
45
+
46
+ Name: GOOGLE INC. (SGNIC-ORG1076986)
47
+ Registered Address(line1): 1600 AMPHITHEATRE PARKWAY
48
+ Registered Address(line2):
49
+ Registered Address(line3):
50
+ Registered State: CA
51
+ Registered Country: US
52
+ Registered Postalcode: 94043
53
+
54
+ Telephone: +1.6503300100
55
+ Facsimile: +1.6506181434
56
+ EMAIL: dns-admin@google.com
57
+
58
+
59
+
60
+ Billing Contact:
61
+
62
+ Name: MARKMONITOR (SGNIC-ORG1076984)
63
+ Registered Address(line1): 391 N. ANCESTOR PLACE
64
+ Registered Address(line2): SUITE 150
65
+ Registered Address(line3):
66
+ Registered State: CA
67
+ Registered Country: US
68
+ Registered Postalcode: 83704
69
+
70
+
71
+
72
+ Name Servers:
73
+ NS1.GOOGLE.COM
74
+ NS2.GOOGLE.COM
75
+ NS3.GOOGLE.COM
76
+ NS4.GOOGLE.COM
77
+
78
+
79
+
80
+
81
+ Note: With immediate effect from 1 Jun 2005 email address and phone numbers for Registrant,
82
+ Administrative Contact and Billing Contact will not be shown in the above WHOIS results.
83
+ This move is in-line with national and global efforts to curb SPAM.
84
+
85
+ Technical Contact details will still be available for troubleshooting of technical problems
86
+ which may be time-sensitive.
87
+
88
+ Any party who has legitimate reason to obtain email address or phone numbers of the domain
89
+ name contacts can either (1) obtain the contacts from the domain name's website (usually by
90
+ prepending 'www.' in front of the domain name or perform an Internet search using the
91
+ organization name or; (2) Request the information from SGNIC via email (dnq@sgnic.sg),
92
+ stating the reasons.
93
+
94
+
95
+
96
+
97
+
98
+