Skip to content

Commit

Permalink
Merge pull request #3921 from ccarruitero/dummy-database
Browse files Browse the repository at this point in the history
allow customize database credentials for test app
  • Loading branch information
kennyadsl authored Feb 18, 2021
2 parents c69dddb + 638a57b commit 68fcf04
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/lib/generators/spree/dummy/templates/rails/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ production:
encoding: utf8
<% when 'postgres', 'postgresql' %>
<% db_host = ENV['DB_HOST'] -%>
<% db_username = ENV['DB_USERNAME'] -%>
<% db_password = ENV['DB_PASSWORD'] -%>
development:
adapter: postgresql
database: <%= database_prefix %><%= options[:lib_name] %>_solidus_development
Expand All @@ -43,7 +45,10 @@ development:
test:
adapter: postgresql
database: <%= database_prefix %><%= options[:lib_name] %>_solidus_test
username: postgres
username: <%= db_username || 'postgres' %>
<% unless db_password.blank? %>
password: <%= db_password %>
<% end %>
min_messages: warning
<% unless db_host.blank? %>
host: <%= db_host %>
Expand Down

0 comments on commit 68fcf04

Please sign in to comment.