lib/new_relic/control/frameworks/rails.rb in newrelic_rpm-2.13.2 vs lib/new_relic/control/frameworks/rails.rb in newrelic_rpm-2.13.3.beta
- old
+ new
@@ -82,10 +82,18 @@
def rails_vendor_root
File.join(root,'vendor','rails')
end
+ def rails_gem_list
+ ::Rails.configuration.gems.map do | gem |
+ version = (gem.respond_to?(:version) && gem.version) ||
+ (gem.specification.respond_to?(:version) && gem.specification.version)
+ gem.name + (version ? "(#{version})" : "")
+ end
+ end
+
# Collect the Rails::Info into an associative array as well as the list of plugins
def append_environment_info
local_env.append_environment_value('Rails version'){ ::Rails::VERSION::STRING }
if rails_version >= NewRelic::VersionNumber.new('2.2.0')
local_env.append_environment_value('Rails threadsafe') do
@@ -93,14 +101,10 @@
end
end
local_env.append_environment_value('Rails Env') { ENV['RAILS_ENV'] }
if rails_version >= NewRelic::VersionNumber.new('2.1.0')
local_env.append_gem_list do
- ::Rails.configuration.gems.map do | gem |
- version = (gem.respond_to?(:version) && gem.version) ||
- (gem.specification.respond_to?(:version) && gem.specification.version)
- gem.name + (version ? "(#{version})" : "")
- end
+ (bundler_gem_list + rails_gem_list).uniq
end
# The plugins is configured manually. If it's nil, it loads everything non-deterministically
if ::Rails.configuration.plugins
local_env.append_plugin_list { ::Rails.configuration.plugins }
else