booker_ruby 3.3.10 → 3.3.11

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: 6664e123321a2dde0d5962ccf7afd8814bf7adc3d5a7e30f9a3cab016f7cead4
4
- data.tar.gz: 834836b07db714f7f8332c4543228c2a2f48d9fde1a4de1fb954ded424fb5e74
3
+ metadata.gz: 458a09915eaa7ca202b050409c6c4ae2400357a24b6168e21ac7ef5c3f8b4935
4
+ data.tar.gz: 6be11a143fed449165b01c679cde30fa7066ad455516d2162387e4f1b59bf19d
5
5
  SHA512:
6
- metadata.gz: 23a75c66a7fc969b1d7aada629360939f4183bd86afb57a57e1eef93565d9c4fb24116a873d9825df38e13e89fa51bff07db7960130771fcbea4428afe632317
7
- data.tar.gz: 630f846a2525963cc9863eb9edcb902aef440bc905fd83004eacb19758187fb780fdf3677720b48664d9a0983a454e0a1e19bcde26e5a691a325291eec7ffa25
6
+ metadata.gz: 7e6d57a24ae8e06038586f5f6acc9b344cc869a8ad79a00719860d2c196a890f548e6fb164d70465717c4b8fe1b220ff038a08a7a5c4c38f5fc2afda2d082dfe
7
+ data.tar.gz: 4ccaa4b8417c90da416cb7050df2098913398106270653376cd4e952c835a2ff0ee1f8ab6f8985f9b227f23e1c629a43625506fee66d863efd51b2de2abf3b6d
@@ -4,7 +4,7 @@ module Booker
4
4
 
5
5
  attr_accessor :base_url, :auth_base_url, :client_id, :client_secret, :temp_access_token,
6
6
  :temp_access_token_expires_at, :token_store, :token_store_callback_method, :api_subscription_key,
7
- :access_token_scope, :refresh_token, :location_id, :auth_with_client_credentials
7
+ :access_token_scope, :refresh_token, :location_id, :auth_with_client_credentials, :request_timeout
8
8
 
9
9
  CREATE_TOKEN_CONTENT_TYPE = 'application/x-www-form-urlencoded'.freeze
10
10
  CLIENT_CREDENTIALS_GRANT_TYPE = 'client_credentials'.freeze
@@ -24,9 +24,11 @@ module Booker
24
24
  ENV_BASE_URL_KEY = 'BOOKER_API_BASE_URL'.freeze
25
25
  DEFAULT_BASE_URL = 'https://api-staging.booker.com'.freeze
26
26
  DEFAULT_AUTH_BASE_URL = 'https://api-staging.booker.com'
27
+ DEFAULT_REQUEST_TIMEOUT = 60
27
28
 
28
29
  def initialize(options = {})
29
30
  options.each { |key, value| send(:"#{key}=", value) }
31
+ self.request_timeout ||= DEFAULT_REQUEST_TIMEOUT
30
32
  self.base_url ||= get_base_url
31
33
  self.auth_base_url ||= ENV['BOOKER_API_BASE_URL'] || DEFAULT_AUTH_BASE_URL
32
34
  self.client_id ||= ENV['BOOKER_CLIENT_ID']
@@ -280,7 +282,7 @@ module Booker
280
282
  'Authorization' => "Bearer #{access_token}",
281
283
  'Ocp-Apim-Subscription-Key' => self.api_subscription_key
282
284
  },
283
- timeout: 60
285
+ timeout: self.request_timeout
284
286
  }
285
287
 
286
288
  options[:body] = body if body.present?
@@ -1,3 +1,3 @@
1
1
  module Booker
2
- VERSION = '3.3.10'
2
+ VERSION = '3.3.11'
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.10
4
+ version: 3.3.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frederick
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-20 00:00:00.000000000 Z
11
+ date: 2019-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -236,8 +236,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
236
236
  - !ruby/object:Gem::Version
237
237
  version: '0'
238
238
  requirements: []
239
- rubyforge_project:
240
- rubygems_version: 2.7.9
239
+ rubygems_version: 3.0.6
241
240
  signing_key:
242
241
  specification_version: 4
243
242
  summary: Ruby client for the Booker API - https://developers.booker.com