relaton 1.14.0 → 1.14.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +0 -1
- data/lib/relaton/db.rb +2 -2
- data/lib/relaton/registry.rb +1 -1
- data/lib/relaton/version.rb +1 -1
- data/relaton.gemspec +1 -0
- data/spec/relaton/db_cache_spec.rb +1 -1
- data/spec/relaton/db_spec.rb +8 -0
- data/spec/relaton/registry_spec.rb +5 -0
- data/spec/relaton_spec.rb +5 -0
- data/spec/vcr_cassetes/doi_10_6028_nist_ir_8245.yml +74 -0
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba19ef4231f91cd1c73a0a12ea6b94767c806ea8e2cd1f3189417b8516885815
|
4
|
+
data.tar.gz: 3d31d937b29d24a7bbd9edd8ecd481d87b9f913e1083afe761c36ef8d986bf4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c578292b8a0fc0f943e8e881bcaba046b38d9042b9ab6213748e1bf627296ae950ecfb7e9486612cfb8ae24659d7416fcb5fe6c2a305eecdf2b6dcab748d73b8
|
7
|
+
data.tar.gz: 38c2a08b85107d690507fd09ed674276e493d95ffcaba9bef7454a9a7338f848d9c971d46be6cc4256b8317c5d67125360946cd5ee352b845ff92c1cd28a4861
|
data/.github/workflows/rake.yml
CHANGED
data/lib/relaton/db.rb
CHANGED
@@ -277,6 +277,8 @@ module Relaton
|
|
277
277
|
# RelatonBipm::BipmBibliographicItem, RelatonIho::IhoBibliographicItem,
|
278
278
|
# RelatonOmg::OmgBibliographicItem, RelatonW3c::W3cBibliographicItem]
|
279
279
|
def combine_doc(code, year, opts, stdclass) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength,Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity
|
280
|
+
return if stdclass == :relaton_bipm
|
281
|
+
|
280
282
|
if (refs = code.split " + ").size > 1
|
281
283
|
reltype = "derivedFrom"
|
282
284
|
reldesc = nil
|
@@ -528,8 +530,6 @@ module Relaton
|
|
528
530
|
Relaton::Db.new(globalname, localname)
|
529
531
|
end
|
530
532
|
|
531
|
-
private
|
532
|
-
|
533
533
|
def flush_caches(gcache, lcache)
|
534
534
|
FileUtils.rm_rf gcache unless gcache.nil?
|
535
535
|
FileUtils.rm_rf lcache unless lcache.nil?
|
data/lib/relaton/registry.rb
CHANGED
@@ -9,7 +9,7 @@ module Relaton
|
|
9
9
|
relaton_gb relaton_iec relaton_ietf relaton_iso relaton_itu relaton_nist
|
10
10
|
relaton_ogc relaton_calconnect relaton_omg relaton_un relaton_w3c
|
11
11
|
relaton_ieee relaton_iho relaton_bipm relaton_ecma relaton_cie relaton_bsi
|
12
|
-
relaton_cen relaton_iana relaton_3gpp relaton_oasis
|
12
|
+
relaton_cen relaton_iana relaton_3gpp relaton_oasis relaton_doi
|
13
13
|
].freeze
|
14
14
|
|
15
15
|
include Singleton
|
data/lib/relaton/version.rb
CHANGED
data/relaton.gemspec
CHANGED
@@ -35,6 +35,7 @@ Gem::Specification.new do |spec|
|
|
35
35
|
spec.add_dependency "relaton-calconnect", "~> 1.14.0"
|
36
36
|
spec.add_dependency "relaton-cen", "~> 1.14.0"
|
37
37
|
spec.add_dependency "relaton-cie", "~> 1.14.0"
|
38
|
+
spec.add_dependency "relaton-doi", "~> 1.14.0"
|
38
39
|
spec.add_dependency "relaton-ecma", "~> 1.14.0"
|
39
40
|
spec.add_dependency "relaton-gb", "~> 1.14.0"
|
40
41
|
spec.add_dependency "relaton-iana", "~> 1.14.0"
|
@@ -16,7 +16,7 @@ RSpec.describe Relaton::DbCache do
|
|
16
16
|
|
17
17
|
it "write same file by concurent processes" do
|
18
18
|
dir = "testcache/iso"
|
19
|
-
FileUtils.mkdir_p dir
|
19
|
+
FileUtils.mkdir_p dir
|
20
20
|
file_name = File.join dir, "iso_123.xml"
|
21
21
|
file = File.open file_name, File::RDWR | File::CREAT, encoding: "UTF-8"
|
22
22
|
file.flock File::LOCK_EX
|
data/spec/relaton/db_spec.rb
CHANGED
@@ -24,6 +24,14 @@ RSpec.describe Relaton::Db do
|
|
24
24
|
end.to output("[relaton] (ISO 123) not found.\n").to_stderr
|
25
25
|
end
|
26
26
|
end
|
27
|
+
|
28
|
+
context "#combine_doc" do
|
29
|
+
it "retrun nil for BIPM documents" do
|
30
|
+
code = double "code"
|
31
|
+
expect(code).not_to receive(:split)
|
32
|
+
expect(subject.send(:combine_doc, code, nil, {}, :relaton_bipm)).to be_nil
|
33
|
+
end
|
34
|
+
end
|
27
35
|
end
|
28
36
|
|
29
37
|
context "class methods" do
|
@@ -100,6 +100,11 @@ RSpec.describe Relaton::Registry do
|
|
100
100
|
it "OASIS" do
|
101
101
|
expect(Relaton::Registry.instance.by_type("OASIS")).to be_instance_of RelatonOasis::Processor
|
102
102
|
end
|
103
|
+
|
104
|
+
it "DOI" do
|
105
|
+
expect(Relaton::Registry.instance.by_type("DOI")).to be_instance_of RelatonDoi::Processor
|
106
|
+
expect(Relaton::Registry.instance.processor_by_ref("doi:10.1000/182")).to be_instance_of RelatonDoi::Processor
|
107
|
+
end
|
103
108
|
end
|
104
109
|
|
105
110
|
it "find processot by dataset" do
|
data/spec/relaton_spec.rb
CHANGED
@@ -325,6 +325,11 @@ RSpec.describe Relaton::Db do
|
|
325
325
|
expect(bib).to be_instance_of RelatonBipm::BipmBibliographicItem
|
326
326
|
end
|
327
327
|
|
328
|
+
it "get DOI reference", vcr: "doi_10_6028_nist_ir_8245" do
|
329
|
+
bib = @db.fetch "doi:10.6028/nist.ir.8245"
|
330
|
+
expect(bib).to be_instance_of RelatonBib::BibliographicItem
|
331
|
+
end
|
332
|
+
|
328
333
|
context "get combined documents" do
|
329
334
|
context "ISO" do
|
330
335
|
it "included" do
|
@@ -0,0 +1,74 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.crossref.org/works/10.6028%2Fnist.ir.8245
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday/v1.10.2 Serrano/v1.0.0 (mailto:open.source@ribose.com)
|
12
|
+
X-User-Agent:
|
13
|
+
- Faraday/v1.10.2 Serrano/v1.0.0 (mailto:open.source@ribose.com)
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
Accept:
|
17
|
+
- "*/*"
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Date:
|
24
|
+
- Thu, 08 Dec 2022 01:01:05 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json
|
27
|
+
Content-Length:
|
28
|
+
- '954'
|
29
|
+
Set-Cookie:
|
30
|
+
- AWSALB=jGzaACntcASu08ojHkR5Ax3gVDRs5Jp3S6CTwNNJchip7+l7IUnAplTuJieVwk3y0bITWUk/yMDhqkBCn+mzM1LcM7eKGhPdSMYU7qBUCY6HJo+uap6xax+BZW2G;
|
31
|
+
Expires=Thu, 15 Dec 2022 01:01:05 GMT; Path=/
|
32
|
+
- AWSALBCORS=jGzaACntcASu08ojHkR5Ax3gVDRs5Jp3S6CTwNNJchip7+l7IUnAplTuJieVwk3y0bITWUk/yMDhqkBCn+mzM1LcM7eKGhPdSMYU7qBUCY6HJo+uap6xax+BZW2G;
|
33
|
+
Expires=Thu, 15 Dec 2022 01:01:05 GMT; Path=/; SameSite=None
|
34
|
+
Access-Control-Expose-Headers:
|
35
|
+
- Link
|
36
|
+
Access-Control-Allow-Headers:
|
37
|
+
- X-Requested-With, Accept, Accept-Encoding, Accept-Charset, Accept-Language,
|
38
|
+
Accept-Ranges, Cache-Control
|
39
|
+
Access-Control-Allow-Origin:
|
40
|
+
- "*"
|
41
|
+
Vary:
|
42
|
+
- Accept-Encoding
|
43
|
+
Server:
|
44
|
+
- Jetty(9.4.40.v20210413)
|
45
|
+
X-Ratelimit-Limit:
|
46
|
+
- '50'
|
47
|
+
X-Ratelimit-Interval:
|
48
|
+
- 1s
|
49
|
+
X-Api-Pool:
|
50
|
+
- polite
|
51
|
+
X-Rate-Limit-Limit:
|
52
|
+
- '50'
|
53
|
+
X-Rate-Limit-Interval:
|
54
|
+
- 1s
|
55
|
+
Permissions-Policy:
|
56
|
+
- interest-cohort=()
|
57
|
+
Connection:
|
58
|
+
- close
|
59
|
+
body:
|
60
|
+
encoding: ASCII-8BIT
|
61
|
+
string: '{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"institution":[{"name":"National
|
62
|
+
Institute of Standards and Technology","acronym":["NIST"],"place":["Gaithersburg,
|
63
|
+
MD"],"department":["Information Technology Laboratory","Material Measurement
|
64
|
+
Laboratory"]}],"indexed":{"date-parts":[[2022,4,4]],"date-time":"2022-04-04T00:10:40Z","timestamp":1649031040985},"publisher-location":"Gaithersburg,
|
65
|
+
MD","reference-count":0,"publisher":"National Institute of Standards and Technology","funder":[{"DOI":"10.13039\/100007764r","name":"Information
|
66
|
+
Technology Laboratory","doi-asserted-by":"publisher"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":[],"DOI":"10.6028\/nist.ir.8245","type":"report","created":{"date-parts":[[2019,3,28]],"date-time":"2019-03-28T13:01:30Z","timestamp":1553778090000},"source":"Crossref","is-referenced-by-count":3,"title":["Voices
|
67
|
+
of first responders - examining public safety communication\n problems
|
68
|
+
and requested functionality:"],"prefix":"10.6028","author":[{"given":"Shanee","family":"Dawkins","sequence":"first","affiliation":[]},{"given":"Yee-Yin","family":"Choong","sequence":"additional","affiliation":[]},{"given":"Mary
|
69
|
+
F","family":"Theofanos","sequence":"additional","affiliation":[]},{"given":"Kristen
|
70
|
+
K","family":"Greene","sequence":"additional","affiliation":[]},{"given":"Susanne","family":"Furman","sequence":"additional","affiliation":[]},{"given":"Michelle","family":"Steves","sequence":"additional","affiliation":[]},{"given":"Sandra
|
71
|
+
Spickard","family":"Prettyman","sequence":"additional","affiliation":[]}],"member":"4068","published-online":{"date-parts":[[2019,3]]},"container-title":[],"original-title":[],"deposited":{"date-parts":[[2020,8,20]],"date-time":"2020-08-20T14:05:37Z","timestamp":1597932337000},"score":1,"resource":{"primary":{"URL":"https:\/\/nvlpubs.nist.gov\/nistpubs\/ir\/2019\/NIST.IR.8245.pdf"}},"subtitle":["findings
|
72
|
+
from user-centered interviews, phase 1, volume 2"],"short-title":[],"issued":{"date-parts":[[2019,3]]},"references-count":0,"URL":"http:\/\/dx.doi.org\/10.6028\/nist.ir.8245","relation":{},"published":{"date-parts":[[2019,3]]}}}'
|
73
|
+
recorded_at: Thu, 08 Dec 2022 01:01:05 GMT
|
74
|
+
recorded_with: VCR 6.1.0
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.14.
|
4
|
+
version: 1.14.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-12-
|
11
|
+
date: 2022-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: relaton-3gpp
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 1.14.0
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: relaton-doi
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 1.14.0
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 1.14.0
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: relaton-ecma
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -558,6 +572,7 @@ files:
|
|
558
572
|
- spec/vcr_cassetes/bsi_bs_en_iso_8848.yml
|
559
573
|
- spec/vcr_cassetes/cc_dir_10005_2019.yml
|
560
574
|
- spec/vcr_cassetes/cie_001_1980.yml
|
575
|
+
- spec/vcr_cassetes/doi_10_6028_nist_ir_8245.yml
|
561
576
|
- spec/vcr_cassetes/ecma_6.yml
|
562
577
|
- spec/vcr_cassetes/en_10160_1999.yml
|
563
578
|
- spec/vcr_cassetes/fisp_140.yml
|