From 2f9ad7a1f3defde2d1a358d736e98968cd9bd418 Mon Sep 17 00:00:00 2001 From: tamsin johnson Date: Tue, 8 Aug 2023 15:53:59 -0700 Subject: [PATCH] remove fallback behavior for dropped InitializeWorkflowActor this behavior existed to ensure overrides of `InitializeWorkflowActor` continued to work in the Hyrax 4 series. we don't want this dead reference anymore in Hyrax 5. --- .../hyrax/listeners/workflow_listener.rb | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/app/services/hyrax/listeners/workflow_listener.rb b/app/services/hyrax/listeners/workflow_listener.rb index 5e6dcb8651..7138224cc1 100644 --- a/app/services/hyrax/listeners/workflow_listener.rb +++ b/app/services/hyrax/listeners/workflow_listener.rb @@ -7,17 +7,14 @@ module Listeners # manages workflow accordingly. class WorkflowListener ## - # @note respects class attribute configuration at - # {Hyrax::Actors::InitializeWorkflowActor.workflow_factory}, but falls - # back on {Hyrax::Workflow::WorkflowFactory} to prepare for removal of - # Actors - # @return [#create] default: {Hyrax::Workflow::WorkflowFactory} - def factory - if defined?(Hyrax::Actors::InitializeWorkflowActor) - Hyrax::Actors::InitializeWorkflowActor.workflow_factory - else - Hyrax::Workflow::WorkflowFactory - end + # @!attribute [rw] factory + # @return [#create] + attr_accessor :factory + + ## + # @param [#create] factory + def initialize(factory: Hyrax::Workflow::WorkflowFactory) + @factory = factory end ##