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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 940290660744c08549c90e2f28aa593c809ac0621d312a89047c249630b92da3
4
- data.tar.gz: e22ece93142456284a0419b0ecb9d88fc8b3da64b449a2a8b4b535b407bddb1c
3
+ metadata.gz: 7240754831c7c3f7755ca76ab9146e04ab8f47a49ab5f06510b995964bac12fc
4
+ data.tar.gz: 6c27b77afad2d493912506de26b7d22c1a9bba8c3e3d44d49c03420bdf8a5ed6
5
5
  SHA512:
6
- metadata.gz: 5be56d9a8af28df3f02489c954c40005beb54424d1410250f23d989ae9b6ef9e64ee8acd33a60e898416407bf9c52f4be108bfa0e9c8a18c04ec5e5360097a34
7
- data.tar.gz: 4940eec0bb2191fcd3de1300b4af177c9d877f1b907897cc106c6d8c83af3d6aa04cdb3cfc22118b21dc2f041695866d96fc483016d8154a18f5207040c2af4a
6
+ metadata.gz: 583f3052bdce69fc00b5b784ac697311d3094de006f5eaf1474ecc974095ec8e9bc6884c00787f4f4225c5e9bef903b24a473caa9d2bbd8881863265e3b69e2d
7
+ data.tar.gz: 1038cb049fccc2606c6c7a112dbf36d554c27225952701ac77b4d27e8d819926210854d1d6befa37e12017cc4b2f4778d44c4122073cc3a81f64653071b21ec8
@@ -5,6 +5,7 @@ name: rake
5
5
  on:
6
6
  push:
7
7
  branches: [ master, main ]
8
+ tags: [ v* ]
8
9
  pull_request:
9
10
 
10
11
  jobs:
@@ -10,8 +10,9 @@ on:
10
10
  Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
11
11
  required: true
12
12
  default: 'skip'
13
- push:
14
- tags: [ v* ]
13
+ repository_dispatch:
14
+ types: [ do-release ]
15
+
15
16
 
16
17
  jobs:
17
18
  release:
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
- item = RelatonIho::IhoBibliography.search("B-11")
48
- [relaton-iho] ("B-11") fetching...
49
- [relaton-iho] ("B-11") found 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
@@ -522,7 +522,6 @@
522
522
  <value>tip</value>
523
523
  <value>important</value>
524
524
  <value>caution</value>
525
- <value>statement</value>
526
525
  </choice>
527
526
  </define>
528
527
  <define name="figure">
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
- <ref name="organization"/>
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>complements</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).first
20
+ row = index.search(ref).max_by { |r| r[:id] }
21
21
  return unless row
22
22
 
23
23
  uri = URI("#{ENDPOINT}#{row[:file]}")
@@ -36,5 +36,12 @@ module RelatonIho
36
36
  def grammar_hash
37
37
  @grammar_hash ||= ::RelatonIho.grammar_hash
38
38
  end
39
+
40
+ #
41
+ # Remove index file
42
+ #
43
+ def remove_index_file
44
+ Relaton::Index.find_or_create(:IHO, url: true).remove_file
45
+ end
39
46
  end
40
47
  end
@@ -1,3 +1,3 @@
1
1
  module RelatonIho
2
- VERSION = "1.14.1".freeze
2
+ VERSION = "1.14.3".freeze
3
3
  end
data/relaton_iho.gemspec CHANGED
@@ -26,5 +26,5 @@ Gem::Specification.new do |s|
26
26
  s.add_development_dependency "rspec", "~> 3.0"
27
27
 
28
28
  s.add_dependency "relaton-bib", "~> 1.14.0"
29
- s.add_dependency "relaton-index", "~> 0.1.0"
29
+ s.add_dependency "relaton-index", "~> 0.2.0"
30
30
  end
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.1
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-03-08 00:00:00.000000000 Z
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.1.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.1.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.1.6
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