connect_wise_rest 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/connect_wise_rest/client.rb +10 -3
- data/lib/connect_wise_rest/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: decfe27e68af0ed76de1037fdffd51009a2ecc6d
|
4
|
+
data.tar.gz: 87071170b2581bbd0d50b7497770c2c16b0d525a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84626b8af66c1afa99f665b49721bc74dc2b5be5a9f9c7c213e5e65c5f7ed31b5abae9cc3f22a6f8d528b1faf95f8bc26e11c78104a569652d7d7369b179dd88
|
7
|
+
data.tar.gz: 6e792cfcfb2bf8cc9853f4c8e71fe7419ba469e79e1d3563f3d247061268c9c017e28873efccfd1ef63b70f5407bdf8cb495e0f5f75c30a260ae2c3dcfc92b9d
|
@@ -24,9 +24,7 @@ module ConnectWiseRest
|
|
24
24
|
self.options[:query].merge!(query)
|
25
25
|
@response = nil
|
26
26
|
|
27
|
-
unless response.success?
|
28
|
-
raise "#{response.parsed_response['code']}: #{response.parsed_response['message']}"
|
29
|
-
end
|
27
|
+
raise_error(response) unless response.success?
|
30
28
|
|
31
29
|
@data = response.parsed_response
|
32
30
|
end
|
@@ -75,5 +73,14 @@ module ConnectWiseRest
|
|
75
73
|
return fetch
|
76
74
|
end
|
77
75
|
|
76
|
+
private
|
77
|
+
|
78
|
+
def raise_error(response)
|
79
|
+
if response.parsed_response
|
80
|
+
raise "#{response.parsed_response['code']}: #{response.parsed_response['message']}"
|
81
|
+
else
|
82
|
+
raise response.body
|
83
|
+
end
|
84
|
+
end
|
78
85
|
end
|
79
86
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: connect_wise_rest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Pheasey
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|