From 8163a5ff1d33b63e933b38ade9ec6e38bfea2b6c Mon Sep 17 00:00:00 2001 From: Alberto Vena Date: Fri, 11 Oct 2019 14:04:40 +0200 Subject: [PATCH] Add a DummyApp sprockets 4 configuration manifest This is needed from Sprockets, since v4. It contains all dependencies that needs to be compiled. Co-Authored-By: Elia Schito --- Gemfile | 5 ----- core/lib/spree/testing_support/dummy_app.rb | 5 ++++- .../testing_support/dummy_app/assets/config/manifest.js | 3 +++ 3 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 core/lib/spree/testing_support/dummy_app/assets/config/manifest.js diff --git a/Gemfile b/Gemfile index 0fc5e12ecc4..1f20cebfeb5 100644 --- a/Gemfile +++ b/Gemfile @@ -12,11 +12,6 @@ else end # rubocop:enable Bundler/DuplicatedGem -# Temporarily locking sprockets to v3.x -# see https://github.com/solidusio/solidus/issues/3374 -# and https://github.com/rails/sprockets-rails/issues/369 -gem 'sprockets', '~> 3' - gem 'pry' gem 'launchy', require: false diff --git a/core/lib/spree/testing_support/dummy_app.rb b/core/lib/spree/testing_support/dummy_app.rb index f78ebf645e9..a557949d5a8 100644 --- a/core/lib/spree/testing_support/dummy_app.rb +++ b/core/lib/spree/testing_support/dummy_app.rb @@ -34,8 +34,11 @@ module ApplicationHelper module DummyApp def self.setup(gem_root:, lib_name:, auto_migrate: true) ENV["LIB_NAME"] = lib_name - DummyApp::Application.config.root = File.join(gem_root, 'spec', 'dummy') + root = Pathname(gem_root).join('spec/dummy') + root.join("app/assets/config").mkpath + root.join("app/assets/config/manifest.js").write("// Intentionally empty\n") + DummyApp::Application.config.root = root DummyApp::Application.initialize! unless DummyApp::Application.initialized? if auto_migrate diff --git a/core/lib/spree/testing_support/dummy_app/assets/config/manifest.js b/core/lib/spree/testing_support/dummy_app/assets/config/manifest.js new file mode 100644 index 00000000000..f1a638ef159 --- /dev/null +++ b/core/lib/spree/testing_support/dummy_app/assets/config/manifest.js @@ -0,0 +1,3 @@ +// This manifest is left empty because we are already +// injecting Solidus manifests to be compiled in the +// precompile array manually.