rake config:generate_all only generates the database.yml.dice template file when using MySQL, it doesn't support Postgres in the same manner. We'd need to manually copy & paste the template file and update its configuration for Postgres.
With this PR, dice_bag will detect pg gem and generate the template file accordingly.
Changes
Templates for databases have been moved to ./templates/databases/{database}.yml.dice
DefaultTemplateFile now takes an :save_as optional argument to handle the scenario where a template filename is different than the destination filename
Background
rake config:generate_all
only generates thedatabase.yml.dice
template file when using MySQL, it doesn't support Postgres in the same manner. We'd need to manually copy & paste the template file and update its configuration for Postgres.With this PR, dice_bag will detect
pg
gem and generate the template file accordingly.Changes
./templates/databases/{database}.yml.dice
DefaultTemplateFile
now takes an:save_as
optional argument to handle the scenario where a template filename is different than the destination filename@mdsol/team-10