relaton-ogc 1.5.0 → 1.7.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: f0a38c9dc676ea585e444e7cfcb06e216b5a862db7684777e294299c4ed493ff
4
- data.tar.gz: be628a96ced2f4c262477043da015e5f7acb392995316fde66a7e4818e55c0bf
3
+ metadata.gz: ae341d281586acccf073502fcd3c6a365318e281541294783c9d1dc58e641f3f
4
+ data.tar.gz: f90b4586a0738444aced05be6288ead41293ba9931fc2dedc45b656be81b5321
5
5
  SHA512:
6
- metadata.gz: 0242ef19a2b5498eafef4b0fa4eff285d03942d87b0e7f7ee12767a94379acd7ced4657190688b1fd74690f5d9eda7eb59d3ef6779fd1b9836d44f5fb65a34cd
7
- data.tar.gz: 4faaeb44bfdb72466f126ffff9aba347084e71f96d4321a9b732f053fafa54e24dd51f4580e33fae1853b68d01c362105673ab57784ac2014ada34350929a5f4
6
+ metadata.gz: 6f3bc34127f4e1e263fe0f258a265d492001fa9da483eed7c70aed22aec4b80beb5f987f82d8da6c0c455eb630919bb367206a8b76ad78cebe53e04b398ee79b
7
+ data.tar.gz: 9c4fc6e1f66b79767a2f68a8e74816c545c602b932d8677f6ee03dbcd01dec532a44fb515871fba073b919dce75c6681eec48cdcf010b2f0831ccdf6d63dc522
@@ -26,6 +26,8 @@ jobs:
26
26
  - name: Update gems
27
27
  run: |
28
28
  sudo gem install bundler --force
29
+ ruby -v | grep 2.5 && bundle config set build.debase --with-cflags="-Wno-error=implicit-function-declaration"
30
+ ruby -v | grep 2.5 && bundle config set build.ruby-debug-ide --with-cflags="-Wno-error=implicit-function-declaration"
29
31
  bundle install --jobs 4 --retry 3
30
32
  - name: Run specs
31
33
  run: |
@@ -24,6 +24,14 @@
24
24
  <start>
25
25
  <ref name="standard-document"/>
26
26
  </start>
27
+ <define name="doctype">
28
+ <element name="doctype">
29
+ <optional>
30
+ <attribute name="abbreviation"/>
31
+ </optional>
32
+ <ref name="DocumentType"/>
33
+ </element>
34
+ </define>
27
35
  <define name="hyperlink">
28
36
  <element name="link">
29
37
  <attribute name="target">
@@ -141,6 +149,11 @@
141
149
  <data type="boolean"/>
142
150
  </attribute>
143
151
  </optional>
152
+ <optional>
153
+ <attribute name="key">
154
+ <data type="boolean"/>
155
+ </attribute>
156
+ </optional>
144
157
  <oneOrMore>
145
158
  <ref name="dt"/>
146
159
  <ref name="dd"/>
@@ -1164,49 +1177,7 @@
1164
1177
  </define>
1165
1178
  <define name="annex">
1166
1179
  <element name="annex">
1167
- <optional>
1168
- <attribute name="id">
1169
- <data type="ID"/>
1170
- </attribute>
1171
- </optional>
1172
- <optional>
1173
- <attribute name="language"/>
1174
- </optional>
1175
- <optional>
1176
- <attribute name="script"/>
1177
- </optional>
1178
- <optional>
1179
- <attribute name="inline-header">
1180
- <data type="boolean"/>
1181
- </attribute>
1182
- </optional>
1183
- <attribute name="obligation">
1184
- <choice>
1185
- <value>normative</value>
1186
- <value>informative</value>
1187
- </choice>
1188
- </attribute>
1189
- <optional>
1190
- <ref name="section-title"/>
1191
- </optional>
1192
- <group>
1193
- <group>
1194
- <zeroOrMore>
1195
- <ref name="BasicBlock"/>
1196
- </zeroOrMore>
1197
- <zeroOrMore>
1198
- <ref name="note"/>
1199
- </zeroOrMore>
1200
- </group>
1201
- <zeroOrMore>
1202
- <choice>
1203
- <ref name="annex-subsection"/>
1204
- <ref name="terms"/>
1205
- <ref name="definitions"/>
1206
- <ref name="references"/>
1207
- </choice>
1208
- </zeroOrMore>
1209
- </group>
1180
+ <ref name="Annex-Section"/>
1210
1181
  </element>
1211
1182
  </define>
1212
1183
  <define name="terms">
@@ -52,10 +52,15 @@ module RelatonOgc
52
52
  #
53
53
  # fetch data form server and save it to file.
54
54
  #
55
- def fetch_data
56
- resp = Faraday.new(ENDPOINT, headers: { "If-None-Match" => etag }).get
55
+ def fetch_data # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
56
+ h = {}
57
+ h["If-None-Match"] = etag if etag
58
+ resp = Faraday.new(ENDPOINT, headers: h).get
57
59
  # return if there aren't any changes since last fetching
58
- raise RelatonBib::RequestError, "Could not access #{ENDPOINT}" unless resp.status == 200
60
+ return if resp.status == 304
61
+ unless resp.status == 200
62
+ raise RelatonBib::RequestError, "Could not access #{ENDPOINT}"
63
+ end
59
64
 
60
65
  FileUtils.mkdir_p DATADIR unless Dir.exist? DATADIR
61
66
  self.etag = resp[:etag]
@@ -54,9 +54,9 @@ module RelatonOgc
54
54
  return { ret: item } if !year
55
55
 
56
56
  item.date.select { |d| d.type == "published" }.each do |d|
57
- return { ret: item } if year.to_i == d.on.year
57
+ return { ret: item } if year.to_i == d.on(:year)
58
58
 
59
- missed_years << d.on.year
59
+ missed_years << d.on(:year)
60
60
  end
61
61
  end
62
62
  { years: missed_years }
@@ -1,3 +1,3 @@
1
1
  module RelatonOgc
2
- VERSION = "1.5.0".freeze
2
+ VERSION = "1.7.0".freeze
3
3
  end
@@ -36,5 +36,5 @@ Gem::Specification.new do |spec|
36
36
  spec.add_development_dependency "webmock"
37
37
 
38
38
  spec.add_dependency "faraday", "~> 1.0.0"
39
- spec.add_dependency "relaton-iso-bib", "~> 1.5.0"
39
+ spec.add_dependency "relaton-iso-bib", "~> 1.7.0"
40
40
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-ogc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.7.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: 2020-10-09 00:00:00.000000000 Z
11
+ date: 2020-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debase
@@ -170,14 +170,14 @@ dependencies:
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: 1.5.0
173
+ version: 1.7.0
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: 1.5.0
180
+ version: 1.7.0
181
181
  description: 'RelatonOgc: retrieve OGC Standards for bibliographic use using the OgcBibliographicItem
182
182
  model'
183
183
  email: