capistrano-plugins/capistrano-postgresql — pull request #9 by bruno- (2014-10-03 10:50:09+00:00)
Title: Take `rails_env` option into consideration

This change splits the direct connection between a `stage` option and DB
environment.

A user might have a stage file example: `config/deploy/staging_new.rb` With
this, `stage` variable is set to `staging_new` which makes no sense.

With this update a user can:
- set the stage with `rails_env` option. This is convenient and "just
works" if capistrano-rails gem is used.
- set the DB env explicitly with `pg_env` option. This one should not be
necessary though.

Lastly, this change is "backwards compatible", meaning - without extra options
everything will work as until now.