From 6c58eca4b500ccda898a3d3bc1767d9d017385c9 Mon Sep 17 00:00:00 2001 From: AyakorK Date: Thu, 6 Feb 2025 15:06:16 +0100 Subject: [PATCH 1/3] fix: Move the helper loading as it occured issues when Decidim:Controller was not loaded --- lib/decidim/gallery/engine.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/decidim/gallery/engine.rb b/lib/decidim/gallery/engine.rb index e9cb539..7c4a378 100644 --- a/lib/decidim/gallery/engine.rb +++ b/lib/decidim/gallery/engine.rb @@ -33,12 +33,15 @@ class Engine < ::Rails::Engine initializer "decidim_gallery.action_controller" do Rails.application.reloader.to_prepare do ActiveSupport.on_load :action_controller do - ::Decidim::Admin::StaticPagesController.helper Decidim::Gallery::Admin::ApplicationHelper ::Decidim::Admin::StaticPageForm.prepend Decidim::Gallery::Admin::StaticPages::Form ::Decidim::Admin::CreateStaticPage.prepend Decidim::Gallery::Admin::StaticPages::Command ::Decidim::Admin::UpdateStaticPage.prepend Decidim::Gallery::Admin::StaticPages::Command end end + + config.after_initialize do + ::Decidim::Admin::StaticPagesController.helper Decidim::Gallery::Admin::ApplicationHelper + end end initializer "decidim_gallery.register_blocks" do From a33602591dc5b7581f241be8133de495bdcfba65 Mon Sep 17 00:00:00 2001 From: AyakorK Date: Thu, 6 Feb 2025 15:17:19 +0100 Subject: [PATCH 2/3] fix: Allow tests to run and fix lint --- .github/workflows/test.yml | 2 +- lib/decidim/gallery/engine.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c020325..8856946 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -63,7 +63,7 @@ jobs: SIMPLECOV: 1 CODECOV: 1 - - uses: actions/upload-artifact@v2-preview + - uses: actions/upload-artifact@v4 if: always() with: name: screenshots diff --git a/lib/decidim/gallery/engine.rb b/lib/decidim/gallery/engine.rb index 7c4a378..c77fa73 100644 --- a/lib/decidim/gallery/engine.rb +++ b/lib/decidim/gallery/engine.rb @@ -15,11 +15,11 @@ class Engine < ::Rails::Engine root to: "gallery#index" end - #initializer "decidim_gallery.deface" do + # initializer "decidim_gallery.deface" do # Rails.application.configure do # config.deface.enabled = true # end - #end + # end initializer "decidim_gallery.webpacker.assets_path" do Decidim.register_assets_path File.expand_path("app/packs", root) From 51ddde72e46e0218a32fcc0bfe8349bba5870a45 Mon Sep 17 00:00:00 2001 From: AyakorK Date: Thu, 6 Feb 2025 15:20:56 +0100 Subject: [PATCH 3/3] fix: Allow i18n tests to run --- .github/workflows/i18n.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/i18n.yml b/.github/workflows/i18n.yml index 9afe4ea..086096a 100644 --- a/.github/workflows/i18n.yml +++ b/.github/workflows/i18n.yml @@ -50,7 +50,7 @@ jobs: SIMPLECOV: 0 CODECOV: 0 - - uses: actions/upload-artifact@v2-preview + - uses: actions/upload-artifact@v4 if: always() with: name: screenshots