dynamic_configuration 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -0
- data/VERSION +1 -1
- data/dynamic_configuration.gemspec +4 -1
- data/lib/dynamic_configuration.rb +5 -0
- metadata +13 -2
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.4
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{dynamic_configuration}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = [%q{Jarosław Rzeszótko}]
|
@@ -33,9 +33,12 @@ Gem::Specification.new do |s|
|
|
33
33
|
s.specification_version = 3
|
34
34
|
|
35
35
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
36
|
+
s.add_runtime_dependency(%q<builder>, [">= 0"])
|
36
37
|
else
|
38
|
+
s.add_dependency(%q<builder>, [">= 0"])
|
37
39
|
end
|
38
40
|
else
|
41
|
+
s.add_dependency(%q<builder>, [">= 0"])
|
39
42
|
end
|
40
43
|
end
|
41
44
|
|
@@ -9,6 +9,7 @@ module DynamicConfiguration
|
|
9
9
|
|
10
10
|
class ConfigFactory
|
11
11
|
def create_config(const_name, config_file_name)
|
12
|
+
detect_rails
|
12
13
|
setup_config(const_name, config_file_name)
|
13
14
|
load_main_configuration_files
|
14
15
|
load_per_environment_configuration_files if @rails_loaded
|
@@ -18,6 +19,10 @@ module DynamicConfiguration
|
|
18
19
|
end
|
19
20
|
|
20
21
|
private
|
22
|
+
|
23
|
+
def detect_rails
|
24
|
+
@rails_loaded = Object.const_defined?(:Rails)
|
25
|
+
end
|
21
26
|
|
22
27
|
def setup_config(const_name, config_path)
|
23
28
|
@const_name = const_name
|
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.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,18 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
date: 2012-01-26 00:00:00.000000000 Z
|
13
|
-
dependencies:
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: builder
|
16
|
+
requirement: &75144200 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *75144200
|
14
25
|
description: Flexible configuration library for Ruby and Rails applications.
|
15
26
|
email: jrzeszotko@gmail.com
|
16
27
|
executables: []
|