Skip to content

Commit

Permalink
Fixes #37453 - Support Zeitwerk loader
Browse files Browse the repository at this point in the history
  • Loading branch information
ofedoren authored and adamruzicka committed Sep 10, 2024
1 parent 685cad0 commit a6e2bfc
Show file tree
Hide file tree
Showing 6 changed files with 265 additions and 264 deletions.
2 changes: 1 addition & 1 deletion app/controllers/ui_job_wizard_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class UiJobWizardController < Api::V2::BaseController
class UIJobWizardController < Api::V2::BaseController
include FiltersHelper
def categories
job_categories = resource_scope(permission: action_permission)
Expand Down
14 changes: 14 additions & 0 deletions app/lib/foreman_remote_execution/renderer_methods.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# frozen_string_literal: true

# macros to fetch information about invoked jobs
module ForemanRemoteExecution
module RendererMethods
extend ActiveSupport::Concern

def find_job_invocation_by_id(job_id, preload: nil)
JobInvocation.preload(preload).find_by(id: job_id)
rescue ActiveRecord::NotFound => _e
raise ::Foreman::Exception.new(N_("Can't find Job Invocation for an id %s"), job_id)
end
end
end
12 changes: 0 additions & 12 deletions app/services/renderer_methods.rb

This file was deleted.

6 changes: 6 additions & 0 deletions config/initializers/inflections.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Rails.autoloaders.each do |autoloader|
autoloader.inflector.inflect(
'ssh_execution_provider' => 'SSHExecutionProvider',
'remote_execution_ssh' => 'RemoteExecutionSSH'
)
end
Loading

0 comments on commit a6e2bfc

Please sign in to comment.