Skip to content
Browse files

Update whois.yoursrs.com to the new format

  • Loading branch information...
1 parent febbd29 commit e3802e83345316114c9ec03fb02658604577da63 @weppos committed Feb 26, 2014
View
12 lib/whois/record/parser/whois.yoursrs.com.rb
@@ -67,12 +67,8 @@ class WhoisYoursrsCom < Base
property_supported :registrar do
node("Sponsoring Registrar") do |value|
- parts = decompose_registrar(value) ||
- Whois.bug!(ParserError, "Unknown registrar format `#{value}'")
-
Record::Registrar.new(
- id: parts[0],
- name: parts[1]
+ name: value
)
end
end
@@ -124,12 +120,6 @@ def build_contact(element, type)
end
end
- def decompose_registrar(value)
- if value =~ /(.+?) \((.+?)\)/
- [$2, $1]
- end
- end
-
end
end
View
2 lib/whois/record/scanners/base_icann_compliant.rb
@@ -34,7 +34,7 @@ class BaseIcannCompliant < Base
tokenizer :skip_head do
if @input.skip_until(/Domain Name:/)
- @input.scan(/\s(.+)\n/)
+ @input.scan(/\s?(.+)\n/)
@ast["Domain Name"] = @input[1].strip
end
end
View
2 lib/whois/record/scanners/whois.yoursrs.com.rb
@@ -24,7 +24,7 @@ class WhoisYoursrsCom < Base
tokenizer :scan_available do
- if @input.scan(/^No match for [\w\.]+\.\n/)
+ if @input.scan(/^No match for [\w\.]+/)
@ast["status:available"] = true
end
end
View
271 spec/fixtures/responses/whois.verisign-grs.com/status_registered.txt
@@ -5,271 +5,18 @@ Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.
- Server Name: GOOGLE.COM.ZZZZZZZZZZZZZZZZZZZZZZZZZZ.HAVENDATA.COM
- IP Address: 50.23.75.44
- Registrar: PDR LTD. D/B/A PUBLICDOMAINREGISTRY.COM
- Whois Server: whois.PublicDomainRegistry.com
- Referral URL: http://www.PublicDomainRegistry.com
-
- Server Name: GOOGLE.COM.ZZZZZZZZZZZZZ.GET.ONE.MILLION.DOLLARS.AT.WWW.UNIMUNDI.COM
- IP Address: 209.126.190.70
- Registrar: PDR LTD. D/B/A PUBLICDOMAINREGISTRY.COM
- Whois Server: whois.PublicDomainRegistry.com
- Referral URL: http://www.PublicDomainRegistry.com
-
- Server Name: GOOGLE.COM.ZZZZZ.GET.LAID.AT.WWW.SWINGINGCOMMUNITY.COM
- IP Address: 69.41.185.195
- Registrar: TUCOWS DOMAINS INC.
- Whois Server: whois.tucows.com
- Referral URL: http://domainhelp.opensrs.net
-
- Server Name: GOOGLE.COM.ZOMBIED.AND.HACKED.BY.WWW.WEB-HACK.COM
- IP Address: 217.107.217.167
- Registrar: DOMAINCONTEXT, INC.
- Whois Server: whois.domaincontext.com
- Referral URL: http://www.domaincontext.com
-
- Server Name: GOOGLE.COM.ZNAET.PRODOMEN.COM
- IP Address: 62.149.23.126
- Registrar: PDR LTD. D/B/A PUBLICDOMAINREGISTRY.COM
- Whois Server: whois.PublicDomainRegistry.com
- Referral URL: http://www.PublicDomainRegistry.com
-
- Server Name: GOOGLE.COM.YUCEKIRBAC.COM
- IP Address: 88.246.115.134
- Registrar: PDR LTD. D/B/A PUBLICDOMAINREGISTRY.COM
- Whois Server: whois.PublicDomainRegistry.com
- Referral URL: http://www.PublicDomainRegistry.com
-
- Server Name: GOOGLE.COM.YUCEHOCA.COM
- IP Address: 88.246.115.134
- Registrar: PDR LTD. D/B/A PUBLICDOMAINREGISTRY.COM
- Whois Server: whois.PublicDomainRegistry.com
- Referral URL: http://www.PublicDomainRegistry.com
-
- Server Name: GOOGLE.COM.WORDT.DOOR.VEEL.WHTERS.GEBRUIKT.SERVERTJE.NET
- IP Address: 62.41.27.144
- Registrar: KEY-SYSTEMS GMBH
- Whois Server: whois.rrpproxy.net
- Referral URL: http://www.key-systems.net
-
- Server Name: GOOGLE.COM.VN
- Registrar: ONLINENIC, INC.
- Whois Server: whois.onlinenic.com
- Referral URL: http://www.OnlineNIC.com
-
- Server Name: GOOGLE.COM.VABDAYOFF.COM
- IP Address: 8.8.8.8
- Registrar: DOMAIN.COM, LLC
- Whois Server: whois.domain.com
- Referral URL: http://www.domain.com
-
- Server Name: GOOGLE.COM.UY
- Registrar: PDR LTD. D/B/A PUBLICDOMAINREGISTRY.COM
- Whois Server: whois.PublicDomainRegistry.com
- Referral URL: http://www.PublicDomainRegistry.com
-
- Server Name: GOOGLE.COM.UA
- Registrar: PDR LTD. D/B/A PUBLICDOMAINREGISTRY.COM
- Whois Server: whois.PublicDomainRegistry.com
- Referral URL: http://www.PublicDomainRegistry.com
-
- Server Name: GOOGLE.COM.TW
- Registrar: WEB COMMERCE COMMUNICATIONS LIMITED DBA WEBNIC.CC
- Whois Server: whois.webnic.cc
- Referral URL: http://www.webnic.cc
-
- Server Name: GOOGLE.COM.TR
- Registrar: PDR LTD. D/B/A PUBLICDOMAINREGISTRY.COM
- Whois Server: whois.PublicDomainRegistry.com
- Referral URL: http://www.PublicDomainRegistry.com
-
- Server Name: GOOGLE.COM.SUCKS.FIND.CRACKZ.WITH.SEARCH.GULLI.COM
- IP Address: 80.190.192.24
- Registrar: CORE INTERNET COUNCIL OF REGISTRARS
- Whois Server: whois.corenic.net
- Referral URL: http://www.corenic.net
-
- Server Name: GOOGLE.COM.SPROSIUYANDEKSA.RU
- Registrar: MELBOURNE IT, LTD. D/B/A INTERNET NAMES WORLDWIDE
- Whois Server: whois.melbourneit.com
- Referral URL: http://www.melbourneit.com
-
- Server Name: GOOGLE.COM.SPAMMING.IS.UNETHICAL.PLEASE.STOP.THEM.HUAXUEERBAN.COM
- IP Address: 211.64.175.66
- IP Address: 211.64.175.67
- Registrar: GODADDY.COM, LLC
- Whois Server: whois.godaddy.com
- Referral URL: http://registrar.godaddy.com
-
- Server Name: GOOGLE.COM.SOUTHBEACHNEEDLEARTISTRY.COM
- IP Address: 74.125.229.52
- Registrar: GODADDY.COM, LLC
- Whois Server: whois.godaddy.com
- Referral URL: http://registrar.godaddy.com
-
- Server Name: GOOGLE.COM.SHQIPERIA.COM
- IP Address: 70.84.145.107
- Registrar: ENOM, INC.
- Whois Server: whois.enom.com
- Referral URL: http://www.enom.com
-
- Server Name: GOOGLE.COM.SA
- Registrar: OMNIS NETWORK, LLC
- Whois Server: whois.omnis.com
- Referral URL: http://domains.omnis.com
-
- Server Name: GOOGLE.COM.PK
- Registrar: BIGROCK SOLUTIONS LIMITED
- Whois Server: Whois.bigrock.com
- Referral URL: http://www.bigrock.com
-
- Server Name: GOOGLE.COM.PE
- Registrar: PDR LTD. D/B/A PUBLICDOMAINREGISTRY.COM
- Whois Server: whois.PublicDomainRegistry.com
- Referral URL: http://www.PublicDomainRegistry.com
-
- Server Name: GOOGLE.COM.NS2.CHALESHGAR.COM
- IP Address: 8.8.8.8
- Registrar: REALTIME REGISTER BV
- Whois Server: whois.yoursrs.com
- Referral URL: http://www.realtimeregister.com
-
- Server Name: GOOGLE.COM.NS1.CHALESHGAR.COM
- IP Address: 8.8.8.8
+ Domain Name: YOURSRS.COM
Registrar: REALTIME REGISTER BV
Whois Server: whois.yoursrs.com
Referral URL: http://www.realtimeregister.com
-
- Server Name: GOOGLE.COM.MY
- Registrar: WILD WEST DOMAINS, LLC
- Whois Server: whois.wildwestdomains.com
- Referral URL: http://www.wildwestdomains.com
-
- Server Name: GOOGLE.COM.MX
- Registrar: PDR LTD. D/B/A PUBLICDOMAINREGISTRY.COM
- Whois Server: whois.PublicDomainRegistry.com
- Referral URL: http://www.PublicDomainRegistry.com
-
- Server Name: GOOGLE.COM.LOLOLOLOLOL.SHTHEAD.COM
- IP Address: 123.123.123.123
- Registrar: CRAZY DOMAINS FZ-LLC
- Whois Server: whois.syra.com.au
- Referral URL: http://www.crazydomains.com
-
- Server Name: GOOGLE.COM.LASERPIPE.COM
- IP Address: 209.85.227.106
- Registrar: REALTIME REGISTER BV
- Whois Server: whois.yoursrs.com
- Referral URL: http://www.realtimeregister.com
-
- Server Name: GOOGLE.COM.IS.NOT.HOSTED.BY.ACTIVEDOMAINDNS.NET
- IP Address: 217.148.161.5
- Registrar: ENOM, INC.
- Whois Server: whois.enom.com
- Referral URL: http://www.enom.com
-
- Server Name: GOOGLE.COM.IS.HOSTED.ON.PROFITHOSTING.NET
- IP Address: 66.49.213.213
- Registrar: NAME.COM, INC.
- Whois Server: whois.name.com
- Referral URL: http://www.name.com
-
- Server Name: GOOGLE.COM.IS.APPROVED.BY.NUMEA.COM
- IP Address: 213.228.0.43
- Registrar: GANDI SAS
- Whois Server: whois.gandi.net
- Referral URL: http://www.gandi.net
-
- Server Name: GOOGLE.COM.HK
- Registrar: CLOUD GROUP LIMITED
- Whois Server: whois.hostingservicesinc.net
- Referral URL: http://www.resell.biz
-
- Server Name: GOOGLE.COM.HICHINA.COM
- IP Address: 218.103.1.1
- Registrar: HICHINA ZHICHENG TECHNOLOGY LTD.
- Whois Server: grs-whois.hichina.com
- Referral URL: http://www.net.cn
-
- Server Name: GOOGLE.COM.HAS.LESS.FREE.PORN.IN.ITS.SEARCH.ENGINE.THAN.SECZY.COM
- IP Address: 209.187.114.130
- Registrar: TUCOWS DOMAINS INC.
- Whois Server: whois.tucows.com
- Referral URL: http://domainhelp.opensrs.net
-
- Server Name: GOOGLE.COM.FIBERTREAT.COM
- IP Address: 64.233.160.5
- Registrar: GODADDY.COM, LLC
- Whois Server: whois.godaddy.com
- Referral URL: http://registrar.godaddy.com
-
- Server Name: GOOGLE.COM.DO
- Registrar: GODADDY.COM, LLC
- Whois Server: whois.godaddy.com
- Referral URL: http://registrar.godaddy.com
-
- Server Name: GOOGLE.COM.CO
- Registrar: NAMESECURE.COM
- Whois Server: whois.namesecure.com
- Referral URL: http://www.namesecure.com
-
- Server Name: GOOGLE.COM.CN
- Registrar: XIN NET TECHNOLOGY CORPORATION
- Whois Server: whois.paycenter.com.cn
- Referral URL: http://www.xinnet.com
-
- Server Name: GOOGLE.COM.BR
- Registrar: ENOM, INC.
- Whois Server: whois.enom.com
- Referral URL: http://www.enom.com
-
- Server Name: GOOGLE.COM.BEYONDWHOIS.COM
- IP Address: 203.36.226.2
- Registrar: INSTRA CORPORATION PTY, LTD.
- Whois Server: whois.instra.net
- Referral URL: http://www.instra.com
-
- Server Name: GOOGLE.COM.AU
- Registrar: PLANETDOMAIN PTY LTD.
- Whois Server: whois.planetdomain.com
- Referral URL: http://www.planetdomain.com
-
- Server Name: GOOGLE.COM.ARTVISUALRIO.COM
- IP Address: 200.222.44.35
- Registrar: ENOM, INC.
- Whois Server: whois.enom.com
- Referral URL: http://www.enom.com
-
- Server Name: GOOGLE.COM.AR
- Registrar: ENOM, INC.
- Whois Server: whois.enom.com
- Referral URL: http://www.enom.com
-
- Server Name: GOOGLE.COM.AFRICANBATS.ORG
- Registrar: TUCOWS DOMAINS INC.
- Whois Server: whois.tucows.com
- Referral URL: http://domainhelp.opensrs.net
-
- Domain Name: GOOGLE.COM
- Registrar: MARKMONITOR INC.
- Whois Server: whois.markmonitor.com
- Referral URL: http://www.markmonitor.com
- Name Server: NS1.GOOGLE.COM
- Name Server: NS2.GOOGLE.COM
- Name Server: NS3.GOOGLE.COM
- Name Server: NS4.GOOGLE.COM
- Status: clientDeleteProhibited
- Status: clientTransferProhibited
- Status: clientUpdateProhibited
- Status: serverDeleteProhibited
- Status: serverTransferProhibited
- Status: serverUpdateProhibited
- Updated Date: 20-jul-2011
- Creation Date: 15-sep-1997
- Expiration Date: 14-sep-2020
-
->>> Last update of whois database: Wed, 22 Jan 2014 22:08:21 UTC <<<
+ Name Server: NS1.YOURSRS.COM
+ Name Server: NS2.YOURSRS.COM
+ Status: ok
+ Updated Date: 25-nov-2013
+ Creation Date: 24-nov-2003
+ Expiration Date: 24-nov-2014
+
+>>> Last update of whois database: Wed, 26 Feb 2014 12:47:56 UTC <<<
NOTICE: The expiration date displayed in this record is the date the
registrar's sponsorship of the domain name registration in the registry is
View
2 spec/fixtures/responses/whois.yoursrs.com/status_available.txt
@@ -1 +1 @@
-No match for thisisavailable.com.
+No match for u34jedzcq.com
View
10 spec/fixtures/responses/whois.yoursrs.com/status_registered.expected
@@ -17,21 +17,21 @@
#created_on
%s %CLASS{time}
- %s %TIME{2007-03-02 12:20:54.0}
+ %s %TIME{2003-11-24 09:40:55}
#updated_on
%s %CLASS{time}
- %s %TIME{2012-11-25 00:34:05.0}
+ %s %TIME{2014-01-22 14:04:50}
#expires_on
%s %CLASS{time}
- %s %TIME{2013-11-24 09:40:55.0}
+ %s %TIME{2014-11-24 09:40:55}
#registrar
%s %CLASS{registrar}
- %s.id == "R802-LRMS"
- %s.name == "Realtime Register B.V."
+ %s.id == nil
+ %s.name == "REALTIME REGISTER B.V."
%s.organization == nil
%s.url == nil
View
30 spec/fixtures/responses/whois.yoursrs.com/status_registered.txt
@@ -1,10 +1,10 @@
Domain Name:yoursrs.com
Name Server:ns1.yoursrs.com
Name Server:ns2.yoursrs.com
-Created On:2007-03-02 12:20:54.0
-Last Updated On:2012-11-25 00:34:05.0
-Expiration Date:2013-11-24 09:40:55.0
-Sponsoring Registrar:Realtime Register B.V. (R802-LRMS)
+Created On:2003-11-24 09:40:55.0
+Last Updated On:2014-01-22 14:04:50.0
+Expiration Date:2014-11-24 09:40:55.0
+Sponsoring Registrar:REALTIME REGISTER B.V.
Reseller:Realtime Register B.V.
Status:OK
Registrant ID:realtimeregister
@@ -29,17 +29,6 @@ TECH Country:NL
TECH Phone:+31.384530752
TECH Fax:+31.384540122
TECH Email:support@realtimeregister.com
-ADMIN ID:realtimeregister
-ADMIN Name:Valentijn Borstlap
-ADMIN Organization:Realtime Register B.V.
-ADMIN Street1:Ceintuurbaan 32a
-ADMIN City:Zwolle
-ADMIN State:Overijssel
-ADMIN Postal Code:8024AA
-ADMIN Country:NL
-ADMIN Phone:+31.384530752
-ADMIN Fax:+31.384540122
-ADMIN Email:support@realtimeregister.com
BILLING ID:realtimeregister
BILLING Name:Valentijn Borstlap
BILLING Organization:Realtime Register B.V.
@@ -51,3 +40,14 @@ BILLING Country:NL
BILLING Phone:+31.384530752
BILLING Fax:+31.384540122
BILLING Email:support@realtimeregister.com
+ADMIN ID:realtimeregister
+ADMIN Name:Valentijn Borstlap
+ADMIN Organization:Realtime Register B.V.
+ADMIN Street1:Ceintuurbaan 32a
+ADMIN City:Zwolle
+ADMIN State:Overijssel
+ADMIN Postal Code:8024AA
+ADMIN Country:NL
+ADMIN Phone:+31.384530752
+ADMIN Fax:+31.384540122
+ADMIN Email:support@realtimeregister.com
View
10 spec/whois/record/parser/responses/whois.yoursrs.com/status_registered_spec.rb
@@ -49,26 +49,26 @@
describe "#created_on" do
it do
expect(subject.created_on).to be_a(Time)
- expect(subject.created_on).to eq(Time.parse("2007-03-02 12:20:54.0"))
+ expect(subject.created_on).to eq(Time.parse("2003-11-24 09:40:55"))
end
end
describe "#updated_on" do
it do
expect(subject.updated_on).to be_a(Time)
- expect(subject.updated_on).to eq(Time.parse("2012-11-25 00:34:05.0"))
+ expect(subject.updated_on).to eq(Time.parse("2014-01-22 14:04:50"))
end
end
describe "#expires_on" do
it do
expect(subject.expires_on).to be_a(Time)
- expect(subject.expires_on).to eq(Time.parse("2013-11-24 09:40:55.0"))
+ expect(subject.expires_on).to eq(Time.parse("2014-11-24 09:40:55"))
end
end
describe "#registrar" do
it do
expect(subject.registrar).to be_a(Whois::Record::Registrar)
- expect(subject.registrar.id).to eq("R802-LRMS")
- expect(subject.registrar.name).to eq("Realtime Register B.V.")
+ expect(subject.registrar.id).to eq(nil)
+ expect(subject.registrar.name).to eq("REALTIME REGISTER B.V.")
expect(subject.registrar.organization).to eq(nil)
expect(subject.registrar.url).to eq(nil)
end

0 comments on commit e3802e8

Please sign in to comment.
Something went wrong with that request. Please try again.