diff --git a/Library/.rubocop_rspec.yml b/Library/.rubocop_rspec.yml index cb607442c2..403b340814 100644 --- a/Library/.rubocop_rspec.yml +++ b/Library/.rubocop_rspec.yml @@ -43,3 +43,5 @@ RSpec/MultipleExpectations: Max: 26 RSpec/NestedGroups: Max: 5 +RSpec/MultipleMemoizedHelpers: + Max: 12 diff --git a/Library/Homebrew/Gemfile.lock b/Library/Homebrew/Gemfile.lock index 408f620de6..7268147688 100644 --- a/Library/Homebrew/Gemfile.lock +++ b/Library/Homebrew/Gemfile.lock @@ -112,8 +112,8 @@ GEM parser (>= 2.7.1.4) rubocop-performance (1.7.1) rubocop (>= 0.82.0) - rubocop-rspec (1.42.0) - rubocop (>= 0.87.0) + rubocop-rspec (1.43.1) + rubocop (~> 0.87) ruby-macho (2.2.0) ruby-progressbar (1.10.1) simplecov (0.19.0) diff --git a/Library/Homebrew/vendor/bundle/bundler/setup.rb b/Library/Homebrew/vendor/bundle/bundler/setup.rb index c094822c7f..f9a2a94fd0 100644 --- a/Library/Homebrew/vendor/bundle/bundler/setup.rb +++ b/Library/Homebrew/vendor/bundle/bundler/setup.rb @@ -51,7 +51,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parallel-1.19.2/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parallel_tests-3.1.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parser-2.7.1.4/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rainbow-3.0.0/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-runtime-0.5.5866/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-runtime-0.5.5869/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parlour-4.0.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/patchelf-1.2.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/plist-3.5.0/lib" @@ -74,9 +74,9 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-progressbar-1.10 $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width-1.7.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-0.88.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.7.1/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-1.42.0/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-1.43.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-macho-2.2.0/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-static-0.5.5866-universal-darwin-19/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-0.5.5866/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-static-0.5.5869-universal-darwin-19/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-0.5.5869/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/thor-1.0.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/tapioca-0.4.1/lib" diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.42.0/lib/rubocop/cop/rspec/describe_class.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.42.0/lib/rubocop/cop/rspec/describe_class.rb deleted file mode 100644 index 6bdf4ffb9e..0000000000 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.42.0/lib/rubocop/cop/rspec/describe_class.rb +++ /dev/null @@ -1,72 +0,0 @@ -# frozen_string_literal: true - -module RuboCop - module Cop - module RSpec - # Check that the first argument to the top level describe is a constant. - # - # @example - # # bad - # describe 'Do something' do - # end - # - # # good - # describe TestedClass do - # subject { described_class } - # end - # - # describe 'TestedClass::VERSION' do - # subject { Object.const_get(self.class.description) } - # end - # - # describe "A feature example", type: :feature do - # end - class DescribeClass < Cop - include RuboCop::RSpec::TopLevelDescribe - - MSG = 'The first argument to describe should be '\ - 'the class or module being tested.' - - def_node_matcher :valid_describe?, <<-PATTERN - { - (send #{RSPEC} :describe const ...) - (send #{RSPEC} :describe) - } - PATTERN - - def_node_matcher :describe_with_rails_metadata?, <<-PATTERN - (send #{RSPEC} :describe !const ... - (hash <#rails_metadata? ...>) - ) - PATTERN - - def_node_matcher :rails_metadata?, <<-PATTERN - (pair - (sym :type) - (sym { - :channel :controller :helper :job :mailer :model :request - :routing :view :feature :system :mailbox - } - ) - ) - PATTERN - - def on_top_level_describe(node, (described_value, _)) - return if shared_group?(root_node) - return if valid_describe?(node) - return if describe_with_rails_metadata?(node) - return if string_constant_describe?(described_value) - - add_offense(described_value) - end - - private - - def string_constant_describe?(described_value) - described_value.str_type? && - described_value.value =~ /^((::)?[A-Z]\w*)+$/ - end - end - end - end -end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.42.0/lib/rubocop/cop/rspec/empty_example_group.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.42.0/lib/rubocop/cop/rspec/empty_example_group.rb deleted file mode 100644 index 2d8bb24f49..0000000000 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.42.0/lib/rubocop/cop/rspec/empty_example_group.rb +++ /dev/null @@ -1,90 +0,0 @@ -# frozen_string_literal: true - -module RuboCop - module Cop - module RSpec - # Checks if an example group does not include any tests. - # - # This cop is configurable using the `CustomIncludeMethods` option - # - # @example usage - # - # # bad - # describe Bacon do - # let(:bacon) { Bacon.new(chunkiness) } - # let(:chunkiness) { false } - # - # context 'extra chunky' do # flagged by rubocop - # let(:chunkiness) { true } - # end - # - # it 'is chunky' do - # expect(bacon.chunky?).to be_truthy - # end - # end - # - # # good - # describe Bacon do - # let(:bacon) { Bacon.new(chunkiness) } - # let(:chunkiness) { false } - # - # it 'is chunky' do - # expect(bacon.chunky?).to be_truthy - # end - # end - # - # @example configuration - # - # # .rubocop.yml - # # RSpec/EmptyExampleGroup: - # # CustomIncludeMethods: - # # - include_tests - # - # # spec_helper.rb - # RSpec.configure do |config| - # config.alias_it_behaves_like_to(:include_tests) - # end - # - # # bacon_spec.rb - # describe Bacon do - # let(:bacon) { Bacon.new(chunkiness) } - # let(:chunkiness) { false } - # - # context 'extra chunky' do # not flagged by rubocop - # let(:chunkiness) { true } - # - # include_tests 'shared tests' - # end - # end - # - class EmptyExampleGroup < Cop - MSG = 'Empty example group detected.' - - def_node_search :contains_example?, <<-PATTERN - { - #{(Examples::ALL + Includes::ALL).send_pattern} - (send _ #custom_include? ...) - } - PATTERN - - def on_block(node) - return unless example_group?(node) && !contains_example?(node) - - add_offense(node.send_node) - end - - private - - def custom_include?(method_name) - custom_include_methods.include?(method_name) - end - - def custom_include_methods - cop_config - .fetch('CustomIncludeMethods', []) - .map(&:to_sym) - end - end - end - end -end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.42.0/lib/rubocop/cop/rspec/variable_name.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.42.0/lib/rubocop/cop/rspec/variable_name.rb deleted file mode 100644 index 7fa222805d..0000000000 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.42.0/lib/rubocop/cop/rspec/variable_name.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -module RuboCop - module Cop - module RSpec - # Checks that memoized helper names use the configured style. - # - # @example EnforcedStyle: snake_case (default) - # # bad - # let(:userName) { 'Adam' } - # subject(:userName) { 'Adam' } - # - # # good - # let(:user_name) { 'Adam' } - # subject(:user_name) { 'Adam' } - # - # @example EnforcedStyle: camelCase - # # bad - # let(:user_name) { 'Adam' } - # subject(:user_name) { 'Adam' } - # - # # good - # let(:userName) { 'Adam' } - # subject(:userName) { 'Adam' } - class VariableName < Cop - include ConfigurableNaming - include RuboCop::RSpec::Variable - - MSG = 'Use %