Class: NewRelic::Control::Frameworks::Rails3

Inherits:
Rails show all
Defined in:
lib/new_relic/control/frameworks/rails3.rb

Overview

Control subclass instantiated when Rails is detected. Contains Rails 3.0+ specific configuration, instrumentation, environment values, etc. Many methods are inherited from the NewRelic::Control::Frameworks::Rails class, where the two do not differ

Direct Known Subclasses

Rails4

Constant Summary

Constants inherited from Rails

NewRelic::Control::Frameworks::Rails::BROWSER_MONITORING_INSTALLED_SINGLETON, NewRelic::Control::Frameworks::Rails::BROWSER_MONITORING_INSTALLED_VARIABLE

Instance Attribute Summary

Attributes included from InstanceMethods

#local_env

Instance Method Summary collapse

Methods inherited from Rails

#browser_agent_already_installed?, #init_config, #install_agent_hooks, #install_browser_monitoring, #install_browser_monitoring_and_agent_hooks, #install_dependency_detection, #mark_browser_agent_as_installed, #rails_config, #rails_version, #root

Methods inherited from Ruby

#init_config, #root

Methods inherited from NewRelic::Control

#rails_32_deprecation

Methods included from ClassMethods

#instance, #load_framework_class, #load_test_framework, #local_env, #new_instance, #newrelic_root, #reset

Methods included from InstanceMethods

#[], #app, #configure_agent, #determine_env, #dispatcher, #framework, #handle_invalid_security_settings, #init_plugin, #newrelic_root, #security_settings_valid?, #settings, #start_agent

Methods included from Instrumentation

#add_instrumentation, #install_instrumentation, #load_instrumentation_files

Methods included from ServerMethods

#api_server, #server, #server_from_host

Instance Method Details

#envObject



16
17
18
# File 'lib/new_relic/control/frameworks/rails3.rb', line 16

def env
  @env ||= (ENV['NEW_RELIC_ENV'] || ::Rails.env.to_s)
end

#rails_rootObject



20
21
22
# File 'lib/new_relic/control/frameworks/rails3.rb', line 20

def rails_root
  ::Rails.root.to_s
end

#vendor_rootObject



24
25
26
# File 'lib/new_relic/control/frameworks/rails3.rb', line 24

def vendor_root
  @vendor_root ||= File.join(root, 'vendor', 'rails')
end

#versionObject



28
29
30
# File 'lib/new_relic/control/frameworks/rails3.rb', line 28

def version
  @rails_version ||= Gem::Version.new(::Rails::VERSION::STRING)
end