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

Fix super calls in component #initialize methods

Alexander Brandon Coles65dc1dd2fe05
diff --git a/app/components/application_component.rb b/app/components/application_component.rb
index 077111d26f2..11b42b21220 100644
--- a/app/components/application_component.rb
+++ b/app/components/application_component.rb
@@ -32,7 +32,7 @@ class ApplicationComponent < ViewComponent::Base
attr_reader :model, :options
def initialize(model = nil, **options)
- super
+ super()
@model = model if model
@options = options
end
diff --git a/app/components/mailer/label_component.rb b/app/components/mailer/label_component.rb
index 14ac26f9e4a..38a8a853344 100644
--- a/app/components/mailer/label_component.rb
+++ b/app/components/mailer/label_component.rb
@@ -46,7 +46,7 @@ module Mailer
include MailLayoutHelper
def initialize(scheme:, text:)
- super
+ super()
@color = LABEL_SCHEME_COLORS[scheme]
@text = text
diff --git a/app/components/op_primer/email_updates_mode_selector_component.rb b/app/components/op_primer/email_updates_mode_selector_component.rb
index d408a5fc5f6..ba9ef59f64a 100644
--- a/app/components/op_primer/email_updates_mode_selector_component.rb
+++ b/app/components/op_primer/email_updates_mode_selector_component.rb
@@ -35,7 +35,7 @@ module OpPrimer
def initialize(enabled:, path:, title:, enabled_description:, disabled_description:, alt_text: nil, show_button: true,
method: :get)
- super
+ super()
if !show_button && alt_text.blank?
raise NotImplementedError, "alt_text must be provided when the button is shown conditionally"
diff --git a/app/components/open_project/common/attribute_component.rb b/app/components/open_project/common/attribute_component.rb
index 61a90ed195d..4bb31884475 100644
--- a/app/components/open_project/common/attribute_component.rb
+++ b/app/components/open_project/common/attribute_component.rb
@@ -42,7 +42,7 @@ module OpenProject
PARAGRAPH_CSS_CLASS = "op-uc-p"
def initialize(id, name, description, lines: 1, background_reference_id: "content", formatted: false, **args)
- super
+ super()
@id = id
@name = name
@description = description
diff --git a/app/components/open_project/common/duration_component.rb b/app/components/open_project/common/duration_component.rb
index c2a3dbd1d7c..df81429e11d 100644
--- a/app/components/open_project/common/duration_component.rb
+++ b/app/components/open_project/common/duration_component.rb
@@ -35,7 +35,7 @@ module OpenProject
attr_reader :duration, :abbreviated, :separator
def initialize(duration, type = :seconds, separator: ", ", abbreviated: false, **args)
- super
+ super()
@duration = parse_duration(duration, type)
@abbreviated = abbreviated
diff --git a/app/components/shares/project_queries/project_access_warning_component.rb b/app/components/shares/project_queries/project_access_warning_component.rb
index b69928792fa..6a76aa7823c 100644
--- a/app/components/shares/project_queries/project_access_warning_component.rb
+++ b/app/components/shares/project_queries/project_access_warning_component.rb
@@ -34,7 +34,7 @@ module Shares
include OpPrimer::ComponentHelpers
def initialize(strategy:, modal_body_container:)
- super
+ super()
@strategy = strategy
@container = modal_body_container
diff --git a/modules/storages/app/components/storages/open_project_storage_modal_component.rb b/modules/storages/app/components/storages/open_project_storage_modal_component.rb
index 195680d2b0e..70266653e56 100644
--- a/modules/storages/app/components/storages/open_project_storage_modal_component.rb
+++ b/modules/storages/app/components/storages/open_project_storage_modal_component.rb
@@ -32,7 +32,7 @@ class Storages::OpenProjectStorageModalComponent < ViewComponent::Base
attr_reader :controller, :project_storage_open_url, :redirect_url, :state
def initialize(project_storage_open_url:, redirect_url:, state:, **options)
- super
+ super()
@controller = "storages--open-project-storage-modal"
@project_storage_open_url = project_storage_open_url
@redirect_url = redirect_url