dynamic_configuration 0.1.4 → 0.1.5
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.
- data/VERSION +1 -1
- data/dynamic_configuration.gemspec +1 -1
- data/lib/dynamic_configuration.rb +1 -1
- data/spec/dynamic_configuration_spec.rb +20 -4
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.5
|
@@ -72,7 +72,7 @@ module DynamicConfiguration
|
|
72
72
|
def finalize_config
|
73
73
|
@config.freeze
|
74
74
|
|
75
|
-
if
|
75
|
+
if @rails_loaded
|
76
76
|
::ActiveSupport::Dependencies.autoload_paths << @config_path.to_s
|
77
77
|
::ActiveSupport::Dependencies.explicitly_unloadable_constants << @const_name.to_s
|
78
78
|
end
|
@@ -15,10 +15,26 @@ describe DynamicConfiguration do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
it "should make per-environment settings take precedence over main configuration" do
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
begin
|
19
|
+
Rails = mock(:env => 'test').as_null_object
|
20
|
+
|
21
|
+
module ::ActiveSupport
|
22
|
+
module Dependencies
|
23
|
+
class << self
|
24
|
+
def autoload_paths; []; end
|
25
|
+
def explicitly_unloadable_constants; []; end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
DynamicConfiguration::create(:Settings, path)
|
31
|
+
Settings.main.setting_three.should == [3, 2, 1]
|
32
|
+
ensure
|
33
|
+
Object.instance_eval do
|
34
|
+
remove_const :Rails
|
35
|
+
remove_const :ActiveSupport
|
36
|
+
end
|
37
|
+
end
|
22
38
|
end
|
23
39
|
|
24
40
|
it "should make local settings take precedence even over per-environment settings" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynamic_configuration
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-01-26 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: builder
|
16
|
-
requirement: &
|
16
|
+
requirement: &75603140 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *75603140
|
25
25
|
description: Flexible configuration library for Ruby and Rails applications.
|
26
26
|
email: jrzeszotko@gmail.com
|
27
27
|
executables: []
|