relaton-un 1.14.0 → 1.16.0
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 +1 -0
- data/.github/workflows/release.yml +5 -3
- data/.gitignore +1 -0
- data/.rubocop.yml +1 -1
- data/Gemfile +5 -0
- data/grammars/basicdoc.rng +0 -1
- data/grammars/biblio.rng +13 -3
- data/lib/relaton_un/hit_collection.rb +13 -9
- data/lib/relaton_un/version.rb +1 -1
- data/lib/relaton_un.rb +1 -0
- data/relaton_un.gemspec +7 -12
- metadata +16 -72
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c6791ae82b472328fb219a6b7fc1fba4ea6c5b8539120f8131079cf4d66fcee
|
4
|
+
data.tar.gz: 78eccc13a3e597c377d7e82ad474b8c86345118dfd9119fdfb0ee9830e235cc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d53ebca1c9e6c802953b6598aec20f91ec15fe2c80f1af3ea09f1fae4b502b14713e7442491cdd5ca10c84cb5ac7307e6dbbe967b839527cf1ecbfd05afb34d
|
7
|
+
data.tar.gz: 9761c548c89ec7a5426f1984e3c3e61003c9869f78c9441333a21070bea317c69f36b46bbbd99ffe791ae084580713f42f5d43797d0b92babff961356b51b9ba
|
data/.github/workflows/rake.yml
CHANGED
@@ -7,11 +7,13 @@ on:
|
|
7
7
|
inputs:
|
8
8
|
next_version:
|
9
9
|
description: |
|
10
|
-
Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
|
10
|
+
Next release version. Possible values: x.y.z, major, minor, patch (or pre|rc|etc).
|
11
|
+
Also, you can pass 'skip' to skip 'git tag' and do 'gem push' for the current version
|
11
12
|
required: true
|
12
13
|
default: 'skip'
|
13
|
-
|
14
|
-
|
14
|
+
repository_dispatch:
|
15
|
+
types: [ do-release ]
|
16
|
+
|
15
17
|
|
16
18
|
jobs:
|
17
19
|
release:
|
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">
|
@@ -1273,7 +1283,7 @@
|
|
1273
1283
|
<value>mergedInto</value>
|
1274
1284
|
<value>splits</value>
|
1275
1285
|
<value>splitInto</value>
|
1276
|
-
<value>
|
1286
|
+
<value>instanceOf</value>
|
1277
1287
|
<value>hasInstance</value>
|
1278
1288
|
<value>exemplarOf</value>
|
1279
1289
|
<value>hasExemplar</value>
|
@@ -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>
|
@@ -23,8 +23,12 @@ module RelatonUn
|
|
23
23
|
# ca_file = "/Users/andrej/Library/Preferences/httptoolkit/ca.pem"
|
24
24
|
# @http.cert_store.set_default_paths
|
25
25
|
# @http.cert_store.add_file ca_file
|
26
|
+
if RUBY_VERSION.to_f > 3.0
|
27
|
+
@http.ssl_version = :TLSv1_2 # rubocop:disable Naming/VariableNumber
|
28
|
+
end
|
26
29
|
@http.read_timeout = 120
|
27
30
|
if (form_resp = get_page)
|
31
|
+
# doc = Nokogiri::HTML page_resp(form_resp, text).body
|
28
32
|
doc = Nokogiri::HTML page_resp(form_resp, text).body
|
29
33
|
@array = doc.css("div.viewHover").map { |item| hit item }
|
30
34
|
end
|
@@ -34,7 +38,7 @@ module RelatonUn
|
|
34
38
|
|
35
39
|
# @param location [String]
|
36
40
|
# @param deeep [Integer]
|
37
|
-
# @return [
|
41
|
+
# @return [String, nil]
|
38
42
|
def get_page(location = "/", deep = 0)
|
39
43
|
return if deep > 3
|
40
44
|
|
@@ -55,16 +59,16 @@ module RelatonUn
|
|
55
59
|
# @return [Array<String>]
|
56
60
|
def form_data(form, text) # rubocop:disable Metrics/CyclomaticComplexity
|
57
61
|
fd = form.xpath(
|
58
|
-
"//input[@type!='radio']|"\
|
59
|
-
"//input[@type='radio'][@checked]|"\
|
60
|
-
"//select[@name!='view:_id1:_id2:cbLang']|"\
|
62
|
+
"//input[@type!='radio']|" \
|
63
|
+
"//input[@type='radio'][@checked]|" \
|
64
|
+
"//select[@name!='view:_id1:_id2:cbLang']|" \
|
61
65
|
"//textarea",
|
62
66
|
).reduce([]) do |m, i|
|
63
67
|
v = case i[:name]
|
64
68
|
when "view:_id1:_id2:txtSymbol" then text
|
65
69
|
when "view:_id1:_id2:rgTrunc", "view:_id1:_id2:cbSort" then "R"
|
66
70
|
when "view:_id1:_id2:cbType" then "FP"
|
67
|
-
when "$$xspsubmitid" then "view:_id1:_id2:
|
71
|
+
when "$$xspsubmitid" then "view:_id1:_id2:_id131"
|
68
72
|
when "$$xspsubmitscroll" then "0|102"
|
69
73
|
when "view:_id1" then "view:_id1"
|
70
74
|
else i[:value]
|
@@ -86,7 +90,7 @@ module RelatonUn
|
|
86
90
|
req["Content-Type"] = "multipart/form-data; boundary=#{BOUNDARY}"
|
87
91
|
req.body = form_data(form, text).join("\r\n")
|
88
92
|
resp = @http.request req
|
89
|
-
get_page URI.parse(resp["location"]).request_uri
|
93
|
+
get_page Addressable::URI.parse(resp["location"]).request_uri
|
90
94
|
end
|
91
95
|
|
92
96
|
# @param item [Nokogiri::XML::Element]
|
@@ -173,9 +177,9 @@ module RelatonUn
|
|
173
177
|
# @param req [Net::HTTP::Get, Net::HTTP::Post]
|
174
178
|
def set_headers(req) # rubocop:disable Metrics/AbcSize
|
175
179
|
set_cookie req
|
176
|
-
req["Accept"] = "text/html,application/xhtml+xml,application/xml;q=0.9,"\
|
177
|
-
|
178
|
-
|
180
|
+
req["Accept"] = "text/html,application/xhtml+xml,application/xml;q=0.9," \
|
181
|
+
"image/avif,image/webp,image/apng,*/*;q=0.8," \
|
182
|
+
"application/signed-exchange;v=b3;q=0.9"
|
179
183
|
req["Accept-Encoding"] = "gzip, deflate, br"
|
180
184
|
req["Accept-Language"] = "en-US;q=0.8,en;q=0.7"
|
181
185
|
req["Cache-Control"] = "max-age=0"
|
data/lib/relaton_un/version.rb
CHANGED
data/lib/relaton_un.rb
CHANGED
data/relaton_un.gemspec
CHANGED
@@ -9,13 +9,13 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Ribose Inc."]
|
10
10
|
spec.email = ["open.source@ribose.com"]
|
11
11
|
|
12
|
-
spec.summary = "RelatonIso: retrieve CC Standards for bibliographic "\
|
12
|
+
spec.summary = "RelatonIso: retrieve CC Standards for bibliographic " \
|
13
13
|
"use using the IsoBibliographicItem model"
|
14
|
-
spec.description = "RelatonIso: retrieve CC Standards for bibliographic "\
|
14
|
+
spec.description = "RelatonIso: retrieve CC Standards for bibliographic " \
|
15
15
|
"use using the IsoBibliographicItem model"
|
16
16
|
spec.homepage = "https://github.com/relaton/relaton-un"
|
17
17
|
spec.license = "BSD-2-Clause"
|
18
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 2.
|
18
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
19
19
|
|
20
20
|
spec.metadata["homepage_uri"] = spec.homepage
|
21
21
|
spec.metadata["source_code_uri"] = spec.homepage
|
@@ -32,15 +32,10 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
33
33
|
spec.require_paths = ["lib"]
|
34
34
|
|
35
|
-
spec.
|
36
|
-
spec.
|
37
|
-
spec.
|
38
|
-
spec.
|
39
|
-
spec.add_development_dependency "webmock"
|
40
|
-
|
41
|
-
spec.add_dependency "faraday", "~> 1.0"
|
42
|
-
spec.add_dependency "http-cookie"
|
43
|
-
spec.add_dependency "relaton-bib", "~> 1.14.0"
|
35
|
+
spec.add_dependency "addressable", "~> 2.8.0"
|
36
|
+
spec.add_dependency "faraday", "~> 2.7.0"
|
37
|
+
spec.add_dependency "http-cookie", "~> 1.0.5"
|
38
|
+
spec.add_dependency "relaton-bib", "~> 1.16.0"
|
44
39
|
spec.add_dependency "unf_ext", ">= 0.0.7.7"
|
45
40
|
end
|
46
41
|
# rubocop:enable Metrics/BlockLength
|
metadata
CHANGED
@@ -1,127 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-un
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.16.0
|
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-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: addressable
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
20
|
-
type: :
|
19
|
+
version: 2.8.0
|
20
|
+
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: ruby-jing
|
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
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: simplecov
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: vcr
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: webmock
|
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'
|
26
|
+
version: 2.8.0
|
83
27
|
- !ruby/object:Gem::Dependency
|
84
28
|
name: faraday
|
85
29
|
requirement: !ruby/object:Gem::Requirement
|
86
30
|
requirements:
|
87
31
|
- - "~>"
|
88
32
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
33
|
+
version: 2.7.0
|
90
34
|
type: :runtime
|
91
35
|
prerelease: false
|
92
36
|
version_requirements: !ruby/object:Gem::Requirement
|
93
37
|
requirements:
|
94
38
|
- - "~>"
|
95
39
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
40
|
+
version: 2.7.0
|
97
41
|
- !ruby/object:Gem::Dependency
|
98
42
|
name: http-cookie
|
99
43
|
requirement: !ruby/object:Gem::Requirement
|
100
44
|
requirements:
|
101
|
-
- - "
|
45
|
+
- - "~>"
|
102
46
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
47
|
+
version: 1.0.5
|
104
48
|
type: :runtime
|
105
49
|
prerelease: false
|
106
50
|
version_requirements: !ruby/object:Gem::Requirement
|
107
51
|
requirements:
|
108
|
-
- - "
|
52
|
+
- - "~>"
|
109
53
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
54
|
+
version: 1.0.5
|
111
55
|
- !ruby/object:Gem::Dependency
|
112
56
|
name: relaton-bib
|
113
57
|
requirement: !ruby/object:Gem::Requirement
|
114
58
|
requirements:
|
115
59
|
- - "~>"
|
116
60
|
- !ruby/object:Gem::Version
|
117
|
-
version: 1.
|
61
|
+
version: 1.16.0
|
118
62
|
type: :runtime
|
119
63
|
prerelease: false
|
120
64
|
version_requirements: !ruby/object:Gem::Requirement
|
121
65
|
requirements:
|
122
66
|
- - "~>"
|
123
67
|
- !ruby/object:Gem::Version
|
124
|
-
version: 1.
|
68
|
+
version: 1.16.0
|
125
69
|
- !ruby/object:Gem::Dependency
|
126
70
|
name: unf_ext
|
127
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -188,14 +132,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
188
132
|
requirements:
|
189
133
|
- - ">="
|
190
134
|
- !ruby/object:Gem::Version
|
191
|
-
version: 2.
|
135
|
+
version: 2.7.0
|
192
136
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
193
137
|
requirements:
|
194
138
|
- - ">="
|
195
139
|
- !ruby/object:Gem::Version
|
196
140
|
version: '0'
|
197
141
|
requirements: []
|
198
|
-
rubygems_version: 3.
|
142
|
+
rubygems_version: 3.3.26
|
199
143
|
signing_key:
|
200
144
|
specification_version: 4
|
201
145
|
summary: 'RelatonIso: retrieve CC Standards for bibliographic use using the IsoBibliographicItem
|