jcnetdev-app_config 1.1 → 1.2

Sign up to get free protection for your applications and to get access to all the features.
data/app_config.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'app_config'
3
- s.version = '1.1'
3
+ s.version = '1.2'
4
4
  s.date = '2008-07-24'
5
5
 
6
6
  s.summary = "Application level configuration"
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jcnetdev-app_config
3
3
  version: !ruby/object:Gem::Version
4
- version: "1.1"
4
+ version: "1.2"
5
5
  platform: ruby
6
6
  authors:
7
7
  - RailsJedi