relaton-nist 1.9.7 → 1.9.8
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/grammars/biblio.rng +2 -2
- data/lib/relaton_nist/data_fetcher.rb +11 -2
- data/lib/relaton_nist/scrapper.rb +8 -2
- data/lib/relaton_nist/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: b8d329e1c313005dc313d6a9f11581a3091c11357eaffaed991e70936d676884
|
|
4
|
+
data.tar.gz: ee7c8965f6ccec33db3be2a88c577fc85de894b0797c16d4b48eeb0533466fd8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f43154e131aafeb2ccebeff6444d3a5ea2a1194e010c05b72388deb118d3db92b42a51e20e71ce53872bdae88fa504f49e1b16917d6d5502f74a99c11d742af7
|
|
7
|
+
data.tar.gz: 9e4146500cb2724b7c42208cbb6432d1cb7b8d8b83156572e0dd3159d202504d707662995657cffb49ff6440a31d0de3398bd3ee35b744d6aaf636bdbc422154
|
data/grammars/biblio.rng
CHANGED
|
@@ -42,8 +42,17 @@ module RelatonNist
|
|
|
42
42
|
anchor(doc).gsub(".", " ")
|
|
43
43
|
end
|
|
44
44
|
|
|
45
|
-
def doi(doc)
|
|
46
|
-
doc.at("doi_data/doi").text
|
|
45
|
+
def doi(doc) # rubocop:disable Metrics/CyclomaticComplexity
|
|
46
|
+
id = doc.at("doi_data/doi").text
|
|
47
|
+
case id
|
|
48
|
+
when "10.6028/NBS.CIRC.e2e" then "10.6028/NBS.CIRC.2e2"
|
|
49
|
+
when "10.6028/NBS.CIRC.sup" then "10.6028/NBS.CIRC.24e7sup"
|
|
50
|
+
when "10.6028/NBS.CIRC.supJun1925-Jun1926" then "10.6028/NBS.CIRC.24e7sup2"
|
|
51
|
+
when "10.6028/NBS.CIRC.supJun1925-Jun1927" then "10.6028/NBS.CIRC.24e7sup3"
|
|
52
|
+
when "10.6028/NBS.CIRC.24supJuly1922" then "10.6028/NBS.CIRC.24e6sup"
|
|
53
|
+
when "10.6028/NBS.CIRC.24supJan1924" then "10.6028/NBS.CIRC.24e6sup2"
|
|
54
|
+
else id
|
|
55
|
+
end
|
|
47
56
|
end
|
|
48
57
|
|
|
49
58
|
def anchor(doc)
|
|
@@ -209,9 +209,15 @@ module RelatonNist
|
|
|
209
209
|
# @param ref [String]
|
|
210
210
|
# @param uri [String]
|
|
211
211
|
# @return [RelatonNist::DocumentRelation]
|
|
212
|
-
def doc_relation(type, ref, uri, lang = "en", script = "Latn")
|
|
212
|
+
def doc_relation(type, ref, uri, lang = "en", script = "Latn") # rubocop:disable Metrics/MethodLength
|
|
213
|
+
if type == "supersedes"
|
|
214
|
+
descr = RelatonBib::FormattedString.new(content: "supersedes", language: lang, script: script)
|
|
215
|
+
t = "obsoletes"
|
|
216
|
+
else t = type
|
|
217
|
+
end
|
|
213
218
|
DocumentRelation.new(
|
|
214
|
-
type:
|
|
219
|
+
type: t,
|
|
220
|
+
description: descr,
|
|
215
221
|
bibitem: RelatonBib::BibliographicItem.new(
|
|
216
222
|
formattedref: RelatonBib::FormattedRef.new(
|
|
217
223
|
content: ref, language: lang, script: script, format: "text/plain",
|
data/lib/relaton_nist/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: relaton-nist
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.9.
|
|
4
|
+
version: 1.9.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-01-
|
|
11
|
+
date: 2022-01-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: equivalent-xml
|