rconfig 0.4.3 → 0.4.3.1

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.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ZWVkNjJhODhkNTllYTE2Y2NiOTJlNTdiNTJkMDA1YTEwNWVjNzgyOA==
5
+ data.tar.gz: !binary |-
6
+ MjdhYjAxOGQ4ZDk3OTkzMTJhNmZjNjRhYzY4MzcwM2JiYjliOWExZQ==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ OWFiNDIzNjJlOTg2ZmI4ZmYwZjEwMjdiNjU5MTVmMDk1ZWNiNDVhNzIxYTA1
10
+ OGUxZDQzZjMwN2M0YjQ4NGQ1NzdkMmVhN2JhYTZjNDUwMzkxYWU3OWNhYzM1
11
+ YWQ2NjU0NGFmNzQ1ZTliN2JhMjQwNDgyZjFkMmNmN2ViOWMzNjk=
12
+ data.tar.gz: !binary |-
13
+ YjBhNWM4OTkwYjA3ZjUzY2E5ZjM4MDdkZGRmYTI5NmUyYzBlZTU0NGNiZDQ1
14
+ NWEyZTQ3OWZjNTMxYWMyMGY2YWFjMGY3N2FjNjI4N2VlNGM1YjZhNjlmN2Ni
15
+ OTQ3MDgyNDc5Y2I0OWE3Y2IwNjdiNTJkMGRhODFiOGQwYjM0Y2Y=
data/.gitignore CHANGED
@@ -15,3 +15,4 @@
15
15
  .rakeTasks
16
16
  log
17
17
  tmp
18
+ pkg
data/.rvmrc CHANGED
@@ -1 +1 @@
1
- rvm use 1.9.2@rconfig
1
+ rvm use 2.0.0-p247@socialpro --create
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ 0.4.3.1
2
+ =======
3
+ * Fixed typo preventing use of custome Logger.
4
+
1
5
  0.4.3
2
6
  =====
3
7
  * Fixed error handling in parse_load_paths
@@ -65,7 +65,7 @@ require 'rconfig/core_ext/hash'
65
65
  require 'rconfig/core_ext/nil'
66
66
 
67
67
  module RConfig
68
- VERSION = '0.4.3'
68
+ VERSION = '0.4.3.1'
69
69
 
70
70
  autoload :Socket, 'socket'
71
71
  autoload :YAML, 'yaml'
@@ -19,7 +19,7 @@ module RConfig
19
19
  end
20
20
 
21
21
  # Use log file
22
- if output.nil? && options[:file] && File.exists?(optios[:file])
22
+ if output.nil? && options[:file] && File.exists?(options[:file])
23
23
  @output = File.open(options[:file].to_s, 'a')
24
24
  @needs_close = true
25
25
  end
@@ -0,0 +1,4 @@
1
+ server:
2
+ ip: 111.111.111.111
3
+ port: 80
4
+ hostname: test_host
@@ -0,0 +1,4 @@
1
+ server:
2
+ ip: 111.111.111.111
3
+ port: 80
4
+ hostname: test_host
@@ -0,0 +1,3 @@
1
+ server:
2
+ ip: 333.333.333.333
3
+ port: 9090
@@ -0,0 +1,4 @@
1
+ server:
2
+ ip: 222.222.222.222
3
+ port: 8080
4
+
@@ -0,0 +1,4 @@
1
+ server:
2
+ ip: 222.222.222.222
3
+ port: 8080
4
+
@@ -0,0 +1,32 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
+
3
+ describe RConfig do
4
+ before :each do
5
+ RConfig.load_paths = ['spec/config']
6
+ end
7
+
8
+ context 'cascading configs' do
9
+ it 'should set ENV_TIER from CONFIG_ENV' do
10
+ RConfig::Constants::ENV_TIER.should == ENV['CONFIG_ENV']
11
+ end
12
+
13
+ it 'should set hostname from the host machine' do
14
+ RConfig::Constants::HOSTNAME.should == Socket.gethostname
15
+ end
16
+
17
+ it 'should use values from env-specific config when present' do
18
+ RConfig.cascade.server.ip.should == '222.222.222.222'
19
+ RConfig.cascade.server.port.should == 8080
20
+ end
21
+
22
+ it 'should use value from base config when property does not exist in env-specific config' do
23
+ RConfig.cascade.server.hostname.should == 'test_host'
24
+ end
25
+
26
+ it 'should give host-based configs precedence over env-based configs' do
27
+ RConfig.cascade2.server.ip.should == '333.333.333.333'
28
+ RConfig.cascade2.server.port.should == 9090
29
+ end
30
+
31
+ end
32
+ end
metadata CHANGED
@@ -1,71 +1,93 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rconfig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
5
- prerelease:
4
+ version: 0.4.3.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Rahmal Conda
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-05-07 00:00:00.000000000Z
11
+ date: 2014-03-24 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: activesupport
16
- requirement: &70353384810220 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
21
- version: '3.0'
19
+ version: !binary |-
20
+ My4w
22
21
  type: :runtime
23
22
  prerelease: false
24
- version_requirements: *70353384810220
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ~>
26
+ - !ruby/object:Gem::Version
27
+ version: !binary |-
28
+ My4w
25
29
  - !ruby/object:Gem::Dependency
26
30
  name: rspec
27
- requirement: &70353384803680 !ruby/object:Gem::Requirement
28
- none: false
31
+ requirement: !ruby/object:Gem::Requirement
29
32
  requirements:
30
33
  - - ~>
31
34
  - !ruby/object:Gem::Version
32
- version: 2.3.0
35
+ version: !binary |-
36
+ Mi4zLjA=
33
37
  type: :development
34
38
  prerelease: false
35
- version_requirements: *70353384803680
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: !binary |-
44
+ Mi4zLjA=
36
45
  - !ruby/object:Gem::Dependency
37
46
  name: bundler
38
- requirement: &70353384799540 !ruby/object:Gem::Requirement
39
- none: false
47
+ requirement: !ruby/object:Gem::Requirement
40
48
  requirements:
41
49
  - - ~>
42
50
  - !ruby/object:Gem::Version
43
- version: 1.0.0
51
+ version: !binary |-
52
+ MS4wLjA=
44
53
  type: :development
45
54
  prerelease: false
46
- version_requirements: *70353384799540
55
+ version_requirements: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ~>
58
+ - !ruby/object:Gem::Version
59
+ version: !binary |-
60
+ MS4wLjA=
47
61
  - !ruby/object:Gem::Dependency
48
62
  name: jeweler
49
- requirement: &70353384798380 !ruby/object:Gem::Requirement
50
- none: false
63
+ requirement: !ruby/object:Gem::Requirement
51
64
  requirements:
52
65
  - - ~>
53
66
  - !ruby/object:Gem::Version
54
- version: 1.6.4
67
+ version: !binary |-
68
+ MS42LjQ=
55
69
  type: :development
56
70
  prerelease: false
57
- version_requirements: *70353384798380
71
+ version_requirements: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ~>
74
+ - !ruby/object:Gem::Version
75
+ version: !binary |-
76
+ MS42LjQ=
58
77
  - !ruby/object:Gem::Dependency
59
78
  name: i18n
60
- requirement: &70353384798000 !ruby/object:Gem::Requirement
61
- none: false
79
+ requirement: !ruby/object:Gem::Requirement
62
80
  requirements:
63
81
  - - ! '>='
64
82
  - !ruby/object:Gem::Version
65
83
  version: '0'
66
84
  type: :development
67
85
  prerelease: false
68
- version_requirements: *70353384798000
86
+ version_requirements: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ! '>='
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
69
91
  description: Configuration management library for Ruby applications.
70
92
  email:
71
93
  - rahmal@gmail.com
@@ -154,11 +176,17 @@ files:
154
176
  - lib/rconfig/utils.rb
155
177
  - lib/tasks/rdoc.rake
156
178
  - rconfig.gemspec
179
+ - spec/config/cascade.yml
180
+ - spec/config/cascade2.yml
181
+ - spec/config/cascade2_host.yml
182
+ - spec/config/cascade2_test.yml
183
+ - spec/config/cascade_test.yml
157
184
  - spec/config/erb_contents.yml
158
185
  - spec/config/props_config.conf
159
186
  - spec/config/spec.yml
160
187
  - spec/config/xml_config.xml
161
188
  - spec/config2/.gitkeep
189
+ - spec/rconfig/cascade_spec.rb
162
190
  - spec/rconfig/load_paths_spec.rb
163
191
  - spec/rconfig/reload_spec.rb
164
192
  - spec/rconfig_spec.rb
@@ -167,30 +195,26 @@ files:
167
195
  homepage: http://rahmal.github.com/rconfig
168
196
  licenses:
169
197
  - MIT
198
+ metadata: {}
170
199
  post_install_message:
171
200
  rdoc_options: []
172
201
  require_paths:
173
202
  - lib
174
203
  required_ruby_version: !ruby/object:Gem::Requirement
175
- none: false
176
204
  requirements:
177
205
  - - ! '>='
178
206
  - !ruby/object:Gem::Version
179
207
  version: '0'
180
- segments:
181
- - 0
182
- hash: -1353132617575235595
183
208
  required_rubygems_version: !ruby/object:Gem::Requirement
184
- none: false
185
209
  requirements:
186
210
  - - ! '>='
187
211
  - !ruby/object:Gem::Version
188
212
  version: '0'
189
213
  requirements: []
190
214
  rubyforge_project:
191
- rubygems_version: 1.8.15
215
+ rubygems_version: 2.1.5
192
216
  signing_key:
193
- specification_version: 3
217
+ specification_version: 4
194
218
  summary: The complete solution for Ruby Configuration Management. RConfig is a Ruby
195
219
  library that manages configuration within Ruby applications. It bridges the gap
196
220
  between yaml, xml, and key/value based properties files, by providing a centralized
@@ -199,11 +223,17 @@ summary: The complete solution for Ruby Configuration Management. RConfig is a R
199
223
  your configuration style of choice, while providing many new features, and an elegant
200
224
  API.
201
225
  test_files:
226
+ - spec/config/cascade.yml
227
+ - spec/config/cascade2.yml
228
+ - spec/config/cascade2_host.yml
229
+ - spec/config/cascade2_test.yml
230
+ - spec/config/cascade_test.yml
202
231
  - spec/config/erb_contents.yml
203
232
  - spec/config/props_config.conf
204
233
  - spec/config/spec.yml
205
234
  - spec/config/xml_config.xml
206
235
  - spec/config2/.gitkeep
236
+ - spec/rconfig/cascade_spec.rb
207
237
  - spec/rconfig/load_paths_spec.rb
208
238
  - spec/rconfig/reload_spec.rb
209
239
  - spec/rconfig_spec.rb