prometheus-api-client 0.4.1 → 0.4.2
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/prometheus/api_client/client.rb +17 -17
- data/lib/prometheus/api_client/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8074c0b0a28baf98df9bd1584a8967da123428be
|
4
|
+
data.tar.gz: 19f4184ce0b2417ca1d831f63ad57200173b1e41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
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
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
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
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
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
|