Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package rubygem-rubocop for openSUSE:Factory
checked in at 2023-11-01 22:10:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-rubocop (Old)
and /work/SRC/openSUSE:Factory/.rubygem-rubocop.new.17445 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-rubocop"
Wed Nov 1 22:10:29 2023 rev:49 rq:1121572 version:1.57.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-rubocop/rubygem-rubocop.changes
2023-10-17 20:24:53.499057916 +0200
+++
/work/SRC/openSUSE:Factory/.rubygem-rubocop.new.17445/rubygem-rubocop.changes
2023-11-01 22:11:11.558361659 +0100
@@ -1,0 +2,25 @@
+Wed Nov 1 07:55:15 UTC 2023 - Mykola Krachkovsky <[email protected]>
+
+- updated to version 1.57.2
+
+ ## 1.57.2 (2023-10-26)
+
+ ### Bug fixes
+
+ * [#12274](https://github.com/rubocop/rubocop/issues/12274): Fix a false
positive for `Lint/Void` when `each`'s receiver is an object of `Enumerator` to
which `filter` has been applied. ([@koic][])
+ * [#12291](https://github.com/rubocop/rubocop/issues/12291): Fix a false
positive for `Metrics/ClassLength` when a class with a singleton class
definition. ([@koic][])
+ * [#12293](https://github.com/rubocop/rubocop/issues/12293): Fix a false
positive for `Style/RedundantDoubleSplatHashBraces` when using double splat
hash braces with `merge` and method chain. ([@koic][])
+ * [#12298](https://github.com/rubocop/rubocop/issues/12298): Fix a false
positive for `Style/RedundantParentheses` when using a parenthesized hash
literal as the first argument in a method call without parentheses. ([@koic][])
+ * [#12283](https://github.com/rubocop/rubocop/pull/12283): Fix an error for
`Style/SingleLineDoEndBlock` when using single line `do`...`end` with no body.
([@koic][])
+ * [#12312](https://github.com/rubocop/rubocop/issues/12312): Fix an
incorrect autocorrect for `Style/HashSyntax` when braced hash key and value are
the same and it is used in `if`...`else`. ([@koic][])
+ * [#12307](https://github.com/rubocop/rubocop/issues/12307): Fix an infinite
loop error for `Layout/EndAlignment` when `EnforcedStyleAlignWith: variable`
and using a conditional statement in a method argument on the same line and
`end` with method call is not aligned. ([@koic][])
+ * [#11652](https://github.com/rubocop/rubocop/issues/11652): Make
`--auto-gen-config` generate `inherit_from` correctly inside ERB `if`.
([@jonas054][])
+ * [#12310](https://github.com/rubocop/rubocop/issues/12310): Drop `base64`
gem from runtime dependency. ([@koic][])
+ * [#12300](https://github.com/rubocop/rubocop/issues/12300): Fix an error
for `Style/IdenticalConditionalBranches` when `if`...`else` with identical
leading lines and using index assign. ([@koic][])
+ * [#12286](https://github.com/rubocop/rubocop/issues/12286): Fix false
positives for `Style/RedundantDoubleSplatHashBraces` when using double splat
with a hash literal enclosed in parenthesized ternary operator. ([@koic][])
+ * [#12279](https://github.com/rubocop/rubocop/issues/12279): Fix false
positives for `Lint/EmptyConditionalBody` when missing 2nd `if` body with a
comment. ([@koic][])
+ * [#12275](https://github.com/rubocop/rubocop/issues/12275): Fix a false
positive for `Style/RedundantDoubleSplatHashBraces` when using double splat
within block argument containing a hash literal in an array literal. ([@koic][])
+ * [#12284](https://github.com/rubocop/rubocop/issues/12284): Fix false
positives for `Style/SingleArgumentDig` when using some anonymous argument
syntax. ([@koic][])
+ * [#12301](https://github.com/rubocop/rubocop/issues/12301): Make
`Style/RedundantFilterChain` aware of safe navigation operator. ([@koic][])
+
+-------------------------------------------------------------------
Old:
----
rubocop-1.57.1.gem
New:
----
rubocop-1.57.2.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-rubocop.spec ++++++
--- /var/tmp/diff_new_pack.oTbSPS/_old 2023-11-01 22:11:12.074380775 +0100
+++ /var/tmp/diff_new_pack.oTbSPS/_new 2023-11-01 22:11:12.074380775 +0100
@@ -24,7 +24,7 @@
#
Name: rubygem-rubocop
-Version: 1.57.1
+Version: 1.57.2
Release: 0
%define mod_name rubocop
%define mod_full_name %{mod_name}-%{version}
++++++ rubocop-1.57.1.gem -> rubocop-1.57.2.gem ++++++
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/rubocop/cli/command/auto_generate_config.rb
new/lib/rubocop/cli/command/auto_generate_config.rb
--- old/lib/rubocop/cli/command/auto_generate_config.rb 2023-10-13
09:36:04.000000000 +0200
+++ new/lib/rubocop/cli/command/auto_generate_config.rb 2023-10-26
11:45:40.000000000 +0200
@@ -10,6 +10,7 @@
AUTO_GENERATED_FILE = '.rubocop_todo.yml'
YAML_OPTIONAL_DOC_START = /\A---(\s+#|\s*\z)/.freeze
+ PLACEHOLDER = '###rubocop:inherit_here'
PHASE_1 = 'Phase 1 of 2: run Layout/LineLength cop'
PHASE_2 = 'Phase 2 of 2: run all cops'
@@ -125,15 +126,19 @@
def existing_configuration(config_file)
File.read(config_file, encoding: Encoding::UTF_8)
- .sub(/^inherit_from: *[^\n]+/, '')
- .sub(/^inherit_from: *(\n *- *[^\n]+)+/, '')
+ .sub(/^inherit_from: *[^\n]+/, PLACEHOLDER)
+ .sub(/^inherit_from: *(\n *- *[^\n]+)+/, PLACEHOLDER)
end
def write_config_file(file_name, file_string, rubocop_yml_contents)
lines = /\S/.match?(rubocop_yml_contents) ?
rubocop_yml_contents.split("\n", -1) : []
- doc_start_index = lines.index { |line|
YAML_OPTIONAL_DOC_START.match?(line) } || -1
- lines.insert(doc_start_index + 1, "inherit_from:#{file_string}\n")
- File.write(file_name, lines.join("\n"))
+ unless rubocop_yml_contents&.include?(PLACEHOLDER)
+ doc_start_index = lines.index { |line|
YAML_OPTIONAL_DOC_START.match?(line) } || -1
+ lines.insert(doc_start_index + 1, PLACEHOLDER)
+ end
+ File.write(file_name, lines.join("\n")
+ .sub(/#{PLACEHOLDER}\n*/o,
"inherit_from:#{file_string}\n\n")
+ .sub(/\n\n+\Z/, "\n"))
end
def relative_path_to_todo_from_options_config
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/rubocop/cop/layout/end_alignment.rb
new/lib/rubocop/cop/layout/end_alignment.rb
--- old/lib/rubocop/cop/layout/end_alignment.rb 2023-10-13 09:36:04.000000000
+0200
+++ new/lib/rubocop/cop/layout/end_alignment.rb 2023-10-26 11:45:40.000000000
+0200
@@ -163,7 +163,13 @@
when :keyword
node
when :variable
- alignment_node_for_variable_style(node)
+ align_to = alignment_node_for_variable_style(node)
+
+ while (parent = align_to.parent) && parent.send_type? &&
same_line?(align_to, parent)
+ align_to = parent
+ end
+
+ align_to
else
start_line_range(node)
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/rubocop/cop/lint/void.rb
new/lib/rubocop/cop/lint/void.rb
--- old/lib/rubocop/cop/lint/void.rb 2023-10-13 09:36:04.000000000 +0200
+++ new/lib/rubocop/cop/lint/void.rb 2023-10-26 11:45:40.000000000 +0200
@@ -6,6 +6,16 @@
# Checks for operators, variables, literals, lambda, proc and nonmutating
# methods used in void context.
#
+ # `each` blocks are allowed to prevent false positives.
+ # For example, the expression inside the `each` block below.
+ # It's not void, especially when the receiver is an `Enumerator`:
+ #
+ # [source,ruby]
+ # ----
+ # enumerator = [1, 2, 3].filter
+ # enumerator.each { |item| item >= 2 } #=> [2, 3]
+ # ----
+ #
# @example CheckForMethodsWithNoSideEffects: false (default)
# # bad
# def some_method
@@ -47,6 +57,7 @@
OP_MSG = 'Operator `%<op>s` used in void context.'
VAR_MSG = 'Variable `%<var>s` used in void context.'
+ CONST_MSG = 'Constant `%<var>s` used in void context.'
LIT_MSG = 'Literal `%<lit>s` used in void context.'
SELF_MSG = '`self` used in void context.'
EXPRESSION_MSG = '`%<expression>s` used in void context.'
@@ -72,6 +83,7 @@
return unless node.body && !node.body.begin_type?
return unless in_void_context?(node.body)
+ check_void_op(node.body) { node.method?(:each) }
check_expression(node.body)
end
@@ -87,11 +99,13 @@
def check_begin(node)
expressions = *node
expressions.pop unless in_void_context?(node)
- expressions.each { |expr| check_expression(expr) }
+ expressions.each do |expr|
+ check_void_op(expr)
+ check_expression(expr)
+ end
end
def check_expression(expr)
- check_void_op(expr)
check_literal(expr)
check_var(expr)
check_self(expr)
@@ -101,8 +115,9 @@
check_nonmutating(expr)
end
- def check_void_op(node)
+ def check_void_op(node, &block)
return unless node.send_type? && OPERATORS.include?(node.method_name)
+ return if block && yield(node)
add_offense(node.loc.selector,
message: format(OP_MSG, op: node.method_name)) do
|corrector|
@@ -113,15 +128,18 @@
def check_var(node)
return unless node.variable? || node.const_type?
- if node.const_type? && node.special_keyword?
- add_offense(node, message: format(VAR_MSG, var: node.source)) do
|corrector|
- autocorrect_void_expression(corrector, node)
- end
+ if node.const_type?
+ template = node.special_keyword? ? VAR_MSG : CONST_MSG
+
+ offense_range = node
+ message = format(template, var: node.source)
else
- add_offense(node.loc.name,
- message: format(VAR_MSG, var: node.loc.name.source))
do |corrector|
- autocorrect_void_expression(corrector, node)
- end
+ offense_range = node.loc.name
+ message = format(VAR_MSG, var: node.loc.name.source)
+ end
+
+ add_offense(offense_range, message: message) do |corrector|
+ autocorrect_void_expression(corrector, node)
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/rubocop/cop/metrics/class_length.rb
new/lib/rubocop/cop/metrics/class_length.rb
--- old/lib/rubocop/cop/metrics/class_length.rb 2023-10-13 09:36:04.000000000
+0200
+++ new/lib/rubocop/cop/metrics/class_length.rb 2023-10-26 11:45:40.000000000
+0200
@@ -42,7 +42,12 @@
def on_class(node)
check_code_length(node)
end
- alias on_sclass on_class
+
+ def on_sclass(node)
+ return if node.each_ancestor(:class).any?
+
+ on_class(node)
+ end
def on_casgn(node)
parent = node.parent
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/rubocop/cop/mixin/comments_help.rb
new/lib/rubocop/cop/mixin/comments_help.rb
--- old/lib/rubocop/cop/mixin/comments_help.rb 2023-10-13 09:36:04.000000000
+0200
+++ new/lib/rubocop/cop/mixin/comments_help.rb 2023-10-26 11:45:40.000000000
+0200
@@ -62,25 +62,29 @@
# Returns the end line of a node, which might be a comment and not part
of the AST
# End line is considered either the line at which another node starts, or
# the line at which the parent node ends.
- # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity,
Metrics/MethodLength, Metrics/PerceivedComplexity, Lint/DuplicateBranch
+ # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity,
Metrics/MethodLength, Metrics/PerceivedComplexity
def find_end_line(node)
- if node.if_type? && node.else?
- node.loc.else.line
- elsif node.if_type? && node.ternary?
- node.else_branch.loc.line
- elsif node.if_type? && node.elsif?
- node.each_ancestor(:if).find(&:if?).loc.end.line
+ if node.if_type?
+ if node.else?
+ node.loc.else.line
+ elsif node.ternary?
+ node.else_branch.loc.line
+ elsif node.elsif?
+ node.each_ancestor(:if).find(&:if?).loc.end.line
+ end
elsif node.block_type? || node.numblock_type?
node.loc.end.line
elsif (next_sibling = node.right_sibling) &&
next_sibling.is_a?(AST::Node)
next_sibling.loc.line
elsif (parent = node.parent)
- parent.loc.respond_to?(:end) && parent.loc.end ? parent.loc.end.line
: parent.loc.line
- else
- node.loc.end.line
- end
+ if parent.loc.respond_to?(:end) && parent.loc.end
+ parent.loc.end.line
+ else
+ parent.loc.line
+ end
+ end || node.loc.end.line
end
- # rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity,
Metrics/MethodLength, Metrics/PerceivedComplexity, Lint/DuplicateBranch
+ # rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity,
Metrics/MethodLength, Metrics/PerceivedComplexity
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/rubocop/cop/mixin/hash_shorthand_syntax.rb
new/lib/rubocop/cop/mixin/hash_shorthand_syntax.rb
--- old/lib/rubocop/cop/mixin/hash_shorthand_syntax.rb 2023-10-13
09:36:04.000000000 +0200
+++ new/lib/rubocop/cop/mixin/hash_shorthand_syntax.rb 2023-10-26
11:45:40.000000000 +0200
@@ -48,18 +48,21 @@
def register_offense(node, message, replacement) # rubocop:disable
Metrics/AbcSize
add_offense(node.value, message: message) do |corrector|
- if (def_node = def_node_that_require_parentheses(node))
- last_argument = def_node.last_argument
- if last_argument.nil? || !last_argument.hash_type?
- next corrector.replace(node, replacement)
- end
-
- white_spaces = range_between(def_node.selector.end_pos,
-
def_node.first_argument.source_range.begin_pos)
- corrector.replace(white_spaces, '(')
- corrector.insert_after(last_argument, ')') if node ==
last_argument.pairs.last
- end
corrector.replace(node, replacement)
+
+ next unless (def_node = def_node_that_require_parentheses(node))
+
+ last_argument = def_node.last_argument
+ if last_argument.nil? || !last_argument.hash_type?
+ next corrector.replace(node, replacement)
+ end
+
+ white_spaces = range_between(def_node.selector.end_pos,
+
def_node.first_argument.source_range.begin_pos)
+ next if node.parent.braces?
+
+ corrector.replace(white_spaces, '(')
+ corrector.insert_after(last_argument, ')') if node ==
last_argument.pairs.last
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/lib/rubocop/cop/style/identical_conditional_branches.rb
new/lib/rubocop/cop/style/identical_conditional_branches.rb
--- old/lib/rubocop/cop/style/identical_conditional_branches.rb 2023-10-13
09:36:04.000000000 +0200
+++ new/lib/rubocop/cop/style/identical_conditional_branches.rb 2023-10-26
11:45:40.000000000 +0200
@@ -153,7 +153,15 @@
return unless duplicated_expressions?(node, heads)
condition_variable = assignable_condition_value(node)
- return if heads.first.assignment? && condition_variable ==
heads.first.name.to_s
+
+ head = heads.first
+ if head.assignment?
+ # The `send` node is used instead of the `indexasgn` node, so
`name` cannot be used.
+ #
https://github.com/rubocop/rubocop-ast/blob/v1.29.0/lib/rubocop/ast/node/indexasgn_node.rb
+ assigned_value = head.send_type? ? head.receiver.source :
head.name.to_s
+
+ return if condition_variable == assigned_value
+ end
check_expressions(node, heads, :before_condition)
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb
new/lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb
--- old/lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb
2023-10-13 09:36:04.000000000 +0200
+++ new/lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb
2023-10-26 11:45:40.000000000 +0200
@@ -29,7 +29,8 @@
def on_hash(node)
return if node.pairs.empty? || node.pairs.any?(&:hash_rocket?)
return unless (parent = node.parent)
- return if parent.call_type? && !merge_method?(parent)
+ return unless parent.call_type? || parent.kwsplat_type?
+ return unless mergeable?(parent)
return unless (kwsplat = node.each_ancestor(:kwsplat).first)
return if allowed_double_splat_receiver?(kwsplat)
@@ -42,9 +43,11 @@
private
def allowed_double_splat_receiver?(kwsplat)
- return false unless kwsplat.children.first.call_type?
+ first_child = kwsplat.children.first
+ return true if first_child.block_type? || first_child.numblock_type?
+ return false unless first_child.call_type?
- root_receiver = root_receiver(kwsplat.children.first)
+ root_receiver = root_receiver(first_child)
!root_receiver&.hash_type?
end
@@ -71,7 +74,7 @@
def select_merge_method_nodes(kwsplat)
extract_send_methods(kwsplat).select do |node|
- merge_method?(node)
+ mergeable?(node)
end
end
@@ -106,7 +109,7 @@
end
def convert_to_new_arguments(node)
- return unless merge_method?(node)
+ return unless mergeable?(node)
node.arguments.map do |arg|
if arg.hash_type?
@@ -117,8 +120,12 @@
end
end
- def merge_method?(node)
- MERGE_METHODS.include?(node.method_name)
+ def mergeable?(node)
+ return true unless node.call_type?
+ return false unless MERGE_METHODS.include?(node.method_name)
+ return true unless (parent = node.parent)
+
+ mergeable?(parent)
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/rubocop/cop/style/redundant_filter_chain.rb
new/lib/rubocop/cop/style/redundant_filter_chain.rb
--- old/lib/rubocop/cop/style/redundant_filter_chain.rb 2023-10-13
09:36:04.000000000 +0200
+++ new/lib/rubocop/cop/style/redundant_filter_chain.rb 2023-10-26
11:45:40.000000000 +0200
@@ -60,10 +60,10 @@
# @!method select_predicate?(node)
def_node_matcher :select_predicate?, <<~PATTERN
- (send
+ (call
{
- (block $(send _ {:select :filter :find_all}) ...)
- $(send _ {:select :filter :find_all} block_pass_type?)
+ (block $(call _ {:select :filter :find_all}) ...)
+ $(call _ {:select :filter :find_all} block_pass_type?)
}
${:#{RESTRICT_ON_SEND.join(' :')}})
PATTERN
@@ -87,6 +87,7 @@
register_offense(select_node, node)
end
end
+ alias on_csend on_send
private
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/rubocop/cop/style/redundant_parentheses.rb
new/lib/rubocop/cop/style/redundant_parentheses.rb
--- old/lib/rubocop/cop/style/redundant_parentheses.rb 2023-10-13
09:36:04.000000000 +0200
+++ new/lib/rubocop/cop/style/redundant_parentheses.rb 2023-10-26
11:45:40.000000000 +0200
@@ -111,17 +111,19 @@
def first_arg_begins_with_hash_literal?(node)
# Don't flag `method ({key: value})` or `method ({key:
value}.method)`
- method_chain_begins_with_hash_literal?(node.children.first) &&
- first_argument?(node) &&
- !parentheses?(node.parent)
+ hash_literal =
method_chain_begins_with_hash_literal(node.children.first)
+ if (root_method = node.each_ancestor(:send).to_a.last)
+ parenthesized = root_method.parenthesized_call?
+ end
+ hash_literal && first_argument?(node) && !parentheses?(hash_literal)
&& !parenthesized
end
- def method_chain_begins_with_hash_literal?(node)
- return false if node.nil?
- return true if node.hash_type?
- return false unless node.send_type?
+ def method_chain_begins_with_hash_literal(node)
+ return if node.nil?
+ return node if node.hash_type?
+ return unless node.send_type?
- method_chain_begins_with_hash_literal?(node.children.first)
+ method_chain_begins_with_hash_literal(node.children.first)
end
def check(begin_node)
@@ -231,7 +233,13 @@
end
def first_argument?(node)
- first_send_argument?(node) || first_super_argument?(node) ||
first_yield_argument?(node)
+ if first_send_argument?(node) ||
+ first_super_argument?(node) ||
+ first_yield_argument?(node)
+ return true
+ end
+
+ node.each_ancestor.any? { |ancestor| first_argument?(ancestor) }
end
# @!method first_send_argument?(node)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/rubocop/cop/style/single_argument_dig.rb
new/lib/rubocop/cop/style/single_argument_dig.rb
--- old/lib/rubocop/cop/style/single_argument_dig.rb 2023-10-13
09:36:04.000000000 +0200
+++ new/lib/rubocop/cop/style/single_argument_dig.rb 2023-10-26
11:45:40.000000000 +0200
@@ -33,6 +33,7 @@
MSG = 'Use `%<receiver>s[%<argument>s]` instead of `%<original>s`.'
RESTRICT_ON_SEND = %i[dig].freeze
+ IGNORED_ARGUMENT_TYPES = %i[block_pass forwarded_restarg
forwarded_args hash].freeze
# @!method single_argument_dig?(node)
def_node_matcher :single_argument_dig?, <<~PATTERN
@@ -44,7 +45,7 @@
expression = single_argument_dig?(node)
return unless expression
- return if expression.forwarded_args_type?
+ return if IGNORED_ARGUMENT_TYPES.include?(expression.type)
receiver = node.receiver.source
argument = expression.source
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/rubocop/cop/style/single_line_do_end_block.rb
new/lib/rubocop/cop/style/single_line_do_end_block.rb
--- old/lib/rubocop/cop/style/single_line_do_end_block.rb 2023-10-13
09:36:04.000000000 +0200
+++ new/lib/rubocop/cop/style/single_line_do_end_block.rb 2023-10-26
11:45:40.000000000 +0200
@@ -30,6 +30,7 @@
MSG = 'Prefer multiline `do`...`end` block.'
+ # rubocop:disable Metrics/AbcSize
def on_block(node)
return if !node.single_line? || node.braces?
@@ -42,10 +43,11 @@
corrector.remove(node.loc.end)
corrector.insert_after(node_body.loc.heredoc_end, "\nend")
else
- corrector.insert_after(node_body, "\n")
+ corrector.insert_before(node.loc.end, "\n")
end
end
end
+ # rubocop:enable Metrics/AbcSize
alias on_numblock on_block
private
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/rubocop/formatter/html_formatter.rb
new/lib/rubocop/formatter/html_formatter.rb
--- old/lib/rubocop/formatter/html_formatter.rb 2023-10-13 09:36:04.000000000
+0200
+++ new/lib/rubocop/formatter/html_formatter.rb 2023-10-26 11:45:40.000000000
+0200
@@ -1,6 +1,5 @@
# frozen_string_literal: true
-require 'base64'
require 'cgi'
require 'erb'
require 'ostruct'
@@ -124,7 +123,10 @@
def base64_encoded_logo_image
image = File.read(LOGO_IMAGE_PATH, binmode: true)
- Base64.encode64(image)
+
+ # `Base64.encode64` compatible:
+ # https://github.com/ruby/base64/blob/v0.1.1/lib/base64.rb#L27-L40
+ [image].pack('m')
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/rubocop/version.rb new/lib/rubocop/version.rb
--- old/lib/rubocop/version.rb 2023-10-13 09:36:04.000000000 +0200
+++ new/lib/rubocop/version.rb 2023-10-26 11:45:40.000000000 +0200
@@ -3,7 +3,7 @@
module RuboCop
# This module holds the RuboCop version information.
module Version
- STRING = '1.57.1'
+ STRING = '1.57.2'
MSG = '%<version>s (using Parser %<parser_version>s, ' \
'rubocop-ast %<rubocop_ast_version>s, ' \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2023-10-13 09:36:04.000000000 +0200
+++ new/metadata 2023-10-26 11:45:40.000000000 +0200
@@ -1,32 +1,18 @@
--- !ruby/object:Gem::Specification
name: rubocop
version: !ruby/object:Gem::Version
- version: 1.57.1
+ version: 1.57.2
platform: ruby
authors:
- Bozhidar Batsov
- Jonas Arvidsson
- Yuji Nakayama
-autorequire:
+autorequire:
bindir: exe
cert_chain: []
-date: 2023-10-13 00:00:00.000000000 Z
+date: 2023-10-26 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
- name: base64
- requirement: !ruby/object:Gem::Requirement
- requirements:
- - - "~>"
- - !ruby/object:Gem::Version
- version: 0.1.1
- type: :runtime
- prerelease: false
- version_requirements: !ruby/object:Gem::Requirement
- requirements:
- - - "~>"
- - !ruby/object:Gem::Version
- version: 0.1.1
-- !ruby/object:Gem::Dependency
name: json
requirement: !ruby/object:Gem::Requirement
requirements:
@@ -1042,7 +1028,7 @@
documentation_uri: https://docs.rubocop.org/rubocop/1.57/
bug_tracker_uri: https://github.com/rubocop/rubocop/issues
rubygems_mfa_required: 'true'
-post_install_message:
+post_install_message:
rdoc_options: []
require_paths:
- lib
@@ -1057,8 +1043,8 @@
- !ruby/object:Gem::Version
version: '0'
requirements: []
-rubygems_version: 3.3.7
-signing_key:
+rubygems_version: 3.4.6
+signing_key:
specification_version: 4
summary: Automatic Ruby code style checking tool.
test_files: []