brew vendor-gems: commit updates.

This commit is contained in:
BrewTestBot 2022-07-18 18:07:33 +00:00
parent bc178b1a5a
commit f72d8b0968
No known key found for this signature in database
GPG Key ID: 82D7D104050B0F0F
59 changed files with 12 additions and 14 deletions

View File

@ -87,7 +87,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-ast-1.19.1/li
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-progressbar-1.11.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-progressbar-1.11.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width-2.2.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width-2.2.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.31.2/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.31.2/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.14.2/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.14.3/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.15.2/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.15.2/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.12.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.12.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-sorbet-0.6.11/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-sorbet-0.6.11/lib"

View File

@ -160,7 +160,7 @@ Performance/FlatMap:
Description: >- Description: >-
Use `Enumerable#flat_map` Use `Enumerable#flat_map`
instead of `Enumerable#map...Array#flatten(1)` instead of `Enumerable#map...Array#flatten(1)`
or `Enumberable#collect..Array#flatten(1)`. or `Enumerable#collect..Array#flatten(1)`.
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code' Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
Enabled: true Enabled: true
VersionAdded: '0.30' VersionAdded: '0.30'

View File

@ -47,13 +47,13 @@ module RuboCop
RETURNS_NEW_ARRAY = (ALWAYS_RETURNS_NEW_ARRAY + RETURNS_NEW_ARRAY_WHEN_NO_BLOCK).freeze RETURNS_NEW_ARRAY = (ALWAYS_RETURNS_NEW_ARRAY + RETURNS_NEW_ARRAY_WHEN_NO_BLOCK).freeze
MSG = 'Use unchained `%<method>s` and `%<second_method>s!` '\ MSG = 'Use unchained `%<method>s` and `%<second_method>s!` ' \
'(followed by `return array` if required) instead of chaining '\ '(followed by `return array` if required) instead of chaining ' \
'`%<method>s...%<second_method>s`.' '`%<method>s...%<second_method>s`.'
def_node_matcher :chain_array_allocation?, <<~PATTERN def_node_matcher :chain_array_allocation?, <<~PATTERN
(send { (send {
(send _ $%RETURN_NEW_ARRAY_WHEN_ARGS {int lvar ivar cvar gvar}) (send _ $%RETURN_NEW_ARRAY_WHEN_ARGS {int lvar ivar cvar gvar send})
(block (send _ $%ALWAYS_RETURNS_NEW_ARRAY) ...) (block (send _ $%ALWAYS_RETURNS_NEW_ARRAY) ...)
(send _ $%RETURNS_NEW_ARRAY ...) (send _ $%RETURNS_NEW_ARRAY ...)
} $%HAS_MUTATION_ALTERNATIVE ...) } $%HAS_MUTATION_ALTERNATIVE ...)

View File

@ -32,7 +32,7 @@ module RuboCop
# end # end
# #
class CollectionLiteralInLoop < Base class CollectionLiteralInLoop < Base
MSG = 'Avoid immutable %<literal_class>s literals in loops. '\ MSG = 'Avoid immutable %<literal_class>s literals in loops. ' \
'It is better to extract it into a local variable or a constant.' 'It is better to extract it into a local variable or a constant.'
POST_CONDITION_LOOP_TYPES = %i[while_post until_post].freeze POST_CONDITION_LOOP_TYPES = %i[while_post until_post].freeze

View File

@ -58,8 +58,7 @@ module RuboCop
# `key?`/`value?` method. # `key?`/`value?` method.
corrector.replace( corrector.replace(
node.loc.expression, node.loc.expression,
"#{autocorrect_hash_expression(node)}."\ "#{autocorrect_hash_expression(node)}.#{autocorrect_method(node)}(#{autocorrect_argument(node)})"
"#{autocorrect_method(node)}(#{autocorrect_argument(node)})"
) )
end end
end end
@ -68,8 +67,7 @@ module RuboCop
private private
def message(node) def message(node)
"Use `##{autocorrect_method(node)}` instead of "\ "Use `##{autocorrect_method(node)}` instead of `##{current_method(node)}.include?`."
"`##{current_method(node)}.include?`."
end end
def autocorrect_method(node) def autocorrect_method(node)

View File

@ -38,7 +38,7 @@ module RuboCop
remove_class_variable remove_method undef_method class_variable_get class_variable_set remove_class_variable remove_method undef_method class_variable_get class_variable_set
deprecate_constant module_function private private_constant protected public public_constant deprecate_constant module_function private private_constant protected public public_constant
remove_const ruby2_keywords remove_const ruby2_keywords
define_singleton_method instance_variable_defined instance_variable_get instance_variable_set define_singleton_method instance_variable_defined? instance_variable_get instance_variable_set
method public_method public_send remove_instance_variable respond_to? send singleton_method method public_method public_send remove_instance_variable respond_to? send singleton_method
__send__ __send__
].freeze ].freeze

View File

@ -7,7 +7,7 @@ module RuboCop
# in some Enumerable object can be replaced by `Enumerable#sum` method. # in some Enumerable object can be replaced by `Enumerable#sum` method.
# #
# @safety # @safety
# Auto-corrections are unproblematic wherever an initial value is provided explicitly: # Autocorrections are unproblematic wherever an initial value is provided explicitly:
# #
# [source,ruby] # [source,ruby]
# ---- # ----
@ -43,7 +43,7 @@ module RuboCop
# #
# @example OnlySumOrWithInitialValue: false (default) # @example OnlySumOrWithInitialValue: false (default)
# # bad # # bad
# [1, 2, 3].inject(:+) # Auto-corrections for cases without initial value are unsafe # [1, 2, 3].inject(:+) # Autocorrections for cases without initial value are unsafe
# [1, 2, 3].inject(&:+) # and will only be performed when using the `-A` option. # [1, 2, 3].inject(&:+) # and will only be performed when using the `-A` option.
# [1, 2, 3].reduce { |acc, elem| acc + elem } # They can be prohibited completely using `SafeAutoCorrect: true`. # [1, 2, 3].reduce { |acc, elem| acc + elem } # They can be prohibited completely using `SafeAutoCorrect: true`.
# [1, 2, 3].reduce(10, :+) # [1, 2, 3].reduce(10, :+)

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.14.2' STRING = '1.14.3'
def self.document_version def self.document_version
STRING.match('\d+\.\d+').to_s STRING.match('\d+\.\d+').to_s