roqua-core-api 0.0.18 → 0.0.19
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4eb936192f85004604aa556609f20c8599145c68
|
4
|
+
data.tar.gz: e1092a2f8df763e5d7c523f5391eb2746b885f78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10db5afae75c08b21d222ed07afb56d0a4004d350fa465fe5b3b13378ac0abe3430452ced74ec08eb71128780641f9741b24de2e49ef0873876a6f86c8a142d4
|
7
|
+
data.tar.gz: 5381ac7c9773312c54b4f92eca3d219fab9a2d4e0bbd813a0832b95e2eeb865bd7f704f3cb75c45c9ec6b152090c9c508aa4adc65402ae8abcb0b588cb15b3da
|
@@ -5,7 +5,9 @@ module Roqua
|
|
5
5
|
attr_reader :username
|
6
6
|
attr_reader :password
|
7
7
|
|
8
|
-
def initialize(username: ENV.fetch('
|
8
|
+
def initialize(username: ENV.fetch('CORE_BASICAUTH_ID'),
|
9
|
+
password: ENV.fetch('CORE_BASICAUTH_SECRET'),
|
10
|
+
**additional_arguments)
|
9
11
|
@username = username
|
10
12
|
@password = password
|
11
13
|
super additional_arguments
|
@@ -7,11 +7,11 @@ describe BasicAuthSession do
|
|
7
7
|
expect(session.username).to eq('some_username')
|
8
8
|
end
|
9
9
|
|
10
|
-
it 'defaults the username to the
|
11
|
-
original_env_core_key = ENV['
|
12
|
-
ENV['
|
10
|
+
it 'defaults the username to the CORE_BASICAUTH_ID env variable' do
|
11
|
+
original_env_core_key = ENV['CORE_BASICAUTH_ID']
|
12
|
+
ENV['CORE_BASICAUTH_ID'] = 'some_env_core_key'
|
13
13
|
session = Roqua::CoreApi.basic_auth_session
|
14
|
-
ENV['
|
14
|
+
ENV['CORE_BASICAUTH_ID'] = original_env_core_key
|
15
15
|
expect(session.username).to eq('some_env_core_key')
|
16
16
|
end
|
17
17
|
|
@@ -20,11 +20,11 @@ describe BasicAuthSession do
|
|
20
20
|
expect(session.password).to eq('some_password')
|
21
21
|
end
|
22
22
|
|
23
|
-
it 'defaults the password to the
|
24
|
-
original_env_core_secret = ENV['
|
25
|
-
ENV['
|
23
|
+
it 'defaults the password to the CORE_BASICAUTH_SECRET env variable' do
|
24
|
+
original_env_core_secret = ENV['CORE_BASICAUTH_SECRET']
|
25
|
+
ENV['CORE_BASICAUTH_SECRET'] = 'some_env_core_secret'
|
26
26
|
session = Roqua::CoreApi.basic_auth_session
|
27
|
-
ENV['
|
27
|
+
ENV['CORE_BASICAUTH_SECRET'] = original_env_core_secret
|
28
28
|
expect(session.password).to eq('some_env_core_secret')
|
29
29
|
end
|
30
30
|
|