hierarchical_config 0.5 → 0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/hierarchical_config.rb +5 -3
  3. metadata +7 -10
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3107034186ffc52f02eab9155e1be4d536682e3b
4
+ data.tar.gz: 33e27c9ae7c419a7b377267e76e15645a5e86d2f
5
+ SHA512:
6
+ metadata.gz: d7508f8fd4682ad689f2d630e5c367a064d89080fe772f50acf1aa465420deeca1f30e4b09e10503ac289843ceecf6889fa722a78433c94e4de73863b90d94a4
7
+ data.tar.gz: 4e5a432670a299702cd0ff84b0dd3ffe4cd3cb24b0746c047069c1cbbf6d9a66974f5a1b80c580d31c724f836cf576ee9af77ce6fa3242e2d553e8a0802b565f
@@ -57,7 +57,7 @@ module HierarchicalConfig
57
57
 
58
58
  raise errors.inspect unless errors.empty?
59
59
 
60
- OpenStruct.new(config_hash).freeze
60
+ config_hash
61
61
  end
62
62
 
63
63
  def load_hash_for_env( file, environment )
@@ -134,12 +134,14 @@ module HierarchicalConfig
134
134
  when value.respond_to?( :keys ) && value.respond_to?( :values )
135
135
  child_hash, child_errors = lock_down_and_ostructify!( value, path + '.' + key, environment )
136
136
  errors += child_errors
137
- hash[key] = OpenStruct.new(child_hash).freeze
137
+ hash[key] = child_hash
138
138
  when value == REQUIRED
139
139
  errors << "#{path}.#{key} is REQUIRED for #{environment}"
140
+ else
141
+ value.freeze
140
142
  end
141
143
  end
142
- return hash, errors
144
+ return OpenStruct.new(hash).freeze, errors
143
145
  end
144
146
  end
145
147
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hierarchical_config
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.5'
5
- prerelease:
4
+ version: '0.6'
6
5
  platform: ruby
7
6
  authors:
8
7
  - timgaleckas
@@ -20,32 +19,30 @@ executables: []
20
19
  extensions: []
21
20
  extra_rdoc_files: []
22
21
  files:
23
- - lib/hierarchical_config.rb
24
22
  - README.markdown
23
+ - lib/hierarchical_config.rb
25
24
  homepage: http://github.com/timgaleckas/hierarchical_config
26
25
  licenses: []
26
+ metadata: {}
27
27
  post_install_message:
28
28
  rdoc_options: []
29
29
  require_paths:
30
30
  - lib
31
31
  required_ruby_version: !ruby/object:Gem::Requirement
32
- none: false
33
32
  requirements:
34
- - - ! '>='
33
+ - - ">="
35
34
  - !ruby/object:Gem::Version
36
35
  version: '0'
37
36
  required_rubygems_version: !ruby/object:Gem::Requirement
38
- none: false
39
37
  requirements:
40
- - - ! '>='
38
+ - - ">="
41
39
  - !ruby/object:Gem::Version
42
40
  version: '0'
43
41
  requirements: []
44
42
  rubyforge_project:
45
- rubygems_version: 1.8.23
43
+ rubygems_version: 2.2.2
46
44
  signing_key:
47
- specification_version: 3
45
+ specification_version: 4
48
46
  summary: Robust strategy for defining the configuration accross environments, machines,
49
47
  clusters
50
48
  test_files: []
51
- has_rdoc: false