booker_ruby 3.3.10 → 3.3.11
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 +4 -4
- data/lib/booker/client.rb +4 -2
- data/lib/booker/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 458a09915eaa7ca202b050409c6c4ae2400357a24b6168e21ac7ef5c3f8b4935
|
4
|
+
data.tar.gz: 6be11a143fed449165b01c679cde30fa7066ad455516d2162387e4f1b59bf19d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e6d57a24ae8e06038586f5f6acc9b344cc869a8ad79a00719860d2c196a890f548e6fb164d70465717c4b8fe1b220ff038a08a7a5c4c38f5fc2afda2d082dfe
|
7
|
+
data.tar.gz: 4ccaa4b8417c90da416cb7050df2098913398106270653376cd4e952c835a2ff0ee1f8ab6f8985f9b227f23e1c629a43625506fee66d863efd51b2de2abf3b6d
|
data/lib/booker/client.rb
CHANGED
@@ -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:
|
285
|
+
timeout: self.request_timeout
|
284
286
|
}
|
285
287
|
|
286
288
|
options[:body] = body if body.present?
|
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.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-
|
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
|
-
|
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
|