diff --git a/Gemfile b/Gemfile index 0873cc1..8d33553 100644 --- a/Gemfile +++ b/Gemfile @@ -11,4 +11,12 @@ gemspec gem 'solidus_extension_dev_tools', github: 'solidusio-contrib/solidus_extension_dev_tools' gem 'sprockets', '~> 3' gem 'sprockets-rails' -gem 'sqlite3' + +case ENV['DB'] +when 'postgresql' + gem 'pg' +when 'mysql' + gem 'mysql2' +else + gem 'sqlite3' +end diff --git a/spec/support/dummy_app/database.yml b/spec/support/dummy_app/database.yml index 4035f6e..abb833b 100644 --- a/spec/support/dummy_app/database.yml +++ b/spec/support/dummy_app/database.yml @@ -1,4 +1,16 @@ +<% if ENV['DB'] == 'postgresql' %> +test: + adapter: postgresql + database: circle_test + username: root +<% elsif ENV['DB'] == 'mysql' %> +test: + adapter: mysql2 + database: circle_test + username: root +<% else %> test: adapter: sqlite3 database: ':memory:' timeout: 10000 +<% end %>