brl_auth 0.1.0 → 0.1.0.1
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/README.md +1 -0
- data/lib/brl/auth/connection.rb +1 -1
- data/lib/brl/auth/version.rb +1 -1
- data/lib/brl_auth.rb +1 -1
- data/spec/brl_auth_spec.rb +2 -3
- metadata +1 -2
- data/lib/brl/auth/BRL.configure do |config|.arb +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd1eb2fa32a8d6956353d7c8d7224b9fbb18670939c80cf290ea404d88a27cf9
|
4
|
+
data.tar.gz: f5bd2726f40a25de222b27775d11dd551b40776c658faba7048500b1731bae6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd965e7556d88b91a0fbf4d7a807ea38a8a88eae0fcda259e36ae6de55a2a6856e6586eb75b8b071ea5dd37fb753ec36db3b2b148fa1f4594ab67eb4d8761d85
|
7
|
+
data.tar.gz: f5d47b36ad8fab43143e4e65b0bd9c1c042f8c22818caae291dc49504f5a45bed9584154e84c832a0cbe59a1f394ba20f51b5cfb24a0da224e3bc6cca8fe0e7f
|
data/README.md
CHANGED
@@ -30,6 +30,7 @@ Create the config/initializers/brl.rb file and define:
|
|
30
30
|
```ruby
|
31
31
|
# Set the env variables
|
32
32
|
BRL.configure do |config|
|
33
|
+
config.auth_url_value = "https://xxx.hmra.com.br" # optional; default: https://hom.api.acesso.hmra.com.br
|
33
34
|
config.handshake = "XXXXXX-XXXXX-XXXX"
|
34
35
|
config.secret_key = "xxxxxxxxx"
|
35
36
|
end
|
data/lib/brl/auth/connection.rb
CHANGED
@@ -6,7 +6,7 @@ module BRL
|
|
6
6
|
ACCEPT = "application/json"
|
7
7
|
CONTENT_TYPE = "application/x-www-form-urlencoded"
|
8
8
|
|
9
|
-
def initialize(request_class: Faraday, base_url: BRL
|
9
|
+
def initialize(request_class: Faraday, base_url: BRL.configuration.auth_base_url)
|
10
10
|
super(request_class: request_class, base_url: base_url)
|
11
11
|
end
|
12
12
|
|
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.0"
|
12
|
+
VERSION = "0.1.0.1"
|
13
13
|
end
|
14
14
|
end
|
data/lib/brl_auth.rb
CHANGED
data/spec/brl_auth_spec.rb
CHANGED
@@ -50,7 +50,7 @@ RSpec.describe BRL::Auth do
|
|
50
50
|
context "when configuration is not defined" do
|
51
51
|
it { expect(subject).not_to be_nil }
|
52
52
|
|
53
|
-
it { expect(subject.auth_base_url).to
|
53
|
+
it { expect(subject.auth_base_url).to eq(described_class::BASE_URL) }
|
54
54
|
|
55
55
|
it { expect(subject.handshake).to be_nil }
|
56
56
|
|
@@ -59,14 +59,13 @@ RSpec.describe BRL::Auth do
|
|
59
59
|
|
60
60
|
context "when its configured by envs" do
|
61
61
|
before do
|
62
|
-
ENV["BRL_AUTH_BASE_URL"] = "auth_url_value"
|
63
62
|
ENV["BRL_HANDSHAKE"] = "handshake_value"
|
64
63
|
ENV["BRL_SECRET_KEY"] = "password_value"
|
65
64
|
end
|
66
65
|
|
67
66
|
it { expect(subject).not_to be_nil }
|
68
67
|
|
69
|
-
it { expect(subject.auth_base_url).to eq(
|
68
|
+
it { expect(subject.auth_base_url).to eq(described_class::BASE_URL) }
|
70
69
|
|
71
70
|
it { expect(subject.handshake).to eq("handshake_value") }
|
72
71
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brl_auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0
|
4
|
+
version: 0.1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danilo Carolino
|
@@ -241,7 +241,6 @@ files:
|
|
241
241
|
- LICENSE.txt
|
242
242
|
- README.md
|
243
243
|
- Rakefile
|
244
|
-
- lib/brl/auth/BRL.configure do |config|.arb
|
245
244
|
- lib/brl/auth/authenticated_connection.rb
|
246
245
|
- lib/brl/auth/authenticated_resource.rb
|
247
246
|
- lib/brl/auth/authentication_error.rb
|