3 if defined?(Rake.application) && Rake.application.top_level_tasks.grep(/^(default$|test(:|$))/).any?
6 env = ENV['RAILS_ENV'] || 'development'
9 config = YAML.load_file(File.expand_path(env == "test" ? "../example.application.yml" : "../application.yml", __FILE__))
11 ENV.each do |key,value|
12 if key.match(/^OSM_(.*)$/)
13 Object.const_set(Regexp.last_match(1).upcase, value)
17 config[env].each do |key,value|
18 unless Object.const_defined?(key.upcase)
19 Object.const_set(key.upcase, value)