api_tools 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/api_tools/default_rest_module.rb +5 -3
- data/lib/api_tools/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: b2637610408853515f08ec127020ca41ee97547f
|
4
|
+
data.tar.gz: 7da01e10d454e98cc3adeb017df3f3f4d34c8d3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 721b5c4644d526693adc6db0e8212ac697d649e02669fb756825c676f210de66965f57ec9257364e6d71305093a650748330d973bce81065f5c8a62d79bcf71f
|
7
|
+
data.tar.gz: 7bc85b4e20ddaf2712bde23b70d2f78feac221f32ba29768bb82c949a70d8f3e4774725fb1f08e127167d9b80604d50245f1c406414c65ca7221180c7b8050c0
|
@@ -64,16 +64,18 @@ module ApiTools
|
|
64
64
|
return ::Oj.load(response.body, symbol_keys: true) if user_options[:response_json]
|
65
65
|
return response.body
|
66
66
|
rescue RestClient::Exception => e
|
67
|
+
|
67
68
|
exception = e
|
68
69
|
next
|
69
70
|
end
|
70
71
|
end
|
72
|
+
puts "Restclient error, body = #{exception.response.body}" if exception.respond_to? :response
|
71
73
|
raise exception unless user_options[:ensure_no_exception]
|
72
74
|
{
|
73
75
|
status: false,
|
74
|
-
message:
|
75
|
-
response_code:
|
76
|
-
response_body:
|
76
|
+
message: exception.message,
|
77
|
+
response_code: exception && exception.response.code,
|
78
|
+
response_body: exception && exception.response.body
|
77
79
|
}
|
78
80
|
end
|
79
81
|
|
data/lib/api_tools/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: api_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- atpking
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|