kapacitor-ruby 1.0.5 → 1.0.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b44ea41ae78d506eb56c16be57c70948724e91f5f07f6d25f1a54ccd84cfc5f7
4
- data.tar.gz: 36200bc005660d681749a7106219efeb69447429692df1c202f422eb48ff2e48
3
+ metadata.gz: 821ace263cd605e3233f42c76b01ff93c8d9a2bd08764634d843183296eef674
4
+ data.tar.gz: ce299b58d8e2d5eb1efc792c36a6a101fb3504773e4b610fc8ea91457369936b
5
5
  SHA512:
6
- metadata.gz: 5d84c1cb3ae92d8f59335dcbbd056df4a5fef42454b495e92226b8d762629a2fa88e1c82976f60dd39b275195fd0675680c80a978f85c9353838b879c56bc0f1
7
- data.tar.gz: 6eb9cd633c323513e310a059e470ee81e7426ae362fddfaab6ae5930baab2302ca7847709ac3dda15125f90895258191ca8c8805e98339405a4bdfd3080cdb6f
6
+ metadata.gz: ab76b9f3b5dd49d919f7b38422c68f5d2ae286694584dbaa53dd1e2b7e72fc088022a78b996c8106846f9047985f23776bf18f3d4c7b53456bf3d7f606b58181
7
+ data.tar.gz: 509abc65bc1104000e58cc8871e36d8557055db8b937a09c90d19f35f3c6cdb67ce6ae469d1847bf35aba2dee371b7c36f4d2c09372ed24cbf7dfd81de585979
@@ -66,7 +66,7 @@ module Kapacitor
66
66
  # @return [List[String]] List of topics
67
67
  #
68
68
  def topics()
69
- res = api_get(endpoint: "alerts/topics")['topics']
69
+ res = api_get(endpoint: "alerts/topics")
70
70
  return res['topics'].map { |v| v['id'] }
71
71
  end
72
72
 
@@ -250,7 +250,7 @@ private
250
250
  begin
251
251
  resp = self.http.get([self.url, endpoint].join('/'), query, {'Content-type' => 'application/json', 'Accept' => 'application/json'})
252
252
  begin
253
- data = JSON.parse(resp.body) unless resp.body.blank?
253
+ data = JSON.parse(resp.body) unless resp.body.empty?
254
254
  rescue JSON::ParserError
255
255
  raise Exception, "Failed to decode response message"
256
256
  end
@@ -274,7 +274,7 @@ private
274
274
  begin
275
275
  resp = self.http.post([self.url, endpoint].join('/'), data.to_json, {'Content-Type' => 'application/json', 'Accept' => 'application/json'})
276
276
  begin
277
- data = JSON.parse(resp.body) unless resp.body.blank?
277
+ data = JSON.parse(resp.body) unless resp.body.empty?
278
278
  rescue JSON::ParserError
279
279
  raise Exception, "Failed to decode response message"
280
280
  end
@@ -297,7 +297,7 @@ private
297
297
  begin
298
298
  resp = self.http.delete([self.url, endpoint].join('/'), {'Content-type' => 'application/json', 'Accept' => 'application/json'})
299
299
  begin
300
- data = JSON.parse(resp.body) unless resp.body.blank?
300
+ data = JSON.parse(resp.body) unless resp.body.empty?
301
301
  rescue JSON::ParserError
302
302
  raise Exception, "Failed to decode response message"
303
303
  end
@@ -321,7 +321,7 @@ private
321
321
  begin
322
322
  resp = self.http.patch([self.url, endpoint].join('/'), data.to_json, {'Content-Type' => 'application/json', 'Accept' => 'application/json'})
323
323
  begin
324
- data = JSON.parse(resp.body) unless resp.body.blank?
324
+ data = JSON.parse(resp.body) unless resp.body.empty?
325
325
  rescue JSON::ParserError
326
326
  raise Exception, "Failed to decode response message"
327
327
  end
@@ -345,7 +345,7 @@ private
345
345
  begin
346
346
  resp = self.http.put([self.url, endpoint].join('/'), data.to_json, {'Content-Type' => 'application/json', 'Accept' => 'application/json'})
347
347
  begin
348
- data = JSON.parse(resp.body) unless resp.body.blank?
348
+ data = JSON.parse(resp.body) unless resp.body.empty?
349
349
  rescue JSON::ParserError
350
350
  raise Exception, "Failed to decode response message"
351
351
  end
@@ -3,7 +3,7 @@
3
3
  #
4
4
 
5
5
  module Kapacitor
6
- VERSION = "1.0.5"
6
+ VERSION = "1.0.6"
7
7
 
8
8
  def self.version
9
9
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kapacitor-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matteo Cerutti