bootic_client 0.0.29 → 0.0.30
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/bootic_client.gemspec +2 -2
- data/lib/bootic_client/client.rb +1 -1
- data/lib/bootic_client/version.rb +1 -1
- data/spec/authorized_strategy_spec.rb +5 -4
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88fee920f8b9082a62647609e19ca3492a3eba9028c581ce6df09a2560335b34
|
4
|
+
data.tar.gz: 05b7c8e729b035f486252716392c74563ce0a0cb513a19a90b49309d135c8d6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b205b02d5020df2a8dbb2d104a9b2110e2ae5fd39e48961214b85fc7ef562f81169d3b9021529324dd8d873a94fe58a9195a1113994a9d655d50f53a47ce421d
|
7
|
+
data.tar.gz: 193493b1e377c8db82e8adb6744186892d0ff6d02e31b3ed1dac1e21c9d4e18dea04dc155af082fc8064f5deb6d143e46ea4730fa6e6a7163bdbb51ba4230551
|
data/bootic_client.gemspec
CHANGED
@@ -17,10 +17,10 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
|
-
spec.add_dependency "faraday", '
|
20
|
+
spec.add_dependency "faraday", '>= 0.15'
|
21
21
|
spec.add_dependency "uri_template", '~> 0.7'
|
22
22
|
spec.add_dependency "faraday-http-cache", '~> 2'
|
23
|
-
spec.add_dependency "net-http-persistent", '~>
|
23
|
+
spec.add_dependency "net-http-persistent", '~> 4'
|
24
24
|
spec.add_dependency "oauth2", "~> 1.4"
|
25
25
|
|
26
26
|
spec.add_development_dependency "rake"
|
data/lib/bootic_client/client.rb
CHANGED
@@ -86,7 +86,7 @@ module BooticClient
|
|
86
86
|
cache_options = {serializer: SafeCacheSerializer, shared_cache: false, store: options[:cache_store]}
|
87
87
|
cache_options[:logger] = options[:logger] if options[:logging]
|
88
88
|
|
89
|
-
f.use :http_cache, cache_options
|
89
|
+
f.use :http_cache, **cache_options
|
90
90
|
f.response :logger, options[:logger] if options[:logging]
|
91
91
|
yield f if block_given?
|
92
92
|
f.adapter *Array(options[:faraday_adapter])
|
@@ -23,7 +23,7 @@ describe 'BooticClient::Strategies::Authorized' do
|
|
23
23
|
to_return(status: status, :headers => response_headers, :body => JSON.dump(body))
|
24
24
|
end
|
25
25
|
|
26
|
-
def stub_auth(expired_token, status, body
|
26
|
+
def stub_auth(expired_token, status, body = {})
|
27
27
|
now = Time.now
|
28
28
|
allow(Time).to receive(:now).and_return now
|
29
29
|
|
@@ -31,10 +31,10 @@ describe 'BooticClient::Strategies::Authorized' do
|
|
31
31
|
with(body: {
|
32
32
|
"assertion" => jwt_assertion(expired_token, now),
|
33
33
|
"assertion_type" => "urn:ietf:params:oauth:grant-type:jwt-bearer",
|
34
|
-
"client_id" => client_id,
|
35
|
-
"client_secret" =>
|
34
|
+
"client_id" => '', # JWT assertion flow does not need client_id or secret, but library sends them empty
|
35
|
+
"client_secret" => '',
|
36
36
|
"grant_type" => "assertion",
|
37
|
-
"scope"=>
|
37
|
+
"scope" => ''
|
38
38
|
},
|
39
39
|
headers: {
|
40
40
|
'Content-Type'=>'application/x-www-form-urlencoded'
|
@@ -114,6 +114,7 @@ describe 'BooticClient::Strategies::Authorized' do
|
|
114
114
|
root = client.root
|
115
115
|
expect(@failed_root_request).to have_been_requested
|
116
116
|
expect(@auth_request).to have_been_requested
|
117
|
+
expect(@successful_root_request).to have_been_requested
|
117
118
|
expect(root.message).to eql('Hello!')
|
118
119
|
end
|
119
120
|
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootic_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.30
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ismael Celis
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0.15'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.15'
|
27
27
|
- !ruby/object:Gem::Dependency
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '4'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '4'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: oauth2
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -189,7 +189,7 @@ homepage: https://developers.bootic.net
|
|
189
189
|
licenses:
|
190
190
|
- MIT
|
191
191
|
metadata: {}
|
192
|
-
post_install_message:
|
192
|
+
post_install_message:
|
193
193
|
rdoc_options: []
|
194
194
|
require_paths:
|
195
195
|
- lib
|
@@ -204,8 +204,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
204
204
|
- !ruby/object:Gem::Version
|
205
205
|
version: '0'
|
206
206
|
requirements: []
|
207
|
-
rubygems_version: 3.
|
208
|
-
signing_key:
|
207
|
+
rubygems_version: 3.0.3
|
208
|
+
signing_key:
|
209
209
|
specification_version: 4
|
210
210
|
summary: Official Ruby client for the Bootic API
|
211
211
|
test_files:
|