nevans/resque-pool — pull request #57 by ewoodh2o (2012-06-20 21:22:42+00:00)
Title: Use Rails.env instead of RAILS_ENV

`RAILS_ENV` (the Ruby constant) is deprecated and has been removed in Rails 3.2. `ENV['RAILS_ENV']` is not guaranteed to be set (it is not in a default development environment).

This commit checks for the existence of a `Rails` constant, and if found and it responds to `.env`, prefer that value as the current environment.

This ensures that the per-environment selection continues to work under Rails 3.2+.