lib/new_relic/control/frameworks/ruby.rb in newrelic_rpm-3.4.1 vs lib/new_relic/control/frameworks/ruby.rb in newrelic_rpm-3.4.2.beta1
- old
+ new
@@ -10,11 +10,11 @@
def env
@env ||= ENV['RUBY_ENV'] || ENV['RAILS_ENV'] || ENV['RACK_ENV'] || 'development'
end
def root
- @root ||= ENV['APP_ROOT'] || Dir['.']
+ @root ||= ENV['APP_ROOT'] || '.'
end
# Check a sequence of file locations for newrelic.yml
def config_file
files = []
files << File.join(root,"config","newrelic.yml")
@@ -22,10 +22,10 @@
if ENV["HOME"]
files << File.join(ENV["HOME"], ".newrelic", "newrelic.yml")
files << File.join(ENV["HOME"], "newrelic.yml")
end
files << File.expand_path(ENV["NRCONFIG"]) if ENV["NRCONFIG"]
- files.each do | file |
+ files.each do |file|
return File.expand_path(file) if File.exists? file
end
return File.expand_path(files.first)
end
def to_stdout(msg)