Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #37453 - Support Zeitwerk loader #895

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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