From 3881e02ad337ade487b8dac8976a506109d1a360 Mon Sep 17 00:00:00 2001 From: Adam Ruzicka Date: Mon, 2 Dec 2024 15:06:42 +0000 Subject: [PATCH] Refs #38006 - Make it rails7-compatible --- app/controllers/api/v2/compliance/scap_contents_controller.rb | 2 -- {lib => app/services}/foreman_openscap/bulk_upload.rb | 0 lib/tasks/foreman_openscap_tasks.rake | 1 - test/lib/foreman_openscap/bulk_upload_test.rb | 1 - 4 files changed, 4 deletions(-) rename {lib => app/services}/foreman_openscap/bulk_upload.rb (100%) diff --git a/app/controllers/api/v2/compliance/scap_contents_controller.rb b/app/controllers/api/v2/compliance/scap_contents_controller.rb index 991f19d99..c16b5f292 100644 --- a/app/controllers/api/v2/compliance/scap_contents_controller.rb +++ b/app/controllers/api/v2/compliance/scap_contents_controller.rb @@ -1,5 +1,3 @@ -require 'foreman_openscap/bulk_upload' - module Api::V2 module Compliance class ScapContentsController < ::Api::V2::BaseController diff --git a/lib/foreman_openscap/bulk_upload.rb b/app/services/foreman_openscap/bulk_upload.rb similarity index 100% rename from lib/foreman_openscap/bulk_upload.rb rename to app/services/foreman_openscap/bulk_upload.rb diff --git a/lib/tasks/foreman_openscap_tasks.rake b/lib/tasks/foreman_openscap_tasks.rake index 47cd1ffc4..11c750397 100644 --- a/lib/tasks/foreman_openscap_tasks.rake +++ b/lib/tasks/foreman_openscap_tasks.rake @@ -1,6 +1,5 @@ # Tasks namespace :foreman_openscap do - require 'foreman_openscap/bulk_upload' require 'foreman_openscap/message_cleaner' namespace :bulk_upload do diff --git a/test/lib/foreman_openscap/bulk_upload_test.rb b/test/lib/foreman_openscap/bulk_upload_test.rb index d3088e694..8f41a75d8 100644 --- a/test/lib/foreman_openscap/bulk_upload_test.rb +++ b/test/lib/foreman_openscap/bulk_upload_test.rb @@ -2,7 +2,6 @@ class BulkUploadTest < ActiveSupport::TestCase setup do - require 'foreman_openscap/bulk_upload' ForemanOpenscap::ScapContent.all.map(&:destroy) end