emailbutler 0.8.5 → 0.8.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/emailbutler/configuration.rb +13 -13
- data/lib/emailbutler/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0bd13652cc6d27528cda94c0245808f10ac00a71b903a59a85bf1b5f703d540e
|
4
|
+
data.tar.gz: d1e3a64b3b54906385f69231a2e4ecbc2eb417b06226d43954686e06dc55ccae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aff55f8d47be9a08766807f4e83ada5e7ae11bb8dc8eedbf0940613222aa768c2ae2ebe6c9af6697fff543e0da256f66eb529c2cd0249981ea51a3bea5f69d36
|
7
|
+
data.tar.gz: 2e012d481612783002bf5f8800b0fbfb2ba8c5366f3867d73fa1aeb19cae687367718ef25db3aa7aad268b5d86560f55c406be64a5e0d3915b261236191375ca
|
@@ -16,8 +16,8 @@ module Emailbutler
|
|
16
16
|
@providers = []
|
17
17
|
|
18
18
|
# It's required to specify these 3 variables to enable basic auth to UI
|
19
|
-
@ui_username =
|
20
|
-
@ui_password =
|
19
|
+
@ui_username = ''
|
20
|
+
@ui_password = ''
|
21
21
|
# Secured environments variable must directly contains environment names
|
22
22
|
@ui_secured_environments = []
|
23
23
|
end
|
@@ -25,9 +25,9 @@ module Emailbutler
|
|
25
25
|
def validate
|
26
26
|
validate_adapter
|
27
27
|
validate_providers
|
28
|
+
validate_secured_environments
|
28
29
|
validate_username
|
29
30
|
validate_password
|
30
|
-
validate_secured_environments
|
31
31
|
end
|
32
32
|
|
33
33
|
private
|
@@ -45,22 +45,22 @@ module Emailbutler
|
|
45
45
|
raise InitializeError, 'Providers list contain invalid element'
|
46
46
|
end
|
47
47
|
|
48
|
+
def validate_secured_environments
|
49
|
+
raise InitializeError, 'Environments list must be array' unless ui_secured_environments.is_a?(Array)
|
50
|
+
end
|
51
|
+
|
48
52
|
def validate_username
|
49
|
-
return if
|
50
|
-
return if ui_username.is_a?(String)
|
53
|
+
return if ui_secured_environments.blank? && ui_username.is_a?(String)
|
54
|
+
return if ui_secured_environments.any? && ui_username.is_a?(String) && ui_username.present?
|
51
55
|
|
52
|
-
raise InitializeError, 'Username must be
|
56
|
+
raise InitializeError, 'Username must be string'
|
53
57
|
end
|
54
58
|
|
55
59
|
def validate_password
|
56
|
-
return if
|
57
|
-
return if ui_password.is_a?(String)
|
58
|
-
|
59
|
-
raise InitializeError, 'Password must be nil or filled string'
|
60
|
-
end
|
60
|
+
return if ui_secured_environments.blank? && ui_password.is_a?(String)
|
61
|
+
return if ui_secured_environments.any? && ui_password.is_a?(String) && ui_password.present?
|
61
62
|
|
62
|
-
|
63
|
-
raise InitializeError, 'Environments list must be array' unless ui_secured_environments.is_a?(Array)
|
63
|
+
raise InitializeError, 'Password must be string'
|
64
64
|
end
|
65
65
|
end
|
66
66
|
end
|
data/lib/emailbutler/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: emailbutler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bogdanov Anton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-container
|