relaton-bipm 1.16.2 → 1.16.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.adoc +20 -28
- data/lib/relaton_bipm/bipm_bibliographic_item.rb +2 -2
- data/lib/relaton_bipm/bipm_bibliography.rb +3 -3
- data/lib/relaton_bipm/committee.rb +1 -1
- data/lib/relaton_bipm/id_parser.rb +1 -1
- 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: eca93d6c95f7d1da1f1b3609fa4d782a97fed79a5793b2d695fa342ec2cdfacf
|
4
|
+
data.tar.gz: 5be9f8e7f259daa7f4f2c8d06f7c87e8d2fe4e1e41bb29faa413c462bc260d71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3903d6d1632947ece2712e2fbdfb4d690c20ae0840b225487e8e751b8d943560e58c5a3d21b971b2cdc1ce81336a70a3d278fda5a794daa08fa0284f1f820a0
|
7
|
+
data.tar.gz: 04d3e61c0d11fe9578c1a8cc42979dd53e4567b035b33350c1fe58ed2f4a535f4f400e85d5c6cfaabdcda482b63663b1c2d6471e7bb41c58739f616fd00e3e81
|
data/README.adoc
CHANGED
@@ -33,14 +33,6 @@ Or install it yourself as:
|
|
33
33
|
|
34
34
|
=== Search for a standard using keywords
|
35
35
|
|
36
|
-
The Metrologia website employs anti-DDoS protection, which may cause the search to fail. If this happens, open provided link in a browser and solve the captcha.
|
37
|
-
|
38
|
-
----
|
39
|
-
[relaton-bipm] ("BIPM Metrologia 50 4 385") fetching...
|
40
|
-
[relaton-bipm] This source employs anti-DDoS measures that unfortunately affect automated requests.
|
41
|
-
[relaton-bipm] Please visit this link in your browser to resolve the CAPTCHA, then retry: https://iopscience.iop.org/article/10.1088/0026-1394/50/4/385
|
42
|
-
----
|
43
|
-
|
44
36
|
==== References for Si-Brochure documents
|
45
37
|
|
46
38
|
`BIPM {DOCUMENT_NAME}`
|
@@ -207,67 +199,67 @@ end
|
|
207
199
|
----
|
208
200
|
# get BIPM brochure
|
209
201
|
item = RelatonBipm::BipmBibliography.get "BIPM SI Brochure"
|
210
|
-
[relaton-bipm] (BIPM SI Brochure)
|
211
|
-
[relaton-bipm] (BIPM SI Brochure)
|
202
|
+
[relaton-bipm] (BIPM SI Brochure) Fetching from Relaton repository ...
|
203
|
+
[relaton-bipm] (BIPM SI Brochure) Found: `BIPM SI Brochure`
|
212
204
|
=> #<RelatonBipm::BipmBibliographicItem:0x007ffb83982fe8
|
213
205
|
...
|
214
206
|
|
215
207
|
# get BIPM Metrologia page
|
216
208
|
bib = RelatonBipm::BipmBibliography.get "BIPM Metrologia 29 6 001"
|
217
|
-
[relaton-bipm] (BIPM Metrologia 29 6 001)
|
218
|
-
[relaton-bipm] (BIPM Metrologia 29 6 001)
|
209
|
+
[relaton-bipm] (BIPM Metrologia 29 6 001) Fetching from Relaton repository ...
|
210
|
+
[relaton-bipm] (BIPM Metrologia 29 6 001) Found: `Metrologia 29 6 001`
|
219
211
|
=> #<RelatonBipm::BipmBibliographicItem:0x007f8857f94d40
|
220
212
|
...
|
221
213
|
|
222
214
|
# get CGPM meetings
|
223
215
|
RelatonBipm::BipmBibliography.get "CGPM 1st Meeting (1889)"
|
224
|
-
[relaton-bipm] (CGPM 1st Meeting (1889))
|
225
|
-
[relaton-bipm] (CGPM 1st Meeting (1889))
|
216
|
+
[relaton-bipm] (CGPM 1st Meeting (1889)) Fetching from Relaton repository ...
|
217
|
+
[relaton-bipm] (CGPM 1st Meeting (1889)) Found: `CGPM 1th meeting (1889)`
|
226
218
|
=> #<RelatonBipm::BipmBibliographicItem:0x00007f7fd02aba28
|
227
219
|
...
|
228
220
|
|
229
221
|
# get CGPM resolutions
|
230
222
|
RelatonBipm::BipmBibliography.get "CGPM RES (1889, E)"
|
231
|
-
[relaton-bipm] (CGPM RES (1889, E))
|
232
|
-
[relaton-bipm] (CGPM RES (1889, E))
|
223
|
+
[relaton-bipm] (CGPM RES (1889, E)) Fetching from Relaton repository ...
|
224
|
+
[relaton-bipm] (CGPM RES (1889, E)) Found: `CGPM RES (1889)`
|
233
225
|
=> #<RelatonBipm::BipmBibliographicItem:0x00007f80421f93d8
|
234
226
|
...
|
235
227
|
|
236
228
|
RelatonBipm::BipmBibliography.get "CGPM Resolution (1889)"
|
237
|
-
[relaton-bipm] (CGPM Resolution (1889))
|
238
|
-
[relaton-bipm] (CGPM Resolution (1889))
|
229
|
+
[relaton-bipm] (CGPM Resolution (1889)) Fetching from Relaton repository ...
|
230
|
+
[relaton-bipm] (CGPM Resolution (1889)) Found: `CGPM RES (1889)`
|
239
231
|
=> #<RelatonBipm::BipmBibliographicItem:0x00007f8017f60c18
|
240
232
|
...
|
241
233
|
|
242
234
|
RelatonBipm::BipmBibliography.get "CGPM Résolution (1889)"
|
243
|
-
[relaton-bipm] (CGPM Résolution (1889))
|
244
|
-
[relaton-bipm] (CGPM Résolution (1889))
|
235
|
+
[relaton-bipm] (CGPM Résolution (1889)) Fetching from Relaton repository ...
|
236
|
+
[relaton-bipm] (CGPM Résolution (1889)) Found: `CGPM RES (1889)`
|
245
237
|
=> #<RelatonBipm::BipmBibliographicItem:0x00007f8017f492e8
|
246
238
|
...
|
247
239
|
|
248
240
|
# get CIPM decision by year and decision number
|
249
241
|
RelatonBipm::BipmBibliography.get "BIPM Decision CIPM/101-1 (2012)"
|
250
|
-
[relaton-bipm] (BIPM Decision CIPM/101-1 (2012))
|
251
|
-
[relaton-bipm] (BIPM Decision CIPM/101-1 (2012))
|
242
|
+
[relaton-bipm] (BIPM Decision CIPM/101-1 (2012)) Fetching from Relaton repository ...
|
243
|
+
[relaton-bipm] (BIPM Decision CIPM/101-1 (2012)) Found: `CIPM DECN 101-1 (2012)`
|
252
244
|
=> #<RelatonBipm::BipmBibliographicItem:0x00007f8017f2bd88
|
253
245
|
...
|
254
246
|
|
255
247
|
RelatonBipm::BipmBibliography.get "BIPM DECN CIPM/101-1 (2012, E)"
|
256
|
-
[relaton-bipm] (BIPM DECN CIPM/101-1 (2012, E))
|
257
|
-
[relaton-bipm] (BIPM DECN CIPM/101-1 (2012, E))
|
248
|
+
[relaton-bipm] (BIPM DECN CIPM/101-1 (2012, E)) Fetching from Relaton repository ...
|
249
|
+
[relaton-bipm] (BIPM DECN CIPM/101-1 (2012, E)) Found: `CIPM DECN 101-1 (2012)`
|
258
250
|
=> #<RelatonBipm::BipmBibliographicItem:0x00007f8017f39438
|
259
251
|
...
|
260
252
|
|
261
253
|
# get CIPM recommendation
|
262
254
|
RelatonBipm::BipmBibliography.get "CIPM Recommendation 1 (2005)"
|
263
|
-
[relaton-bipm] (CIPM Recommendation 1 (2005))
|
264
|
-
[relaton-bipm] (CIPM Recommendation 1 (2005))
|
255
|
+
[relaton-bipm] (CIPM Recommendation 1 (2005)) Fetching from Relaton repository ...
|
256
|
+
[relaton-bipm] (CIPM Recommendation 1 (2005)) Found: `CIPM REC 1 (2005)`
|
265
257
|
=> #<RelatonBipm::BipmBibliographicItem:0x00007f8017f31da0
|
266
258
|
...
|
267
259
|
|
268
260
|
RelatonBipm::BipmBibliography.get "CIPM REC 1 (2005, FR)"
|
269
|
-
[relaton-bipm] (CIPM REC 1 (2005, FR))
|
270
|
-
[relaton-bipm] (CIPM REC 1 (2005, FR))
|
261
|
+
[relaton-bipm] (CIPM REC 1 (2005, FR)) Fetching from Relaton repository ...
|
262
|
+
[relaton-bipm] (CIPM REC 1 (2005, FR)) Found: `CIPM REC 1 (2005)`
|
271
263
|
=> #<RelatonBipm::BipmBibliographicItem:0x00007f80422100d8
|
272
264
|
...
|
273
265
|
----
|
@@ -27,12 +27,12 @@ module RelatonBipm
|
|
27
27
|
# @param structuredidentifier [RelatonBipm::StructuredIdentifier]
|
28
28
|
def initialize(**args) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
|
29
29
|
if args[:docstatus] && !STATUSES.include?(args[:docstatus].stage.value)
|
30
|
-
Util.warn "WARNING:
|
30
|
+
Util.warn "WARNING: Invalid docstatus: `#{args[:docstatus].stage.value}`. " \
|
31
31
|
"It should be one of: `#{STATUSES.join('`, `')}`"
|
32
32
|
end
|
33
33
|
|
34
34
|
if args[:si_aspect] && !SI_ASPECTS.include?(args[:si_aspect])
|
35
|
-
Util.warn "WARNING:
|
35
|
+
Util.warn "WARNING: Invalid si_aspect: `#{args[:si_aspect]}``. " \
|
36
36
|
"It should be one of: `#{SI_ASPECTS.join('`, `')}`"
|
37
37
|
end
|
38
38
|
|
@@ -9,15 +9,15 @@ module RelatonBipm
|
|
9
9
|
# @param text [String]
|
10
10
|
# @return [RelatonBipm::BipmBibliographicItem]
|
11
11
|
def search(text, _year = nil, _opts = {}) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
12
|
-
Util.warn "(#{text})
|
12
|
+
Util.warn "(#{text}) Fetching from Relaton repository ..."
|
13
13
|
ref = text.sub(/^BIPM\s/, "")
|
14
14
|
item = get_bipm ref
|
15
15
|
unless item
|
16
|
-
Util.warn "(#{text})
|
16
|
+
Util.warn "(#{text}) Not found."
|
17
17
|
return
|
18
18
|
end
|
19
19
|
|
20
|
-
Util.warn("(#{text})
|
20
|
+
Util.warn("(#{text}) Found: `#{item.docidentifier[0].id}`")
|
21
21
|
item
|
22
22
|
rescue Mechanize::ResponseCodeError => e
|
23
23
|
raise RelatonBib::RequestError, e.message unless e.response_code == "404"
|
@@ -11,7 +11,7 @@ module RelatonBipm
|
|
11
11
|
def initialize(acronym:, content: nil)
|
12
12
|
acronyms = YAML.load_file File.join(__dir__, "acronyms.yaml")
|
13
13
|
unless acronyms[acronym]
|
14
|
-
Util.warn "WARNING:
|
14
|
+
Util.warn "WARNING: Invalid acronym: `#{acronym}`. Allowed " \
|
15
15
|
"values: `#{acronyms.map { |k, _v| k }.join '`, `'}`"
|
16
16
|
end
|
17
17
|
|
@@ -91,7 +91,7 @@ module RelatonBipm
|
|
91
91
|
def ==(other) # rubocop:disable Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity,Metrics/AbcSize
|
92
92
|
other_hash = other.is_a?(Id) ? other.to_hash : normalize_hash(other)
|
93
93
|
hash = to_hash
|
94
|
-
hash.delete(:number) if other_hash[:number].nil? && hash[:number] == "1"
|
94
|
+
hash.delete(:number) if other_hash[:number].nil? && hash[:number] == "1" and hash[:year]
|
95
95
|
other_hash.delete(:number) if hash[:number].nil? && other_hash[:number] == "1"
|
96
96
|
hash.delete(:year) unless other_hash[:year]
|
97
97
|
other_hash.delete(:year) unless hash[:year]
|
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.16.
|
4
|
+
version: 1.16.4
|
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-10-
|
11
|
+
date: 2023-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|