authorized_networks 1.0.1 → 1.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3954c21789b8c65cf2317bb9ddc52f25dd181a565accbe591a4e33d5768ffc5b
4
- data.tar.gz: 06fbc9eb20a3e43cb5a232eded7b8488afca862475c4f693a21fb938cc8df58d
3
+ metadata.gz: abf37ba479b28ad10782321521f7e284b3570478670228a36257b230b93032dd
4
+ data.tar.gz: 1d8c9c829e4f0e676e10436c5058fbd06a1a414a34e0cafd7c2415c0e12da677
5
5
  SHA512:
6
- metadata.gz: c28e96f6885162c0b2e4f49b72d17859d5ba97ea95aaa0cfb2cf5f299efb35aa94327e8a5fab2b8e6eb986e95f92f44885f29adbcc8518218c96ad05c9ee0dac
7
- data.tar.gz: b9314211914c77f1cd00fe718df558fe3c4caa50d1fe444f55c67149971ddc2389b2e9a2cd51f26428aa00a50062002f31812dd0205424f68232ca63af0d644a
6
+ metadata.gz: 5fa0fb02e989029158653ddb0f5b877eecc0bcc8538a5709b6f14442c9f853aa825df289065cbcbc0e98844fede6a5bb16319935d292a33d2ec04b0204fd73ab
7
+ data.tar.gz: 7a127d41c337090359c43de9a405448a2a81d98320a8dae026a4362d864495d0453c397ab664b564c84c35655c10417828e904dc8b8711b389c7b4b779b667b1
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 ||= [:default]
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
@@ -1,3 +1,3 @@
1
1
  module AuthorizedNetworks
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authorized_networks
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Cooke
metadata.gz.sig CHANGED
Binary file