From 5809f86696bdb1e893ffcd37ab84e7bccd336cc2 Mon Sep 17 00:00:00 2001 From: Sofia Alves Date: Thu, 2 Mar 2023 17:04:33 -0300 Subject: [PATCH 1/4] debugging --- lib/whois/parsers/whois.nic.cl.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/whois/parsers/whois.nic.cl.rb b/lib/whois/parsers/whois.nic.cl.rb index 28134bd9..6fbc2086 100644 --- a/lib/whois/parsers/whois.nic.cl.rb +++ b/lib/whois/parsers/whois.nic.cl.rb @@ -35,6 +35,7 @@ class WhoisNicCl < Base end property_supported :available? do + byebug !!(content_for_scanner =~ /^(.+?): no existe$/) end From e7c4eda9eead5a1c65c296457b22e91dd0e7def6 Mon Sep 17 00:00:00 2001 From: Sofia Alves Date: Thu, 2 Mar 2023 17:13:14 -0300 Subject: [PATCH 2/4] fix nic.cl and dnd.pt available methods --- lib/whois/parsers/whois.dns.pt.rb | 2 +- lib/whois/parsers/whois.nic.cl.rb | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/whois/parsers/whois.dns.pt.rb b/lib/whois/parsers/whois.dns.pt.rb index bca5bd0d..12a1d18a 100644 --- a/lib/whois/parsers/whois.dns.pt.rb +++ b/lib/whois/parsers/whois.dns.pt.rb @@ -42,7 +42,7 @@ class WhoisDnsPt < Base end property_supported :available? do - !!(content_for_scanner =~ /^.* no match$/) + !!(content_for_scanner =~ /^.* No Match$/) end property_supported :registered? do diff --git a/lib/whois/parsers/whois.nic.cl.rb b/lib/whois/parsers/whois.nic.cl.rb index 6fbc2086..ec16fa89 100644 --- a/lib/whois/parsers/whois.nic.cl.rb +++ b/lib/whois/parsers/whois.nic.cl.rb @@ -35,8 +35,7 @@ class WhoisNicCl < Base end property_supported :available? do - byebug - !!(content_for_scanner =~ /^(.+?): no existe$/) + !!(content_for_scanner =~ /^(.+?): no entries found/) end property_supported :registered? do From 9cfe6e427f4b2b0c9d4e00e5b00faf5c563b1012 Mon Sep 17 00:00:00 2001 From: Sofia Alves Date: Thu, 2 Mar 2023 19:59:51 -0300 Subject: [PATCH 3/4] remove end of string match --- lib/whois/parsers/whois.dns.pt.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/whois/parsers/whois.dns.pt.rb b/lib/whois/parsers/whois.dns.pt.rb index 12a1d18a..bf94122c 100644 --- a/lib/whois/parsers/whois.dns.pt.rb +++ b/lib/whois/parsers/whois.dns.pt.rb @@ -42,7 +42,7 @@ class WhoisDnsPt < Base end property_supported :available? do - !!(content_for_scanner =~ /^.* No Match$/) + !!(content_for_scanner =~ /^.* No Match/) end property_supported :registered? do From 7eb90133e07a54b4ac4fa7763cd7d910264e165e Mon Sep 17 00:00:00 2001 From: Sofia Alves Date: Fri, 3 Mar 2023 12:33:26 -0300 Subject: [PATCH 4/4] fix specs --- spec/fixtures/responses/whois.dns.pt/pt/status_available.txt | 2 +- spec/fixtures/responses/whois.nic.cl/cl/status_available.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/fixtures/responses/whois.dns.pt/pt/status_available.txt b/spec/fixtures/responses/whois.dns.pt/pt/status_available.txt index c18ae524..80ecdea6 100644 --- a/spec/fixtures/responses/whois.dns.pt/pt/status_available.txt +++ b/spec/fixtures/responses/whois.dns.pt/pt/status_available.txt @@ -1 +1 @@ -u34jedzcq.pt no match \ No newline at end of file +u34jedzcq.pt - No Match\n \ No newline at end of file diff --git a/spec/fixtures/responses/whois.nic.cl/cl/status_available.txt b/spec/fixtures/responses/whois.nic.cl/cl/status_available.txt index 304dfe66..ea9d70cb 100644 --- a/spec/fixtures/responses/whois.nic.cl/cl/status_available.txt +++ b/spec/fixtures/responses/whois.nic.cl/cl/status_available.txt @@ -1 +1 @@ -u34jedzcq.cl: no existe +%%\n%% This is the NIC Chile Whois server (whois.nic.cl).\n%%\n%% Rights restricted by copyright.\n%% See https://www.nic.cl/normativa/politica-publicacion-de-datos-cl.pdf\n%%\n\u34jedzcq.cl: no entries found.\n\n \ No newline at end of file