neerajdotname-tidbits 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tidbits.rb +9 -0
- metadata +1 -1
data/lib/tidbits.rb
CHANGED
@@ -32,3 +32,12 @@ class StandardError
|
|
32
32
|
"#{self.class}: #{message}#$/#{backtrace.join($/)}"
|
33
33
|
end
|
34
34
|
end
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
require 'ostruct'
|
39
|
+
require 'yaml'
|
40
|
+
appconfig = OpenStruct.new(YAML.load_file("#{RAILS_ROOT}/config/app_config.yml"))
|
41
|
+
env_config = appconfig.send(RAILS_ENV)
|
42
|
+
appconfig.common.update(env_config) unless env_config.nil?
|
43
|
+
AppConfig = OpenStruct.new(appconfig.common)
|