Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

remove usage of require_dependency

ulferts89cfee203ff6
diff --git a/app/cells/enumerations/table_cell.rb b/app/cells/enumerations/table_cell.rb
index 837a7ca72e9..0b5f4e57ef8 100644
--- a/app/cells/enumerations/table_cell.rb
+++ b/app/cells/enumerations/table_cell.rb
@@ -1,5 +1,3 @@
-require_dependency 'enumerations/row_cell'
-
module Enumerations
class TableCell < ::TableCell
def initial_sort
diff --git a/app/cells/oauth/applications/table_cell.rb b/app/cells/oauth/applications/table_cell.rb
index fcc915cf2cc..48637206a10 100644
--- a/app/cells/oauth/applications/table_cell.rb
+++ b/app/cells/oauth/applications/table_cell.rb
@@ -1,5 +1,3 @@
-require_dependency 'oauth/applications/row_cell'
-
module OAuth
module Applications
class TableCell < ::TableCell
diff --git a/app/cells/statuses/table_cell.rb b/app/cells/statuses/table_cell.rb
index f79f2af48dd..48f3f467b63 100644
--- a/app/cells/statuses/table_cell.rb
+++ b/app/cells/statuses/table_cell.rb
@@ -1,5 +1,3 @@
-require_dependency 'statuses/row_cell'
-
module Statuses
class TableCell < ::TableCell
def initial_sort
diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb
index 1bd50b282e2..bf2706db17f 100644
--- a/app/controllers/repositories_controller.rb
+++ b/app/controllers/repositories_controller.rb
@@ -31,7 +31,6 @@
require 'SVG/Graph/Bar'
require 'SVG/Graph/BarHorizontal'
require 'digest/sha1'
-require_dependency 'open_project/scm/adapters'
class ChangesetNotFound < StandardError
end
diff --git a/app/models/attribute_help_text.rb b/app/models/attribute_help_text.rb
index 0660ba761b6..7f83375242b 100644
--- a/app/models/attribute_help_text.rb
+++ b/app/models/attribute_help_text.rb
@@ -78,5 +78,5 @@ class AttributeHelpText < ApplicationRecord
end
end
-require_dependency 'attribute_help_text/work_package'
-require_dependency 'attribute_help_text/project'
+require 'attribute_help_text/work_package'
+require 'attribute_help_text/project'
diff --git a/app/models/enumeration.rb b/app/models/enumeration.rb
index 258e111e157..e6f7aea774f 100644
--- a/app/models/enumeration.rb
+++ b/app/models/enumeration.rb
@@ -182,5 +182,5 @@ end
# Force load the subclasses in development mode
%w(time_entry_activity issue_priority).each do |enum_subclass|
- require_dependency enum_subclass
+ require enum_subclass
end
diff --git a/app/models/queries/filters/available_filters.rb b/app/models/queries/filters/available_filters.rb
index 675a97876ed..68c17db1cc6 100644
--- a/app/models/queries/filters/available_filters.rb
+++ b/app/models/queries/filters/available_filters.rb
@@ -28,8 +28,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-require_dependency 'queries/filters'
-
module Queries
module Filters
module AvailableFilters
diff --git a/app/models/setting.rb b/app/models/setting.rb
index 77883879c27..f63cc9c0775 100644
--- a/app/models/setting.rb
+++ b/app/models/setting.rb
@@ -339,9 +339,7 @@ class Setting < ApplicationRecord
end
end
- require_dependency 'setting/callbacks'
extend Callbacks
- require_dependency 'setting/aliases'
extend Aliases
end
diff --git a/app/models/token/auto_login.rb b/app/models/token/auto_login.rb
index dabea6d7817..9feff005110 100644
--- a/app/models/token/auto_login.rb
+++ b/app/models/token/auto_login.rb
@@ -28,8 +28,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-require_dependency 'token/hashed_token'
-
module Token
class AutoLogin < HashedToken
end
diff --git a/app/models/token/enterprise_trial_key.rb b/app/models/token/enterprise_trial_key.rb
index d5e0a9c1e2b..cac398bb12c 100644
--- a/app/models/token/enterprise_trial_key.rb
+++ b/app/models/token/enterprise_trial_key.rb
@@ -28,8 +28,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-require_dependency 'token/base'
-
module Token
class EnterpriseTrialKey < Base
include ExpirableToken
diff --git a/app/models/token/hashed_token.rb b/app/models/token/hashed_token.rb
index 57b22838cad..9cf61fe385b 100644
--- a/app/models/token/hashed_token.rb
+++ b/app/models/token/hashed_token.rb
@@ -16,8 +16,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-require_dependency 'token/base'
-
module Token
class HashedToken < Base
# Allow access to the plain value during initial access / creation of the token
diff --git a/app/models/token/invitation.rb b/app/models/token/invitation.rb
index 831b1fb520b..36692ded119 100644
--- a/app/models/token/invitation.rb
+++ b/app/models/token/invitation.rb
@@ -28,8 +28,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-require_dependency 'token/base'
-
module Token
class Invitation < Base
include ExpirableToken
diff --git a/app/models/token/recovery.rb b/app/models/token/recovery.rb
index 8f660bbe170..eaebd8137f1 100644
--- a/app/models/token/recovery.rb
+++ b/app/models/token/recovery.rb
@@ -28,8 +28,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-require_dependency 'token/base'
-
module Token
class Recovery < Base
include ExpirableToken
diff --git a/lib/api/v3/help_texts/help_texts_api.rb b/lib/api/v3/help_texts/help_texts_api.rb
index 9b426636c0d..8b13eb2cabf 100644
--- a/lib/api/v3/help_texts/help_texts_api.rb
+++ b/lib/api/v3/help_texts/help_texts_api.rb
@@ -26,9 +26,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-require_dependency 'api/v3/help_texts/help_text_representer'
-require_dependency 'api/v3/help_texts/help_text_collection_representer'
-
module API
module V3
module HelpTexts
diff --git a/lib/api/v3/queries/schemas/filter_dependency_representer_factory.rb b/lib/api/v3/queries/schemas/filter_dependency_representer_factory.rb
index 567487790fb..c27fe669634 100644
--- a/lib/api/v3/queries/schemas/filter_dependency_representer_factory.rb
+++ b/lib/api/v3/queries/schemas/filter_dependency_representer_factory.rb
@@ -28,7 +28,7 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-Dir[File.dirname(__FILE__) + '/*.rb'].each { |file| require_dependency file }
+Dir[File.dirname(__FILE__) + '/*.rb'].each { |file| require file }
module API
module V3
diff --git a/lib/open_project/journal_formatter/diff.rb b/lib/open_project/journal_formatter/diff.rb
index 4740141b395..13395294752 100644
--- a/lib/open_project/journal_formatter/diff.rb
+++ b/lib/open_project/journal_formatter/diff.rb
@@ -26,8 +26,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-require_dependency 'journal_formatter/base'
-
class OpenProject::JournalFormatter::Diff < JournalFormatter::Base
include OpenProject::StaticRouting::UrlHelpers
diff --git a/lib/open_project/plugins/acts_as_op_engine.rb b/lib/open_project/plugins/acts_as_op_engine.rb
index 1965ffa339e..37eed896415 100644
--- a/lib/open_project/plugins/acts_as_op_engine.rb
+++ b/lib/open_project/plugins/acts_as_op_engine.rb
@@ -26,10 +26,10 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-require_dependency 'open_project/ui/extensible_tabs'
-require_dependency 'config/constants/api_patch_registry'
-require_dependency 'config/constants/open_project/activity'
-require_dependency 'config/constants/views'
+require 'open_project/ui/extensible_tabs'
+require_relative '../../../config/constants/api_patch_registry'
+require_relative '../../../config/constants/open_project/activity'
+require_relative '../../../config/constants/views'
module OpenProject::Plugins
module ActsAsOpEngine
diff --git a/lib/open_project/plugins/load_dependency.rb b/lib/open_project/plugins/load_dependency.rb
index 5a0549e03a1..81f85250c23 100644
--- a/lib/open_project/plugins/load_dependency.rb
+++ b/lib/open_project/plugins/load_dependency.rb
@@ -31,7 +31,7 @@ module OpenProject::Plugins
def self.register(target, *dependencies)
ActiveSupport.on_load(target) do
dependencies.each do |dependency|
- require_dependency dependency
+ require dependency
end
end
end
diff --git a/lib/open_project/plugins/patch_registry.rb b/lib/open_project/plugins/patch_registry.rb
index 85a0ae67c4d..09007abbfce 100644
--- a/lib/open_project/plugins/patch_registry.rb
+++ b/lib/open_project/plugins/patch_registry.rb
@@ -30,7 +30,7 @@ module OpenProject::Plugins
module PatchRegistry
def self.register(target, patch)
ActiveSupport.on_load(target) do
- require_dependency patch
+ require patch
constant = patch.camelcase.constantize
target.to_s.camelcase.constantize.send(:include, constant)
diff --git a/lib/open_project/scm/adapters/git.rb b/lib/open_project/scm/adapters/git.rb
index 262ba021105..52ffe8f5da5 100644
--- a/lib/open_project/scm/adapters/git.rb
+++ b/lib/open_project/scm/adapters/git.rb
@@ -28,8 +28,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-require_dependency 'open_project/scm/adapters'
-
module OpenProject
module SCM
module Adapters
diff --git a/modules/avatars/lib/open_project/avatars/engine.rb b/modules/avatars/lib/open_project/avatars/engine.rb
index 6cdf88182c1..f81701d5516 100644
--- a/modules/avatars/lib/open_project/avatars/engine.rb
+++ b/modules/avatars/lib/open_project/avatars/engine.rb
@@ -41,10 +41,6 @@ module OpenProject::Avatars
icon: 'icon2 icon-image1'
end
- config.to_prepare do
- require_dependency 'project'
- end
-
add_api_endpoint 'API::V3::Users::UsersAPI', :id do
mount ::API::V3::Users::UserAvatarAPI
end
diff --git a/modules/backlogs/lib/open_project/backlogs/patches/permitted_params_patch.rb b/modules/backlogs/lib/open_project/backlogs/patches/permitted_params_patch.rb
index 2e9a3ca22a4..e534ef0d688 100644
--- a/modules/backlogs/lib/open_project/backlogs/patches/permitted_params_patch.rb
+++ b/modules/backlogs/lib/open_project/backlogs/patches/permitted_params_patch.rb
@@ -26,8 +26,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-require_dependency 'permitted_params'
-
module OpenProject::Backlogs::Patches::PermittedParamsPatch
def self.included(base)
base.prepend InstanceMethods
diff --git a/modules/backlogs/lib/open_project/backlogs/patches/project_patch.rb b/modules/backlogs/lib/open_project/backlogs/patches/project_patch.rb
index 7b0329f1ee0..a18bc05c944 100644
--- a/modules/backlogs/lib/open_project/backlogs/patches/project_patch.rb
+++ b/modules/backlogs/lib/open_project/backlogs/patches/project_patch.rb
@@ -26,8 +26,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-require_dependency 'project'
-
module OpenProject::Backlogs::Patches::ProjectPatch
def self.included(base)
base.class_eval do
diff --git a/modules/backlogs/lib/open_project/backlogs/patches/specific_work_package_schema_patch.rb b/modules/backlogs/lib/open_project/backlogs/patches/specific_work_package_schema_patch.rb
index ab98bd72ab6..066fee74e6a 100644
--- a/modules/backlogs/lib/open_project/backlogs/patches/specific_work_package_schema_patch.rb
+++ b/modules/backlogs/lib/open_project/backlogs/patches/specific_work_package_schema_patch.rb
@@ -26,8 +26,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-require_dependency 'api/v3/work_packages/schema/specific_work_package_schema'
-
module OpenProject::Backlogs::Patches::SpecificWorkPackageSchemaPatch
def self.included(base)
base.class_eval do
diff --git a/modules/backlogs/lib/open_project/backlogs/patches/status_patch.rb b/modules/backlogs/lib/open_project/backlogs/patches/status_patch.rb
index 6286bc17122..fac7c23b7f7 100644
--- a/modules/backlogs/lib/open_project/backlogs/patches/status_patch.rb
+++ b/modules/backlogs/lib/open_project/backlogs/patches/status_patch.rb
@@ -26,8 +26,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-require_dependency 'status'
-
module OpenProject::Backlogs::Patches::StatusPatch
def self.included(base)
base.class_eval do
diff --git a/modules/backlogs/lib/open_project/backlogs/patches/type_patch.rb b/modules/backlogs/lib/open_project/backlogs/patches/type_patch.rb
index f6e8fe7dbb0..f7660b3fd6c 100644
--- a/modules/backlogs/lib/open_project/backlogs/patches/type_patch.rb
+++ b/modules/backlogs/lib/open_project/backlogs/patches/type_patch.rb
@@ -26,8 +26,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-require_dependency 'type'
-
module OpenProject::Backlogs::Patches::TypePatch
def self.included(base)
base.class_eval do
diff --git a/modules/backlogs/lib/open_project/backlogs/patches/user_patch.rb b/modules/backlogs/lib/open_project/backlogs/patches/user_patch.rb
index 91cba0e63f2..54d56f6a491 100644
--- a/modules/backlogs/lib/open_project/backlogs/patches/user_patch.rb
+++ b/modules/backlogs/lib/open_project/backlogs/patches/user_patch.rb
@@ -26,8 +26,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-require_dependency 'user'
-
module OpenProject::Backlogs::Patches::UserPatch
def self.included(base)
base.class_eval do
diff --git a/modules/backlogs/lib/open_project/backlogs/patches/version_patch.rb b/modules/backlogs/lib/open_project/backlogs/patches/version_patch.rb
index 282d56812ed..5a20c211d12 100644
--- a/modules/backlogs/lib/open_project/backlogs/patches/version_patch.rb
+++ b/modules/backlogs/lib/open_project/backlogs/patches/version_patch.rb
@@ -26,8 +26,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-require_dependency 'version'
-
module OpenProject::Backlogs::Patches::VersionPatch
def self.included(base)
base.class_eval do
diff --git a/modules/backlogs/lib/open_project/backlogs/patches/versions_controller_patch.rb b/modules/backlogs/lib/open_project/backlogs/patches/versions_controller_patch.rb
index 74f73d3d894..5deca2c950d 100644
--- a/modules/backlogs/lib/open_project/backlogs/patches/versions_controller_patch.rb
+++ b/modules/backlogs/lib/open_project/backlogs/patches/versions_controller_patch.rb
@@ -26,8 +26,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-require_dependency 'versions_controller'
-
module OpenProject::Backlogs::Patches::VersionsControllerPatch
def self.included(base)
base.class_eval do
diff --git a/modules/backlogs/lib/open_project/backlogs/patches/work_package_patch.rb b/modules/backlogs/lib/open_project/backlogs/patches/work_package_patch.rb
index 8e83e869091..974927d36ed 100644
--- a/modules/backlogs/lib/open_project/backlogs/patches/work_package_patch.rb
+++ b/modules/backlogs/lib/open_project/backlogs/patches/work_package_patch.rb
@@ -26,8 +26,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-require_dependency 'work_package'
-
module OpenProject::Backlogs::Patches::WorkPackagePatch
extend ActiveSupport::Concern
diff --git a/modules/bim/lib/open_project/bim/patches/journal_patch.rb b/modules/bim/lib/open_project/bim/patches/journal_patch.rb
index 4fe6bbd8e37..48a9d98b612 100644
--- a/modules/bim/lib/open_project/bim/patches/journal_patch.rb
+++ b/modules/bim/lib/open_project/bim/patches/journal_patch.rb
@@ -26,8 +26,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-require_dependency 'journal'
-
module OpenProject::Bim::Patches::JournalPatch
def self.included(base)
base.class_eval do
diff --git a/modules/bim/lib/open_project/bim/patches/project_patch.rb b/modules/bim/lib/open_project/bim/patches/project_patch.rb
index 853dee1f4d0..983e2635e01 100644
--- a/modules/bim/lib/open_project/bim/patches/project_patch.rb
+++ b/modules/bim/lib/open_project/bim/patches/project_patch.rb
@@ -26,8 +26,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-require_dependency 'work_package'
-
module OpenProject::Bim::Patches::ProjectPatch
def self.included(base)
base.class_eval do
diff --git a/modules/bim/lib/open_project/bim/patches/work_package_patch.rb b/modules/bim/lib/open_project/bim/patches/work_package_patch.rb
index d0b8f400062..1d7f2e262ba 100644
--- a/modules/bim/lib/open_project/bim/patches/work_package_patch.rb
+++ b/modules/bim/lib/open_project/bim/patches/work_package_patch.rb
@@ -26,8 +26,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-require_dependency 'work_package'
-
module OpenProject::Bim::Patches::WorkPackagePatch
def self.included(base)
base.class_eval do
diff --git a/modules/boards/app/models/boards/grid.rb b/modules/boards/app/models/boards/grid.rb
index 8a497f28358..0a7e88b1c54 100644
--- a/modules/boards/app/models/boards/grid.rb
+++ b/modules/boards/app/models/boards/grid.rb
@@ -28,8 +28,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-require_dependency 'grids/grid'
-
module Boards
class Grid < ::Grids::Grid
belongs_to :project
diff --git a/modules/documents/lib/open_project/documents/engine.rb b/modules/documents/lib/open_project/documents/engine.rb
index 7e0fde687ed..087fdb28972 100644
--- a/modules/documents/lib/open_project/documents/engine.rb
+++ b/modules/documents/lib/open_project/documents/engine.rb
@@ -75,11 +75,6 @@ module OpenProject::Documents
# Add documents to allowed search params
additional_permitted_attributes search: %i(documents)
- config.to_prepare do
- require_dependency 'document'
- require_dependency 'document_category'
-
- require_dependency 'open_project/documents/patches/textile_converter_patch'
- end
+ patch_with_namespace :OpenProject, :TextFormatting, :Formats, :Markdown, :TextileConverter
end
end
diff --git a/modules/overviews/lib/overviews/engine.rb b/modules/overviews/lib/overviews/engine.rb
index 7025b40115b..ffef67dd2fa 100644
--- a/modules/overviews/lib/overviews/engine.rb
+++ b/modules/overviews/lib/overviews/engine.rb
@@ -28,13 +28,7 @@ module Overviews
end
end
- initializer 'overviews.patches' do
- unless ::OpenProject::TextFormatting::Formats::Markdown::TextileConverter
- .included_modules
- .include?(Overviews::Patches::TextileConverterPatch)
- ::OpenProject::TextFormatting::Formats::Markdown::TextileConverter.include(Overviews::Patches::TextileConverterPatch)
- end
- end
+ patch_with_namespace :OpenProject, :TextFormatting, :Formats, :Markdown, :TextileConverter
initializer 'overviews.conversion' do
require Rails.root.join('config', 'constants', 'ar_to_api_conversions')
diff --git a/modules/reporting/app/models/cost_query/filter/status_id.rb b/modules/reporting/app/models/cost_query/filter/status_id.rb
index ab7d47b473c..a45d3b0e5d6 100644
--- a/modules/reporting/app/models/cost_query/filter/status_id.rb
+++ b/modules/reporting/app/models/cost_query/filter/status_id.rb
@@ -26,8 +26,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-# we have to require this here because the operators would not be defined otherwise
-require_dependency 'cost_query/operator'
class CostQuery::Filter::StatusId < Report::Filter::Base
available_operators 'c', 'o'
join_table WorkPackage, Status => [WorkPackage, :status]
diff --git a/modules/reporting/lib/open_project/reporting/engine.rb b/modules/reporting/lib/open_project/reporting/engine.rb
index c6dc4b7e8c0..58b91ea5c8c 100644
--- a/modules/reporting/lib/open_project/reporting/engine.rb
+++ b/modules/reporting/lib/open_project/reporting/engine.rb
@@ -95,14 +95,6 @@ module OpenProject::Reporting
require_relative 'patches/to_date_patch'
end
- config.to_prepare do
- require_dependency 'report/walker'
- require_dependency 'report/transformer'
- require_dependency 'widget/table/entry_table'
- require_dependency 'widget/settings_patch'
- require_dependency 'cost_query/group_by'
- end
-
patches %i[CustomFieldsController OpenProject::Configuration]
patch_with_namespace :BasicData, :RoleSeeder
patch_with_namespace :BasicData, :SettingSeeder
diff --git a/modules/reporting/lib/open_project/reporting/patches/custom_fields_controller_patch.rb b/modules/reporting/lib/open_project/reporting/patches/custom_fields_controller_patch.rb
index 6905348ab9d..eeec768be3f 100644
--- a/modules/reporting/lib/open_project/reporting/patches/custom_fields_controller_patch.rb
+++ b/modules/reporting/lib/open_project/reporting/patches/custom_fields_controller_patch.rb
@@ -26,8 +26,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-require_dependency 'costlog_controller'
-
module OpenProject::Reporting::Patches
module CustomFieldsControllerPatch
def self.included(base) # :nodoc:
diff --git a/modules/reporting/lib/open_project/reporting/patches/open_project/configuration_patch.rb b/modules/reporting/lib/open_project/reporting/patches/open_project/configuration_patch.rb
index 8c6de110b49..b5866227674 100644
--- a/modules/reporting/lib/open_project/reporting/patches/open_project/configuration_patch.rb
+++ b/modules/reporting/lib/open_project/reporting/patches/open_project/configuration_patch.rb
@@ -26,8 +26,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-require_dependency 'open_project/configuration'
-
module OpenProject::Reporting::Patches
module OpenProject::ConfigurationPatch
def self.included(base)
diff --git a/modules/reporting/lib/widget/filters.rb b/modules/reporting/lib/widget/filters.rb
index 7023a6049db..124b8adc3f5 100644
--- a/modules/reporting/lib/widget/filters.rb
+++ b/modules/reporting/lib/widget/filters.rb
@@ -26,7 +26,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-require_dependency 'widget/base'
class Widget::Filters < ::Widget::Base
def render
spacer = content_tag :li, '', class: 'advanced-filters--spacer hide-when-print'
diff --git a/modules/reporting/lib/widget/filters/date.rb b/modules/reporting/lib/widget/filters/date.rb
index 74735b11399..f93c18841f6 100644
--- a/modules/reporting/lib/widget/filters/date.rb
+++ b/modules/reporting/lib/widget/filters/date.rb
@@ -26,9 +26,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-# make sure to require Widget::Filters::Base first because otherwise
-# ruby might find Base within Widget and Rails will not load it
-require_dependency 'widget/filters/base'
class Widget::Filters::Date < Widget::Filters::Base
def render
@calendar_headers_tags_included = true
diff --git a/modules/reporting/lib/widget/filters/heavy.rb b/modules/reporting/lib/widget/filters/heavy.rb
index 37df0b918da..020fa5b037a 100644
--- a/modules/reporting/lib/widget/filters/heavy.rb
+++ b/modules/reporting/lib/widget/filters/heavy.rb
@@ -30,9 +30,6 @@
# The select-box. This way we allow our JS to pretend this is just another
# Filter. This is overhead...
# But well this is again one of those temporary solutions.
-# make sure to require Widget::Filters::Base first because otherwise
-# ruby might find Base within Widget and Rails will not load it
-require_dependency 'widget/filters/base'
class Widget::Filters::Heavy < Widget::Filters::Base
def render
# TODO: sometimes filter.values is of the form [["3"]] and somtimes ["3"].
diff --git a/modules/reporting/lib/widget/filters/label.rb b/modules/reporting/lib/widget/filters/label.rb
index 39711d52598..b9454e6528f 100644
--- a/modules/reporting/lib/widget/filters/label.rb
+++ b/modules/reporting/lib/widget/filters/label.rb
@@ -26,9 +26,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-# make sure to require Widget::Filters::Base first because otherwise
-# ruby might find Base within Widget and Rails will not load it
-require_dependency 'widget/filters/base'
class Widget::Filters::Label < Widget::Filters::Base
def render
options = {
diff --git a/modules/reporting/lib/widget/filters/multi_choice.rb b/modules/reporting/lib/widget/filters/multi_choice.rb
index d353fa13bb1..691bf4e6e0a 100644
--- a/modules/reporting/lib/widget/filters/multi_choice.rb
+++ b/modules/reporting/lib/widget/filters/multi_choice.rb
@@ -26,9 +26,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-# make sure to require Widget::Filters::Base first because otherwise
-# ruby might find Base within Widget and Rails will not load it
-require_dependency 'widget/filters/base'
class Widget::Filters::MultiChoice < Widget::Filters::Base
def render
filterName = filter_class.underscore_name
diff --git a/modules/reporting/lib/widget/filters/multi_values.rb b/modules/reporting/lib/widget/filters/multi_values.rb
index 90469cc6b08..0828c964c64 100644
--- a/modules/reporting/lib/widget/filters/multi_values.rb
+++ b/modules/reporting/lib/widget/filters/multi_values.rb
@@ -26,9 +26,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-# make sure to require Widget::Filters::Base first because otherwise
-# ruby might find Base within Widget and Rails will not load it
-require_dependency 'widget/filters/base'
class Widget::Filters::MultiValues < Widget::Filters::Base
def render
write(content_tag(:div, id: "#{filter_class.underscore_name}_arg_1", class: 'advanced-filters--filter-value') do
diff --git a/modules/reporting/lib/widget/filters/operators.rb b/modules/reporting/lib/widget/filters/operators.rb
index 3b46d0519ad..65e26d1195f 100644
--- a/modules/reporting/lib/widget/filters/operators.rb
+++ b/modules/reporting/lib/widget/filters/operators.rb
@@ -26,9 +26,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-# make sure to require Widget::Filters::Base first because otherwise
-# ruby might find Base within Widget and Rails will not load it
-require_dependency 'widget/filters/base'
class Widget::Filters::Operators < Widget::Filters::Base
def render
write(content_tag(:div, class: 'advanced-filters--filter-operator') do
diff --git a/modules/reporting/lib/widget/filters/option.rb b/modules/reporting/lib/widget/filters/option.rb
index 0f981125df7..143539c3da8 100644
--- a/modules/reporting/lib/widget/filters/option.rb
+++ b/modules/reporting/lib/widget/filters/option.rb
@@ -30,9 +30,6 @@
# Accepts option :content, which expects an enumerable of [name, id, *args]
# as it would appear in a filters available values. If given, it renders the
# option-tags from the content array instead of the filters available values.
-# make sure to require Widget::Filters::Base first because otherwise
-# ruby might find Base within Widget and Rails will not load it
-require_dependency 'widget/filters/base'
class Widget::Filters::Option < Widget::Filters::Base
def render
first = true
diff --git a/modules/reporting/lib/widget/filters/remove_button.rb b/modules/reporting/lib/widget/filters/remove_button.rb
index c4f36743b5b..f43852bca06 100644
--- a/modules/reporting/lib/widget/filters/remove_button.rb
+++ b/modules/reporting/lib/widget/filters/remove_button.rb
@@ -26,9 +26,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-# make sure to require Widget::Filters::Base first because otherwise
-# ruby might find Base within Widget and Rails will not load it
-require_dependency 'widget/filters/base'
class Widget::Filters::RemoveButton < Widget::Filters::Base
def render
hidden_field = tag :input, id: "rm_#{filter_class.underscore_name}",
diff --git a/modules/reporting/lib/widget/filters/text_box.rb b/modules/reporting/lib/widget/filters/text_box.rb
index d679803314d..4cf529c9acb 100644
--- a/modules/reporting/lib/widget/filters/text_box.rb
+++ b/modules/reporting/lib/widget/filters/text_box.rb
@@ -26,9 +26,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-# make sure to require Widget::Filters::Base first because otherwise
-# ruby might find Base within Widget and Rails will not load it
-require_dependency 'widget/filters/base'
class Widget::Filters::TextBox < Widget::Filters::Base
def render
label = content_tag :label,
diff --git a/modules/reporting/lib/widget/reporting_widget.rb b/modules/reporting/lib/widget/reporting_widget.rb
index 9634ebf5a5d..b3b5745d458 100644
--- a/modules/reporting/lib/widget/reporting_widget.rb
+++ b/modules/reporting/lib/widget/reporting_widget.rb
@@ -26,8 +26,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-require_dependency 'reporting_helper'
-
class Widget::ReportingWidget < ActionView::Base
include ActionView::Helpers::TagHelper
include ActionView::Helpers::AssetTagHelper
diff --git a/modules/reporting/lib/widget/settings_patch.rb b/modules/reporting/lib/widget/settings_patch.rb
index d4b759341cf..52d3cdd1147 100644
--- a/modules/reporting/lib/widget/settings_patch.rb
+++ b/modules/reporting/lib/widget/settings_patch.rb
@@ -26,9 +26,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-# explicitly require what will be patched to be loaded from the ReportingEngine
-require_dependency 'widget/settings'
-
module Widget::SettingsPatch
extend ActiveSupport::Concern
diff --git a/modules/two_factor_authentication/app/models/two_factor_authentication/backup_code.rb b/modules/two_factor_authentication/app/models/two_factor_authentication/backup_code.rb
index ea8d46773e3..40a0b7805a8 100644
--- a/modules/two_factor_authentication/app/models/two_factor_authentication/backup_code.rb
+++ b/modules/two_factor_authentication/app/models/two_factor_authentication/backup_code.rb
@@ -1,4 +1,3 @@
-require_dependency 'token/hashed_token'
module TwoFactorAuthentication
class BackupCode < ::Token::HashedToken
diff --git a/modules/two_factor_authentication/app/models/two_factor_authentication/device/sms.rb b/modules/two_factor_authentication/app/models/two_factor_authentication/device/sms.rb
index 1794de03dc0..7f312f882d0 100644
--- a/modules/two_factor_authentication/app/models/two_factor_authentication/device/sms.rb
+++ b/modules/two_factor_authentication/app/models/two_factor_authentication/device/sms.rb
@@ -1,4 +1,3 @@
-require_dependency 'two_factor_authentication/device'
module TwoFactorAuthentication
class Device::Sms < Device
diff --git a/modules/two_factor_authentication/app/models/two_factor_authentication/device/totp.rb b/modules/two_factor_authentication/app/models/two_factor_authentication/device/totp.rb
index 67259a948a4..e6716994ddd 100644
--- a/modules/two_factor_authentication/app/models/two_factor_authentication/device/totp.rb
+++ b/modules/two_factor_authentication/app/models/two_factor_authentication/device/totp.rb
@@ -1,5 +1,4 @@
require 'rotp'
-require_dependency 'two_factor_authentication/device'
module TwoFactorAuthentication
class Device::Totp < Device
diff --git a/modules/two_factor_authentication/app/models/two_factor_authentication/login_token.rb b/modules/two_factor_authentication/app/models/two_factor_authentication/login_token.rb
index 07f54a74bcb..846376fe21e 100644
--- a/modules/two_factor_authentication/app/models/two_factor_authentication/login_token.rb
+++ b/modules/two_factor_authentication/app/models/two_factor_authentication/login_token.rb
@@ -1,6 +1,3 @@
-require_dependency 'token/hashed_token'
-require_dependency 'token/expirable_token'
-
module TwoFactorAuthentication
class LoginToken < ::Token::HashedToken
include ::Token::ExpirableToken
diff --git a/modules/two_factor_authentication/app/models/two_factor_authentication/remembered_auth_token.rb b/modules/two_factor_authentication/app/models/two_factor_authentication/remembered_auth_token.rb
index e915d61f441..09f8c3b9f60 100644
--- a/modules/two_factor_authentication/app/models/two_factor_authentication/remembered_auth_token.rb
+++ b/modules/two_factor_authentication/app/models/two_factor_authentication/remembered_auth_token.rb
@@ -1,6 +1,3 @@
-require_dependency 'token/hashed_token'
-require_dependency 'token/expirable_token'
-
module TwoFactorAuthentication
class RememberedAuthToken < ::Token::HashedToken
include ::Token::ExpirableToken