mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-31 19:47:14 +00:00
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:
parent
2b00670e4d
commit
fe71cb5bbe
@ -126,10 +126,13 @@ end
|
|||||||
|
|
||||||
class QueryCustomFieldColumn < QueryColumn
|
class QueryCustomFieldColumn < QueryColumn
|
||||||
def initialize(custom_field, options={})
|
def initialize(custom_field, options={})
|
||||||
self.name = "cf_#{custom_field.id}".to_sym
|
name = "cf_#{custom_field.id}".to_sym
|
||||||
self.sortable = custom_field.order_statement || false
|
super(
|
||||||
self.totalable = options.key?(:totalable) ? !!options[:totalable] : custom_field.totalable?
|
name,
|
||||||
@inline = custom_field.full_width_layout? ? false : true
|
: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
|
@cf = custom_field
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -25,6 +25,7 @@ module Redmine
|
|||||||
# Initialize with a Diff file and the type of Diff View
|
# Initialize with a Diff file and the type of Diff View
|
||||||
# The type view must be inline or sbs (side_by_side)
|
# The type view must be inline or sbs (side_by_side)
|
||||||
def initialize(type="inline", style=nil)
|
def initialize(type="inline", style=nil)
|
||||||
|
super()
|
||||||
@parsing = false
|
@parsing = false
|
||||||
@added = 0
|
@added = 0
|
||||||
@removed = 0
|
@removed = 0
|
||||||
|
|||||||
@ -75,6 +75,7 @@ module Redmine
|
|||||||
@login = login if login && !login.empty?
|
@login = login if login && !login.empty?
|
||||||
@password = (password || "") if @login
|
@password = (password || "") if @login
|
||||||
@root_url = root_url.blank? ? retrieve_root_url : root_url
|
@root_url = root_url.blank? ? retrieve_root_url : root_url
|
||||||
|
@path_encoding = path_encoding.presence || 'UTF-8'
|
||||||
end
|
end
|
||||||
|
|
||||||
def adapter_name
|
def adapter_name
|
||||||
|
|||||||
@ -56,10 +56,7 @@ module Redmine
|
|||||||
end
|
end
|
||||||
|
|
||||||
def initialize(url, root_url=nil, login=nil, password=nil, path_encoding=nil)
|
def initialize(url, root_url=nil, login=nil, password=nil, path_encoding=nil)
|
||||||
@url = url
|
super(url, url, nil, nil, 'UTF-8')
|
||||||
@root_url = url
|
|
||||||
@path_encoding = 'UTF-8'
|
|
||||||
# do not call *super* for non ASCII repository path
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def bzr_path_encodig=(encoding)
|
def bzr_path_encodig=(encoding)
|
||||||
|
|||||||
@ -63,16 +63,10 @@ module Redmine
|
|||||||
# password -> unnecessary too
|
# password -> unnecessary too
|
||||||
def initialize(url, root_url=nil, login=nil, password=nil,
|
def initialize(url, root_url=nil, login=nil, password=nil,
|
||||||
path_encoding=nil)
|
path_encoding=nil)
|
||||||
@path_encoding = path_encoding.presence || 'UTF-8'
|
|
||||||
@url = url
|
|
||||||
# TODO: better Exception here (IllegalArgumentException)
|
# TODO: better Exception here (IllegalArgumentException)
|
||||||
raise CommandFailed if root_url.blank?
|
raise CommandFailed if root_url.blank?
|
||||||
|
|
||||||
@root_url = root_url
|
super
|
||||||
|
|
||||||
# These are unused.
|
|
||||||
@login = login if login && !login.empty?
|
|
||||||
@password = (password || "") if @login
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def path_encoding
|
def path_encoding
|
||||||
|
|||||||
@ -35,8 +35,7 @@ module Redmine
|
|||||||
|
|
||||||
def initialize(url, root_url=nil, login=nil, password=nil,
|
def initialize(url, root_url=nil, login=nil, password=nil,
|
||||||
path_encoding=nil)
|
path_encoding=nil)
|
||||||
@url = with_trailing_slash(url)
|
super(with_trailing_slash(url), nil, nil, nil, path_encoding)
|
||||||
@path_encoding = path_encoding.blank? ? 'UTF-8' : path_encoding
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def path_encoding
|
def path_encoding
|
||||||
|
|||||||
@ -62,11 +62,6 @@ module Redmine
|
|||||||
end
|
end
|
||||||
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
|
def path_encoding
|
||||||
@path_encoding
|
@path_encoding
|
||||||
end
|
end
|
||||||
|
|||||||
@ -76,11 +76,6 @@ module Redmine
|
|||||||
end
|
end
|
||||||
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
|
def path_encoding
|
||||||
@path_encoding
|
@path_encoding
|
||||||
end
|
end
|
||||||
|
|||||||
@ -68,6 +68,7 @@ module Redmine
|
|||||||
# Syntax highlighting is completed within each line.
|
# Syntax highlighting is completed within each line.
|
||||||
class CustomHTMLLinewise < ::Rouge::Formatter
|
class CustomHTMLLinewise < ::Rouge::Formatter
|
||||||
def initialize(formatter)
|
def initialize(formatter)
|
||||||
|
super()
|
||||||
@formatter = formatter
|
@formatter = formatter
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -21,6 +21,7 @@ module Redmine
|
|||||||
module Twofa
|
module Twofa
|
||||||
class Base
|
class Base
|
||||||
def self.inherited(child)
|
def self.inherited(child)
|
||||||
|
super
|
||||||
# require-ing a Base subclass will register it as a 2FA scheme
|
# require-ing a Base subclass will register it as a 2FA scheme
|
||||||
Redmine::Twofa.register_scheme(scheme_name(child), child)
|
Redmine::Twofa.register_scheme(scheme_name(child), child)
|
||||||
end
|
end
|
||||||
|
|||||||
@ -23,6 +23,7 @@ module Redmine
|
|||||||
attr_reader :diff_type, :diff_style
|
attr_reader :diff_type, :diff_style
|
||||||
|
|
||||||
def initialize(diff, options={})
|
def initialize(diff, options={})
|
||||||
|
super()
|
||||||
options.assert_valid_keys(:type, :style, :max_lines)
|
options.assert_valid_keys(:type, :style, :max_lines)
|
||||||
diff = diff.split("\n") if diff.is_a?(String)
|
diff = diff.split("\n") if diff.is_a?(String)
|
||||||
@diff_type = options[:type] || 'inline'
|
@diff_type = options[:type] || 'inline'
|
||||||
|
|||||||
@ -41,7 +41,7 @@ module Redmine
|
|||||||
|
|
||||||
class WikiTags < ::Loofah::Scrubber
|
class WikiTags < ::Loofah::Scrubber
|
||||||
def initialize(tags_to_text)
|
def initialize(tags_to_text)
|
||||||
@direction = :bottom_up
|
super(:direction => :bottom_up)
|
||||||
@tags_to_text = tags_to_text || {}
|
@tags_to_text = tags_to_text || {}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user