From 13760515cc380b943f5d4baffccbc800d4bbcb43 Mon Sep 17 00:00:00 2001 From: Kirk Wang Date: Mon, 12 Aug 2024 12:31:15 -0700 Subject: [PATCH] =?UTF-8?q?=E2=9A=99=EF=B8=8F=20Update=20submodule=20and?= =?UTF-8?q?=20remove=20decorator?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We no longer need the SimpleSchemaLoaderDecorator as we are now using the Hyrax.config to load the schema. --- .../hyrax/simple_schema_loader_decorator.rb | 13 ------------- config/initializers/hyrax.rb | 2 ++ hyrax-webapp | 2 +- lib/hyku_knapsack/engine.rb | 3 --- 4 files changed, 3 insertions(+), 17 deletions(-) delete mode 100644 app/services/hyrax/simple_schema_loader_decorator.rb diff --git a/app/services/hyrax/simple_schema_loader_decorator.rb b/app/services/hyrax/simple_schema_loader_decorator.rb deleted file mode 100644 index 413e44c..0000000 --- a/app/services/hyrax/simple_schema_loader_decorator.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -# OVERRIDE Hyrax v5.0.0 to add schemas that are located in config/metadata/*.yaml - -module Hyrax - module SimpleSchemaLoaderDecorator - def config_search_paths - [HykuKnapsack::Engine.root] + super - end - end -end - -# This decorator being prepended in a before_initialize in engine.rb to ensure it's loaded first diff --git a/config/initializers/hyrax.rb b/config/initializers/hyrax.rb index 60adc1f..adb8d46 100644 --- a/config/initializers/hyrax.rb +++ b/config/initializers/hyrax.rb @@ -20,6 +20,8 @@ # config.enable_ffmpeg = false # config.branding_path = ENV.fetch('HYRAX_BRANDING_PATH', Rails.root.join('public', 'branding')) + + config.simple_schema_loader_config_search_paths.unshift(HykuKnapsack::Engine.root) end # Ensure that valid_child_concerns are set with all the curation concerns including diff --git a/hyrax-webapp b/hyrax-webapp index 609f5f8..e29c291 160000 --- a/hyrax-webapp +++ b/hyrax-webapp @@ -1 +1 @@ -Subproject commit 609f5f868228febefe9647768aa621a73edf6495 +Subproject commit e29c291df4cc2c18ffab8b6d5a4989ce125d736b diff --git a/lib/hyku_knapsack/engine.rb b/lib/hyku_knapsack/engine.rb index d1fc165..682079c 100644 --- a/lib/hyku_knapsack/engine.rb +++ b/lib/hyku_knapsack/engine.rb @@ -43,9 +43,6 @@ def self.load_translations! # omniauthable # ] # end - - # Ensure we are prepending the Hyrax::SimpleSchemaLoaderDecorator early - Hyrax::SimpleSchemaLoader.prepend(Hyrax::SimpleSchemaLoaderDecorator) end config.to_prepare do