brl_auth 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +1 -1
- data/lib/brl/auth/authenticated_connection.rb +1 -1
- data/lib/brl/auth/connection.rb +1 -1
- data/lib/brl/auth/version.rb +1 -1
- data/spec/brl/auth/authenticated_connection_spec.rb +2 -2
- data/spec/brl/auth/authenticated_resource_spec.rb +1 -1
- data/spec/brl/auth/token_service_spec.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec7cedfbf42b1a9c63bc3724ab9988a04bea4ee9852d4e0956ec1995ca5e80d6
|
4
|
+
data.tar.gz: 4e00ed7b6b60bd67e866b891973a7a9da805a2c98a2f73cfaf78d4b095685c37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3e36733d576b294f7cd7bb03e9e565bc8cc394a0c47a2d943b3ec82c387a2a119515622d48f96109912b89fc71441f4dcd6f522a1c8fe2460428b608f022651
|
7
|
+
data.tar.gz: 97584b90e5f001f62048c5e36150e1a8ed1413c6d7826a90a906511dc33fc1bb811617f6b10a897497b85c3138592d7fa19e6f67d00a62bdca160dc52b7a42de
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## v0.1.2-20220221 - Danilo Carolino
|
4
|
+
|
5
|
+
Fixes
|
6
|
+
|
7
|
+
* Fix syntactic incompatibility with ruby lower than v3.1.
|
8
|
+
|
3
9
|
## v0.1.1-20220202 - Danilo Carolino
|
4
10
|
|
5
11
|
* [QC-79](https://qflash.atlassian.net/jira/software/projects/QC/boards/31?selectedIssue=QC-79)
|
data/README.md
CHANGED
@@ -10,7 +10,7 @@ module BRL
|
|
10
10
|
cache: defined?(Rails) ? Rails.cache : nil,
|
11
11
|
request_class: Faraday,
|
12
12
|
base_url: BRL::BASE_URL)
|
13
|
-
super(request_class
|
13
|
+
super(request_class: request_class, base_url: base_url)
|
14
14
|
@token_service = token_service
|
15
15
|
@cache = cache
|
16
16
|
end
|
data/lib/brl/auth/connection.rb
CHANGED
@@ -7,7 +7,7 @@ module BRL
|
|
7
7
|
CONTENT_TYPE = "application/x-www-form-urlencoded"
|
8
8
|
|
9
9
|
def initialize(request_class: Faraday, base_url: BRL.configuration.auth_base_url)
|
10
|
-
super(request_class
|
10
|
+
super(request_class: request_class, base_url: base_url)
|
11
11
|
end
|
12
12
|
|
13
13
|
def default_headers
|
data/lib/brl/auth/version.rb
CHANGED
@@ -9,6 +9,6 @@ module BRL
|
|
9
9
|
# Major - Incremented for incompatible changes with previous release (or big enough new features)
|
10
10
|
# Minor - Incremented for new backwards-compatible features + deprecations
|
11
11
|
# Patch - Incremented for backwards-compatible bug fixes
|
12
|
-
VERSION = "0.1.
|
12
|
+
VERSION = "0.1.2"
|
13
13
|
end
|
14
14
|
end
|
@@ -5,9 +5,9 @@ require "spec_helper"
|
|
5
5
|
RSpec.describe BRL::Auth::AuthenticatedConnection do
|
6
6
|
describe "#default_headers" do
|
7
7
|
let(:token_service) { instance_double(BRL::Auth::TokenService) }
|
8
|
-
let(:token) { BRL::Auth::Token.new(access_token:) }
|
8
|
+
let(:token) { BRL::Auth::Token.new(access_token: access_token) }
|
9
9
|
|
10
|
-
subject { described_class.new(token_service
|
10
|
+
subject { described_class.new(token_service: token_service, cache: cache).default_headers }
|
11
11
|
|
12
12
|
context "when token is cached" do
|
13
13
|
let(:access_token) { "Bearer access_token" }
|
@@ -6,7 +6,7 @@ RSpec.describe BRL::Auth::AuthenticatedResource do
|
|
6
6
|
describe "#initialize" do
|
7
7
|
let(:connection) { instance_double(BRL::Auth::AuthenticatedConnection) }
|
8
8
|
|
9
|
-
subject { described_class.new(connection:) }
|
9
|
+
subject { described_class.new(connection: connection) }
|
10
10
|
|
11
11
|
it { expect(subject).to be_kind_of(BRL::Auth::AuthenticatedResource) }
|
12
12
|
end
|
@@ -14,7 +14,7 @@ RSpec.describe BRL::Auth::TokenService do
|
|
14
14
|
let(:scope) { "scope" }
|
15
15
|
let(:token_type) { "token_type" }
|
16
16
|
|
17
|
-
subject { described_class.new(connection:).retrieve }
|
17
|
+
subject { described_class.new(connection: connection).retrieve }
|
18
18
|
|
19
19
|
before do
|
20
20
|
allow(connection).to receive(:post).with(url: BRL::Auth::TOKEN_ENDPOINT, body: req_body).and_return(result)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brl_auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danilo Carolino
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-02-
|
11
|
+
date: 2022-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: base64
|
@@ -278,7 +278,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
278
278
|
- !ruby/object:Gem::Version
|
279
279
|
version: '0'
|
280
280
|
requirements: []
|
281
|
-
rubygems_version: 3.3.
|
281
|
+
rubygems_version: 3.3.7
|
282
282
|
signing_key:
|
283
283
|
specification_version: 4
|
284
284
|
summary: BRL Auth Library
|