relaton-bipm 1.20.2 → 1.20.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: ea992197c7e29c94560a057b995ac93721cc8e713e09a4d6191294f512f46aa0
4
- data.tar.gz: d982f800f01ec696acbc34f4aecc2ea8d28ea7724b69f1901629d3b4623fe10a
3
+ metadata.gz: 3d1539848f18eda46cb7357eb8861594434a26b7248878477b9430ae09aabcac
4
+ data.tar.gz: f06a0572b5a70a5fd1d4457d731fac35458372f728f14ec2794bcaf6d73ab6c7
5
5
  SHA512:
6
- metadata.gz: 63a8182c1b54979c2bbe436eaca66e460e7846d4e5b47b2a9355ec8d031e1cf51e929123f02638cc450ef3533305a07cb108226d969945d2ce72fab27417bcf8
7
- data.tar.gz: 93077b3f86f9b906bb5dbc83612e3b64bd92de42f4f66c414fd6bf0facb962d080f8a03f201062d75a197034d8241e5ce4c4fa1488d35861225a74e863efb561
6
+ metadata.gz: 2e42be1fbbc4f9971c688b83a9f3e9de80a4a529be73699c11efb9c095471072cd73f07aaf39b0f94964446e2dbd1a76d16f530cc72d6ee5f45c4ba53c083477
7
+ data.tar.gz: 9565d9d1069aee7a2029af710d60d39c8c0f0ddfd9b0b2f4bda900f7befb4c5b5580d8acafb1d45bd15776db922026451c7b32e5f42f47d4f73900e6fce4097e
@@ -171,7 +171,7 @@ module RelatonBipm
171
171
  type: "proceedings", title: [],
172
172
  doctype: DocumentType.new(type: r["type"]), place: [RelatonBib::Place.new(city: "Paris")]
173
173
  }
174
- fr_r = args[:fr]["resolutions"].fetch(i, nil)
174
+ fr_r = args.dig(:fr, "resolutions", i) # @TODO: create a GH issue when fr is missing
175
175
  hash[:title] = resolution_title r, fr_r
176
176
  hash[:link] = resolution_link r, fr_r, args[:src]
177
177
  date = r["dates"].first.to_s
@@ -345,7 +345,7 @@ module RelatonBipm
345
345
  def cipm_org
346
346
  names = [
347
347
  { content: "International Committee for Weights and Measures", language: "en" },
348
- { content: "Comité International des Poids et Mesures", language: "fr" },
348
+ { content: "Comité international des poids et mesures", language: "fr" },
349
349
  ]
350
350
  organization names, "CIPM"
351
351
  end
@@ -91,7 +91,7 @@ module RelatonBipm
91
91
  #
92
92
  def parse(id)
93
93
  # str = StringScanner.new id
94
- match = parse_outcome(id) || parse_brochure(id) || parse_metrologia(id) || parse_jcgm(id)
94
+ match = parse_outcome(id) || parse_brochure(id) || parse_brochure_other(id) || parse_metrologia(id) || parse_jcgm(id)
95
95
  @id = match.named_captures.compact.transform_keys(&:to_sym)
96
96
  self
97
97
  rescue StandardError => e
@@ -133,6 +133,10 @@ module RelatonBipm
133
133
  $}x.match(id)
134
134
  end
135
135
 
136
+ def parse_brochure_other(id)
137
+ %r{^(?<group>CCEM|CCL|CCM|SI|Rapport)[-\s](?<type>GD-RSI|GD-MeP|MEP|BIPM)[-\s](?<number>\w+|\d{4}\/\d{2})$}.match(id)
138
+ end
139
+
136
140
  def parse_metrologia(id)
137
141
  %r{^(?<group>Metrologia)(?:\s(?<number>[a-zA-Z0-9\s]+))?$}.match(id)
138
142
  end
@@ -1,3 +1,3 @@
1
1
  module RelatonBipm
2
- VERSION = "1.20.2".freeze
2
+ VERSION = "1.20.3".freeze
3
3
  end
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.20.2
4
+ version: 1.20.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-12-17 00:00:00.000000000 Z
11
+ date: 2024-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday