pubid 2.0.15 → 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5209add0745268e35159dbcf7b2066e0bc6318674df1619373543e8dcf7b630e
4
- data.tar.gz: c473a14a4045acfb75200e4d0d458264c012753a7b17c631e6852dde8d008897
3
+ metadata.gz: 27065ac586f7ebfeb770a7d6b8fbb12aba67a3e7bc70476df20f98972e393df7
4
+ data.tar.gz: a798d639be33a5b7584a7afea8d0e792ee11649ab1ecb30f7c91c960748985bf
5
5
  SHA512:
6
- metadata.gz: 4a70c4fd7d7bde415662b3f164d00600885ab5743f2bd2719c11a0a5af26d55df8c3fce41198fdbdde2a9cd245dea9a37dd11b5dc83b4b3f45e4121ab0d77a86
7
- data.tar.gz: cbd917e95992105f5439c89c100fa522cdd660f06c3f446188eb94cf5d03b6512836cb141bed0e11ab634b171e3069427cb72be6f0b6c0f17d374350ca225401
6
+ metadata.gz: d87e7aa74ebe0ddbb584d0fabc78b301f65fa1e8ec35b7b2d3f4aebe17b0192ef29b80a4a28c5f5a4f4b4f243b880a30301f0116a3ae4af94cb8aa4c764af208
7
+ data.tar.gz: d7ad54afd088c6c5476f044ea6632a0c30b3e9655b1ce113c9ef7d533e9db90aa00205e758b2b132f63441d1eb4929e8fcd213e69b6877ec8f8ec61c2a713e9b
@@ -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.15"
4
+ VERSION = "2.0.16"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pubid
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.15
4
+ version: 2.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.