Sha256: e514f81034f011edd7f20dfcd2b48a0fc932ce72effc74072e2d3aed09af62b3

Contents?: true

Size: 1.78 KB

Versions: 19

Compression:

Stored size: 1.78 KB

Contents

<% if agent_number = ENV['TC_AGENT_NUMBER']
database_prefix = agent_number + '_'
end %>
<% db_password = ENV['DB_PASSWORD'] %>
<% db_username = ENV['DB_USERNAME'] %>
<% case ENV['DB']
  when 'sqlite' %>
development:
  adapter: sqlite3
  database: db/spree_development.sqlite3
test:
  adapter: sqlite3
  database: db/spree_test.sqlite3
  timeout: 10000
production:
  adapter: sqlite3
  database: db/spree_production.sqlite3
<% when 'mysql' %>
mysql: &mysql
  adapter: mysql2
  encoding: utf8
  <% unless db_username.blank? %>
  username: <%= db_username %>
  <% end %>
  <% unless db_password.blank? %>
  password: <%= db_password %>
  <% end %>

development:
  <<: *mysql
  database: <%= database_prefix %><%= options[:lib_name] %>_spree_development
test:
  <<: *mysql
  database: <%= database_prefix %><%= options[:lib_name] %>_spree_test
production:
  <<: *mysql
  database: <%= database_prefix %><%= options[:lib_name] %>_spree_production
<% when 'postgres' %>
<% db_host = ENV['DB_HOST'] %>
postgres: &postgres
  adapter: postgresql
  <% unless db_username.blank? %>
  username: <%= db_username || 'postgres' %>
  <% end %>
  <% unless db_password.blank? %>
  password: <%= db_password %>
  <% end %>
  <% unless db_host.blank? %>
  host: <%= db_host %>
  <% end %>
  min_messages: warning

development:
  <<: *postgres
  database: <%= database_prefix %><%= options[:lib_name] %>_spree_development
test:
  <<: *postgres
  database: <%= database_prefix %><%= options[:lib_name] %>_spree_test
production:
  <<: *postgres
  database: <%= database_prefix %><%= options[:lib_name] %>_spree_production
<% else %>
development:
  adapter: sqlite3
  database: db/spree_development.sqlite3
test:
  adapter: sqlite3
  database: db/spree_test.sqlite3
production:
  adapter: sqlite3
  database: db/spree_production.sqlite3
<% end %>

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
spree_core-3.1.14 lib/generators/spree/dummy/templates/rails/database.yml
spree_core-3.1.13 lib/generators/spree/dummy/templates/rails/database.yml
spree_core-3.1.12 lib/generators/spree/dummy/templates/rails/database.yml
spree_core-3.1.11 lib/generators/spree/dummy/templates/rails/database.yml
spree_core-3.1.10 lib/generators/spree/dummy/templates/rails/database.yml
spree_core-3.1.9 lib/generators/spree/dummy/templates/rails/database.yml
spree_core-3.1.8 lib/generators/spree/dummy/templates/rails/database.yml
spree_core-3.1.7 lib/generators/spree/dummy/templates/rails/database.yml
spree_core-3.1.6 lib/generators/spree/dummy/templates/rails/database.yml
spree_core-3.1.5 lib/generators/spree/dummy/templates/rails/database.yml
spree_core-3.1.4 lib/generators/spree/dummy/templates/rails/database.yml
spree_core-3.1.3 lib/generators/spree/dummy/templates/rails/database.yml
spree_core-3.1.2 lib/generators/spree/dummy/templates/rails/database.yml
spree_core-3.1.1 lib/generators/spree/dummy/templates/rails/database.yml
spree_core-3.1.0 lib/generators/spree/dummy/templates/rails/database.yml
spree_core-3.1.0.rc4 lib/generators/spree/dummy/templates/rails/database.yml
spree_core-3.1.0.rc3 lib/generators/spree/dummy/templates/rails/database.yml
spree_core-3.1.0.rc2 lib/generators/spree/dummy/templates/rails/database.yml
spree_core-3.1.0.rc1 lib/generators/spree/dummy/templates/rails/database.yml