def self.config_search_paths
Proc.new {
paths = [
File.join("config","newrelic.yml"),
File.join("newrelic.yml")
]
if NewRelic::Control.instance.root
paths << File.join(NewRelic::Control.instance.root, "config", "newrelic.yml")
paths << File.join(NewRelic::Control.instance.root, "newrelic.yml")
end
if ENV["HOME"]
paths << File.join(ENV["HOME"], ".newrelic", "newrelic.yml")
paths << File.join(ENV["HOME"], "newrelic.yml")
end
if ENV["GEM_HOME"] && ENV["GEM_HOME"].end_with?(".jar!")
app_name = File.basename(ENV["GEM_HOME"], ".jar!")
paths << File.join(ENV["GEM_HOME"], app_name, "config", "newrelic.yml")
end
paths
}
end