stacked_config 0.4.0 → 0.4.1

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: da24388d057ab98233e3002bb7adcc961b2b5bb9
4
- data.tar.gz: cb324ce96a7a17fdd7ffdbd89d9e94eaefc08a1f
3
+ metadata.gz: b65a43dce8f32deaf3138a11c07586bf7a19f85d
4
+ data.tar.gz: 74a1266cbf094218758eb823f865f51260824822
5
5
  SHA512:
6
- metadata.gz: 3a4b2fcf9749d4a2002f6a2004ab14caaf522b04bd622f71112673654b934c37c1fd55ed1fd8974cef1413599508b4fb2e6b85984ab3f9ce3a136a9ac080a7f2
7
- data.tar.gz: ce7df61eaeb80659d44b0b3e4b7aacaef1454fa9c1391b74242fb32ee5c27cc1460368ffc91be5ae132b9d0913aae05eb794ce2f5468849b822f42259d2c4a8e
6
+ metadata.gz: 288e79c33b979aa3876ab06b654301a33f2dfff7d25ec07db2e9e705676338459145e4fae87c01cbde424f40cddd79dc30f57bb92a9b3341f8d7c3d317ad6e5e
7
+ data.tar.gz: c96b99918f29a7ef4b5c19022902701e4a9aed1e2fdf9883e3f690c9c79117fa2948a173e277fedadae0638e25a2f17b54214a1af4b68424052407306f951fd5
@@ -12,7 +12,7 @@ module StackedConfig
12
12
  def filter=(filter)
13
13
  raise 'Invalid filter' unless [NilClass, String, Array, Regexp].include? filter.class
14
14
  @filter = filter
15
- reload
15
+ load
16
16
  end
17
17
 
18
18
  def load(*args)
@@ -23,7 +23,6 @@ module StackedConfig
23
23
  @env_layer = StackedConfig::Layers::EnvLayer.new filter
24
24
  env_layer.name = 'Environment variables level'
25
25
  env_layer.priority = priority
26
- env_layer.load
27
26
  self << env_layer
28
27
  end
29
28
 
@@ -1,3 +1,3 @@
1
1
  module StackedConfig
2
- VERSION = '0.4.0'
2
+ VERSION = '0.4.1'
3
3
  end
@@ -19,10 +19,8 @@ describe StackedConfig::Layers::EnvLayer do
19
19
 
20
20
  it 'should contain all ENV values' do
21
21
  layer = StackedConfig::Layers::EnvLayer.new
22
- layer.load
23
22
  expect(layer.to_a).to eq(ENV.to_hash.to_a)
24
23
  layer = StackedConfig::Layers::EnvLayer.new NIL_FILTER
25
- layer.load
26
24
  expect(layer.to_a).to eq(ENV.to_hash.to_a)
27
25
  end
28
26
 
@@ -34,7 +32,6 @@ describe StackedConfig::Layers::EnvLayer do
34
32
 
35
33
  it "should contain filtered ENV variables according to the #{filter.class} filter" do
36
34
  layer = StackedConfig::Layers::EnvLayer.new(filter)
37
- layer.load
38
35
  [1,3].each { |i|
39
36
  expect(layer["StackedConfig::Layers::EnvLayer::VAR#{i}"]).to eql("VALUE#{i}")
40
37
  }
@@ -43,9 +40,8 @@ describe StackedConfig::Layers::EnvLayer do
43
40
 
44
41
  end
45
42
 
46
- it 'should filter according a String if only value is requested' do
43
+ it 'should filter according a String if only one value is requested' do
47
44
  layer = StackedConfig::Layers::EnvLayer.new(STRING_FILTER)
48
- layer.load
49
45
  expect(layer['StackedConfig::Layers::EnvLayer::VAR1']).to eql 'VALUE1'
50
46
  expect(layer.keys.length == 1).to be_truthy
51
47
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stacked_config
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Laurent B.