pubid 2.0.0.pre.alpha.60 → 2.0.0.pre.alpha.61
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 +20 -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: c5afd984209314db5f3b13fa48ef4d24e3f90ffb08802b9362fa8e52b66f35af
|
|
4
|
+
data.tar.gz: 1fe21dc3bebe7cba7606d7b7df25ea2f2c0277b111193e6e260b2ceb922d3a30
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5d3f796d89995bdc9c994fffb5ac713b317c65e1b6ff46c102b4b72ce2ce7078e08ca3ee5471e00c6403b2d18a815df838b420fa124e4229dbe86daee42e9074
|
|
7
|
+
data.tar.gz: 5ed1785a22c19d5ffe47ca3733380d8e5bdfb37d66d57c0535866b71f4050a5a95c090ac35cc76403eab5aba4cab67568963f8643a4b414141a46d5160539d22
|
data/lib/pubid/ieee/parser.rb
CHANGED
|
@@ -1349,6 +1349,26 @@ module Pubid
|
|
|
1349
1349
|
Regexp.last_match(0)
|
|
1350
1350
|
end
|
|
1351
1351
|
end
|
|
1352
|
+
# The crawl glues the month onto the stage after the code's slash
|
|
1353
|
+
# ("IEEE/IEC/ISO P80005-1/FDIS_March 2012", and its canonical
|
|
1354
|
+
# comma form "… Draft P80005-1/FDIS_March, 2012"): the stage is
|
|
1355
|
+
# the ISO/IEC token and the month belongs to the date (the
|
|
1356
|
+
# 2026-10-25 ruling) — decode onto the D= designator face. Scoped
|
|
1357
|
+
# to a real month name glued to a stage token; stage iteration
|
|
1358
|
+
# ("_CDV/V3", "_CDV July 2015") has its own routes.
|
|
1359
|
+
cleaned = cleaned.gsub(
|
|
1360
|
+
%r{\A((?:IEEE|ISO|IEC)(?:/(?:IEEE|ISO|IEC))*\s+(?:Draft\s+)?P?[A-Z0-9][A-Z0-9.-]*/)(FDIS|FCD|CDV|DIS|CD|WD|PWI|NP)_([A-Za-z]+),?\s+(\d{4})\z}
|
|
1361
|
+
) do
|
|
1362
|
+
month = ::Pubid::Ieee::Builder::REV_MONTH_NUMBERS[
|
|
1363
|
+
Regexp.last_match(3).capitalize
|
|
1364
|
+
]
|
|
1365
|
+
if month
|
|
1366
|
+
"#{Regexp.last_match(1)}D=#{Regexp.last_match(2)}-" \
|
|
1367
|
+
"#{Regexp.last_match(4)}#{month}"
|
|
1368
|
+
else
|
|
1369
|
+
Regexp.last_match(0)
|
|
1370
|
+
end
|
|
1371
|
+
end
|
|
1352
1372
|
# The lettered REV spellings glue to the number ("P1310Rev3",
|
|
1353
1373
|
# "P1722Rev1") or carry an after-word separator ("REV.ma",
|
|
1354
1374
|
# "REV-ma"); the rev rules read a space or a bare word
|
data/lib/pubid/version.rb
CHANGED