newrelic/rpm — pull request #166 by marioizquierdo (2014-05-21 01:50:45+00:00)
Title: Allow sinatra apps to set the newrelic environment independently of RACK_ENV

I am developing a Padrino/Sinatra app that runs in unicorn, where RACK_ENV is supposed to be 'development', 'deployment' or 'none'. (See [unicorn manpage](http://manpages.ubuntu.com/manpages/raring/man1/unicorn.1.html#contenttoc8)).

Then I have no way to use a different environment variable to load the `newrelic.yml` file in the right environment.

Also, some other Padrino apps use `ENV['PADRINO_ENV']` for configuration.

With this change it would be easy to assign any trivial environment if it needs to, for example:

```ruby
ENV['NEWRELIC_ENV'] = ENV['PADRINO_ENV']
require 'newrelic_rpm' # will load newrelic.yml with the PADRINO_ENV environment
```