brew vendor-gems: commit updates.

This commit is contained in:
BrewTestBot 2022-11-21 18:09:07 +00:00
parent fd1ebc4e89
commit e1bf39a180
No known key found for this signature in database
GPG Key ID: 82D7D104050B0F0F
196 changed files with 209 additions and 102 deletions

View File

@ -83,7 +83,7 @@ $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/patchelf-1.4.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/plist-3.6.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/pry-0.14.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rack-3.0.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rack-3.0.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/unparser-0.6.4/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rbi-0.0.14/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/universal-darwin-21/#{Gem.extension_api_version}/rdiscount-2.2.7")
@ -106,7 +106,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.3.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-1.35.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-performance-1.15.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-rails-2.17.2/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-rails-2.17.3/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-rspec-2.15.0/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/ruby-macho-3.0.0/lib")

View File

@ -817,8 +817,14 @@ module Rack
verify_to_path
end
BODY_METHODS = {to_ary: true, each: true, call: true, to_path: true}
def to_path
@body.to_path
end
def respond_to?(name, *)
if name == :to_ary
if BODY_METHODS.key?(name)
@body.respond_to?(name)
else
super

View File

@ -46,7 +46,7 @@ module Rack
end
def method_override_param(req)
req.POST[METHOD_OVERRIDE_PARAM_KEY]
req.POST[METHOD_OVERRIDE_PARAM_KEY] if req.form_data? || req.parseable_data?
rescue Utils::InvalidParameterError, Utils::ParameterTypeError
req.get_header(RACK_ERRORS).puts "Invalid or incomplete POST params"
rescue EOFError

View File

@ -25,7 +25,7 @@ module Rack
VERSION
end
RELEASE = "3.0.0"
RELEASE = "3.0.1"
# Return the Rack release as a dotted string.
def self.release

View File

@ -1,41 +0,0 @@
# frozen_string_literal: true
module RuboCop
module Cop
module Rails
# Identifies passing any argument to `#to_s`.
#
# @safety
# This cop is marked as unsafe because it may detect `#to_s` calls
# that are not related to Active Support implementation.
#
# @example
#
# # bad
# obj.to_s(:delimited)
#
# # good
# obj.to_formatted_s(:delimited)
#
class ToSWithArgument < Base
extend AutoCorrector
extend TargetRailsVersion
MSG = 'Use `to_formatted_s` instead.'
RESTRICT_ON_SEND = %i[to_s].freeze
minimum_target_rails_version 7.0
def on_send(node)
return if node.arguments.empty?
add_offense(node.loc.selector) do |corrector|
corrector.replace(node.loc.selector, 'to_formatted_s')
end
end
alias on_csend on_send
end
end
end
end

View File

@ -540,7 +540,7 @@ Rails/I18nLazyLookup:
Enabled: pending
VersionAdded: '2.14'
Include:
- 'controllers/**/*'
- 'app/controllers/**/*.rb'
Rails/I18nLocaleAssignment:
Description: 'Prefer the usage of `I18n.with_locale` instead of manually updating `I18n.locale` value.'

View File

@ -10,8 +10,8 @@ module RuboCop
def_node_matcher :active_record?, <<~PATTERN
{
(const nil? :ApplicationRecord)
(const (const nil? :ActiveRecord) :Base)
(const {nil? cbase} :ApplicationRecord)
(const (const {nil? cbase} :ActiveRecord) :Base)
}
PATTERN

View File

@ -134,7 +134,7 @@ module RuboCop
end
def self.from_hash_brackets_map(node, match)
new(match, node.children.last, 'Hash['.length, ']'.length)
new(match, node.children.last, "#{node.receiver.source}[".length, ']'.length)
end
def strip_prefix_and_suffix(node, corrector)

View File

@ -8,7 +8,7 @@ module RuboCop
def_node_matcher :migration_class?, <<~PATTERN
(class
(const nil? _)
(const {nil? cbase} _)
(send
(const (const {nil? cbase} :ActiveRecord) :Migration)
:[]

View File

@ -43,8 +43,8 @@ module RuboCop
def_node_search :action_controller?, <<~PATTERN
{
(const nil? :ApplicationController)
(const (const nil? :ActionController) :Base)
(const {nil? cbase} :ApplicationController)
(const (const {nil? cbase} :ActionController) :Base)
}
PATTERN
@ -69,9 +69,12 @@ module RuboCop
def followed_by_render?(flash_node)
flash_assigment_node = find_ancestor(flash_node, type: :send)
context = flash_assigment_node
context = context.parent if context.parent.if_type?
if (if_node = context.each_ancestor(:if).first)
context = if_node
elsif context.right_siblings.empty?
return true
end
context = context.right_siblings
return true if context.empty?
context.compact.any? do |node|
render?(node)

View File

@ -30,7 +30,7 @@ module RuboCop
def_node_matcher :action_controller_test_case?, <<~PATTERN
(class
(const nil? _)
(const {nil? cbase} _)
(const (const {nil? cbase} :ActionController) :TestCase) _)
PATTERN

View File

@ -6,7 +6,8 @@ module RuboCop
# Enforces consistent ordering of the standard Rails RESTful controller actions.
#
# The cop is configurable and can enforce any ordering of the standard actions.
# All other methods are ignored.
# All other methods are ignored. So, the actions specified in `ExpectedOrder` should be
# defined before actions not specified.
#
# [source,yaml]
# ----
@ -35,6 +36,7 @@ module RuboCop
extend AutoCorrector
include VisibilityHelp
include DefNode
include RangeHelp
MSG = 'Action `%<current>s` should appear before `%<previous>s`.'
@ -71,10 +73,44 @@ module RuboCop
current: current.method_name
)
add_offense(current, message: message) do |corrector|
corrector.replace(current, previous.source)
corrector.replace(previous, current.source)
current = correction_target(current)
previous = correction_target(previous)
swap_range(corrector, current, previous)
end
end
def correction_target(def_node)
range_with_comments_and_lines(def_node.each_ancestor(:if).first || def_node)
end
def add_range(range1, range2)
range1.with(
begin_pos: [range1.begin_pos, range2.begin_pos].min,
end_pos: [range1.end_pos, range2.end_pos].max
)
end
def range_with_comments(node)
ranges = [
node,
*processed_source.ast_with_comments[node]
].map do |element|
element.location.expression
end
ranges.reduce do |result, range|
add_range(result, range)
end
end
def range_with_comments_and_lines(node)
range_by_whole_lines(range_with_comments(node), include_final_newline: true)
end
def swap_range(corrector, range1, range2)
corrector.insert_before(range2, range1.source)
corrector.remove(range1)
end
end
end
end

View File

@ -25,7 +25,7 @@ module RuboCop
MSG = 'Controllers should subclass `ApplicationController`.'
SUPERCLASS = 'ApplicationController'
BASE_PATTERN = '(const (const nil? :ActionController) :Base)'
BASE_PATTERN = '(const (const {nil? cbase} :ActionController) :Base)'
# rubocop:disable Layout/ClassStructure
include RuboCop::Cop::EnforceSuperclass

View File

@ -28,7 +28,7 @@ module RuboCop
MSG = 'Jobs should subclass `ApplicationJob`.'
SUPERCLASS = 'ApplicationJob'
BASE_PATTERN = '(const (const nil? :ActiveJob) :Base)'
BASE_PATTERN = '(const (const {nil? cbase} :ActiveJob) :Base)'
# rubocop:disable Layout/ClassStructure
include RuboCop::Cop::EnforceSuperclass

View File

@ -28,7 +28,7 @@ module RuboCop
MSG = 'Mailers should subclass `ApplicationMailer`.'
SUPERCLASS = 'ApplicationMailer'
BASE_PATTERN = '(const (const nil? :ActionMailer) :Base)'
BASE_PATTERN = '(const (const {nil? cbase} :ActionMailer) :Base)'
# rubocop:disable Layout/ClassStructure
include RuboCop::Cop::EnforceSuperclass

View File

@ -29,7 +29,7 @@ module RuboCop
MSG = 'Models should subclass `ApplicationRecord`.'
SUPERCLASS = 'ApplicationRecord'
BASE_PATTERN = '(const (const nil? :ActiveRecord) :Base)'
BASE_PATTERN = '(const (const {nil? cbase} :ActiveRecord) :Base)'
# rubocop:disable Layout/ClassStructure
include RuboCop::Cop::EnforceSuperclass

View File

@ -81,7 +81,7 @@ module RuboCop
def allowed_name?(argument)
return false unless argument.str_type? || argument.sym_type?
!/^[a-zA-Z\-][a-zA-Z\-0-9]*$/.match?(argument.value)
!/^[a-zA-Z-][a-zA-Z\-0-9]*$/.match?(argument.value)
end
def correction_range(node)

View File

@ -24,7 +24,7 @@ module RuboCop
TRANSLATE_METHODS = %i[translate t].freeze
def_node_matcher :translate_with_scope?, <<~PATTERN
(send {nil? (const nil? :I18n)} {:translate :t} ${sym_type? str_type?}
(send {nil? (const {nil? cbase} :I18n)} {:translate :t} ${sym_type? str_type?}
(hash <$(pair (sym :scope) ${array_type? sym_type?}) ...>)
)
PATTERN

Some files were not shown because too many files have changed in this diff Show More