From 9ded7c936ee88596bd9c4fd61e2481aa7c629d6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Busqu=C3=A9?= Date: Tue, 16 Aug 2022 12:13:26 +0200 Subject: [PATCH] Run auth generator when starter frontend installs the gem When the installation of solidus_auth_devise is performed by the installation of solidus_starter_frontend, we also need to run solidus_auth_devise' install generator. This responsibility needs to be eventually moved to the solidus_starter_frontend repository. --- .../solidus/install/install_generator/install_frontend.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/lib/generators/solidus/install/install_generator/install_frontend.rb b/core/lib/generators/solidus/install/install_generator/install_frontend.rb index 75425d12dc5..029ece4163c 100644 --- a/core/lib/generators/solidus/install/install_generator/install_frontend.rb +++ b/core/lib/generators/solidus/install/install_generator/install_frontend.rb @@ -38,7 +38,10 @@ def install_solidus_starter_frontend(installer_adds_auth) # TODO: Move installation of solidus_auth_devise to the # solidus_starter_frontend template - BundlerContext.bundle_cleanly { `bundle add solidus_auth_devise` } unless auth_present?(installer_adds_auth) + unless auth_present?(installer_adds_auth) + BundlerContext.bundle_cleanly { `bundle add solidus_auth_devise` } + @generator_context.generate('solidus:auth:install --auto-run-migrations') + end `LOCATION="https://raw.githubusercontent.com/solidusio/solidus_starter_frontend/main/template.rb" bin/rails app:template` end