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 +4 -4
- data/lib/pubid/ieee/builder.rb +19 -7
- 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: 5d11a1f42ca90ce7489640c2bf8ac820f33771d979a1d68f75cd4a54357ab499
|
|
4
|
+
data.tar.gz: 72795ffeef7a638ea1d3c461482e73df85501fa55ec66bd1181e82c360b6fd7c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9066cd0d86ed4340acc32bf7c408b967be6d2363bf8c7a452b874f774418e352fe187823a9ab8e672245efa241527bc248f0ed2d6ea974c3a63cb539c8d9322e
|
|
7
|
+
data.tar.gz: 50aa7a3a914db2405b76476f905aaa5ca226acc709383dc953aa5f50c759598d616e069851998868565ef29d59a4805935d73094bc28fa831052f4189fd96630
|
data/lib/pubid/ieee/builder.rb
CHANGED
|
@@ -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")
|
|
1887
|
-
# designator
|
|
1888
|
-
|
|
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 "/
|
|
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
|
-
|
|
1897
|
-
|
|
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