3 env = ENV['RAILS_ENV'] || 'development'
4 config = YAML.load_file(File.expand_path(env == "test" ? "../example.application.yml" : "../application.yml", __FILE__))
6 ENV.each do |key,value|
7 if key.match(/^OSM_(.*)$/)
8 Object.const_set(Regexp.last_match(1).upcase, value)
12 config[env].each do |key,value|
13 unless Object.const_defined?(key.upcase)
14 Object.const_set(key.upcase, value)