weppos / whois-parser

An intelligent — pure Ruby — WHOIS parser.
https://whoisrb.org
MIT License
99 stars 102 forks source link

parsers: whois.cira.ca: Add new version support for 2019 whois output #131

Open XaF opened 4 years ago

XaF commented 4 years ago

Most recent whois output from CIRA, with year 2019, has a very different output than what was expected in the past. This adds support for it while keeping support for previous versions of the whois output.

This requires the changes introduced in PR https://github.com/weppos/whois-parser/pull/130 to work properly (as issue with the missing new line otherwise).

Fixes #126

joallard commented 4 years ago

Looking good! Fixes #126.

ericgascoine commented 4 years ago

I'm finding that this fix is needed for the .ca domains.

If we're not comfortable with the fix in #130, Is it possible to move the fix for the unterminated (with newline lines into the parser (lib/whois/parsers/whois.cira.ca.rb) with something like:

      def content_for_scanner
        super
        @content_for_scanner << "\n" unless @content_for_scanner.end_with?("\n")
        @content_for_scanner
      end

How can we move this PR forward?

XaF commented 4 years ago

I just answered to @joallard on #130 to have this move forward. Who has merge rights on this repository though ?

jarthod commented 2 years ago

Thanks for this @XaF, for the record I ended up starting my fork in which I merged some of the pending PRs and provided more fixes. I didn't cherry-pick your PR here because it was keeping a lot of legacy code and adding on top, instead I refactored the parser to use the standard ICANN Compliant parser and updated all tests in ed7068c39a9821b084eb59416e49d3f0a7567d83. There's no reason to keep supporting the outdated version (unless you see one?), whois.cira.ca server is not going to return older versions any more. This version is working well for the couple hundreds of .ca domains I have. So people who need this can use my fork in the meantime:

gem 'whois-parser', github: 'jarthod/whois-parser' # Unofficial but more up-to-date fork, check status at https://github.com/jarthod/whois-parser