horizon_client 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/lib/horizon_client.rb +11 -2
- data/lib/horizon_client/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: 8fbc26ad88c7153d70742da5e36297418d331f3f
|
4
|
+
data.tar.gz: e9f1341564048999b61e9f2859a39c8b6e7f890c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bb0e9929ca4a976310477392f598cc5fba4d1d683315ac829b152f92c161eecf1713f75e1cbede84ad1815ba819001be19b453f2cd2e05ff06a15c2d913be86
|
7
|
+
data.tar.gz: 8fb6742b74ce1ccbac74011c8b13bc9a8713626e91bdb61028d2e593c139780ab8c5944502201ece53752f3c51e32dc02f0a9db0807310539ed2c52c20e48e41
|
data/.gitignore
CHANGED
data/lib/horizon_client.rb
CHANGED
@@ -10,8 +10,17 @@ module HorizonClient
|
|
10
10
|
|
11
11
|
class ClientError < Faraday::ClientError
|
12
12
|
def initialize(e)
|
13
|
-
|
14
|
-
|
13
|
+
message = e.message
|
14
|
+
if e.response.is_a?(Hash)
|
15
|
+
body = e.response[:body]
|
16
|
+
if body.is_a?(Hash)
|
17
|
+
error = body['error']
|
18
|
+
if error.is_a?(Hash)
|
19
|
+
message += ": #{error['message']}"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
super message
|
15
24
|
end
|
16
25
|
end
|
17
26
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: horizon_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MAK IT
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|