sethvargo/powify — pull request #13 by bobgilmore (2013-04-05 04:59:21+00:00)
Title: Prevent environment command from completely overwriting existing .powenv

Today, "powify development production" completely overwrites any existing .powenv file. This pull request changes that, by...

1. Creating a new .powenv file if one doesn't already exist, or

2. If one *does* exist, simply append a new "export RAILS_ENV=..." call to the end of the existing one.

3. Special case of (2): if the last (non-whitespace) line of the existing powenv is a call to set the environment, *replace* the old environment with the new one, rather than appending yet another call.