stacked_config 1.0.2 → 1.0.3

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
  SHA1:
3
- metadata.gz: 4b40875c352b97a4a48b2265e2952978785af039
4
- data.tar.gz: 88c153c71f5795df1d1342f03e19a1d9adf45be0
3
+ metadata.gz: 496d27bfeac83349389efe230869062646f436c6
4
+ data.tar.gz: cd05b6ad0bf76774b77ba3c18e11cf700e88cc0d
5
5
  SHA512:
6
- metadata.gz: 8ef28bf029e4b335bbf6a024ff61939c7dca489cb7602b53dbc48d57b4f7668233d2dd625e1d8cdfda734a6bf6519625f160326498c0d7a2d042cc3aacbdfe92
7
- data.tar.gz: e6360ba692bb4beb230a87bc067afff6063882a5448b917a6697c20b20d210e2582b28eaa34dc658b3ad45c7a6fcb6e3379cd4377bfe6e7a36d85fdafc5dc4b4
6
+ metadata.gz: 5ff6f789d73defa9438c82f13f89ae8fe1bdf458b144996805bc4933061219da7ec3994e5c045c53c6eace99b78f6d820d515ae65eae39504e0dde74bcb16b17
7
+ data.tar.gz: bdb2292ca63ef3edf12672444e8e5622faf7078830da8c547d21737ead536f72309295c61689fd05c9ceff428ad18543ce7e3815707b693a686f05d5b4598299
data/README.md CHANGED
@@ -32,7 +32,8 @@ All the config files are following the [YAML] syntax.
32
32
  __If you're looking for a complete solution for your command line scripts, including some logging features, then you
33
33
  are probably looking for the [easy_app_helper Gem][EAH], which is itself internally relying on [stacked_config][SC].__
34
34
 
35
- Version 1.x introduces some minor non compatibilities with previous versions. Check [below]() for more info.
35
+ Version 1.x introduces some minor non compatibilities with previous versions. Check [below]
36
+ (#between-version-0x-and-1x) for more info.
36
37
 
37
38
  ## Installation
38
39
 
@@ -491,11 +492,16 @@ This layer contains the following data:
491
492
  ```
492
493
 
493
494
 
494
- ## Non nackward compatible changes
495
+ ## Non backward compatible changes
495
496
 
496
497
  ### Between version 0.x and 1.x
497
498
 
498
- TODO
499
+ The Gem layer has not really the same meaning as in version 0.x. In the v1.x it corresponds to the
500
+ executable_gem_layer.
501
+
502
+ The Gem layer still exists but is now not created automatically. You should use the `include_gem_layer_for`
503
+ orchestrator method to create one and you have to provide a Gem name and optionally a layer priority.
504
+
499
505
 
500
506
  ## Contributing
501
507
 
@@ -16,7 +16,7 @@ module StackedConfig
16
16
  h = slop_definition.to_hash.delete_if {|k,v| v.nil?}
17
17
  res = {}
18
18
  h.each{|k,v| res[k.to_s] = v }
19
- h
19
+ replace res
20
20
  end
21
21
 
22
22
  def possible_options
@@ -1,3 +1,3 @@
1
1
  module StackedConfig
2
- VERSION = '1.0.2'
2
+ VERSION = '1.0.3'
3
3
  end
@@ -24,5 +24,18 @@ describe StackedConfig::Layers::CommandLineLayer do
24
24
  expect(subject.possible_options.include? :verbose).to be_truthy
25
25
  end
26
26
 
27
+ context 'when command line parameter are passed' do
28
+ before(:all) {
29
+ ARGV = ['--help']
30
+ }
31
+
32
+ it 'should end-up as a value in the layer' do
33
+ subject.reload
34
+ expect(subject.length).not_to be 0
35
+ expect(subject['help']).to be_truthy
36
+ end
37
+
38
+ end
39
+
27
40
 
28
41
  end
@@ -4,8 +4,8 @@ require 'spec_helper'
4
4
  describe 'Using stacked_config within a gem' do
5
5
 
6
6
  it 'should detect we are in a gem' do
7
- expect(StackedConfig::SourceHelper.executable_gem_config_root).to_not be_nil
8
- expect(StackedConfig::SourceHelper.executable_gem_config_root =~ /rspec-core/).to be_truthy
7
+ expect(StackedConfig::Layers::ExecutableGemLayer.executable_gem_config_root).to_not be_nil
8
+ expect(StackedConfig::Layers::ExecutableGemLayer.executable_gem_config_root =~ /rspec-core/).to be_truthy
9
9
  end
10
10
 
11
11
  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: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Laurent B.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-28 00:00:00.000000000 Z
11
+ date: 2015-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler