booker_ruby 1.0.2 → 1.1.0

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: 41e10ed27065b0384388bc2534403a150f85b241
4
- data.tar.gz: d4d0cb86460f39b8b1672b82ded24c7b46b17831
3
+ metadata.gz: ccf614c5b4e66311cde5642fee1988fe22a2ab20
4
+ data.tar.gz: 6d9a936f8cae0d198a464ea544975cf36f295040
5
5
  SHA512:
6
- metadata.gz: 45ff3bbbf13e5f33c60fd33510806c90f8d4a83097b28f6f484e48f4d089b2e475b6cf064f0efac703d62c3cb2e8299e896102819257b12e9ae1410d01fba447
7
- data.tar.gz: 4c141bb19dc240ad23c118fc7f2d4f2d7a5b063911c3615feabb9d6942f592b8c84fca3b856a959d90786d5ecd300f355347d2c63688c9cb7cdbbbad0578f2f6
6
+ metadata.gz: a6c264b866ea9727332a4fe1446323359b04df0e7bcced49a4050f7a4736e04b56790bd32da9334cfb51ae704ff0db37824c3486fa8abe50007bdc9f8698c764
7
+ data.tar.gz: a37d3cfa70950f0dc0ed1c323699995413c060feabb7cbe4d3a5386d786440d8a8046b2cacca7d68fef9924b9a0009c3f37ae1f87f30c531faaa4d0abb5f1e64
data/lib/booker/client.rb CHANGED
@@ -142,7 +142,7 @@ module Booker
142
142
 
143
143
  def get_access_token
144
144
  http_options = access_token_options
145
- response = send(self.class::ACCESS_TOKEN_HTTP_METHOD, self.class::ACCESS_TOKEN_ENDPOINT, http_options, nil).parsed_response
145
+ response = access_token_response(http_options)
146
146
 
147
147
  raise Booker::InvalidApiCredentials.new(http_options, response) unless response.present?
148
148
 
@@ -154,6 +154,10 @@ module Booker
154
154
  self.temp_access_token
155
155
  end
156
156
 
157
+ def access_token_response(http_options)
158
+ send(self.class::ACCESS_TOKEN_HTTP_METHOD, self.class::ACCESS_TOKEN_ENDPOINT, http_options, nil).parsed_response
159
+ end
160
+
157
161
  private
158
162
  def request_options(query=nil, body=nil)
159
163
  options = {
@@ -1,3 +1,3 @@
1
1
  module Booker
2
- VERSION = '1.0.2'
2
+ VERSION = '1.1.0'
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: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frederick
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-17 00:00:00.000000000 Z
11
+ date: 2016-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty