newrelic/rpm — pull request #98 by wisq (2013-01-02 19:40:07+00:00)
Title: Rails root

This fixes a deprecation warning in our Rails 3 application, where NewRelic is loaded as part of the Gemfile, before Rails has initialised (and configured ```::Rails.root```).

I realise it's not ideal to be moving Rails3-specific code from the ```Framework::Rails3``` class up to the ```Framework::Rails``` class. But I don't really see a more elegant way to avoid using the deprecated ```RAILS_ROOT``` constant and triggering the warning. Also, there's plenty of precedent for the ```::Rails::VERSION::MAJOR == 3``` approach elsewhere in the rpm code.

Let me know if there's a better way to do this. Obviously the deprecation warning is incorrect in this case, but we just want to eliminate the useless extra noise it creates.