From 1a35ea58caf9bd20b03cd2d113cbc3d5ccaa14e8 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 2bb47a99322..2bf72d6a7a6 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 9c4057d3b729e99ccb74f90ae40db23bc5fec0b5 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 2bf72d6a7a6..a5e16d2f255 100644 --- a/Gemfile +++ b/Gemfile @@ -26,6 +26,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 'rake', require: false, groups: [:lint, :release] gem 'rails-controller-testing', require: false gem 'puma', '< 6', require: false