From f294798e261123fe01fdebdc3b7a627285d04b0c Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Fri, 8 May 2026 08:23:34 +0200 Subject: [PATCH 1/2] chore: Fix reloading in dev mode We need to check if the menu items are already present, otherwise during reload in dev mode new menu items will get added to the menu. --- config/initializers/spree.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/config/initializers/spree.rb b/config/initializers/spree.rb index f4eb050..e6ea895 100644 --- a/config/initializers/spree.rb +++ b/config/initializers/spree.rb @@ -1,10 +1,12 @@ Rails.application.config.to_prepare do - Spree::PermittedAttributes.product_attributes << :prototype_id + if Spree::PermittedAttributes.product_attributes.exclude?(:prototype_id) + Spree::PermittedAttributes.product_attributes << :prototype_id + end Spree::Backend::Config.configure do |config| product_tab = config.menu_items.detect { |menu_item| menu_item.label == :products } - if product_tab.respond_to?(:children) + if product_tab.respond_to?(:children) && product_tab.children.none? { |c| c.label == :prototypes } product_tab.children << Spree::BackendConfiguration::MenuItem.new( condition: -> { can?(:admin, Spree::Prototype) }, url: :admin_prototypes_path, @@ -12,7 +14,9 @@ match_path: '/prototypes' ) else - product_tab.sections << :prototypes + if product_tab.sections.exclude?(:prototypes) + product_tab.sections << :prototypes + end end end end From f216d4e9546848c1ce5c6484381c63da7127ed38 Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Fri, 8 May 2026 08:42:15 +0200 Subject: [PATCH 2/2] chore(CI): Use sqlite3 2.0 Latest version with support for Ruby 4.0 --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 00c7cdb..34a474d 100644 --- a/Gemfile +++ b/Gemfile @@ -21,7 +21,7 @@ when 'mysql' when 'postgresql' gem 'pg' else - gem 'sqlite3', '~> 1.7' + gem 'sqlite3', '~> 2.0' end gemspec