diff --git a/.travis.yml b/.travis.yml index 5d8bdb72e..76291b017 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ +sudo: false language: ruby rvm: - 1.9.3 diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown index 90311f54d..7f93478cb 100644 --- a/CHANGELOG.markdown +++ b/CHANGELOG.markdown @@ -1,9 +1,17 @@ # Changelog - #### master -- SERVER: Add .ACO, .AAA, .GEA, .STCGROUP, .VIVA +- Removed option to /usr/bin/env as not supported on all platforms (GH-453). [Thanks @martin-schmidt] + + +#### Release 3.6.3 + +- SERVER: Add .ACO, .AAA, .GEA, .STCGROUP, .VIVA, .GROUP, .CEB, .FAGE, .MOM, .AMICA, .STC, .CIPRIANI, .KINDER, .XN--11B4C3D, .XN--3PXU8K, .XN--42C2D9A, .XN--9DBQ2A, .XN--C2BR7G, .XN--FHBEI, .XN--J1AEF, .XN--MK1BU44C, .XN--PSSY2U, .XN--T60B56A, .XN--TCKWE, .XN--EFVY88H, .CSC, .CAR, .PROTECTION, .STADA, .THEATRE, .LINDE, .SECURITY, .BMS, .LTD, .OBI, .BOM, .FINAL, .HYUNDAI, .KIA, .SEVEN, .STOCKHOLM, .CLUBMED, .DELL, .ARAMCO, .XN--MGBA3A3EJT, .MOI, .MTR, .VIRGIN, .YAMAXUN, .GUCCI, .JAGUAR, .LANDROVER, .RWE, .ZARA, .MEO, .PING, .SAPO, .SBS, .AARP, .APPLE, .BEATS, .XN--MGBTX2B, .XN--QXAM + +- SERVER: Update .XN--SES554G, .INK + +- SERVER: Disabled whois.edu.cn as it has not been working for the last 6 years (GH-59). - NEW: Added whois.nic.tech parser diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..0aa76fd45 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,39 @@ +# Contributing + +We love pull requests from everyone. By participating in this project, you agree to abide by the contribution [code of conduct](http://contributor-covenant.org/version/1/2/0/). + +## Workflow + +Fork, then clone the repo: + + $ git clone git@github.com:your-username/whois.git + +Set up your machine: + + $ bundle + +Make sure the tests pass: + + $ bundle exec rake + +To propose a change/feature/patch, create your feature branch: + + $ git checkout -b my-new-feature + +Make your change. Add tests for your change. Make the tests pass: + + $ bundle exec rake + +Commit your changes: + + $ git commit -am 'Add some feature' + +Push to your fork and [submit a pull request](https://github.com/weppos/whois/compare/). + + +## Tests + +To increase the chance that your pull request is accepted please **make sure to write tests**. Changes without corresponding tests will likely not be included as they will produce fragile code that can easily break whenever the registry changes the response format. + +Some examples: [84dbdde320f31c20184bcfe5e544e8fd3cd32862](https://github.com/weppos/whois/commit/84dbdde320f31c20184bcfe5e544e8fd3cd32862), [3b6688b95e6fadcf720cc777ef4bbd2cd644e62b](https://github.com/weppos/whois/commit/3b6688b95e6fadcf720cc777ef4bbd2cd644e62b) + diff --git a/README.markdown b/README.markdown index 3838c03d3..a501b8288 100644 --- a/README.markdown +++ b/README.markdown @@ -4,7 +4,7 @@ This library was extracted from [RoboWhois](https://www.robowhois.com/) and [RoboDomain](http://robodomain.com/). It has been performing queries in production since July 2009. -[![Build Status](https://secure.travis-ci.org/weppos/whois.png)](http://travis-ci.org/weppos/whois) +[![Build Status](https://travis-ci.org/weppos/whois.svg?branch=master)](https://travis-ci.org/weppos/whois) ## Donate a coffee diff --git a/bin/whoisrb b/bin/whoisrb index b61c2a8b6..3a5cc8717 100755 --- a/bin/whoisrb +++ b/bin/whoisrb @@ -1,4 +1,4 @@ -#!/usr/bin/env ruby -w +#!/usr/bin/env ruby $:.unshift(File.expand_path("../../lib", __FILE__)) diff --git a/data/CONTRIBUTING.md b/data/CONTRIBUTING.md new file mode 100644 index 000000000..8302a0008 --- /dev/null +++ b/data/CONTRIBUTING.md @@ -0,0 +1,36 @@ +# Contributing + +We love pull requests from everyone. By participating in this project, you agree to abide by the contribution [code of conduct](http://contributor-covenant.org/version/1/2/0/). + +## Workflow + +Fork, then clone the repo: + + $ git clone git@github.com:your-username/whois.git + +Set up your machine: + + $ bundle + +Make sure the tests pass: + + $ bundle exec rake + +To propose a change/feature/patch, create your feature branch: + + $ git checkout -b my-new-feature + +Make your change. Add tests for your change. Make the tests pass: + + $ bundle exec rake + +Commit your changes: + + $ git commit -am 'Add some feature' + +Push to your fork and [submit a pull request](https://github.com/weppos/whois/compare/). + + +## Tests + +To increase the chance that your pull request is accepted please **make sure to write tests**. Changes without corresponding tests will likely not be included as they will produce fragile code that can easily break whenever the registry changes the response format. diff --git a/data/tld.json b/data/tld.json index ecf688a45..20dd25ce8 100644 --- a/data/tld.json +++ b/data/tld.json @@ -110,14 +110,12 @@ "host": "whois.iana.org" }, ".mil": { - "host": null, "adapter": "none" }, ".e164.arpa": { "host": "whois.ripe.net" }, ".in-addr.arpa": { - "host": null, "adapter": "arpa" }, ".arpa": { @@ -171,7 +169,6 @@ "host": "whois.nic.ac" }, ".ad": { - "host": null, "adapter": "none" }, ".ae": { @@ -187,26 +184,21 @@ "host": "whois.ai" }, ".al": { - "host": null, "adapter": "none" }, ".am": { "host": "whois.nic.am" }, ".an": { - "host": null, "adapter": "none" }, ".ao": { - "host": null, "adapter": "none" }, ".aq": { - "host": null, "adapter": "none" }, ".ar": { - "host": null, "adapter": "web", "url": "http://www.nic.ar/" }, @@ -229,22 +221,18 @@ "host": "whois.ax" }, ".az": { - "host": null, "adapter": "web", "url": "http://www.nic.az/" }, ".ba": { - "host": null, "adapter": "web", "url": "http://nic.ba/lat/menu/view/13" }, ".bb": { - "host": null, "adapter": "web", "url": "http://whois.telecoms.gov.bb/search_domain.php" }, ".bd": { - "host": null, "adapter": "web", "url": "http://whois.btcl.net.bd/" }, @@ -252,14 +240,12 @@ "host": "whois.dns.be" }, ".bf": { - "host": null, "adapter": "none" }, ".bg": { "host": "whois.register.bg" }, ".bh": { - "host": null, "adapter": "none" }, ".bi": { @@ -269,7 +255,6 @@ "host": "whois.nic.bj" }, ".bm": { - "host": null, "adapter": "web", "url": "http://www.bermudanic.bm/cgi-bin/lansaweb?procfun+BMWHO+BMWHO2+WHO" }, @@ -283,17 +268,14 @@ "host": "whois.registro.br" }, ".bs": { - "host": null, "adapter": "web", "url": "http://www.nic.bs/cgi-bin/search.pl" }, ".bt": { - "host": null, "adapter": "web", "url": "http://www.nic.bt/" }, ".bv": { - "host": null, "adapter": "none" }, ".by": { @@ -323,7 +305,6 @@ "host": "whois.dot.cf" }, ".cg": { - "host": null, "adapter": "web", "url": "http://www.nic.cg/cgi-bin/whois.pl" }, @@ -343,7 +324,7 @@ "host": "whois.netcom.cm" }, ".edu.cn": { - "host": "whois.edu.cn" + "adapter": "none" }, ".cn": { "host": "whois.cnnic.cn" @@ -355,24 +336,20 @@ "host": "whois.nic.cr" }, ".cu": { - "host": null, "adapter": "web", "url": "http://www.nic.cu/" }, ".cv": { - "host": null, "adapter": "web", "url": "http://www.dns.cv/" }, ".cw": { - "host": null, "adapter": "none" }, ".cx": { "host": "whois.nic.cx" }, ".cy": { - "host": null, "adapter": "web", "url": "http://www.nic.cy/nslookup/online_database.php" }, @@ -385,7 +362,6 @@ "format": "-T dn,ace %s" }, ".dj": { - "host": null, "adapter": "web", "url": "http://www.nic.dj/whois.php" }, @@ -398,7 +374,6 @@ "host": "whois.nic.dm" }, ".do": { - "host": null, "adapter": "web", "url": "http://www.nic.do/whois-h.php3" }, @@ -412,19 +387,16 @@ "host": "whois.tld.ee" }, ".eg": { - "host": null, "adapter": "web", "url": "http://lookup.egregistry.eg/english.aspx" }, ".er": { - "host": null, "adapter": "none" }, ".es": { "host": "whois.nic.es" }, ".et": { - "host": null, "adapter": "none" }, ".eu": { @@ -437,11 +409,9 @@ "host": "whois.usp.ac.fj" }, ".fk": { - "host": null, "adapter": "none" }, ".fm": { - "host": null, "adapter": "web", "url": "http://dot.fm/whois.html" }, @@ -485,23 +455,19 @@ "host": "whois.nic.fr" }, ".ga": { - "host": null, "adapter": "none" }, ".gb": { - "host": null, "adapter": "none" }, ".gd": { "host": "whois.nic.gd" }, ".ge": { - "host": null, "adapter": "web", "url": "http://www.registration.ge/" }, ".gf": { - "host": null, "adapter": "web", "url": "https://www.dom-enic.com/whois.html" }, @@ -509,7 +475,6 @@ "host": "whois.gg" }, ".gh": { - "host": null, "adapter": "web", "url": "http://www.nic.gh/customer/search_c.htm" }, @@ -521,23 +486,19 @@ "host": "whois.nic.gl" }, ".gm": { - "host": null, "adapter": "web", "url": "http://www.nic.gm/htmlpages/whois.htm" }, ".gn": { - "host": null, "adapter": "none" }, ".gp": { - "host": null, "adapter": "none" }, ".gq": { "host": "whois.dominio.gq" }, ".gr": { - "host": null, "adapter": "web", "url": "https://grweb.ics.forth.gr/Whois?lang=en" }, @@ -545,17 +506,14 @@ "host": "whois.nic.gs" }, ".gt": { - "host": null, "adapter": "web", "url": "http://www.gt/whois.html" }, ".gu": { - "host": null, "adapter": "web", "url": "http://gadao.gov.gu/domainsearch.htm" }, ".gw": { - "host": null, "adapter": "none" }, ".gy": { @@ -613,11 +571,9 @@ "host": "whois.je" }, ".jm": { - "host": null, "adapter": "none" }, ".jo": { - "host": null, "adapter": "web", "url": "http://www.dns.jo/Whois.aspx" }, @@ -633,30 +589,25 @@ "host": "whois.domain.kg" }, ".kh": { - "host": null, "adapter": "none" }, ".ki": { "host": "whois.nic.ki" }, ".km": { - "host": null, "adapter": "none" }, ".kn": { - "host": null, "adapter": "web", "url": "http://www.nic.kn/" }, ".kp": { - "host": null, "adapter": "none" }, ".kr": { "host": "whois.kr" }, ".kw": { - "host": null, "adapter": "web", "url": "http://www.kw/" }, @@ -670,7 +621,6 @@ "host": "whois.nic.la" }, ".lb": { - "host": null, "adapter": "web", "url": "http://www.aub.edu.lb/lbdr/" }, @@ -685,11 +635,9 @@ "host": "whois.nic.lk" }, ".lr": { - "host": null, "adapter": "none" }, ".ls": { - "host": null, "adapter": "web", "url": "http://www.co.ls/co.asp" }, @@ -709,7 +657,6 @@ "host": "whois.registre.ma" }, ".mc": { - "host": null, "adapter": "none" }, ".md": { @@ -722,7 +669,6 @@ "host": "whois.nic.mg" }, ".mh": { - "host": null, "adapter": "none" }, ".mk": { @@ -732,7 +678,6 @@ "host": "whois.dot.ml" }, ".mm": { - "host": null, "adapter": "none" }, ".mn": { @@ -743,23 +688,19 @@ "host": "whois.monic.mo" }, ".mp": { - "host": null, "adapter": "none" }, ".mq": { - "host": null, "adapter": "web", "url": "https://www.dom-enic.com/whois.html" }, ".mr": { - "host": null, "adapter": "none" }, ".ms": { "host": "whois.nic.ms" }, ".mt": { - "host": null, "adapter": "web", "url": "https://www.nic.org.mt/dotmt/" }, @@ -767,11 +708,9 @@ "host": "whois.nic.mu" }, ".mv": { - "host": null, "adapter": "none" }, ".mw": { - "host": null, "adapter": "web", "url": "http://www.registrar.mw/" }, @@ -810,12 +749,10 @@ "host": "whois.norid.no" }, ".np": { - "host": null, "adapter": "web", "url": "http://register.mos.com.np/userSearchInc.asp" }, ".nr": { - "host": null, "adapter": "web", "url": "http://www.cenpac.net.nr/dns/whois.html" }, @@ -829,7 +766,6 @@ "host": "whois.registry.om" }, ".pa": { - "host": null, "adapter": "web", "url": "http://www.nic.pa/" }, @@ -840,16 +776,13 @@ "host": "whois.registry.pf" }, ".pg": { - "host": null, "adapter": "none" }, ".ph": { - "host": null, "adapter": "web", "url": "http://www.dot.ph/whois" }, ".pk": { - "host": null, "adapter": "web", "url": "http://www.pknic.net.pk/" }, @@ -863,7 +796,6 @@ "host": "whois.nic.fr" }, ".pn": { - "host": null, "adapter": "web", "url": "http://www.pitcairn.pn/PnRegistry/" }, @@ -883,7 +815,6 @@ "host": "whois.nic.pw" }, ".py": { - "host": null, "adapter": "web", "url": "http://www.nic.py/consultas.html" }, @@ -906,7 +837,6 @@ "host": "whois.tcinet.ru" }, ".rw": { - "host": null, "adapter": "none" }, ".sa": { @@ -920,7 +850,6 @@ "adapter": "afilias" }, ".sd": { - "host": null, "adapter": "none" }, ".se": { @@ -936,7 +865,6 @@ "host": "whois.register.si" }, ".sj": { - "host": null, "adapter": "none" }, ".sk": { @@ -955,7 +883,6 @@ "host": "whois.nic.so" }, ".sr": { - "host": null, "adapter": "none" }, ".st": { @@ -965,7 +892,6 @@ "host": "whois.tcinet.ru" }, ".sv": { - "host": null, "adapter": "web", "url": "http://www.uca.edu.sv/dns/" }, @@ -976,14 +902,12 @@ "host": "whois.tld.sy" }, ".sz": { - "host": null, "adapter": "none" }, ".tc": { "host": "whois.nic.tc" }, ".td": { - "host": null, "adapter": "web", "url": "http://www.nic.td/" }, @@ -991,7 +915,6 @@ "host": "whois.nic.fr" }, ".tg": { - "host": null, "adapter": "web", "url": "http://www.nic.tg/" }, @@ -999,7 +922,6 @@ "host": "whois.thnic.co.th" }, ".tj": { - "host": null, "adapter": "web", "url": "http://www.nic.tj/whois.html" }, @@ -1019,14 +941,12 @@ "host": "whois.tonic.to" }, ".tp": { - "host": null, "adapter": "none" }, ".tr": { "host": "whois.nic.tr" }, ".tt": { - "host": null, "adapter": "web", "url": "http://www.nic.tt/cgi-bin/search.pl" }, @@ -1053,42 +973,33 @@ "host": "whois.ja.net" }, ".bl.uk": { - "host": null, "adapter": "none" }, ".british-library.uk": { - "host": null, "adapter": "none" }, ".gov.uk": { "host": "whois.ja.net" }, ".icnet.uk": { - "host": null, "adapter": "none" }, ".jet.uk": { - "host": null, "adapter": "none" }, ".mod.uk": { - "host": null, "adapter": "none" }, ".nhs.uk": { - "host": null, "adapter": "none" }, ".nls.uk": { - "host": null, "adapter": "none" }, ".parliament.uk": { - "host": null, "adapter": "none" }, ".police.uk": { - "host": null, "adapter": "none" }, ".uk": { @@ -1098,7 +1009,6 @@ "host": "whois.nic.us" }, ".com.uy": { - "host": null, "adapter": "web", "url": "https://nic.anteldata.com.uy/dns/consultaWhois/whois.action" }, @@ -1109,7 +1019,6 @@ "host": "whois.cctld.uz" }, ".va": { - "host": null, "adapter": "none" }, ".vc": { @@ -1123,12 +1032,10 @@ "host": "whois.nic.vg" }, ".vi": { - "host": null, "adapter": "web", "url": "http://www.nic.vi/whoisform.htm" }, ".vn": { - "host": null, "adapter": "web", "url": "http://www.vnnic.vn/en/domain" }, @@ -1145,7 +1052,6 @@ "host": "whois.nic.xxx" }, ".ye": { - "host": null, "adapter": "none" }, ".yt": { @@ -1164,14 +1070,12 @@ "host": "org-whois.registry.net.za" }, ".za": { - "host": null, "adapter": "none" }, ".zm": { "host": "whois.nic.zm" }, ".zw": { - "host": null, "adapter": "none" }, @@ -1231,6 +1135,18 @@ "host": "whois.unitedtld.com" }, ".ink": { + "host": "whois.nic.ink" + }, + ".theatre": { + "host": "whois.nic.theatre" + }, + ".security": { + "host": "whois.nic.security" + }, + ".protection": { + "host": "whois.centralnic.com" + }, + ".stc": { "host": "whois.centralnic.com" }, ".stcgroup": { @@ -1278,6 +1194,12 @@ ".site": { "host": "whois.centralnic.com" }, + ".group": { + "host": "whois.donuts.co" + }, + ".ltd": { + "host": "whois.donuts.co" + }, ".tires": { "host": "whois.donuts.co" }, @@ -1842,6 +1764,30 @@ ".xn--fjq720a": { "host": "whois.donuts.co" }, + ".beats": { + "host": "whois.afilias-srs.net" + }, + ".apple": { + "host": "whois.afilias-srs.net" + }, + ".cipriani": { + "host": "whois.afilias-srs.net" + }, + ".stockholm": { + "host": "whois.afilias-srs.net" + }, + ".zara": { + "host": "whois.afilias-srs.net" + }, + ".stada": { + "host": "whois.afilias-srs.net" + }, + ".ceb": { + "host": "whois.afilias-srs.net" + }, + ".fage": { + "host": "whois.afilias-srs.net" + }, ".irish": { "host": "whois.afilias-srs.net" }, @@ -2124,9 +2070,15 @@ ".iinet": { "host": "whois.aridnrs.net.au" }, + ".car": { + "host": "whois.uniregistry.net" + }, ".game": { "host": "whois.uniregistry.net" }, + ".mom": { + "host": "whois.uniregistry.net" + }, ".blackfriday": { "host": "whois.uniregistry.net" }, @@ -2580,6 +2532,63 @@ ".joburg": { "host": "joburg-whois.registry.net.za" }, + ".xn--55qx5d": { + "host": "whois.ngtld.cn" + }, + ".xn--vuq861b": { + "host": "whois.ngtld.cn" + }, + ".xn--io0a7i": { + "host": "whois.ngtld.cn" + }, + ".xn--1qqw23a": { + "host": "whois.ngtld.cn" + }, + ".xn--xhq521b": { + "host": "whois.ngtld.cn" + }, + ".xn--fiqs8s": { + "host": "cwhois.cnnic.cn" + }, + ".xn--fiqz9s": { + "host": "cwhois.cnnic.cn" + }, + ".xn--ses554g": { + "host": "whois.registry.knet.cn" + }, + ".xn--fiq64b": { + "host": "whois.gtld.knet.cn" + }, + ".wang": { + "host": "whois.gtld.knet.cn" + }, + ".xn--3bst00m": { + "host": "whois.gtld.knet.cn" + }, + ".xn--6qq986b3xl": { + "host": "whois.gtld.knet.cn" + }, + ".xn--czru2d": { + "host": "whois.gtld.knet.cn" + }, + ".globo": { + "host": "whois.gtlds.nic.br" + }, + ".bom": { + "host": "whois.gtlds.nic.br" + }, + ".final": { + "host": "whois.gtlds.nic.br" + }, + ".rio": { + "host": "whois.gtlds.nic.br" + }, + ".uol": { + "host": "whois.gtlds.nic.br" + }, + ".aarp": { + "host": "whois.nic.aarp" + }, ".lat": { "host": "whois.nic.lat" }, @@ -2676,6 +2685,9 @@ ".buzz": { "host": "whois.nic.buzz" }, + ".linde": { + "host": "whois.nic.linde" + }, ".bar": { "host": "whois.nic.bar" }, @@ -2688,6 +2700,9 @@ ".build": { "host": "whois.nic.build" }, + ".clubmed": { + "host": "whois.nic.clubmed" + }, ".ceo": { "host": "whois.nic.ceo" }, @@ -2703,9 +2718,15 @@ ".menu": { "host": "whois.nic.menu" }, + ".obi": { + "host": "whois.nic.obi" + }, ".monash": { "host": "whois.nic.monash" }, + ".bms": { + "host": "whois.nic.bms" + }, ".moe": { "host": "whois.nic.moe" }, @@ -2931,6 +2952,15 @@ ".sandvik": { "host": "whois.nic.sandvik" }, + ".hyundai": { + "host": "whois.nic.hyundai" + }, + ".kia": { + "host": "whois.nic.kia" + }, + ".seven": { + "host": "whois.nic.seven" + }, ".sandvikcoromant": { "host": "whois.nic.sandvikcoromant" }, @@ -2952,6 +2982,9 @@ ".aeg": { "host": "whois.nic.aeg" }, + ".arte": { + "host": "whois.nic.arte" + }, ".genting": { "host": "whois.nic.genting" }, @@ -2973,6 +3006,15 @@ ".vista": { "host": "whois.nic.vista" }, + ".jaguar": { + "host": "whois.nic.jaguar" + }, + ".landrover": { + "host": "whois.nic.landrover" + }, + ".rwe": { + "host": "whois.nic.rwe" + }, ".vistaprint": { "host": "whois.nic.vistaprint" }, @@ -3006,6 +3048,12 @@ ".party": { "host": "whois.nic.party" }, + ".mtr": { + "host": "whois.nic.mtr" + }, + ".virgin": { + "host": "whois.nic.virgin" + }, ".racing": { "host": "whois.nic.racing" }, @@ -3066,9 +3114,78 @@ ".seek": { "host": "whois.nic.seek" }, + ".csc": { + "host": "whois.nic.csc" + }, + ".sbs": { + "host": "whois.nic.sbs" + }, + ".xn--efvy88h": { + "host": "whois.nic.xn--efvy88h" + }, + ".xn--11b4c3d": { + "host": "whois.nic.xn--11b4c3d" + }, + ".xn--3pxu8k": { + "host": "whois.nic.xn--3pxu8k" + }, + ".xn--42c2d9a": { + "host": "whois.nic.xn--42c2d9a" + }, + ".xn--9dbq2a": { + "host": "whois.nic.xn--9dbq2a" + }, + ".xn--c2br7g": { + "host": "whois.nic.xn--c2br7g" + }, + ".xn--fhbei": { + "host": "whois.nic.xn--fhbei" + }, + ".xn--j1aef": { + "host": "whois.nic.xn--j1aef" + }, + ".xn--mk1bu44c": { + "host": "whois.nic.xn--mk1bu44c" + }, + ".xn--pssy2u": { + "host": "whois.nic.xn--pssy2u" + }, + ".xn--t60b56a": { + "host": "whois.nic.xn--t60b56a" + }, + ".xn--tckwe": { + "host": "whois.nic.xn--tckwe" + }, ".aaa": { "adapter": "none" }, + ".moi": { + "adapter": "none" + }, + ".meo": { + "adapter": "none" + }, + ".gucci": { + "adapter": "none" + }, + ".yamaxun": { + "adapter": "none" + }, + ".aramco": { + "adapter": "none" + }, + ".xn--mgba3a3ejt": { + "adapter": "none" + }, + ".dell": { + "adapter": "none" + }, + ".amica": { + "adapter": "none" + }, + ".kinder": { + "adapter": "none" + }, ".ipiranga": { "adapter": "none" }, @@ -3102,9 +3219,6 @@ ".yokohama": { "adapter": "none" }, - ".xn--ses554g": { - "adapter": "none" - }, ".williamhill": { "adapter": "none" }, @@ -3246,6 +3360,12 @@ ".hsbc": { "adapter": "none" }, + ".ping": { + "adapter": "none" + }, + ".sapo": { + "adapter": "none" + }, ".iwc": { "adapter": "none" }, @@ -3261,66 +3381,36 @@ ".bharti": { "adapter": "none" }, + ".xn--qxam": { + "adapter": "none" + }, + ".xn--mgbtx2b": { + "host": "whois.cmc.iq" + }, ".xn--y9a3aq": { "host": "whois.amnic.net" }, ".voting": { "host": "whois.voting.tld-box.at" }, - ".wang": { - "host": "whois.gtld.knet.cn" - }, ".xn--9et52u": { "host": "whois.nic.wang" }, - ".xn--3bst00m": { - "host": "whois.gtld.knet.cn" - }, ".xn--55qw42g": { "host": "whois.conac.cn" }, - ".xn--55qx5d": { - "host": "whois.ngtld.cn" - }, - ".xn--vuq861b": { - "host": "whois.ngtld.cn" - }, - ".xn--6qq986b3xl": { - "host": "whois.gtld.knet.cn" - }, - ".xn--io0a7i": { - "host": "whois.ngtld.cn" - }, ".xn--ngbc5azd": { "host": "whois.nic.xn--ngbc5azd" }, ".xn--zfr164b": { "host": "whois.conac.cn" }, - ".xn--czru2d": { - "host": "whois.gtld.knet.cn" - }, ".xn--80adxhks": { "host": "whois.nic.xn--80adxhks" }, ".xn--cg4bki": { "host": "whois.kr" }, - ".globo": { - "host": "whois.gtlds.nic.br" - }, - ".rio": { - "host": "whois.gtlds.nic.br" - }, - ".xn--1qqw23a": { - "host": "whois.ngtld.cn" - }, - ".xn--xhq521b": { - "host": "whois.ngtld.cn" - }, - ".uol": { - "host": "whois.gtlds.nic.br" - }, ".xn--p1acf": { "host": "whois.nic.xn--p1acf" }, @@ -3354,7 +3444,7 @@ "host": "whois.nic.kz" }, ".xn--90a3ac": { - "adapter": "none" + "host": "whois.rnids.rs" }, ".xn--cg4bki": { "host": "whois.kr" @@ -3362,15 +3452,6 @@ ".xn--clchc0ea0b2g2a9gcd": { "host": "whois.sgnic.sg" }, - ".xn--fiq64b": { - "host": "whois.gtld.knet.cn" - }, - ".xn--fiqs8s": { - "host": "cwhois.cnnic.cn" - }, - ".xn--fiqz9s": { - "host": "cwhois.cnnic.cn" - }, ".xn--fpcrj9c3d": { "adapter": "none" }, diff --git a/lib/whois/version.rb b/lib/whois/version.rb index f116d6f18..258b358ea 100644 --- a/lib/whois/version.rb +++ b/lib/whois/version.rb @@ -13,7 +13,7 @@ module Whois module Version MAJOR = 3 MINOR = 6 - PATCH = 2 + PATCH = 3 BUILD = nil STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join(".") diff --git a/spec/fixtures/responses/whois.ripe.net/gm/status_available.expected b/spec/fixtures/responses/whois.ripe.net/gm/status_available.expected deleted file mode 100644 index 982cebd7d..000000000 --- a/spec/fixtures/responses/whois.ripe.net/gm/status_available.expected +++ /dev/null @@ -1,23 +0,0 @@ -#status - %s == :available - -#available? - %s == true - -#registered? - %s == false - - -#created_on - %s %ERROR{AttributeNotSupported} - -#updated_on - %s %ERROR{AttributeNotSupported} - -#expires_on - %s %ERROR{AttributeNotSupported} - - -#nameservers - %s %CLASS{array} - %s == [] diff --git a/spec/fixtures/responses/whois.ripe.net/gm/status_available.txt b/spec/fixtures/responses/whois.ripe.net/gm/status_available.txt deleted file mode 100644 index 90b15dc2f..000000000 --- a/spec/fixtures/responses/whois.ripe.net/gm/status_available.txt +++ /dev/null @@ -1,11 +0,0 @@ -% This is the RIPE Database query service. -% The objects are in RPSL format. -% -% The RIPE Database is subject to Terms and Conditions. -% See http://www.ripe.net/db/support/db-terms-conditions.pdf - -%ERROR:101: no entries found -% -% No entries found in the selected source(s). - - diff --git a/spec/fixtures/responses/whois.ripe.net/gm/status_registered.expected b/spec/fixtures/responses/whois.ripe.net/gm/status_registered.expected deleted file mode 100644 index 11cbdb26c..000000000 --- a/spec/fixtures/responses/whois.ripe.net/gm/status_registered.expected +++ /dev/null @@ -1,27 +0,0 @@ -#status - %s == :registered - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %ERROR{AttributeNotSupported} - -#updated_on - %s %ERROR{AttributeNotSupported} - -#expires_on - %s %ERROR{AttributeNotSupported} - - -#nameservers - %s %CLASS{array} - %s %SIZE{2} - %s[0] %CLASS{nameserver} - %s[0].name == "ns1.commit.gm" - %s[1] %CLASS{nameserver} - %s[1].name == "ns1.sol.no" diff --git a/spec/fixtures/responses/whois.ripe.net/gm/status_registered.txt b/spec/fixtures/responses/whois.ripe.net/gm/status_registered.txt deleted file mode 100644 index 12649ef29..000000000 --- a/spec/fixtures/responses/whois.ripe.net/gm/status_registered.txt +++ /dev/null @@ -1,37 +0,0 @@ -% This is the RIPE Database query service. -% The objects are in RPSL format. -% -% The RIPE Database is subject to Terms and Conditions. -% See http://www.ripe.net/db/support/db-terms-conditions.pdf - -% Note: This output has been filtered. -% To receive output for a database update, use the "-B" flag. - -% Information related to 'nic.gm' - -domain: nic.gm -descr: Network Info Centre in The Gambia domain -admin-c: JG716-RIPE -tech-c: JG716-RIPE -zone-c: JG716-RIPE -nserver: ns1.commit.gm -nserver: ns1.sol.no -mnt-by: GM-TLD-MNT -remarks: Unmaintained sub domain object. -remarks: Parent TLD object maintainer added by RIPE NCC. -remarks: For more information see: -remarks: http://www.ripe.net/db/support/security/domain/syntax.html -source: RIPE # Filtered - -person: Jorn Grotnes -address: Nextsite Systems -address: Gjerdrumsgata 50B -address: 2000 LILLESTROM -address: NORWAY -phone: + 47 93007731 -fax-no: + 47 94740047 -e-mail: jgr@nextsite.com -nic-hdl: JG716-RIPE -source: RIPE # Filtered - - diff --git a/spec/support/example/parser_example_group.rb b/spec/support/example/parser_example_group.rb index c6ec7c628..a57791d80 100644 --- a/spec/support/example/parser_example_group.rb +++ b/spec/support/example/parser_example_group.rb @@ -13,11 +13,11 @@ def load_part(path) @cached_properties end - cache.key?(property).should be_falsey + expect(cache.key?(property)).to be_falsey value = instance.send(property) - cache.key?(property).should be_truthy - cache[property].should == value + expect(cache.key?(property)).to be_truthy + expect(cache[property]).to eq(value) true end @@ -35,7 +35,5 @@ def c.escaped_path(*parts) /#{parts.join('\/')}/ end - c.include ParserExampleGroup, :example_group => { - :file_path => c.escaped_path(%w( spec whois record parser )) - } + c.include ParserExampleGroup, file_path: c.escaped_path(%w( spec whois record parser )) end diff --git a/spec/whois/client_spec.rb b/spec/whois/client_spec.rb index eceeb9bfd..f402fdbd6 100644 --- a/spec/whois/client_spec.rb +++ b/spec/whois/client_spec.rb @@ -4,39 +4,39 @@ describe "#initialize" do it "accepts a zero parameters" do - lambda { described_class.new }.should_not raise_error + expect { described_class.new }.to_not raise_error end it "accepts a settings parameter" do - lambda { described_class.new({ :foo => "bar" }) }.should_not raise_error + expect { described_class.new({ :foo => "bar" }) }.to_not raise_error end it "accepts a timeout setting with a value in seconds" do client = described_class.new(:timeout => 100) - client.timeout.should == 100 + expect(client.timeout).to eq(100) end it "accepts a timeout setting with a nil value" do client = described_class.new(:timeout => nil) - client.timeout.should be_nil + expect(client.timeout).to be_nil end it "accepts a block" do described_class.new do |client| - client.should be_instance_of(described_class) + expect(client).to be_instance_of(described_class) end end it "defaults timeout setting to DEFAULT_TIMEOUT" do client = described_class.new - client.timeout.should == described_class::DEFAULT_TIMEOUT + expect(client.timeout).to eq(described_class::DEFAULT_TIMEOUT) end it "sets settings to given argument, except timeout" do client = described_class.new(:timeout => nil, :foo => "bar") - client.settings.should == { :foo => "bar" } + expect(client.settings).to eq({ :foo => "bar" }) end end diff --git a/spec/whois/errors_spec.rb b/spec/whois/errors_spec.rb index 1ac93f25e..c320331b6 100644 --- a/spec/whois/errors_spec.rb +++ b/spec/whois/errors_spec.rb @@ -4,7 +4,7 @@ describe "#initialize" do it "sets the URL" do - described_class.new("http://example.com").url.should == "http://example.com" + expect(described_class.new("http://example.com").url).to eq("http://example.com") end it "requires the URL argument" do @@ -16,7 +16,7 @@ describe "#message" do it "interpolates the URL" do - described_class.new("http://example.com").message.should match(%r{http://example.com}) + expect(described_class.new("http://example.com").message).to match(%r{http://example.com}) end end diff --git a/spec/whois/record/contact_spec.rb b/spec/whois/record/contact_spec.rb index 8143f6cc2..43be8485f 100644 --- a/spec/whois/record/contact_spec.rb +++ b/spec/whois/record/contact_spec.rb @@ -5,55 +5,47 @@ describe Whois::Record::Contact do it "inherits from SuperStruct" do - described_class.ancestors.should include(SuperStruct) + expect(described_class.ancestors).to include(SuperStruct) end describe "#initialize" do it "accepts an empty value" do - lambda do - i = described_class.new - i.id.should be_nil - end.should_not raise_error + expect { + instance = described_class.new + expect(instance.id).to be_nil + }.to_not raise_error end it "accepts an empty hash" do - lambda do - i = described_class.new({}) - i.id.should be_nil - end.should_not raise_error + expect { + instance = described_class.new({}) + expect(instance.id).to be_nil + }.to_not raise_error end - # it "initializes a new instance from given params" do - # i = described_class.new(10, described_class::TYPE_REGISTRANT, "John Doe", nil) - - # i.id.should == 10 - # i.type.should == described_class::TYPE_REGISTRANT - # i.name.should == "John Doe" - # i.organization.should be_nil - # end - it "initializes a new instance from given hash" do - i = described_class.new(:id => 10, :name => "John Doe", :type => described_class::TYPE_REGISTRANT) + instance = described_class.new(:id => 10, :name => "John Doe", :type => described_class::TYPE_REGISTRANT) - i.id.should == 10 - i.type.should == described_class::TYPE_REGISTRANT - i.name.should == "John Doe" - i.organization.should be_nil + expect(instance.id).to eq(10) + expect(instance.type).to eq(described_class::TYPE_REGISTRANT) + expect(instance.name).to eq("John Doe") + expect(instance.organization).to be_nil end it "initializes a new instance from given block" do - i = described_class.new do |c| + inspect = described_class.new do |c| c.id = 10 c.type = described_class::TYPE_REGISTRANT c.name = "John Doe" end - i.id.should == 10 - i.type.should == described_class::TYPE_REGISTRANT - i.name.should == "John Doe" - i.organization.should be_nil + expect(inspect.id).to eq(10) + expect(inspect.type).to eq(described_class::TYPE_REGISTRANT) + expect(inspect.name).to eq("John Doe") + expect(inspect.organization).to be_nil end end end + diff --git a/spec/whois/record/nameserver_spec.rb b/spec/whois/record/nameserver_spec.rb index 5c7ad0499..a5c4e71aa 100644 --- a/spec/whois/record/nameserver_spec.rb +++ b/spec/whois/record/nameserver_spec.rb @@ -5,58 +5,50 @@ describe Whois::Record::Nameserver do it "inherits from SuperStruct" do - described_class.ancestors.should include(SuperStruct) + expect(described_class.ancestors).to include(SuperStruct) end describe "#initialize" do it "accepts an empty value" do - lambda do - i = described_class.new - i.name.should be_nil - end.should_not raise_error + expect { + instance = described_class.new + expect(instance.name).to be_nil + }.to_not raise_error end it "accepts an empty hash" do - lambda do - i = described_class.new({}) - i.name.should be_nil - end.should_not raise_error + expect { + instance = described_class.new({}) + expect(instance.name).to be_nil + }.to_not raise_error end - # it "initializes a new instance from given params" do - # i = described_class.new("ns1.example.com", "127.0.0.1") - - # i.name.should == "ns1.example.com" - # i.ipv4.should == "127.0.0.1" - # i.ipv6.should be_nil - # end - it "initializes a new instance from given hash" do - i = described_class.new(:name => "ns1.example.com", :ipv4 => "127.0.0.1") + instance = described_class.new(:name => "ns1.example.com", :ipv4 => "127.0.0.1") - i.name.should == "ns1.example.com" - i.ipv4.should == "127.0.0.1" - i.ipv6.should be_nil + expect(instance.name).to eq("ns1.example.com") + expect(instance.ipv4).to eq("127.0.0.1") + expect(instance.ipv6).to be_nil end it "initializes a new instance from given block" do - i = described_class.new do |c| + instance = described_class.new do |c| c.name = "ns1.example.com" c.ipv4 = "127.0.0.1" end - i.name.should == "ns1.example.com" - i.ipv4.should == "127.0.0.1" - i.ipv6.should be_nil + expect(instance.name).to eq("ns1.example.com") + expect(instance.ipv4).to eq("127.0.0.1") + expect(instance.ipv6).to be_nil end end describe "#to_s" do it "returns the string representation of this object" do - described_class.new(:name => "ns1.example.com").to_s.should == "ns1.example.com" - described_class.new(:name => nil).to_s.should == "" - described_class.new.to_s.should == "" + expect(described_class.new(name: "ns1.example.com").to_s).to eq("ns1.example.com") + expect(described_class.new(name: nil).to_s).to eq("") + expect(described_class.new.to_s).to eq("") end end diff --git a/spec/whois/record/parser/base_spec.rb b/spec/whois/record/parser/base_spec.rb index e6fbf29c4..7c3ba316d 100644 --- a/spec/whois/record/parser/base_spec.rb +++ b/spec/whois/record/parser/base_spec.rb @@ -14,7 +14,7 @@ koncrete = Class.new(described_class) koncrete.property_register(:greetings, Whois::Record::Parser::PROPERTY_STATE_SUPPORTED) - koncrete._properties[:greetings].should eq(Whois::Record::Parser::PROPERTY_STATE_SUPPORTED) + expect(koncrete._properties[:greetings]).to eq(Whois::Record::Parser::PROPERTY_STATE_SUPPORTED) end end @@ -22,49 +22,49 @@ it "returns false if the property is not supported" do koncrete = Class.new(described_class) do end - koncrete.new(part).property_supported?(:disclaimer).should be_falsey - koncrete.new(part).respond_to?(:disclaimer).should be_truthy + expect(koncrete.new(part).property_supported?(:disclaimer)).to be_falsey + expect(koncrete.new(part).respond_to?(:disclaimer)).to be_truthy end it "returns true if the property is supported" do koncrete = Class.new(described_class) do property_register(:disclaimer, Whois::Record::Parser::PROPERTY_STATE_SUPPORTED) {} end - koncrete.new(part).property_supported?(:disclaimer).should be_truthy - koncrete.new(part).respond_to?(:disclaimer).should be_truthy + expect(koncrete.new(part).property_supported?(:disclaimer)).to be_truthy + expect(koncrete.new(part).respond_to?(:disclaimer)).to be_truthy end end describe "#initialize" do it "requires a part" do - lambda { described_class.new }.should raise_error(ArgumentError) - lambda { described_class.new(part) }.should_not raise_error + expect { described_class.new }.to raise_error(ArgumentError) + expect { described_class.new(part) }.to_not raise_error end it "sets the part" do - described_class.new(part).part.should be(part) + expect(described_class.new(part).part).to be(part) end end describe "#content" do it "returns the part body" do - i = described_class.new(part) - i.content.should be(part.body) + instance = described_class.new(part) + expect(instance.content).to be(part.body) end end describe "#content_for_scanner" do it "returns the part body with line feed normalized" do - i = described_class.new(Whois::Record::Part.new(:body => "This is\r\nthe response.", :host => "whois.example.test")) - i.send(:content_for_scanner).should == "This is\nthe response." + instance = described_class.new(Whois::Record::Part.new(:body => "This is\r\nthe response.", :host => "whois.example.test")) + expect(instance.send(:content_for_scanner)).to eq("This is\nthe response.") end it "caches the result" do - i = described_class.new(Whois::Record::Part.new(:body => "This is\r\nthe response.", :host => "whois.example.test")) - i.instance_eval { @content_for_scanner }.should be_nil - i.send(:content_for_scanner) - i.instance_eval { @content_for_scanner }.should == "This is\nthe response." + instance = described_class.new(Whois::Record::Part.new(:body => "This is\r\nthe response.", :host => "whois.example.test")) + expect(instance.instance_eval { @content_for_scanner }).to be_nil + instance.send(:content_for_scanner) + expect(instance.instance_eval { @content_for_scanner }).to eq("This is\nthe response.") end end @@ -75,67 +75,67 @@ end it "does not call the method if the object does not respond to the method" do koncrete = Class.new(described_class).new(Whois::Record::Part.new) - koncrete.is(:response_throttled?).should be_falsey + expect(koncrete.is(:response_throttled?)).to be_falsey end end describe "#validate!" do it "raises Whois::ResponseIsThrottled when the response is throttled" do koncrete = Class.new(described_class) { def response_throttled?; true; end }.new(Whois::Record::Part.new) - lambda { koncrete.validate! }.should raise_error(Whois::ResponseIsThrottled) + expect { koncrete.validate! }.to raise_error(Whois::ResponseIsThrottled) koncrete = Class.new(described_class) { def response_throttled?; false; end }.new(Whois::Record::Part.new) - lambda { koncrete.validate! }.should_not raise_error + expect { koncrete.validate! }.to_not raise_error end it "raises Whois::ResponseIsUnavailable when the response is unavailable" do koncrete = Class.new(described_class) { def response_unavailable?; true; end }.new(Whois::Record::Part.new) - lambda { koncrete.validate! }.should raise_error(Whois::ResponseIsUnavailable) + expect { koncrete.validate! }.to raise_error(Whois::ResponseIsUnavailable) koncrete = Class.new(described_class) { def response_unavailable?; false; end }.new(Whois::Record::Part.new) - lambda { koncrete.validate! }.should_not raise_error + expect { koncrete.validate! }.to_not raise_error end end describe "#changed?" do it "raises if the argument is not an instance of the same class" do - lambda do + expect { described_class.new(part).changed?(Object.new) - end.should raise_error(ArgumentError) + }.to raise_error(ArgumentError) - lambda do + expect { described_class.new(part).changed?(described_class.new(part)) - end.should_not raise_error + }.to_not raise_error end end describe "#unchanged?" do it "raises if the argument is not an instance of the same class" do - lambda do + expect { described_class.new(part).unchanged?(Object.new) - end.should raise_error(ArgumentError) + }.to raise_error(ArgumentError) - lambda do + expect { described_class.new(part).unchanged?(described_class.new(part)) - end.should_not raise_error + }.to_not raise_error end it "returns true if self and other references the same object" do - i = described_class.new(part) - i.unchanged?(i).should be_truthy + instance = described_class.new(part) + expect(instance.unchanged?(instance)).to be_truthy end it "returns true if the content_for_scanner is the same" do - i = described_class.new(Whois::Record::Part.new(:body => "This is the\nresponse 1.", :host => "whois.example.test")) - o = described_class.new(Whois::Record::Part.new(:body => "This is the\r\nresponse 1.", :host => "whois.example.test")) - i.unchanged?(o).should be_truthy + instance = described_class.new(Whois::Record::Part.new(:body => "This is the\nresponse 1.", :host => "whois.example.test")) + other = described_class.new(Whois::Record::Part.new(:body => "This is the\r\nresponse 1.", :host => "whois.example.test")) + expect(instance.unchanged?(other)).to be_truthy end it "returns false if the content_for_scanner is not the same" do - i = described_class.new(Whois::Record::Part.new(:body => "This is the response 1.", :host => "whois.example.test")) - o = described_class.new(Whois::Record::Part.new(:body => "This is the response 2.", :host => "whois.example.test")) - i.unchanged?(o).should be_falsey + instance = described_class.new(Whois::Record::Part.new(:body => "This is the response 1.", :host => "whois.example.test")) + other = described_class.new(Whois::Record::Part.new(:body => "This is the response 2.", :host => "whois.example.test")) + expect(instance.unchanged?(other)).to be_falsey end end @@ -144,67 +144,67 @@ c1 = Whois::Record::Contact.new(:id => "1st", :name => "foo") c2 = Whois::Record::Contact.new(:id => "2nd", :name => "foo") c3 = Whois::Record::Contact.new(:id => "3rd", :name => "foo") - koncrete = Class.new(described_class) do + instance = Class.new(described_class) do property_supported(:registrant_contacts) { [c1, c2] } property_supported(:admin_contacts) { [] } property_supported(:technical_contacts) { [c3] } end.new(part) - koncrete.contacts.should == [c1, c2, c3] + expect(instance.contacts).to eq([c1, c2, c3]) end it "returns an empty array when no contact is supported" do - i = described_class.new(part) - i.contacts.should == [] + instance = described_class.new(part) + expect(instance.contacts).to eq([]) end end describe "#response_incomplete?" do it "is undefined" do - described_class.new(part).respond_to?(:response_incomplete?).should be_falsey + expect(described_class.new(part).respond_to?(:response_incomplete?)).to be_falsey end # it "returns nil" do # i = described_class.new(part) - # i.response_incomplete?.should be_nil + # expect(i.response_incomplete?).to be_nil # end # # it "is false" do # i = described_class.new(part) - # i.response_incomplete?.should be_falsey + # expect(i.response_incomplete?).to be_falsey # end end describe "#response_throttled?" do it "is undefined" do - described_class.new(part).respond_to?(:response_throttled?).should be_falsey + expect(described_class.new(part).respond_to?(:response_throttled?)).to be_falsey end # it "returns nil" do # i = described_class.new(part) - # i.response_throttled?.should be_nil + # expect(i.response_throttled?).to be_nil # end # # it "is false" do # i = described_class.new(part) - # i.response_throttled?.should be_falsey + # expect(i.response_throttled?).to be_falsey # end end describe "#response_unavailable?" do it "is undefined" do - described_class.new(part).respond_to?(:response_unavailable?).should be_falsey + expect(described_class.new(part).respond_to?(:response_unavailable?)).to be_falsey end # it "returns nil" do # i = described_class.new(part) - # i.response_unavailable?.should be_nil + # expect(i.response_unavailable?).to be_nil # end # # it "is false" do # i = described_class.new(part) - # i.response_unavailable?.should be_falsey + # expect(i.response_unavailable?).to be_falsey # end end diff --git a/spec/whois/record/parser/responses/whois.ripe.net/gm/status_available_spec.rb b/spec/whois/record/parser/responses/whois.ripe.net/gm/status_available_spec.rb deleted file mode 100644 index c256be086..000000000 --- a/spec/whois/record/parser/responses/whois.ripe.net/gm/status_available_spec.rb +++ /dev/null @@ -1,60 +0,0 @@ -# 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.ripe.net/gm/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/record/parser/whois.ripe.net.rb' - -describe Whois::Record::Parser::WhoisRipeNet, "status_available.expected" do - - subject do - file = fixture("responses", "whois.ripe.net/gm/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end -end diff --git a/spec/whois/record/parser/responses/whois.ripe.net/gm/status_registered_spec.rb b/spec/whois/record/parser/responses/whois.ripe.net/gm/status_registered_spec.rb deleted file mode 100644 index 6ab3452c6..000000000 --- a/spec/whois/record/parser/responses/whois.ripe.net/gm/status_registered_spec.rb +++ /dev/null @@ -1,64 +0,0 @@ -# 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.ripe.net/gm/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/record/parser/whois.ripe.net.rb' - -describe Whois::Record::Parser::WhoisRipeNet, "status_registered.expected" do - - subject do - file = fixture("responses", "whois.ripe.net/gm/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Record::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.commit.gm") - expect(subject.nameservers[1]).to be_a(Whois::Record::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.sol.no") - end - end -end diff --git a/spec/whois/record/parser_spec.rb b/spec/whois/record/parser_spec.rb index 2844e01c1..f9fa5a454 100644 --- a/spec/whois/record/parser_spec.rb +++ b/spec/whois/record/parser_spec.rb @@ -146,44 +146,44 @@ class Whois::Record::Parser::ParserUnsupportedTest < Whois::Record::Parser::Base end it "delegates to first parser when all supported" do - r = Whois::Record.new(nil, [Whois::Record::Part.new(body: "", host: "parser.supported.test"), Whois::Record::Part.new(body: "", host: "parser.undefined.test")]) - expect(described_class.new(r).status).to eq(:status_undefined) - r = Whois::Record.new(nil, [Whois::Record::Part.new(body: "", host: "parser.undefined.test"), Whois::Record::Part.new(body: "", host: "parser.supported.test")]) - expect(described_class.new(r).status).to eq(:status_supported) + record = Whois::Record.new(nil, [Whois::Record::Part.new(body: "", host: "parser.supported.test"), Whois::Record::Part.new(body: "", host: "parser.undefined.test")]) + expect(described_class.new(record).status).to eq(:status_undefined) + record = Whois::Record.new(nil, [Whois::Record::Part.new(body: "", host: "parser.undefined.test"), Whois::Record::Part.new(body: "", host: "parser.supported.test")]) + expect(described_class.new(record).status).to eq(:status_supported) end it "delegates to first parser when one supported" do - r = Whois::Record.new(nil, [Whois::Record::Part.new(body: "", host: "parser.supported.test"), Whois::Record::Part.new(body: "", host: "parser.undefined.test")]) - expect(described_class.new(r).created_on).to eq(:created_on_supported) - r = Whois::Record.new(nil, [Whois::Record::Part.new(body: "", host: "parser.undefined.test"), Whois::Record::Part.new(body: "", host: "parser.supported.test")]) - expect(described_class.new(r).created_on).to eq(:created_on_supported) + record = Whois::Record.new(nil, [Whois::Record::Part.new(body: "", host: "parser.supported.test"), Whois::Record::Part.new(body: "", host: "parser.undefined.test")]) + expect(described_class.new(record).created_on).to eq(:created_on_supported) + record = Whois::Record.new(nil, [Whois::Record::Part.new(body: "", host: "parser.undefined.test"), Whois::Record::Part.new(body: "", host: "parser.supported.test")]) + expect(described_class.new(record).created_on).to eq(:created_on_supported) end it "raises unless at least one is supported" do expect { - r = Whois::Record.new(nil, [Whois::Record::Part.new(body: "", host: "parser.unsupported.test"), Whois::Record::Part.new(body: "", host: "parser.unsupported.test")]) - described_class.new(r).created_on + record = Whois::Record.new(nil, [Whois::Record::Part.new(body: "", host: "parser.unsupported.test"), Whois::Record::Part.new(body: "", host: "parser.unsupported.test")]) + described_class.new(record).created_on }.to raise_error(Whois::AttributeNotSupported) end it "raises when parsers are undefined" do expect { - r = Whois::Record.new(nil, [Whois::Record::Part.new(body: "", host: "parser.undefined.test"), Whois::Record::Part.new(body: "", host: "parser.undefined.test")]) - described_class.new(r).created_on + record = Whois::Record.new(nil, [Whois::Record::Part.new(body: "", host: "parser.undefined.test"), Whois::Record::Part.new(body: "", host: "parser.undefined.test")]) + described_class.new(record).created_on }.to raise_error(Whois::AttributeNotImplemented) end it "raises when zero parts" do expect { - r = Whois::Record.new(nil, []) - described_class.new(r).created_on + record = Whois::Record.new(nil, []) + described_class.new(record).created_on }.to raise_error(Whois::ParserError, /the Record is empty/) end it "does not delegate unknown properties" do expect { - r = Whois::Record.new(nil, [Whois::Record::Part.new(body: "", host: "parser.undefined.test")]) - described_class.new(r).unknown_method + record = Whois::Record.new(nil, [Whois::Record::Part.new(body: "", host: "parser.undefined.test")]) + described_class.new(record).unknown_method }.to raise_error(NoMethodError) end end @@ -193,66 +193,66 @@ class Whois::Record::Parser::ParserUnsupportedTest < Whois::Record::Parser::Base it "returns 0 parsers when 0 parts" do record = Whois::Record.new(nil, []) parser = described_class.new(record) - parser.parsers.size.should eq(0) - parser.parsers.should == [] + expect(parser.parsers.size).to eq(0) + expect(parser.parsers).to eq([]) end it "returns 1 parser when 1 part" do record = Whois::Record.new(nil, [Whois::Record::Part.new(body: nil, host: "whois.nic.it")]) parser = described_class.new(record) - parser.parsers.size.should eq(1) + expect(parser.parsers.size).to eq(1) end it "returns 2 parsers when 2 part" do record = Whois::Record.new(nil, [Whois::Record::Part.new(body: nil, host: "whois.verisign-grs.com"), Whois::Record::Part.new(body: nil, host: "whois.nic.it")]) parser = described_class.new(record) - parser.parsers.size.should eq(2) + expect(parser.parsers.size).to eq(2) end it "initializes the parsers in reverse order" do record = Whois::Record.new(nil, [Whois::Record::Part.new(body: nil, host: "whois.verisign-grs.com"), Whois::Record::Part.new(body: nil, host: "whois.nic.it")]) parser = described_class.new(record) - parser.parsers[0].should be_a(Whois::Record::Parser::WhoisNicIt) - parser.parsers[1].should be_a(Whois::Record::Parser::WhoisVerisignGrsCom) + expect(parser.parsers[0]).to be_a(Whois::Record::Parser::WhoisNicIt) + expect(parser.parsers[1]).to be_a(Whois::Record::Parser::WhoisVerisignGrsCom) end it "returns the host parser when the part is supported" do record = Whois::Record.new(nil, [Whois::Record::Part.new(body: nil, host: "whois.nic.it")]) parser = described_class.new(record) - parser.parsers.first.should be_a(Whois::Record::Parser::WhoisNicIt) + expect(parser.parsers.first).to be_a(Whois::Record::Parser::WhoisNicIt) end it "returns the Blank parser when the part is not supported" do record = Whois::Record.new(nil, [Whois::Record::Part.new(body: nil, host: "missing.nic.it")]) parser = described_class.new(record) - parser.parsers.first.should be_a(Whois::Record::Parser::Blank) + expect(parser.parsers.first).to be_a(Whois::Record::Parser::Blank) end end describe "#property_any_supported?" do it "returns false when 0 parts" do record = Whois::Record.new(nil, []) - described_class.new(record).property_any_supported?(:disclaimer).should be_falsey + expect(described_class.new(record).property_any_supported?(:disclaimer)).to be_falsey end it "returns true when 1 part supported" do record = Whois::Record.new(nil, [Whois::Record::Part.new(host: "whois.nic.it")]) - described_class.new(record).property_any_supported?(:disclaimer).should be_truthy + expect(described_class.new(record).property_any_supported?(:disclaimer)).to be_truthy end it "returns false when 1 part supported" do record = Whois::Record.new(nil, [Whois::Record::Part.new(host: "missing.nic.it")]) - described_class.new(record).property_any_supported?(:disclaimer).should be_falsey + expect(described_class.new(record).property_any_supported?(:disclaimer)).to be_falsey end it "returns true when 2 parts" do record = Whois::Record.new(nil, [Whois::Record::Part.new(host: "whois.verisign-grs.com"), Whois::Record::Part.new(host: "whois.nic.it")]) - described_class.new(record).property_any_supported?(:disclaimer).should be_truthy + expect(described_class.new(record).property_any_supported?(:disclaimer)).to be_truthy end it "returns true when 1 part supported 1 part not supported" do record = Whois::Record.new(nil, [Whois::Record::Part.new(host: "missing.nic.it"), Whois::Record::Part.new(host: "whois.nic.it")]) - described_class.new(record).property_any_supported?(:disclaimer).should be_truthy + expect(described_class.new(record).property_any_supported?(:disclaimer)).to be_truthy end end @@ -274,70 +274,70 @@ class Whois::Record::Parser::Contacts3Test< Whois::Record::Parser::Base it "returns an empty array when 0 parts" do record = Whois::Record.new(nil, []) parser = described_class.new(record) - parser.contacts.should == [] + expect(parser.contacts).to eq([]) end it "returns an array of contact when 1 part is supported" do record = Whois::Record.new(nil, [Whois::Record::Part.new(body: nil, host: "contacts2.test")]) parser = described_class.new(record) - parser.contacts.size.should eq(2) - parser.contacts.should == %w( p2-a1 p2-t1 ) + expect(parser.contacts.size).to eq(2) + expect(parser.contacts).to eq(%w( p2-a1 p2-t1 )) end it "returns an array of contact when 1 part is not supported" do record = Whois::Record.new(nil, [Whois::Record::Part.new(body: nil, host: "contacts1.test")]) parser = described_class.new(record) - parser.contacts.size.should eq(0) - parser.contacts.should == %w() + expect(parser.contacts.size).to eq(0) + expect(parser.contacts).to eq([]) end it "merges the contacts and returns an array of contact when 2 parts" do record = Whois::Record.new(nil, [Whois::Record::Part.new(body: nil, host: "contacts2.test"), Whois::Record::Part.new(body: nil, host: "contacts3.test")]) parser = described_class.new(record) - parser.contacts.size.should eq(3) - parser.contacts.should == %w( p3-t1 p2-a1 p2-t1 ) + expect(parser.contacts.size).to eq(3) + expect(parser.contacts).to eq(%w( p3-t1 p2-a1 p2-t1 )) end end describe "#changed?" do it "raises if the argument is not an instance of the same class" do - expect do + expect { described_class.new(record).changed?(Object.new) - end.to raise_error(ArgumentError) + }.to raise_error(ArgumentError) - expect do + expect { described_class.new(record).changed?(described_class.new(record)) - end.to_not raise_error + }.to_not raise_error end end describe "#unchanged?" do it "raises if the argument is not an instance of the same class" do - expect do + expect { described_class.new(record).unchanged?(Object.new) - end.to raise_error(ArgumentError) + }.to raise_error(ArgumentError) - expect do + expect { described_class.new(record).unchanged?(described_class.new(record)) - end.to_not raise_error + }.to_not raise_error end it "returns true if self and other references the same object" do instance = described_class.new(record) - instance.unchanged?(instance).should be_truthy + expect(instance.unchanged?(instance)).to be_truthy end it "returns false if parser and other.parser have different number of elements" do instance = described_class.new(Whois::Record.new(nil, [])) other = described_class.new(Whois::Record.new(nil, [Whois::Record::Part.new(body: "", host: "foo.example.test")])) - instance.unchanged?(other).should be_falsey + expect(instance.unchanged?(other)).to be_falsey end it "returns true if parsers and other.parsers have 0 elements" do instance = described_class.new(Whois::Record.new(nil, [])) other = described_class.new(Whois::Record.new(nil, [])) - instance.unchanged?(other).should be_truthy + expect(instance.unchanged?(other)).to be_truthy end @@ -345,14 +345,14 @@ class Whois::Record::Parser::Contacts3Test< Whois::Record::Parser::Base instance = described_class.new(Whois::Record.new(nil, [Whois::Record::Part.new(body: "hello", host: "foo.example.test"), Whois::Record::Part.new(body: "hello", host: "bar.example.test")])) other = described_class.new(Whois::Record.new(nil, [Whois::Record::Part.new(body: "hello", host: "foo.example.test"), Whois::Record::Part.new(body: "hello", host: "bar.example.test")])) - instance.unchanged?(other).should be_truthy + expect(instance.unchanged?(other)).to be_truthy end it "returns false unless every parser in self marches the corresponding parser in other" do instance = described_class.new(Whois::Record.new(nil, [Whois::Record::Part.new(body: "hello", host: "foo.example.test"), Whois::Record::Part.new(body: "world", host: "bar.example.test")])) other = described_class.new(Whois::Record.new(nil, [Whois::Record::Part.new(body: "hello", host: "foo.example.test"), Whois::Record::Part.new(body: "baby!", host: "bar.example.test")])) - instance.unchanged?(other).should be_falsey + expect(instance.unchanged?(other)).to be_falsey end end diff --git a/spec/whois/record/part_spec.rb b/spec/whois/record/part_spec.rb index e64f06beb..166db0353 100644 --- a/spec/whois/record/part_spec.rb +++ b/spec/whois/record/part_spec.rb @@ -3,47 +3,40 @@ describe Whois::Record::Part do it "inherits from SuperStruct" do - described_class.ancestors.should include(SuperStruct) + expect(described_class.ancestors).to include(SuperStruct) end describe "#initialize" do it "accepts an empty value" do - lambda do - i = described_class.new - i.body.should be_nil - end.should_not raise_error + expect { + instance = described_class.new + expect(instance.body).to be_nil + }.to_not raise_error end it "accepts an empty hash" do - lambda do - i = described_class.new({}) - i.body.should be_nil - end.should_not raise_error + expect { + instance = described_class.new({}) + expect(instance.body).to be_nil + }.to_not raise_error end - # it "initializes a new instance from given params" do - # i = described_class.new("This is a WHOIS record.", "whois.example.test") - - # i.body.should == "This is a WHOIS record." - # i.host.should == "whois.example.test" - # end - it "initializes a new instance from given hash" do - i = described_class.new(:body => "This is a WHOIS record.", :host => "whois.example.test") + instance = described_class.new(:body => "This is a WHOIS record.", :host => "whois.example.test") - i.body.should == "This is a WHOIS record." - i.host.should == "whois.example.test" + expect(instance.body).to eq("This is a WHOIS record.") + expect(instance.host).to eq("whois.example.test") end it "initializes a new instance from given block" do - i = described_class.new do |c| + instance = described_class.new do |c| c.body = "This is a WHOIS record." c.host = "whois.example.test" end - i.body.should == "This is a WHOIS record." - i.host.should == "whois.example.test" + expect(instance.body).to eq("This is a WHOIS record.") + expect(instance.host).to eq("whois.example.test") end end diff --git a/spec/whois/record/registrar_spec.rb b/spec/whois/record/registrar_spec.rb index 4d271ab1c..db5a7bef3 100644 --- a/spec/whois/record/registrar_spec.rb +++ b/spec/whois/record/registrar_spec.rb @@ -5,54 +5,45 @@ describe Whois::Record::Registrar do it "inherits from SuperStruct" do - described_class.ancestors.should include(SuperStruct) + expect(described_class.ancestors).to include(SuperStruct) end describe "#initialize" do it "accepts an empty value" do - lambda do - i = described_class.new - i.id.should be_nil - end.should_not raise_error + expect { + instance = described_class.new + expect(instance.id).to be_nil + }.to_not raise_error end it "accepts an empty hash" do - lambda do - i = described_class.new({}) - i.id.should be_nil - end.should_not raise_error + expect { + instance = described_class.new({}) + expect(instance.id).to be_nil + }.to_not raise_error end - # it "initializes a new instance from given params" do - # i = described_class.new(10, "John Doe", nil, "http://example.com") - - # i.id.should == 10 - # i.name.should == "John Doe" - # i.organization.should be_nil - # i.url.should == "http://example.com" - # end - it "initializes a new instance from given hash" do - i = described_class.new(:id => 10, :name => "John Doe", :url => "http://example.com") + instance = described_class.new(:id => 10, :name => "John Doe", :url => "http://example.com") - i.id.should == 10 - i.name.should == "John Doe" - i.organization.should be_nil - i.url.should == "http://example.com" + expect(instance.id).to eq(10) + expect(instance.name).to eq("John Doe") + expect(instance.organization).to be_nil + expect(instance.url).to eq("http://example.com") end it "initializes a new instance from given block" do - i = described_class.new do |c| + instance = described_class.new do |c| c.id = 10 c.name = "John Doe" c.url = "http://example.com" end - i.id.should == 10 - i.name.should == "John Doe" - i.organization.should be_nil - i.url.should == "http://example.com" + expect(instance.id).to eq(10) + expect(instance.name).to eq("John Doe") + expect(instance.organization).to be_nil + expect(instance.url).to eq("http://example.com") end end diff --git a/spec/whois/record/super_struct_spec.rb b/spec/whois/record/super_struct_spec.rb index dda310d85..b329134d8 100644 --- a/spec/whois/record/super_struct_spec.rb +++ b/spec/whois/record/super_struct_spec.rb @@ -5,21 +5,21 @@ SuperEroe = Class.new(SuperStruct.new(:name, :supername)) it "inherits from Struct" do - SuperEroe.ancestors.should include(Struct) + expect(SuperEroe.ancestors).to include(Struct) end describe "#initialize" do it "initializes a new instance from given hash" do - i = SuperEroe.new(:name => "Pippo", :supername => "SuperPippo") - i.name.should == "Pippo" - i.supername.should == "SuperPippo" + instance = SuperEroe.new(:name => "Pippo", :supername => "SuperPippo") + expect(instance.name).to eq("Pippo") + expect(instance.supername).to eq("SuperPippo") end it "initializes a new instance from given block" do - SuperEroe.new do |i| - i.should be_instance_of(SuperEroe) - i.should be_kind_of(SuperStruct) + SuperEroe.new do |instance| + expect(instance).to be_instance_of(SuperEroe) + expect(instance).to be_kind_of(SuperStruct) end end end diff --git a/spec/whois/record_spec.rb b/spec/whois/record_spec.rb index 7dc062c4f..038246ea2 100644 --- a/spec/whois/record_spec.rb +++ b/spec/whois/record_spec.rb @@ -18,19 +18,19 @@ describe "#initialize" do it "requires a server and parts" do - lambda { described_class.new }.should raise_error(ArgumentError) - lambda { described_class.new(server) }.should raise_error(ArgumentError) - lambda { described_class.new(server, parts) }.should_not raise_error + expect { described_class.new }.to raise_error(ArgumentError) + expect { described_class.new(server) }.to raise_error(ArgumentError) + expect { described_class.new(server, parts) }.to_not raise_error end it "sets server and parts from arguments" do instance = described_class.new(server, parts) - instance.server.should be(server) - instance.parts.should be(parts) + expect(instance.server).to be(server) + expect(instance.parts).to be(parts) instance = described_class.new(nil, nil) - instance.server.should be_nil - instance.parts.should be_nil + expect(instance.server).to be_nil + expect(instance.parts).to be_nil end end @@ -49,53 +49,53 @@ end it "returns true if method is in self" do - subject.respond_to?(:to_s).should be_truthy + expect(subject.respond_to?(:to_s)).to be_truthy end it "returns true if method is in hierarchy" do - subject.respond_to?(:nil?).should be_truthy + expect(subject.respond_to?(:nil?)).to be_truthy end it "returns true if method is a property" do Whois::Record::Parser::PROPERTIES << :test_property - subject.respond_to?(:test_property).should be_truthy + expect(subject.respond_to?(:test_property)).to be_truthy end it "returns true if method is a property?" do Whois::Record::Parser::PROPERTIES << :test_property - subject.respond_to?(:test_property?).should be_truthy + expect(subject.respond_to?(:test_property?)).to be_truthy end it "returns true if method is a method" do Whois::Record::Parser::METHODS << :test_method - subject.respond_to?(:test_method).should be_truthy + expect(subject.respond_to?(:test_method)).to be_truthy end it "returns true if method is a method" do Whois::Record::Parser::METHODS << :test_method - subject.respond_to?(:test_method?).should be_truthy + expect(subject.respond_to?(:test_method?)).to be_truthy end end describe "#to_s" do it "delegates to #content" do - described_class.new(nil, [parts[0]]).to_s.should == parts[0].body - described_class.new(nil, parts).to_s.should == parts.map(&:body).join("\n") - described_class.new(nil, []).to_s.should == "" + expect(described_class.new(nil, [parts[0]]).to_s).to eq(parts[0].body) + expect(described_class.new(nil, parts).to_s).to eq(parts.map(&:body).join("\n")) + expect(described_class.new(nil, []).to_s).to eq("") end end describe "#inspect" do it "inspects the record content" do - described_class.new(nil, [parts[0]]).inspect.should == parts[0].body.inspect + expect(described_class.new(nil, [parts[0]]).inspect).to eq(parts[0].body.inspect) end it "joins multiple parts" do - described_class.new(nil, parts).inspect.should == parts.map(&:body).join("\n").inspect + expect(described_class.new(nil, parts).inspect).to eq(parts.map(&:body).join("\n").inspect) end it "joins empty parts" do - described_class.new(nil, []).inspect.should == "".inspect + expect(described_class.new(nil, []).inspect).to eq("".inspect) end end @@ -103,132 +103,135 @@ it "returns true when other is the same instance" do one = two = described_class.new(server, parts) - (one == two).should be_truthy - (one.eql? two).should be_truthy + expect(one == two).to be_truthy + expect(one.eql?(two)).to be_truthy end it "returns true when other has same class and has the same parts" do one, two = described_class.new(server, parts), described_class.new(server, parts) - (one == two).should be_truthy - (one.eql? two).should be_truthy + expect(one == two).to be_truthy + expect(one.eql?(two)).to be_truthy end it "returns true when other has descendant class and has the same parts" do subklass = Class.new(described_class) one, two = described_class.new(server, parts), subklass.new(server, parts) - (one == two).should be_truthy - (one.eql? two).should be_truthy + expect(one == two).to be_truthy + expect(one.eql?(two)).to be_truthy end it "returns true when other has same class and has equal parts" do one, two = described_class.new(server, parts), described_class.new(server, parts.dup) - (one == two).should be_truthy - (one.eql? two).should be_truthy + + expect(one == two).to be_truthy + expect(one.eql?(two)).to be_truthy end it "returns true when other has same class, different server and the same parts" do one, two = described_class.new(server, parts), described_class.new(nil, parts) - (one == two).should be_truthy - (one.eql? two).should be_truthy + + expect(one == two).to be_truthy + expect(one.eql?(two)).to be_truthy end it "returns false when other has different class and has the same parts" do one, two = described_class.new(server, parts), Struct.new(:server, :parts).new(server, parts) - (one == two).should be_falsey - (one.eql? two).should be_falsey + expect(one == two).to be_falsey + expect(one.eql?(two)).to be_falsey end it "returns false when other has different parts" do one, two = described_class.new(server, parts), described_class.new(server, []) - (one == two).should be_falsey - (one.eql? two).should be_falsey + expect(one == two).to be_falsey + expect(one.eql?(two)).to be_falsey end it "returns false when other is string and has the same content" do one, two = described_class.new(server, parts), described_class.new(server, parts).to_s - (one == two).should be_falsey - (one.eql? two).should be_falsey + expect(one == two).to be_falsey + expect(one.eql?(two)).to be_falsey end it "returns false when other is string and has different content" do one, two = described_class.new(server, parts), "different" - (one == two).should be_falsey - (one.eql? two).should be_falsey + expect(one == two).to be_falsey + expect(one.eql?(two)).to be_falsey end end describe "#match" do it "delegates to content" do - subject.match(/record/).should be_a(MatchData) - subject.match(/record/)[0].should == "record" + expect(subject.match(/record/)).to be_a(MatchData) + expect(subject.match(/record/)[0]).to eq("record") - subject.match(/nomatch/).should be_nil + expect(subject.match(/nomatch/)).to be_nil end end describe "#match?" do it "calls match and checks for match" do - subject.match?(/record/).should == true - subject.match?(/nomatch/).should == false + expect(subject.match?(/record/)).to eq(true) + expect(subject.match?(/nomatch/)).to eq(false) end end describe "#content" do it "returns the part body" do - described_class.new(nil, [parts[0]]).content.should == parts[0].body + expect(described_class.new(nil, [parts[0]]).content).to eq(parts[0].body) end it "joins multiple parts" do - described_class.new(nil, parts).content.should == parts.map(&:body).join("\n") + expect(described_class.new(nil, parts).content).to eq(parts.map(&:body).join("\n")) end it "returns an empty string when no parts" do - described_class.new(nil, []).content.should == "" + expect(described_class.new(nil, []).content).to eq("") end end describe "#parser" do it "returns a Parser" do - subject.parser.should be_a(Whois::Record::Parser) + expect(subject.parser).to be_a(Whois::Record::Parser) end it "initializes the parser with self" do - subject.parser.record.should be(subject) + expect(subject.parser.record).to be(subject) end it "memoizes the value" do - subject.instance_eval { @parser }.should be_nil + expect(subject.instance_eval { @parser }).to be_nil parser = subject.parser - subject.instance_eval { @parser }.should be(parser) + expect(subject.instance_eval { @parser }).to be(parser) end end describe "#properties" do it "returns a Hash" do - subject.properties.should be_a(Hash) + expect(subject.properties).to be_a(Hash) end it "returns both nil and not-nil values" do subject.expects(:domain).returns("") subject.expects(:created_on).returns(nil) subject.expects(:expires_on).returns(Time.parse("2010-10-10")) + properties = subject.properties - properties[:domain].should == "" - properties[:created_on].should == nil - properties[:expires_on].should == Time.parse("2010-10-10") + expect(properties[:domain]).to eq("") + expect(properties[:created_on]).to be_nil + expect(properties[:expires_on]).to eq(Time.parse("2010-10-10")) end it "fetches all parser property" do - subject.properties.keys.should =~ Whois::Record::Parser::PROPERTIES + expect(subject.properties.keys).to match(Whois::Record::Parser::PROPERTIES) end end @@ -247,76 +250,76 @@ class Whois::Record::Parser::WhoisPropertiesTest < Whois::Record::Parser::Base describe "#property_any_supported?" do it "delegates to parsers" do subject.parser.expects(:property_any_supported?).with(:example).returns(true) - subject.property_any_supported?(:example).should be_truthy + expect(subject.property_any_supported?(:example)).to be_truthy end end describe "property" do it "returns value when the property is supported" do - r = described_class.new(nil, [Whois::Record::Part.new(:body => "", :host => "whois.properties.test")]) - r.created_on.should == Date.parse("2010-10-20") + instance = described_class.new(nil, [Whois::Record::Part.new(body: "", host: "whois.properties.test")]) + expect(instance.created_on).to eq(Date.parse("2010-10-20")) end it "returns nil when the property is not supported" do - r = described_class.new(nil, [Whois::Record::Part.new(:body => "", :host => "whois.properties.test")]) - r.updated_on.should be_nil + instance = described_class.new(nil, [Whois::Record::Part.new(body: "", host: "whois.properties.test")]) + expect(instance.updated_on).to be_nil end it "returns nil when the property is not implemented" do - r = described_class.new(nil, [Whois::Record::Part.new(:body => "", :host => "whois.properties.test")]) - r.expires_on.should be_nil + instance = described_class.new(nil, [Whois::Record::Part.new(body: "", host: "whois.properties.test")]) + expect(instance.expires_on).to be_nil end end describe "property?" do it "returns true when the property is supported and has no value" do - r = described_class.new(nil, [Whois::Record::Part.new(:body => "", :host => "whois.properties.test")]) - r.status?.should == false + instance = described_class.new(nil, [Whois::Record::Part.new(body: "", host: "whois.properties.test")]) + expect(instance.status?).to eq(false) end it "returns false when the property is supported and has q value" do - r = described_class.new(nil, [Whois::Record::Part.new(:body => "", :host => "whois.properties.test")]) - r.created_on?.should == true + instance = described_class.new(nil, [Whois::Record::Part.new(body: "", host: "whois.properties.test")]) + expect(instance.created_on?).to eq(true) end it "returns false when the property is not supported" do - r = described_class.new(nil, [Whois::Record::Part.new(:body => "", :host => "whois.properties.test")]) - r.updated_on?.should == false + instance = described_class.new(nil, [Whois::Record::Part.new(body: "", host: "whois.properties.test")]) + expect(instance.updated_on?).to eq(false) end it "returns false when the property is not implemented" do - r = described_class.new(nil, [Whois::Record::Part.new(:body => "", :host => "whois.properties.test")]) - r.expires_on?.should == false + instance = described_class.new(nil, [Whois::Record::Part.new(body: "", host: "whois.properties.test")]) + expect(instance.expires_on?).to eq(false) end end describe "#changed?" do it "raises if the argument is not an instance of the same class" do - lambda do + expect { described_class.new(nil, []).changed?(Object.new) - end.should raise_error(ArgumentError) + }.to raise_error(ArgumentError) - lambda do + expect { described_class.new(nil, []).changed?(described_class.new(nil, [])) - end.should_not raise_error + }.to_not raise_error end end describe "#unchanged?" do it "raises if the argument is not an instance of the same class" do - lambda do + expect { described_class.new(nil, []).unchanged?(Object.new) - end.should raise_error(ArgumentError) + }.to raise_error(ArgumentError) - lambda do + expect { described_class.new(nil, []).unchanged?(described_class.new(nil, [])) - end.should_not raise_error + }.to_not raise_error end it "returns true if self and other references the same object" do instance = described_class.new(nil, []) - instance.unchanged?(instance).should be_truthy + expect(instance.unchanged?(instance)).to be_truthy end it "delegates to #parser if self and other references different objects" do @@ -331,7 +334,7 @@ class Whois::Record::Parser::WhoisPropertiesTest < Whois::Record::Parser::Base describe "#contacts" do it "delegates to parser" do subject.parser.expects(:contacts).returns([:one, :two]) - subject.contacts.should == [:one, :two] + expect(subject.contacts).to eq([:one, :two]) end end @@ -370,12 +373,12 @@ class Whois::Record::Parser::WhoisPropertiesTest < Whois::Record::Parser::Base it "returns true if the property is not nil" do subject.expects(:status).returns("available") - subject.status?.should == true + expect(subject.status?).to eq(true) end it "returns false if the property is nil" do subject.expects(:status).returns(nil) - subject.status?.should == false + expect(subject.status?).to eq(false) end end @@ -386,24 +389,24 @@ def happy; "yes"; end end record = described_class.new(nil, []) - lambda do - record.happy.should == "yes" - end.should_not raise_error - lambda do + expect { + expect(record.happy).to eq("yes") + }.to_not raise_error + expect { record.sad - end.should raise_error(NoMethodError) + }.to raise_error(NoMethodError) end it "does not catch all methods" do - lambda do + expect { described_class.new(nil, []).i_am_not_defined - end.should raise_error(NoMethodError) + }.to raise_error(NoMethodError) end it "does not catch all question methods" do - lambda do + expect { described_class.new(nil, []).i_am_not_defined? - end.should raise_error(NoMethodError) + }.to raise_error(NoMethodError) end end end diff --git a/spec/whois/server/adapters/afilias_spec.rb b/spec/whois/server/adapters/afilias_spec.rb index c55e89ab3..4599b6639 100644 --- a/spec/whois/server/adapters/afilias_spec.rb +++ b/spec/whois/server/adapters/afilias_spec.rb @@ -14,9 +14,9 @@ server.query_handler.expects(:call).with("example.test", "whois.afilias-grs.info", 43).returns(response) record = server.lookup("example.test") - record.to_s.should == expected - record.parts.size.should eq(1) - record.parts.should == [Whois::Record::Part.new(:body => response, :host => "whois.afilias-grs.info")] + expect(record.to_s).to eq(expected) + expect(record.parts.size).to eq(1) + expect(record.parts).to eq([Whois::Record::Part.new(:body => response, :host => "whois.afilias-grs.info")]) end end @@ -29,9 +29,9 @@ server.query_handler.expects(:call).with("example.test", "whois.belizenic.bz", 43).returns(response) record = server.lookup("example.test") - record.to_s.should == expected - record.parts.size.should eq(2) - record.parts.should == [Whois::Record::Part.new(:body => referral, :host => "whois.afilias-grs.info"), Whois::Record::Part.new(:body => response, :host => "whois.belizenic.bz")] + expect(record.to_s).to eq(expected) + expect(record.parts.size).to eq(2) + expect(record.parts).to eq([Whois::Record::Part.new(body: referral, host: "whois.afilias-grs.info"), Whois::Record::Part.new(body: response, host: "whois.belizenic.bz")]) end it "ignores referral if options[:referral] is false" do @@ -41,7 +41,7 @@ server.query_handler.expects(:call).with("example.test", "whois.belizenic.bz", 43).never record = server.lookup("example.test") - record.parts.size.should eq(1) + expect(record.parts.size).to eq(1) end end end diff --git a/spec/whois/server/adapters/arin_spec.rb b/spec/whois/server/adapters/arin_spec.rb index 8bf63f1a7..3efc99f7f 100644 --- a/spec/whois/server/adapters/arin_spec.rb +++ b/spec/whois/server/adapters/arin_spec.rb @@ -12,9 +12,9 @@ expected = response server.query_handler.expects(:call).with("n + 0.0.0.0", "whois.arin.net", 43).returns(response) record = server.lookup("0.0.0.0") - record.to_s.should == expected - record.parts.size.should eq(1) - record.parts.should == [Whois::Record::Part.new(:body => response, :host => "whois.arin.net")] + expect(record.to_s).to eq(expected) + expect(record.parts.size).to eq(1) + expect(record.parts).to eq([Whois::Record::Part.new(:body => response, :host => "whois.arin.net")]) end end @@ -27,10 +27,10 @@ server.query_handler.expects(:call).with("0.0.0.0", "whois.ripe.net", 43).returns(response) record = server.lookup("0.0.0.0") - record.to_s.should == expected - record.parts.size.should eq(2) - record.parts.should == [Whois::Record::Part.new(:body => referral, :host => "whois.arin.net"), - Whois::Record::Part.new(:body => response, :host => "whois.ripe.net")] + expect(record.to_s).to eq(expected) + expect(record.parts.size).to eq(2) + expect(record.parts).to eq([Whois::Record::Part.new(:body => referral, :host => "whois.arin.net"), + Whois::Record::Part.new(:body => response, :host => "whois.ripe.net")]) end it "follows rwhois:// referrals" do @@ -41,10 +41,10 @@ server.query_handler.expects(:call).with("0.0.0.0", "rwhois.servernap.net", 4321).returns(response) record = server.lookup("0.0.0.0") - record.to_s.should == expected - record.parts.size.should eq(2) - record.parts.should == [Whois::Record::Part.new(:body => referral, :host => "whois.arin.net"), - Whois::Record::Part.new(:body => response, :host => "rwhois.servernap.net")] + expect(record.to_s).to eq(expected) + expect(record.parts.size).to eq(2) + expect(record.parts).to eq([Whois::Record::Part.new(:body => referral, :host => "whois.arin.net"), + Whois::Record::Part.new(:body => response, :host => "rwhois.servernap.net")]) end it "ignores referral if options[:referral] is false" do @@ -54,7 +54,7 @@ server.query_handler.expects(:call).with("0.0.0.0", "whois.ripe.net", 43).never record = server.lookup("0.0.0.0") - record.parts.size.should eq(1) + expect(record.parts.size).to eq(1) end it "ignores referral (gracefully) if missing" do @@ -63,7 +63,7 @@ server.query_handler.expects(:call).never record = server.lookup("0.0.0.0") - record.parts.size.should eq(1) + expect(record.parts.size).to eq(1) end it "folows referrals without ports" do @@ -73,9 +73,9 @@ server.query_handler.expects(:call).with("0.0.0.0", "whois.apnic.net", 43).returns(response) record = server.lookup("0.0.0.0") - record.parts.size.should eq(2) - record.parts.should == [Whois::Record::Part.new(:body => referral, :host => "whois.arin.net"), - Whois::Record::Part.new(:body => response, :host => "whois.apnic.net")] + expect(record.parts.size).to eq(2) + expect(record.parts).to eq([Whois::Record::Part.new(:body => referral, :host => "whois.arin.net"), + Whois::Record::Part.new(:body => response, :host => "whois.apnic.net")]) end end diff --git a/spec/whois/server/adapters/arpa_spec.rb b/spec/whois/server/adapters/arpa_spec.rb index 801203847..0cdcabf8f 100644 --- a/spec/whois/server/adapters/arpa_spec.rb +++ b/spec/whois/server/adapters/arpa_spec.rb @@ -11,8 +11,8 @@ server.query_handler.expects(:call).with("n + 229.128.in-addr.arpa", "whois.arin.net", 43).returns(response) record = server.lookup("229.128.in-addr.arpa") - record.to_s.should eq(response) - record.parts.should eq([Whois::Record::Part.new(body: response, host: "whois.arin.net")]) + expect(record.to_s).to eq(response) + expect(record.parts).to eq([Whois::Record::Part.new(body: response, host: "whois.arin.net")]) end end diff --git a/spec/whois/server/adapters/base_spec.rb b/spec/whois/server/adapters/base_spec.rb index e586b677c..6774b7061 100644 --- a/spec/whois/server/adapters/base_spec.rb +++ b/spec/whois/server/adapters/base_spec.rb @@ -2,31 +2,31 @@ describe Whois::Server::Adapters::Base do - let(:definition) { [:tld, ".test", "whois.test", { :foo => "bar" }] } + let(:definition) { [:tld, ".test", "whois.test", { foo: "bar" }] } describe "#initialize" do it "requires type, allocation, and host parameters" do - lambda { described_class.new(:tld) }.should raise_error(ArgumentError) - lambda { described_class.new(:tld, ".test") }.should raise_error(ArgumentError) - lambda { described_class.new(:tld, ".test", "whois.test") }.should_not raise_error + expect { described_class.new(:tld) }.to raise_error(ArgumentError) + expect { described_class.new(:tld, ".test") }.to raise_error(ArgumentError) + expect { described_class.new(:tld, ".test", "whois.test") }.to_not raise_error end it "accepts an options parameter" do - lambda { described_class.new(:tld, ".test", "whois.test", { :foo => "bar" }) }.should_not raise_error + expect { described_class.new(:tld, ".test", "whois.test", { foo: "bar" }) }.to_not raise_error end it "sets instance variables from arguments" do - a = described_class.new(:tld, ".test", "whois.test", { :foo => "bar" }) - a.type.should == :tld - a.allocation.should == ".test" - a.host.should == "whois.test" - a.options.should == { :foo => "bar" } + instance = described_class.new(:tld, ".test", "whois.test", { foo: "bar" }) + expect(instance.type).to eq(:tld) + expect(instance.allocation).to eq(".test") + expect(instance.host).to eq("whois.test") + expect(instance.options).to eq({ foo: "bar" }) end it "defaults options to an empty hash" do - a = described_class.new(:tld, ".test", "whois.test") - a.options.should == Hash.new + instance = described_class.new(:tld, ".test", "whois.test") + expect(instance.options).to eq({}) end end @@ -34,44 +34,44 @@ it "returns true when other is the same instance" do one = two = described_class.new(*definition) - (one == two).should be_truthy - (one.eql? two).should be_truthy + expect(one == two).to be_truthy + expect(one.eql?(two)).to be_truthy end it "returns true when other has same class and has the same attributes" do one, two = described_class.new(*definition), described_class.new(*definition) - (one == two).should be_truthy - (one.eql? two).should be_truthy + expect(one == two).to be_truthy + expect(one.eql?(two)).to be_truthy end it "returns true when other has descendant class and has the same attributes" do subklass = Class.new(described_class) one, two = described_class.new(*definition), subklass.new(*definition) - (one == two).should be_truthy - (one.eql? two).should be_truthy + expect(one == two).to be_truthy + expect(one.eql?(two)).to be_truthy end it "returns false when other has different class and has the same attributes" do one, two = described_class.new(*definition), Struct.new(:type, :allocation, :host, :options).new(*definition) - (one == two).should be_falsey - (one.eql? two).should be_falsey + expect(one == two).to be_falsey + expect(one.eql?(two)).to be_falsey end it "returns false when other has different attributes" do one, two = described_class.new(:tld, ".test", "whois.test"), described_class.new(:tld, ".cool", "whois.test") - (one == two).should be_falsey - (one.eql? two).should be_falsey + expect(one == two).to be_falsey + expect(one.eql?(two)).to be_falsey end it "returns false when other has different options" do - one, two = described_class.new(:tld, ".test", "whois.test"), described_class.new(:tld, ".test", "whois.test", { :foo => "bar" }) + one, two = described_class.new(:tld, ".test", "whois.test"), described_class.new(:tld, ".test", "whois.test", { foo: "bar" }) - (one == two).should be_falsey - (one.eql? two).should be_falsey + expect(one == two).to be_falsey + expect(one.eql?(two)).to be_falsey end end @@ -79,22 +79,22 @@ describe "#configure" do it "merges settings with current options" do a = described_class.new(:tld, ".test", "whois.test", { :hello => "world" }) - a.configure(:foo => "bar") - a.options.should == { :hello => "world", :foo => "bar" } + a.configure(foo: "bar") + expect(a.options).to eq({ :hello => "world", foo: "bar" }) end it "gives higher priority to settings argument" do - a = described_class.new(:tld, ".test", "whois.test", { :foo => "bar" }) - a.options.should == { :foo => "bar" } + a = described_class.new(:tld, ".test", "whois.test", { foo: "bar" }) + expect(a.options).to eq({ foo: "bar" }) a.configure(:foo => "baz") - a.options.should == { :foo => "baz" } + expect(a.options).to eq({ :foo => "baz" }) end it "overrides @host if :host option exists" do a = described_class.new(:tld, ".test", "whois.test", { :hello => "world" }) - a.configure(:foo => "bar", :host => "whois.example.com") - a.options.should == { :hello => "world", :foo => "bar", :host => "whois.example.com" } - a.host.should == "whois.example.com" + a.configure(foo: "bar", :host => "whois.example.com") + expect(a.options).to eq({ :hello => "world", foo: "bar", :host => "whois.example.com" }) + expect(a.host).to eq("whois.example.com") end end diff --git a/spec/whois/server/adapters/formatted_spec.rb b/spec/whois/server/adapters/formatted_spec.rb index c6309a250..4dec3f91c 100644 --- a/spec/whois/server/adapters/formatted_spec.rb +++ b/spec/whois/server/adapters/formatted_spec.rb @@ -13,8 +13,8 @@ server.query_handler.expects(:call).with("-T dn,ace -C US-ASCII domain.de", "whois.denic.de", 43).returns(response) record = server.lookup("domain.de") - record.to_s.should == expected - record.parts.should == [Whois::Record::Part.new(:body => response, :host => "whois.denic.de")] + expect(record.to_s).to eq(expected) + expect(record.parts).to eq([Whois::Record::Part.new(:body => response, :host => "whois.denic.de")]) end context "without format option" do diff --git a/spec/whois/server/adapters/standard_spec.rb b/spec/whois/server/adapters/standard_spec.rb index 5870dec84..a4a1fa0c3 100644 --- a/spec/whois/server/adapters/standard_spec.rb +++ b/spec/whois/server/adapters/standard_spec.rb @@ -13,8 +13,8 @@ server.query_handler.expects(:call).with("domain.test", "whois.test", 43).returns(response) record = server.lookup("domain.test") - record.to_s.should == expected - record.parts.should == [Whois::Record::Part.new(:body => response, :host => "whois.test")] + expect(record.to_s).to eq(expected) + expect(record.parts).to eq([Whois::Record::Part.new(:body => response, :host => "whois.test")]) end context "with port option" do diff --git a/spec/whois/server/adapters/verisign_spec.rb b/spec/whois/server/adapters/verisign_spec.rb index bb8ce3f19..0a79cabeb 100644 --- a/spec/whois/server/adapters/verisign_spec.rb +++ b/spec/whois/server/adapters/verisign_spec.rb @@ -14,9 +14,9 @@ server.query_handler.expects(:call).with("=example.test", "whois.test", 43).returns(response) record = server.lookup("example.test") - record.to_s.should == expected - record.parts.size.should eq(1) - record.parts.should == [Whois::Record::Part.new(:body => response, :host => "whois.test")] + expect(record.to_s).to eq(expected) + expect(record.parts.size).to eq(1) + expect(record.parts).to eq([Whois::Record::Part.new(:body => response, :host => "whois.test")]) end end @@ -29,9 +29,9 @@ server.query_handler.expects(:call).with("example.test", "whois.markmonitor.com", 43).returns(response) record = server.lookup("example.test") - record.to_s.should == expected - record.parts.size.should eq(2) - record.parts.should == [Whois::Record::Part.new(:body => referral, :host => "whois.test"), Whois::Record::Part.new(:body => response, :host => "whois.markmonitor.com")] + expect(record.to_s).to eq(expected) + expect(record.parts.size).to eq(2) + expect(record.parts).to eq([Whois::Record::Part.new(:body => referral, :host => "whois.test"), Whois::Record::Part.new(:body => response, :host => "whois.markmonitor.com")]) end it "extracts the closest referral if multiple referrals" do @@ -40,7 +40,7 @@ server.query_handler.expects(:call).with("example.test", "whois.markmonitor.com", 43).returns("") record = server.lookup("example.test") - record.parts.size.should eq(2) + expect(record.parts.size).to eq(2) end it "ignores referral if is not defined" do @@ -49,7 +49,7 @@ server.query_handler.expects(:call).never record = server.lookup("example.test") - record.parts.size.should eq(1) + expect(record.parts.size).to eq(1) end it "ignores referral if options[:referral] is false" do @@ -59,7 +59,7 @@ server.query_handler.expects(:call).never record = server.lookup("example.test") - record.parts.size.should eq(1) + expect(record.parts.size).to eq(1) end # (see #103) @@ -70,7 +70,7 @@ server.query_handler.expects(:call).never record = server.lookup("example.test") - record.parts.size.should eq(1) + expect(record.parts.size).to eq(1) end end end diff --git a/spec/whois/server_spec.rb b/spec/whois/server_spec.rb index a869eac15..d835fbbc1 100644 --- a/spec/whois/server_spec.rb +++ b/spec/whois/server_spec.rb @@ -15,7 +15,7 @@ JSON with_definitions do described_class.load_json("tld.json") - described_class.definitions(:tld).should eq([ + expect(described_class.definitions(:tld)).to eq([ [".ae.org", "whois.centralnic.com", {}], [".ar.com", "whois.centralnic.com", {}], ]) @@ -33,7 +33,7 @@ JSON with_definitions do described_class.load_json("tld.json") - described_class.definitions(:tld).should eq([ + expect(described_class.definitions(:tld)).to eq([ [".com", "whois.crsnic.net", adapter: "verisign"], ]) end @@ -43,31 +43,31 @@ describe ".definitions" do it "returns the definitions hash when type argument is nil" do with_definitions do - d = described_class.definitions - d.should be_a(Hash) - d.keys.should =~ [:tld, :ipv4, :ipv6, :asn16, :asn32] + definition = described_class.definitions + expect(definition).to be_a(Hash) + expect(definition.keys).to match([:tld, :ipv4, :ipv6, :asn16, :asn32]) end with_definitions do - d = described_class.definitions(nil) - d.should be_a(Hash) - d.keys.should =~ [:tld, :ipv4, :ipv6, :asn16, :asn32] + definition = described_class.definitions(nil) + expect(definition).to be_a(Hash) + expect(definition.keys).to match([:tld, :ipv4, :ipv6, :asn16, :asn32]) end end it "returns the definitions array for given type when type argument is not nil and given type exists" do with_definitions do Whois::Server.define(:foo, ".foo", "whois.foo") - d = described_class.definitions(:foo) - d.should be_a(Array) - d.should == [[".foo", "whois.foo", {}]] + definition = described_class.definitions(:foo) + expect(definition).to be_a(Array) + expect(definition).to eq([[".foo", "whois.foo", {}]]) end end it "returns nil when type argument is not nil and given type doesn't exist" do with_definitions do - d = described_class.definitions(:foo) - d.should be_nil + definition = described_class.definitions(:foo) + expect(definition).to be_nil end end end @@ -76,37 +76,37 @@ it "adds a new definition with given arguments" do with_definitions do Whois::Server.define(:foo, ".foo", "whois.foo") - described_class.definitions(:foo).should == [[".foo", "whois.foo", {}]] + expect(described_class.definitions(:foo)).to eq([[".foo", "whois.foo", {}]]) end end it "accepts a hash of options" do with_definitions do - Whois::Server.define(:foo, ".foo", "whois.foo", :foo => "bar") - described_class.definitions(:foo).should == [[".foo", "whois.foo", { :foo => "bar" }]] + Whois::Server.define(:foo, ".foo", "whois.foo", foo: "bar") + expect(described_class.definitions(:foo)).to eq([[".foo", "whois.foo", { :foo => "bar" }]]) end end it "accepts any kind of definition type" do with_definitions do - Whois::Server.define(:ipv4, ".foo", "whois.foo", :foo => "bar") - described_class.definitions(:ipv4).should == [[".foo", "whois.foo", { :foo => "bar" }]] + Whois::Server.define(:ipv4, ".foo", "whois.foo", foo: "bar") + expect(described_class.definitions(:ipv4)).to eq([[".foo", "whois.foo", { :foo => "bar" }]]) end end end describe ".factory" do it "returns an adapter initialized with given arguments" do - s = Whois::Server.factory(:tld, ".test", "whois.test") - s.type.should == :tld - s.allocation.should == ".test" - s.host.should == "whois.test" - s.options.should == Hash.new + server = Whois::Server.factory(:tld, ".test", "whois.test") + expect(server.type).to eq(:tld) + expect(server.allocation).to eq(".test") + expect(server.host).to eq("whois.test") + expect(server.options).to eq(Hash.new) end it "returns a standard adapter by default" do - s = Whois::Server.factory(:tld, ".test", "whois.test") - s.should be_a(Whois::Server::Adapters::Standard) + server = Whois::Server.factory(:tld, ".test", "whois.test") + expect(server).to be_a(Whois::Server::Adapters::Standard) end it "accepts an :adapter option as Class and returns an instance of given adapter" do @@ -116,87 +116,87 @@ def initialize(*args) @args = args end end - s = Whois::Server.factory(:tld, ".test", "whois.test", :adapter => a) - s.should be_a(a) - s.args.should == [:tld, ".test", "whois.test", {}] + server = Whois::Server.factory(:tld, ".test", "whois.test", :adapter => a) + expect(server).to be_a(a) + expect(server.args).to eq([:tld, ".test", "whois.test", {}]) end it "accepts an :adapter option as Symbol or String, load Class and returns an instance of given adapter" do - s = Whois::Server.factory(:tld, ".test", "whois.test", :adapter => :none) - s.should be_a(Whois::Server::Adapters::None) - s = Whois::Server.factory(:tld, ".test", "whois.test", :adapter => "none") - s.should be_a(Whois::Server::Adapters::None) + server = Whois::Server.factory(:tld, ".test", "whois.test", :adapter => :none) + expect(server).to be_a(Whois::Server::Adapters::None) + server = Whois::Server.factory(:tld, ".test", "whois.test", :adapter => "none") + expect(server).to be_a(Whois::Server::Adapters::None) end it "deletes the adapter option" do - s = Whois::Server.factory(:tld, ".test", "whois.test", :adapter => Whois::Server::Adapters::None, :foo => "bar") - s.options.should eq({ :foo => "bar" }) + server = Whois::Server.factory(:tld, ".test", "whois.test", :adapter => Whois::Server::Adapters::None, :foo => "bar") + expect(server.options).to eq({ :foo => "bar" }) end end describe ".guess" do it "recognizes tld" do - s = Whois::Server.guess(".com") - s.should be_a(Whois::Server::Adapters::Base) - s.type.should == :tld + server = Whois::Server.guess(".com") + expect(server).to be_a(Whois::Server::Adapters::Base) + expect(server.type).to eq(:tld) end it "recognizes domain" do - s = Whois::Server.guess("example.com") - s.should be_a(Whois::Server::Adapters::Base) - s.type.should == :tld + server = Whois::Server.guess("example.com") + expect(server).to be_a(Whois::Server::Adapters::Base) + expect(server.type).to eq(:tld) end it "recognizes ipv4" do - s = Whois::Server.guess("127.0.0.1") - s.should be_a(Whois::Server::Adapters::Base) - s.type.should == :ipv4 + server = Whois::Server.guess("127.0.0.1") + expect(server).to be_a(Whois::Server::Adapters::Base) + expect(server.type).to eq(:ipv4) end it "recognizes ipv6" do - s = Whois::Server.guess("2001:0db8:85a3:0000:0000:8a2e:0370:7334") - s.should be_a(Whois::Server::Adapters::Base) - s.type.should == :ipv6 + server = Whois::Server.guess("2001:0db8:85a3:0000:0000:8a2e:0370:7334") + expect(server).to be_a(Whois::Server::Adapters::Base) + expect(server.type).to eq(:ipv6) end it "recognizes ipv6 when zero groups" do - s = Whois::Server.guess("2002::1") - s.should be_a(Whois::Server::Adapters::Base) - s.type.should == :ipv6 + server = Whois::Server.guess("2002::1") + expect(server).to be_a(Whois::Server::Adapters::Base) + expect(server.type).to eq(:ipv6) end it "recognizes asn16" do - s = Whois::Server.guess("AS23456") - s.should be_a(Whois::Server::Adapters::Base) - s.type.should == :asn16 + server = Whois::Server.guess("AS23456") + expect(server).to be_a(Whois::Server::Adapters::Base) + expect(server.type).to eq(:asn16) end it "recognizes asn32" do - s = Whois::Server.guess("AS131072") - s.should be_a(Whois::Server::Adapters::Base) - s.type.should == :asn32 + server = Whois::Server.guess("AS131072") + expect(server).to be_a(Whois::Server::Adapters::Base) + expect(server.type).to eq(:asn32) end it "recognizes email" do - lambda do - s = Whois::Server.guess("email@example.org") - end.should raise_error(Whois::ServerNotSupported, /email/) + expect { + Whois::Server.guess("email@example.org") + }.to raise_error(Whois::ServerNotSupported, /email/) end it "raises when unrecognized value" do - lambda do - s = Whois::Server.guess("invalid") - end.should raise_error(Whois::ServerNotFound) + expect { + Whois::Server.guess("invalid") + }.to raise_error(Whois::ServerNotFound) end context "when the input is a tld" do it "returns a IANA adapter" do - Whois::Server.guess(".com").should == Whois::Server.factory(:tld, ".", "whois.iana.org") + expect(Whois::Server.guess(".com")).to eq(Whois::Server.factory(:tld, ".", "whois.iana.org")) end it "returns a IANA adapter when the input is an idn" do - Whois::Server.guess(".xn--fiqs8s").should == Whois::Server.factory(:tld, ".", "whois.iana.org") + expect(Whois::Server.guess(".xn--fiqs8s")).to eq(Whois::Server.factory(:tld, ".", "whois.iana.org")) end end @@ -204,7 +204,7 @@ def initialize(*args) it "lookups definitions and returns the adapter" do with_definitions do Whois::Server.define(:tld, ".test", "whois.test") - Whois::Server.guess("example.test").should == Whois::Server.factory(:tld, ".test", "whois.test") + expect(Whois::Server.guess("example.test")).to eq(Whois::Server.factory(:tld, ".test", "whois.test")) end end @@ -212,7 +212,7 @@ def initialize(*args) with_definitions do Whois::Server.define(:tld, ".no.com", "whois.no.com") Whois::Server.define(:tld, ".com", "whois.com") - Whois::Server.guess("antoniocangiano.com").should == Whois::Server.factory(:tld, ".com", "whois.com") + expect(Whois::Server.guess("antoniocangiano.com")).to eq(Whois::Server.factory(:tld, ".com", "whois.com")) end end end @@ -221,16 +221,16 @@ def initialize(*args) it "lookups definitions and returns the adapter" do with_definitions do Whois::Server.define(:ipv4, "192.168.1.0/10", "whois.test") - Whois::Server.guess("192.168.1.1").should == Whois::Server.factory(:ipv4, "192.168.1.0/10", "whois.test") + expect(Whois::Server.guess("192.168.1.1")).to eq(Whois::Server.factory(:ipv4, "192.168.1.0/10", "whois.test")) end end it "raises if definition is not found" do with_definitions do Whois::Server.define(:ipv4, "192.168.1.0/10", "whois.test") - lambda do + expect { Whois::Server.guess("192.192.0.1") - end.should raise_error(Whois::AllocationUnknown) + }.to raise_error(Whois::AllocationUnknown) end end end @@ -239,32 +239,32 @@ def initialize(*args) it "lookups definitions and returns the adapter" do with_definitions do Whois::Server.define(:ipv6, "2001:0200::/23", "whois.test") - Whois::Server.guess("2001:0200::1") == Whois::Server.factory(:ipv6, "2001:0200::/23", "whois.test") + expect(Whois::Server.guess("2001:0200::1")).to eq(Whois::Server.factory(:ipv6, "2001:0200::/23", "whois.test")) end end it "raises if definition is not found" do with_definitions do Whois::Server.define(:ipv6, "::1", "whois.test") - lambda { + expect { Whois::Server.guess("2002:0300::1") - }.should raise_error(Whois::AllocationUnknown) + }.to raise_error(Whois::AllocationUnknown) end end it "recognizes ipv4 compatibility mode" do with_definitions do Whois::Server.define(:ipv6, "::192.168.1.1", "whois.test") - Whois::Server.guess("::192.168.1.1") == Whois::Server.factory(:ipv6, "::192.168.1.1", "whois.test") + expect(Whois::Server.guess("::192.168.1.1")).to eq(Whois::Server.factory(:ipv6, "::192.168.1.1", "whois.test")) end end # https://github.com/weppos/whois/issues/174 it "rescues IPAddr ArgumentError" do with_definitions do - lambda { + expect { Whois::Server.guess("f53") - }.should raise_error(Whois::AllocationUnknown) + }.to raise_error(Whois::AllocationUnknown) end end end @@ -273,16 +273,16 @@ def initialize(*args) it "lookups definitions and returns the adapter" do with_definitions do Whois::Server.define(:asn16, "0 65535", "whois.test") - Whois::Server.guess("AS65535").should == Whois::Server.factory(:asn16, "0 65535", "whois.test") + expect(Whois::Server.guess("AS65535")).to eq(Whois::Server.factory(:asn16, "0 65535", "whois.test")) end end it "raises if definition is not found" do with_definitions do Whois::Server.define(:asn16, "0 60000", "whois.test") - lambda { + expect { Whois::Server.guess("AS65535") - }.should raise_error(Whois::AllocationUnknown) + }.to raise_error(Whois::AllocationUnknown) end end end @@ -291,21 +291,19 @@ def initialize(*args) it "lookups definitions and returns the adapter" do with_definitions do Whois::Server.define(:asn32, "65536 394239", "whois.test") - Whois::Server.guess("AS65536").should == Whois::Server.factory(:asn32, "65536 394239", "whois.test") + expect(Whois::Server.guess("AS65536")).to eq(Whois::Server.factory(:asn32, "65536 394239", "whois.test")) end end it "raises if definition is not found" do with_definitions do Whois::Server.define(:asn32, "65536 131071", "whois.test") - lambda { + expect { Whois::Server.guess("AS200000") - }.should raise_error(Whois::AllocationUnknown) + }.to raise_error(Whois::AllocationUnknown) end end end - - end end diff --git a/spec/whois/whois_spec.rb b/spec/whois/whois_spec.rb index 2a95bdbe2..7f177dd4e 100644 --- a/spec/whois/whois_spec.rb +++ b/spec/whois/whois_spec.rb @@ -17,7 +17,7 @@ class Whois::Record::Parser::ParserTest < Whois::Record::Parser::Base Whois::Server.define(:tld, ".test", "parser.test") Whois::Server::Adapters::Standard.any_instance.expects(:query_the_socket).with("example.test", "parser.test").returns("1 == 1") - Whois.available?("example.test").should be_truthy + expect(Whois.available?("example.test")).to be_truthy end end @@ -26,7 +26,7 @@ class Whois::Record::Parser::ParserTest < Whois::Record::Parser::Base Whois::Server.define(:tld, ".test", "parser.test") Whois::Server::Adapters::Standard.any_instance.expects(:query_the_socket).with("example.test", "parser.test").returns("1 == 2") - Whois.available?("example.test").should be_falsey + expect(Whois.available?("example.test")).to be_falsey end end @@ -36,7 +36,7 @@ class Whois::Record::Parser::ParserTest < Whois::Record::Parser::Base Whois::Server::Adapters::Standard.any_instance.expects(:query_the_socket).returns("1 == 2") Whois.expects(:warn) - Whois.available?("example.test").should be_nil + expect(Whois.available?("example.test")).to be_nil end end end @@ -47,7 +47,7 @@ class Whois::Record::Parser::ParserTest < Whois::Record::Parser::Base Whois::Server.define(:tld, ".test", "parser.test") Whois::Server::Adapters::Standard.any_instance.expects(:query_the_socket).with("example.test", "parser.test").returns("1 == 1") - Whois.registered?("example.test").should be_falsey + expect(Whois.registered?("example.test")).to be_falsey end end @@ -56,7 +56,7 @@ class Whois::Record::Parser::ParserTest < Whois::Record::Parser::Base Whois::Server.define(:tld, ".test", "parser.test") Whois::Server::Adapters::Standard.any_instance.expects(:query_the_socket).with("example.test", "parser.test").returns("1 == 2") - Whois.registered?("example.test").should be_truthy + expect(Whois.registered?("example.test")).to be_truthy end end @@ -66,7 +66,7 @@ class Whois::Record::Parser::ParserTest < Whois::Record::Parser::Base Whois::Server::Adapters::Standard.any_instance.expects(:query_the_socket).returns("1 == 2") Whois.expects(:warn) - Whois.registered?("example.test").should be_nil + expect(Whois.registered?("example.test")).to be_nil end end end diff --git a/whois.gemspec b/whois.gemspec index d6e41c8c1..bc5395a8f 100644 --- a/whois.gemspec +++ b/whois.gemspec @@ -1,18 +1,18 @@ # -*- encoding: utf-8 -*- -# stub: whois 3.6.2 ruby lib +# stub: whois 3.6.3 ruby lib Gem::Specification.new do |s| s.name = "whois" - s.version = "3.6.2" + s.version = "3.6.3" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.require_paths = ["lib"] s.authors = ["Simone Carletti"] - s.date = "2015-09-07" + s.date = "2015-11-14" s.description = "Whois is an intelligent WHOIS client and parser written in pure Ruby. It can query registry data for IPv4, IPv6 and top level domains, parse and convert responses into easy-to-use Ruby objects." s.email = ["weppos@weppos.net"] s.executables = ["whoisrb"] - s.files = [".yardopts", "CHANGELOG.markdown", "LICENSE.txt", "README.markdown", "bin/whoisrb", "data/asn16.json", "data/asn32.json", "data/ipv4.json", "data/ipv6.json", "data/tld.json", "lib/whois.rb", "lib/whois/client.rb", "lib/whois/errors.rb", "lib/whois/record.rb", "lib/whois/record/contact.rb", "lib/whois/record/nameserver.rb", "lib/whois/record/parser.rb", "lib/whois/record/parser/base.rb", "lib/whois/record/parser/base_afilias.rb", "lib/whois/record/parser/base_afilias2.rb", "lib/whois/record/parser/base_cocca.rb", "lib/whois/record/parser/base_cocca2.rb", "lib/whois/record/parser/base_icann_compliant.rb", "lib/whois/record/parser/base_icb.rb", "lib/whois/record/parser/base_iisse.rb", "lib/whois/record/parser/base_shared1.rb", "lib/whois/record/parser/base_shared2.rb", "lib/whois/record/parser/base_shared3.rb", "lib/whois/record/parser/base_verisign.rb", "lib/whois/record/parser/base_whoisd.rb", "lib/whois/record/parser/blank.rb", "lib/whois/record/parser/capetown-whois.registry.net.za.rb", "lib/whois/record/parser/ccwhois.ksregistry.net.rb", "lib/whois/record/parser/ccwhois.verisign-grs.com.rb", "lib/whois/record/parser/durban-whois.registry.net.za.rb", "lib/whois/record/parser/example.rb", "lib/whois/record/parser/jobswhois.verisign-grs.com.rb", "lib/whois/record/parser/joburg-whois.registry.net.za.rb", "lib/whois/record/parser/kero.yachay.pe.rb", "lib/whois/record/parser/org-whois.registry.net.za.rb", "lib/whois/record/parser/whois.1und1.info.rb", "lib/whois/record/parser/whois.aeda.net.ae.rb", "lib/whois/record/parser/whois.aero.rb", "lib/whois/record/parser/whois.afilias-grs.info.rb", "lib/whois/record/parser/whois.afilias.info.rb", "lib/whois/record/parser/whois.ai.rb", "lib/whois/record/parser/whois.ascio.com.rb", "lib/whois/record/parser/whois.ati.tn.rb", "lib/whois/record/parser/whois.audns.net.au.rb", "lib/whois/record/parser/whois.ax.rb", "lib/whois/record/parser/whois.biz.rb", "lib/whois/record/parser/whois.bnnic.bn.rb", "lib/whois/record/parser/whois.cat.rb", "lib/whois/record/parser/whois.cctld.by.rb", "lib/whois/record/parser/whois.cctld.uz.rb", "lib/whois/record/parser/whois.centralnic.com.rb", "lib/whois/record/parser/whois.cira.ca.rb", "lib/whois/record/parser/whois.cmc.iq.rb", "lib/whois/record/parser/whois.cnnic.cn.rb", "lib/whois/record/parser/whois.co.ca.rb", "lib/whois/record/parser/whois.co.pl.rb", "lib/whois/record/parser/whois.co.ug.rb", "lib/whois/record/parser/whois.comlaude.com.rb", "lib/whois/record/parser/whois.corporatedomains.com.rb", "lib/whois/record/parser/whois.denic.de.rb", "lib/whois/record/parser/whois.dk-hostmaster.dk.rb", "lib/whois/record/parser/whois.dns.be.rb", "lib/whois/record/parser/whois.dns.hr.rb", "lib/whois/record/parser/whois.dns.lu.rb", "lib/whois/record/parser/whois.dns.pl.rb", "lib/whois/record/parser/whois.dns.pt.rb", "lib/whois/record/parser/whois.domain-registry.nl.rb", "lib/whois/record/parser/whois.domain.kg.rb", "lib/whois/record/parser/whois.domainregistry.ie.rb", "lib/whois/record/parser/whois.domainregistry.my.rb", "lib/whois/record/parser/whois.domreg.lt.rb", "lib/whois/record/parser/whois.donuts.co.rb", "lib/whois/record/parser/whois.dot.cf.rb", "lib/whois/record/parser/whois.dot.tk.rb", "lib/whois/record/parser/whois.dotmobiregistry.net.rb", "lib/whois/record/parser/whois.dotpostregistry.net.rb", "lib/whois/record/parser/whois.dreamhost.com.rb", "lib/whois/record/parser/whois.educause.edu.rb", "lib/whois/record/parser/whois.eenet.ee.rb", "lib/whois/record/parser/whois.enom.com.rb", "lib/whois/record/parser/whois.eu.org.rb", "lib/whois/record/parser/whois.eu.rb", "lib/whois/record/parser/whois.fi.rb", "lib/whois/record/parser/whois.gandi.net.rb", "lib/whois/record/parser/whois.gg.rb", "lib/whois/record/parser/whois.godaddy.com.rb", "lib/whois/record/parser/whois.gov.za.rb", "lib/whois/record/parser/whois.hkirc.hk.rb", "lib/whois/record/parser/whois.iana.org.rb", "lib/whois/record/parser/whois.iis.nu.rb", "lib/whois/record/parser/whois.iis.se.rb", "lib/whois/record/parser/whois.in.ua.rb", "lib/whois/record/parser/whois.isnic.is.rb", "lib/whois/record/parser/whois.isoc.org.il.rb", "lib/whois/record/parser/whois.ja.net.rb", "lib/whois/record/parser/whois.je.rb", "lib/whois/record/parser/whois.jprs.jp.rb", "lib/whois/record/parser/whois.kenic.or.ke.rb", "lib/whois/record/parser/whois.kr.rb", "lib/whois/record/parser/whois.markmonitor.com.rb", "lib/whois/record/parser/whois.monic.mo.rb", "lib/whois/record/parser/whois.museum.rb", "lib/whois/record/parser/whois.na-nic.com.na.rb", "lib/whois/record/parser/whois.nc.rb", "lib/whois/record/parser/whois.netcom.cm.rb", "lib/whois/record/parser/whois.networksolutions.com.rb", "lib/whois/record/parser/whois.nic.ac.rb", "lib/whois/record/parser/whois.nic.af.rb", "lib/whois/record/parser/whois.nic.ag.rb", "lib/whois/record/parser/whois.nic.am.rb", "lib/whois/record/parser/whois.nic.as.rb", "lib/whois/record/parser/whois.nic.asia.rb", "lib/whois/record/parser/whois.nic.at.rb", "lib/whois/record/parser/whois.nic.bj.rb", "lib/whois/record/parser/whois.nic.bo.rb", "lib/whois/record/parser/whois.nic.cd.rb", "lib/whois/record/parser/whois.nic.ch.rb", "lib/whois/record/parser/whois.nic.ci.rb", "lib/whois/record/parser/whois.nic.ck.rb", "lib/whois/record/parser/whois.nic.cl.rb", "lib/whois/record/parser/whois.nic.co.rb", "lib/whois/record/parser/whois.nic.college.rb", "lib/whois/record/parser/whois.nic.coop.rb", "lib/whois/record/parser/whois.nic.cx.rb", "lib/whois/record/parser/whois.nic.cz.rb", "lib/whois/record/parser/whois.nic.design.rb", "lib/whois/record/parser/whois.nic.dm.rb", "lib/whois/record/parser/whois.nic.dz.rb", "lib/whois/record/parser/whois.nic.ec.rb", "lib/whois/record/parser/whois.nic.es.rb", "lib/whois/record/parser/whois.nic.fo.rb", "lib/whois/record/parser/whois.nic.fr.rb", "lib/whois/record/parser/whois.nic.gd.rb", "lib/whois/record/parser/whois.nic.gl.rb", "lib/whois/record/parser/whois.nic.gov.rb", "lib/whois/record/parser/whois.nic.gs.rb", "lib/whois/record/parser/whois.nic.hn.rb", "lib/whois/record/parser/whois.nic.ht.rb", "lib/whois/record/parser/whois.nic.hu.rb", "lib/whois/record/parser/whois.nic.im.rb", "lib/whois/record/parser/whois.nic.io.rb", "lib/whois/record/parser/whois.nic.ir.rb", "lib/whois/record/parser/whois.nic.it.rb", "lib/whois/record/parser/whois.nic.ki.rb", "lib/whois/record/parser/whois.nic.kz.rb", "lib/whois/record/parser/whois.nic.la.rb", "lib/whois/record/parser/whois.nic.li.rb", "lib/whois/record/parser/whois.nic.lk.rb", "lib/whois/record/parser/whois.nic.lv.rb", "lib/whois/record/parser/whois.nic.ly.rb", "lib/whois/record/parser/whois.nic.md.rb", "lib/whois/record/parser/whois.nic.me.rb", "lib/whois/record/parser/whois.nic.mg.rb", "lib/whois/record/parser/whois.nic.ms.rb", "lib/whois/record/parser/whois.nic.mu.rb", "lib/whois/record/parser/whois.nic.mx.rb", "lib/whois/record/parser/whois.nic.name.rb", "lib/whois/record/parser/whois.nic.net.ng.rb", "lib/whois/record/parser/whois.nic.net.sa.rb", "lib/whois/record/parser/whois.nic.net.sb.rb", "lib/whois/record/parser/whois.nic.nf.rb", "lib/whois/record/parser/whois.nic.org.uy.rb", "lib/whois/record/parser/whois.nic.pr.rb", "lib/whois/record/parser/whois.nic.priv.at.rb", "lib/whois/record/parser/whois.nic.pw.rb", "lib/whois/record/parser/whois.nic.sh.rb", "lib/whois/record/parser/whois.nic.sl.rb", "lib/whois/record/parser/whois.nic.sm.rb", "lib/whois/record/parser/whois.nic.sn.rb", "lib/whois/record/parser/whois.nic.so.rb", "lib/whois/record/parser/whois.nic.st.rb", "lib/whois/record/parser/whois.nic.tc.rb", "lib/whois/record/parser/whois.nic.tel.rb", "lib/whois/record/parser/whois.nic.tl.rb", "lib/whois/record/parser/whois.nic.tm.rb", "lib/whois/record/parser/whois.nic.tr.rb", "lib/whois/record/parser/whois.nic.travel.rb", "lib/whois/record/parser/whois.nic.tv.rb", "lib/whois/record/parser/whois.nic.uk.rb", "lib/whois/record/parser/whois.nic.us.rb", "lib/whois/record/parser/whois.nic.ve.rb", "lib/whois/record/parser/whois.nic.xxx.rb", "lib/whois/record/parser/whois.norid.no.rb", "lib/whois/record/parser/whois.pairnic.com.rb", "lib/whois/record/parser/whois.pandi.or.id.rb", "lib/whois/record/parser/whois.pir.org.rb", "lib/whois/record/parser/whois.pnina.ps.rb", "lib/whois/record/parser/whois.register.bg.rb", "lib/whois/record/parser/whois.register.com.rb", "lib/whois/record/parser/whois.register.si.rb", "lib/whois/record/parser/whois.registre.ma.rb", "lib/whois/record/parser/whois.registro.br.rb", "lib/whois/record/parser/whois.registry.gy.rb", "lib/whois/record/parser/whois.registry.hm.rb", "lib/whois/record/parser/whois.registry.in.rb", "lib/whois/record/parser/whois.registry.net.za.rb", "lib/whois/record/parser/whois.registry.om.rb", "lib/whois/record/parser/whois.registry.qa.rb", "lib/whois/record/parser/whois.registrypro.pro.rb", "lib/whois/record/parser/whois.ripe.net.rb", "lib/whois/record/parser/whois.rnids.rs.rb", "lib/whois/record/parser/whois.rotld.ro.rb", "lib/whois/record/parser/whois.rrpproxy.net.rb", "lib/whois/record/parser/whois.safenames.net.rb", "lib/whois/record/parser/whois.schlund.info.rb", "lib/whois/record/parser/whois.sgnic.sg.rb", "lib/whois/record/parser/whois.sk-nic.sk.rb", "lib/whois/record/parser/whois.smallregistry.net.rb", "lib/whois/record/parser/whois.srs.net.nz.rb", "lib/whois/record/parser/whois.sx.rb", "lib/whois/record/parser/whois.tcinet.ru.rb", "lib/whois/record/parser/whois.thnic.co.th.rb", "lib/whois/record/parser/whois.tld.ee.rb", "lib/whois/record/parser/whois.tld.sy.rb", "lib/whois/record/parser/whois.tonic.to.rb", "lib/whois/record/parser/whois.tucows.com.rb", "lib/whois/record/parser/whois.twnic.net.tw.rb", "lib/whois/record/parser/whois.tznic.or.tz.rb", "lib/whois/record/parser/whois.ua.rb", "lib/whois/record/parser/whois.udag.net.rb", "lib/whois/record/parser/whois.uniregistry.net.rb", "lib/whois/record/parser/whois.usp.ac.fj.rb", "lib/whois/record/parser/whois.verisign-grs.com.rb", "lib/whois/record/parser/whois.website.ws.rb", "lib/whois/record/parser/whois.wildwestdomains.com.rb", "lib/whois/record/parser/whois.yoursrs.com.rb", "lib/whois/record/parser/whois.za.net.rb", "lib/whois/record/parser/whois.za.org.rb", "lib/whois/record/parser/whois1.nic.bi.rb", "lib/whois/record/parser/za_central_registry.rb", "lib/whois/record/part.rb", "lib/whois/record/registrar.rb", "lib/whois/record/scanners/base.rb", "lib/whois/record/scanners/base_afilias.rb", "lib/whois/record/scanners/base_cocca2.rb", "lib/whois/record/scanners/base_icann_compliant.rb", "lib/whois/record/scanners/base_iisse.rb", "lib/whois/record/scanners/base_shared1.rb", "lib/whois/record/scanners/base_shared2.rb", "lib/whois/record/scanners/base_shared3.rb", "lib/whois/record/scanners/base_whoisd.rb", "lib/whois/record/scanners/iana.rb", "lib/whois/record/scanners/scannable.rb", "lib/whois/record/scanners/verisign.rb", "lib/whois/record/scanners/whois.ati.tn.rb", "lib/whois/record/scanners/whois.audns.net.au.rb", "lib/whois/record/scanners/whois.cctld.by.rb", "lib/whois/record/scanners/whois.centralnic.com.rb", "lib/whois/record/scanners/whois.cira.ca.rb", "lib/whois/record/scanners/whois.cnnic.cn.rb", "lib/whois/record/scanners/whois.denic.de.rb", "lib/whois/record/scanners/whois.dns.hr.rb", "lib/whois/record/scanners/whois.domainregistry.ie.rb", "lib/whois/record/scanners/whois.fi.rb", "lib/whois/record/scanners/whois.nc.rb", "lib/whois/record/scanners/whois.nic.cz.rb", "lib/whois/record/scanners/whois.nic.it.rb", "lib/whois/record/scanners/whois.pir.org.rb", "lib/whois/record/scanners/whois.registry.net.za.rb", "lib/whois/record/scanners/whois.rnids.rs.rb", "lib/whois/record/scanners/whois.smallregistry.net.rb", "lib/whois/record/scanners/whois.srs.net.nz.rb", "lib/whois/record/scanners/whois.sx.rb", "lib/whois/record/scanners/whois.tucows.com.rb", "lib/whois/record/scanners/whois.yoursrs.com.rb", "lib/whois/record/super_struct.rb", "lib/whois/server.rb", "lib/whois/server/adapters/afilias.rb", "lib/whois/server/adapters/arin.rb", "lib/whois/server/adapters/arpa.rb", "lib/whois/server/adapters/base.rb", "lib/whois/server/adapters/formatted.rb", "lib/whois/server/adapters/none.rb", "lib/whois/server/adapters/not_implemented.rb", "lib/whois/server/adapters/standard.rb", "lib/whois/server/adapters/verisign.rb", "lib/whois/server/adapters/web.rb", "lib/whois/server/socket_handler.rb", "lib/whois/version.rb", "whois.gemspec"] + s.files = [".yardopts", "CHANGELOG.markdown", "LICENSE.txt", "README.markdown", "bin/whoisrb", "data/CONTRIBUTING.md", "data/asn16.json", "data/asn32.json", "data/ipv4.json", "data/ipv6.json", "data/tld.json", "lib/whois.rb", "lib/whois/client.rb", "lib/whois/errors.rb", "lib/whois/record.rb", "lib/whois/record/contact.rb", "lib/whois/record/nameserver.rb", "lib/whois/record/parser.rb", "lib/whois/record/parser/base.rb", "lib/whois/record/parser/base_afilias.rb", "lib/whois/record/parser/base_afilias2.rb", "lib/whois/record/parser/base_cocca.rb", "lib/whois/record/parser/base_cocca2.rb", "lib/whois/record/parser/base_icann_compliant.rb", "lib/whois/record/parser/base_icb.rb", "lib/whois/record/parser/base_iisse.rb", "lib/whois/record/parser/base_shared1.rb", "lib/whois/record/parser/base_shared2.rb", "lib/whois/record/parser/base_shared3.rb", "lib/whois/record/parser/base_verisign.rb", "lib/whois/record/parser/base_whoisd.rb", "lib/whois/record/parser/blank.rb", "lib/whois/record/parser/capetown-whois.registry.net.za.rb", "lib/whois/record/parser/ccwhois.ksregistry.net.rb", "lib/whois/record/parser/ccwhois.verisign-grs.com.rb", "lib/whois/record/parser/durban-whois.registry.net.za.rb", "lib/whois/record/parser/example.rb", "lib/whois/record/parser/jobswhois.verisign-grs.com.rb", "lib/whois/record/parser/joburg-whois.registry.net.za.rb", "lib/whois/record/parser/kero.yachay.pe.rb", "lib/whois/record/parser/org-whois.registry.net.za.rb", "lib/whois/record/parser/whois.1und1.info.rb", "lib/whois/record/parser/whois.aeda.net.ae.rb", "lib/whois/record/parser/whois.aero.rb", "lib/whois/record/parser/whois.afilias-grs.info.rb", "lib/whois/record/parser/whois.afilias.info.rb", "lib/whois/record/parser/whois.ai.rb", "lib/whois/record/parser/whois.ascio.com.rb", "lib/whois/record/parser/whois.ati.tn.rb", "lib/whois/record/parser/whois.audns.net.au.rb", "lib/whois/record/parser/whois.ax.rb", "lib/whois/record/parser/whois.biz.rb", "lib/whois/record/parser/whois.bnnic.bn.rb", "lib/whois/record/parser/whois.cat.rb", "lib/whois/record/parser/whois.cctld.by.rb", "lib/whois/record/parser/whois.cctld.uz.rb", "lib/whois/record/parser/whois.centralnic.com.rb", "lib/whois/record/parser/whois.cira.ca.rb", "lib/whois/record/parser/whois.cmc.iq.rb", "lib/whois/record/parser/whois.cnnic.cn.rb", "lib/whois/record/parser/whois.co.ca.rb", "lib/whois/record/parser/whois.co.pl.rb", "lib/whois/record/parser/whois.co.ug.rb", "lib/whois/record/parser/whois.comlaude.com.rb", "lib/whois/record/parser/whois.corporatedomains.com.rb", "lib/whois/record/parser/whois.denic.de.rb", "lib/whois/record/parser/whois.dk-hostmaster.dk.rb", "lib/whois/record/parser/whois.dns.be.rb", "lib/whois/record/parser/whois.dns.hr.rb", "lib/whois/record/parser/whois.dns.lu.rb", "lib/whois/record/parser/whois.dns.pl.rb", "lib/whois/record/parser/whois.dns.pt.rb", "lib/whois/record/parser/whois.domain-registry.nl.rb", "lib/whois/record/parser/whois.domain.kg.rb", "lib/whois/record/parser/whois.domainregistry.ie.rb", "lib/whois/record/parser/whois.domainregistry.my.rb", "lib/whois/record/parser/whois.domreg.lt.rb", "lib/whois/record/parser/whois.donuts.co.rb", "lib/whois/record/parser/whois.dot.cf.rb", "lib/whois/record/parser/whois.dot.tk.rb", "lib/whois/record/parser/whois.dotmobiregistry.net.rb", "lib/whois/record/parser/whois.dotpostregistry.net.rb", "lib/whois/record/parser/whois.dreamhost.com.rb", "lib/whois/record/parser/whois.educause.edu.rb", "lib/whois/record/parser/whois.eenet.ee.rb", "lib/whois/record/parser/whois.enom.com.rb", "lib/whois/record/parser/whois.eu.org.rb", "lib/whois/record/parser/whois.eu.rb", "lib/whois/record/parser/whois.fi.rb", "lib/whois/record/parser/whois.gandi.net.rb", "lib/whois/record/parser/whois.gg.rb", "lib/whois/record/parser/whois.godaddy.com.rb", "lib/whois/record/parser/whois.gov.za.rb", "lib/whois/record/parser/whois.hkirc.hk.rb", "lib/whois/record/parser/whois.iana.org.rb", "lib/whois/record/parser/whois.iis.nu.rb", "lib/whois/record/parser/whois.iis.se.rb", "lib/whois/record/parser/whois.in.ua.rb", "lib/whois/record/parser/whois.isnic.is.rb", "lib/whois/record/parser/whois.isoc.org.il.rb", "lib/whois/record/parser/whois.ja.net.rb", "lib/whois/record/parser/whois.je.rb", "lib/whois/record/parser/whois.jprs.jp.rb", "lib/whois/record/parser/whois.kenic.or.ke.rb", "lib/whois/record/parser/whois.kr.rb", "lib/whois/record/parser/whois.markmonitor.com.rb", "lib/whois/record/parser/whois.monic.mo.rb", "lib/whois/record/parser/whois.museum.rb", "lib/whois/record/parser/whois.na-nic.com.na.rb", "lib/whois/record/parser/whois.nc.rb", "lib/whois/record/parser/whois.netcom.cm.rb", "lib/whois/record/parser/whois.networksolutions.com.rb", "lib/whois/record/parser/whois.nic.ac.rb", "lib/whois/record/parser/whois.nic.af.rb", "lib/whois/record/parser/whois.nic.ag.rb", "lib/whois/record/parser/whois.nic.am.rb", "lib/whois/record/parser/whois.nic.as.rb", "lib/whois/record/parser/whois.nic.asia.rb", "lib/whois/record/parser/whois.nic.at.rb", "lib/whois/record/parser/whois.nic.bj.rb", "lib/whois/record/parser/whois.nic.bo.rb", "lib/whois/record/parser/whois.nic.cd.rb", "lib/whois/record/parser/whois.nic.ch.rb", "lib/whois/record/parser/whois.nic.ci.rb", "lib/whois/record/parser/whois.nic.ck.rb", "lib/whois/record/parser/whois.nic.cl.rb", "lib/whois/record/parser/whois.nic.co.rb", "lib/whois/record/parser/whois.nic.college.rb", "lib/whois/record/parser/whois.nic.coop.rb", "lib/whois/record/parser/whois.nic.cx.rb", "lib/whois/record/parser/whois.nic.cz.rb", "lib/whois/record/parser/whois.nic.design.rb", "lib/whois/record/parser/whois.nic.dm.rb", "lib/whois/record/parser/whois.nic.dz.rb", "lib/whois/record/parser/whois.nic.ec.rb", "lib/whois/record/parser/whois.nic.es.rb", "lib/whois/record/parser/whois.nic.fo.rb", "lib/whois/record/parser/whois.nic.fr.rb", "lib/whois/record/parser/whois.nic.gd.rb", "lib/whois/record/parser/whois.nic.gl.rb", "lib/whois/record/parser/whois.nic.gov.rb", "lib/whois/record/parser/whois.nic.gs.rb", "lib/whois/record/parser/whois.nic.hn.rb", "lib/whois/record/parser/whois.nic.ht.rb", "lib/whois/record/parser/whois.nic.hu.rb", "lib/whois/record/parser/whois.nic.im.rb", "lib/whois/record/parser/whois.nic.io.rb", "lib/whois/record/parser/whois.nic.ir.rb", "lib/whois/record/parser/whois.nic.it.rb", "lib/whois/record/parser/whois.nic.ki.rb", "lib/whois/record/parser/whois.nic.kz.rb", "lib/whois/record/parser/whois.nic.la.rb", "lib/whois/record/parser/whois.nic.li.rb", "lib/whois/record/parser/whois.nic.lk.rb", "lib/whois/record/parser/whois.nic.lv.rb", "lib/whois/record/parser/whois.nic.ly.rb", "lib/whois/record/parser/whois.nic.md.rb", "lib/whois/record/parser/whois.nic.me.rb", "lib/whois/record/parser/whois.nic.mg.rb", "lib/whois/record/parser/whois.nic.ms.rb", "lib/whois/record/parser/whois.nic.mu.rb", "lib/whois/record/parser/whois.nic.mx.rb", "lib/whois/record/parser/whois.nic.name.rb", "lib/whois/record/parser/whois.nic.net.ng.rb", "lib/whois/record/parser/whois.nic.net.sa.rb", "lib/whois/record/parser/whois.nic.net.sb.rb", "lib/whois/record/parser/whois.nic.nf.rb", "lib/whois/record/parser/whois.nic.org.uy.rb", "lib/whois/record/parser/whois.nic.pr.rb", "lib/whois/record/parser/whois.nic.priv.at.rb", "lib/whois/record/parser/whois.nic.pw.rb", "lib/whois/record/parser/whois.nic.sh.rb", "lib/whois/record/parser/whois.nic.sl.rb", "lib/whois/record/parser/whois.nic.sm.rb", "lib/whois/record/parser/whois.nic.sn.rb", "lib/whois/record/parser/whois.nic.so.rb", "lib/whois/record/parser/whois.nic.st.rb", "lib/whois/record/parser/whois.nic.tc.rb", "lib/whois/record/parser/whois.nic.tel.rb", "lib/whois/record/parser/whois.nic.tl.rb", "lib/whois/record/parser/whois.nic.tm.rb", "lib/whois/record/parser/whois.nic.tr.rb", "lib/whois/record/parser/whois.nic.travel.rb", "lib/whois/record/parser/whois.nic.tv.rb", "lib/whois/record/parser/whois.nic.uk.rb", "lib/whois/record/parser/whois.nic.us.rb", "lib/whois/record/parser/whois.nic.ve.rb", "lib/whois/record/parser/whois.nic.xxx.rb", "lib/whois/record/parser/whois.norid.no.rb", "lib/whois/record/parser/whois.pairnic.com.rb", "lib/whois/record/parser/whois.pandi.or.id.rb", "lib/whois/record/parser/whois.pir.org.rb", "lib/whois/record/parser/whois.pnina.ps.rb", "lib/whois/record/parser/whois.register.bg.rb", "lib/whois/record/parser/whois.register.com.rb", "lib/whois/record/parser/whois.register.si.rb", "lib/whois/record/parser/whois.registre.ma.rb", "lib/whois/record/parser/whois.registro.br.rb", "lib/whois/record/parser/whois.registry.gy.rb", "lib/whois/record/parser/whois.registry.hm.rb", "lib/whois/record/parser/whois.registry.in.rb", "lib/whois/record/parser/whois.registry.net.za.rb", "lib/whois/record/parser/whois.registry.om.rb", "lib/whois/record/parser/whois.registry.qa.rb", "lib/whois/record/parser/whois.registrypro.pro.rb", "lib/whois/record/parser/whois.ripe.net.rb", "lib/whois/record/parser/whois.rnids.rs.rb", "lib/whois/record/parser/whois.rotld.ro.rb", "lib/whois/record/parser/whois.rrpproxy.net.rb", "lib/whois/record/parser/whois.safenames.net.rb", "lib/whois/record/parser/whois.schlund.info.rb", "lib/whois/record/parser/whois.sgnic.sg.rb", "lib/whois/record/parser/whois.sk-nic.sk.rb", "lib/whois/record/parser/whois.smallregistry.net.rb", "lib/whois/record/parser/whois.srs.net.nz.rb", "lib/whois/record/parser/whois.sx.rb", "lib/whois/record/parser/whois.tcinet.ru.rb", "lib/whois/record/parser/whois.thnic.co.th.rb", "lib/whois/record/parser/whois.tld.ee.rb", "lib/whois/record/parser/whois.tld.sy.rb", "lib/whois/record/parser/whois.tonic.to.rb", "lib/whois/record/parser/whois.tucows.com.rb", "lib/whois/record/parser/whois.twnic.net.tw.rb", "lib/whois/record/parser/whois.tznic.or.tz.rb", "lib/whois/record/parser/whois.ua.rb", "lib/whois/record/parser/whois.udag.net.rb", "lib/whois/record/parser/whois.uniregistry.net.rb", "lib/whois/record/parser/whois.usp.ac.fj.rb", "lib/whois/record/parser/whois.verisign-grs.com.rb", "lib/whois/record/parser/whois.website.ws.rb", "lib/whois/record/parser/whois.wildwestdomains.com.rb", "lib/whois/record/parser/whois.yoursrs.com.rb", "lib/whois/record/parser/whois.za.net.rb", "lib/whois/record/parser/whois.za.org.rb", "lib/whois/record/parser/whois1.nic.bi.rb", "lib/whois/record/parser/za_central_registry.rb", "lib/whois/record/part.rb", "lib/whois/record/registrar.rb", "lib/whois/record/scanners/base.rb", "lib/whois/record/scanners/base_afilias.rb", "lib/whois/record/scanners/base_cocca2.rb", "lib/whois/record/scanners/base_icann_compliant.rb", "lib/whois/record/scanners/base_iisse.rb", "lib/whois/record/scanners/base_shared1.rb", "lib/whois/record/scanners/base_shared2.rb", "lib/whois/record/scanners/base_shared3.rb", "lib/whois/record/scanners/base_whoisd.rb", "lib/whois/record/scanners/iana.rb", "lib/whois/record/scanners/scannable.rb", "lib/whois/record/scanners/verisign.rb", "lib/whois/record/scanners/whois.ati.tn.rb", "lib/whois/record/scanners/whois.audns.net.au.rb", "lib/whois/record/scanners/whois.cctld.by.rb", "lib/whois/record/scanners/whois.centralnic.com.rb", "lib/whois/record/scanners/whois.cira.ca.rb", "lib/whois/record/scanners/whois.cnnic.cn.rb", "lib/whois/record/scanners/whois.denic.de.rb", "lib/whois/record/scanners/whois.dns.hr.rb", "lib/whois/record/scanners/whois.domainregistry.ie.rb", "lib/whois/record/scanners/whois.fi.rb", "lib/whois/record/scanners/whois.nc.rb", "lib/whois/record/scanners/whois.nic.cz.rb", "lib/whois/record/scanners/whois.nic.it.rb", "lib/whois/record/scanners/whois.pir.org.rb", "lib/whois/record/scanners/whois.registry.net.za.rb", "lib/whois/record/scanners/whois.rnids.rs.rb", "lib/whois/record/scanners/whois.smallregistry.net.rb", "lib/whois/record/scanners/whois.srs.net.nz.rb", "lib/whois/record/scanners/whois.sx.rb", "lib/whois/record/scanners/whois.tucows.com.rb", "lib/whois/record/scanners/whois.yoursrs.com.rb", "lib/whois/record/super_struct.rb", "lib/whois/server.rb", "lib/whois/server/adapters/afilias.rb", "lib/whois/server/adapters/arin.rb", "lib/whois/server/adapters/arpa.rb", "lib/whois/server/adapters/base.rb", "lib/whois/server/adapters/formatted.rb", "lib/whois/server/adapters/none.rb", "lib/whois/server/adapters/not_implemented.rb", "lib/whois/server/adapters/standard.rb", "lib/whois/server/adapters/verisign.rb", "lib/whois/server/adapters/web.rb", "lib/whois/server/socket_handler.rb", "lib/whois/version.rb", "whois.gemspec"] s.homepage = "http://whoisrb.org/" s.licenses = ["MIT"] s.post_install_message = "********************************************************************************\n\n Thank you for installing the whois gem!\n\n If you like this gem, please support the project.\n http://pledgie.com/campaigns/11383\n\n Does your project or organization use this gem? Add it to the apps wiki.\n https://github.com/weppos/whois/wiki/apps\n\n********************************************************************************\n"