api_tools 0.0.5 → 0.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
  SHA1:
3
- metadata.gz: ee152edcc7419e46ff8c9ba33eade1e59023e630
4
- data.tar.gz: bf7f812e35a02e6b549387e02e1f1db0e120c370
3
+ metadata.gz: b2637610408853515f08ec127020ca41ee97547f
4
+ data.tar.gz: 7da01e10d454e98cc3adeb017df3f3f4d34c8d3d
5
5
  SHA512:
6
- metadata.gz: 8902e50e98d66ade54921f457221d6c9732ac1a8712e871b9eae837855477f89e36fdff05a8a5bf8f1df9f62bc798ad30b5a9e2c3f08b8b6ff190b3ca655a783
7
- data.tar.gz: d61fa53789040571c965d807a3f46ad887e8acef63096feaee2a39cc2684556b5d1c1847aed667224187a0c51936fd3851423d191142de9c76d7557067aa57f5
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: ex.message,
75
- response_code: ex && ex.response.code,
76
- response_body: ex && ex.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
 
@@ -1,3 +1,3 @@
1
1
  module ApiTools
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
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.5
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-22 00:00:00.000000000 Z
11
+ date: 2018-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler