diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 167f4ffdb3..12c6f8444b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -24,7 +24,7 @@ jobs: restore-keys: ${{ runner.os }}-rubygems- - name: Install Bundler RubyGems - run: brew install-bundler-gems + run: brew install-bundler-gems --groups=sorbet - name: Install shellcheck run: brew install shellcheck @@ -60,7 +60,7 @@ jobs: restore-keys: ${{ runner.os }}-rubygems- - name: Install Bundler RubyGems - run: brew install-bundler-gems + run: brew install-bundler-gems --groups=sorbet - run: brew doctor @@ -152,7 +152,7 @@ jobs: # Can't cache this because we need to check that it doesn't fail the # "uncommitted RubyGems" step with a cold cache. - name: Install Bundler RubyGems - run: brew install-bundler-gems + run: brew install-bundler-gems --groups=sorbet - name: Check for uncommitted RubyGems run: git diff --stat --exit-code Library/Homebrew/vendor/bundle/ruby @@ -206,7 +206,7 @@ jobs: restore-keys: ${{ runner.os }}-rubygems- - name: Install Bundler RubyGems - run: brew install-bundler-gems + run: brew install-bundler-gems --groups=sorbet - name: Create parallel test log directory run: mkdir tests @@ -227,7 +227,7 @@ jobs: env: HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - uses: codecov/codecov-action@a1ed4b322b4b38cb846afb5a0ebfa17086917d27 + - uses: codecov/codecov-action@29386c70ef20e286228c72b668a06fd0e8399192 test-default-formula-linux: name: test default formula (Linux) @@ -265,7 +265,7 @@ jobs: # Can't cache this because we need to check that it doesn't fail the # "uncommitted RubyGems" step with a cold cache. - name: Install Bundler RubyGems - run: brew install-bundler-gems + run: brew install-bundler-gems --groups=sorbet - name: Check for uncommitted RubyGems run: git diff --stat --exit-code Library/Homebrew/vendor/bundle/ruby @@ -319,4 +319,4 @@ jobs: - run: brew test-bot --only-formulae --test-default-formula - - uses: codecov/codecov-action@a1ed4b322b4b38cb846afb5a0ebfa17086917d27 + - uses: codecov/codecov-action@29386c70ef20e286228c72b668a06fd0e8399192 diff --git a/Library/Homebrew/.bundle/config b/Library/Homebrew/.bundle/config index 24c48a4c9d..e2c528e14d 100644 --- a/Library/Homebrew/.bundle/config +++ b/Library/Homebrew/.bundle/config @@ -2,6 +2,7 @@ BUNDLE_BIN: "false" BUNDLE_CLEAN: "true" BUNDLE_DISABLE_SHARED_GEMS: "true" +BUNDLE_FORGET_CLI_OPTIONS: "true" BUNDLE_JOBS: "4" BUNDLE_PATH: "vendor/bundle" BUNDLE_RETRY: "3" diff --git a/Library/Homebrew/.rubocop_todo.yml b/Library/Homebrew/.rubocop_todo.yml index dc0b0f6ba9..ad5c59bac7 100644 --- a/Library/Homebrew/.rubocop_todo.yml +++ b/Library/Homebrew/.rubocop_todo.yml @@ -8,6 +8,7 @@ Style/Documentation: - "cask/macos.rb" - "cli/args.rb" - "cli/parser.rb" + - "default_prefix.rb" - "global.rb" - "keg_relocate.rb" - "os/linux/global.rb" diff --git a/Library/Homebrew/Gemfile b/Library/Homebrew/Gemfile index 5c755eab6b..70c9b44ba2 100644 --- a/Library/Homebrew/Gemfile +++ b/Library/Homebrew/Gemfile @@ -13,17 +13,20 @@ gem "rspec", require: false gem "rspec-github", require: false gem "rspec-its", require: false gem "rspec-retry", require: false -gem "rspec-sorbet", require: false gem "rspec-wait", require: false gem "rubocop", require: false gem "rubocop-ast", require: false gem "simplecov", require: false gem "simplecov-cobertura", require: false -gem "sorbet", require: false -gem "sorbet-runtime", require: false -gem "tapioca", require: false gem "warning", require: false +group :sorbet, optional: true do + gem "rspec-sorbet", require: false + gem "sorbet", require: false + gem "sorbet-runtime", require: false + gem "tapioca", require: false +end + # vendored gems gem "activesupport" gem "concurrent-ruby" diff --git a/Library/Homebrew/Gemfile.lock b/Library/Homebrew/Gemfile.lock index 7b07c608bb..51488b56ca 100644 --- a/Library/Homebrew/Gemfile.lock +++ b/Library/Homebrew/Gemfile.lock @@ -109,7 +109,7 @@ GEM rspec-support (3.10.2) rspec-wait (0.0.9) rspec (>= 3, < 4) - rubocop (1.16.0) + rubocop (1.16.1) parallel (~> 1.10) parser (>= 3.0.0.0) rainbow (>= 2.2.2, < 4.0) @@ -127,7 +127,7 @@ GEM activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.7.0, < 2.0) - rubocop-rspec (2.3.0) + rubocop-rspec (2.4.0) rubocop (~> 1.0) rubocop-ast (>= 1.1.0) rubocop-sorbet (0.6.2) diff --git a/Library/Homebrew/cask/installer.rb b/Library/Homebrew/cask/installer.rb index e6241fb3ea..f9faefe9cd 100644 --- a/Library/Homebrew/cask/installer.rb +++ b/Library/Homebrew/cask/installer.rb @@ -56,6 +56,8 @@ module Cask caveats = cask.caveats return if caveats.empty? + Homebrew.messages.record_caveats(cask.token, caveats) + <<~EOS #{ohai_title "Caveats"} #{caveats} diff --git a/Library/Homebrew/cli/args.rbi b/Library/Homebrew/cli/args.rbi index 69ff5360b8..9b4429dd77 100644 --- a/Library/Homebrew/cli/args.rbi +++ b/Library/Homebrew/cli/args.rbi @@ -275,6 +275,9 @@ module Homebrew sig { returns(T.nilable(String)) } def screen_saverdir; end + + sig { returns(T.nilable(T::Array[String])) } + def groups; end end end end diff --git a/Library/Homebrew/cli/parser.rb b/Library/Homebrew/cli/parser.rb index cfa337e768..5792b62a28 100644 --- a/Library/Homebrew/cli/parser.rb +++ b/Library/Homebrew/cli/parser.rb @@ -10,6 +10,7 @@ require "utils/tty" COMMAND_DESC_WIDTH = 80 OPTION_DESC_WIDTH = 43 +HIDDEN_DESC_PLACEHOLDER = "@@HIDDEN@@" module Homebrew module CLI @@ -148,13 +149,13 @@ module Homebrew end def switch(*names, description: nil, replacement: nil, env: nil, required_for: nil, depends_on: nil, - method: :on) + method: :on, hidden: false) global_switch = names.first.is_a?(Symbol) return if global_switch - description = option_to_description(*names) if description.nil? + description = option_description(description, *names, hidden: hidden) if replacement.nil? - process_option(*names, description, type: :switch) + process_option(*names, description, type: :switch, hidden: hidden) else description += " (disabled#{"; replaced by #{replacement}" if replacement.present?})" end @@ -198,10 +199,10 @@ module Homebrew @parser.banner end - def comma_array(name, description: nil) + def comma_array(name, description: nil, hidden: false) name = name.chomp "=" - description = option_to_description(name) if description.nil? - process_option(name, description, type: :comma_array) + description = option_description(description, name, hidden: hidden) + process_option(name, description, type: :comma_array, hidden: hidden) @parser.on(name, OptionParser::REQUIRED_ARGUMENT, Array, *wrap_option_desc(description)) do |list| @args[option_to_name(name)] = list end @@ -215,7 +216,7 @@ module Homebrew [OptionParser::OPTIONAL_ARGUMENT, :optional_flag] end names.map! { |name| name.chomp "=" } - description = option_to_description(*names) if description.nil? + description = option_description(description, *names, hidden: hidden) if replacement.nil? process_option(*names, description, type: flag_type, hidden: hidden) else @@ -255,6 +256,13 @@ module Homebrew names.map { |name| name.to_s.sub(/\A--?/, "").tr("-", " ") }.max end + def option_description(description, *names, hidden: false) + return HIDDEN_DESC_PLACEHOLDER if hidden + return description if description.present? + + option_to_description(*names) + end + def parse_remaining(argv, ignore_invalid_options: false) i = 0 remaining = [] @@ -347,6 +355,7 @@ module Homebrew def generate_help_text Formatter.wrap(@parser.to_s, COMMAND_DESC_WIDTH) + .gsub(/\n.*?@@HIDDEN@@.*?(?=\n)/, "") .sub(/^/, "#{Tty.bold}Usage: brew#{Tty.reset} ") .gsub(/`(.*?)`/m, "#{Tty.bold}\\1#{Tty.reset}") .gsub(%r{<([^\s]+?://[^\s]+?)>}) { |url| Formatter.url(url) } @@ -597,7 +606,7 @@ module Homebrew def process_option(*args, type:, hidden: false) option, = @parser.make_switch(args) @processed_options.reject! { |existing| existing.second == option.long.first } if option.long.first.present? - @processed_options << [option.short.first, option.long.first, option.arg, option.desc.first] + @processed_options << [option.short.first, option.long.first, option.arg, option.desc.first, hidden] if type == :switch disable_switch(*args) @@ -607,6 +616,7 @@ module Homebrew end end + return if hidden return if self.class.global_options.include? [option.short.first, option.long.first, option.desc.first] @non_global_processed_options << [option.long.first || option.short.first, type] diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb index fb61f2c546..090556c2a2 100644 --- a/Library/Homebrew/cmd/info.rb +++ b/Library/Homebrew/cmd/info.rb @@ -52,7 +52,8 @@ module Homebrew "JSON output: " switch "--bottle", depends_on: "--json", - description: "Output information about the bottles for and its dependencies." + description: "Output information about the bottles for and its dependencies.", + hidden: true switch "--installed", depends_on: "--json", description: "Print JSON of formulae that are currently installed." diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index 6bf3912b7c..deb35c677d 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -187,136 +187,15 @@ module Homebrew raise BuildFlagsError.new(build_flags, bottled: formulae.all?(&:bottled?)) if build_flags.present? end - installed_formulae = [] - - formulae.each do |f| - # head-only without --HEAD is an error - if !args.HEAD? && f.stable.nil? - odie <<~EOS - #{f.full_name} is a head-only formula. - To install it, run: - brew install --HEAD #{f.full_name} - EOS - end - - # --HEAD, fail with no head defined - odie "No head is defined for #{f.full_name}" if args.HEAD? && f.head.nil? - - installed_head_version = f.latest_head_version - if installed_head_version && - !f.head_version_outdated?(installed_head_version, fetch_head: args.fetch_HEAD?) - new_head_installed = true - end - prefix_installed = f.prefix.exist? && !f.prefix.children.empty? - - if f.keg_only? && f.any_version_installed? && f.optlinked? && !args.force? - # keg-only install is only possible when no other version is - # linked to opt, because installing without any warnings can break - # dependencies. Therefore before performing other checks we need to be - # sure --force flag is passed. - if f.outdated? - if Homebrew::EnvConfig.no_install_upgrade? - optlinked_version = Keg.for(f.opt_prefix).version - onoe <<~EOS - #{f.full_name} #{optlinked_version} is already installed. - To upgrade to #{f.version}, run: - brew upgrade #{f.full_name} - EOS - else - installed_formulae << f - end - elsif args.only_dependencies? - installed_formulae << f - elsif !args.quiet? - opoo <<~EOS - #{f.full_name} #{f.pkg_version} is already installed and up-to-date. - To reinstall #{f.pkg_version}, run: - brew reinstall #{f.name} - EOS - end - elsif (args.HEAD? && new_head_installed) || prefix_installed - # After we're sure that --force flag is passed for linked to opt - # keg-only we need to be sure that the version we're attempting to - # install is not already installed. - - installed_version = if args.HEAD? - f.latest_head_version - else - f.pkg_version - end - - msg = "#{f.full_name} #{installed_version} is already installed" - linked_not_equals_installed = f.linked_version != installed_version - if f.linked? && linked_not_equals_installed - msg = if args.quiet? - nil - else - <<~EOS - #{msg}. - The currently linked version is: #{f.linked_version} - EOS - end - elsif !f.linked? || f.keg_only? - msg = <<~EOS - #{msg}, it's just not linked. - To link this version, run: - brew link #{f} - EOS - elsif args.only_dependencies? - msg = nil - installed_formulae << f - else - msg = if args.quiet? - nil - else - <<~EOS - #{msg} and up-to-date. - To reinstall #{f.pkg_version}, run: - brew reinstall #{f.name} - EOS - end - end - opoo msg if msg - elsif !f.any_version_installed? && (old_formula = f.old_installed_formulae.first) - msg = "#{old_formula.full_name} #{old_formula.any_installed_version} already installed" - msg = if !old_formula.linked? && !old_formula.keg_only? - <<~EOS - #{msg}, it's just not linked. - To link this version, run: - brew link #{old_formula.full_name} - EOS - elsif args.quiet? - nil - else - "#{msg}." - end - opoo msg if msg - elsif f.migration_needed? && !args.force? - # Check if the formula we try to install is the same as installed - # but not migrated one. If --force is passed then install anyway. - opoo <<~EOS - #{f.oldname} is already installed, it's just not migrated. - To migrate this formula, run: - brew migrate #{f} - Or to force-install it, run: - brew install #{f} --force - EOS - else - # If none of the above is true and the formula is linked, then - # FormulaInstaller will handle this case. - installed_formulae << f - end - - # Even if we don't install this formula mark it as no longer just - # installed as a dependency. - next unless f.opt_prefix.directory? - - keg = Keg.new(f.opt_prefix.resolved_path) - tab = Tab.for_keg(keg) - unless tab.installed_on_request - tab.installed_on_request = true - tab.write - end + installed_formulae = formulae.select do |f| + Install.install_formula?( + f, + head: args.HEAD?, + fetch_head: args.fetch_HEAD?, + only_dependencies: args.only_dependencies?, + force: args.force?, + quiet: args.quiet?, + ) end return if installed_formulae.empty? @@ -325,7 +204,24 @@ module Homebrew installed_formulae.each do |f| Migrator.migrate_if_needed(f, force: args.force?) - install_formula(f, args: args) + Install.install_formula( + f, + build_bottle: args.build_bottle?, + force_bottle: args.force_bottle?, + bottle_arch: args.bottle_arch, + ignore_deps: args.ignore_dependencies?, + only_deps: args.only_dependencies?, + include_test_formulae: args.include_test_formulae, + build_from_source_formulae: args.build_from_source_formulae, + cc: args.cc, + git: args.git?, + interactive: args.interactive?, + keep_tmp: args.keep_tmp?, + force: args.force?, + debug: args.debug?, + quiet: args.quiet?, + verbose: args.verbose?, + ) Cleanup.install_formula_clean!(f) end @@ -395,65 +291,4 @@ module Homebrew puts "To install one of them, run (for example):\n brew install #{taps_search_results.first}" end end - - def install_formula(f, args:) - f.print_tap_action - build_options = f.build - - if !Homebrew::EnvConfig.no_install_upgrade? && f.outdated? && !f.head? - formulae = [f, *f.old_installed_formulae] - version_upgrade = "#{f.linked_version} -> #{f.pkg_version}" - - oh1 <<~EOS - #{f.name} #{f.linked_version} is installed and out of date - Upgrading #{Formatter.identifier(f.name)} #{version_upgrade} - EOS - outdated_kegs = formulae.map(&:linked_keg) - .select(&:directory?) - .map { |k| Keg.new(k.resolved_path) } - linked_kegs = outdated_kegs.select(&:linked?) - end - - fi = FormulaInstaller.new( - f, - **{ - options: build_options.used_options, - build_bottle: args.build_bottle?, - force_bottle: args.force_bottle?, - bottle_arch: args.bottle_arch, - ignore_deps: args.ignore_dependencies?, - only_deps: args.only_dependencies?, - include_test_formulae: args.include_test_formulae, - build_from_source_formulae: args.build_from_source_formulae, - cc: args.cc, - git: args.git?, - interactive: args.interactive?, - keep_tmp: args.keep_tmp?, - force: args.force?, - debug: args.debug?, - quiet: args.quiet?, - verbose: args.verbose?, - }.compact, - ) - fi.prelude - fi.fetch - - outdated_kegs.each(&:unlink) if outdated_kegs.present? - - fi.install - fi.finish - rescue FormulaInstallationAlreadyAttemptedError - # We already attempted to install f as part of the dependency tree of - # another formula. In that case, don't generate an error, just move on. - nil - rescue CannotInstallFormulaError => e - ofail e.message - ensure - begin - # Re-link kegs if upgrade fails - linked_kegs.each(&:link) unless formula.latest_version_installed? - rescue - nil - end - end end diff --git a/Library/Homebrew/commands.rb b/Library/Homebrew/commands.rb index 7d8764f800..443b3fe364 100644 --- a/Library/Homebrew/commands.rb +++ b/Library/Homebrew/commands.rb @@ -176,9 +176,11 @@ module Commands return if path.blank? if (cmd_parser = Homebrew::CLI::Parser.from_cmd_path(path)) - cmd_parser.processed_options.map do |short, long, _, desc| + cmd_parser.processed_options.map do |short, long, _, desc, hidden| + next if hidden + [long || short, desc] - end + end.compact else options = [] comment_lines = path.read.lines.grep(/^#:/) diff --git a/Library/Homebrew/config.rbi b/Library/Homebrew/config.rbi new file mode 100644 index 0000000000..2cab9bf6d5 --- /dev/null +++ b/Library/Homebrew/config.rbi @@ -0,0 +1,6 @@ +# typed: strict + +module EnvVar + sig { params(env: String).returns(String) } + def self.[](env); end +end diff --git a/Library/Homebrew/default_prefix.rb b/Library/Homebrew/default_prefix.rb new file mode 100644 index 0000000000..4e2f6f1ee4 --- /dev/null +++ b/Library/Homebrew/default_prefix.rb @@ -0,0 +1,12 @@ +# typed: true +# frozen_string_literal: true + +module Homebrew + DEFAULT_PREFIX, DEFAULT_REPOSITORY = if OS.mac? && Hardware::CPU.arm? + [HOMEBREW_MACOS_ARM_DEFAULT_PREFIX, HOMEBREW_MACOS_ARM_DEFAULT_REPOSITORY] + elsif OS.linux? && !EnvConfig.force_homebrew_on_linux? + [HOMEBREW_LINUX_DEFAULT_PREFIX, HOMEBREW_LINUX_DEFAULT_REPOSITORY] + else + [HOMEBREW_DEFAULT_PREFIX, HOMEBREW_DEFAULT_REPOSITORY] + end.freeze +end diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 7ccc31a39b..b7e1bfb433 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -204,6 +204,7 @@ module Homebrew cask_results = if audit_casks.empty? {} else + require "cask/cmd/abstract_command" require "cask/cmd/audit" Cask::Cmd::Audit.audit_casks( diff --git a/Library/Homebrew/dev-cmd/generate-man-completions.rb b/Library/Homebrew/dev-cmd/generate-man-completions.rb index eaa6a2ad79..4bcd4cfa77 100644 --- a/Library/Homebrew/dev-cmd/generate-man-completions.rb +++ b/Library/Homebrew/dev-cmd/generate-man-completions.rb @@ -172,7 +172,9 @@ module Homebrew def cmd_parser_manpage_lines(cmd_parser) lines = [format_usage_banner(cmd_parser.usage_banner_text)] - lines += cmd_parser.processed_options.map do |short, long, _, desc| + lines += cmd_parser.processed_options.map do |short, long, _, desc, hidden| + next if hidden + if long.present? next if Homebrew::CLI::Parser.global_options.include?([short, long, desc]) next if Homebrew::CLI::Parser.global_cask_options.any? do |_, option, description:, **| @@ -181,7 +183,7 @@ module Homebrew end generate_option_doc(short, long, desc) - end.reject(&:blank?) + end.compact lines end diff --git a/Library/Homebrew/dev-cmd/install-bundler-gems.rb b/Library/Homebrew/dev-cmd/install-bundler-gems.rb index 73ba1f7f49..a5dd4d015b 100644 --- a/Library/Homebrew/dev-cmd/install-bundler-gems.rb +++ b/Library/Homebrew/dev-cmd/install-bundler-gems.rb @@ -15,14 +15,19 @@ module Homebrew description <<~EOS Install Homebrew's Bundler gems. EOS + comma_array "--groups=", + description: "Installs the specified comma-separated list of gem groups (default: last used)." named_args :none end end def install_bundler_gems - install_bundler_gems_args.parse + args = install_bundler_gems_args.parse - Homebrew.install_bundler_gems! + # Clear previous settings. We want to fully replace - not append. + Homebrew::Settings.delete(:gemgroups) if args.groups + + Homebrew.install_bundler_gems!(groups: args.groups || []) end end diff --git a/Library/Homebrew/dev-cmd/tests.rb b/Library/Homebrew/dev-cmd/tests.rb index 3638033b45..f35117e56e 100644 --- a/Library/Homebrew/dev-cmd/tests.rb +++ b/Library/Homebrew/dev-cmd/tests.rb @@ -39,15 +39,17 @@ module Homebrew def tests args = tests_args.parse - Homebrew.install_bundler_gems! + Homebrew.install_bundler_gems!(groups: ["sorbet"]) require "byebug" if args.byebug? HOMEBREW_LIBRARY_PATH.cd do # Cleanup any unwanted user configuration. - allowed_test_env = [ - "HOMEBREW_GITHUB_API_TOKEN", - "HOMEBREW_TEMP", + allowed_test_env = %w[ + HOMEBREW_GITHUB_API_TOKEN + HOMEBREW_CACHE + HOMEBREW_LOGS + HOMEBREW_TEMP ] Homebrew::EnvConfig::ENVS.keys.map(&:to_s).each do |env| next if allowed_test_env.include?(env) diff --git a/Library/Homebrew/dev-cmd/typecheck.rb b/Library/Homebrew/dev-cmd/typecheck.rb index 6826b41884..daa595491e 100644 --- a/Library/Homebrew/dev-cmd/typecheck.rb +++ b/Library/Homebrew/dev-cmd/typecheck.rb @@ -51,7 +51,7 @@ module Homebrew args = typecheck_args.parse - Homebrew.install_bundler_gems! + Homebrew.install_bundler_gems!(groups: ["sorbet"]) HOMEBREW_LIBRARY_PATH.cd do if args.update? diff --git a/Library/Homebrew/dev-cmd/unbottled.rb b/Library/Homebrew/dev-cmd/unbottled.rb index 3d0f0cec0f..c29a027f71 100644 --- a/Library/Homebrew/dev-cmd/unbottled.rb +++ b/Library/Homebrew/dev-cmd/unbottled.rb @@ -158,10 +158,6 @@ module Homebrew formulae.each do |f| name = f.name.downcase - if f.bottle_specification.tag?(@bottle_tag, no_older_versions: true) - puts "#{Tty.bold}#{Tty.green}#{name}#{Tty.reset}: already bottled" if any_named_args - next - end if f.disabled? puts "#{Tty.bold}#{Tty.green}#{name}#{Tty.reset}: formula disabled" if any_named_args @@ -190,11 +186,7 @@ module Homebrew Version.new(MacOS::Xcode.latest_version(macos: macos_version)) >= r.version when ArchRequirement - arch = r.arch - arch = :intel if arch == :x86_64 - arch = :arm64 if arch == :arm - - arch == macos_version.arch + r.arch == @bottle_tag.arch else true end @@ -215,6 +207,11 @@ module Homebrew next end + if f.bottle_specification.tag?(@bottle_tag, no_older_versions: true) + puts "#{Tty.bold}#{Tty.green}#{name}#{Tty.reset}: already bottled" if any_named_args + next + end + deps = Array(deps_hash[f.name]).reject do |dep| dep.bottle_specification.tag?(@bottle_tag, no_older_versions: true) || dep.bottle_unneeded? end diff --git a/Library/Homebrew/dev-cmd/vendor-gems.rb b/Library/Homebrew/dev-cmd/vendor-gems.rb index 56e1de3a48..6a8b62f5a8 100644 --- a/Library/Homebrew/dev-cmd/vendor-gems.rb +++ b/Library/Homebrew/dev-cmd/vendor-gems.rb @@ -29,6 +29,8 @@ module Homebrew Homebrew.install_bundler! + ENV["BUNDLE_WITH"] = "sorbet" + ohai "cd #{HOMEBREW_LIBRARY_PATH}" HOMEBREW_LIBRARY_PATH.cd do if args.update diff --git a/Library/Homebrew/diagnostic.rb b/Library/Homebrew/diagnostic.rb index b8d45ae666..683a2a5bd0 100644 --- a/Library/Homebrew/diagnostic.rb +++ b/Library/Homebrew/diagnostic.rb @@ -149,7 +149,9 @@ module Homebrew def broken_tap(tap) return unless Utils::Git.available? - return unless HOMEBREW_REPOSITORY.git? + + repo = HOMEBREW_REPOSITORY.dup.extend(GitRepositoryExtension) + return unless repo.git? message = <<~EOS #{tap.full_name} was not tapped properly! Run: @@ -161,7 +163,7 @@ module Homebrew tap_head = tap.git_head return message if tap_head.blank? - return if tap_head != HOMEBREW_REPOSITORY.git_head + return if tap_head != repo.git_head message end @@ -574,7 +576,8 @@ module Homebrew end def check_brew_git_origin - examine_git_origin(HOMEBREW_REPOSITORY, Homebrew::EnvConfig.brew_git_remote) + repo = HOMEBREW_REPOSITORY.dup.extend(GitRepositoryExtension) + examine_git_origin(repo, Homebrew::EnvConfig.brew_git_remote) end def check_coretap_integrity diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index d0c755ed57..eb739212ab 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -651,6 +651,7 @@ end class LocalBottleDownloadStrategy < AbstractFileDownloadStrategy def initialize(path) # rubocop:disable Lint/MissingSuper @cached_location = path + extend Pourable end end diff --git a/Library/Homebrew/extend/os/mac/keg_relocate.rb b/Library/Homebrew/extend/os/mac/keg_relocate.rb index ea2cb366eb..a0abdb0ab9 100644 --- a/Library/Homebrew/extend/os/mac/keg_relocate.rb +++ b/Library/Homebrew/extend/os/mac/keg_relocate.rb @@ -159,13 +159,16 @@ class Keg brewed_perl = runtime_dependencies&.any? { |dep| dep["full_name"] == "perl" && dep["declared_directly"] } perl_path = if brewed_perl || name == "perl" "#{HOMEBREW_PREFIX}/opt/perl/bin/perl" + elsif tab["built_on"].present? + perl_path = "/usr/bin/perl#{tab["built_on"]["preferred_perl"]}" + + # For `:all` bottles, we could have built this bottle with a Perl we don't have. + # Such bottles typically don't have strict version requirements. + perl_path = "/usr/bin/perl#{MacOS.preferred_perl_version}" unless File.exist?(perl_path) + + perl_path else - perl_version = if tab["built_on"].present? - tab["built_on"]["preferred_perl"] - else - MacOS.preferred_perl_version - end - "/usr/bin/perl#{perl_version}" + "/usr/bin/perl#{MacOS.preferred_perl_version}" end relocation.add_replacement_pair(:perl, PERL_PLACEHOLDER, perl_path) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index b22336f8ac..b52826e2c3 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -1919,17 +1919,19 @@ class Formula [tag.to_s, info] end.to_h - return bottles unless top_level + hash = { + "name" => name, + "pkg_version" => pkg_version, + "rebuild" => bottle["rebuild"], + "bottles" => bottles, + } - dependencies = declared_runtime_dependencies.map do |dep| + return hash unless top_level + + hash["dependencies"] = declared_runtime_dependencies.map do |dep| dep.to_formula.to_recursive_bottle_hash(top_level: false) end - - { - "name" => name, - "bottles" => bottles, - "dependencies" => dependencies, - } + hash end # Returns the bottle information for a formula diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 4beaf70323..b55e686fc4 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -404,7 +404,7 @@ class FormulaInstaller options = display_options(formula).join(" ") oh1 "Installing #{Formatter.identifier(formula.full_name)} #{options}".strip if show_header? - unless formula.tap&.private? + if formula.tap&.installed? && !formula.tap&.private? action = "#{formula.full_name} #{options}".strip Utils::Analytics.report_event("install", action) @@ -769,7 +769,7 @@ class FormulaInstaller @show_summary_heading = true ohai "Caveats", caveats.to_s - Homebrew.messages.record_caveats(formula, caveats) + Homebrew.messages.record_caveats(formula.name, caveats) end sig { void } @@ -1074,9 +1074,14 @@ class FormulaInstaller -I #{$LOAD_PATH.join(File::PATH_SEPARATOR)} -- #{HOMEBREW_LIBRARY_PATH}/postinstall.rb - #{formula.path} ] + args << if formula.local_bottle_path.present? + formula.prefix/".brew/#{formula.name}.rb" + else + formula.path + end + Utils.safe_fork do if Sandbox.available? sandbox = Sandbox.new @@ -1163,7 +1168,7 @@ class FormulaInstaller tab.source["versions"]["stable"] = formula.stable.version.to_s tab.source["versions"]["version_scheme"] = formula.version_scheme tab.source["path"] = formula.specified_path.to_s - tab.source["tap_git_head"] = formula.tap&.git_head + tab.source["tap_git_head"] = formula.tap&.installed? ? formula.tap&.git_head : nil tab.tap = formula.tap tab.write diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb index d668dac471..15454796e1 100644 --- a/Library/Homebrew/global.rb +++ b/Library/Homebrew/global.rb @@ -1,22 +1,16 @@ # typed: false # frozen_string_literal: true -require_relative "load_path" +require_relative "startup" require "English" require "fileutils" require "json" require "json/add/exception" -require "pathname" require "ostruct" require "pp" require "forwardable" -require "rbconfig" - -RUBY_PATH = Pathname.new(RbConfig.ruby).freeze -RUBY_BIN = RUBY_PATH.dirname.freeze - # Only require "core_ext" here to ensure we're only requiring the minimum of # what we need. require "active_support/core_ext/object/blank" @@ -72,27 +66,15 @@ HOMEBREW_PULL_OR_COMMIT_URL_REGEX = %r[https://github\.com/([\w-]+)/([\w-]+)?/(?:pull/(\d+)|commit/[0-9a-fA-F]{4,40})].freeze HOMEBREW_BOTTLES_EXTNAME_REGEX = /\.([a-z0-9_]+)\.bottle\.(?:(\d+)\.)?tar\.gz$/.freeze -require "utils/sorbet" - require "env_config" require "compat/early" unless Homebrew::EnvConfig.no_compat? require "os" require "messages" +require "default_prefix" module Homebrew extend FileUtils - remove_const :DEFAULT_PREFIX if defined?(DEFAULT_PREFIX) - remove_const :DEFAULT_REPOSITORY if defined?(DEFAULT_REPOSITORY) - - DEFAULT_PREFIX, DEFAULT_REPOSITORY = if OS.mac? && Hardware::CPU.arm? - [HOMEBREW_MACOS_ARM_DEFAULT_PREFIX, HOMEBREW_MACOS_ARM_DEFAULT_REPOSITORY] - elsif OS.linux? && !EnvConfig.force_homebrew_on_linux? - [HOMEBREW_LINUX_DEFAULT_PREFIX, HOMEBREW_LINUX_DEFAULT_REPOSITORY] - else - [HOMEBREW_DEFAULT_PREFIX, HOMEBREW_DEFAULT_REPOSITORY] - end.freeze - DEFAULT_CELLAR = "#{DEFAULT_PREFIX}/Cellar" DEFAULT_MACOS_CELLAR = "#{HOMEBREW_DEFAULT_PREFIX}/Cellar" DEFAULT_MACOS_ARM_CELLAR = "#{HOMEBREW_MACOS_ARM_DEFAULT_PREFIX}/Cellar" @@ -124,8 +106,8 @@ module Homebrew end end -require "config" require "context" +require "extend/git_repository" require "extend/pathname" require "extend/predicable" require "extend/module" diff --git a/Library/Homebrew/install.rb b/Library/Homebrew/install.rb index a59dc55a9d..8d7ef97e2d 100644 --- a/Library/Homebrew/install.rb +++ b/Library/Homebrew/install.rb @@ -90,6 +90,213 @@ module Homebrew EOS end private_class_method :check_cc_argv + + def install_formula?( + f, + head: false, + fetch_head: false, + only_dependencies: false, + force: false, + quiet: false + ) + # head-only without --HEAD is an error + if !head && f.stable.nil? + odie <<~EOS + #{f.full_name} is a head-only formula. + To install it, run: + brew install --HEAD #{f.full_name} + EOS + end + + # --HEAD, fail with no head defined + odie "No head is defined for #{f.full_name}" if head && f.head.nil? + + installed_head_version = f.latest_head_version + if installed_head_version && + !f.head_version_outdated?(installed_head_version, fetch_head: fetch_head) + new_head_installed = true + end + prefix_installed = f.prefix.exist? && !f.prefix.children.empty? + + if f.keg_only? && f.any_version_installed? && f.optlinked? && !force + # keg-only install is only possible when no other version is + # linked to opt, because installing without any warnings can break + # dependencies. Therefore before performing other checks we need to be + # sure --force flag is passed. + if f.outdated? + return true unless Homebrew::EnvConfig.no_install_upgrade? + + optlinked_version = Keg.for(f.opt_prefix).version + onoe <<~EOS + #{f.full_name} #{optlinked_version} is already installed. + To upgrade to #{f.version}, run: + brew upgrade #{f.full_name} + EOS + elsif only_dependencies + return true + elsif !quiet + opoo <<~EOS + #{f.full_name} #{f.pkg_version} is already installed and up-to-date. + To reinstall #{f.pkg_version}, run: + brew reinstall #{f.name} + EOS + end + elsif (head && new_head_installed) || prefix_installed + # After we're sure that --force flag is passed for linked to opt + # keg-only we need to be sure that the version we're attempting to + # install is not already installed. + + installed_version = if head + f.latest_head_version + else + f.pkg_version + end + + msg = "#{f.full_name} #{installed_version} is already installed" + linked_not_equals_installed = f.linked_version != installed_version + if f.linked? && linked_not_equals_installed + msg = if quiet + nil + else + <<~EOS + #{msg}. + The currently linked version is: #{f.linked_version} + EOS + end + elsif !f.linked? || f.keg_only? + msg = <<~EOS + #{msg}, it's just not linked. + To link this version, run: + brew link #{f} + EOS + elsif only_dependencies + msg = nil + return true + else + msg = if quiet + nil + else + <<~EOS + #{msg} and up-to-date. + To reinstall #{f.pkg_version}, run: + brew reinstall #{f.name} + EOS + end + end + opoo msg if msg + elsif !f.any_version_installed? && (old_formula = f.old_installed_formulae.first) + msg = "#{old_formula.full_name} #{old_formula.any_installed_version} already installed" + msg = if !old_formula.linked? && !old_formula.keg_only? + <<~EOS + #{msg}, it's just not linked. + To link this version, run: + brew link #{old_formula.full_name} + EOS + elsif quiet + nil + else + "#{msg}." + end + opoo msg if msg + elsif f.migration_needed? && !force + # Check if the formula we try to install is the same as installed + # but not migrated one. If --force is passed then install anyway. + opoo <<~EOS + #{f.oldname} is already installed, it's just not migrated. + To migrate this formula, run: + brew migrate #{f} + Or to force-install it, run: + brew install #{f} --force + EOS + else + # If none of the above is true and the formula is linked, then + # FormulaInstaller will handle this case. + return true + end + + # Even if we don't install this formula mark it as no longer just + # installed as a dependency. + return false unless f.opt_prefix.directory? + + keg = Keg.new(f.opt_prefix.resolved_path) + tab = Tab.for_keg(keg) + unless tab.installed_on_request + tab.installed_on_request = true + tab.write + end + + false + end + + def install_formula( + f, + build_bottle: false, + force_bottle: false, + bottle_arch: nil, + ignore_deps: false, + only_deps: false, + include_test_formulae: [], + build_from_source_formulae: [], + cc: nil, + git: false, + interactive: false, + keep_tmp: false, + force: false, + debug: false, + quiet: false, + verbose: false + ) + f.print_tap_action + build_options = f.build + + if !Homebrew::EnvConfig.no_install_upgrade? && f.outdated? && !f.head? + outdated_formulae = [f, *f.old_installed_formulae] + version_upgrade = "#{f.linked_version} -> #{f.pkg_version}" + + oh1 <<~EOS + #{f.name} #{f.linked_version} is installed and outdated + Upgrading #{Formatted.identifier(f.name)} #{version_upgrade} + EOS + outdated_kegs = outdated_formulae.map(&:linked_keg).select(&:directory?).map { |k| Keg.new(k.resolved_path) } + linked_kegs = outdated_kegs.select(&:linked) + end + + fi = FormulaInstaller.new( + f, + options: build_options.used_options, + build_bottle: build_bottle, + force_bottle: force_bottle, + bottle_arch: bottle_arch, + ignore_deps: ignore_deps, + only_deps: only_deps, + include_test_formulae: include_test_formulae, + build_from_source_formulae: build_from_source_formulae, + cc: cc, + git: git, + interactive: interactive, + keep_tmp: keep_tmp, + force: force, + debug: debug, + quiet: quiet, + verbose: verbose, + ) + fi.prelude + fi.fetch + + outdated_kegs.each(&:unlink) if outdated_kegs.present? + + fi.install + fi.finish + rescue FormulaInstallationAlreadyAttemptedError + # We already attempted to install f as part of the dependency tree of + # another formula. In that case, don't generate an error, just move on. + nil + rescue CannotInstallFormulaError => e + ofail e.message + ensure + # Re-link kegs if upgrade fails + linked_kegs.each(&:link) unless f.latest_version_installed? + end end end diff --git a/Library/Homebrew/messages.rb b/Library/Homebrew/messages.rb index 0e6b3164f2..6cc2cbcad6 100644 --- a/Library/Homebrew/messages.rb +++ b/Library/Homebrew/messages.rb @@ -15,8 +15,8 @@ class Messages @install_times = [] end - def record_caveats(f, caveats) - @caveats.push(formula: f.name, caveats: caveats) + def record_caveats(package, caveats) + @caveats.push(package: package, caveats: caveats) end def formula_installed(f, elapsed_time) @@ -36,7 +36,7 @@ class Messages oh1 "Caveats" @caveats.each do |c| - ohai c[:formula], c[:caveats] + ohai c[:package], c[:caveats] end end diff --git a/Library/Homebrew/os/mac/pkgconfig/12/expat.pc b/Library/Homebrew/os/mac/pkgconfig/12/expat.pc new file mode 100644 index 0000000000..0aff7b4bcf --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/12/expat.pc @@ -0,0 +1,12 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: expat +Version: 2.2.8 +Description: expat XML parser +URL: http://www.libexpat.org +Libs: -L${libdir} -lexpat +Cflags: diff --git a/Library/Homebrew/os/mac/pkgconfig/12/libcurl.pc b/Library/Homebrew/os/mac/pkgconfig/12/libcurl.pc new file mode 100644 index 0000000000..4a2f32f053 --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/12/libcurl.pc @@ -0,0 +1,40 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 2001 - 2018, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### + +# This should most probably benefit from getting a "Requires:" field added +# dynamically by configure. +# +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include +supported_protocols="DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS LDAP LDAPS POP3 POP3S RTSP SMB SMBS SMTP SMTPS TELNET TFTP" +supported_features="AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO MultiSSL NTLM NTLM_WB SSL libz HTTP2 UnixSockets HTTPS-proxy" + +Name: libcurl +URL: https://curl.haxx.se/ +Description: Library to transfer files with ftp, http, etc. +Version: 7.64.1 +Libs: -L${libdir} -lcurl +Libs.private: -lldap -lz +Cflags: diff --git a/Library/Homebrew/os/mac/pkgconfig/12/libedit.pc b/Library/Homebrew/os/mac/pkgconfig/12/libedit.pc new file mode 100644 index 0000000000..5229e97d6c --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/12/libedit.pc @@ -0,0 +1,12 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: libedit +Description: command line editor library provides generic line editing, history, and tokenization functions. +Version: 3.0 +Requires: +Libs: -L${libdir} -ledit +Cflags: -I${includedir}/editline diff --git a/Library/Homebrew/os/mac/pkgconfig/12/libexslt.pc b/Library/Homebrew/os/mac/pkgconfig/12/libexslt.pc new file mode 100644 index 0000000000..c2f8fefc68 --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/12/libexslt.pc @@ -0,0 +1,13 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include + + +Name: libexslt +Version: 0.8.17 +Description: EXSLT Extension library +Requires: libxml-2.0 +Libs: -L${libdir} -lexslt -lxslt -lxml2 -lz -lpthread -licucore -lm +Cflags: diff --git a/Library/Homebrew/os/mac/pkgconfig/12/libffi.pc b/Library/Homebrew/os/mac/pkgconfig/12/libffi.pc new file mode 100644 index 0000000000..aab18b762e --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/12/libffi.pc @@ -0,0 +1,12 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +toolexeclibdir=${libdir} +includedir=${prefix}/include/ffi + +Name: libffi +Description: Library supporting Foreign Function Interfaces +Version: 3.3-rc0 +Libs: -L${toolexeclibdir} -lffi +Cflags: -I${includedir} diff --git a/Library/Homebrew/os/mac/pkgconfig/12/libxml-2.0.pc b/Library/Homebrew/os/mac/pkgconfig/12/libxml-2.0.pc new file mode 100644 index 0000000000..12561fc086 --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/12/libxml-2.0.pc @@ -0,0 +1,14 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include +modules=1 + +Name: libXML +Version: 2.9.4 +Description: libXML library version2. +Requires: +Libs: -L${libdir} -lxml2 +Libs.private: -lz -lpthread -licucore -lm +Cflags: diff --git a/Library/Homebrew/os/mac/pkgconfig/12/libxslt.pc b/Library/Homebrew/os/mac/pkgconfig/12/libxslt.pc new file mode 100644 index 0000000000..1687053733 --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/12/libxslt.pc @@ -0,0 +1,13 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include + + +Name: libxslt +Version: 1.1.29 +Description: XSLT library version 2. +Requires: libxml-2.0 +Libs: -L${libdir} -lxslt -lxml2 -lz -lpthread -licucore -lm +Cflags: diff --git a/Library/Homebrew/os/mac/pkgconfig/12/ncurses.pc b/Library/Homebrew/os/mac/pkgconfig/12/ncurses.pc new file mode 100644 index 0000000000..e7c2f9de30 --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/12/ncurses.pc @@ -0,0 +1,14 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include +major_version=5 +version=5.7.20081102 + +Name: ncurses +Description: ncurses 5.7 library +Version: ${version} +Requires: +Libs: -L${libdir} -lncurses +Cflags: diff --git a/Library/Homebrew/os/mac/pkgconfig/12/ncursesw.pc b/Library/Homebrew/os/mac/pkgconfig/12/ncursesw.pc new file mode 100644 index 0000000000..cf1e3ca93c --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/12/ncursesw.pc @@ -0,0 +1,14 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include +major_version=5 +version=5.7.20081102 + +Name: ncursesw +Description: ncurses 5.7 library +Version: ${version} +Requires: +Libs: -L${libdir} -lncurses +Cflags: diff --git a/Library/Homebrew/os/mac/pkgconfig/12/sqlite3.pc b/Library/Homebrew/os/mac/pkgconfig/12/sqlite3.pc new file mode 100644 index 0000000000..de5c59b4b5 --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/12/sqlite3.pc @@ -0,0 +1,12 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: SQLite +Description: SQL database engine +Version: 3.32.3 +Libs: -L${libdir} -lsqlite3 +Libs.private: +Cflags: diff --git a/Library/Homebrew/os/mac/pkgconfig/12/uuid.pc b/Library/Homebrew/os/mac/pkgconfig/12/uuid.pc new file mode 100644 index 0000000000..3ebfbe0c73 --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/12/uuid.pc @@ -0,0 +1,14 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +sharedlibdir=${libdir} +includedir=${prefix}/include/uuid + +Name: uuid +Description: Universally unique id library +Version: 1.0 + +Requires: +Libs: +Cflags: -I${includedir} diff --git a/Library/Homebrew/os/mac/pkgconfig/12/zlib.pc b/Library/Homebrew/os/mac/pkgconfig/12/zlib.pc new file mode 100644 index 0000000000..70ac53d94b --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/12/zlib.pc @@ -0,0 +1,14 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +sharedlibdir=${libdir} +includedir=${prefix}/include + +Name: zlib +Description: zlib compression library +Version: 1.2.11 + +Requires: +Libs: -L${libdir} -L${sharedlibdir} -lz +Cflags: diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb index 3151511226..6dd4324520 100755 --- a/Library/Homebrew/os/mac/xcode.rb +++ b/Library/Homebrew/os/mac/xcode.rb @@ -22,6 +22,7 @@ module OS def latest_version(macos: MacOS.version) latest_stable = "12.5" case macos + when "12" then "13.0" when "11" then latest_stable when "10.15" then "12.4" when "10.14" then "11.3.1" @@ -45,6 +46,7 @@ module OS sig { returns(String) } def minimum_version case MacOS.version + when "12" then "13.0" when "11" then "12.2" when "10.15" then "11.0" when "10.14" then "10.2" @@ -224,6 +226,7 @@ module OS when "11.0.0" then "11.3.1" when "11.0.3" then "11.7" when "12.0.0" then "12.4" + when "13.0.0" then "13.0" else "12.5" end end @@ -314,6 +317,7 @@ module OS sig { returns(String) } def latest_clang_version case MacOS.version + when "12" then "1300.0.18.6" when "11" then "1205.0.22.9" when "10.15" then "1200.0.32.29" when "10.14" then "1100.0.33.17" @@ -331,6 +335,7 @@ module OS sig { returns(String) } def minimum_version case MacOS.version + when "12" then "13.0.0" when "11" then "12.0.0" when "10.15" then "11.0.0" when "10.14" then "10.0.0" diff --git a/Library/Homebrew/rubocops.rb b/Library/Homebrew/rubocops.rb index 3190abc586..3e5daa64c3 100644 --- a/Library/Homebrew/rubocops.rb +++ b/Library/Homebrew/rubocops.rb @@ -1,40 +1,6 @@ # typed: strict # frozen_string_literal: true -require_relative "load_path" +require_relative "standalone" -require "active_support/core_ext/array/conversions" - -require "utils/sorbet" - -require "rubocop-performance" -require "rubocop-rails" -require "rubocop-rspec" -require "rubocop-sorbet" - -require "rubocops/io_read" -require "rubocops/shell_commands" - -require "rubocops/formula_desc" -require "rubocops/components_order" -require "rubocops/components_redundancy" -require "rubocops/dependency_order" -require "rubocops/homepage" -require "rubocops/text" -require "rubocops/caveats" -require "rubocops/checksum" -require "rubocops/patches" -require "rubocops/conflicts" -require "rubocops/options" -require "rubocops/urls" -require "rubocops/lines" -require "rubocops/livecheck" -require "rubocops/class" -require "rubocops/uses_from_macos" -require "rubocops/files" -require "rubocops/keg_only" -require "rubocops/version" -require "rubocops/deprecate_disable" -require "rubocops/bottle" - -require "rubocops/rubocop-cask" +require "rubocops/all" diff --git a/Library/Homebrew/rubocops/all.rb b/Library/Homebrew/rubocops/all.rb new file mode 100644 index 0000000000..40bf1eab43 --- /dev/null +++ b/Library/Homebrew/rubocops/all.rb @@ -0,0 +1,36 @@ +# typed: strict +# frozen_string_literal: true + +require "active_support/core_ext/array/conversions" + +require "rubocop-performance" +require "rubocop-rails" +require "rubocop-rspec" +require "rubocop-sorbet" + +require_relative "io_read" +require_relative "shell_commands" + +require_relative "formula_desc" +require_relative "components_order" +require_relative "components_redundancy" +require_relative "dependency_order" +require_relative "homepage" +require_relative "text" +require_relative "caveats" +require_relative "checksum" +require_relative "patches" +require_relative "conflicts" +require_relative "options" +require_relative "urls" +require_relative "lines" +require_relative "livecheck" +require_relative "class" +require_relative "uses_from_macos" +require_relative "files" +require_relative "keg_only" +require_relative "version" +require_relative "deprecate_disable" +require_relative "bottle" + +require_relative "rubocop-cask" diff --git a/Library/Homebrew/rubocops/rubocop-cask.rb b/Library/Homebrew/rubocops/rubocop-cask.rb index 3e0a2c4578..4dac4d062f 100644 --- a/Library/Homebrew/rubocops/rubocop-cask.rb +++ b/Library/Homebrew/rubocops/rubocop-cask.rb @@ -3,17 +3,17 @@ require "rubocop" -require "rubocops/cask/constants/stanza" +require_relative "cask/constants/stanza" -require "rubocops/cask/ast/stanza" -require "rubocops/cask/ast/cask_header" -require "rubocops/cask/ast/cask_block" -require "rubocops/cask/extend/string" -require "rubocops/cask/extend/node" -require "rubocops/cask/mixin/cask_help" -require "rubocops/cask/mixin/on_homepage_stanza" -require "rubocops/cask/desc" -require "rubocops/cask/homepage_url_trailing_slash" -require "rubocops/cask/no_dsl_version" -require "rubocops/cask/stanza_order" -require "rubocops/cask/stanza_grouping" +require_relative "cask/ast/stanza" +require_relative "cask/ast/cask_header" +require_relative "cask/ast/cask_block" +require_relative "cask/extend/string" +require_relative "cask/extend/node" +require_relative "cask/mixin/cask_help" +require_relative "cask/mixin/on_homepage_stanza" +require_relative "cask/desc" +require_relative "cask/homepage_url_trailing_slash" +require_relative "cask/no_dsl_version" +require_relative "cask/stanza_order" +require_relative "cask/stanza_grouping" diff --git a/Library/Homebrew/settings.rb b/Library/Homebrew/settings.rb index 8a58e94199..f04820eef2 100644 --- a/Library/Homebrew/settings.rb +++ b/Library/Homebrew/settings.rb @@ -1,26 +1,25 @@ # typed: true # frozen_string_literal: true -require "system_command" +require "utils/popen" module Homebrew # Helper functions for reading and writing settings. # # @api private module Settings - extend T::Sig - include SystemCommand::Mixin - module_function - sig { params(setting: T.any(String, Symbol), repo: Pathname).returns(T.nilable(String)) } def read(setting, repo: HOMEBREW_REPOSITORY) return unless (repo/".git/config").exist? - system_command("git", args: ["config", "--get", "homebrew.#{setting}"], chdir: repo).stdout.chomp.presence + value = Utils.popen_read("git", "-C", repo.to_s, "config", "--get", "homebrew.#{setting}").chomp + + return if value.strip.empty? + + value end - sig { params(setting: T.any(String, Symbol), value: T.any(String, T::Boolean), repo: Pathname).void } def write(setting, value, repo: HOMEBREW_REPOSITORY) return unless (repo/".git/config").exist? @@ -28,16 +27,15 @@ module Homebrew return if read(setting, repo: repo) == value - system_command! "git", args: ["config", "--replace-all", "homebrew.#{setting}", value], chdir: repo + Kernel.system("git", "-C", repo.to_s, "config", "--replace-all", "homebrew.#{setting}", value, exception: true) end - sig { params(setting: T.any(String, Symbol), repo: Pathname).void } def delete(setting, repo: HOMEBREW_REPOSITORY) return unless (repo/".git/config").exist? return if read(setting, repo: repo).blank? - system_command! "git", args: ["config", "--unset-all", "homebrew.#{setting}"], chdir: repo + Kernel.system("git", "-C", repo.to_s, "config", "--unset-all", "homebrew.#{setting}", exception: true) end end end diff --git a/Library/Homebrew/settings.rbi b/Library/Homebrew/settings.rbi index 289622fd41..d902c06acb 100644 --- a/Library/Homebrew/settings.rbi +++ b/Library/Homebrew/settings.rbi @@ -3,5 +3,14 @@ module Homebrew module Settings include Kernel + + sig { params(setting: T.any(String, Symbol), repo: Pathname).returns(T.nilable(String)) } + def read(setting, repo: HOMEBREW_REPOSITORY); end + + sig { params(setting: T.any(String, Symbol), value: T.any(String, T::Boolean), repo: Pathname).void } + def write(setting, value, repo: HOMEBREW_REPOSITORY); end + + sig { params(setting: T.any(String, Symbol), repo: Pathname).void } + def delete(setting, repo: HOMEBREW_REPOSITORY); end end end diff --git a/Library/Homebrew/sorbet/rbi/gems/rubocop-rspec@2.3.0.rbi b/Library/Homebrew/sorbet/rbi/gems/rubocop-rspec@2.4.0.rbi similarity index 84% rename from Library/Homebrew/sorbet/rbi/gems/rubocop-rspec@2.3.0.rbi rename to Library/Homebrew/sorbet/rbi/gems/rubocop-rspec@2.4.0.rbi index fcfbbb8ed8..c7092cddbd 100644 --- a/Library/Homebrew/sorbet/rbi/gems/rubocop-rspec@2.3.0.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/rubocop-rspec@2.4.0.rbi @@ -4,19 +4,14 @@ # typed: true -module RuboCop -end - -module RuboCop::Cop -end - -module RuboCop::Cop::Layout -end +module RuboCop; end +module RuboCop::Cop; end +module RuboCop::Cop::Layout; end class RuboCop::Cop::Layout::ExtraSpacing < ::RuboCop::Cop::Base - include(::RuboCop::Cop::PrecedingFollowingAlignment) - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::PrecedingFollowingAlignment + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def on_new_investigation; end @@ -43,14 +38,11 @@ class RuboCop::Cop::Layout::ExtraSpacing < ::RuboCop::Cop::Base end RuboCop::Cop::Layout::ExtraSpacing::MSG_UNALIGNED_ASGN = T.let(T.unsafe(nil), String) - RuboCop::Cop::Layout::ExtraSpacing::MSG_UNNECESSARY = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::RSpec -end +module RuboCop::Cop::RSpec; end class RuboCop::Cop::RSpec::AlignLeftLetBrace < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def on_new_investigation; end @@ -66,7 +58,7 @@ end RuboCop::Cop::RSpec::AlignLeftLetBrace::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::AlignRightLetBrace < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def on_new_investigation; end @@ -86,7 +78,6 @@ class RuboCop::Cop::RSpec::AnyInstance < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::AnyInstance::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::AnyInstance::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::AroundBlock < ::RuboCop::Cop::RSpec::Base @@ -101,12 +92,11 @@ class RuboCop::Cop::RSpec::AroundBlock < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::AroundBlock::MSG_NO_ARG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::AroundBlock::MSG_UNUSED_ARG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::Base < ::RuboCop::Cop::Base - include(::RuboCop::RSpec::Language) - extend(::RuboCop::RSpec::Language::NodePattern) + include ::RuboCop::RSpec::Language + extend ::RuboCop::RSpec::Language::NodePattern def on_new_investigation; end @@ -123,14 +113,13 @@ end RuboCop::Cop::RSpec::Be::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::BeEql < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def eql_type_with_identity(param0 = T.unsafe(nil)); end def on_send(node); end end RuboCop::Cop::RSpec::BeEql::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::BeEql::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::BeforeAfterAll < ::RuboCop::Cop::RSpec::Base @@ -139,14 +128,11 @@ class RuboCop::Cop::RSpec::BeforeAfterAll < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::BeforeAfterAll::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::BeforeAfterAll::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -module RuboCop::Cop::RSpec::Capybara -end +module RuboCop::Cop::RSpec::Capybara; end class RuboCop::Cop::RSpec::Capybara::CurrentPathExpectation < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def as_is_matcher(param0 = T.unsafe(nil)); end def expectation_set_on_current_path(param0 = T.unsafe(nil)); end @@ -162,11 +148,10 @@ class RuboCop::Cop::RSpec::Capybara::CurrentPathExpectation < ::RuboCop::Cop::RS end RuboCop::Cop::RSpec::Capybara::CurrentPathExpectation::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::Capybara::CurrentPathExpectation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::Capybara::FeatureMethods < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def capybara_speak(param0 = T.unsafe(nil)); end def feature_method(param0 = T.unsafe(nil)); end @@ -184,7 +169,6 @@ class RuboCop::Cop::RSpec::Capybara::FeatureMethods < ::RuboCop::Cop::RSpec::Bas end RuboCop::Cop::RSpec::Capybara::FeatureMethods::MAP = T.let(T.unsafe(nil), Hash) - RuboCop::Cop::RSpec::Capybara::FeatureMethods::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::Capybara::VisibilityMatcher < ::RuboCop::Cop::RSpec::Base @@ -198,15 +182,12 @@ class RuboCop::Cop::RSpec::Capybara::VisibilityMatcher < ::RuboCop::Cop::RSpec:: end RuboCop::Cop::RSpec::Capybara::VisibilityMatcher::CAPYBARA_MATCHER_METHODS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::RSpec::Capybara::VisibilityMatcher::MSG_FALSE = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::Capybara::VisibilityMatcher::MSG_TRUE = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::Capybara::VisibilityMatcher::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) module RuboCop::Cop::RSpec::CommentsHelp - include(::RuboCop::Cop::RSpec::FinalEndLocation) + include ::RuboCop::Cop::RSpec::FinalEndLocation def begin_pos_with_comment(node); end def buffer; end @@ -216,7 +197,7 @@ module RuboCop::Cop::RSpec::CommentsHelp end class RuboCop::Cop::RSpec::ContextMethod < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def context_method(param0 = T.unsafe(nil)); end def on_block(node); end @@ -243,7 +224,7 @@ end RuboCop::Cop::RSpec::ContextWording::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::DescribeClass < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RSpec::TopLevelGroup) + include ::RuboCop::Cop::RSpec::TopLevelGroup def example_group_with_ignored_metadata?(param0 = T.unsafe(nil)); end def not_a_const_described(param0 = T.unsafe(nil)); end @@ -260,7 +241,7 @@ end RuboCop::Cop::RSpec::DescribeClass::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::DescribeMethod < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RSpec::TopLevelGroup) + include ::RuboCop::Cop::RSpec::TopLevelGroup def on_top_level_group(node); end def second_argument(param0 = T.unsafe(nil)); end @@ -274,12 +255,11 @@ class RuboCop::Cop::RSpec::DescribeSymbol < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::DescribeSymbol::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::DescribeSymbol::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::DescribedClass < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector def common_instance_exec_closure?(param0 = T.unsafe(nil)); end def contains_described_class?(param0); end @@ -305,7 +285,6 @@ class RuboCop::Cop::RSpec::DescribedClass < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::DescribedClass::DESCRIBED_CLASS = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::DescribedClass::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::DescribedClassModuleWrapping < ::RuboCop::Cop::RSpec::Base @@ -316,8 +295,8 @@ end RuboCop::Cop::RSpec::DescribedClassModuleWrapping::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::Dialect < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::MethodPreference) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::MethodPreference + extend ::RuboCop::Cop::AutoCorrector def on_send(node); end def rspec_method?(param0 = T.unsafe(nil)); end @@ -343,8 +322,8 @@ end RuboCop::Cop::RSpec::EmptyExampleGroup::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::EmptyHook < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def empty_hook?(param0 = T.unsafe(nil)); end def on_block(node); end @@ -353,10 +332,10 @@ end RuboCop::Cop::RSpec::EmptyHook::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::EmptyLineAfterExample < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RSpec::FinalEndLocation) - include(::RuboCop::Cop::RangeHelp) - include(::RuboCop::Cop::RSpec::EmptyLineSeparation) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RSpec::FinalEndLocation + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::RSpec::EmptyLineSeparation + extend ::RuboCop::Cop::AutoCorrector def allow_consecutive_one_liners?; end def allowed_one_liner?(node); end @@ -369,10 +348,10 @@ end RuboCop::Cop::RSpec::EmptyLineAfterExample::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::EmptyLineAfterExampleGroup < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RSpec::FinalEndLocation) - include(::RuboCop::Cop::RangeHelp) - include(::RuboCop::Cop::RSpec::EmptyLineSeparation) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RSpec::FinalEndLocation + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::RSpec::EmptyLineSeparation + extend ::RuboCop::Cop::AutoCorrector def on_block(node); end end @@ -380,10 +359,10 @@ end RuboCop::Cop::RSpec::EmptyLineAfterExampleGroup::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::EmptyLineAfterFinalLet < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RSpec::FinalEndLocation) - include(::RuboCop::Cop::RangeHelp) - include(::RuboCop::Cop::RSpec::EmptyLineSeparation) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RSpec::FinalEndLocation + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::RSpec::EmptyLineSeparation + extend ::RuboCop::Cop::AutoCorrector def on_block(node); end end @@ -391,10 +370,10 @@ end RuboCop::Cop::RSpec::EmptyLineAfterFinalLet::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::EmptyLineAfterHook < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RSpec::FinalEndLocation) - include(::RuboCop::Cop::RangeHelp) - include(::RuboCop::Cop::RSpec::EmptyLineSeparation) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RSpec::FinalEndLocation + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::RSpec::EmptyLineSeparation + extend ::RuboCop::Cop::AutoCorrector def on_block(node); end end @@ -402,10 +381,10 @@ end RuboCop::Cop::RSpec::EmptyLineAfterHook::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::EmptyLineAfterSubject < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RSpec::FinalEndLocation) - include(::RuboCop::Cop::RangeHelp) - include(::RuboCop::Cop::RSpec::EmptyLineSeparation) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RSpec::FinalEndLocation + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::RSpec::EmptyLineSeparation + extend ::RuboCop::Cop::AutoCorrector def on_block(node); end @@ -417,8 +396,8 @@ end RuboCop::Cop::RSpec::EmptyLineAfterSubject::MSG = T.let(T.unsafe(nil), String) module RuboCop::Cop::RSpec::EmptyLineSeparation - include(::RuboCop::Cop::RSpec::FinalEndLocation) - include(::RuboCop::Cop::RangeHelp) + include ::RuboCop::Cop::RSpec::FinalEndLocation + include ::RuboCop::Cop::RangeHelp def last_child?(node); end def missing_separating_line(node); end @@ -427,7 +406,7 @@ module RuboCop::Cop::RSpec::EmptyLineSeparation end class RuboCop::Cop::RSpec::ExampleLength < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::CodeLength) + include ::RuboCop::Cop::CodeLength def on_block(node); end @@ -439,7 +418,7 @@ end RuboCop::Cop::RSpec::ExampleLength::LABEL = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::ExampleWithoutDescription < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) + include ::RuboCop::Cop::ConfigurableEnforcedStyle def example_description(param0 = T.unsafe(nil)); end def on_block(node); end @@ -451,11 +430,10 @@ class RuboCop::Cop::RSpec::ExampleWithoutDescription < ::RuboCop::Cop::RSpec::Ba end RuboCop::Cop::RSpec::ExampleWithoutDescription::MSG_ADD_DESCRIPTION = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::ExampleWithoutDescription::MSG_DEFAULT_ARGUMENT = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::ExampleWording < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def it_description(param0 = T.unsafe(nil)); end def on_block(node); end @@ -471,15 +449,12 @@ class RuboCop::Cop::RSpec::ExampleWording < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::ExampleWording::IT_PREFIX = T.let(T.unsafe(nil), Regexp) - RuboCop::Cop::RSpec::ExampleWording::MSG_IT = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::ExampleWording::MSG_SHOULD = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::ExampleWording::SHOULD_PREFIX = T.let(T.unsafe(nil), Regexp) class RuboCop::Cop::RSpec::ExpectActual < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def expect_literal(param0 = T.unsafe(nil)); end def on_send(node); end @@ -493,16 +468,13 @@ class RuboCop::Cop::RSpec::ExpectActual < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::ExpectActual::COMPLEX_LITERALS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::RSpec::ExpectActual::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::ExpectActual::SIMPLE_LITERALS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::RSpec::ExpectActual::SUPPORTED_MATCHERS = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::ExpectChange < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector def expect_change_with_arguments(param0 = T.unsafe(nil)); end def expect_change_with_block(param0 = T.unsafe(nil)); end @@ -511,9 +483,7 @@ class RuboCop::Cop::RSpec::ExpectChange < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::ExpectChange::MSG_BLOCK = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::ExpectChange::MSG_CALL = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::ExpectChange::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::ExpectInHook < ::RuboCop::Cop::RSpec::Base @@ -538,8 +508,8 @@ end RuboCop::Cop::RSpec::ExpectOutput::MSG = T.let(T.unsafe(nil), String) module RuboCop::Cop::RSpec::ExplicitHelper - include(::RuboCop::RSpec::Language) - extend(::RuboCop::AST::NodePattern::Macros) + include ::RuboCop::RSpec::Language + extend ::RuboCop::AST::NodePattern::Macros def predicate_matcher?(param0 = T.unsafe(nil)); end def predicate_matcher_block?(param0 = T.unsafe(nil)); end @@ -557,14 +527,11 @@ module RuboCop::Cop::RSpec::ExplicitHelper end RuboCop::Cop::RSpec::ExplicitHelper::BUILT_IN_MATCHERS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::RSpec::ExplicitHelper::MSG_EXPLICIT = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::RSpec::FactoryBot -end +module RuboCop::Cop::RSpec::FactoryBot; end class RuboCop::Cop::RSpec::FactoryBot::AttributeDefinedStatically < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def association?(param0 = T.unsafe(nil)); end def factory_attributes(param0 = T.unsafe(nil)); end @@ -588,8 +555,8 @@ end RuboCop::Cop::RSpec::FactoryBot::AttributeDefinedStatically::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::FactoryBot::CreateList < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector def factory_call(param0 = T.unsafe(nil)); end def factory_list_call(param0 = T.unsafe(nil)); end @@ -603,7 +570,6 @@ class RuboCop::Cop::RSpec::FactoryBot::CreateList < ::RuboCop::Cop::RSpec::Base end module RuboCop::Cop::RSpec::FactoryBot::CreateList::Corrector - private def build_options_string(options); end @@ -612,7 +578,7 @@ module RuboCop::Cop::RSpec::FactoryBot::CreateList::Corrector end class RuboCop::Cop::RSpec::FactoryBot::CreateList::CreateListCorrector - include(::RuboCop::Cop::RSpec::FactoryBot::CreateList::Corrector) + include ::RuboCop::Cop::RSpec::FactoryBot::CreateList::Corrector def initialize(node); end @@ -630,13 +596,11 @@ class RuboCop::Cop::RSpec::FactoryBot::CreateList::CreateListCorrector end RuboCop::Cop::RSpec::FactoryBot::CreateList::MSG_CREATE_LIST = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::FactoryBot::CreateList::MSG_N_TIMES = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::FactoryBot::CreateList::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::FactoryBot::CreateList::TimesCorrector - include(::RuboCop::Cop::RSpec::FactoryBot::CreateList::Corrector) + include ::RuboCop::Cop::RSpec::FactoryBot::CreateList::Corrector def initialize(node); end @@ -649,7 +613,7 @@ class RuboCop::Cop::RSpec::FactoryBot::CreateList::TimesCorrector end class RuboCop::Cop::RSpec::FactoryBot::FactoryClassName < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def class_name(param0 = T.unsafe(nil)); end def on_send(node); end @@ -660,15 +624,13 @@ class RuboCop::Cop::RSpec::FactoryBot::FactoryClassName < ::RuboCop::Cop::RSpec: end RuboCop::Cop::RSpec::FactoryBot::FactoryClassName::ALLOWED_CONSTANTS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::RSpec::FactoryBot::FactoryClassName::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::FactoryBot::FactoryClassName::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::FilePath < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RSpec::TopLevelGroup) + include ::RuboCop::Cop::RSpec::TopLevelGroup - def const_described(param0 = T.unsafe(nil)); end + def example_group(param0 = T.unsafe(nil)); end def on_top_level_example_group(node); end def routing_metadata?(param0); end @@ -676,12 +638,12 @@ class RuboCop::Cop::RSpec::FilePath < ::RuboCop::Cop::RSpec::Base def camel_to_snake_case(string); end def custom_transform; end - def ensure_correct_file_path(send_node, described_class, arguments); end + def ensure_correct_file_path(send_node, example_group, arguments); end def expected_path(constant); end def filename_ends_with?(pattern); end def ignore_methods?; end def name_pattern(method_name); end - def pattern_for(described_class, method_name); end + def pattern_for(example_group, method_name); end def pattern_for_spec_suffix_only?; end def relevant_rubocop_rspec_file?(_file); end def routing_spec?(args); end @@ -695,8 +657,8 @@ module RuboCop::Cop::RSpec::FinalEndLocation end class RuboCop::Cop::RSpec::Focus < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def focusable_selector?(param0 = T.unsafe(nil)); end def focused_block?(param0 = T.unsafe(nil)); end @@ -713,8 +675,8 @@ end RuboCop::Cop::RSpec::Focus::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::HookArgument < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector def on_block(node); end def scoped_hook(param0 = T.unsafe(nil)); end @@ -730,11 +692,10 @@ class RuboCop::Cop::RSpec::HookArgument < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::HookArgument::EXPLICIT_MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::HookArgument::IMPLICIT_MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::HooksBeforeExamples < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def example_or_group?(param0 = T.unsafe(nil)); end def on_block(node); end @@ -749,6 +710,14 @@ end RuboCop::Cop::RSpec::HooksBeforeExamples::MSG = T.let(T.unsafe(nil), String) +class RuboCop::Cop::RSpec::IdenticalEqualityAssertion < ::RuboCop::Cop::RSpec::Base + def equality_check?(param0 = T.unsafe(nil)); end + def on_send(node); end +end + +RuboCop::Cop::RSpec::IdenticalEqualityAssertion::MSG = T.let(T.unsafe(nil), String) +RuboCop::Cop::RSpec::IdenticalEqualityAssertion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + class RuboCop::Cop::RSpec::ImplicitBlockExpectation < ::RuboCop::Cop::RSpec::Base def implicit_expect(param0 = T.unsafe(nil)); end def lambda?(param0 = T.unsafe(nil)); end @@ -763,12 +732,11 @@ class RuboCop::Cop::RSpec::ImplicitBlockExpectation < ::RuboCop::Cop::RSpec::Bas end RuboCop::Cop::RSpec::ImplicitBlockExpectation::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::ImplicitBlockExpectation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::ImplicitExpect < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector def implicit_expect(param0 = T.unsafe(nil)); end def on_send(node); end @@ -782,12 +750,11 @@ class RuboCop::Cop::RSpec::ImplicitExpect < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::ImplicitExpect::ENFORCED_REPLACEMENTS = T.let(T.unsafe(nil), Hash) - RuboCop::Cop::RSpec::ImplicitExpect::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::ImplicitSubject < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector def implicit_subject?(param0 = T.unsafe(nil)); end def on_send(node); end @@ -800,12 +767,11 @@ class RuboCop::Cop::RSpec::ImplicitSubject < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::ImplicitSubject::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::ImplicitSubject::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) module RuboCop::Cop::RSpec::InflectedHelper - include(::RuboCop::RSpec::Language) - extend(::RuboCop::AST::NodePattern::Macros) + include ::RuboCop::RSpec::Language + extend ::RuboCop::AST::NodePattern::Macros def be_bool?(param0 = T.unsafe(nil)); end def be_boolthy?(param0 = T.unsafe(nil)); end @@ -826,7 +792,7 @@ end RuboCop::Cop::RSpec::InflectedHelper::MSG_INFLECTED = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::InstanceSpy < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def have_received_usage(param0); end def null_double(param0); end @@ -840,7 +806,7 @@ end RuboCop::Cop::RSpec::InstanceSpy::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::InstanceVariable < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RSpec::TopLevelGroup) + include ::RuboCop::Cop::RSpec::TopLevelGroup def custom_matcher?(param0 = T.unsafe(nil)); end def dynamic_class?(param0 = T.unsafe(nil)); end @@ -857,8 +823,8 @@ end RuboCop::Cop::RSpec::InstanceVariable::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::ItBehavesLike < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector def example_inclusion_offense(param0 = T.unsafe(nil), param1); end def on_send(node); end @@ -869,7 +835,6 @@ class RuboCop::Cop::RSpec::ItBehavesLike < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::ItBehavesLike::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::ItBehavesLike::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::IteratedExpectation < ::RuboCop::Cop::RSpec::Base @@ -886,7 +851,7 @@ end RuboCop::Cop::RSpec::IteratedExpectation::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::LeadingSubject < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def check_previous_nodes(node); end def on_block(node); end @@ -913,13 +878,11 @@ class RuboCop::Cop::RSpec::LeakyConstantDeclaration < ::RuboCop::Cop::RSpec::Bas end RuboCop::Cop::RSpec::LeakyConstantDeclaration::MSG_CLASS = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::LeakyConstantDeclaration::MSG_CONST = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::LeakyConstantDeclaration::MSG_MODULE = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::LetBeforeExamples < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def example_or_group?(param0 = T.unsafe(nil)); end def on_block(node); end @@ -953,11 +916,10 @@ class RuboCop::Cop::RSpec::MessageChain < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::MessageChain::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::MessageChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::MessageExpectation < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) + include ::RuboCop::Cop::ConfigurableEnforcedStyle def message_expectation(param0 = T.unsafe(nil)); end def on_send(node); end @@ -969,13 +931,11 @@ class RuboCop::Cop::RSpec::MessageExpectation < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::MessageExpectation::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::MessageExpectation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - RuboCop::Cop::RSpec::MessageExpectation::SUPPORTED_STYLES = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::MessageSpies < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) + include ::RuboCop::Cop::ConfigurableEnforcedStyle def message_expectation(param0 = T.unsafe(nil)); end def on_send(node); end @@ -989,9 +949,7 @@ class RuboCop::Cop::RSpec::MessageSpies < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::MessageSpies::MSG_HAVE_RECEIVED = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::MessageSpies::MSG_RECEIVE = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::MessageSpies::SUPPORTED_STYLES = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::MissingExampleGroupArgument < ::RuboCop::Cop::RSpec::Base @@ -1001,7 +959,7 @@ end RuboCop::Cop::RSpec::MissingExampleGroupArgument::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::MultipleDescribes < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RSpec::TopLevelGroup) + include ::RuboCop::Cop::RSpec::TopLevelGroup def on_top_level_group(node); end end @@ -1009,7 +967,7 @@ end RuboCop::Cop::RSpec::MultipleDescribes::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::MultipleExpectations < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableMax) + include ::RuboCop::Cop::ConfigurableMax def aggregate_failures?(param0 = T.unsafe(nil), param1); end def aggregate_failures_block?(param0 = T.unsafe(nil)); end @@ -1026,14 +984,12 @@ class RuboCop::Cop::RSpec::MultipleExpectations < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::MultipleExpectations::ANYTHING = T.let(T.unsafe(nil), Proc) - RuboCop::Cop::RSpec::MultipleExpectations::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::MultipleExpectations::TRUE = T.let(T.unsafe(nil), Proc) class RuboCop::Cop::RSpec::MultipleMemoizedHelpers < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableMax) - include(::RuboCop::Cop::RSpec::Variable) + include ::RuboCop::Cop::ConfigurableMax + include ::RuboCop::Cop::RSpec::Variable def on_block(node); end def on_new_investigation; end @@ -1051,8 +1007,8 @@ end RuboCop::Cop::RSpec::MultipleMemoizedHelpers::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::MultipleSubjects < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def on_block(node); end @@ -1077,8 +1033,8 @@ end RuboCop::Cop::RSpec::NamedSubject::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::NestedGroups < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableMax) - include(::RuboCop::Cop::RSpec::TopLevelGroup) + include ::RuboCop::Cop::ConfigurableMax + include ::RuboCop::Cop::RSpec::TopLevelGroup def on_top_level_group(node); end @@ -1091,14 +1047,12 @@ class RuboCop::Cop::RSpec::NestedGroups < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::NestedGroups::DEPRECATED_MAX_KEY = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::NestedGroups::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::NestedGroups::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::NotToNot < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector def not_to_not_offense(param0 = T.unsafe(nil), param1); end def on_send(node); end @@ -1109,7 +1063,6 @@ class RuboCop::Cop::RSpec::NotToNot < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::NotToNot::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::NotToNot::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::OverwritingSetup < ::RuboCop::Cop::RSpec::Base @@ -1140,10 +1093,10 @@ end RuboCop::Cop::RSpec::Pending::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::PredicateMatcher < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - include(::RuboCop::Cop::RSpec::InflectedHelper) - include(::RuboCop::Cop::RSpec::ExplicitHelper) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RSpec::InflectedHelper + include ::RuboCop::Cop::RSpec::ExplicitHelper + extend ::RuboCop::Cop::AutoCorrector def on_block(node); end def on_send(node); end @@ -1154,12 +1107,20 @@ class RuboCop::Cop::RSpec::PredicateMatcher < ::RuboCop::Cop::RSpec::Base def block_loc(send_node); end end -module RuboCop::Cop::RSpec::Rails +module RuboCop::Cop::RSpec::Rails; end + +class RuboCop::Cop::RSpec::Rails::AvoidSetupHook < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + def on_block(node); end + def setup_call(param0 = T.unsafe(nil)); end end +RuboCop::Cop::RSpec::Rails::AvoidSetupHook::MSG = T.let(T.unsafe(nil), String) + class RuboCop::Cop::RSpec::Rails::HttpStatus < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector def http_status(param0 = T.unsafe(nil)); end def on_send(node); end @@ -1185,9 +1146,7 @@ class RuboCop::Cop::RSpec::Rails::HttpStatus::NumericStyleChecker end RuboCop::Cop::RSpec::Rails::HttpStatus::NumericStyleChecker::ALLOWED_STATUSES = T.let(T.unsafe(nil), Array) - RuboCop::Cop::RSpec::Rails::HttpStatus::NumericStyleChecker::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::Rails::HttpStatus::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::Rails::HttpStatus::SymbolicStyleChecker @@ -1208,7 +1167,7 @@ end RuboCop::Cop::RSpec::Rails::HttpStatus::SymbolicStyleChecker::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::ReceiveCounts < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def on_send(node); end def receive_counts(param0 = T.unsafe(nil)); end @@ -1223,11 +1182,10 @@ class RuboCop::Cop::RSpec::ReceiveCounts < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::ReceiveCounts::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::ReceiveCounts::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::ReceiveNever < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def method_on_stub?(param0); end def on_send(node); end @@ -1238,7 +1196,6 @@ class RuboCop::Cop::RSpec::ReceiveNever < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::ReceiveNever::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::ReceiveNever::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::RepeatedDescription < ::RuboCop::Cop::RSpec::Base @@ -1315,8 +1272,8 @@ end RuboCop::Cop::RSpec::RepeatedIncludeExample::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::ReturnFromStub < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector def and_return_value(param0); end def contains_stub?(param0); end @@ -1361,15 +1318,12 @@ class RuboCop::Cop::RSpec::ReturnFromStub::BlockBodyCorrector end RuboCop::Cop::RSpec::ReturnFromStub::BlockBodyCorrector::NULL_BLOCK_BODY = T.let(T.unsafe(nil), T.untyped) - RuboCop::Cop::RSpec::ReturnFromStub::MSG_AND_RETURN = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::ReturnFromStub::MSG_BLOCK = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::ReturnFromStub::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::ScatteredLet < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def on_block(node); end @@ -1390,7 +1344,7 @@ end RuboCop::Cop::RSpec::ScatteredSetup::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::SharedContext < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def context?(param0); end def examples?(param0); end @@ -1405,11 +1359,10 @@ class RuboCop::Cop::RSpec::SharedContext < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::SharedContext::MSG_CONTEXT = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::SharedContext::MSG_EXAMPLES = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::SharedExamples < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def on_send(node); end def shared_examples(param0 = T.unsafe(nil)); end @@ -1431,7 +1384,7 @@ end RuboCop::Cop::RSpec::SharedExamples::Checker::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::SingleArgumentMessageChain < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def message_chain(param0 = T.unsafe(nil)); end def on_send(node); end @@ -1449,7 +1402,6 @@ class RuboCop::Cop::RSpec::SingleArgumentMessageChain < ::RuboCop::Cop::RSpec::B end RuboCop::Cop::RSpec::SingleArgumentMessageChain::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::SingleArgumentMessageChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::StubbedMock < ::RuboCop::Cop::RSpec::Base @@ -1472,7 +1424,7 @@ end RuboCop::Cop::RSpec::StubbedMock::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::SubjectStub < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RSpec::TopLevelGroup) + include ::RuboCop::Cop::RSpec::TopLevelGroup def message_expectation?(param0 = T.unsafe(nil), param1); end def message_expectation_matcher?(param0); end @@ -1488,7 +1440,7 @@ end RuboCop::Cop::RSpec::SubjectStub::MSG = T.let(T.unsafe(nil), String) module RuboCop::Cop::RSpec::TopLevelGroup - extend(::RuboCop::AST::NodePattern::Macros) + extend ::RuboCop::AST::NodePattern::Macros def on_new_investigation; end def top_level_groups; end @@ -1510,22 +1462,20 @@ class RuboCop::Cop::RSpec::UnspecifiedException < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::UnspecifiedException::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::UnspecifiedException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) module RuboCop::Cop::RSpec::Variable - extend(::RuboCop::AST::NodePattern::Macros) + extend ::RuboCop::AST::NodePattern::Macros def variable_definition?(param0 = T.unsafe(nil)); end end RuboCop::Cop::RSpec::Variable::Helpers = RuboCop::RSpec::Language::Helpers - RuboCop::Cop::RSpec::Variable::Subjects = RuboCop::RSpec::Language::Subjects class RuboCop::Cop::RSpec::VariableDefinition < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - include(::RuboCop::Cop::RSpec::Variable) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RSpec::Variable def on_send(node); end @@ -1539,11 +1489,11 @@ end RuboCop::Cop::RSpec::VariableDefinition::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::VariableName < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - include(::RuboCop::Cop::ConfigurableFormatting) - include(::RuboCop::Cop::ConfigurableNaming) - include(::RuboCop::Cop::IgnoredPattern) - include(::RuboCop::Cop::RSpec::Variable) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::ConfigurableFormatting + include ::RuboCop::Cop::ConfigurableNaming + include ::RuboCop::Cop::IgnoredPattern + include ::RuboCop::Cop::RSpec::Variable def on_send(node); end @@ -1564,7 +1514,6 @@ class RuboCop::Cop::RSpec::VerifiedDoubles < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::VerifiedDoubles::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::VerifiedDoubles::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::VoidExpect < ::RuboCop::Cop::RSpec::Base @@ -1580,12 +1529,11 @@ class RuboCop::Cop::RSpec::VoidExpect < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::VoidExpect::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::VoidExpect::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::Yield < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def block_arg(param0 = T.unsafe(nil)); end def block_call?(param0 = T.unsafe(nil), param1); end @@ -1602,16 +1550,12 @@ class RuboCop::Cop::RSpec::Yield < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::Yield::MSG = T.let(T.unsafe(nil), String) - RuboCop::NodePattern = RuboCop::AST::NodePattern - RuboCop::ProcessedSource = RuboCop::AST::ProcessedSource - -module RuboCop::RSpec -end +module RuboCop::RSpec; end class RuboCop::RSpec::AlignLetBrace - include(::RuboCop::RSpec::Language) + include ::RuboCop::RSpec::Language def initialize(root, token); end @@ -1630,9 +1574,9 @@ class RuboCop::RSpec::AlignLetBrace end class RuboCop::RSpec::Concept - include(::RuboCop::RSpec::Language) - extend(::RuboCop::AST::NodePattern::Macros) - extend(::RuboCop::RSpec::Language::NodePattern) + include ::RuboCop::RSpec::Language + extend ::RuboCop::AST::NodePattern::Macros + extend ::RuboCop::RSpec::Language::NodePattern def initialize(node); end @@ -1646,13 +1590,12 @@ class RuboCop::RSpec::Concept def node; end end -module RuboCop::RSpec::Corrector -end +module RuboCop::RSpec::Corrector; end class RuboCop::RSpec::Corrector::MoveNode - include(::RuboCop::Cop::RangeHelp) - include(::RuboCop::Cop::RSpec::FinalEndLocation) - include(::RuboCop::Cop::RSpec::CommentsHelp) + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::RSpec::FinalEndLocation + include ::RuboCop::Cop::RSpec::CommentsHelp def initialize(node, corrector, processed_source); end @@ -1699,6 +1642,11 @@ module RuboCop::RSpec::FactoryBot end end +RuboCop::RSpec::FactoryBot::ATTRIBUTE_DEFINING_METHODS = T.let(T.unsafe(nil), Array) +RuboCop::RSpec::FactoryBot::DEFINITION_PROXY_METHODS = T.let(T.unsafe(nil), Array) +RuboCop::RSpec::FactoryBot::RESERVED_METHODS = T.let(T.unsafe(nil), Array) +RuboCop::RSpec::FactoryBot::UNPROXIED_METHODS = T.let(T.unsafe(nil), Array) + class RuboCop::RSpec::Hook < ::RuboCop::RSpec::Concept def example?; end def extract_metadata(param0 = T.unsafe(nil)); end @@ -1723,8 +1671,8 @@ module RuboCop::RSpec::Inject end module RuboCop::RSpec::Language - extend(::RuboCop::AST::NodePattern::Macros) - extend(::RuboCop::RSpec::Language::NodePattern) + extend ::RuboCop::AST::NodePattern::Macros + extend ::RuboCop::RSpec::Language::NodePattern def example?(param0 = T.unsafe(nil)); end def example_group?(param0 = T.unsafe(nil)); end @@ -1743,6 +1691,37 @@ module RuboCop::RSpec::Language end end +module RuboCop::RSpec::Language::ALL + class << self + def all(element); end + end +end + +module RuboCop::RSpec::Language::ExampleGroups + class << self + def all(element); end + def focused(element); end + def regular(element); end + def skipped(element); end + end +end + +module RuboCop::RSpec::Language::Examples + class << self + def all(element); end + def focused(element); end + def pending(element); end + def regular(element); end + def skipped(element); end + end +end + +module RuboCop::RSpec::Language::Expectations + class << self + def all(element); end + end +end + module RuboCop::RSpec::Language::Helpers class << self def all(element); end @@ -1755,11 +1734,39 @@ module RuboCop::RSpec::Language::HookScopes end end +module RuboCop::RSpec::Language::Hooks + class << self + def all(element); end + end +end + +module RuboCop::RSpec::Language::Includes + class << self + def all(element); end + def context(element); end + def examples(element); end + end +end + module RuboCop::RSpec::Language::NodePattern def block_pattern(string); end def send_pattern(string); end end +module RuboCop::RSpec::Language::Runners + class << self + def all(element); end + end +end + +module RuboCop::RSpec::Language::SharedGroups + class << self + def all(element); end + def context(element); end + def examples(element); end + end +end + module RuboCop::RSpec::Language::Subjects class << self def all(element); end @@ -1770,9 +1777,7 @@ module RuboCop::RSpec::Node def recursive_literal_or_const?; end end -module RuboCop::RSpec::Version -end - +module RuboCop::RSpec::Version; end RuboCop::RSpec::Version::STRING = T.let(T.unsafe(nil), String) class RuboCop::RSpec::Wording @@ -1793,4 +1798,8 @@ class RuboCop::RSpec::Wording def uppercase?(word); end end +RuboCop::RSpec::Wording::ES_SUFFIX_PATTERN = T.let(T.unsafe(nil), Regexp) +RuboCop::RSpec::Wording::IES_SUFFIX_PATTERN = T.let(T.unsafe(nil), Regexp) +RuboCop::RSpec::Wording::SHOULDNT_BE_PREFIX = T.let(T.unsafe(nil), Regexp) +RuboCop::RSpec::Wording::SHOULDNT_PREFIX = T.let(T.unsafe(nil), Regexp) RuboCop::Token = RuboCop::AST::Token diff --git a/Library/Homebrew/sorbet/rbi/gems/rubocop@1.16.0.rbi b/Library/Homebrew/sorbet/rbi/gems/rubocop@1.16.1.rbi similarity index 99% rename from Library/Homebrew/sorbet/rbi/gems/rubocop@1.16.0.rbi rename to Library/Homebrew/sorbet/rbi/gems/rubocop@1.16.1.rbi index fd04f17d0c..407fd47efd 100644 --- a/Library/Homebrew/sorbet/rbi/gems/rubocop@1.16.0.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/rubocop@1.16.1.rbi @@ -10044,6 +10044,7 @@ class RuboCop::Cop::Style::QuotedSymbols < ::RuboCop::Cop::Base def alternative_style; end def autocorrect(corrector, node); end def correct_quotes(str); end + def hash_colon_key?(node); end def quoted?(sym_node); end def style; end def wrong_quotes?(node); end @@ -10452,15 +10453,19 @@ class RuboCop::Cop::Style::RedundantSelf < ::RuboCop::Cop::Base def on_blockarg(node); end def on_def(node); end def on_defs(node); end + def on_if(node); end def on_lvasgn(node); end def on_masgn(node); end def on_op_asgn(node); end def on_or_asgn(node); end def on_send(node); end + def on_until(node); end + def on_while(node); end private def add_lhs_to_local_variables_scopes(rhs, lhs); end + def add_masgn_lhs_variables(rhs, lhs); end def add_scope(node, local_variables = T.unsafe(nil)); end def allow_self(node); end def allowed_send_node?(node); end diff --git a/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi b/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi index 3060939c63..944be741a5 100644 --- a/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi +++ b/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi @@ -6991,11 +6991,6 @@ class Enumerator::Generator def initialize(*_); end end -module EnvVar - extend ::T::Private::Methods::MethodHooks - extend ::T::Private::Methods::SingletonMethodHooks -end - class Errno::EAUTH Errno = ::T.let(nil, ::T.untyped) end @@ -8392,11 +8387,6 @@ class Homebrew::Service extend ::T::Private::Methods::SingletonMethodHooks end -module Homebrew::Settings - extend ::T::Private::Methods::MethodHooks - extend ::T::Private::Methods::SingletonMethodHooks -end - class Homebrew::Style::LineLocation extend ::T::Private::Methods::MethodHooks extend ::T::Private::Methods::SingletonMethodHooks @@ -12636,8 +12626,8 @@ end class Object include ::Minitest::Expectations include ::ActiveSupport::Tryable - include ::SystemCommand::Mixin include ::Utils::Curl + include ::SystemCommand::Mixin include ::ActiveSupport::Dependencies::Loadable include ::ActiveSupport::ForkTracker::CoreExtPrivate include ::ActiveSupport::ForkTracker::CoreExt @@ -12662,6 +12652,7 @@ class Object DEPRECATED_OFFICIAL_TAPS = ::T.let(nil, ::T.untyped) ENV = ::T.let(nil, ::T.untyped) FORMULA_COMPONENT_PRECEDENCE_LIST = ::T.let(nil, ::T.untyped) + HIDDEN_DESC_PLACEHOLDER = ::T.let(nil, ::T.untyped) HOMEBREW_BOTTLES_EXTNAME_REGEX = ::T.let(nil, ::T.untyped) HOMEBREW_BOTTLE_DEFAULT_DOMAIN = ::T.let(nil, ::T.untyped) HOMEBREW_BREW_DEFAULT_GIT_REMOTE = ::T.let(nil, ::T.untyped) @@ -26802,6 +26793,7 @@ end module RuboCop::AST::NodePattern::Sets SET_BUILD_RECOMMENDED_TEST_OPTIONAL = ::T.let(nil, ::T.untyped) SET_DEPENDS_ON_USES_FROM_MACOS = ::T.let(nil, ::T.untyped) + SET_EQL_EQ_BE = ::T.let(nil, ::T.untyped) SET_INCLUDE_WITH_WITHOUT = ::T.let(nil, ::T.untyped) SET_SYSTEM_SHELL_OUTPUT_PIPE_OUTPUT = ::T.let(nil, ::T.untyped) SET_WITH_WITHOUT = ::T.let(nil, ::T.untyped) diff --git a/Library/Homebrew/standalone.rb b/Library/Homebrew/standalone.rb new file mode 100644 index 0000000000..cb540077a1 --- /dev/null +++ b/Library/Homebrew/standalone.rb @@ -0,0 +1,7 @@ +# typed: true +# frozen_string_literal: true + +# This file should be the first `require` in all entrypoints outside the `brew` environment. + +require_relative "standalone/load_path" +require_relative "standalone/sorbet" diff --git a/Library/Homebrew/load_path.rb b/Library/Homebrew/standalone/load_path.rb similarity index 82% rename from Library/Homebrew/load_path.rb rename to Library/Homebrew/standalone/load_path.rb index a5c65fb680..ff7daed613 100644 --- a/Library/Homebrew/load_path.rb +++ b/Library/Homebrew/standalone/load_path.rb @@ -3,13 +3,13 @@ require "pathname" -HOMEBREW_LIBRARY_PATH = Pathname(__dir__).realpath.freeze +HOMEBREW_LIBRARY_PATH = Pathname(__dir__).parent.realpath.freeze -require_relative "utils/gems" +require_relative "../utils/gems" Homebrew.setup_gem_environment!(setup_path: false) $LOAD_PATH.push HOMEBREW_LIBRARY_PATH.to_s unless $LOAD_PATH.include?(HOMEBREW_LIBRARY_PATH.to_s) -require_relative "vendor/bundle/bundler/setup" +require_relative "../vendor/bundle/bundler/setup" $LOAD_PATH.uniq! # Block any gem loading by bypassing rubygem's `require`. @@ -21,5 +21,3 @@ if Kernel.private_method_defined?(:gem_original_require) Kernel.send(:define_method, :require, Kernel.instance_method(:gem_original_require)) Kernel.send(:private, :require) end - -require_relative "homebrew_bootsnap" diff --git a/Library/Homebrew/standalone/sorbet.rb b/Library/Homebrew/standalone/sorbet.rb new file mode 100644 index 0000000000..8576c7ad0d --- /dev/null +++ b/Library/Homebrew/standalone/sorbet.rb @@ -0,0 +1,11 @@ +# typed: true +# frozen_string_literal: true + +# Explicitly prevent `sorbet-runtime` from being loaded. +def gem(name, *) + raise Gem::LoadError if name == "sorbet-runtime" + + super +end + +require "sorbet-runtime-stub" diff --git a/Library/Homebrew/startup.rb b/Library/Homebrew/startup.rb new file mode 100644 index 0000000000..d08f5420cf --- /dev/null +++ b/Library/Homebrew/startup.rb @@ -0,0 +1,10 @@ +# typed: true +# frozen_string_literal: true + +# This file should be the first `require` in all entrypoints of `brew`. + +require_relative "standalone/load_path" +require_relative "startup/ruby_path" +require "startup/config" +require_relative "startup/bootsnap" +require_relative "startup/sorbet" diff --git a/Library/Homebrew/homebrew_bootsnap.rb b/Library/Homebrew/startup/bootsnap.rb similarity index 100% rename from Library/Homebrew/homebrew_bootsnap.rb rename to Library/Homebrew/startup/bootsnap.rb diff --git a/Library/Homebrew/config.rb b/Library/Homebrew/startup/config.rb similarity index 90% rename from Library/Homebrew/config.rb rename to Library/Homebrew/startup/config.rb index 4369b95616..29d3088bff 100644 --- a/Library/Homebrew/config.rb +++ b/Library/Homebrew/startup/config.rb @@ -12,9 +12,6 @@ class MissingEnvironmentVariables < RuntimeError; end # # @api private module EnvVar - extend T::Sig - - sig { params(env: String).returns(String) } def self.[](env) raise MissingEnvironmentVariables, "#{env} was not exported!" unless ENV[env] @@ -22,15 +19,11 @@ module EnvVar end end -require "extend/git_repository" - # Where we link under HOMEBREW_PREFIX = Pathname(EnvVar["HOMEBREW_PREFIX"]).freeze # Where `.git` is found -HOMEBREW_REPOSITORY = Pathname(EnvVar["HOMEBREW_REPOSITORY"]) - .extend(GitRepositoryExtension) - .freeze +HOMEBREW_REPOSITORY = Pathname(EnvVar["HOMEBREW_REPOSITORY"]).freeze # Where we store most of Homebrew, taps, and various metadata HOMEBREW_LIBRARY = Pathname(EnvVar["HOMEBREW_LIBRARY"]).freeze diff --git a/Library/Homebrew/startup/ruby_path.rb b/Library/Homebrew/startup/ruby_path.rb new file mode 100644 index 0000000000..e9a7a634fb --- /dev/null +++ b/Library/Homebrew/startup/ruby_path.rb @@ -0,0 +1,7 @@ +# typed: true +# frozen_string_literal: true + +require "rbconfig" + +RUBY_PATH = Pathname.new(RbConfig.ruby).freeze +RUBY_BIN = RUBY_PATH.dirname.freeze diff --git a/Library/Homebrew/startup/sorbet.rb b/Library/Homebrew/startup/sorbet.rb new file mode 100644 index 0000000000..6005bbe088 --- /dev/null +++ b/Library/Homebrew/startup/sorbet.rb @@ -0,0 +1,10 @@ +# typed: true +# frozen_string_literal: true + +if ENV["HOMEBREW_SORBET_RUNTIME"] + # This is only supported under the brew environment. + Homebrew.install_bundler_gems!(groups: ["sorbet"]) + require "sorbet-runtime" +else + require "standalone/sorbet" +end diff --git a/Library/Homebrew/style.rb b/Library/Homebrew/style.rb index bba9ead698..c802ad087c 100644 --- a/Library/Homebrew/style.rb +++ b/Library/Homebrew/style.rb @@ -85,7 +85,7 @@ module Homebrew require "rubocop" end - require "rubocops" + require "rubocops/all" args = %w[ --force-exclusion diff --git a/Library/Homebrew/system_config.rb b/Library/Homebrew/system_config.rb index 14f16388ca..8912abf2fc 100644 --- a/Library/Homebrew/system_config.rb +++ b/Library/Homebrew/system_config.rb @@ -32,19 +32,24 @@ module SystemConfig end end + sig { returns(Pathname) } + def homebrew_repo + HOMEBREW_REPOSITORY.dup.extend(GitRepositoryExtension) + end + sig { returns(String) } def head - HOMEBREW_REPOSITORY.git_head || "(none)" + homebrew_repo.git_head || "(none)" end sig { returns(String) } def last_commit - HOMEBREW_REPOSITORY.git_last_commit || "never" + homebrew_repo.git_last_commit || "never" end sig { returns(String) } def origin - HOMEBREW_REPOSITORY.git_origin || "(none)" + homebrew_repo.git_origin || "(none)" end sig { returns(String) } diff --git a/Library/Homebrew/tap_constants.rb b/Library/Homebrew/tap_constants.rb index 10e167b2a2..b9edb7afeb 100644 --- a/Library/Homebrew/tap_constants.rb +++ b/Library/Homebrew/tap_constants.rb @@ -1,8 +1,6 @@ # typed: true # frozen_string_literal: true -require "config" - # Match taps' formulae, e.g. `someuser/sometap/someformula` HOMEBREW_TAP_FORMULA_REGEX = %r{^([\w-]+)/([\w-]+)/([\w+-.@]+)$}.freeze # Match taps' casks, e.g. `someuser/sometap/somecask` diff --git a/Library/Homebrew/test/cli/parser_spec.rb b/Library/Homebrew/test/cli/parser_spec.rb index 00861fba47..30f8d4d225 100644 --- a/Library/Homebrew/test/cli/parser_spec.rb +++ b/Library/Homebrew/test/cli/parser_spec.rb @@ -9,6 +9,7 @@ describe Homebrew::CLI::Parser do described_class.new do switch "--more-verbose", description: "Flag for higher verbosity" switch "--pry", env: :pry + switch "--hidden", hidden: true end } @@ -98,6 +99,11 @@ describe Homebrew::CLI::Parser do expect(args.more_verbose?).to be false end + it "sets the correct value for a hidden switch" do + args = parser.parse([]) + expect(args.hidden?).to be false + end + it "raises an exception and outputs help text when an invalid option is passed" do expect { parser.parse(["--random"]) }.to raise_error(OptionParser::InvalidOption, /--random/) .and output(/Usage: brew/).to_stderr @@ -114,6 +120,8 @@ describe Homebrew::CLI::Parser do described_class.new do flag "--filename=", description: "Name of the file" comma_array "--files", description: "Comma separated filenames" + flag "--hidden=", hidden: true + comma_array "--hidden-array", hidden: true end } @@ -130,6 +138,12 @@ describe Homebrew::CLI::Parser do args = parser.parse(["--files=random1.txt,random2.txt"]) expect(args.files).to eq %w[random1.txt random2.txt] end + + it "sets the correct value for hidden flags" do + args = parser.parse(["--hidden=foo", "--hidden-array=bar,baz"]) + expect(args.hidden).to eq "foo" + expect(args.hidden_array).to eq %w[bar baz] + end end describe "test short flag options" do @@ -361,6 +375,13 @@ describe Homebrew::CLI::Parser do expect(parser.generate_help_text).to match(/\[--foo=\]/) end + it "does not include hidden options" do + parser = described_class.new do + switch "--foo", hidden: true + end + expect(parser.generate_help_text).not_to match(/\[--foo\]/) + end + it "doesn't include `[options]` if non non-global options are available" do parser = described_class.new expect(parser.generate_help_text).not_to match(/\[options\]/) diff --git a/Library/Homebrew/test/cmd/home_spec.rb b/Library/Homebrew/test/cmd/home_spec.rb index 57c6eb70b0..063846c334 100644 --- a/Library/Homebrew/test/cmd/home_spec.rb +++ b/Library/Homebrew/test/cmd/home_spec.rb @@ -2,7 +2,6 @@ # frozen_string_literal: true require "cmd/shared_examples/args_parse" -require "support/lib/config" describe "brew home" do let(:testballhome_homepage) { diff --git a/Library/Homebrew/test/pkg_version_spec.rb b/Library/Homebrew/test/pkg_version_spec.rb index 61344d094e..2ff51a01f4 100644 --- a/Library/Homebrew/test/pkg_version_spec.rb +++ b/Library/Homebrew/test/pkg_version_spec.rb @@ -17,7 +17,9 @@ describe PkgVersion do specify "#==" do expect(described_class.parse("1.0_0")).to be == described_class.parse("1.0") - expect(described_class.parse("1.0_1")).to be == described_class.parse("1.0_1") + version_to_compare = described_class.parse("1.0_1") + expect(version_to_compare == described_class.parse("1.0_1")).to be true + expect(version_to_compare == described_class.parse("1.0_2")).to be false end describe "#>" do diff --git a/Library/Homebrew/test/support/lib/default_prefix.rb b/Library/Homebrew/test/support/lib/default_prefix.rb new file mode 100644 index 0000000000..e912bd4831 --- /dev/null +++ b/Library/Homebrew/test/support/lib/default_prefix.rb @@ -0,0 +1,8 @@ +# typed: true +# frozen_string_literal: true + +module Homebrew + # For testing's sake always assume the default prefix + DEFAULT_PREFIX = HOMEBREW_PREFIX.to_s.freeze + DEFAULT_REPOSITORY = HOMEBREW_REPOSITORY.to_s.freeze +end diff --git a/Library/Homebrew/test/support/lib/config.rb b/Library/Homebrew/test/support/lib/startup/config.rb similarity index 84% rename from Library/Homebrew/test/support/lib/config.rb rename to Library/Homebrew/test/support/lib/startup/config.rb index 9e11210c39..ea9aad2897 100644 --- a/Library/Homebrew/test/support/lib/config.rb +++ b/Library/Homebrew/test/support/lib/startup/config.rb @@ -3,8 +3,6 @@ raise "HOMEBREW_BREW_FILE was not exported! Please call bin/brew directly!" unless ENV["HOMEBREW_BREW_FILE"] -require "pathname" - HOMEBREW_BREW_FILE = Pathname.new(ENV["HOMEBREW_BREW_FILE"]).freeze TEST_TMPDIR = ENV.fetch("HOMEBREW_TEST_TMPDIR") do |k| @@ -23,11 +21,9 @@ HOMEBREW_SHIMS_PATH = (HOMEBREW_LIBRARY_PATH/"shims").freeze # Where external data that has been incorporated into Homebrew is stored HOMEBREW_DATA_PATH = (HOMEBREW_LIBRARY_PATH/"data").freeze -require "extend/git_repository" - # Paths redirected to a temporary directory and wiped at the end of the test run HOMEBREW_PREFIX = (Pathname(TEST_TMPDIR)/"prefix").freeze -HOMEBREW_REPOSITORY = HOMEBREW_PREFIX.dup.extend(GitRepositoryExtension).freeze +HOMEBREW_REPOSITORY = HOMEBREW_PREFIX.dup.freeze HOMEBREW_LIBRARY = (HOMEBREW_REPOSITORY/"Library").freeze HOMEBREW_CACHE = (HOMEBREW_PREFIX.parent/"cache").freeze HOMEBREW_CACHE_FORMULA = (HOMEBREW_PREFIX.parent/"formula_cache").freeze @@ -52,12 +48,3 @@ PATCH_B_SHA256 = "57958271bb802a59452d0816e0670d16c8b70bdf6530bcf6f78726489ad89b TEST_SHA1 = "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef" TEST_SHA256 = "deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef" - -# For testing's sake always assume the default prefix -module Homebrew - remove_const :DEFAULT_PREFIX if defined?(DEFAULT_PREFIX) - DEFAULT_PREFIX = HOMEBREW_PREFIX.to_s.freeze - - remove_const :DEFAULT_REPOSITORY if defined?(DEFAULT_REPOSITORY) - DEFAULT_REPOSITORY = HOMEBREW_REPOSITORY.to_s.freeze -end diff --git a/Library/Homebrew/utils/gems.rb b/Library/Homebrew/utils/gems.rb index bc2337834c..0eaada3c8e 100644 --- a/Library/Homebrew/utils/gems.rb +++ b/Library/Homebrew/utils/gems.rb @@ -52,7 +52,7 @@ module Homebrew def setup_gem_environment!(gem_home: nil, gem_bindir: nil, setup_path: true) # Match where our bundler gems are. - gem_home ||= "#{ENV["HOMEBREW_LIBRARY"]}/Homebrew/vendor/bundle/ruby/#{RbConfig::CONFIG["ruby_version"]}" + gem_home ||= "#{HOMEBREW_LIBRARY_PATH}/vendor/bundle/ruby/#{RbConfig::CONFIG["ruby_version"]}" Gem.paths = { "GEM_HOME" => gem_home, "GEM_PATH" => gem_home, @@ -128,23 +128,34 @@ module Homebrew ) end - def install_bundler_gems!(only_warn_on_failure: false, setup_path: true) + def install_bundler_gems!(only_warn_on_failure: false, setup_path: true, groups: []) old_path = ENV["PATH"] old_gem_path = ENV["GEM_PATH"] old_gem_home = ENV["GEM_HOME"] old_bundle_gemfile = ENV["BUNDLE_GEMFILE"] + old_bundle_with = ENV["BUNDLE_WITH"] install_bundler! + require "settings" + + # Combine the passed groups with the ones stored in settings + groups |= (Homebrew::Settings.read(:gemgroups)&.split(";") || []) + groups.sort! + ENV["BUNDLE_GEMFILE"] = File.join(ENV.fetch("HOMEBREW_LIBRARY"), "Homebrew", "Gemfile") - @bundle_installed ||= begin + ENV["BUNDLE_WITH"] = groups.join(" ") + + if @bundle_installed_groups != groups bundle = File.join(find_in_path("bundle"), "bundle") bundle_check_output = `#{bundle} check 2>&1` bundle_check_failed = !$CHILD_STATUS.success? # for some reason sometimes the exit code lies so check the output too. - if bundle_check_failed || bundle_check_output.include?("Install missing gems") - unless system bundle, "install" + bundle_installed = if bundle_check_failed || bundle_check_output.include?("Install missing gems") + if system bundle, "install" + true + else message = <<~EOS failed to run `#{bundle} install`! EOS @@ -153,10 +164,16 @@ module Homebrew else odie_if_defined message end + false end else true end + + if bundle_installed + Homebrew::Settings.write(:gemgroups, groups.join(";")) + @bundle_installed_groups = groups + end end setup_gem_environment! @@ -167,6 +184,7 @@ module Homebrew ENV["GEM_PATH"] = old_gem_path ENV["GEM_HOME"] = old_gem_home ENV["BUNDLE_GEMFILE"] = old_bundle_gemfile + ENV["BUNDLE_WITH"] = old_bundle_with end end end diff --git a/Library/Homebrew/utils/gems.rbi b/Library/Homebrew/utils/gems.rbi index 55bdcc1114..746bceef1d 100644 --- a/Library/Homebrew/utils/gems.rbi +++ b/Library/Homebrew/utils/gems.rbi @@ -22,6 +22,6 @@ module Homebrew sig { void } def install_bundler!; end - sig { params(only_warn_on_failure: T::Boolean, setup_path: T::Boolean).void } - def install_bundler_gems!(only_warn_on_failure: false, setup_path: false); end + sig { params(only_warn_on_failure: T::Boolean, setup_path: T::Boolean, groups: T::Array[String]).void } + def install_bundler_gems!(only_warn_on_failure: false, setup_path: false, groups: []); end end diff --git a/Library/Homebrew/utils/rubocop.rb b/Library/Homebrew/utils/rubocop.rb index ae6050ddd0..35db8717bd 100755 --- a/Library/Homebrew/utils/rubocop.rb +++ b/Library/Homebrew/utils/rubocop.rb @@ -2,9 +2,7 @@ # typed: false # frozen_string_literal: true -require_relative "gems" -Homebrew.setup_gem_environment! - +require_relative "../standalone" require_relative "../warnings" Warnings.ignore :parser_syntax do diff --git a/Library/Homebrew/utils/sorbet.rb b/Library/Homebrew/utils/sorbet.rb deleted file mode 100644 index aaf7f223fd..0000000000 --- a/Library/Homebrew/utils/sorbet.rb +++ /dev/null @@ -1,16 +0,0 @@ -# typed: true -# frozen_string_literal: true - -if ENV["HOMEBREW_SORBET_RUNTIME"] - Homebrew.install_bundler_gems! - require "sorbet-runtime" -else - # Explicitly prevent `sorbet-runtime` from being loaded. - def gem(name, *) - raise Gem::LoadError if name == "sorbet-runtime" - - super - end - - require "sorbet-runtime-stub" -end diff --git a/Library/Homebrew/vendor/bundle/bundler/setup.rb b/Library/Homebrew/vendor/bundle/bundler/setup.rb index adf90ec3ce..fbcc65b56d 100644 --- a/Library/Homebrew/vendor/bundle/bundler/setup.rb +++ b/Library/Homebrew/vendor/bundle/bundler/setup.rb @@ -79,10 +79,10 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-wait-0.0.9/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-ast-1.7.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-progressbar-1.11.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width-2.0.0/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.16.0/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.16.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.11.3/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.10.1/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.3.0/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.4.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-sorbet-0.6.2/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-macho-2.5.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-html-0.12.3/lib" diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/config/default.yml b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/config/default.yml similarity index 97% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/config/default.yml rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/config/default.yml index 1b3b7d3f43..fe526a1736 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/config/default.yml +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/config/default.yml @@ -351,6 +351,12 @@ RSpec/HooksBeforeExamples: VersionAdded: '1.29' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/HooksBeforeExamples +RSpec/IdenticalEqualityAssertion: + Description: Checks for equality assertions with identical expressions on both sides. + Enabled: pending + VersionAdded: '2.4' + StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IdenticalEqualityAssertion + RSpec/ImplicitBlockExpectation: Description: Check that implicit block expectation syntax is not used. Enabled: true @@ -753,6 +759,12 @@ RSpec/FactoryBot/FactoryClassName: VersionChanged: '2.0' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/FactoryClassName +RSpec/Rails/AvoidSetupHook: + Description: Checks that tests use RSpec `before` hook over Rails `setup` method. + Enabled: pending + VersionAdded: '2.4' + StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/AvoidSetupHook + RSpec/Rails/HttpStatus: Description: Enforces use of symbolic or numeric value to describe HTTP status. Enabled: true diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop-rspec.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop-rspec.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop-rspec.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop-rspec.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/align_left_let_brace.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/align_left_let_brace.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/align_left_let_brace.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/align_left_let_brace.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/align_right_let_brace.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/align_right_let_brace.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/align_right_let_brace.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/align_right_let_brace.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/any_instance.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/any_instance.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/any_instance.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/any_instance.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/around_block.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/around_block.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/around_block.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/around_block.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/base.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/base.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/base.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/base.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/be.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/be.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/be.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/be.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/be_eql.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/be_eql.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/be_eql.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/be_eql.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/before_after_all.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.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-2.3.0/lib/rubocop/cop/rspec/before_after_all.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/before_after_all.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/capybara/current_path_expectation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/capybara/current_path_expectation.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/capybara/current_path_expectation.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/capybara/current_path_expectation.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/capybara/feature_methods.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/capybara/feature_methods.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/capybara/feature_methods.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/capybara/feature_methods.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/capybara/visibility_matcher.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.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-2.3.0/lib/rubocop/cop/rspec/capybara/visibility_matcher.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/capybara/visibility_matcher.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/context_method.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/context_method.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/context_method.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/context_method.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/context_wording.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/context_wording.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/context_wording.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/context_wording.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/describe_class.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/describe_class.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/describe_class.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/describe_class.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/describe_method.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/describe_method.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/describe_method.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/describe_method.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/describe_symbol.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/describe_symbol.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/describe_symbol.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/describe_symbol.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/described_class.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/described_class.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/described_class.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/described_class.rb index aee738e016..05b646ae65 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/described_class.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/described_class.rb @@ -203,7 +203,7 @@ module RuboCop [name] elsif namespace.const_type? [*const_name(namespace), name] - elsif namespace.lvar_type? || namespace.cbase_type? + elsif %i[lvar cbase send].include?(namespace.type) [nil, name] end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/described_class_module_wrapping.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/described_class_module_wrapping.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/described_class_module_wrapping.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/described_class_module_wrapping.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/dialect.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/dialect.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/dialect.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/dialect.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/empty_example_group.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/empty_example_group.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/empty_example_group.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/empty_example_group.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/empty_hook.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/empty_hook.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/empty_hook.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/empty_hook.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/empty_line_after_example.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/empty_line_after_example.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/empty_line_after_example.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/empty_line_after_example.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/empty_line_after_example_group.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/empty_line_after_example_group.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/empty_line_after_example_group.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/empty_line_after_example_group.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/empty_line_after_final_let.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/empty_line_after_final_let.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/empty_line_after_final_let.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/empty_line_after_final_let.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/empty_line_after_hook.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/empty_line_after_hook.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/empty_line_after_hook.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/empty_line_after_hook.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/empty_line_after_subject.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/empty_line_after_subject.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/empty_line_after_subject.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/empty_line_after_subject.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/example_length.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/example_length.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/example_length.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/example_length.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/example_without_description.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.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-2.3.0/lib/rubocop/cop/rspec/example_without_description.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/example_without_description.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/example_wording.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/example_wording.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/example_wording.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/example_wording.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/expect_actual.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/expect_actual.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/expect_actual.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/expect_actual.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/expect_change.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/expect_change.rb similarity index 92% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/expect_change.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/expect_change.rb index 7c95b772be..7f24332b9f 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/expect_change.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/expect_change.rb @@ -39,7 +39,7 @@ module RuboCop # @!method expect_change_with_arguments(node) def_node_matcher :expect_change_with_arguments, <<-PATTERN - (send nil? :change ({const send} nil? $_) (sym $_)) + (send nil? :change $_ (sym $_)) PATTERN # @!method expect_change_with_block(node) @@ -55,9 +55,9 @@ module RuboCop return unless style == :block expect_change_with_arguments(node) do |receiver, message| - msg = format(MSG_CALL, obj: receiver, attr: message) + msg = format(MSG_CALL, obj: receiver.source, attr: message) add_offense(node, message: msg) do |corrector| - replacement = "change { #{receiver}.#{message} }" + replacement = "change { #{receiver.source}.#{message} }" corrector.replace(node, replacement) end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/expect_in_hook.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/expect_in_hook.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/expect_in_hook.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/expect_in_hook.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/expect_output.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/expect_output.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/expect_output.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/expect_output.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.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-2.3.0/lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.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-2.3.0/lib/rubocop/cop/rspec/factory_bot/create_list.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.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-2.3.0/lib/rubocop/cop/rspec/factory_bot/create_list.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/factory_bot/create_list.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.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-2.3.0/lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.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-2.3.0/lib/rubocop/cop/rspec/file_path.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/file_path.rb similarity index 86% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/file_path.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/file_path.rb index 4bf70ae89c..c2ab8f5845 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/file_path.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/file_path.rb @@ -61,10 +61,10 @@ module RuboCop MSG = 'Spec path should end with `%s`.' - # @!method const_described(node) - def_node_matcher :const_described, <<~PATTERN + # @!method example_group(node) + def_node_matcher :example_group, <<~PATTERN (block - $(send #rspec? _example_group $(const ...) $...) ... + $(send #rspec? _example_group $_ $...) ... ) PATTERN @@ -74,17 +74,17 @@ module RuboCop def on_top_level_example_group(node) return unless top_level_groups.one? - const_described(node) do |send_node, described_class, arguments| + example_group(node) do |send_node, example_group, arguments| next if routing_spec?(arguments) - ensure_correct_file_path(send_node, described_class, arguments) + ensure_correct_file_path(send_node, example_group, arguments) end end private - def ensure_correct_file_path(send_node, described_class, arguments) - pattern = pattern_for(described_class, arguments.first) + def ensure_correct_file_path(send_node, example_group, arguments) + pattern = pattern_for(example_group, arguments.first) return if filename_ends_with?(pattern) # For the suffix shown in the offense message, modify the regular @@ -99,11 +99,13 @@ module RuboCop args.any?(&method(:routing_metadata?)) end - def pattern_for(described_class, method_name) - return pattern_for_spec_suffix_only? if spec_suffix_only? + def pattern_for(example_group, method_name) + if spec_suffix_only? || !example_group.const_type? + return pattern_for_spec_suffix_only? + end [ - expected_path(described_class), + expected_path(example_group), name_pattern(method_name), '[^/]*_spec\.rb' ].join diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/focus.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/focus.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/focus.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/focus.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/hook_argument.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/hook_argument.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/hook_argument.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/hook_argument.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/hooks_before_examples.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/hooks_before_examples.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/hooks_before_examples.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/hooks_before_examples.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/identical_equality_assertion.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/identical_equality_assertion.rb new file mode 100644 index 0000000000..89f911b999 --- /dev/null +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/identical_equality_assertion.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +module RuboCop + module Cop + module RSpec + # Checks for equality assertions with identical expressions on both sides. + # + # @example + # + # # bad + # expect(foo.bar).to eq(foo.bar) + # expect(foo.bar).to eql(foo.bar) + # + # # good + # expect(foo.bar).to eq(2) + # expect(foo.bar).to eql(2) + # + class IdenticalEqualityAssertion < Base + MSG = 'Identical expressions on both sides of the equality ' \ + 'may indicate a flawed test.' + RESTRICT_ON_SEND = %i[to].freeze + + # @!method equality_check?(node) + def_node_matcher :equality_check?, <<~PATTERN + (send (send nil? :expect $_) :to + {(send nil? {:eql :eq :be} $_) + (send (send nil? :be) :== $_)}) + PATTERN + + def on_send(node) + equality_check?(node) do |left, right| + add_offense(node) if left == right + end + end + end + end + end +end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/implicit_block_expectation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.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-2.3.0/lib/rubocop/cop/rspec/implicit_block_expectation.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/implicit_block_expectation.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/implicit_expect.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/implicit_expect.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/implicit_expect.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/implicit_expect.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/implicit_subject.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/implicit_subject.rb similarity index 83% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/implicit_subject.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/implicit_subject.rb index 21380de71f..dafb022995 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/implicit_subject.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/implicit_subject.rb @@ -7,7 +7,7 @@ module RuboCop # # This cop can be configured using the `EnforcedStyle` option # - # @example `EnforcedStyle: single_line_only` + # @example `EnforcedStyle: single_line_only` (default) # # bad # it do # is_expected.to be_truthy @@ -19,6 +19,22 @@ module RuboCop # expect(subject).to be_truthy # end # + # @example `EnforcedStyle: single_statement_only` + # # bad + # it do + # foo = 1 + # is_expected.to be_truthy + # end + # + # # good + # it do + # foo = 1 + # expect(subject).to be_truthy + # end + # it do + # is_expected.to be_truthy + # end + # # @example `EnforcedStyle: disallow` # # bad # it { is_expected.to be_truthy } diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/instance_spy.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/instance_spy.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/instance_spy.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/instance_spy.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/instance_variable.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/instance_variable.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/instance_variable.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/instance_variable.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/it_behaves_like.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.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-2.3.0/lib/rubocop/cop/rspec/it_behaves_like.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/it_behaves_like.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/iterated_expectation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/iterated_expectation.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/iterated_expectation.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/iterated_expectation.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/leading_subject.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/leading_subject.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/leading_subject.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/leading_subject.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/leaky_constant_declaration.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.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-2.3.0/lib/rubocop/cop/rspec/leaky_constant_declaration.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/leaky_constant_declaration.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/let_before_examples.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/let_before_examples.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/let_before_examples.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/let_before_examples.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/let_setup.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/let_setup.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/let_setup.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/let_setup.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/message_chain.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/message_chain.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/message_chain.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/message_chain.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/message_expectation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/message_expectation.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/message_expectation.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/message_expectation.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/message_spies.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/message_spies.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/message_spies.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/message_spies.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/missing_example_group_argument.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.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-2.3.0/lib/rubocop/cop/rspec/missing_example_group_argument.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.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.3.0/lib/rubocop/cop/rspec/mixin/comments_help.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/mixin/comments_help.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/mixin/comments_help.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/mixin/comments_help.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/mixin/empty_line_separation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/mixin/empty_line_separation.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/mixin/empty_line_separation.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/mixin/empty_line_separation.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/mixin/final_end_location.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/mixin/final_end_location.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/mixin/final_end_location.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/mixin/final_end_location.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/mixin/top_level_group.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/mixin/top_level_group.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/mixin/top_level_group.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/mixin/top_level_group.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/mixin/variable.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/mixin/variable.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/mixin/variable.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/mixin/variable.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/multiple_describes.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/multiple_describes.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/multiple_describes.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/multiple_describes.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/multiple_expectations.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/multiple_expectations.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/multiple_expectations.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/multiple_expectations.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/multiple_subjects.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/multiple_subjects.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/multiple_subjects.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/multiple_subjects.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/named_subject.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/named_subject.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/named_subject.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/named_subject.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/nested_groups.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/nested_groups.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/nested_groups.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/nested_groups.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/not_to_not.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.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-2.3.0/lib/rubocop/cop/rspec/not_to_not.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/not_to_not.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/overwriting_setup.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/overwriting_setup.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/overwriting_setup.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/overwriting_setup.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/pending.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/pending.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/pending.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/pending.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/predicate_matcher.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/predicate_matcher.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/predicate_matcher.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/predicate_matcher.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/rails/avoid_setup_hook.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/rails/avoid_setup_hook.rb new file mode 100644 index 0000000000..00c1abe88b --- /dev/null +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/rails/avoid_setup_hook.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true + +module RuboCop + module Cop + module RSpec + module Rails + # Checks that tests use RSpec `before` hook over Rails `setup` method. + # + # @example + # + # # bad + # setup do + # allow(foo).to receive(:bar) + # end + # + # # good + # before do + # allow(foo).to receive(:bar) + # end + # + class AvoidSetupHook < Base + extend AutoCorrector + + MSG = 'Use `before` instead of `setup`.' + + # @!method setup_call(node) + def_node_matcher :setup_call, <<-PATTERN + (block + $(send nil? :setup) + (args) _) + PATTERN + + def on_block(node) + setup_call(node) do |setup| + add_offense(node) do |corrector| + corrector.replace setup, 'before' + end + end + end + end + end + end + end +end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/rails/http_status.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.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-2.3.0/lib/rubocop/cop/rspec/rails/http_status.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/rails/http_status.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/receive_counts.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/receive_counts.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/receive_counts.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/receive_counts.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/receive_never.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/receive_never.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/receive_never.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/receive_never.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/repeated_description.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/repeated_description.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/repeated_description.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/repeated_description.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/repeated_example.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/repeated_example.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/repeated_example.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/repeated_example.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/repeated_example_group_body.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.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-2.3.0/lib/rubocop/cop/rspec/repeated_example_group_body.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/repeated_example_group_body.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/repeated_example_group_description.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.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-2.3.0/lib/rubocop/cop/rspec/repeated_example_group_description.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/repeated_example_group_description.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/repeated_include_example.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/repeated_include_example.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/repeated_include_example.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/repeated_include_example.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/return_from_stub.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.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-2.3.0/lib/rubocop/cop/rspec/return_from_stub.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/return_from_stub.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/scattered_let.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/scattered_let.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/scattered_let.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/scattered_let.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/scattered_setup.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/scattered_setup.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/scattered_setup.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/scattered_setup.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/shared_context.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/shared_context.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/shared_context.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/shared_context.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/shared_examples.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/shared_examples.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/shared_examples.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/shared_examples.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/single_argument_message_chain.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.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-2.3.0/lib/rubocop/cop/rspec/single_argument_message_chain.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/single_argument_message_chain.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/stubbed_mock.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/stubbed_mock.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/stubbed_mock.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/stubbed_mock.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/subject_stub.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/subject_stub.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/subject_stub.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/subject_stub.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/unspecified_exception.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/unspecified_exception.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/unspecified_exception.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/unspecified_exception.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/variable_definition.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/variable_definition.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/variable_definition.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/variable_definition.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/variable_name.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/variable_name.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/variable_name.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/variable_name.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/verified_doubles.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/verified_doubles.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/verified_doubles.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/verified_doubles.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/void_expect.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/void_expect.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/void_expect.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/void_expect.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/yield.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/yield.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec/yield.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec/yield.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec_cops.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec_cops.rb similarity index 97% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec_cops.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec_cops.rb index 1de7e025d9..2263e0b9af 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/cop/rspec_cops.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/cop/rspec_cops.rb @@ -8,6 +8,7 @@ require_relative 'rspec/factory_bot/attribute_defined_statically' require_relative 'rspec/factory_bot/create_list' require_relative 'rspec/factory_bot/factory_class_name' +require_relative 'rspec/rails/avoid_setup_hook' begin require_relative 'rspec/rails/http_status' rescue LoadError @@ -47,6 +48,7 @@ require_relative 'rspec/file_path' require_relative 'rspec/focus' require_relative 'rspec/hook_argument' require_relative 'rspec/hooks_before_examples' +require_relative 'rspec/identical_equality_assertion' require_relative 'rspec/implicit_block_expectation' require_relative 'rspec/implicit_expect' require_relative 'rspec/implicit_subject' diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/align_let_brace.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/align_let_brace.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/align_let_brace.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/align_let_brace.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/concept.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/concept.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/concept.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/concept.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/config_formatter.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/config_formatter.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/config_formatter.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/config_formatter.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/corrector/move_node.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/corrector/move_node.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/corrector/move_node.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/corrector/move_node.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/description_extractor.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/description_extractor.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/description_extractor.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/description_extractor.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/example.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/example.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/example.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/example.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/example_group.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/example_group.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/example_group.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/example_group.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/factory_bot.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/factory_bot.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/factory_bot.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/factory_bot.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/hook.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/hook.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/hook.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/hook.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/inject.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/inject.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/inject.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/inject.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/language.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/language.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/language.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/language.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/language/node_pattern.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/language/node_pattern.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/language/node_pattern.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/language/node_pattern.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/node.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/node.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/node.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/node.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/version.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/version.rb similarity index 87% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/version.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/version.rb index 8e9024ea09..97e0d7ecd8 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/version.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/version.rb @@ -4,7 +4,7 @@ module RuboCop module RSpec # Version information for the RSpec RuboCop plugin. module Version - STRING = '2.3.0' + STRING = '2.4.0' end end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/wording.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/wording.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.3.0/lib/rubocop/rspec/wording.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib/rubocop/rspec/wording.rb diff --git a/completions/bash/brew b/completions/bash/brew index 17c8de184c..d592c40207 100644 --- a/completions/bash/brew +++ b/completions/bash/brew @@ -298,7 +298,6 @@ _brew_abv() { __brewcomp " --all --analytics - --bottle --cask --category --days @@ -996,7 +995,6 @@ _brew_info() { __brewcomp " --all --analytics - --bottle --cask --category --days @@ -1137,6 +1135,7 @@ _brew_install_bundler_gems() { -*) __brewcomp " --debug + --groups --help --quiet --verbose diff --git a/completions/fish/brew.fish b/completions/fish/brew.fish index 135e54ad50..4478fad7f2 100644 --- a/completions/fish/brew.fish +++ b/completions/fish/brew.fish @@ -293,7 +293,6 @@ __fish_brew_complete_arg '-S' -l verbose -d 'Make some output more verbose' __fish_brew_complete_cmd 'abv' 'Display brief statistics for your Homebrew installation' __fish_brew_complete_arg 'abv' -l all -d 'Print JSON of all available formulae' __fish_brew_complete_arg 'abv' -l analytics -d 'List global Homebrew analytics data or, if specified, installation and build error data for formula (provided neither `HOMEBREW_NO_ANALYTICS` nor `HOMEBREW_NO_GITHUB_API` are set)' -__fish_brew_complete_arg 'abv' -l bottle -d 'Output information about the bottles for formula and its dependencies' __fish_brew_complete_arg 'abv' -l cask -d 'Treat all named arguments as casks' __fish_brew_complete_arg 'abv' -l category -d 'Which type of analytics data to retrieve. The value for category must be `install`, `install-on-request` or `build-error`; `cask-install` or `os-version` may be specified if formula is not. The default is `install`' __fish_brew_complete_arg 'abv' -l days -d 'How many days of analytics data to retrieve. The value for days must be `30`, `90` or `365`. The default is `30`' @@ -716,7 +715,6 @@ __fish_brew_complete_arg 'homepage; and not __fish_seen_argument -l formula -l f __fish_brew_complete_cmd 'info' 'Display brief statistics for your Homebrew installation' __fish_brew_complete_arg 'info' -l all -d 'Print JSON of all available formulae' __fish_brew_complete_arg 'info' -l analytics -d 'List global Homebrew analytics data or, if specified, installation and build error data for formula (provided neither `HOMEBREW_NO_ANALYTICS` nor `HOMEBREW_NO_GITHUB_API` are set)' -__fish_brew_complete_arg 'info' -l bottle -d 'Output information about the bottles for formula and its dependencies' __fish_brew_complete_arg 'info' -l cask -d 'Treat all named arguments as casks' __fish_brew_complete_arg 'info' -l category -d 'Which type of analytics data to retrieve. The value for category must be `install`, `install-on-request` or `build-error`; `cask-install` or `os-version` may be specified if formula is not. The default is `install`' __fish_brew_complete_arg 'info' -l days -d 'How many days of analytics data to retrieve. The value for days must be `30`, `90` or `365`. The default is `30`' @@ -830,6 +828,7 @@ __fish_brew_complete_arg 'install; and not __fish_seen_argument -l formula -l fo __fish_brew_complete_cmd 'install-bundler-gems' 'Install Homebrew\'s Bundler gems' __fish_brew_complete_arg 'install-bundler-gems' -l debug -d 'Display any debugging information' +__fish_brew_complete_arg 'install-bundler-gems' -l groups -d 'Installs the specified comma-separated list of gem groups (default: last used)' __fish_brew_complete_arg 'install-bundler-gems' -l help -d 'Show this message' __fish_brew_complete_arg 'install-bundler-gems' -l quiet -d 'Make some output more quiet' __fish_brew_complete_arg 'install-bundler-gems' -l verbose -d 'Make some output more verbose' diff --git a/completions/zsh/_brew b/completions/zsh/_brew index e47cec7046..5bd1340fd9 100644 --- a/completions/zsh/_brew +++ b/completions/zsh/_brew @@ -372,7 +372,6 @@ _brew_abv() { _arguments \ '(--installed)--all[Print JSON of all available formulae]' \ '(--bottle)--analytics[List global Homebrew analytics data or, if specified, installation and build error data for formula (provided neither `HOMEBREW_NO_ANALYTICS` nor `HOMEBREW_NO_GITHUB_API` are set)]' \ - '(--cask --analytics --github)--bottle[Output information about the bottles for formula and its dependencies]' \ '--category[Which type of analytics data to retrieve. The value for category must be `install`, `install-on-request` or `build-error`; `cask-install` or `os-version` may be specified if formula is not. The default is `install`]' \ '--days[How many days of analytics data to retrieve. The value for days must be `30`, `90` or `365`. The default is `30`]' \ '--debug[Display any debugging information]' \ @@ -892,7 +891,6 @@ _brew_info() { _arguments \ '(--installed)--all[Print JSON of all available formulae]' \ '(--bottle)--analytics[List global Homebrew analytics data or, if specified, installation and build error data for formula (provided neither `HOMEBREW_NO_ANALYTICS` nor `HOMEBREW_NO_GITHUB_API` are set)]' \ - '(--cask --analytics --github)--bottle[Output information about the bottles for formula and its dependencies]' \ '--category[Which type of analytics data to retrieve. The value for category must be `install`, `install-on-request` or `build-error`; `cask-install` or `os-version` may be specified if formula is not. The default is `install`]' \ '--days[How many days of analytics data to retrieve. The value for days must be `30`, `90` or `365`. The default is `30`]' \ '--debug[Display any debugging information]' \ @@ -1018,6 +1016,7 @@ _brew_install() { _brew_install_bundler_gems() { _arguments \ '--debug[Display any debugging information]' \ + '--groups[Installs the specified comma-separated list of gem groups (default: last used)]' \ '--help[Show this message]' \ '--quiet[Make some output more quiet]' \ '--verbose[Make some output more verbose]' diff --git a/docs/Manpage.md b/docs/Manpage.md index e09277a257..e411907cab 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -267,8 +267,6 @@ If a *`formula`* or *`cask`* is provided, show summary of information about it. Open the GitHub source page for *`formula`* in a browser. To view formula history locally: `brew log -p` *`formula`* * `--json`: Print a JSON representation. Currently the default value for *`version`* is `v1` for *`formula`*. For *`formula`* and *`cask`* use `v2`. See the docs for examples of using the JSON output: -* `--bottle`: - Output information about the bottles for *`formula`* and its dependencies. * `--installed`: Print JSON of formulae that are currently installed. * `--all`: @@ -1097,10 +1095,13 @@ Generate Homebrew's manpages and shell completions. * `--fail-if-not-changed`: Return a failing status code if no changes are detected in the manpage outputs. This can be used to notify CI when the manpages are out of date. Additionally, the date used in new manpages will match those in the existing manpages (to allow comparison without factoring in the date). -### `install-bundler-gems` +### `install-bundler-gems` [*`--groups`*`=`] Install Homebrew's Bundler gems. +* `--groups`: + Installs the specified comma-separated list of gem groups (default: last used). + ### `irb` [*`--examples`*] [*`--pry`*] Enter the interactive Homebrew Ruby shell. @@ -1681,6 +1682,8 @@ Otherwise, operate on `~/Library/LaunchAgents` (started at login). [`sudo`] `brew services cleanup`
Remove all unused services. +* `--file`: + Use the plist file from this location to start or run the service. * `--all`: Run *`subcommand`* on all services. diff --git a/manpages/brew.1 b/manpages/brew.1 index 9a9877eb95..451355fc9d 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -343,10 +343,6 @@ Open the GitHub source page for \fIformula\fR in a browser\. To view formula his Print a JSON representation\. Currently the default value for \fIversion\fR is \fBv1\fR for \fIformula\fR\. For \fIformula\fR and \fIcask\fR use \fBv2\fR\. See the docs for examples of using the JSON output: \fIhttps://docs\.brew\.sh/Querying\-Brew\fR . .TP -\fB\-\-bottle\fR -Output information about the bottles for \fIformula\fR and its dependencies\. -. -.TP \fB\-\-installed\fR Print JSON of formulae that are currently installed\. . @@ -1543,9 +1539,13 @@ Generate Homebrew\'s manpages and shell completions\. \fB\-\-fail\-if\-not\-changed\fR Return a failing status code if no changes are detected in the manpage outputs\. This can be used to notify CI when the manpages are out of date\. Additionally, the date used in new manpages will match those in the existing manpages (to allow comparison without factoring in the date)\. . -.SS "\fBinstall\-bundler\-gems\fR" +.SS "\fBinstall\-bundler\-gems\fR [\fI\-\-groups\fR\fB=\fR]" Install Homebrew\'s Bundler gems\. . +.TP +\fB\-\-groups\fR +Installs the specified comma\-separated list of gem groups (default: last used)\. +. .SS "\fBirb\fR [\fI\-\-examples\fR] [\fI\-\-pry\fR]" Enter the interactive Homebrew Ruby shell\. . @@ -2354,6 +2354,10 @@ If \fBsudo\fR is passed, operate on \fB/Library/LaunchDaemons\fR (started at boo Remove all unused services\. . .TP +\fB\-\-file\fR +Use the plist file from this location to start or run the service\. +. +.TP \fB\-\-all\fR Run \fIsubcommand\fR on all services\. .