config_plus 0.0.1 → 0.0.2

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: 20890e554dc232e7ec1a72414f746b15ac7a3449
4
- data.tar.gz: efacb601ce0541c0e2141e6846bede15ab2cb437
3
+ metadata.gz: 599e3bd010d176091ffe984b74c85369558386fe
4
+ data.tar.gz: b558ba580faf0701f777d0003c3757a113c84ac1
5
5
  SHA512:
6
- metadata.gz: fb3a6f9ec6260f0ed6299053898d1638219d9a1146c9e117f5c28b8708d74abc1853fd4395ff1b531eeaae23dea1b86ba9dd7391e7503018ec9152047c9b52f4
7
- data.tar.gz: 48713b64f82b3b38a8b3c486af64fa34e9ef38732ebebd091ef591384d1d9392ae6bff0cc8f737ff7e51b3de2cecbded7cd11b545860ab92582f50af05d1c650
6
+ metadata.gz: 121668b57e69c4119f6a3e267f88215f12c779983d7712b2980e11cfafc18bc32b2af02177a03f6e485b1aba8456f4b2263c1a66ac9f9f26772fffb9e8bb0177
7
+ data.tar.gz: 66ca9d59b7b6db91ba7c57f75904071af8fd584f20c80b8342fba905bbeb5febacf304f169122ef3aa49609ce7db4fd2574f8ea951ff74a2d9ff62dceef59fcb
data/README.md CHANGED
@@ -41,7 +41,7 @@ when you specify a directory path at `ConfigPlus.generate from:`.
41
41
  ConfigPlus.generate(from: '/path/to/configuration/directory')
42
42
  ```
43
43
 
44
- And you can specify some pathes using an array.
44
+ And you can specify some paths using an array.
45
45
 
46
46
  ```ruby
47
47
  ConfigPlus.generate(from: ['/path/to/directory1', '/path/to/file1.yml'])
@@ -82,7 +82,7 @@ buzz.config.spam
82
82
  Overwrite Merge
83
83
  ------------------------------------------------------------
84
84
  `ConfigPlus` loads the specified configuration files in file
85
- name order and merge all of configuration into a single hash.
85
+ name order and merges all of configuration into a single hash.
86
86
 
87
87
  ```yml
88
88
  # sample-00.yml
@@ -66,16 +66,17 @@ module ConfigPlus
66
66
  klass != base and
67
67
  klass != ConfigPlus and
68
68
  klass.ancestors.include?(ConfigPlus)
69
- }.reverse.each_with_object({}) {|klass, hsh|
69
+ }.reverse.each.inject({}) {|hsh, klass|
70
70
  h = klass.public_send(method_name)
71
71
  h = helper.config_for(klass, ::ConfigPlus.root) unless
72
72
  h or h.is_a?(Hash)
73
- hsh.merge!(h)
73
+ Merger.merge(hsh, h)
74
74
  }
75
75
 
76
76
  [base, base.singleton_class].each do |obj|
77
77
  obj.instance_eval do
78
78
  config = inheritance ? inheritance.merge(own || {}) : own
79
+ config = ::ConfigPlus::Node.new(config)
79
80
  define_method method_name, -> { config }
80
81
  end
81
82
  end
@@ -1,3 +1,3 @@
1
1
  module ConfigPlus
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: config_plus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - m4oda