Skip to content

Commit

Permalink
Fixes #37452 - Support Zeitwerk loader
Browse files Browse the repository at this point in the history
  • Loading branch information
ofedoren committed Jul 8, 2024
1 parent bb6761f commit 20963b9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/lib/actions/middleware/keep_current_request_id.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Actions
module Middleware
class KeepCurrentRequestID < Dynflow::Middleware
class KeepCurrentRequestId < Dynflow::Middleware
def delay(*args)
pass(*args).tap { store_current_request_id }
end
Expand Down
4 changes: 2 additions & 2 deletions lib/foreman_tasks/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Engine < ::Rails::Engine

initializer 'foreman_tasks.register_plugin', :before => :finisher_hook do |_app|
Foreman::Plugin.register :"foreman-tasks" do
requires_foreman '>= 3.9'
requires_foreman '>= 3.12'
divider :top_menu, :parent => :monitor_menu, :last => true, :caption => N_('Foreman Tasks')
menu :top_menu, :tasks,
:url_hash => { :controller => 'foreman_tasks/tasks', :action => :index },
Expand Down Expand Up @@ -160,7 +160,7 @@ class Engine < ::Rails::Engine
world.middleware.use Actions::Middleware::KeepCurrentTaxonomies
world.middleware.use Actions::Middleware::KeepCurrentUser, :before => ::Dynflow::Middleware::Common::Transaction
world.middleware.use Actions::Middleware::KeepCurrentTimezone
world.middleware.use Actions::Middleware::KeepCurrentRequestID
world.middleware.use Actions::Middleware::KeepCurrentRequestId
world.middleware.use ::Actions::Middleware::LoadSettingValues
ForemanTasks.register_scheduled_task(Actions::CheckLongRunningTasks, ENV['FOREMAN_TASKS_CHECK_LONG_RUNNING_TASKS_CRONLINE'] || '0 0 * * *')
end
Expand Down
6 changes: 3 additions & 3 deletions test/lib/actions/middleware/keep_current_request_id_test.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
require 'foreman_tasks_test_helper'

module ForemanTasks
class KeepCurrentRequestIDTest < ActiveSupport::TestCase
class KeepCurrentRequestIdTest < ActiveSupport::TestCase
class DummyAction < Actions::EntryAction
middleware.use ::Actions::Middleware::KeepCurrentRequestID
middleware.use ::Actions::Middleware::KeepCurrentRequestId

def plan(plan = false)
plan_self if plan
Expand All @@ -18,7 +18,7 @@ def finalize
end
end

describe Actions::Middleware::KeepCurrentRequestID do
describe Actions::Middleware::KeepCurrentRequestId do
include ::Dynflow::Testing

before { @old_id = ::Logging.mdc['request'] }
Expand Down

0 comments on commit 20963b9

Please # to comment.