default: &default
  adapter: postgresql
  encoding: unicode
  pool: 5

development:
  <<: *default
  host: localhost
  database: energy_sparks_development
  username: postgres
  password: pgdev

test: &test
  <<: *default
  host: localhost
  database: energy_sparks_test
  username: postgres
  password: pgdev

staging:
  <<: *default
  database: <%= ENV['STAGING_DB_NAME'] %>
  host: <%= ENV['STAGING_DB_HOST'] %>
  username: <%= ENV['STAGING_DB_USER'] %>
  password: <%= ENV['STAGING_DB_PASSWORD'] %>

production:
  <<: *default
  database: <%= ENV['PRODUCTION_DB_NAME'] %>
  host: <%= ENV['PRODUCTION_DB_HOST'] %>
  username: <%= ENV['PRODUCTION_DB_USER'] %>
  password: <%= ENV['PRODUCTION_DB_PASSWORD'] %>

cucumber:
  <<: *test

default: &default
  adapter: postgresql
  encoding: unicode
  pool: 5

development:
  <<: *default
  host: localhost
  database: energy_sparks_development

test: &test
  <<: *default
  host: localhost
  database: energy_sparks_test

staging:
  <<: *default
  database: <%= ENV['STAGING_DB_NAME'] %>
  host: <%= ENV['STAGING_DB_HOST'] %>
  username: <%= ENV['STAGING_DB_USER'] %>
  password: <%= ENV['STAGING_DB_PASSWORD'] %>

production:
  <<: *default
  database: <%= ENV['PRODUCTION_DB_NAME'] %>
  host: <%= ENV['PRODUCTION_DB_HOST'] %>
  username: <%= ENV['PRODUCTION_DB_USER'] %>
  password: <%= ENV['PRODUCTION_DB_PASSWORD'] %>

cucumber:
  <<: *test

Remove hardcoded username and password for dev and test Most default environments authenticate postgres as the operating system user so don't require username and password being set
Remove hardcoded username and password for dev and test
Most default environments authenticate postgres as the operating system
user so don't require username and password being set
