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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a0e53e414a90332069e90a5cd7143aca841fbb3c15ea6561f44a3fc0641934ac
4
- data.tar.gz: 37c46a81805ca5a3ab90615108ea8c0f0e4ad61ecd4d65eb3bd4d5ae71561795
3
+ metadata.gz: 6664e123321a2dde0d5962ccf7afd8814bf7adc3d5a7e30f9a3cab016f7cead4
4
+ data.tar.gz: 834836b07db714f7f8332c4543228c2a2f48d9fde1a4de1fb954ded424fb5e74
5
5
  SHA512:
6
- metadata.gz: 98a7a4734eb36f36b2fad6f123773cfa78278f7a4811e55c7ca9e54c436e01419daf10b4d78ac21c801b1e92e643100d9659788e1ffc8dda6f530c8b9f098d3f
7
- data.tar.gz: 622c50af56ef10ac82c2f92ed9577fb1db48fd297ffb8d12abd498f5b4dcad74cc9aaee9c35e90a25344dfd8caef0bb47708e70e15a6f03c8d96fa62cde8f346
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
@@ -1,3 +1,3 @@
1
1
  module Booker
2
- VERSION = '3.3.8'
2
+ VERSION = '3.3.10'
3
3
  end
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.8
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-03-08 00:00:00.000000000 Z
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.8
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