relaton-iana 1.12.3 → 1.13.0

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: 2f83f06a1729e6bdd28bd55a53e38c3569af02f21688df68237a2c8e57f8ea40
4
- data.tar.gz: 461d3ec1a68a95a78e91448f9975d6973deeb0260e1a1590d1299ab04f1d3d01
3
+ metadata.gz: b49d0c8b26b49087faa09c396eb7edf1ab022ca47d839df6bfcfb561bb0e7ed9
4
+ data.tar.gz: af63f2c69e7e8d3aef16a633ff0bad87352519d2ca0f28d2be864f3d6ac6612a
5
5
  SHA512:
6
- metadata.gz: 5fe87f10e54798f20bb6a51a28911df61170b1593a4b3b915c964586cc74345bffae6c3710762e5c1b8158be520de5b82dcb5ec5b6627f9cd260c54aba00cf9c
7
- data.tar.gz: '08857ab11716d87e77c96909370861a03bf6139aebdc88fa77f8ec4712e62b5a241d87fd53ada0265a692e4d76c67f75947ef950a84c03e7eddfe4bc177e973c'
6
+ metadata.gz: 6f75255c79c47aed5811deaf20d249c49c0b96dae3fe2c0347b1fcec80abd3b36be860712c0f960f2e08bcef1411867aab6a45772ced5ce2587457cbe3737134
7
+ data.tar.gz: f4a2584fbb673b9edc47e3c929ef319319d5e4461cbe92efd9a2d366cab5d48a6845b7a7e44541c8cfa6d08113b9c7fc7c933b55ebc8e0c35dfd9ab4597692e4
data/grammars/biblio.rng CHANGED
@@ -225,9 +225,9 @@
225
225
  <zeroOrMore>
226
226
  <ref name="forename"/>
227
227
  </zeroOrMore>
228
- <zeroOrMore>
229
- <ref name="initial"/>
230
- </zeroOrMore>
228
+ <optional>
229
+ <ref name="formatted-initials"/>
230
+ </optional>
231
231
  <ref name="surname"/>
232
232
  <zeroOrMore>
233
233
  <ref name="addition"/>
@@ -247,8 +247,8 @@
247
247
  <ref name="LocalizedString"/>
248
248
  </element>
249
249
  </define>
250
- <define name="initial">
251
- <element name="initial">
250
+ <define name="formatted-initials">
251
+ <element name="formatted-initials">
252
252
  <ref name="LocalizedString"/>
253
253
  </element>
254
254
  </define>
@@ -264,6 +264,9 @@
264
264
  </define>
265
265
  <define name="forename">
266
266
  <element name="forename">
267
+ <optional>
268
+ <attribute name="initial"/>
269
+ </optional>
267
270
  <ref name="LocalizedString"/>
268
271
  </element>
269
272
  </define>
data/grammars/isodoc.rng CHANGED
@@ -69,6 +69,17 @@
69
69
  </zeroOrMore>
70
70
  </element>
71
71
  </define>
72
+ <define name="AdmonitionType">
73
+ <choice>
74
+ <value>warning</value>
75
+ <value>note</value>
76
+ <value>tip</value>
77
+ <value>important</value>
78
+ <value>caution</value>
79
+ <value>statement</value>
80
+ <value>editorial</value>
81
+ </choice>
82
+ </define>
72
83
  <define name="index">
73
84
  <element name="index">
74
85
  <optional>
@@ -1274,7 +1285,12 @@
1274
1285
  </define>
1275
1286
  <define name="span">
1276
1287
  <element name="span">
1277
- <attribute name="class"/>
1288
+ <optional>
1289
+ <attribute name="class"/>
1290
+ </optional>
1291
+ <optional>
1292
+ <attribute name="style"/>
1293
+ </optional>
1278
1294
  <oneOrMore>
1279
1295
  <ref name="TextElement"/>
1280
1296
  </oneOrMore>
@@ -2493,6 +2509,16 @@
2493
2509
  <text/>
2494
2510
  </element>
2495
2511
  </optional>
2512
+ <optional>
2513
+ <element name="amendment">
2514
+ <text/>
2515
+ </element>
2516
+ </optional>
2517
+ <optional>
2518
+ <element name="corrigendum">
2519
+ <text/>
2520
+ </element>
2521
+ </optional>
2496
2522
  <optional>
2497
2523
  <element name="language">
2498
2524
  <text/>
@@ -46,10 +46,14 @@ module RelatonIana
46
46
  end
47
47
  attempt = 0
48
48
  json = {}
49
+ resp = nil
49
50
  until attempt > 3 || json["items"]
50
51
  if attempt.positive?
51
- warn "Rate limit is reached. Retrying in 30 sec."
52
- sleep 30
52
+ t = resp.headers["x-ratelimit-reset"].to_i - Time.now.to_i
53
+ if t.positive?
54
+ warn "Rate limit is reached. Retrying in #{t} sec."
55
+ sleep t
56
+ end
53
57
  end
54
58
  attempt += 1
55
59
  resp = Faraday.get "https://api.github.com/search/code", params, headers
@@ -11,6 +11,8 @@ module RelatonIana
11
11
  file = text.sub(/^IANA\s/, "").gsub(/[\s,:\/]/, "_").downcase
12
12
  url = "#{SOURCE}#{file}.yaml"
13
13
  resp = Net::HTTP.get_response URI(url)
14
+ return unless resp.code == "200"
15
+
14
16
  hash = YAML.safe_load resp.body
15
17
  RelatonBib::BibliographicItem.from_hash hash
16
18
  rescue SocketError, Timeout::Error, Errno::EINVAL, Errno::ECONNRESET,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RelatonIana
4
- VERSION = "1.12.3"
4
+ VERSION = "1.13.0"
5
5
  end
data/relaton_iana.gemspec CHANGED
@@ -39,7 +39,7 @@ Gem::Specification.new do |spec|
39
39
  spec.add_development_dependency "webmock"
40
40
 
41
41
  spec.add_dependency "faraday", "~> 1.0"
42
- spec.add_dependency "relaton-bib", "~> 1.12.0"
42
+ spec.add_dependency "relaton-bib", "~> 1.13.0"
43
43
 
44
44
  # Uncomment to register a new dependency of your gem
45
45
  # spec.add_dependency "example-gem", "~> 1.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-iana
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.3
4
+ version: 1.13.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: 2022-07-11 00:00:00.000000000 Z
11
+ date: 2022-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equivalent-xml
@@ -142,14 +142,14 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 1.12.0
145
+ version: 1.13.0
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 1.12.0
152
+ version: 1.13.0
153
153
  description: 'RelatonIana: Ruby XMLDOC impementation.'
154
154
  email:
155
155
  - open.source@ribose.com