relaton-iho 1.14.1 → 1.14.3
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 +3 -2
- data/README.adoc +13 -3
- data/grammars/basicdoc.rng +0 -1
- data/grammars/biblio.rng +12 -2
- 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 +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7240754831c7c3f7755ca76ab9146e04ab8f47a49ab5f06510b995964bac12fc
|
4
|
+
data.tar.gz: 6c27b77afad2d493912506de26b7d22c1a9bba8c3e3d44d49c03420bdf8a5ed6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 583f3052bdce69fc00b5b784ac697311d3094de006f5eaf1474ecc974095ec8e9bc6884c00787f4f4225c5e9bef903b24a473caa9d2bbd8881863265e3b69e2d
|
7
|
+
data.tar.gz: 1038cb049fccc2606c6c7a112dbf36d554c27225952701ac77b4d27e8d819926210854d1d6befa37e12017cc4b2f4778d44c4122073cc3a81f64653071b21ec8
|
data/.github/workflows/rake.yml
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">
|
@@ -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>
|
@@ -17,7 +17,7 @@ module RelatonIho
|
|
17
17
|
warn "[relaton-iho] (\"#{text}\") fetching..."
|
18
18
|
ref = text.sub(/^IHO\s/, "").sub(/^([[:alpha:]]+)(\d+)/, '\1-\2')
|
19
19
|
index = Relaton::Index.find_or_create :IHO, url: "#{ENDPOINT}index.zip"
|
20
|
-
row = index.search(ref).
|
20
|
+
row = index.search(ref).max_by { |r| r[:id] }
|
21
21
|
return unless row
|
22
22
|
|
23
23
|
uri = URI("#{ENDPOINT}#{row[:file]}")
|
data/lib/relaton_iho/version.rb
CHANGED
data/relaton_iho.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-iho
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.14.
|
4
|
+
version: 1.14.3
|
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-
|
11
|
+
date: 2023-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: equivalent-xml
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
75
|
+
version: 0.2.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
82
|
+
version: 0.2.0
|
83
83
|
description: 'RelatonIho: retrieve IHO Standards for bibliographic using the BibliographicItem
|
84
84
|
model'
|
85
85
|
email:
|
@@ -133,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
133
|
- !ruby/object:Gem::Version
|
134
134
|
version: '0'
|
135
135
|
requirements: []
|
136
|
-
rubygems_version: 3.
|
136
|
+
rubygems_version: 3.3.26
|
137
137
|
signing_key:
|
138
138
|
specification_version: 4
|
139
139
|
summary: 'RelatonIho: retrieve IHO Standards for bibliographic using the BibliographicItem
|