booker_ruby 3.3.8 → 3.3.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/booker/errors.rb +3 -1
- data/lib/booker/version.rb +1 -1
- 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: 6664e123321a2dde0d5962ccf7afd8814bf7adc3d5a7e30f9a3cab016f7cead4
|
4
|
+
data.tar.gz: 834836b07db714f7f8332c4543228c2a2f48d9fde1a4de1fb954ded424fb5e74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23a75c66a7fc969b1d7aada629360939f4183bd86afb57a57e1eef93565d9c4fb24116a873d9825df38e13e89fa51bff07db7960130771fcbea4428afe632317
|
7
|
+
data.tar.gz: 630f846a2525963cc9863eb9edcb902aef440bc905fd83004eacb19758187fb780fdf3677720b48664d9a0983a454e0a1e19bcde26e5a691a325291eec7ffa25
|
data/lib/booker/errors.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Booker
|
2
2
|
class Error < StandardError
|
3
|
-
attr_accessor :error, :description, :url, :request, :response
|
3
|
+
attr_accessor :error, :description, :url, :request, :response, :message
|
4
4
|
|
5
5
|
def initialize(url: nil, request: nil, response: nil)
|
6
6
|
if request.present?
|
@@ -13,8 +13,10 @@ module Booker
|
|
13
13
|
self.error = response.parsed_response['error'] || response.parsed_response['ErrorMessage']
|
14
14
|
self.description = response.parsed_response['error_description']
|
15
15
|
end
|
16
|
+
error_msg_from_response = self.response.try(:parsed_response) || self.response
|
16
17
|
end
|
17
18
|
|
19
|
+
self.message = error_msg_from_response || "Error occurred, but no response was returned."
|
18
20
|
self.url = url
|
19
21
|
end
|
20
22
|
end
|
data/lib/booker/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: booker_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frederick
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -237,7 +237,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
237
237
|
version: '0'
|
238
238
|
requirements: []
|
239
239
|
rubyforge_project:
|
240
|
-
rubygems_version: 2.7.
|
240
|
+
rubygems_version: 2.7.9
|
241
241
|
signing_key:
|
242
242
|
specification_version: 4
|
243
243
|
summary: Ruby client for the Booker API - https://developers.booker.com
|