wavefront-sdk 2.5.0 → 2.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY.md +3 -1
- data/lib/wavefront-sdk/defs/version.rb +1 -1
- data/lib/wavefront-sdk/query.rb +13 -2
- 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: 42ae7285512a6926765e9db64a2af0f21927864655acf1a708138e8e2122dbcf
|
4
|
+
data.tar.gz: 0a05d21b257accb683c08f768cb4d8e33fbd93dfe625e8cfb59ade6e8b766641
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e46a38fae37d192440ebc417dba659fab395788b7ee644bb30d31cd90951e58c5748fad3bff100170ae6babbc4fdadbc1a623810d6f0ca93397f470bfeb14118
|
7
|
+
data.tar.gz: bca0a1ac53c6556f756f5ac5dc195986a180e0fbb78ebc423b37151c000421c29c21bb0fe032dfc59debd700c53d83c66f9cac08bebb26a91059cf848683bbe1
|
data/HISTORY.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 2.5.1 (06/03/2019)
|
4
|
+
* Fix messy handling of raw query errors.
|
5
|
+
|
3
6
|
## 2.5.0 (21/02/2019)
|
4
7
|
* New `Wavefront::UserGroup` class, for new API `UserGroup` feature.
|
5
8
|
* Extended `Wavefront::User` to cover new API methods.
|
@@ -28,7 +31,6 @@
|
|
28
31
|
* Full `Wavefront::Alert` test coverage.
|
29
32
|
|
30
33
|
## 2.2.0 (15/12/2018)
|
31
|
-
|
32
34
|
* New methods to cover new API paths.
|
33
35
|
* `Wavefront::Alert#install`,
|
34
36
|
* `Wavefront::Alert#uninstall`,
|
@@ -1 +1 @@
|
|
1
|
-
WF_SDK_VERSION = '2.5.
|
1
|
+
WF_SDK_VERSION = '2.5.1'.freeze
|
data/lib/wavefront-sdk/query.rb
CHANGED
@@ -77,10 +77,21 @@ module Wavefront
|
|
77
77
|
# paths. The default response is a single array.
|
78
78
|
#
|
79
79
|
def response_shim(body, status)
|
80
|
-
|
80
|
+
resp, err_msg = parsed_response(body)
|
81
|
+
|
82
|
+
{ response: resp,
|
81
83
|
status: { result: status == 200 ? 'OK' : 'ERROR',
|
82
|
-
message:
|
84
|
+
message: err_msg,
|
83
85
|
code: status } }.to_json
|
84
86
|
end
|
87
|
+
|
88
|
+
# A bad query doesn't send back a JSON object. It sends back a
|
89
|
+
# string with an embedded message.
|
90
|
+
#
|
91
|
+
def parsed_response(body)
|
92
|
+
[JSON.parse(body), '']
|
93
|
+
rescue JSON::ParserError
|
94
|
+
['', body.match(/message='([^']+)'/).captures.first]
|
95
|
+
end
|
85
96
|
end
|
86
97
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wavefront-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Fisher
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -311,7 +311,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
311
311
|
- !ruby/object:Gem::Version
|
312
312
|
version: '0'
|
313
313
|
requirements: []
|
314
|
-
rubygems_version: 3.0.
|
314
|
+
rubygems_version: 3.0.3
|
315
315
|
signing_key:
|
316
316
|
specification_version: 4
|
317
317
|
summary: SDK for Wavefront API v2
|