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 +4 -4
- data/README.md +9 -2
- data/lib/stacked_config/layers/command_line_layer.rb +1 -4
- data/lib/stacked_config/version.rb +1 -1
- data/spec/command_line_layer_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72954098deeb32868ff0970d7be8987d14a09de6
|
4
|
+
data.tar.gz: 36c7a7f9243d9fb973feb7cca87155123b833218
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
512
|
+
applications relying on the legacy mechanism, you just need to:
|
513
513
|
|
514
514
|
```ruby
|
515
515
|
require 'stacked_config'
|
516
|
-
SuperStack.
|
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
|
-
|
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
|
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.
|
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-
|
11
|
+
date: 2016-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|