pubid 2.0.0.pre.alpha.31 → 2.0.0.pre.alpha.32
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/errors.rb +3 -1
- data/lib/pubid/ieee/parser.rb +20 -0
- data/lib/pubid/nist/identifiers/base.rb +7 -0
- data/lib/pubid/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7be6586137819c45f6867465e80ef876071f2e7ba1d8ec4ca6277f2d8cc04a39
|
|
4
|
+
data.tar.gz: 79567acfc4ee053b6e805f4c28a853cd5f355d1c47bc22fe363d8c4a5f313afe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f806961b3b31f0632c830439eb783b2b43d78d568d143b8cbca44abde895ff56ca9e45062b7698994f838fbc5375c12205c3337a0803baba9dad85add23de4b1
|
|
7
|
+
data.tar.gz: db51973b22a41c8653cbd426fe612ae3b46f4991869debd8ac5e2b03668b20fabf2082366c2e80b4cf64c3994a1e262ed43206510a3999d5331534df65012f7d
|
data/lib/pubid/errors.rb
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "pubid"
|
|
3
|
+
# no `require "pubid"` here: errors.rb loads from pubid.rb itself, and
|
|
4
|
+
# the umbrella self-require is a circular load whose failure order is
|
|
5
|
+
# platform-dependent (windows raises mid-cycle where linux tolerates it)
|
|
4
6
|
require "parslet"
|
|
5
7
|
|
|
6
8
|
module Pubid
|
data/lib/pubid/ieee/parser.rb
CHANGED
|
@@ -1278,6 +1278,26 @@ module Pubid
|
|
|
1278
1278
|
# already carries the project semantics (docs/IEEE-DRAFT-STAGES.md
|
|
1279
1279
|
# §1.1), so the redundant word drops and the joint route parses.
|
|
1280
1280
|
cleaned = cleaned.gsub(%r{IEEE/CSA Draft (P[A-Z0-9])}, 'IEEE/CSA \1')
|
|
1281
|
+
# The same redundant word rides the wider joint lists
|
|
1282
|
+
# ("IEEE//ISO/IEC Draft P29119-2/D=DIS-201112"); the crawl also
|
|
1283
|
+
# doubles the publisher slash (the 2026-10-14 ruling: the list
|
|
1284
|
+
# normalizes to single slashes). Drop the word and collapse the
|
|
1285
|
+
# slash before the joint route sees either.
|
|
1286
|
+
# Scoped to the D= stage-draft tail: the doubled-D ("DDIS2") and
|
|
1287
|
+
# stage-month ("DFDIS_March") tails route elsewhere until the
|
|
1288
|
+
# grammar carries them - dropping the word there would route
|
|
1289
|
+
# them to the generic standard face with a slashed copublisher.
|
|
1290
|
+
cleaned = cleaned.gsub(%r{((?:IEEE|ISO|IEC)(?:/(?:IEEE|ISO|IEC|CSA))+)\s+Draft\s+(P[A-Z0-9][A-Z0-9.-]*/D=[A-Z])}, '\1 \2')
|
|
1291
|
+
cleaned = cleaned.gsub(%r{(IEEE|ISO|IEC)//}, '\1/')
|
|
1292
|
+
# The lettered REV spellings glue to the number ("P1310Rev3",
|
|
1293
|
+
# "P1722Rev1") or carry an after-word separator ("REV.ma",
|
|
1294
|
+
# "REV-ma"); the rev rules read a space or a bare word
|
|
1295
|
+
# respectively, so the boundary normalizes (the render keeps the
|
|
1296
|
+
# glued face - "IEEE P1310 Rev3/D2-2011-02" parses to
|
|
1297
|
+
# "IEEE P1310Rev3/D2-2011-02"). The before-word separator the
|
|
1298
|
+
# Rev doctrine carries ("-REVmc") is untouched.
|
|
1299
|
+
cleaned = cleaned.gsub(%r{(REV|Rev|rev)[.\-](?=[A-Za-z])}, '\1')
|
|
1300
|
+
cleaned = cleaned.gsub(%r{(\d)(REV|Rev|rev)}, '\1 \2')
|
|
1281
1301
|
|
|
1282
1302
|
# The corrigendum's own draft follows the ordinal after a comma
|
|
1283
1303
|
# ("P11073-10418-2011/Cor 1, D4, July 2015"): re-spell the comma as
|
|
@@ -51,6 +51,13 @@ module Pubid
|
|
|
51
51
|
COMPACT_FLAT_VALUES.each do |key|
|
|
52
52
|
out[key] = { "value" => out[key] } if out[key].is_a?(::String)
|
|
53
53
|
end
|
|
54
|
+
# Legacy index rows (the pre-flattening component era) carry the
|
|
55
|
+
# number as a {"value" => …} Hash; the attribute is a plain
|
|
56
|
+
# string now, so the Hash collapses to its scalar before the
|
|
57
|
+
# assignment dumps it (pubid#540).
|
|
58
|
+
if out["number"].is_a?(::Hash) && out["number"].key?("value")
|
|
59
|
+
out["number"] = out["number"]["value"]
|
|
60
|
+
end
|
|
54
61
|
out
|
|
55
62
|
end
|
|
56
63
|
|
data/lib/pubid/version.rb
CHANGED
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.
|
|
4
|
+
version: 2.0.0.pre.alpha.32
|
|
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-
|
|
11
|
+
date: 2026-10-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lutaml-model
|