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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d294bf6f65b6fec8a2351a5be3ff46629c26fd7ae1d1592b468180faf71ea04
4
- data.tar.gz: b66b47d6a953fbf0416793533eaaf33d7d33ef4e575f02a987f9f7de09446bd5
3
+ metadata.gz: 6639fada6f8e5b2f4864b6761f13e55e84f626c395ec0d6c957d82e8afdd9eac
4
+ data.tar.gz: 88bdf8d1225080362fe1184474b83ce1bf4f2f71d5eb6b702a9995be6812c591
5
5
  SHA512:
6
- metadata.gz: 9b14ee8b7de5de2deb0a09f768a826aefba9584506e5a75851b82cafcb865d98e494585f1750ed0420bf6be47749c8e39a3a5ad33305150d009df1b8cf005cb5
7
- data.tar.gz: 2d81ef022b0dc8d8ec7ad0a0b999989455c2770d7056f2e155ed9a18a9c39daaa01791b5fba28ff33909ea31b732efba91a1feea98710fd52768af7c8e5226e4
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)['data']
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Prometheus
4
4
  module ApiClient
5
- VERSION = '0.6.3'
5
+ VERSION = '0.6.4'
6
6
  end
7
7
  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.3
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: 2023-03-30 00:00:00.000000000 Z
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.4.6
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.