vendor/gems/app_config-1.2.0/lib/app_config.rb
# Create a new ApplicationConfiguration object.  <tt>conf_path_1</tt> is the path to your YAML configuration file.
# If <tt>conf_path_2</tt> is given, the contents are recursively merged with the contents of <tt>conf_path_1</tt>.
# This allows you to have a "base" configuration with settings that are overrided by "environment specific"
# (developement, test, production, etc) settings.
#
# Ex:
#  ApplicationConfiguration.new(RAILS_ROOT+"/config/base.yml", RAILS_ROOT+"/environments/#{RAILS_ENV}_config.yml")
Create a new ApplicationConfiguration object. conf_path_1 is the path to your YAML configuration file.
If conf_path_2 is given, the contents are recursively merged with the contents of conf_path_1.
This allows you to have a "base" configuration with settings that are overrided by "environment specific"
(developement, test, production, etc) settings.


Create a new ApplicationConfiguration object . conf_path_1 is the path to your YAML configuration file . If conf_path_2 is given the contents are recursively merged with the contents of conf_path_1 . This allows you to have a " base " configuration with settings that are overrided by " environment specific " ( developement test production etc ) settings .
def load_conf_file(conf_path)
    return {} if !conf_path or conf_path.empty? or !File.exist?(conf_path)
    File.open(conf_path, "r") do |file|
      YAML.load(ERB.new(file.read).result) || {}
    end
  end
def load_conf_file ( conf_path ) return { } if ! conf_path or conf_path . empty? or ! File . exist? ( conf_path ) File . open ( conf_path , "r" ) do | file | YAML . load ( ERB . new ( file . read ) . result ) || { } end end
Create a new ApplicationConfiguration object.
Create a new ApplicationConfiguration object .
conf_path
<not_specific>