relaton-iho 1.14.2 → 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 +3 -0
- data/README.adoc +13 -3
- data/grammars/basicdoc.rng +0 -1
- data/grammars/biblio.rng +13 -3
- data/lib/relaton_iho/iho_bibliography.rb +1 -1
- data/lib/relaton_iho/processor.rb +7 -0
- data/lib/relaton_iho/version.rb +1 -1
- data/relaton_iho.gemspec +3 -7
- metadata +8 -50
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f42703d14350d77f2b7f27e05bcd39eb2368b93e41663958334510b4f39de72
|
4
|
+
data.tar.gz: 4858a670fa0dbb5c1d12fd2401ebbce7ef44c9dd57d5f3a30498abb700f2b82d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: adf0bec1036948bb9501671ca7116aad714d9accdeeb4ab973c7aec4d64bdf74ffb0a7dc9952d007a19d7ddb6a133d2f146190e4c6c06cd823e5bf8cc80ce7a2
|
7
|
+
data.tar.gz: e08a8892bdc5f10e359fcba761c8f0bd1757bfe91abb7e906fa866c7697a03f97c1cbc0d8bb90da92a228d89208efebb20bf23228439d58a89be9f6e99131245
|
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/README.adoc
CHANGED
@@ -39,16 +39,26 @@ $ gem install relaton-iho
|
|
39
39
|
|
40
40
|
=== Search for a standard using keywords
|
41
41
|
|
42
|
+
Reference can be specified with or without an edition. References without an edition will return the latest edition of the standard. References with an edition will return the standard with the specified edition.
|
43
|
+
|
42
44
|
[source,ruby]
|
43
45
|
----
|
44
46
|
require 'relaton_iho'
|
45
47
|
=> true
|
46
48
|
|
47
|
-
|
48
|
-
|
49
|
-
[relaton-iho] ("B-11")
|
49
|
+
# Search for a standard using a reference without an edition
|
50
|
+
item = RelatonIho::IhoBibliography.search("IHO B-11")
|
51
|
+
[relaton-iho] ("IHO B-11") fetching...
|
52
|
+
[relaton-iho] ("IHO B-11") found B-11
|
50
53
|
=> #<RelatonIho::IhoBibliographicItem:0x007fe74fc80800
|
51
54
|
...
|
55
|
+
|
56
|
+
# Search for a standard using a reference with an edition
|
57
|
+
item = RelatonIho::IhoBibliography.search("IHO B-11 1.0.0")
|
58
|
+
[relaton-iho] ("IHO B-11 1.0.0") fetching...
|
59
|
+
[relaton-iho] ("IHO B-11 1.0.0") found B-11
|
60
|
+
=> #<RelatonIho::IhoBibliographicItem:0x00007fe79d0ed698
|
61
|
+
...
|
52
62
|
----
|
53
63
|
|
54
64
|
=== XML serialization
|
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>
|
@@ -16,7 +16,7 @@ module RelatonIho
|
|
16
16
|
def search(text, _year = nil, _opts = {}) # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
17
17
|
warn "[relaton-iho] (\"#{text}\") fetching..."
|
18
18
|
ref = text.sub(/^IHO\s/, "").sub(/^([[:alpha:]]+)(\d+)/, '\1-\2')
|
19
|
-
index = Relaton::Index.find_or_create :
|
19
|
+
index = Relaton::Index.find_or_create :iho, url: "#{ENDPOINT}index.zip"
|
20
20
|
row = index.search(ref).max_by { |r| r[:id] }
|
21
21
|
return unless row
|
22
22
|
|
data/lib/relaton_iho/version.rb
CHANGED
data/relaton_iho.gemspec
CHANGED
@@ -19,12 +19,8 @@ Gem::Specification.new do |s|
|
|
19
19
|
end
|
20
20
|
s.platform = Gem::Platform::RUBY
|
21
21
|
s.require_paths = ["lib"]
|
22
|
-
s.required_ruby_version = Gem::Requirement.new(">= 2.
|
22
|
+
s.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
23
23
|
|
24
|
-
s.
|
25
|
-
s.
|
26
|
-
s.add_development_dependency "rspec", "~> 3.0"
|
27
|
-
|
28
|
-
s.add_dependency "relaton-bib", "~> 1.14.0"
|
29
|
-
s.add_dependency "relaton-index", "~> 0.1.0"
|
24
|
+
s.add_dependency "relaton-bib", "~> 1.16.0"
|
25
|
+
s.add_dependency "relaton-index", "~> 0.2.0"
|
30
26
|
end
|
metadata
CHANGED
@@ -1,85 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-iho
|
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: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03
|
11
|
+
date: 2023-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: equivalent-xml
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0.6'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0.6'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rake
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '13.0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '13.0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rspec
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '3.0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '3.0'
|
55
13
|
- !ruby/object:Gem::Dependency
|
56
14
|
name: relaton-bib
|
57
15
|
requirement: !ruby/object:Gem::Requirement
|
58
16
|
requirements:
|
59
17
|
- - "~>"
|
60
18
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
19
|
+
version: 1.16.0
|
62
20
|
type: :runtime
|
63
21
|
prerelease: false
|
64
22
|
version_requirements: !ruby/object:Gem::Requirement
|
65
23
|
requirements:
|
66
24
|
- - "~>"
|
67
25
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.
|
26
|
+
version: 1.16.0
|
69
27
|
- !ruby/object:Gem::Dependency
|
70
28
|
name: relaton-index
|
71
29
|
requirement: !ruby/object:Gem::Requirement
|
72
30
|
requirements:
|
73
31
|
- - "~>"
|
74
32
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
33
|
+
version: 0.2.0
|
76
34
|
type: :runtime
|
77
35
|
prerelease: false
|
78
36
|
version_requirements: !ruby/object:Gem::Requirement
|
79
37
|
requirements:
|
80
38
|
- - "~>"
|
81
39
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
40
|
+
version: 0.2.0
|
83
41
|
description: 'RelatonIho: retrieve IHO Standards for bibliographic using the BibliographicItem
|
84
42
|
model'
|
85
43
|
email:
|
@@ -126,14 +84,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
126
84
|
requirements:
|
127
85
|
- - ">="
|
128
86
|
- !ruby/object:Gem::Version
|
129
|
-
version: 2.
|
87
|
+
version: 2.7.0
|
130
88
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
131
89
|
requirements:
|
132
90
|
- - ">="
|
133
91
|
- !ruby/object:Gem::Version
|
134
92
|
version: '0'
|
135
93
|
requirements: []
|
136
|
-
rubygems_version: 3.
|
94
|
+
rubygems_version: 3.3.26
|
137
95
|
signing_key:
|
138
96
|
specification_version: 4
|
139
97
|
summary: 'RelatonIho: retrieve IHO Standards for bibliographic using the BibliographicItem
|