relaton-bipm 1.9.0 → 1.9.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14553012c5084d04727a4dc053691295f9dbfb1d9844ba7abeaf78de950c28ff
|
4
|
+
data.tar.gz: f665d38e8f7d94f7f33787fb8a759c96579a4cfcfe943bcc5bc170b13fd0ef78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8805d5051e4716d05b0e039e7433d3709d527541fd0971106974e8119e0dc07a3c17bb9544b2550d4d3aaed4aa3cefc42860d0837add025693faa89586f3c389
|
7
|
+
data.tar.gz: 369846fe5052361189fe0aa63eba5459083617ad025f753b2b16bcba76d6c3a5decd65ee92cee5875101913ea56537b4a74eef3d16072263061749cf16bd557a
|
@@ -28,12 +28,12 @@ module RelatonBipm
|
|
28
28
|
def initialize(**args) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
|
29
29
|
if args[:docstatus] && !STATUSES.include?(args[:docstatus].stage.value)
|
30
30
|
warn "[relaton-bipm] Warning: invalid docstatus: #{args[:docstatus].stage.value}. "\
|
31
|
-
|
31
|
+
"It should be one of: #{STATUSES}"
|
32
32
|
end
|
33
33
|
|
34
34
|
if args[:si_aspect] && !SI_ASPECTS.include?(args[:si_aspect])
|
35
35
|
warn "[relaton-bipm] Warning: invalid si_aspect: #{args[:si_aspect]}. "\
|
36
|
-
|
36
|
+
"It should be one of: #{SI_ASPECTS}"
|
37
37
|
end
|
38
38
|
|
39
39
|
@comment_period = args.delete :comment_period
|
@@ -24,8 +24,9 @@ module RelatonBipm
|
|
24
24
|
def magent # rubocop:disable Metrics/MethodLength
|
25
25
|
a = Mechanize.new
|
26
26
|
a.request_headers = {
|
27
|
-
"Accept" => "text/html,application/xhtml+xml,application/xml;q=0.9,
|
28
|
-
|
27
|
+
"Accept" => "text/html,application/xhtml+xml,application/xml;q=0.9,"\
|
28
|
+
"image/avif,image/webp,image/apng,"\
|
29
|
+
"*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
|
29
30
|
"Accept-Encoding" => "gzip, deflate, br",
|
30
31
|
"Accept-Language" => "en-US,en;q=0.9,ru-RU;q=0.8,ru;q=0.7",
|
31
32
|
"Cache-Control" => "max-age=0",
|
@@ -39,7 +40,7 @@ module RelatonBipm
|
|
39
40
|
# @param agent [Mechanize]
|
40
41
|
# @return [RelatonBipm::BipmBibliographicItem]
|
41
42
|
def get_bipm(ref, agent)
|
42
|
-
url = "#{GH_ENDPOINT}#{ref.
|
43
|
+
url = "#{GH_ENDPOINT}#{ref.upcase.split.join '-'}.yaml"
|
43
44
|
resp = agent.get url
|
44
45
|
return unless resp.code == "200"
|
45
46
|
|
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.9.
|
4
|
+
version: 1.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|