relaton-bipm 1.14.5 → 1.14.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/relaton_bipm/data_outcomes_parser.rb +34 -23
- data/lib/relaton_bipm/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f72520efca5d2a8525b052758d95563c5ca6d57d22b85b146e4ff77e02ee2594
|
4
|
+
data.tar.gz: 57803ee16e558e356c0529599ffa8ba881ef85dba99d8b28a1f936a577f711f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e44f8da41d1c91944196344e85921988c14e5771f976af31471b14bfa216084717942b43b5e3ddc0053891c23e5bb4b7c9d4d9f07ad1abd9b825028fb2b49cd1
|
7
|
+
data.tar.gz: 1b6de32f1454222514c9867d86a1bf970d0b42fce78b8f927459e8907a9715ebaf45c17366acfbe2112599fd3c07fc5a93d9729fd43e7565e67dee6acbeb52c3
|
@@ -230,15 +230,6 @@ module RelatonBipm
|
|
230
230
|
# @param [String] path path to YAML file
|
231
231
|
#
|
232
232
|
def add_to_index(item, path) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
233
|
-
# key = [item.docnumber]
|
234
|
-
# SHORTTYPE.each do |k, v|
|
235
|
-
# if item.docnumber.include? k
|
236
|
-
# key << item.docnumber.sub(k, v)
|
237
|
-
# key << item.docnumber.sub(k, v).sub(/(\(\d{4})(\))/, "\\1, EN\\2")
|
238
|
-
# key << item.docnumber.sub(k, v).sub(/(\(\d{4})(\))/, "\\1, FR\\2")
|
239
|
-
# break
|
240
|
-
# end
|
241
|
-
# end
|
242
233
|
key = item.docidentifier.select { |i| i.type == "BIPM" }.map &:id
|
243
234
|
@data_fetcher.index[key] = path
|
244
235
|
@data_fetcher.index_new.add_or_update key, path
|
@@ -254,20 +245,40 @@ module RelatonBipm
|
|
254
245
|
#
|
255
246
|
# @return [Array<Hash>] contributors
|
256
247
|
#
|
257
|
-
def contributors(date, body)
|
248
|
+
def contributors(date, body)
|
249
|
+
contribs = [{ entity: bipm_org, role: [{ type: "publisher" }] }]
|
250
|
+
author = author_org date, body
|
251
|
+
contribs << { entity: author, role: [{ type: "author" }] } if author
|
252
|
+
contribs
|
253
|
+
end
|
254
|
+
|
255
|
+
#
|
256
|
+
# Create author organization
|
257
|
+
#
|
258
|
+
# @param [String] date date of publication
|
259
|
+
# @param [String] body organization abbreviation (CCTF, CIPM, CGPM)
|
260
|
+
#
|
261
|
+
# @return [Hash, nil] author organization
|
262
|
+
#
|
263
|
+
def author_org(date, body)
|
258
264
|
case body
|
259
265
|
when "CCTF" then cctf_org date
|
260
266
|
when "CGPM" then cgpm_org
|
261
267
|
when "CIPM" then cipm_org
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
268
|
+
end
|
269
|
+
end
|
270
|
+
|
271
|
+
#
|
272
|
+
# Create BIPM organization
|
273
|
+
#
|
274
|
+
# @return [Hash] BIPM organization
|
275
|
+
#
|
276
|
+
def bipm_org
|
277
|
+
nms = [
|
278
|
+
{ content: "International Bureau of Weights and Measures", language: "en" },
|
279
|
+
{ content: "Bureau international des poids et mesures", language: "fr" },
|
280
|
+
]
|
281
|
+
organization(nms, "BIPM").tap { |org| org[:url] = "www.bipm.org" }
|
271
282
|
end
|
272
283
|
|
273
284
|
#
|
@@ -275,7 +286,7 @@ module RelatonBipm
|
|
275
286
|
#
|
276
287
|
# @param [String] date date of meeting
|
277
288
|
#
|
278
|
-
# @return [
|
289
|
+
# @return [Hash] CCTF organization
|
279
290
|
#
|
280
291
|
def cctf_org(date) # rubocop:disable Metrics/MethodLength
|
281
292
|
if Date.parse(date).year < 1999
|
@@ -299,17 +310,17 @@ module RelatonBipm
|
|
299
310
|
# @param [Array<Hash>] names organization names in different languages
|
300
311
|
# @param [String] abbr abbreviation
|
301
312
|
#
|
302
|
-
# @return [
|
313
|
+
# @return [Hash] organization
|
303
314
|
#
|
304
315
|
def organization(names, abbr)
|
305
316
|
names.each { |ctrb| ctrb[:script] = "Latn" }
|
306
|
-
|
317
|
+
{ name: names, abbreviation: { content: abbr, language: ["en", "fr"], script: "Latn" } }
|
307
318
|
end
|
308
319
|
|
309
320
|
#
|
310
321
|
# Create CGPM organization
|
311
322
|
#
|
312
|
-
# @return [
|
323
|
+
# @return [Hash] CGPM organization
|
313
324
|
#
|
314
325
|
def cgpm_org
|
315
326
|
nms = [
|
data/lib/relaton_bipm/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-bipm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.14.
|
4
|
+
version: 1.14.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: equivalent-xml
|