pubid 2.0.0.pre.alpha.34 → 2.0.0.pre.alpha.35

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: a573ee2d872105366598935566ec76fdd06ceff6a4232f3d39e501f2663d4a72
4
- data.tar.gz: e301a039587965c085cce5d60df5a3fd52e5fbc0f0a3ae2b85842d14b77f313f
3
+ metadata.gz: 5d11a1f42ca90ce7489640c2bf8ac820f33771d979a1d68f75cd4a54357ab499
4
+ data.tar.gz: 72795ffeef7a638ea1d3c461482e73df85501fa55ec66bd1181e82c360b6fd7c
5
5
  SHA512:
6
- metadata.gz: b40c858296fed724727fb650c7a03eb749a12550a91815d1142af5c62301eea7a703eead7c2882f59505107cc12b7d72e699aee7fa11c197a678c576561e5b64
7
- data.tar.gz: afd93d30cd101ba4722707e42c22ba0371cbe59a10db2d1e792e374b58ee523febe966157cd6a083909d5c54a0c17119dde3a039b71e7a37d9356f28401665e2
6
+ metadata.gz: 9066cd0d86ed4340acc32bf7c408b967be6d2363bf8c7a452b874f774418e352fe187823a9ab8e672245efa241527bc248f0ed2d6ea974c3a63cb539c8d9322e
7
+ data.tar.gz: 50aa7a3a914db2405b76476f905aaa5ca226acc709383dc953aa5f50c759598d616e069851998868565ef29d59a4805935d73094bc28fa831052f4189fd96630
@@ -1883,18 +1883,30 @@ module Pubid
1883
1883
  else
1884
1884
  extract_value(dv)
1885
1885
  end
1886
- # Normalize a leading hyphen ("/D-3.0" -> "3.0"); the draft
1887
- # designator is otherwise held verbatim so no digit is lost.
1888
- version = version.sub(/\A-/, "") if version
1886
+ # Normalize a leading hyphen ("/D-3.0" -> "3.0") and drop a
1887
+ # zero-padded designator prefix ("/013.0" -> "13.0", the
1888
+ # 2026-10-19 ruling; the strip is scoped to the dotted
1889
+ # designator class — "D043"/"D09"/"D0.16" keep their
1890
+ # conventional widths). The designator is
1891
+ # otherwise held verbatim so no digit is lost.
1892
+ version = version.sub(/\A-/, "").sub(/\A0(?=\d+\.\d)/, "") if version
1889
1893
 
1890
1894
  # FDIS/CDV/… are ISO/IEC stage tokens, not draft ordinals (C1
1891
- # ruling, testsuite#2). "/DDIS" and "/DFDIS" are hallucinated
1895
+ # ruling, testsuite#2). "/DDIS" and "/DFCD" are hallucinated
1892
1896
  # concatenations — the designator D does not merge onto a
1893
1897
  # stage word, and IEEE speak has no such token. The draft of
1894
1898
  # a stage rides the iso_stage slot, which Draft#to_s renders
1895
- # as the D= designator face ("…/D=DIS-2020").
1896
- if version.match?(/\A(FDIS|FCD|CDV|DIS|CD|WD|PWI|NP)\z/)
1897
- iso_stage = version
1899
+ # as the D= designator face ("…/D=DIS-2020"). The glued
1900
+ # month-name date ("-June2010", pubid#548 follow-up 2026-10-19)
1901
+ # rides the designator's date slot with the month numeric —
1902
+ # "FCD" IS an ISO stage (the 2026-10-19 ruling).
1903
+ if (m = version.match(/\A(FDIS|FCD|CDV|DIS|CD|WD|PWI|NP)(\d+)?(?:-([A-Za-z]+)(\d{4}))?\z/))
1904
+ iso_stage = m[1] + (m[2] || "")
1905
+ if m[3]
1906
+ month = REV_MONTH_NUMBERS[m[3].capitalize] ||
1907
+ (Date.parse(m[3]).month.to_s rescue nil)
1908
+ year = m[4]
1909
+ end
1898
1910
  version = nil
1899
1911
  end
1900
1912
  end
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.34"
4
+ VERSION = "2.0.0.pre.alpha.35"
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.0.pre.alpha.34
4
+ version: 2.0.0.pre.alpha.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.