From 93f6953f954566d974898b447883bb0f814002a8 Mon Sep 17 00:00:00 2001 From: Alessandro Desantis Date: Fri, 13 Dec 2019 16:52:27 +0100 Subject: [PATCH 1/2] Fix Sprockets complaining about the lack of a manifest There is an issue with Sprockets 4 not accepting a custom path for the assets manifest, which doesn't play well with in-memory dummy apps such as the one we use in this gem. A fix was provided for sprockets-rails[1] but it was not accepted yet. [1]: https://github.com/rails/sprockets-rails/pull/446 --- Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Gemfile b/Gemfile index e678bde..0873cc1 100644 --- a/Gemfile +++ b/Gemfile @@ -9,5 +9,6 @@ gem 'solidus_core', github: 'solidusio/solidus', branch: branch gemspec gem 'solidus_extension_dev_tools', github: 'solidusio-contrib/solidus_extension_dev_tools' +gem 'sprockets', '~> 3' gem 'sprockets-rails' gem 'sqlite3' From e4bca8c9b98fb1fbec5ea5ee46cd99a711cc3bd1 Mon Sep 17 00:00:00 2001 From: Alessandro Desantis Date: Sat, 14 Dec 2019 13:00:07 +0100 Subject: [PATCH 2/2] Fix ActiveRecord adapters not being loaded for testing --- Gemfile | 10 +++++++++- spec/support/dummy_app/database.yml | 12 ++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) 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 %>