brew vendor-gems: commit updates.

This commit is contained in:
BrewTestBot 2023-02-06 18:07:37 +00:00
parent e069ed35b2
commit f719733e3b
No known key found for this signature in database
GPG Key ID: 82D7D104050B0F0F
59 changed files with 20 additions and 20 deletions

View File

@ -105,7 +105,7 @@ $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/unicode-display_width-2.4.2/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/unicode-display_width-2.4.2/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-1.44.1/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-1.44.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-capybara-2.17.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-capybara-2.17.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-performance-1.15.2/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-performance-1.16.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-rails-2.17.4/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-rails-2.17.4/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-rspec-2.18.1/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-rspec-2.18.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-sorbet-0.6.11/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-sorbet-0.6.11/lib")

View File

@ -33,7 +33,7 @@ module RuboCop
RETURNS_NEW_ARRAY_WHEN_NO_BLOCK = %i[zip product].to_set.freeze RETURNS_NEW_ARRAY_WHEN_NO_BLOCK = %i[zip product].to_set.freeze
# These methods ALWAYS return a new array # These methods ALWAYS return a new array
# after they're called it's safe to mutate the the resulting array # after they're called it's safe to mutate the resulting array
ALWAYS_RETURNS_NEW_ARRAY = %i[* + - collect compact drop ALWAYS_RETURNS_NEW_ARRAY = %i[* + - collect compact drop
drop_while flatten map reject drop_while flatten map reject
reverse rotate select shuffle sort reverse rotate select shuffle sort

View File

@ -8,9 +8,12 @@ module RuboCop
# `detect` instead. # `detect` instead.
# #
# @safety # @safety
# This cop is unsafe because is has known compatibility issues with `ActiveRecord` and other # This cop is unsafe because is assumes the class implements the
# frameworks. `ActiveRecord` does not implement a `detect` method and `find` has its own # `Enumerable` interface, but can't reliably detect this. This creates
# meaning. Correcting `ActiveRecord` methods with this cop should be considered unsafe. # known compatibility issues with `Hash`, `ActiveRecord` and other
# frameworks. `Hash` and `ActiveRecord` do not implement a `detect`
# method and `find` has its own meaning. Correcting `Hash` and
# `ActiveRecord` methods with this cop should be considered unsafe.
# #
# @example # @example
# # bad # # bad

View File

@ -28,6 +28,7 @@ module RuboCop
# hash[:a] = 1 # hash[:a] = 1
# hash[:b] = 2 # hash[:b] = 2
class RedundantMerge < Base class RedundantMerge < Base
include Alignment
extend AutoCorrector extend AutoCorrector
AREF_ASGN = '%<receiver>s[%<key>s] = %<value>s' AREF_ASGN = '%<receiver>s[%<key>s] = %<value>s'
@ -129,7 +130,7 @@ module RuboCop
end end
def rewrite_with_modifier(node, parent, new_source) def rewrite_with_modifier(node, parent, new_source)
indent = ' ' * indent_width indent = ' ' * configured_indentation_width
padding = "\n#{indent + leading_spaces(node)}" padding = "\n#{indent + leading_spaces(node)}"
new_source.gsub!(/\n/, padding) new_source.gsub!(/\n/, padding)
@ -144,10 +145,6 @@ module RuboCop
node.source_range.source_line[/\A\s*/] node.source_range.source_line[/\A\s*/]
end end
def indent_width
@config.for_cop('Layout/IndentationWidth')['Width'] || 2
end
def max_key_value_pairs def max_key_value_pairs
Integer(cop_config['MaxKeyValuePairs'] || 2) Integer(cop_config['MaxKeyValuePairs'] || 2)
end end

View File

@ -6,19 +6,19 @@ module RuboCop
# Identifies unnecessary use of a regex where `String#include?` would suffice. # Identifies unnecessary use of a regex where `String#include?` would suffice.
# #
# @safety # @safety
# This cop's offenses are not safe to autocorrect if a receiver is nil. # This cop's offenses are not safe to autocorrect if a receiver is nil or a Symbol.
# #
# @example # @example
# # bad # # bad
# 'abc'.match?(/ab/) # str.match?(/ab/)
# /ab/.match?('abc') # /ab/.match?(str)
# 'abc' =~ /ab/ # str =~ /ab/
# /ab/ =~ 'abc' # /ab/ =~ str
# 'abc'.match(/ab/) # str.match(/ab/)
# /ab/.match('abc') # /ab/.match(str)
# #
# # good # # good
# 'abc'.include?('ab') # str.include?('ab')
class StringInclude < Base class StringInclude < Base
extend AutoCorrector extend AutoCorrector
@ -27,7 +27,7 @@ module RuboCop
def_node_matcher :redundant_regex?, <<~PATTERN def_node_matcher :redundant_regex?, <<~PATTERN
{(send $!nil? {:match :=~ :!~ :match?} (regexp (str $#literal?) (regopt))) {(send $!nil? {:match :=~ :!~ :match?} (regexp (str $#literal?) (regopt)))
(send (regexp (str $#literal?) (regopt)) {:match :match?} $str) (send (regexp (str $#literal?) (regopt)) {:match :match?} $_)
(match-with-lvasgn (regexp (str $#literal?) (regopt)) $_)} (match-with-lvasgn (regexp (str $#literal?) (regopt)) $_)}
PATTERN PATTERN

View File

@ -4,7 +4,7 @@ module RuboCop
module Performance module Performance
# This module holds the RuboCop Performance version information. # This module holds the RuboCop Performance version information.
module Version module Version
STRING = '1.15.2' STRING = '1.16.0'
def self.document_version def self.document_version
STRING.match('\d+\.\d+').to_s STRING.match('\d+\.\d+').to_s