pubid 2.0.0.pre.alpha.53 → 2.0.0.pre.alpha.54

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: 4013c9f2d03ae3ad7ebdafd0f22176d7c72bca2a584ce7ba5dc1c9734cd539f0
4
- data.tar.gz: 6b1b1629bd55bef868ac6a8d094b29e573b5a398210bce5df1b5ff593d2484c2
3
+ metadata.gz: f019bbf21f35ade53d2bef965c09925d09c295586f0215cf9f62668656e17dfb
4
+ data.tar.gz: 5e5222d962c5d0e5248e7cd439bf94ba87371124b6b732c559772d2dd0a8d8f4
5
5
  SHA512:
6
- metadata.gz: f3f4b9358cc7a97ef6bd7e586573fa9fda3af7745f39140b0002a2f1a2322052ee75b49a5183d2b58ae0a948f5e654570b920132fce14a4aa8f8b7f0e02dfd6e
7
- data.tar.gz: d5563fa6632491b80a6f9795db6f9b9b8f5906285f58f8f3ee13d7a2514aa1bf750ccdf5bce4a3d6545300121b6cc3ae70913bd34fdd8dfc3b26b9465723758a
6
+ metadata.gz: 4b68c2698b4f01371e90df88f1d4a6b2d95ace5d6ff14c8b84f06df4abec739da845f1713d4c2dd35f235eeba46b3311c9fd512a2b43557f3722c6e6b844232c
7
+ data.tar.gz: fe766e1046a16085d7490f763e144a48955551a2054739008983b8c2144ec73ae20a9410c67a10a752cec92720d4b1de89986bab84c6d53ec81d7e9ddf13eb84
@@ -98,18 +98,33 @@ day: nil, iso_stage: nil, iso_iteration: nil)
98
98
  COMPOUND_SUFFIX = /=D?(PWI|NP|WD|CDV|FDIS|DIS|CD)(?:[.-]?(\d+))?\z/.freeze
99
99
  private_constant :COMPOUND_SUFFIX
100
100
 
101
+ # The D-echo aliases ("DDIS3" = D + DIS + iteration 3) normalize
102
+ # through the compound split; every other pure stage token
103
+ # ("CD1", "FCD", "CDV1") restores verbatim -- the compound split
104
+ # would degrade the glued iterations and drop the stages the
105
+ # alias list never knew, so from_hash(row) != parse(row).
106
+ ECHO_SUFFIX = /\AD(=?(PWI|NP|WD|CDV|FDIS|DIS|CD|FCD))(?:[.-]?\d+)?\z/.freeze
107
+ private_constant :ECHO_SUFFIX
108
+
101
109
  def self.parse(value)
102
110
  return value if value.is_a?(Draft)
103
111
 
104
112
  body = strip_prefix(value.to_s)
105
113
  iso_stage = nil
106
114
  iso_iteration = nil
107
- if (m = body.match(COMPOUND_SUFFIX))
115
+ if body.start_with?("=") && body[1..].match?(/\A[A-Z][A-Z0-9]*\z/) &&
116
+ !body[1..].match?(ECHO_SUFFIX)
117
+ iso_stage = body[1..]
118
+ body = ""
119
+ elsif (m = body.match(COMPOUND_SUFFIX))
108
120
  iso_stage = m[1]
109
121
  iso_iteration = m[2]
110
122
  body = body[0...m.begin(0)]
111
123
  end
112
- version, month, day, year, comma = split_date(body)
124
+ # a designator that consumed the whole body carries no date;
125
+ # split_date("") would leave version as "" where the parse
126
+ # path has nil (and != compares them)
127
+ version, month, day, year, comma = body.empty? ? [nil, nil, nil, nil, false] : split_date(body)
113
128
  draft = new(version: version, month: month, day: day, year: year,
114
129
  iso_stage: iso_stage, iso_iteration: iso_iteration)
115
130
  draft.comma_before_month = comma
data/lib/pubid/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pubid
4
- VERSION = "2.0.0.pre.alpha.53"
4
+ VERSION = "2.0.0.pre.alpha.54"
5
5
  end
@@ -9,12 +9,16 @@ joint_prefixes:
9
9
  - ISO/IEC
10
10
  - IEC/ISO
11
11
  - ISO/IEC/IEEE
12
+ - ISO/IEEE
12
13
  iec:
13
14
  - ISO/IEC
14
15
  - IEC/ISO
15
16
  - ISO/IEC/IEEE
17
+ - IEC/IEEE
16
18
  ieee:
17
19
  - ISO/IEC/IEEE
20
+ - ISO/IEEE
21
+ - IEC/IEEE
18
22
  ansi:
19
23
  - ANSI/ASHRAE
20
24
  - ANSI/AMCA
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pubid
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre.alpha.53
4
+ version: 2.0.0.pre.alpha.54
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-10-23 00:00:00.000000000 Z
11
+ date: 2026-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lutaml-model