switches to using the passed environment, rather than Rails.env
Merge pull request #2 from ctaintor/change_to_using_environment

switches to using the passed environment, rather than Rails.env