brew vendor-gems: commit updates.

This commit is contained in:
Mike McQuaid 2019-07-29 08:37:06 +01:00
parent d53e035b89
commit 35599e4f12
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70
32 changed files with 30 additions and 21 deletions

View File

@ -35,7 +35,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/jaro_winkler-1.5.3/li
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/mime-types-data-3.2019.0331/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/mime-types-data-3.2019.0331/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/mime-types-3.2.2/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/mime-types-3.2.2/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/net-http-digest_auth-1.4.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/net-http-digest_auth-1.4.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/net-http-persistent-3.0.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/net-http-persistent-3.1.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/mini_portile2-2.4.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/mini_portile2-2.4.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/universal-darwin-18/2.3.0/nokogiri-1.10.3" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/universal-darwin-18/2.3.0/nokogiri-1.10.3"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/nokogiri-1.10.3/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/nokogiri-1.10.3/lib"
@ -62,7 +62,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-wait-0.0.9/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-progressbar-1.10.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-progressbar-1.10.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width-1.6.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width-1.6.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-0.73.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-0.73.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.4.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.4.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-1.34.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-1.34.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-macho-2.2.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-macho-2.2.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-cobertura-1.3.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-cobertura-1.3.1/lib"

View File

@ -132,7 +132,7 @@ module RuboCop
end end
def max_key_value_pairs def max_key_value_pairs
Integer(cop_config['MaxKeyValuePairs']) Integer(cop_config['MaxKeyValuePairs']) || 2
end end
# A utility class for checking the use of values within an # A utility class for checking the use of values within an

View File

@ -177,25 +177,42 @@ module RuboCop
scope_root = scope_root(match_node) scope_root = scope_root(match_node)
body = scope_root ? scope_body(scope_root) : match_node.ancestors.last body = scope_root ? scope_body(scope_root) : match_node.ancestors.last
return true if match_node.parent.if_type? && range = range_to_search_for_last_matches(match_node, body, scope_root)
match_node.parent.modifier_form?
match_node_pos = match_node.loc.expression.begin_pos
next_match_pos = next_match_pos(body, match_node_pos, scope_root)
range = match_node_pos..next_match_pos
find_last_match(body, range, scope_root) find_last_match(body, range, scope_root)
end end
def range_to_search_for_last_matches(match_node, body, scope_root)
expression = if modifier_form?(match_node)
match_node.parent.if_branch.loc.expression
else
match_node.loc.expression
end
match_node_pos = expression.begin_pos
next_match_pos = next_match_pos(body, match_node_pos, scope_root)
match_node_pos..next_match_pos
end
def next_match_pos(body, match_node_pos, scope_root) def next_match_pos(body, match_node_pos, scope_root)
node = search_match_nodes(body).find do |match| node = search_match_nodes(body).find do |match|
match.loc.expression.begin_pos > match_node_pos && begin_pos = if modifier_form?(match)
scope_root(match) == scope_root match.parent.if_branch.loc.expression.begin_pos
else
match.loc.expression.begin_pos
end
begin_pos > match_node_pos && scope_root(match) == scope_root
end end
node ? node.loc.expression.begin_pos : Float::INFINITY node ? node.loc.expression.begin_pos : Float::INFINITY
end end
def modifier_form?(match_node)
match_node.parent.if_type? && match_node.parent.modifier_form?
end
def find_last_match(body, range, scope_root) def find_last_match(body, range, scope_root)
last_matches(body).find do |ref| last_matches(body).find do |ref|
ref_pos = ref.loc.expression.begin_pos ref_pos = ref.loc.expression.begin_pos

View File

@ -1,13 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module RuboCop
# RuboCop included the performance cops directly before version 1.0.0.
# We can remove them to avoid warnings about redefining constants.
module Cop
remove_const('Performance') if const_defined?('Performance')
end
end
require_relative 'performance/caller' require_relative 'performance/caller'
require_relative 'performance/case_when_splat' require_relative 'performance/case_when_splat'
require_relative 'performance/casecmp' require_relative 'performance/casecmp'

View File

@ -3,7 +3,7 @@
module RuboCop module RuboCop
module Performance module Performance
module Version module Version
STRING = '1.4.0' STRING = '1.4.1'
end end
end end
end end