jcnetdev-app_config 1.1 → 1.2
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/app_config.gemspec +1 -1
- data/lib/app_config.rb +2 -2
- data/rails/init.rb +6 -1
- metadata +1 -1
data/app_config.gemspec
CHANGED
data/lib/app_config.rb
CHANGED
@@ -15,10 +15,10 @@ class ApplicationConfig
|
|
15
15
|
self.conf_paths += conf_load_paths
|
16
16
|
self.conf_paths.uniq!
|
17
17
|
|
18
|
-
reload
|
18
|
+
reload
|
19
19
|
end
|
20
20
|
|
21
|
-
def self.reload
|
21
|
+
def self.reload
|
22
22
|
conf = {}
|
23
23
|
conf_paths.each do |path|
|
24
24
|
new_conf = YAML.load(ERB.new(IO.read(path)).result) if path and File.exists?(path)
|
data/rails/init.rb
CHANGED
@@ -1,4 +1,9 @@
|
|
1
1
|
require 'app_config'
|
2
2
|
|
3
3
|
::AppConfig = ApplicationConfig.load_files(RAILS_ROOT+"/config/app_config.yml",
|
4
|
-
RAILS_ROOT+"/config/environments/#{RAILS_ENV}.yml")
|
4
|
+
RAILS_ROOT+"/config/environments/#{RAILS_ENV}.yml")
|
5
|
+
|
6
|
+
def AppConfig.reload!
|
7
|
+
AppConfig.marshal_load(ApplicationConfig.reload.marshal_dump)
|
8
|
+
return AppConfig
|
9
|
+
end
|