pubid 2.0.14 → 2.0.16

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.
@@ -112,3 +112,26 @@ Read this before you change `lib/pubid/nist/` or `spec/pubid/nist/`. The root
112
112
  `from_hash` now derives it by the Builder's own condition and rules
113
113
  (`derive_subseries_code`, sharing SP_SUBSERIES). Locked by
114
114
  `spec/pubid/nist/from_hash_shapes_spec.rb`.
115
+
116
+ - **The bare compound series is the SERIES REFERENCE (owner ruling on the
117
+ relaton fuzz gate's `NBS CS` mutant).** The compound-series branch of the
118
+ grammar demanded a separator after the series token, so the bare
119
+ abbreviation of a named series failed to parse; the fuzz gate drops the
120
+ edition from a published `NBS CS e15`-style row and kept recording the
121
+ mutant. The ruling: the bare form is a legitimate identity — the v1
122
+ pubid-nist `series.yaml` names CS as Commercial Standards, CSM as
123
+ Commercial Standards Monthly, CIS as Consumer Information Series, CS-E
124
+ as the emergency form — the same partial/bare-reference pattern as
125
+ BIPM's `SI Brochure`. The grammar (pubid-grammar, fleet compiler
126
+ 1.3.121) makes the compound branch's separator+tail one optional group,
127
+ so every previously accepted form parses byte-identically and exactly
128
+ the bare compound-series forms join the accept set; simple-series bare
129
+ forms (`CS` alone, no publisher) are deliberately NOT covered. The bare
130
+ forms route through the normal series classes (`NBS CS` →
131
+ CommercialStandard …, `NBS CIS`/`NIST PS`/`NIST DCI` → the base
132
+ `Identifier`), render the short face as the abbreviation and the MR
133
+ face per the v1 series table (`NBS.CS`), and match their series members
134
+ as wildcard queries (`#matches?`). Locked by
135
+ `spec/pubid/nist/bare_series_reference_spec.rb`; the corpus round froze
136
+ the six rows (`NBS CS`, `NBS CSM`, `NBS CIS`, `NBS CS-E`, `NIST PS`,
137
+ `NIST DCI`) into the testsuite with the gem twin in lockstep.
@@ -13,14 +13,20 @@ module Pubid
13
13
  annotated: context.annotated,
14
14
  )
15
15
 
16
- # A nil typed_stage means "no stage" (metanorma-iso's draft-biblio
17
- # flow assigns nil through the public setter); render the supplement
18
- # without the stage segment instead of crashing on nil.render.
19
- stage_str = @id.typed_stage &&
20
- annotate(@id.typed_stage.render(context:),
16
+ # A supplement without a typed_stage is malformed per ISO DIR
17
+ # composition (pubid#680): emitting "#{base}/" hides upstream state
18
+ # corruption, so fail loudly at the render seam. The historic nil
19
+ # producer (metanorma-iso's draft-biblio flow) now stops stripping
20
+ # the stage (metanorma-iso#1696).
21
+ unless @id.typed_stage
22
+ raise ArgumentError,
23
+ "cannot render supplement without a typed_stage: #{base_str}"
24
+ end
25
+
26
+ stage_str = annotate(@id.typed_stage.render(context:),
21
27
  typed_stage_css(@id.typed_stage),
22
28
  annotated: context.annotated)
23
- parts << (stage_str ? "#{base_str}/#{stage_str}" : "#{base_str}/")
29
+ parts << "#{base_str}/#{stage_str}"
24
30
 
25
31
  num_port = render_number_portion(context)
26
32
  if num_port && !num_port.empty? && !num_port.start_with?(":")
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.14"
4
+ VERSION = "2.0.16"
5
5
  end
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.14
4
+ version: 2.0.16
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-11-07 00:00:00.000000000 Z
11
+ date: 2026-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lutaml-model