pubid 2.0.0.pre.alpha.46 → 2.0.0.pre.alpha.47
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 +4 -4
- data/lib/pubid/iso.rb +7 -1
- data/lib/pubid/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cdd72b807af6dfe0a054a41ea6936289d3a7baa1d9f52dd6ca526a2092fe74ed
|
|
4
|
+
data.tar.gz: 766936316a70dde70df50e5090555a8004663ed33cc21e2058e8a34ac9b56917
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 001d0cec827dee1c30411aed304e52e14eda70989fa180575f9dff377e34022dd3d37caf2b6bf4f20415102c38e4aeb1b52531351c741544f80a587e413cfbc2
|
|
7
|
+
data.tar.gz: 100d3d5314550b4fbb535440e7002e070e205b28f5faf3f4cd66dae6cd054790d41c202ab239c3f961d2ac0db253eefcc9fc5737aa69cc666cb340fdd8a5c213
|
data/lib/pubid/iso.rb
CHANGED
|
@@ -223,7 +223,13 @@ module Pubid
|
|
|
223
223
|
# @return [Pubid::Components::TypedStage, nil]
|
|
224
224
|
def self.locate_stage_by_harmonized_code(harmonized_code)
|
|
225
225
|
harmonized_str = harmonized_code.to_s
|
|
226
|
-
all_typed_stages.
|
|
226
|
+
candidates = all_typed_stages.select { |s| s.harmonized_stages&.include?(harmonized_str) }
|
|
227
|
+
# all_typed_stages walks the loaded identifier constants, so its order
|
|
228
|
+
# is load-order dependent and a bare "first match" flipped between
|
|
229
|
+
# processes (an IWA at 10.99 rendered "AWI Add"/"AWI Suppl"/"AWI"
|
|
230
|
+
# depending on the run). The IS family is the default document type;
|
|
231
|
+
# prefer it, then keep the registry order.
|
|
232
|
+
candidates.find { |s| s.type_code.to_s == "is" } || candidates.first
|
|
227
233
|
end
|
|
228
234
|
|
|
229
235
|
# Default typed stage used when no type_with_stage is present
|
data/lib/pubid/version.rb
CHANGED