prometheus-api-client 0.4.1 → 0.4.2

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
  SHA1:
3
- metadata.gz: 326c02ee0f9c8cdde2bca091c94117e8d5c40079
4
- data.tar.gz: a1f70967df54fe8bd24228d9292f807b5e7e2875
3
+ metadata.gz: 8074c0b0a28baf98df9bd1584a8967da123428be
4
+ data.tar.gz: 19f4184ce0b2417ca1d831f63ad57200173b1e41
5
5
  SHA512:
6
- metadata.gz: 561e2bdbf187d4d99fc2758e522258b84e7f85a9777718b14cd9f45faa2977e3135116b0ba60c0a4b16cc3d55acce6e4b919cd4ecb3e00b81e94b04e3b2df480
7
- data.tar.gz: ac533dd2ca2bae96e190eb06d74cca8d6dd104842b6b2e0123df21b9635244ef27594a422172bf8b2a7151e4c1cdce4d1211787359395f5ac623857a0af1d23b
6
+ metadata.gz: 8feafbc014d92d7d3bbea17b276b101742cf0951010cc7b290445951cc85f1eb69d0922b5ed395e540a3de7234b9a51e09f7ab221ca0fbc095c8dbc94193a94c
7
+ data.tar.gz: 6aefd696c18b8fd0513095d8c7dec468b122e25cbc30f1a475c2d4c623659b0be8d258283b4b15efc1e484d96b10e29d4d12fa09beb3e27fc0e5d18b7a589dac
@@ -119,12 +119,12 @@ module Prometheus
119
119
  return options[:ssl] if options[:ssl]
120
120
 
121
121
  ssl = options[:options]
122
- if ssl[:verify_ssl] || ssl[:ssl_cert_store]
123
- {
124
- verify: ssl[:verify_ssl] != OpenSSL::SSL::VERIFY_NONE,
125
- cert_store: ssl[:ssl_cert_store],
126
- }
127
- end
122
+ return unless ssl[:verify_ssl] || ssl[:ssl_cert_store]
123
+
124
+ {
125
+ verify: ssl[:verify_ssl] != OpenSSL::SSL::VERIFY_NONE,
126
+ cert_store: ssl[:ssl_cert_store],
127
+ }
128
128
  end
129
129
 
130
130
  # Helper function to evalueate the low level headers option
@@ -132,11 +132,11 @@ module Prometheus
132
132
  return options[:headers] if options[:headers]
133
133
 
134
134
  headers = options[:credentials]
135
- if headers[:token]
136
- {
137
- Authorization: 'Bearer ' + headers[:token].to_s,
138
- }
139
- end
135
+ return unless headers && headers[:token]
136
+
137
+ {
138
+ Authorization: 'Bearer ' + headers[:token].to_s,
139
+ }
140
140
  end
141
141
 
142
142
  # Helper function to evalueate the low level headers option
@@ -144,12 +144,12 @@ module Prometheus
144
144
  return options[:request] if options[:request]
145
145
 
146
146
  request = options[:options]
147
- if request[:open_timeout] || request[:timeout]
148
- {
149
- open_timeout: request[:open_timeout],
150
- timeout: request[:timeout],
151
- }
152
- end
147
+ return unless request[:open_timeout] || request[:timeout]
148
+
149
+ {
150
+ open_timeout: request[:open_timeout],
151
+ timeout: request[:timeout],
152
+ }
153
153
  end
154
154
 
155
155
  # Helper function to create the args for the low level client
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Prometheus
4
4
  module ApiClient
5
- VERSION = '0.4.1'
5
+ VERSION = '0.4.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prometheus-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yaacov Zamir