diff --git a/Library/Homebrew/vendor/bundle/bundler/setup.rb b/Library/Homebrew/vendor/bundle/bundler/setup.rb index 7354382908..5dfd238b38 100644 --- a/Library/Homebrew/vendor/bundle/bundler/setup.rb +++ b/Library/Homebrew/vendor/bundle/bundler/setup.rb @@ -19,7 +19,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/universal-darwi $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/json-2.3.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/docile-1.3.2/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-html-0.12.3/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-0.19.0/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-0.19.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/codecov-0.2.12/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/coderay-1.1.3/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/colorize-0.8.1/lib" @@ -47,11 +47,11 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/webrobots-0.1.2/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/mechanize-2.7.6/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/method_source-1.0.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/mustache-1.1.1/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parallel-1.19.2/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parallel-1.20.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parallel_tests-3.3.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parser-2.7.2.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rainbow-3.0.0/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-runtime-0.5.5981/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-runtime-0.5.6036/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parlour-4.0.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/patchelf-1.3.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/plist-3.5.0/lib" @@ -61,25 +61,25 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rdiscount-2.2.0.2/lib $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/regexp_parser-1.8.2/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rexml-3.2.4/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ronn-0.7.3/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-support-3.9.3/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-core-3.9.3/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-expectations-3.9.2/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-mocks-3.9.1/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-3.9.0/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-support-3.10.0/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-core-3.10.0/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-expectations-3.10.0/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-mocks-3.10.0/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-3.10.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-its-1.3.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-retry-0.6.2/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-wait-0.0.9/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-ast-0.8.0/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-ast-1.1.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.7.0/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-0.93.1/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.2.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.8.1/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-1.44.1/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.0.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-sorbet-0.5.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.5949-universal-darwin-19/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-0.5.5949/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-static-0.5.6036-universal-darwin-19/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-0.5.6036/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-runtime-stub-0.2.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/thor-1.0.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/spoom-1.0.4/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/tapioca-0.4.7/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/tapioca-0.4.8/lib" diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/base.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/base.rb deleted file mode 100644 index a34bd1c99f..0000000000 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/base.rb +++ /dev/null @@ -1,76 +0,0 @@ -# frozen_string_literal: true - -module RuboCop - module Cop - module RSpec - # @abstract parent class to RSpec cops - # - # The criteria for whether rubocop-rspec analyzes a certain ruby file - # is configured via `AllCops/RSpec`. For example, if you want to - # customize your project to scan all files within a `test/` directory - # then you could add this to your configuration: - # - # @example configuring analyzed paths - # # .rubocop.yml - # # AllCops: - # # RSpec: - # # Patterns: - # # - '_test.rb$' - # # - '(?:^|/)test/' - class Base < ::RuboCop::Cop::Base - include RuboCop::RSpec::Language - include RuboCop::RSpec::Language::NodePattern - - DEFAULT_CONFIGURATION = - RuboCop::RSpec::CONFIG.fetch('AllCops').fetch('RSpec') - - DEFAULT_PATTERN_RE = Regexp.union( - DEFAULT_CONFIGURATION.fetch('Patterns') - .map(&Regexp.public_method(:new)) - ) - - exclude_from_registry - - # Invoke the original inherited hook so our cops are recognized - def self.inherited(subclass) # rubocop:disable Lint/MissingSuper - RuboCop::Cop::Base.inherited(subclass) - end - - def relevant_file?(file) - relevant_rubocop_rspec_file?(file) && super - end - - private - - def relevant_rubocop_rspec_file?(file) - rspec_pattern.match?(file) - end - - def rspec_pattern - if rspec_pattern_config? - Regexp.union(rspec_pattern_config.map(&Regexp.public_method(:new))) - else - DEFAULT_PATTERN_RE - end - end - - def all_cops_config - config - .for_all_cops - end - - def rspec_pattern_config? - return unless all_cops_config.key?('RSpec') - - all_cops_config.fetch('RSpec').key?('Patterns') - end - - def rspec_pattern_config - all_cops_config - .fetch('RSpec', DEFAULT_CONFIGURATION) - .fetch('Patterns') - end - end - end - end -end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/cop.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/cop.rb deleted file mode 100644 index 0571039518..0000000000 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/cop.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -module RuboCop - module Cop - module RSpec - # @deprecated Use ::RuboCop::Cop::RSpec::Base instead - Cop = Base - end - end -end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/invalid_predicate_matcher.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/invalid_predicate_matcher.rb deleted file mode 100644 index 018b5c9ff4..0000000000 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/invalid_predicate_matcher.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true - -module RuboCop - module Cop - module RSpec - # Checks invalid usage for predicate matcher. - # - # Predicate matcher does not need a question. - # This cop checks an unnecessary question in predicate matcher. - # - # @example - # - # # bad - # expect(foo).to be_something? - # - # # good - # expect(foo).to be_something - class InvalidPredicateMatcher < Base - MSG = 'Omit `?` from `%s`.' - - def_node_matcher :invalid_predicate_matcher?, <<-PATTERN - (send (send nil? :expect ...) #{Runners::ALL.node_pattern_union} $(send nil? #predicate?)) - PATTERN - - def on_send(node) - invalid_predicate_matcher?(node) do |predicate| - add_offense(predicate, - message: format(MSG, matcher: predicate.method_name)) - end - end - - private - - def predicate?(name) - name = name.to_s - name.start_with?('be_', 'have_') && name.end_with?('?') - end - end - end - end -end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/rspec.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/rspec.rb deleted file mode 100644 index 7c78f4e43e..0000000000 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/rspec.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -module RuboCop - # RuboCop RSpec project namespace - module RSpec - PROJECT_ROOT = Pathname.new(__dir__).parent.parent.expand_path.freeze - CONFIG_DEFAULT = PROJECT_ROOT.join('config', 'default.yml').freeze - CONFIG = YAML.safe_load(CONFIG_DEFAULT.read).freeze - - private_constant(:CONFIG_DEFAULT, :PROJECT_ROOT) - end -end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/rspec/empty_line_separation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/rspec/empty_line_separation.rb deleted file mode 100644 index ac0b9d5823..0000000000 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/rspec/empty_line_separation.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -module RuboCop - module RSpec - # Helps determine the offending location if there is not an empty line - # following the node. Allows comments to follow directly after. - module EmptyLineSeparation - include FinalEndLocation - include RuboCop::Cop::RangeHelp - - def missing_separating_line_offense(node) - return if last_child?(node) - - missing_separating_line(node) do |location| - msg = yield(node.method_name) - add_offense(location, message: msg) do |corrector| - corrector.insert_after(location.end, "\n") - end - end - end - - def missing_separating_line(node) - line = final_end_location(node).line - - line += 1 while comment_line?(processed_source[line]) - - return if processed_source[line].blank? - - yield offending_loc(line) - end - - def offending_loc(last_line) - offending_line = processed_source[last_line - 1] - - content_length = offending_line.lstrip.length - start = offending_line.length - content_length - - source_range(processed_source.buffer, last_line, start, content_length) - end - - def last_child?(node) - return true unless node.parent&.begin_type? - - node.equal?(node.parent.children.last) - end - end - end -end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/rspec/final_end_location.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/rspec/final_end_location.rb deleted file mode 100644 index ce481a939a..0000000000 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/rspec/final_end_location.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -module RuboCop - module RSpec - # Helps find the true end location of nodes which might contain heredocs. - module FinalEndLocation - def final_end_location(start_node) - heredoc_endings = - start_node.each_node(:str, :dstr, :xstr) - .select(&:heredoc?) - .map { |node| node.loc.heredoc_end } - - [start_node.loc.end, *heredoc_endings].max_by(&:line) - end - end - end -end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/rspec/language.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/rspec/language.rb deleted file mode 100644 index 63f6730095..0000000000 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/rspec/language.rb +++ /dev/null @@ -1,153 +0,0 @@ -# frozen_string_literal: true - -module RuboCop - module RSpec - # RSpec public API methods that are commonly used in cops - module Language - # Set of method selectors - class SelectorSet - def initialize(selectors) - @selectors = selectors.freeze - freeze - end - - def ==(other) - selectors.eql?(other.selectors) - end - - def +(other) - self.class.new(selectors + other.selectors) - end - - def include?(selector) - selectors.include?(selector) - end - - def block_pattern - "(block #{send_pattern} ...)" - end - - def block_pass_pattern - "(send #rspec? #{node_pattern_union} _ block_pass)" - end - - def block_or_block_pass_pattern - "{#{block_pattern} #{block_pass_pattern}}" - end - - def send_pattern - "(send #rspec? #{node_pattern_union} ...)" - end - - def send_or_block_or_block_pass_pattern - "{#{send_pattern} #{block_pattern} #{block_pass_pattern}}" - end - - def node_pattern_union - "{#{node_pattern}}" - end - - def node_pattern - selectors.map(&:inspect).join(' ') - end - - def to_a - selectors - end - - protected - - attr_reader :selectors - end - - module ExampleGroups - GROUPS = SelectorSet.new(%i[describe context feature example_group]) - SKIPPED = SelectorSet.new(%i[xdescribe xcontext xfeature]) - FOCUSED = SelectorSet.new(%i[fdescribe fcontext ffeature]) - - ALL = GROUPS + SKIPPED + FOCUSED - end - - module SharedGroups - EXAMPLES = SelectorSet.new(%i[shared_examples shared_examples_for]) - CONTEXT = SelectorSet.new(%i[shared_context]) - - ALL = EXAMPLES + CONTEXT - end - - module Includes - EXAMPLES = SelectorSet.new( - %i[ - it_behaves_like - it_should_behave_like - include_examples - ] - ) - CONTEXT = SelectorSet.new(%i[include_context]) - - ALL = EXAMPLES + CONTEXT - end - - module Examples - EXAMPLES = SelectorSet.new(%i[it specify example scenario its]) - FOCUSED = SelectorSet.new(%i[fit fspecify fexample fscenario focus]) - SKIPPED = SelectorSet.new(%i[xit xspecify xexample xscenario skip]) - PENDING = SelectorSet.new(%i[pending]) - - ALL = EXAMPLES + FOCUSED + SKIPPED + PENDING - end - - module Hooks - ALL = SelectorSet.new( - %i[ - prepend_before - before - append_before - around - prepend_after - after - append_after - ] - ) - - module Scopes - ALL = SelectorSet.new( - %i[ - each - example - context - all - suite - ] - ) - end - end - - module Helpers - ALL = SelectorSet.new(%i[let let!]) - end - - module Subject - ALL = SelectorSet.new(%i[subject subject!]) - end - - module Expectations - ALL = SelectorSet.new(%i[expect is_expected expect_any_instance_of]) - end - - module Runners - ALL = SelectorSet.new(%i[to to_not not_to]) - end - - ALL = - ExampleGroups::ALL + - SharedGroups::ALL + - Examples::ALL + - Hooks::ALL + - Helpers::ALL + - Subject::ALL + - Expectations::ALL + - Runners::ALL - end - end -end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/rspec/language/node_pattern.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/rspec/language/node_pattern.rb deleted file mode 100644 index 82b0bbb050..0000000000 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/rspec/language/node_pattern.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -module RuboCop - module RSpec - module Language - # Common node matchers used for matching against the rspec DSL - module NodePattern - extend RuboCop::NodePattern::Macros - - def_node_matcher :rspec?, '{(const {nil? cbase} :RSpec) nil?}' - - def_node_matcher :example_group?, ExampleGroups::ALL.block_pattern - def_node_matcher :shared_group?, SharedGroups::ALL.block_pattern - - spec_groups = ExampleGroups::ALL + SharedGroups::ALL - def_node_matcher :spec_group?, spec_groups.block_pattern - - def_node_matcher :example_group_with_body?, <<-PATTERN - (block #{ExampleGroups::ALL.send_pattern} args !nil?) - PATTERN - - def_node_matcher :example?, Examples::ALL.block_pattern - - def_node_matcher :hook?, Hooks::ALL.block_pattern - - def_node_matcher :let?, Helpers::ALL.block_or_block_pass_pattern - - def_node_matcher :include?, - Includes::ALL.send_or_block_or_block_pass_pattern - - def_node_matcher :subject?, Subject::ALL.block_pattern - end - end - end -end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/rspec/top_level_describe.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/rspec/top_level_describe.rb deleted file mode 100644 index d637d63998..0000000000 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/rspec/top_level_describe.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -module RuboCop - module RSpec - # Helper methods for top level describe cops - module TopLevelDescribe - extend NodePattern::Macros - - def on_send(node) - return unless respond_to?(:on_top_level_describe) - return unless top_level_describe?(node) - - on_top_level_describe(node, node.arguments) - end - - private - - def top_level_describe?(node) - return false unless node.method?(:describe) - - top_level_nodes.include?(node) - end - - def top_level_nodes - nodes = describe_statement_children(root_node) - # If we have no top level describe statements, we need to check any - # blocks on the top level (e.g. after a require). - if nodes.empty? - nodes = root_node.each_child_node(:block).flat_map do |child| - describe_statement_children(child) - end - end - - nodes - end - - def root_node - processed_source.ast - end - - def single_top_level_describe? - top_level_nodes.one? - end - - def describe_statement_children(node) - node.each_child_node(:send).select do |element| - element.method?(:describe) - end - end - end - end -end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/rspec/top_level_group.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/rspec/top_level_group.rb deleted file mode 100644 index cfe56ea954..0000000000 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/rspec/top_level_group.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -module RuboCop - module RSpec - # Helper methods for top level example group cops - module TopLevelGroup - extend RuboCop::NodePattern::Macros - include RuboCop::RSpec::Language - - def_node_matcher :example_or_shared_group?, - (ExampleGroups::ALL + SharedGroups::ALL).block_pattern - - def on_new_investigation - super - - return unless root_node - - top_level_groups.each do |node| - on_top_level_example_group(node) if example_group?(node) - on_top_level_group(node) - end - end - - def top_level_groups - @top_level_groups ||= - top_level_nodes(root_node).select { |n| example_or_shared_group?(n) } - end - - private - - # Dummy methods to be overridden in the consumer - def on_top_level_example_group(_node); end - - def on_top_level_group(_node); end - - def top_level_group?(node) - top_level_groups.include?(node) - end - - def top_level_nodes(node) - if node.nil? - [] - elsif node.begin_type? - node.children - elsif node.module_type? || node.class_type? - top_level_nodes(node.body) - else - [node] - end - end - - def root_node - processed_source.ast - end - end - end -end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/rspec/variable.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/rspec/variable.rb deleted file mode 100644 index 887f20ca72..0000000000 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/rspec/variable.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -module RuboCop - module RSpec - # Helps check offenses with variable definitions - module Variable - include Language - extend RuboCop::NodePattern::Macros - - def_node_matcher :variable_definition?, <<~PATTERN - (send nil? #{(Helpers::ALL + Subject::ALL).node_pattern_union} - $({sym str dsym dstr} ...) ...) - PATTERN - end - end -end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/config/default.yml b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/config/default.yml similarity index 91% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/config/default.yml rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/config/default.yml index 7f7daf15d0..a7be062003 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/config/default.yml +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/config/default.yml @@ -1,14 +1,85 @@ --- -AllCops: - RSpec: - Patterns: - - _spec.rb - - "(?:^|/)spec/" - RSpec/FactoryBot: - Patterns: - - spec/factories.rb - - spec/factories/**/*.rb - - features/support/factories/**/*.rb +RSpec: + Include: + - "**/*_spec.rb" + - "**/spec/**/*" + Language: + ExampleGroups: + Regular: + - describe + - context + - feature + - example_group + Skipped: + - xdescribe + - xcontext + - xfeature + Focused: + - fdescribe + - fcontext + - ffeature + Examples: + Regular: + - it + - specify + - example + - scenario + - its + Focused: + - fit + - fspecify + - fexample + - fscenario + - focus + Skipped: + - xit + - xspecify + - xexample + - xscenario + - skip + Pending: + - pending + Expectations: + - expect + - is_expected + - expect_any_instance_of + Helpers: + - let + - let! + Hooks: + - prepend_before + - before + - append_before + - around + - prepend_after + - after + - append_after + HookScopes: + - each + - example + - context + - all + - suite + Includes: + Examples: + - it_behaves_like + - it_should_behave_like + - include_examples + Context: + - include_context + Runners: + - to + - to_not + - not_to + SharedGroups: + Examples: + - shared_examples + - shared_examples_for + Context: + - shared_context + Subjects: + - subject + - subject! RSpec/AlignLeftLetBrace: Description: Checks that left braces for adjacent single line lets are aligned. @@ -136,8 +207,8 @@ RSpec/Dialect: RSpec/EmptyExampleGroup: Description: Checks if an example group does not include any tests. Enabled: true - CustomIncludeMethods: [] VersionAdded: '1.7' + VersionChanged: '2.0' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyExampleGroup RSpec/EmptyHook: @@ -241,6 +312,9 @@ RSpec/ExpectOutput: RSpec/FilePath: Description: Checks that spec file paths are consistent and well-formed. Enabled: true + Include: + - "**/*_spec*rb*" + - "**/spec/**/*" CustomTransform: RuboCop: rubocop RSpec: rspec @@ -315,12 +389,6 @@ RSpec/InstanceVariable: VersionChanged: '1.7' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable -RSpec/InvalidPredicateMatcher: - Description: Checks invalid usage for predicate matcher. - Enabled: true - VersionAdded: '1.16' - StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InvalidPredicateMatcher - RSpec/ItBehavesLike: Description: Checks that only one `it_behaves_like` style is used. Enabled: true @@ -561,7 +629,7 @@ RSpec/SingleArgumentMessageChain: RSpec/StubbedMock: Description: Checks that message expectations do not have a configured response. - Enabled: pending + Enabled: true VersionAdded: '1.44' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/StubbedMock @@ -620,49 +688,68 @@ RSpec/Yield: VersionAdded: '1.32' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Yield -Capybara/CurrentPathExpectation: +RSpec/Capybara/CurrentPathExpectation: Description: Checks that no expectations are set on Capybara's `current_path`. Enabled: true VersionAdded: '1.18' + VersionChanged: '2.0' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/CurrentPathExpectation -Capybara/FeatureMethods: +RSpec/Capybara/FeatureMethods: Description: Checks for consistent method usage in feature specs. Enabled: true EnabledMethods: [] VersionAdded: '1.17' - VersionChanged: '1.25' + VersionChanged: '2.0' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/FeatureMethods -Capybara/VisibilityMatcher: +RSpec/Capybara/VisibilityMatcher: Description: Checks for boolean visibility in capybara finders. Enabled: true VersionAdded: '1.39' + VersionChanged: '2.0' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/VisibilityMatcher -FactoryBot/AttributeDefinedStatically: +RSpec/FactoryBot/AttributeDefinedStatically: Description: Always declare attribute values as blocks. Enabled: true + Include: + - spec/factories.rb + - spec/factories/**/*.rb + - features/support/factories/**/*.rb VersionAdded: '1.28' + VersionChanged: '2.0' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/AttributeDefinedStatically -FactoryBot/CreateList: +RSpec/FactoryBot/CreateList: Description: Checks for create_list usage. Enabled: true + Include: + - "**/*_spec.rb" + - "**/spec/**/*" + - spec/factories.rb + - spec/factories/**/*.rb + - features/support/factories/**/*.rb EnforcedStyle: create_list SupportedStyles: - create_list - n_times VersionAdded: '1.25' + VersionChanged: '2.0' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/CreateList -FactoryBot/FactoryClassName: +RSpec/FactoryBot/FactoryClassName: Description: Use string value when setting the class attribute explicitly. Enabled: true + Include: + - spec/factories.rb + - spec/factories/**/*.rb + - features/support/factories/**/*.rb VersionAdded: '1.37' + VersionChanged: '2.0' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/FactoryClassName -Rails/HttpStatus: +RSpec/Rails/HttpStatus: Description: Enforces use of symbolic or numeric value to describe HTTP status. Enabled: true EnforcedStyle: symbolic @@ -670,4 +757,5 @@ Rails/HttpStatus: - numeric - symbolic VersionAdded: '1.23' + VersionChanged: '2.0' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/HttpStatus diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop-rspec.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop-rspec.rb similarity index 78% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop-rspec.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop-rspec.rb index 006e39ee38..2b9cef84da 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop-rspec.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop-rspec.rb @@ -5,26 +5,25 @@ require 'yaml' require 'rubocop' -require_relative 'rubocop/rspec' require_relative 'rubocop/rspec/version' require_relative 'rubocop/rspec/inject' require_relative 'rubocop/rspec/node' -require_relative 'rubocop/rspec/top_level_describe' require_relative 'rubocop/rspec/wording' -require_relative 'rubocop/rspec/language' require_relative 'rubocop/rspec/language/node_pattern' -require_relative 'rubocop/rspec/top_level_group' +require_relative 'rubocop/rspec/language' + +require_relative 'rubocop/cop/rspec/mixin/top_level_group' +require_relative 'rubocop/cop/rspec/mixin/variable' +require_relative 'rubocop/cop/rspec/mixin/final_end_location' +require_relative 'rubocop/cop/rspec/mixin/empty_line_separation' + require_relative 'rubocop/rspec/concept' require_relative 'rubocop/rspec/example_group' require_relative 'rubocop/rspec/example' require_relative 'rubocop/rspec/hook' -require_relative 'rubocop/rspec/variable' require_relative 'rubocop/cop/rspec/base' -require_relative 'rubocop/cop/rspec/cop' require_relative 'rubocop/rspec/align_let_brace' require_relative 'rubocop/rspec/factory_bot' -require_relative 'rubocop/rspec/final_end_location' -require_relative 'rubocop/rspec/empty_line_separation' require_relative 'rubocop/rspec/corrector/move_node' RuboCop::RSpec::Inject.defaults! diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/align_left_let_brace.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/align_left_let_brace.rb similarity index 87% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/align_left_let_brace.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/align_left_let_brace.rb index ebe3189f7d..1d943c23e1 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/align_left_let_brace.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/align_left_let_brace.rb @@ -27,11 +27,9 @@ module RuboCop end def on_new_investigation + super return if processed_source.blank? - token_aligner = - RuboCop::RSpec::AlignLetBrace.new(processed_source.ast, :begin) - token_aligner.offending_tokens.each do |let| add_offense(let.loc.begin) do |corrector| corrector.insert_before( @@ -40,6 +38,12 @@ module RuboCop end end end + + private + + def token_aligner + RuboCop::RSpec::AlignLetBrace.new(processed_source.ast, :begin) + end end end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/align_right_let_brace.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/align_right_let_brace.rb similarity index 87% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/align_right_let_brace.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/align_right_let_brace.rb index 62c88bc047..93e7fc464a 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/align_right_let_brace.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/align_right_let_brace.rb @@ -27,11 +27,9 @@ module RuboCop end def on_new_investigation + super return if processed_source.blank? - token_aligner = - RuboCop::RSpec::AlignLetBrace.new(processed_source.ast, :end) - token_aligner.offending_tokens.each do |let| add_offense(let.loc.end) do |corrector| corrector.insert_before( @@ -40,6 +38,12 @@ module RuboCop end end end + + private + + def token_aligner + RuboCop::RSpec::AlignLetBrace.new(processed_source.ast, :end) + end end end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/any_instance.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/any_instance.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/any_instance.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/any_instance.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/around_block.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/around_block.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/around_block.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/around_block.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/base.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/base.rb new file mode 100644 index 0000000000..93c174a7e9 --- /dev/null +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/base.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true + +module RuboCop + module Cop + module RSpec + # @abstract parent class to RSpec cops + class Base < ::RuboCop::Cop::Base + include RuboCop::RSpec::Language + extend RuboCop::RSpec::Language::NodePattern + + exclude_from_registry + + # Invoke the original inherited hook so our cops are recognized + def self.inherited(subclass) # rubocop:disable Lint/MissingSuper + RuboCop::Cop::Base.inherited(subclass) + end + + # Set the config for dynamic DSL configuration-aware helpers + # that have no other means of accessing the configuration. + def on_new_investigation + super + RuboCop::RSpec::Language.config = config['RSpec']['Language'] + end + end + end + end +end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/be.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/be.rb similarity index 92% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/be.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/be.rb index 5f388c2991..af2cfca896 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/be.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/be.rb @@ -23,7 +23,7 @@ module RuboCop MSG = 'Don\'t use `be` without an argument.' def_node_matcher :be_without_args, <<-PATTERN - (send _ #{Runners::ALL.node_pattern_union} $(send nil? :be)) + (send _ #Runners.all $(send nil? :be)) PATTERN def on_send(node) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/be_eql.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/be_eql.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/be_eql.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/be_eql.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/before_after_all.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/before_after_all.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/before_after_all.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/before_after_all.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/capybara/current_path_expectation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/capybara/current_path_expectation.rb similarity index 96% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/capybara/current_path_expectation.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/capybara/current_path_expectation.rb index 9f4f1fd517..5d692843b0 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/capybara/current_path_expectation.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/capybara/current_path_expectation.rb @@ -37,13 +37,13 @@ module RuboCop # Supported matchers: eq(...) / match(/regexp/) / match('regexp') def_node_matcher :as_is_matcher, <<-PATTERN (send - #expectation_set_on_current_path $#{Runners::ALL.node_pattern_union} + #expectation_set_on_current_path $#Runners.all ${(send nil? :eq ...) (send nil? :match (regexp ...))}) PATTERN def_node_matcher :regexp_str_matcher, <<-PATTERN (send - #expectation_set_on_current_path $#{Runners::ALL.node_pattern_union} + #expectation_set_on_current_path $#Runners.all $(send nil? :match (str $_))) PATTERN diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/capybara/feature_methods.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/capybara/feature_methods.rb similarity index 96% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/capybara/feature_methods.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/capybara/feature_methods.rb index 5ff784806f..96cdbd7ad3 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/capybara/feature_methods.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/capybara/feature_methods.rb @@ -55,8 +55,9 @@ module RuboCop feature: :describe }.freeze - def_node_matcher :capybara_speak, - SelectorSet.new(MAP.keys).node_pattern_union + def_node_matcher :capybara_speak, <<-PATTERN + {#{MAP.keys.map(&:inspect).join(' ')}} + PATTERN def_node_matcher :spec?, <<-PATTERN (block diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/capybara/visibility_matcher.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/capybara/visibility_matcher.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/capybara/visibility_matcher.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/capybara/visibility_matcher.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/context_method.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/context_method.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/context_method.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/context_method.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/context_wording.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/context_wording.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/context_wording.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/context_wording.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/describe_class.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/describe_class.rb similarity index 97% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/describe_class.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/describe_class.rb index e007cb245a..45bb737c48 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/describe_class.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/describe_class.rb @@ -35,7 +35,7 @@ module RuboCop # describe "A feature example", type: :feature do # end class DescribeClass < Base - include RuboCop::RSpec::TopLevelGroup + include TopLevelGroup MSG = 'The first argument to describe should be '\ 'the class or module being tested.' diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/describe_method.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/describe_method.rb similarity index 95% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/describe_method.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/describe_method.rb index cfc1e81483..2ff64e760d 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/describe_method.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/describe_method.rb @@ -17,7 +17,7 @@ module RuboCop # describe MyClass, '.my_class_method' do # end class DescribeMethod < Base - include RuboCop::RSpec::TopLevelGroup + include TopLevelGroup MSG = 'The second argument to describe should be the method '\ "being tested. '#instance' or '.class'." diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/describe_symbol.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/describe_symbol.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/describe_symbol.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/describe_symbol.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/described_class.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/described_class.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/described_class.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/described_class.rb index 6f4e945d07..0d5deb2c45 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/described_class.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/described_class.rb @@ -65,8 +65,7 @@ module RuboCop (block (send (const nil? {:Class :Module :Struct}) :new ...) ...) PATTERN - def_node_matcher :rspec_block?, - RuboCop::RSpec::Language::ALL.block_pattern + def_node_matcher :rspec_block?, block_pattern('#ALL.all') def_node_matcher :scope_changing_syntax?, '{def class module}' diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/described_class_module_wrapping.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/described_class_module_wrapping.rb similarity index 88% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/described_class_module_wrapping.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/described_class_module_wrapping.rb index b5b9c867e5..044ec85e22 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/described_class_module_wrapping.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/described_class_module_wrapping.rb @@ -22,8 +22,7 @@ module RuboCop class DescribedClassModuleWrapping < Base MSG = 'Avoid opening modules and defining specs within them.' - def_node_search :find_rspec_blocks, - ExampleGroups::ALL.block_pattern + def_node_search :find_rspec_blocks, block_pattern('#ExampleGroups.all') def on_module(node) find_rspec_blocks(node) do diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/dialect.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/dialect.rb similarity index 96% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/dialect.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/dialect.rb index d952d6958c..30cd5b559d 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/dialect.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/dialect.rb @@ -47,7 +47,7 @@ module RuboCop MSG = 'Prefer `%s` over `%s`.' - def_node_matcher :rspec_method?, ALL.send_pattern + def_node_matcher :rspec_method?, send_pattern('#ALL.all') def on_send(node) return unless rspec_method?(node) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/empty_example_group.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/empty_example_group.rb similarity index 78% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/empty_example_group.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/empty_example_group.rb index e2aca88b3c..745e59e2a2 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/empty_example_group.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/empty_example_group.rb @@ -5,8 +5,6 @@ module RuboCop module RSpec # Checks if an example group does not include any tests. # - # This cop is configurable using the `CustomIncludeMethods` option - # # @example usage # # # bad @@ -37,31 +35,6 @@ module RuboCop # describe Bacon do # pending 'will add tests later' # 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 < Base MSG = 'Empty example group detected.' @@ -76,7 +49,7 @@ module RuboCop # @param node [RuboCop::AST::Node] # @yield [RuboCop::AST::Node] example group body def_node_matcher :example_group_body, <<~PATTERN - (block #{ExampleGroups::ALL.send_pattern} args $_) + (block #{send_pattern('#ExampleGroups.all')} args $_) PATTERN # @!method example_or_group_or_include?(node) @@ -95,12 +68,10 @@ module RuboCop # @return [Array] matching nodes def_node_matcher :example_or_group_or_include?, <<~PATTERN { - #{Examples::ALL.send_pattern} - #{Examples::ALL.block_pattern} - #{ExampleGroups::ALL.block_pattern} - #{Includes::ALL.send_pattern} - #{Includes::ALL.block_pattern} - (send nil? #custom_include? ...) + #{block_pattern( + '{#Examples.all #ExampleGroups.all #Includes.all}' + )} + #{send_pattern('{#Examples.all #Includes.all}')} } PATTERN @@ -120,7 +91,7 @@ module RuboCop # @param node [RuboCop::AST::Node] # @return [Array] matching nodes def_node_matcher :examples_inside_block?, <<~PATTERN - (block !#{Hooks::ALL.send_pattern} _ #examples?) + (block !#{send_pattern('#Hooks.all')} _ #examples?) PATTERN # @!method examples_directly_or_in_block?(node) @@ -192,16 +163,6 @@ module RuboCop def examples_in_branches?(if_node) if_node.branches.any? { |branch| examples?(branch) } end - - 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 diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/empty_hook.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/empty_hook.rb similarity index 94% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/empty_hook.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/empty_hook.rb index e272a7bb21..09cb77e459 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/empty_hook.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/empty_hook.rb @@ -29,7 +29,7 @@ module RuboCop MSG = 'Empty hook detected.' def_node_matcher :empty_hook?, <<~PATTERN - (block $#{Hooks::ALL.send_pattern} _ nil?) + (block $#{send_pattern('#Hooks.all')} _ nil?) PATTERN def on_block(node) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/empty_line_after_example.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/empty_line_after_example.rb similarity index 97% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/empty_line_after_example.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/empty_line_after_example.rb index e0d7837391..9122251883 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/empty_line_after_example.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/empty_line_after_example.rb @@ -43,7 +43,7 @@ module RuboCop # class EmptyLineAfterExample < Base extend AutoCorrector - include RuboCop::RSpec::EmptyLineSeparation + include EmptyLineSeparation MSG = 'Add an empty line after `%s`.' diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/empty_line_after_example_group.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/empty_line_after_example_group.rb similarity index 94% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/empty_line_after_example_group.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/empty_line_after_example_group.rb index e02fb73ba1..e0f89f8854 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/empty_line_after_example_group.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/empty_line_after_example_group.rb @@ -25,7 +25,7 @@ module RuboCop # class EmptyLineAfterExampleGroup < Base extend AutoCorrector - include RuboCop::RSpec::EmptyLineSeparation + include EmptyLineSeparation MSG = 'Add an empty line after `%s`.' diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/empty_line_after_final_let.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/empty_line_after_final_let.rb similarity index 94% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/empty_line_after_final_let.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/empty_line_after_final_let.rb index 9bfc56391d..1f91190edf 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/empty_line_after_final_let.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/empty_line_after_final_let.rb @@ -18,7 +18,7 @@ module RuboCop # it { does_something } class EmptyLineAfterFinalLet < Base extend AutoCorrector - include RuboCop::RSpec::EmptyLineSeparation + include EmptyLineSeparation MSG = 'Add an empty line after the last `%s`.' diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/empty_line_after_hook.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/empty_line_after_hook.rb similarity index 95% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/empty_line_after_hook.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/empty_line_after_hook.rb index 4728ffdcb7..bf2ae16f68 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/empty_line_after_hook.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/empty_line_after_hook.rb @@ -35,7 +35,7 @@ module RuboCop # class EmptyLineAfterHook < Base extend AutoCorrector - include RuboCop::RSpec::EmptyLineSeparation + include EmptyLineSeparation MSG = 'Add an empty line after `%s`.' diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/empty_line_after_subject.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/empty_line_after_subject.rb similarity index 88% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/empty_line_after_subject.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/empty_line_after_subject.rb index bed4d1606e..4f77350504 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/empty_line_after_subject.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/empty_line_after_subject.rb @@ -16,7 +16,7 @@ module RuboCop # let(:foo) { bar } class EmptyLineAfterSubject < Base extend AutoCorrector - include RuboCop::RSpec::EmptyLineSeparation + include EmptyLineSeparation MSG = 'Add an empty line after `%s`.' @@ -32,7 +32,7 @@ module RuboCop def in_spec_block?(node) node.each_ancestor(:block).any? do |ancestor| - Examples::ALL.include?(ancestor.method_name) + Examples.all(ancestor.method_name) end end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/example_length.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/example_length.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/example_length.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/example_length.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/example_without_description.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/example_without_description.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/example_without_description.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/example_without_description.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/example_wording.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/example_wording.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/example_wording.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/example_wording.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/expect_actual.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/expect_actual.rb similarity index 97% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/expect_actual.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/expect_actual.rb index 2b897ad8e6..b520882d82 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/expect_actual.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/expect_actual.rb @@ -48,7 +48,7 @@ module RuboCop def_node_matcher :expect_literal, <<~PATTERN (send (send nil? :expect $#literal?) - #{Runners::ALL.node_pattern_union} + #Runners.all { (send (send nil? $:be) :== $_) (send nil? $_ $_ ...) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/expect_change.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/expect_change.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/expect_change.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/expect_change.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/expect_in_hook.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/expect_in_hook.rb similarity index 93% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/expect_in_hook.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/expect_in_hook.rb index 79f7c929c7..dc9d6fcc4b 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/expect_in_hook.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/expect_in_hook.rb @@ -23,7 +23,7 @@ module RuboCop class ExpectInHook < Base MSG = 'Do not use `%s` in `%s` hook' - def_node_search :expectation, Expectations::ALL.send_pattern + def_node_search :expectation, send_pattern('#Expectations.all') def on_block(node) return unless hook?(node) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/expect_output.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/expect_output.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/expect_output.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/expect_output.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/factory_bot/create_list.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/factory_bot/create_list.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/factory_bot/create_list.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/factory_bot/create_list.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/file_path.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/file_path.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/file_path.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/file_path.rb index 544095dce4..9409ad4b94 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/file_path.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/file_path.rb @@ -57,7 +57,7 @@ module RuboCop # my_class_spec.rb # describe MyClass, '#method' # class FilePath < Base - include RuboCop::RSpec::TopLevelGroup + include TopLevelGroup MSG = 'Spec path should end with `%s`.' diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/focus.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/focus.rb similarity index 68% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/focus.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/focus.rb index d49c77f9ef..4e106efeb8 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/focus.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/focus.rb @@ -22,19 +22,25 @@ module RuboCop class Focus < Base MSG = 'Focused spec found.' - focused = ExampleGroups::FOCUSED + Examples::FOCUSED - - def_node_matcher :focusable_selector?, - (ExampleGroups::GROUPS + ExampleGroups::SKIPPED + - Examples::EXAMPLES + Examples::SKIPPED + - Examples::PENDING).node_pattern_union + def_node_matcher :focusable_selector?, <<-PATTERN + { + #ExampleGroups.regular + #ExampleGroups.skipped + #Examples.regular + #Examples.skipped + #Examples.pending + } + PATTERN def_node_matcher :metadata, <<-PATTERN {(send #rspec? #focusable_selector? <$(sym :focus) ...>) (send #rspec? #focusable_selector? ... (hash <$(pair (sym :focus) true) ...>))} PATTERN - def_node_matcher :focused_block?, focused.send_pattern + def_node_matcher :focused_block?, + send_pattern(<<~PATTERN) + {#ExampleGroups.focused #Examples.focused} + PATTERN def on_send(node) focus_metadata(node) do |focus| diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/hook_argument.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/hook_argument.rb similarity index 94% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/hook_argument.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/hook_argument.rb index b722c10ab2..fc8a1e7678 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/hook_argument.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/hook_argument.rb @@ -64,13 +64,11 @@ module RuboCop IMPLICIT_MSG = 'Omit the default `%p` argument for RSpec hooks.' EXPLICIT_MSG = 'Use `%p` for RSpec hooks.' - def_node_matcher :hook?, Hooks::ALL.node_pattern_union - def_node_matcher :scoped_hook, <<-PATTERN - (block $(send _ #hook? (sym ${:each :example})) ...) + (block $(send _ #Hooks.all (sym ${:each :example})) ...) PATTERN - def_node_matcher :unscoped_hook, '(block $(send _ #hook?) ...)' + def_node_matcher :unscoped_hook, '(block $(send _ #Hooks.all) ...)' def on_block(node) hook(node) do |method_send, scope_name| diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/hooks_before_examples.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/hooks_before_examples.rb similarity index 94% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/hooks_before_examples.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/hooks_before_examples.rb index fa9eea0b91..2c8bc27afb 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/hooks_before_examples.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/hooks_before_examples.rb @@ -30,8 +30,8 @@ module RuboCop def_node_matcher :example_or_group?, <<-PATTERN { - #{(Examples::ALL + ExampleGroups::ALL).block_pattern} - #{Includes::EXAMPLES.send_pattern} + #{block_pattern('{#ExampleGroups.all #Examples.all}')} + #{send_pattern('#Includes.examples')} } PATTERN diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/implicit_block_expectation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/implicit_block_expectation.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/implicit_block_expectation.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/implicit_block_expectation.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/implicit_expect.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/implicit_expect.rb similarity index 96% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/implicit_expect.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/implicit_expect.rb index c08fd877d4..aeb9b974fb 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/implicit_expect.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/implicit_expect.rb @@ -33,7 +33,7 @@ module RuboCop def_node_matcher :implicit_expect, <<-PATTERN { (send nil? ${:should :should_not} ...) - (send (send nil? $:is_expected) #{Runners::ALL.node_pattern_union} ...) + (send (send nil? $:is_expected) #Runners.all ...) } PATTERN diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/implicit_subject.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/implicit_subject.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/implicit_subject.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/implicit_subject.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/instance_spy.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/instance_spy.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/instance_spy.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/instance_spy.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/instance_variable.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/instance_variable.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/instance_variable.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/instance_variable.rb index 4e1ad1b6f8..76ebb7ad61 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/instance_variable.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/instance_variable.rb @@ -47,7 +47,7 @@ module RuboCop # end # class InstanceVariable < Base - include RuboCop::RSpec::TopLevelGroup + include TopLevelGroup MSG = 'Avoid instance variables – use let, ' \ 'a method call, or a local variable (if possible).' diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/it_behaves_like.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/it_behaves_like.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/it_behaves_like.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/it_behaves_like.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/iterated_expectation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/iterated_expectation.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/iterated_expectation.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/iterated_expectation.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/leading_subject.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/leading_subject.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/leading_subject.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/leading_subject.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/leaky_constant_declaration.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/leaky_constant_declaration.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/leaky_constant_declaration.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/leaky_constant_declaration.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/let_before_examples.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/let_before_examples.rb similarity index 94% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/let_before_examples.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/let_before_examples.rb index aeacb76fbd..e01354b950 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/let_before_examples.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/let_before_examples.rb @@ -37,8 +37,8 @@ module RuboCop def_node_matcher :example_or_group?, <<-PATTERN { - #{(Examples::ALL + ExampleGroups::ALL).block_pattern} - #{Includes::EXAMPLES.send_pattern} + #{block_pattern('{#ExampleGroups.all #Examples.all}')} + #{send_pattern('#Includes.examples')} } PATTERN diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/let_setup.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/let_setup.rb similarity index 85% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/let_setup.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/let_setup.rb index 819ae5e4c7..b4c9290231 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/let_setup.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/let_setup.rb @@ -29,10 +29,13 @@ module RuboCop MSG = 'Do not use `let!` to setup objects not referenced in tests.' def_node_matcher :example_or_shared_group_or_including?, - ( - ExampleGroups::ALL + SharedGroups::ALL + - Includes::ALL - ).block_pattern + block_pattern(<<~PATTERN) + { + #SharedGroups.all + #ExampleGroups.all + #Includes.all + } + PATTERN def_node_matcher :let_bang, <<-PATTERN { diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/message_chain.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/message_chain.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/message_chain.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/message_chain.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/message_expectation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/message_expectation.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/message_expectation.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/message_expectation.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/message_spies.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/message_spies.rb similarity index 96% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/message_spies.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/message_spies.rb index e1460d2c03..fa30d09ee4 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/message_spies.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/message_spies.rb @@ -36,7 +36,7 @@ module RuboCop SUPPORTED_STYLES = %w[have_received receive].freeze def_node_matcher :message_expectation, %( - (send (send nil? :expect $_) #{Runners::ALL.node_pattern_union} ...) + (send (send nil? :expect $_) #Runners.all ...) ) def_node_search :receive_message, %( diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/missing_example_group_argument.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/missing_example_group_argument.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/missing_example_group_argument.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/missing_example_group_argument.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/mixin/empty_line_separation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/mixin/empty_line_separation.rb new file mode 100644 index 0000000000..5d48603f20 --- /dev/null +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/mixin/empty_line_separation.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +module RuboCop + module Cop + module RSpec + # Helps determine the offending location if there is not an empty line + # following the node. Allows comments to follow directly after. + module EmptyLineSeparation + include FinalEndLocation + include RangeHelp + + def missing_separating_line_offense(node) + return if last_child?(node) + + missing_separating_line(node) do |location| + msg = yield(node.method_name) + add_offense(location, message: msg) do |corrector| + corrector.insert_after(location.end, "\n") + end + end + end + + def missing_separating_line(node) + line = final_end_location(node).line + + line += 1 while comment_line?(processed_source[line]) + + return if processed_source[line].blank? + + yield offending_loc(line) + end + + def offending_loc(last_line) + offending_line = processed_source[last_line - 1] + + content_length = offending_line.lstrip.length + start = offending_line.length - content_length + + source_range(processed_source.buffer, + last_line, start, content_length) + end + + def last_child?(node) + return true unless node.parent&.begin_type? + + node.equal?(node.parent.children.last) + end + end + end + end +end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/mixin/final_end_location.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/mixin/final_end_location.rb new file mode 100644 index 0000000000..526049f5df --- /dev/null +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/mixin/final_end_location.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module RuboCop + module Cop + module RSpec + # Helps find the true end location of nodes which might contain heredocs. + module FinalEndLocation + def final_end_location(start_node) + heredoc_endings = + start_node.each_node(:str, :dstr, :xstr) + .select(&:heredoc?) + .map { |node| node.loc.heredoc_end } + + [start_node.loc.end, *heredoc_endings].max_by(&:line) + end + end + end + end +end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/mixin/top_level_group.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/mixin/top_level_group.rb new file mode 100644 index 0000000000..c3b48fb1d9 --- /dev/null +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/mixin/top_level_group.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +module RuboCop + module Cop + module RSpec + # Helper methods for top level example group cops + module TopLevelGroup + extend RuboCop::NodePattern::Macros + + def on_new_investigation + super + + top_level_groups.each do |node| + on_top_level_example_group(node) if example_group?(node) + on_top_level_group(node) + end + end + + def top_level_groups + @top_level_groups ||= + top_level_nodes(root_node).select { |n| spec_group?(n) } + end + + private + + # Dummy methods to be overridden in the consumer + def on_top_level_example_group(_node); end + + def on_top_level_group(_node); end + + def top_level_group?(node) + top_level_groups.include?(node) + end + + def top_level_nodes(node) + return [] if node.nil? + + case node.type + when :begin + node.children + when :module, :class + top_level_nodes(node.body) + else + [node] + end + end + + def root_node + processed_source.ast + end + end + end + end +end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/mixin/variable.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/mixin/variable.rb new file mode 100644 index 0000000000..5a855c2abe --- /dev/null +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/mixin/variable.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module RuboCop + module Cop + module RSpec + # Helps check offenses with variable definitions + module Variable + extend RuboCop::NodePattern::Macros + + Subjects = RuboCop::RSpec::Language::Subjects + Helpers = RuboCop::RSpec::Language::Helpers + + def_node_matcher :variable_definition?, <<~PATTERN + (send nil? {#Subjects.all #Helpers.all} + $({sym str dsym dstr} ...) ...) + PATTERN + end + end + end +end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/multiple_describes.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/multiple_describes.rb similarity index 95% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/multiple_describes.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/multiple_describes.rb index 9ca9fb9ae0..14c535f45f 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/multiple_describes.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/multiple_describes.rb @@ -23,7 +23,7 @@ module RuboCop # end # end class MultipleDescribes < Base - include RuboCop::RSpec::TopLevelGroup + include TopLevelGroup MSG = 'Do not use multiple top-level example groups - '\ 'try to nest them.' diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/multiple_expectations.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/multiple_expectations.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/multiple_expectations.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/multiple_expectations.rb index 865e2a6962..79abeb1c77 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/multiple_expectations.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/multiple_expectations.rb @@ -60,7 +60,7 @@ module RuboCop } ...) PATTERN - def_node_matcher :expect?, Expectations::ALL.send_pattern + def_node_matcher :expect?, send_pattern('#Expectations.all') def_node_matcher :aggregate_failures_block?, <<-PATTERN (block (send nil? :aggregate_failures ...) ...) PATTERN diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb index 4ad7a0cf21..674b383b93 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb @@ -85,7 +85,7 @@ module RuboCop # class MultipleMemoizedHelpers < Base include ConfigurableMax - include RuboCop::RSpec::Variable + include Variable MSG = 'Example group has too many memoized helpers [%d/%d]' @@ -101,6 +101,7 @@ module RuboCop end def on_new_investigation + super @example_group_memoized_helpers = {} end @@ -128,6 +129,7 @@ module RuboCop def variable_nodes(node) example_group = RuboCop::RSpec::ExampleGroup.new(node) + if allow_subject? example_group.lets else diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/multiple_subjects.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/multiple_subjects.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/multiple_subjects.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/multiple_subjects.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/named_subject.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/named_subject.rb similarity index 79% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/named_subject.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/named_subject.rb index 44d30a7b17..b462d5fae4 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/named_subject.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/named_subject.rb @@ -42,24 +42,20 @@ module RuboCop # it { is_expected.to be_valid } # end class NamedSubject < Base - MSG = 'Name your test subject if you need '\ - 'to reference it explicitly.' + MSG = 'Name your test subject if you need to reference it explicitly.' - def_node_matcher :rspec_block?, <<-PATTERN - { - #{Examples::ALL.block_pattern} - #{Hooks::ALL.block_pattern} - } - PATTERN + def_node_matcher :example_or_hook_block?, + block_pattern('{#Examples.all #Hooks.all}') - def_node_matcher :shared_example?, <<-PATTERN - #{SharedGroups::EXAMPLES.block_pattern} - PATTERN + def_node_matcher :shared_example?, + block_pattern('#SharedGroups.examples') def_node_search :subject_usage, '$(send nil? :subject)' def on_block(node) - return if !rspec_block?(node) || ignored_shared_example?(node) + if !example_or_hook_block?(node) || ignored_shared_example?(node) + return + end subject_usage(node) do |subject_node| add_offense(subject_node.loc.selector) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/nested_groups.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/nested_groups.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/nested_groups.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/nested_groups.rb index 44301d789c..c9a6e9e5fa 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/nested_groups.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/nested_groups.rb @@ -87,7 +87,7 @@ module RuboCop # class NestedGroups < Base include ConfigurableMax - include RuboCop::RSpec::TopLevelGroup + include TopLevelGroup MSG = 'Maximum example group nesting exceeded [%d/%d].' diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/not_to_not.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/not_to_not.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/not_to_not.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/not_to_not.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/overwriting_setup.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/overwriting_setup.rb similarity index 95% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/overwriting_setup.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/overwriting_setup.rb index 5e0cbe14bd..973e9e007b 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/overwriting_setup.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/overwriting_setup.rb @@ -24,7 +24,8 @@ module RuboCop class OverwritingSetup < Base MSG = '`%s` is already defined.' - def_node_matcher :setup?, (Helpers::ALL + Subject::ALL).block_pattern + def_node_matcher :setup?, block_pattern('{#Helpers.all #Subjects.all}') + def_node_matcher :first_argument_name, '(send _ _ ({str sym} $_))' def on_block(node) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/pending.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/pending.rb similarity index 71% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/pending.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/pending.rb index 830c18a7a2..4b04ab7ff1 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/pending.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/pending.rb @@ -34,10 +34,10 @@ module RuboCop class Pending < Base MSG = 'Pending spec found.' - PENDING = Examples::PENDING + Examples::SKIPPED + ExampleGroups::SKIPPED - SKIPPABLE = ExampleGroups::GROUPS + Examples::EXAMPLES - - def_node_matcher :skippable?, SKIPPABLE.send_pattern + def_node_matcher :skippable?, + send_pattern(<<~PATTERN) + {#ExampleGroups.regular #Examples.regular} + PATTERN def_node_matcher :skipped_in_metadata?, <<-PATTERN { @@ -47,7 +47,15 @@ module RuboCop PATTERN def_node_matcher :skip_or_pending?, '{(sym :skip) (sym :pending)}' - def_node_matcher :pending_block?, PENDING.send_pattern + + def_node_matcher :pending_block?, + send_pattern(<<~PATTERN) + { + #ExampleGroups.skipped + #Examples.skipped + #Examples.pending + } + PATTERN def on_send(node) return unless pending_block?(node) || skipped?(node) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/predicate_matcher.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/predicate_matcher.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/predicate_matcher.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/predicate_matcher.rb index 13d1f6fbef..77c7e1d42f 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/predicate_matcher.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/predicate_matcher.rb @@ -30,7 +30,7 @@ module RuboCop (send nil? :expect { (block $(send !nil? #predicate? ...) ...) $(send !nil? #predicate? ...)}) - $#{Runners::ALL.node_pattern_union} + $#Runners.all $#boolean_matcher?) PATTERN @@ -155,7 +155,7 @@ module RuboCop def_node_matcher :predicate_matcher?, <<-PATTERN (send (send nil? :expect $!nil?) - #{Runners::ALL.node_pattern_union} + #Runners.all {$(send nil? #predicate_matcher_name? ...) (block $(send nil? #predicate_matcher_name? ...) ...)}) PATTERN @@ -164,7 +164,7 @@ module RuboCop (block (send (send nil? :expect $!nil?) - #{Runners::ALL.node_pattern_union} + #Runners.all $(send nil? #predicate_matcher_name?)) ...) PATTERN diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/rails/http_status.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/rails/http_status.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/rails/http_status.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/rails/http_status.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/receive_counts.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/receive_counts.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/receive_counts.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/receive_counts.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/receive_never.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/receive_never.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/receive_never.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/receive_never.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/repeated_description.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/repeated_description.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/repeated_description.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/repeated_description.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/repeated_example.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/repeated_example.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/repeated_example.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/repeated_example.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/repeated_example_group_body.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/repeated_example_group_body.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/repeated_example_group_body.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/repeated_example_group_body.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/repeated_example_group_description.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/repeated_example_group_description.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/repeated_example_group_description.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/repeated_example_group_description.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/repeated_include_example.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/repeated_include_example.rb similarity index 94% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/repeated_include_example.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/repeated_include_example.rb index c631aa06c2..57d02a2a42 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/repeated_include_example.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/repeated_include_example.rb @@ -54,10 +54,11 @@ module RuboCop (begin <#include_examples? #include_examples? ...>) PATTERN - def_node_matcher :include_examples?, Includes::EXAMPLES.send_pattern + def_node_matcher :include_examples?, + send_pattern('#Includes.examples') def_node_matcher :shared_examples_name, <<-PATTERN - (send _ #{Includes::EXAMPLES.node_pattern_union} $_ ...) + (send _ #Includes.examples $_ ...) PATTERN def on_begin(node) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/return_from_stub.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/return_from_stub.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/return_from_stub.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/return_from_stub.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/scattered_let.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/scattered_let.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/scattered_let.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/scattered_let.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/scattered_setup.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/scattered_setup.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/scattered_setup.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/scattered_setup.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/shared_context.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/shared_context.rb similarity index 79% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/shared_context.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/shared_context.rb index 34a9088885..c15f8a2768 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/shared_context.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/shared_context.rb @@ -59,14 +59,24 @@ module RuboCop MSG_CONTEXT = "Use `shared_context` when you don't "\ 'define examples.' - examples = (Examples::ALL + Includes::EXAMPLES) - def_node_search :examples?, examples.send_pattern + def_node_search :examples?, + send_pattern('{#Includes.examples #Examples.all}') - context = (Hooks::ALL + Helpers::ALL + Includes::CONTEXT + Subject::ALL) - def_node_search :context?, context.send_pattern + def_node_search :context?, <<-PATTERN + ( + send #rspec? { + #Subjects.all + #Helpers.all + #Includes.context + #Hooks.all + } ... + ) + PATTERN - def_node_matcher :shared_context, SharedGroups::CONTEXT.block_pattern - def_node_matcher :shared_example, SharedGroups::EXAMPLES.block_pattern + def_node_matcher :shared_context, + block_pattern('#SharedGroups.context') + def_node_matcher :shared_example, + block_pattern('#SharedGroups.examples') def on_block(node) context_with_only_examples(node) do diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/shared_examples.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/shared_examples.rb similarity index 93% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/shared_examples.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/shared_examples.rb index 10732d30cb..7bdf2d408f 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/shared_examples.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/shared_examples.rb @@ -24,7 +24,9 @@ module RuboCop extend AutoCorrector def_node_matcher :shared_examples, - (SharedGroups::ALL + Includes::ALL).send_pattern + send_pattern( + '{#SharedGroups.all #Includes.all}' + ) def on_send(node) shared_examples(node) do diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/single_argument_message_chain.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/single_argument_message_chain.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/single_argument_message_chain.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/single_argument_message_chain.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/stubbed_mock.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/stubbed_mock.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/stubbed_mock.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/stubbed_mock.rb index bd508ceafc..cdf4b9be7d 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/stubbed_mock.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/stubbed_mock.rb @@ -60,7 +60,7 @@ module RuboCop # @yield [RuboCop::AST::Node] expectation, method name, matcher def_node_matcher :expectation, <<~PATTERN (send - $(send nil? $#{Expectations::ALL.node_pattern_union} ...) + $(send nil? $#Expectations.all ...) :to $_) PATTERN diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/subject_stub.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/subject_stub.rb similarity index 97% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/subject_stub.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/subject_stub.rb index 6d061ba4fd..ca5d04d6a3 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/subject_stub.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/subject_stub.rb @@ -22,7 +22,7 @@ module RuboCop # end # class SubjectStub < Base - include RuboCop::RSpec::TopLevelGroup + include TopLevelGroup MSG = 'Do not stub methods of the object under test.' @@ -66,7 +66,7 @@ module RuboCop (send nil? { :expect :allow } (send nil? {% :subject})) (send nil? :is_expected) } - #{Runners::ALL.node_pattern_union} + #Runners.all #message_expectation_matcher? ) PATTERN diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/unspecified_exception.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/unspecified_exception.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/unspecified_exception.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/unspecified_exception.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/variable_definition.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/variable_definition.rb similarity index 97% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/variable_definition.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/variable_definition.rb index 91485d3f38..764168e948 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib/rubocop/cop/rspec/variable_definition.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.0.0/lib/rubocop/cop/rspec/variable_definition.rb @@ -24,7 +24,7 @@ module RuboCop # let('user_name') { 'Adam' } class VariableDefinition < Base include ConfigurableEnforcedStyle - include RuboCop::RSpec::Variable + include Variable MSG = 'Use %