pubid 2.0.0.pre.alpha.37 → 2.0.0.pre.alpha.38
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/parser.rb +21 -0
- 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: e167bcdea8ccdc856546623449ce7ecb5662e48105794db9f36026b8d577f300
|
|
4
|
+
data.tar.gz: fdc189199738c34551faa29b7aa7abf0ccbdc006ef9aa5c1ae62b3f404b64cce
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bd79b71b7fd2b457d78f225d3cc37eb2280a56b32aa24e604b14d8aa66f4f14812915d960769c4c69668f8c5b6b17d67f24399683c4e4dd6f0dd84b5ca882bd8
|
|
7
|
+
data.tar.gz: b0ce6c4e2d05416fc0ec1f77a29291bce32380efd13162ff62406bff78a60dc77c0b5404f3b61f036d868bc6b1f2c84003961cc6710b45ac0712facf6b972355
|
data/lib/pubid/ieee/parser.rb
CHANGED
|
@@ -1295,6 +1295,27 @@ module Pubid
|
|
|
1295
1295
|
# them to the generic standard face with a slashed copublisher.
|
|
1296
1296
|
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')
|
|
1297
1297
|
cleaned = cleaned.gsub(%r{(IEEE|ISO|IEC)//}, '\1/')
|
|
1298
|
+
# The IEEE-led joint list's dash/underscore stage tail carries a
|
|
1299
|
+
# month-name date ("IEEE/ISO/IEC P29119-2-DIS, December 2011",
|
|
1300
|
+
# "IEEE/ISO/IEC P29119-4_FDIS, December 2020"). The generic route
|
|
1301
|
+
# claims it first and answers with a slashed copublisher
|
|
1302
|
+
# ("IEEE//ISO/IEC Draft …"), so re-spell the stage as the D=
|
|
1303
|
+
# designator the joint route reads. Scoped to the IEEE-led list:
|
|
1304
|
+
# the ISO/IEC- and IEC/IEEE-led forms already render the face.
|
|
1305
|
+
cleaned = cleaned.gsub(
|
|
1306
|
+
%r{\A(IEEE(?:/(?:IEEE|ISO|IEC)){2,})\s+(P[A-Z0-9][A-Z0-9.-]*?)[-_](FDIS|FCD|CDV|DIS|CD|WD|PWI|NP)(\d*),\s+([A-Za-z]+)\s+(\d{4})\z}
|
|
1307
|
+
) do
|
|
1308
|
+
month = ::Pubid::Ieee::Builder::REV_MONTH_NUMBERS[
|
|
1309
|
+
Regexp.last_match(5).capitalize
|
|
1310
|
+
]
|
|
1311
|
+
if month
|
|
1312
|
+
"#{Regexp.last_match(1)} #{Regexp.last_match(2)}/" \
|
|
1313
|
+
"D=#{Regexp.last_match(3)}#{Regexp.last_match(4)}-" \
|
|
1314
|
+
"#{Regexp.last_match(6)}#{month}"
|
|
1315
|
+
else
|
|
1316
|
+
Regexp.last_match(0)
|
|
1317
|
+
end
|
|
1318
|
+
end
|
|
1298
1319
|
# The lettered REV spellings glue to the number ("P1310Rev3",
|
|
1299
1320
|
# "P1722Rev1") or carry an after-word separator ("REV.ma",
|
|
1300
1321
|
# "REV-ma"); the rev rules read a space or a bare word
|
data/lib/pubid/version.rb
CHANGED