lhc 12.1.0 → 12.1.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8c1cf6d1d9237c3cad231ae1fca7cadfcaaf6283eb429544945715235172b61
|
4
|
+
data.tar.gz: 9945fabdbdd44fbef2fd472f0e4f7a37f347393b92fda1918abda13d6b65d195
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d208eca04aac94eb7f93b3053590df5c0626165cddf479ca3b1ea94907a71ee530df9de76f86f6b6492f14936a77d06f3ae296c9a854c8f1262866fdc4bad3bf
|
7
|
+
data.tar.gz: eaa8166c752a295b34a2b6e0c3406bee09f771a77f2f17ba39b509396fa264ce9387ea5f2dc507fa50f51c2287c0d4fe57bc9849dfdada0a7fc2572aaf5527bf
|
data/lib/lhc/version.rb
CHANGED
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'rails_helper'
|
4
|
+
|
5
|
+
describe LHC::Auth do
|
6
|
+
before(:each) do
|
7
|
+
class AuthPrepInterceptor < LHC::Interceptor
|
8
|
+
|
9
|
+
def before_request
|
10
|
+
request.options[:auth] = { bearer: 'sometoken' }
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
LHC.config.interceptors = [AuthPrepInterceptor, LHC::Auth]
|
15
|
+
end
|
16
|
+
|
17
|
+
after do
|
18
|
+
LHC.config.reset
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'does not use instance variables internally so that other interceptors can still change auth options' do
|
22
|
+
stub_request(:get, "http://local.ch/")
|
23
|
+
.with(headers: { 'Authorization' => 'Bearer sometoken' })
|
24
|
+
.to_return(status: 200)
|
25
|
+
LHC.get('http://local.ch')
|
26
|
+
end
|
27
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lhc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 12.1.
|
4
|
+
version: 12.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- https://github.com/local-ch/lhc/contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -327,6 +327,7 @@ files:
|
|
327
327
|
- spec/interceptors/auth/bearer_spec.rb
|
328
328
|
- spec/interceptors/auth/body_spec.rb
|
329
329
|
- spec/interceptors/auth/long_basic_auth_credentials_spec.rb
|
330
|
+
- spec/interceptors/auth/no_instance_var_for_options_spec.rb
|
330
331
|
- spec/interceptors/auth/reauthentication_configuration_spec.rb
|
331
332
|
- spec/interceptors/auth/reauthentication_spec.rb
|
332
333
|
- spec/interceptors/before_request_spec.rb
|
@@ -479,6 +480,7 @@ test_files:
|
|
479
480
|
- spec/interceptors/auth/bearer_spec.rb
|
480
481
|
- spec/interceptors/auth/body_spec.rb
|
481
482
|
- spec/interceptors/auth/long_basic_auth_credentials_spec.rb
|
483
|
+
- spec/interceptors/auth/no_instance_var_for_options_spec.rb
|
482
484
|
- spec/interceptors/auth/reauthentication_configuration_spec.rb
|
483
485
|
- spec/interceptors/auth/reauthentication_spec.rb
|
484
486
|
- spec/interceptors/before_request_spec.rb
|