Fix RuboCop offense Lint/MissingSuper (#36919).

git-svn-id: https://svn.redmine.org/redmine/trunk@22147 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2023-03-24 09:34:40 +00:00
parent 2b00670e4d
commit fe71cb5bbe
12 changed files with 16 additions and 28 deletions

View File

@@ -126,10 +126,13 @@ end
class QueryCustomFieldColumn < QueryColumn
def initialize(custom_field, options={})
self.name = "cf_#{custom_field.id}".to_sym
self.sortable = custom_field.order_statement || false
self.totalable = options.key?(:totalable) ? !!options[:totalable] : custom_field.totalable?
@inline = custom_field.full_width_layout? ? false : true
name = "cf_#{custom_field.id}".to_sym
super(
name,
:sortable => custom_field.order_statement || false,
:totalable => options.key?(:totalable) ? !!options[:totalable] : custom_field.totalable?,
:inline => custom_field.full_width_layout? ? false : true
)
@cf = custom_field
end

View File

@@ -25,6 +25,7 @@ module Redmine
# Initialize with a Diff file and the type of Diff View
# The type view must be inline or sbs (side_by_side)
def initialize(type="inline", style=nil)
super()
@parsing = false
@added = 0
@removed = 0

View File

@@ -75,6 +75,7 @@ module Redmine
@login = login if login && !login.empty?
@password = (password || "") if @login
@root_url = root_url.blank? ? retrieve_root_url : root_url
@path_encoding = path_encoding.presence || 'UTF-8'
end
def adapter_name

View File

@@ -56,10 +56,7 @@ module Redmine
end
def initialize(url, root_url=nil, login=nil, password=nil, path_encoding=nil)
@url = url
@root_url = url
@path_encoding = 'UTF-8'
# do not call *super* for non ASCII repository path
super(url, url, nil, nil, 'UTF-8')
end
def bzr_path_encodig=(encoding)

View File

@@ -63,16 +63,10 @@ module Redmine
# password -> unnecessary too
def initialize(url, root_url=nil, login=nil, password=nil,
path_encoding=nil)
@path_encoding = path_encoding.presence || 'UTF-8'
@url = url
# TODO: better Exception here (IllegalArgumentException)
raise CommandFailed if root_url.blank?
@root_url = root_url
# These are unused.
@login = login if login && !login.empty?
@password = (password || "") if @login
super
end
def path_encoding

View File

@@ -35,8 +35,7 @@ module Redmine
def initialize(url, root_url=nil, login=nil, password=nil,
path_encoding=nil)
@url = with_trailing_slash(url)
@path_encoding = path_encoding.blank? ? 'UTF-8' : path_encoding
super(with_trailing_slash(url), nil, nil, nil, path_encoding)
end
def path_encoding

View File

@@ -62,11 +62,6 @@ module Redmine
end
end
def initialize(url, root_url=nil, login=nil, password=nil, path_encoding=nil)
super
@path_encoding = path_encoding.blank? ? 'UTF-8' : path_encoding
end
def path_encoding
@path_encoding
end

View File

@@ -76,11 +76,6 @@ module Redmine
end
end
def initialize(url, root_url=nil, login=nil, password=nil, path_encoding=nil)
super
@path_encoding = path_encoding.blank? ? 'UTF-8' : path_encoding
end
def path_encoding
@path_encoding
end

View File

@@ -68,6 +68,7 @@ module Redmine
# Syntax highlighting is completed within each line.
class CustomHTMLLinewise < ::Rouge::Formatter
def initialize(formatter)
super()
@formatter = formatter
end

View File

@@ -21,6 +21,7 @@ module Redmine
module Twofa
class Base
def self.inherited(child)
super
# require-ing a Base subclass will register it as a 2FA scheme
Redmine::Twofa.register_scheme(scheme_name(child), child)
end

View File

@@ -23,6 +23,7 @@ module Redmine
attr_reader :diff_type, :diff_style
def initialize(diff, options={})
super()
options.assert_valid_keys(:type, :style, :max_lines)
diff = diff.split("\n") if diff.is_a?(String)
@diff_type = options[:type] || 'inline'

View File

@@ -41,7 +41,7 @@ module Redmine
class WikiTags < ::Loofah::Scrubber
def initialize(tags_to_text)
@direction = :bottom_up
super(:direction => :bottom_up)
@tags_to_text = tags_to_text || {}
end