whois-parser-next 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '09b27e56a5225ea22fadb05db7497d93757e87e811520604377c2dcaa14900f8'
4
- data.tar.gz: 7db37727a691aad97de784fb680da596ad79f5918df671a9f862becae1a0d37e
3
+ metadata.gz: 638978b26282a734fc56d9b8fca805a2808a6a3eaf4aaa9804be31a1b1760a46
4
+ data.tar.gz: 216cfa13ce249145a3d4dff1eeb9ced17c21b2d2c0dcac5faaa1b3279666bc2e
5
5
  SHA512:
6
- metadata.gz: e71cf9f12d9602ad01877a3ab8592dfd387bc3f9afe6a01976a55a3d44af2e931ddd70debe9d9a60042b439712a4773cb4b65f29f5199f91d0815624ce749a7e
7
- data.tar.gz: 3671c9bd5513063ebde38e00f07b39e26b3b00f2ad605ba6233a402cf5002a43cf75f0c0ce52bc3dcce376c860309a438530764d3dfb6494d76006c507927ccb
6
+ metadata.gz: 6dc981427e17392f85c4d99f03ac033b9d62bfe525f6ad3785f4b1ed0d22ddf05ed1bc1848e0f0b6599a0f776ae9cfb4b938a6e913c997222313cc5693d20178
7
+ data.tar.gz: fa74d6035567289e6d29f140740a04ae5b1694c2f483ddbb3c1f1e54e1964a0f6621f3be95efb4ae1fd3a964d74141c5bf6d1b8cd33edcf38d1ba662d91bc329
data/CHANGELOG.md CHANGED
@@ -2,6 +2,26 @@
2
2
 
3
3
  This project uses [Semantic Versioning 2.0.0](http://semver.org/).
4
4
 
5
+ #### Release 0.4.2 (2026-10-18)
6
+
7
+ - SAFETY: `.ma` accepts the observed `active https://icann.org/epp#active`
8
+ status as registered only with exactly one valid `.ma` domain name and no
9
+ contradictory absence marker. Incomplete, multiple-domain, or mixed replies
10
+ remain unknown.
11
+ - SAFETY: `.sh` accepts the exact `Domain not found.` response as absence while
12
+ retaining the legacy `NOT FOUND` marker. Partial text, repeated absence
13
+ markers, record data mixed with absence, and error replies do not become
14
+ available.
15
+ - EVIDENCE: The `.ma` active-state meaning is documented by
16
+ [Registre.ma](https://www.registre.ma/language/en/domain-name/e-statuts);
17
+ IANA lists `whois.registre.ma` for `.ma` and `whois.nic.sh` for `.sh`
18
+ ([`.ma`](https://www.iana.org/domains/root/db/ma.html),
19
+ [`.sh`](https://www.iana.org/domains/root/db/sh.html)). Only minimal public
20
+ technical fields and synthetic ambiguity cases are used in tests; no
21
+ personal response data is included.
22
+ - TESTED: The full suite passes 7,024 examples with 0 failures on Ruby 3.2.2
23
+ and 3.4.5. The package smoke check passes on both versions.
24
+
5
25
  #### Release 0.4.1 (2026-10-17)
6
26
 
7
27
  - SAFETY: `.lu` records are registered only when the response contains a
@@ -1,6 +1,6 @@
1
1
  module Whois
2
2
  class Parser
3
3
  # The current library version.
4
- VERSION = "0.4.1".freeze
4
+ VERSION = "0.4.2".freeze
5
5
  end
6
6
  end
@@ -19,6 +19,33 @@ module Whois
19
19
  # The Example parser for the list of all available methods.
20
20
  #
21
21
  class WhoisNicSh < BaseIcb
22
+ self.scanner = Scanners::BaseIcannCompliant, {
23
+ pattern_available: /^(?:NOT FOUND|Domain not found\.)[ \t]*\r?$/i,
24
+ }
25
+
26
+ property_supported :status do
27
+ if absence_marker_count.positive?
28
+ available? ? :available : :unknown
29
+ else
30
+ super()
31
+ end
32
+ end
33
+
34
+ property_supported :available? do
35
+ absence_marker_count == 1 && !record_details_present?
36
+ end
37
+
38
+ private
39
+
40
+ def absence_marker_count
41
+ content_for_scanner.scan(/^(?:NOT FOUND|Domain not found\.)[ \t]*\r?$/i).length
42
+ end
43
+
44
+ def record_details_present?
45
+ content_for_scanner.match?(
46
+ /^[ \t]*(?:Domain Name|Registry Domain ID|Domain Status|Creation Date|Updated Date|Registry Expiry Date|Registrar|Name Server):/i
47
+ )
48
+ end
22
49
  end
23
50
 
24
51
  end
@@ -77,7 +77,10 @@ module Whois
77
77
  end
78
78
 
79
79
  def current_record_evidence?
80
- domain_status_values == ['clientTransferProhibited https://icann.org/epp#clientTransferProhibited']
80
+ [
81
+ ['clientTransferProhibited https://icann.org/epp#clientTransferProhibited'],
82
+ ['active https://icann.org/epp#active'],
83
+ ].include?(domain_status_values)
81
84
  end
82
85
 
83
86
  def legacy_record_evidence?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whois-parser-next
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simone Carletti