authorized_networks 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/authorized_networks/config.rb +11 -1
- data/lib/authorized_networks/version.rb +1 -1
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abf37ba479b28ad10782321521f7e284b3570478670228a36257b230b93032dd
|
4
|
+
data.tar.gz: 1d8c9c829e4f0e676e10436c5058fbd06a1a414a34e0cafd7c2415c0e12da677
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fa0fb02e989029158653ddb0f5b877eecc0bcc8538a5709b6f14442c9f853aa825df289065cbcbc0e98844fede6a5bb16319935d292a33d2ec04b0204fd73ab
|
7
|
+
data.tar.gz: 7a127d41c337090359c43de9a405448a2a81d98320a8dae026a4362d864495d0453c397ab664b564c84c35655c10417828e904dc8b8711b389c7b4b779b667b1
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
@@ -13,7 +13,13 @@ module AuthorizedNetworks
|
|
13
13
|
#
|
14
14
|
# @return [Array<Symbol>]
|
15
15
|
def default_groups
|
16
|
-
@default_groups ||=
|
16
|
+
@default_groups ||= begin
|
17
|
+
if ENV['AUTHORIZED_NETWORK_GROUPS'].is_a?(String)
|
18
|
+
group_list_from_env(ENV['AUTHORIZED_NETWORK_GROUPS'])
|
19
|
+
else
|
20
|
+
[:default]
|
21
|
+
end
|
22
|
+
end
|
17
23
|
end
|
18
24
|
|
19
25
|
# Set a networks hash directly in the configuration rather than using a config file file
|
@@ -53,5 +59,9 @@ module AuthorizedNetworks
|
|
53
59
|
end
|
54
60
|
end
|
55
61
|
|
62
|
+
def group_list_from_env(string)
|
63
|
+
string.split(/\s*\,\s*/).map(&:to_sym)
|
64
|
+
end
|
65
|
+
|
56
66
|
end
|
57
67
|
end
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|