relaton-ogc 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/.gitignore +1 -0
- data/.rubocop.yml +1 -1
- data/Gemfile +6 -0
- data/grammars/basicdoc.rng +0 -1
- data/grammars/biblio.rng +12 -2
- data/lib/relaton_ogc/hit_collection.rb +3 -1
- data/lib/relaton_ogc/ogc_bibliography.rb +4 -4
- data/lib/relaton_ogc/scrapper.rb +0 -1
- data/lib/relaton_ogc/version.rb +1 -1
- data/relaton_ogc.gemspec +2 -7
- metadata +6 -76
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73f9412fdea955cd429e42939749b8073fb4fed8c38e5f78ab0b5977de89afa0
|
4
|
+
data.tar.gz: ce2cacba7411ba37786e5e414538fd3add66758203d22c14c98c4baa9f5bb5aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: deff577fbd2b83fcd787dd132d70bd35cec9f550aea0020bdcfccd3c1d3185a9a083610b9dc5c45f97026730bcb0fdfdcc8f5a581baa028daae025e1f4fb2a77
|
7
|
+
data.tar.gz: e8884898e4604fdaeaebcca4039c6a8662c7b503d4e2737e386bc47f2dc7f85ef05b96e7f5b105d6b3c0c0de63ca8219a918611a1d092aed8bd56db2bf26d7cf
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/Gemfile
CHANGED
data/grammars/basicdoc.rng
CHANGED
data/grammars/biblio.rng
CHANGED
@@ -216,6 +216,9 @@
|
|
216
216
|
<optional>
|
217
217
|
<ref name="fullname"/>
|
218
218
|
</optional>
|
219
|
+
<zeroOrMore>
|
220
|
+
<ref name="credential"/>
|
221
|
+
</zeroOrMore>
|
219
222
|
<zeroOrMore>
|
220
223
|
<ref name="affiliation"/>
|
221
224
|
</zeroOrMore>
|
@@ -232,6 +235,11 @@
|
|
232
235
|
<ref name="FullNameType"/>
|
233
236
|
</element>
|
234
237
|
</define>
|
238
|
+
<define name="credential">
|
239
|
+
<element name="credential">
|
240
|
+
<text/>
|
241
|
+
</element>
|
242
|
+
</define>
|
235
243
|
<define name="FullNameType">
|
236
244
|
<choice>
|
237
245
|
<group>
|
@@ -305,7 +313,9 @@
|
|
305
313
|
<zeroOrMore>
|
306
314
|
<ref name="affiliationdescription"/>
|
307
315
|
</zeroOrMore>
|
308
|
-
<
|
316
|
+
<optional>
|
317
|
+
<ref name="organization"/>
|
318
|
+
</optional>
|
309
319
|
</element>
|
310
320
|
</define>
|
311
321
|
<define name="affiliationname">
|
@@ -1316,7 +1326,7 @@
|
|
1316
1326
|
<value>commentaryOf</value>
|
1317
1327
|
<value>hasCommentary</value>
|
1318
1328
|
<value>related</value>
|
1319
|
-
<value>
|
1329
|
+
<value>hasComplement</value>
|
1320
1330
|
<value>complementOf</value>
|
1321
1331
|
<value>obsoletes</value>
|
1322
1332
|
<value>obsoletedBy</value>
|
@@ -31,7 +31,9 @@ module RelatonOgc
|
|
31
31
|
end
|
32
32
|
@array = case resp.status
|
33
33
|
when 200
|
34
|
-
|
34
|
+
hash = YAML.safe_load(resp.body)
|
35
|
+
hash["fetched"] = Date.today.to_s
|
36
|
+
bib = OgcBibliographicItem.from_hash hash
|
35
37
|
[Hit.new(bib, self)]
|
36
38
|
else []
|
37
39
|
end
|
@@ -68,11 +68,11 @@ module RelatonOgc
|
|
68
68
|
# @param missed_years [Array<Strig>]
|
69
69
|
def fetch_ref_err(code, year, missed_years)
|
70
70
|
id = year ? "#{code} year #{year}" : code
|
71
|
-
warn "[relaton-ogc] WARNING: no match found online for #{id}. "\
|
72
|
-
|
71
|
+
warn "[relaton-ogc] WARNING: no match found online for #{id}. " \
|
72
|
+
"The code must be exactly like it is on the standards website."
|
73
73
|
unless missed_years.empty?
|
74
|
-
warn "[relaton-ogc] (There was no match for #{year}, though there
|
75
|
-
|
74
|
+
warn "[relaton-ogc] (There was no match for #{year}, though there " \
|
75
|
+
"were matches found for #{missed_years.join(', ')}.)"
|
76
76
|
end
|
77
77
|
nil
|
78
78
|
end
|
data/lib/relaton_ogc/scrapper.rb
CHANGED
@@ -37,7 +37,6 @@ module RelatonOgc
|
|
37
37
|
def parse_page(hit) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
|
38
38
|
type = fetch_type(hit["type"])
|
39
39
|
OgcBibliographicItem.new(
|
40
|
-
fetched: Date.today.to_s,
|
41
40
|
type: "standard",
|
42
41
|
title: fetch_title(hit["title"]),
|
43
42
|
docid: fetch_docid(hit["identifier"]),
|
data/lib/relaton_ogc/version.rb
CHANGED
data/relaton_ogc.gemspec
CHANGED
@@ -23,17 +23,12 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.bindir = "exe"
|
24
24
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
25
25
|
spec.require_paths = ["lib"]
|
26
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 2.
|
26
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
27
27
|
|
28
28
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
29
|
-
spec.add_development_dependency "pry-byebug"
|
30
29
|
spec.add_development_dependency "rake", "~> 13.0"
|
31
30
|
spec.add_development_dependency "rspec", "~> 3.0"
|
32
|
-
spec.add_development_dependency "ruby-jing"
|
33
|
-
spec.add_development_dependency "simplecov"
|
34
|
-
spec.add_development_dependency "vcr"
|
35
|
-
spec.add_development_dependency "webmock"
|
36
31
|
|
37
|
-
spec.add_dependency "faraday", "~>
|
32
|
+
spec.add_dependency "faraday", "~> 2.7.0"
|
38
33
|
spec.add_dependency "relaton-iso-bib", "~> 1.14.0"
|
39
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-ogc
|
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: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: equivalent-xml
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.6'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: pry-byebug
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: rake
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,76 +52,20 @@ dependencies:
|
|
66
52
|
- - "~>"
|
67
53
|
- !ruby/object:Gem::Version
|
68
54
|
version: '3.0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: ruby-jing
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: simplecov
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: vcr
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ">="
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: webmock
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ">="
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - ">="
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
125
55
|
- !ruby/object:Gem::Dependency
|
126
56
|
name: faraday
|
127
57
|
requirement: !ruby/object:Gem::Requirement
|
128
58
|
requirements:
|
129
59
|
- - "~>"
|
130
60
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
61
|
+
version: 2.7.0
|
132
62
|
type: :runtime
|
133
63
|
prerelease: false
|
134
64
|
version_requirements: !ruby/object:Gem::Requirement
|
135
65
|
requirements:
|
136
66
|
- - "~>"
|
137
67
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
68
|
+
version: 2.7.0
|
139
69
|
- !ruby/object:Gem::Dependency
|
140
70
|
name: relaton-iso-bib
|
141
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -200,14 +130,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
200
130
|
requirements:
|
201
131
|
- - ">="
|
202
132
|
- !ruby/object:Gem::Version
|
203
|
-
version: 2.
|
133
|
+
version: 2.7.0
|
204
134
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
205
135
|
requirements:
|
206
136
|
- - ">="
|
207
137
|
- !ruby/object:Gem::Version
|
208
138
|
version: '0'
|
209
139
|
requirements: []
|
210
|
-
rubygems_version: 3.
|
140
|
+
rubygems_version: 3.3.26
|
211
141
|
signing_key:
|
212
142
|
specification_version: 4
|
213
143
|
summary: 'RelatonOgc: retrieve OGC Standards for bibliographic use using the OgcBibliographicItem
|