stacked_config 2.0.0 → 2.0.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: 74648d28f29b32a2a3fcdd704abeafc0219c94c4
4
- data.tar.gz: f0946ee3a28f3e74ddbb84a0cac5790a1e52ae40
3
+ metadata.gz: 72954098deeb32868ff0970d7be8987d14a09de6
4
+ data.tar.gz: 36c7a7f9243d9fb973feb7cca87155123b833218
5
5
  SHA512:
6
- metadata.gz: d0ed84faad7ef2cd9de6e93b1afa0989a8241ad49978d95734005056bb499d80bf9d8a34fee1c423d624f615ac9ba8bbb82dd6e9d8c4a95b238fa5760c0b8272
7
- data.tar.gz: 3f2893a1d9ebcf9b4863edd1b27882022c17ecf8b5bf9c3f2cc8e6d0574626d4425b77ba3b7b78ad3a98c8edbb3a26ca14488fc23114e9b802c68609fc5c9e02
6
+ metadata.gz: a3b339e49038b52c26c4b6e7f4f8ef97dd90ec37f3b144070c2cf7815239186a843c8a589bde29b1d29274a915e4e16dc3713f5c1c37806a9fc015facd23ce2f
7
+ data.tar.gz: 6dda8b968640df91137aa95b73e81e0b98f605cd8ad51c68ddddd1c697457c7292ebbe532531323acf545f266f66e78b169628aba024701fcc63e1160cb74a4d
data/README.md CHANGED
@@ -509,13 +509,20 @@ ie `manager[:an_entry]` was giving the same result as `manager['an_entry']`.
509
509
 
510
510
  This was clearly wrong and not consistent everywhere.
511
511
  __Starting with version `2.0.0` this is no more the case__. Nevertheless a compatibility mode is provided for
512
- applications relying on the legacy mechanism, you just need to do __just after requiring this gem__:
512
+ applications relying on the legacy mechanism, you just need to:
513
513
 
514
514
  ```ruby
515
515
  require 'stacked_config'
516
- SuperStack.set_compatibility_mode
516
+ SuperStack.compatibility_mode = true
517
517
  ```
518
518
 
519
+ As from now any layer or manager created will have the old behaviour, but be careful, __only the newly
520
+ created object will reflect this__.
521
+
522
+ You can switch back to standard behaviour by setting the `compatibility_mode` to false, but again only
523
+ the newly created object will reflect this. It is advised to use one mode or the other but to avoid to
524
+ mix...
525
+
519
526
  Of course, if you don't want to use this compatibility mode, this may have an impact on you. As if in
520
527
  your code you where using this feature, you either need to change your code or your config files. (to
521
528
  access a yaml property as symbol you need to declare it with a leading colon).
@@ -15,10 +15,7 @@ module StackedConfig
15
15
  def load(*args)
16
16
  slop_definition.parse
17
17
  slop_definition.banner = build_banner
18
- h = slop_definition.to_hash.delete_if {|k,v| v.nil?}
19
- res = {}
20
- h.each{|k,v| res[k.to_s] = v }
21
- replace res
18
+ self.replace slop_definition.to_hash.delete_if {|k,v| v.nil?}
22
19
  end
23
20
 
24
21
  def possible_options
@@ -1,3 +1,3 @@
1
1
  module StackedConfig
2
- VERSION = '2.0.0'
2
+ VERSION = '2.0.1'
3
3
  end
@@ -32,7 +32,7 @@ describe StackedConfig::Layers::CommandLineLayer do
32
32
  it 'should end-up as a value in the layer' do
33
33
  subject.reload
34
34
  expect(subject.length).not_to be 0
35
- expect(subject['help']).to be_truthy
35
+ expect(subject[:help]).to be_truthy
36
36
  end
37
37
 
38
38
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stacked_config
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Laurent B.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-10 00:00:00.000000000 Z
11
+ date: 2016-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler