* Throw away old system * Add new system * Add new example files * Replace all calls * add the most important docs * Add Specs * rename disable_ssl_requirement to require_ssl * cloudfiles isn't used/called in our code * since community_spotlight.list is only used as enable flag replace it with such one and remove all legacy and irelevant codepaths around it * die if session secret is unset and on heroku * First basic infrastructure for version information
19 lines
862 B
Ruby
19 lines
862 B
Ruby
module Configuration::Provider
|
|
# This provides a basic {#lookup} method for other providers to build
|
|
# upon. Childs are expected to define +lookup_path(path, *args)+ where
|
|
# +path+ will be passed an array of settings generated by splitting the
|
|
# called setting at the dots. The method should return nil if the setting
|
|
# wasn't found and {#lookup} will raise an {SettingNotFoundError} in that
|
|
# case.
|
|
class Base
|
|
def lookup(setting, *args)
|
|
result = lookup_path(setting.split("."), *args)
|
|
return result unless result.nil?
|
|
raise Configuration::SettingNotFoundError, "The setting #{setting} was not found"
|
|
end
|
|
end
|
|
end
|
|
|
|
require Rails.root.join("lib", "configuration", "provider", "yaml")
|
|
require Rails.root.join("lib", "configuration", "provider", "env")
|
|
require Rails.root.join("lib", "configuration", "provider", "dynamic")
|