bkeepers/dotenv — pull request #120 by bkeepers (2014-06-17 04:29:34+00:00)
Title: Nobody expects the dotenv concession

This is a bit of an about-face for my stance on supporting multiple environments with `dotenv-rails`. I think #95 has mostly just frustrated people and caused confusion. I'd like to get this right before releasing 1.0 (#108)

This attempts to solve what originally annoyed me about the multiple environment support by being a little more aggressive about what is loaded.

First it will load `config/**/*.env` and `.env` without overriding existing variables. Then it loads `config/**/*.#{Rails.env}.env`, `.#{Rails.env}.env`, and `.env.#{Rails.env}` (may eventually be deprecated), overriding existing values. Finally, it loads `config/local.conf` and `.local.env`, overriding existing values. These are intended to be added to `.gitignore`.

**TODO:**

- [ ] update README
- [ ] Load order for the `config/` globs is currently indeterminate, should it be?

closes #111
closes #113

/cc @technicalpickles