From e80936fec6e66085e6c7c784bc2cdb419bf3ac8d Mon Sep 17 00:00:00 2001 From: Alberto Vena Date: Fri, 11 Oct 2019 14:04:40 +0200 Subject: [PATCH 1/2] 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 ++++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index ec58920d341..688a10d14d6 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 From 055ac7c258aca1f6abcf2b314a038c5f4cd47ac8 Mon Sep 17 00:00:00 2001 From: Elia Schito Date: Tue, 9 Jan 2024 12:13:08 +0100 Subject: [PATCH 2/2] Lock rack to be less than 3 Removing the dependency on sprockets < 4 rack is now unbounded, but rack 3 is only supported from Rails 7.1 up. --- Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Gemfile b/Gemfile index 688a10d14d6..0c54da0d205 100644 --- a/Gemfile +++ b/Gemfile @@ -27,6 +27,7 @@ gem 'rspec-rails', '~> 6.0.3', require: false gem 'rspec-retry', '~> 0.6.2', require: false gem 'simplecov', require: false gem 'simplecov-cobertura', require: false +gem 'rack', '< 3', require: false gem 'rails-controller-testing', require: false gem 'puma', '< 6', require: false gem 'i18n-tasks', '~> 0.9', require: false