Sha256: a0566d0095fa7f8bf4215d6596207962ba6cfc6261b601af1810f2940f52fa12

Contents?: true

Size: 1.96 KB

Versions: 10

Compression:

Stored size: 1.96 KB

Contents

<% if agent_number = ENV['TC_AGENT_NUMBER']
database_prefix = agent_number + '_'
end %>
<% case ENV['DB']
  when 'sqlite' %>
development:
  adapter: sqlite3
  database: db/solidus_development.sqlite3
test:
  adapter: sqlite3
  database: db/solidus_test.sqlite3
  timeout: 10000
production:
  adapter: sqlite3
  database: db/solidus_production.sqlite3
<% when 'mysql' %>
development:
  adapter: mysql2
  database: <%= database_prefix %><%= options[:lib_name] %>_solidus_development
  encoding: utf8
test:
  adapter: mysql2
  <% if ENV['TRAVIS'] %>
  username: root
  password:
  <% end %>
  database: <%= database_prefix %><%= options[:lib_name] %>_solidus_test
  encoding: utf8
production:
  adapter: mysql2
  database: <%= database_prefix %><%= options[:lib_name] %>_solidus_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
  username: postgres
  min_messages: warning
<% unless db_host.blank? %>
  host: <%= db_host %>
<% end %>
test:
  adapter: postgresql
  database: <%= database_prefix %><%= options[:lib_name] %>_solidus_test
  username: <%= db_username || 'postgres' %>
<% unless db_password.blank? %>
  password: <%= db_password %>
<% end %>
  min_messages: warning
<% unless db_host.blank? %>
  host: <%= db_host %>
<% end %>
production:
  adapter: postgresql
  database: <%= database_prefix %><%= options[:lib_name] %>_solidus_production
  username: postgres
  min_messages: warning
<% unless db_host.blank? %>
  host: <%= db_host %>
<% end %>
<% when 'sqlite', '', nil %>
development:
  adapter: sqlite3
  database: db/solidus_development.sqlite3
test:
  adapter: sqlite3
  database: db/solidus_test.sqlite3
production:
  adapter: sqlite3
  database: db/solidus_production.sqlite3
<% else %>
  <% raise "Invalid DB specified: #{ENV['DB']}" %>
<% end %>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
solidus_core-3.0.8 lib/generators/spree/dummy/templates/rails/database.yml
solidus_core-3.0.7 lib/generators/spree/dummy/templates/rails/database.yml
solidus_core-3.0.6 lib/generators/spree/dummy/templates/rails/database.yml
solidus_core-3.0.5 lib/generators/spree/dummy/templates/rails/database.yml
solidus_core-3.0.4 lib/generators/spree/dummy/templates/rails/database.yml
solidus_core-3.0.3 lib/generators/spree/dummy/templates/rails/database.yml
solidus_core-3.0.2 lib/generators/spree/dummy/templates/rails/database.yml
solidus_core-3.0.1 lib/generators/spree/dummy/templates/rails/database.yml
solidus_core-3.0.0 lib/generators/spree/dummy/templates/rails/database.yml
solidus_core-3.0.0.rc2 lib/generators/spree/dummy/templates/rails/database.yml