brew vendor-gems: commit updates.

This commit is contained in:
BrewTestBot 2021-01-01 07:28:36 +00:00
parent 83449ab26b
commit 670496e29e
79 changed files with 25 additions and 35 deletions

View File

@ -73,10 +73,10 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-0.5.6189/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-sorbet-1.8.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-sorbet-1.8.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-wait-0.0.9/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-wait-0.0.9/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-ast-1.3.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-ast-1.3.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-progressbar-1.10.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-progressbar-1.11.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width-1.7.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width-1.7.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.7.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.7.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.9.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.9.2/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.9.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.9.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.1.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.1.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-sorbet-0.5.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-sorbet-0.5.1/lib"

View File

@ -18,29 +18,25 @@ module RuboCop
MSG = 'Use `reverse_each` instead of `reverse.each`.' MSG = 'Use `reverse_each` instead of `reverse.each`.'
RESTRICT_ON_SEND = %i[each].freeze RESTRICT_ON_SEND = %i[each].freeze
UNDERSCORE = '_'
def_node_matcher :reverse_each?, <<~MATCHER def_node_matcher :reverse_each?, <<~MATCHER
(send $(send _ :reverse) :each) (send (send _ :reverse) :each)
MATCHER MATCHER
def on_send(node) def on_send(node)
reverse_each?(node) do |receiver| reverse_each?(node) do
location_of_reverse = receiver.loc.selector.begin_pos range = offense_range(node)
end_location = node.loc.selector.end_pos
range = range_between(location_of_reverse, end_location)
add_offense(range) do |corrector| add_offense(range) do |corrector|
corrector.replace(replacement_range(node), UNDERSCORE) corrector.replace(range, 'reverse_each')
end end
end end
end end
private private
def replacement_range(node) def offense_range(node)
range_between(node.loc.dot.begin_pos, node.loc.selector.begin_pos) range_between(node.children.first.loc.selector.begin_pos, node.loc.selector.end_pos)
end end
end end
end end

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

View File

@ -1,3 +0,0 @@
class ProgressBar
VERSION = '1.10.1'.freeze
end

View File

@ -13,7 +13,7 @@ class Base
:progress, :progress,
:total :total
def initialize(options = {}) def initialize(options = {}) # rubocop:disable Metrics/AbcSize
self.autostart = options.fetch(:autostart, true) self.autostart = options.fetch(:autostart, true)
self.autofinish = options.fetch(:autofinish, true) self.autofinish = options.fetch(:autofinish, true)
self.finished = false self.finished = false
@ -123,7 +123,7 @@ class Base
Format::Formatter.process(@format, output.length, self) Format::Formatter.process(@format, output.length, self)
end end
# rubocop:disable Metrics/AbcSize, Metrics/LineLength # rubocop:disable Metrics/AbcSize, Layout/LineLength
def to_h def to_h
{ {
'output_stream' => output.__send__(:stream), 'output_stream' => output.__send__(:stream),
@ -145,7 +145,7 @@ class Base
'finished?' => finished? 'finished?' => finished?
} }
end end
# rubocop:enable Metrics/AbcSize, Metrics/LineLength # rubocop:enable Metrics/AbcSize, Layout/LineLength
def inspect def inspect
"#<ProgressBar:#{progress}/#{total || 'unknown'}>" "#<ProgressBar:#{progress}/#{total || 'unknown'}>"

View File

@ -12,6 +12,10 @@ class Time
NO_TIME_ELAPSED_TEXT = '--:--:--'.freeze NO_TIME_ELAPSED_TEXT = '--:--:--'.freeze
ESTIMATED_LABEL = ' ETA'.freeze ESTIMATED_LABEL = ' ETA'.freeze
ELAPSED_LABEL = 'Time'.freeze ELAPSED_LABEL = 'Time'.freeze
OOB_TEXT_TO_FORMAT = {
:unknown => OOB_UNKNOWN_TIME_TEXT,
:friendly => OOB_FRIENDLY_TIME_TEXT
}.freeze
def initialize(options = {}) def initialize(options = {})
self.out_of_bounds_time_format = options[:out_of_bounds_time_format] self.out_of_bounds_time_format = options[:out_of_bounds_time_format]
@ -53,8 +57,7 @@ class Time
def out_of_bounds_time_format=(format) def out_of_bounds_time_format=(format)
unless OOB_TIME_FORMATS.include? format unless OOB_TIME_FORMATS.include? format
fail 'Invalid Out Of Bounds time format. Valid formats are ' + fail StandardError, "Invalid Out Of Bounds time format. Valid formats are #{OOB_TIME_FORMATS.inspect}"
OOB_TIME_FORMATS.inspect
end end
@out_of_bounds_time_format = format @out_of_bounds_time_format = format
@ -70,7 +73,7 @@ class Time
hours, minutes, seconds = timer.divide_seconds(memo_estimated_seconds_remaining) hours, minutes, seconds = timer.divide_seconds(memo_estimated_seconds_remaining)
if hours > OOB_LIMIT_IN_HOURS && out_of_bounds_time_format if hours > OOB_LIMIT_IN_HOURS && out_of_bounds_time_format
out_of_bounds_time OOB_TEXT_TO_FORMAT[out_of_bounds_time_format]
else else
TIME_FORMAT % [hours, minutes, seconds] TIME_FORMAT % [hours, minutes, seconds]
end end
@ -89,19 +92,10 @@ class Time
end end
def estimated_seconds_remaining def estimated_seconds_remaining
return if progress.unknown? || progress.none? || timer.stopped? return if progress.unknown? || progress.none? || timer.stopped? || timer.reset?
(timer.elapsed_seconds * (progress.total / progress.running_average - 1)).round (timer.elapsed_seconds * (progress.total / progress.running_average - 1)).round
end end
def out_of_bounds_time
case out_of_bounds_time_format
when :unknown
OOB_UNKNOWN_TIME_TEXT
when :friendly
OOB_FRIENDLY_TIME_TEXT
end
end
end end
end end
end end

View File

@ -17,7 +17,7 @@ class Tty < Output
end end
def default_format def default_format
DEFAULT_FORMAT_STRING ENV['RUBY_PROGRESS_BAR_FORMAT'] || DEFAULT_FORMAT_STRING
end end
def resolve_format(other_format) def resolve_format(other_format)

View File

@ -13,7 +13,7 @@ refine ::Enumerator do
end end
end end
return chain unless block_given? return chain unless block
chain.each(&block) chain.each(&block)
end end

View File

@ -0,0 +1,3 @@
class ProgressBar
VERSION = '1.11.0'.freeze
end