application_configuration 1.0.1 → 1.0.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/lib/application_configuration.rb +1 -44
- data/lib/tasks/rubyforge_config.yml +1 -1
- metadata +1 -1
@@ -29,12 +29,6 @@ module Application
|
|
29
29
|
|
30
30
|
class << self
|
31
31
|
|
32
|
-
# attr_reader :config_file_location
|
33
|
-
#
|
34
|
-
# def init_config
|
35
|
-
#
|
36
|
-
# end
|
37
|
-
|
38
32
|
def method_missing(sym, *args)
|
39
33
|
inst = Application::Configuration.instance
|
40
34
|
# check to see if the configuration needs to be reloaded.
|
@@ -105,47 +99,10 @@ module Application
|
|
105
99
|
@final_configuration_settings = {} # reset the configuration
|
106
100
|
|
107
101
|
self.loaded_files.each do |lf|
|
102
|
+
puts "Loading Configuration Settings from file: #{lf}"
|
108
103
|
load_file(lf)
|
109
104
|
end
|
110
105
|
|
111
|
-
# if it's rails:
|
112
|
-
# if self.is_rails
|
113
|
-
# # load the default set of configurations for the app.
|
114
|
-
# settings.merge!(load_from_file("#{RAILS_ROOT}/config/application_configuration.yml"))
|
115
|
-
# puts settings.inspect
|
116
|
-
# begin
|
117
|
-
# # load the specific environment configurations if they exist.
|
118
|
-
# settings.merge!(load_from_file("#{RAILS_ROOT}/config/#{RAILS_ENV}_application_configuration.yml"))
|
119
|
-
# puts settings.inspect
|
120
|
-
# rescue Exception => e
|
121
|
-
# end
|
122
|
-
# end
|
123
|
-
|
124
|
-
# @final_configuration_settings = settings
|
125
|
-
#
|
126
|
-
# self.final_configuration_settings.each_pair do |k,v|
|
127
|
-
# k = k.to_s.downcase
|
128
|
-
# # start a list of methods that need to be generated
|
129
|
-
# # methods can't have :: in them so convert these to __.
|
130
|
-
# e_meths = [k.gsub("::", "__")]
|
131
|
-
# if k.match("::")
|
132
|
-
# vars = k.split("::") # get the namespace and the method names
|
133
|
-
# mod = vars.first # namespace
|
134
|
-
# e_meths << mod # generate a method for the namespace
|
135
|
-
# # create a new Namespace object for this name space and assign it to the final_configuration_settings hash.
|
136
|
-
# self.final_configuration_settings[mod.to_s] = Application::Configuration::Namespace.new(mod.to_s)
|
137
|
-
# # add an entry for the __ version of the key so our __ method can call it.
|
138
|
-
# self.final_configuration_settings[e_meths.first] = v
|
139
|
-
# end
|
140
|
-
# # generate all the necessary getter methods
|
141
|
-
# e_meths.each do |m|
|
142
|
-
# eval %{
|
143
|
-
# def #{m}
|
144
|
-
# self.final_configuration_settings["#{m}"]
|
145
|
-
# end
|
146
|
-
# }
|
147
|
-
# end
|
148
|
-
# end
|
149
106
|
@last_reload_time = Time.now
|
150
107
|
end
|
151
108
|
|