prometheus-api-client 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/prometheus/api_client/client.rb +4 -1
- data/lib/prometheus/api_client/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6639fada6f8e5b2f4864b6761f13e55e84f626c395ec0d6c957d82e8afdd9eac
|
4
|
+
data.tar.gz: 88bdf8d1225080362fe1184474b83ce1bf4f2f71d5eb6b702a9995be6812c591
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 302dafac6952da121d06edc9e3cebd4734d39e6a236811c260715f075a13551098af228def8467bebc815875a04e70c024509bb79ae4a5e3e53758852a571b58
|
7
|
+
data.tar.gz: 38701bf9360a79280e4a0415b0e000bcae346ab62bcf482e80257ee3d75ad9291b6e514b8534a074b14f2335366fad06aea0352554e3bb75d1949a61304bc760
|
@@ -104,7 +104,10 @@ module Prometheus
|
|
104
104
|
def run_command(command, options)
|
105
105
|
response = get(command, options)
|
106
106
|
|
107
|
-
JSON.parse(response.body)
|
107
|
+
body = JSON.parse(response.body)
|
108
|
+
raise RequestError, body['error'] if body['status'] != 'success'
|
109
|
+
|
110
|
+
body['data']
|
108
111
|
rescue StandardError => err
|
109
112
|
raise RequestError, err.message
|
110
113
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prometheus-api-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yaacov Zamir
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0'
|
63
63
|
requirements: []
|
64
|
-
rubygems_version: 3.
|
64
|
+
rubygems_version: 3.5.16
|
65
65
|
signing_key:
|
66
66
|
specification_version: 4
|
67
67
|
summary: A suite of reading metrics stored on a Prometheus server.
|