GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
I've written a simple parser for responses from whois.godaddy.com, the single largest .com registry. Their format for addresses is depressingly irregular (may be missing the organization and/or telephone/fax number lines, without the helpful field: data format given by some other registries) but it works pretty well and adds parseability to ~30% of all .coms.
Issue #103 is also fixed by a separate small commit.
Add new whois.godaddy.com parser
Fix issue #103: minor error in Verisign adapter
thank you very much for the parser. Unfortunately, I cannot merge the pull request without a test suite.
Would it be possible to provide it?
Creating a test suite for a parser is just easy as extracting some fixtures and creating a .expected file.
See for example bfbd27b or 8218ebb
I merged your fix for issue #103
Sorry - I'm rather new to this. I'll have a look and put something together.
Minor tweaks to whois.godaddy.com parser
Add test suite for whois.godaddy.com
Hope that's sufficient. Like whois.markmonitor.com, the server really shouldn't be queried unless the domain is registered. If there's something else I'm missing, do let me know: I'd like to get this right.
Thanks @pmyteh. Once you create the tests, you should also run
$ rake genspec:parser
to generate the test suites and then run
to execute them. I executed the test suite and one test fails.
1) Whois::Record::Parser::WhoisGodaddyCom status_registered.expected#registrant_contacts
Failure/Error: @parser.registrant_contacts.email.should == ""
got: nil (using ==)
# ./spec/whois/record/parser/responses/whois.godaddy.com/status_registered_spec.rb:80:in `block (3 levels) in <top (required)>'
The rest of the patch is ok for me.