diff --git a/Library/Homebrew/.rubocop_todo.yml b/Library/Homebrew/.rubocop_todo.yml index ad5c59bac70ba..249ddfbd948f3 100644 --- a/Library/Homebrew/.rubocop_todo.yml +++ b/Library/Homebrew/.rubocop_todo.yml @@ -12,7 +12,6 @@ Style/Documentation: - "global.rb" - "keg_relocate.rb" - "os/linux/global.rb" - - "os/mac/architecture_list.rb" - "os/mac/global.rb" - "os/mac/keg.rb" - "reinstall.rb" diff --git a/Library/Homebrew/cli/named_args.rb b/Library/Homebrew/cli/named_args.rb index 94c032dec0b38..f99cea17d7144 100644 --- a/Library/Homebrew/cli/named_args.rb +++ b/Library/Homebrew/cli/named_args.rb @@ -100,10 +100,11 @@ def load_formula_or_cask(name, only: nil, method: nil) resolve_formula(name) when :latest_kegs resolve_latest_keg(name) - when :keg, :default_kegs - # TODO: (3.2) Uncomment the following - # odeprecated "`load_formula_or_cask` with `method: :keg`", - # "`load_formula_or_cask` with `method: :default_kegs`" + when :default_kegs + resolve_default_keg(name) + when :keg + odeprecated "`load_formula_or_cask` with `method: :keg`", + "`load_formula_or_cask` with `method: :default_kegs`" resolve_default_keg(name) when :kegs _, kegs = resolve_kegs(name) diff --git a/Library/Homebrew/cli/parser.rb b/Library/Homebrew/cli/parser.rb index 5792b62a2867f..a4b536d61984c 100644 --- a/Library/Homebrew/cli/parser.rb +++ b/Library/Homebrew/cli/parser.rb @@ -406,18 +406,6 @@ def named_args(type = nil, number: nil, min: nil, max: nil) end end - def max_named(_count) - odisabled "`max_named`", "`named_args max:`" - end - - def min_named(_count_or_type) - odisabled "`min_named`", "`named_args min:`" - end - - def named(_count_or_type) - odisabled "`named`", "`named_args`" - end - sig { void } def hide_from_man_page! @hide_from_man_page = true diff --git a/Library/Homebrew/cmd/search.rb b/Library/Homebrew/cmd/search.rb index 2d8bafe8bb905..4858b60bcb632 100644 --- a/Library/Homebrew/cmd/search.rb +++ b/Library/Homebrew/cmd/search.rb @@ -60,8 +60,7 @@ def search_args conflicts "--open", "--closed" conflicts(*package_manager_switches) - # TODO: (3.2) Add `min: 1` the `named_args` once `brew search --cask` is removed - named_args :text_or_regex + named_args :text_or_regex, min: 1 end end @@ -74,12 +73,6 @@ def search return end - if args.no_named? - odisabled "`brew search --cask` with no arguments to output casks", "`brew casks`" if args.cask? - - raise UsageError, "This command requires at least 1 text or regex argument." - end - query = args.named.join(" ") string_or_regex = query_regexp(query) diff --git a/Library/Homebrew/cmd/tap.rb b/Library/Homebrew/cmd/tap.rb index 28c4a677ee34d..f044c18df3aca 100644 --- a/Library/Homebrew/cmd/tap.rb +++ b/Library/Homebrew/cmd/tap.rb @@ -56,17 +56,9 @@ def tap elsif args.no_named? puts Tap.names else - if args.full? - opoo "`brew tap --full` is now a no-op!" - # TODO: (3.2) Uncomment the following line and remove the `opoo` above - # odeprecated "`brew tap --full`" - end + odeprecated "`brew tap --full`" if args.full? - if args.shallow? - opoo "`brew tap --shallow` is now a no-op!" - # TODO: (3.2) Uncomment the following line and remove the `opoo` above - # odeprecated "`brew tap --shallow`" - end + odeprecated "`brew tap --shallow`" if args.shallow? tap = Tap.fetch(args.named.first) begin diff --git a/Library/Homebrew/compat/early.rb b/Library/Homebrew/compat/early.rb index 4f0d4338c8ff9..b4806eee619c0 100644 --- a/Library/Homebrew/compat/early.rb +++ b/Library/Homebrew/compat/early.rb @@ -1,4 +1,2 @@ # typed: strict # frozen_string_literal: true - -require_relative "early/download_strategy" diff --git a/Library/Homebrew/compat/early/download_strategy.rb b/Library/Homebrew/compat/early/download_strategy.rb deleted file mode 100644 index 2df8500f9487d..0000000000000 --- a/Library/Homebrew/compat/early/download_strategy.rb +++ /dev/null @@ -1,46 +0,0 @@ -# typed: false -# frozen_string_literal: true - -class AbstractDownloadStrategy - module CompatFetch - def fetch(timeout: nil) - super() - end - end - - module Compat_Fetch # rubocop:disable Naming/ClassAndModuleCamelCase - def _fetch(*args, **options) - options[:timeout] = nil unless options.key?(:timeout) - - begin - super - rescue ArgumentError => e - raise unless e.message.include?("timeout") - - odeprecated "`def _fetch` in a subclass of `CurlDownloadStrategy`" - options.delete(:timeout) - super(*args, **options) - end - end - end - - class << self - def method_added(method) - if method == :fetch && instance_method(method).arity.zero? - odisabled "`def fetch` in a subclass of `#{self}`", - "`def fetch(timeout: nil, **options)` and output a warning " \ - "when `options` contains new unhandled options" - - class_eval do - prepend CompatFetch - end - elsif method == :_fetch - class_eval do - prepend Compat_Fetch - end - end - - super - end - end -end diff --git a/Library/Homebrew/dev-cmd/man.rb b/Library/Homebrew/dev-cmd/man.rb index 62655f4d9af9e..e1a839779a5b0 100644 --- a/Library/Homebrew/dev-cmd/man.rb +++ b/Library/Homebrew/dev-cmd/man.rb @@ -24,13 +24,6 @@ def man_args end def man - odeprecated "`brew man`", "`brew generate-man-completions`" - - args = man_args.parse - cmd = ["generate-man-completions"] - cmd << "--fail-if-not-changed" if args.fail_if_not_changed? - - brew_rb = (HOMEBREW_LIBRARY_PATH/"brew.rb").resolved_path - system ENV["HOMEBREW_RUBY_PATH"], brew_rb, *cmd + odisabled "`brew man`", "`brew generate-man-completions`" end end diff --git a/Library/Homebrew/dev-cmd/mirror.rb b/Library/Homebrew/dev-cmd/mirror.rb deleted file mode 100644 index 5764ec79193c9..0000000000000 --- a/Library/Homebrew/dev-cmd/mirror.rb +++ /dev/null @@ -1,24 +0,0 @@ -# typed: true -# frozen_string_literal: true - -require "cli/parser" - -module Homebrew - extend T::Sig - - module_function - - sig { returns(CLI::Parser) } - def mirror_args - Homebrew::CLI::Parser.new do - description <<~EOS - Reupload the stable URL of a formula for use as a mirror. - EOS - hide_from_man_page! - end - end - - def mirror - odisabled "`brew mirror` (Bintray was shut down on 1st May 2021)" - end -end diff --git a/Library/Homebrew/dev-cmd/release-notes.rb b/Library/Homebrew/dev-cmd/release-notes.rb deleted file mode 100644 index b01c8579229c5..0000000000000 --- a/Library/Homebrew/dev-cmd/release-notes.rb +++ /dev/null @@ -1,37 +0,0 @@ -# typed: true -# frozen_string_literal: true - -require "cli/parser" -require "release_notes" - -module Homebrew - extend T::Sig - - module_function - - sig { returns(CLI::Parser) } - def release_notes_args - Homebrew::CLI::Parser.new do - usage_banner "`release-notes` [] [] []" - description <<~EOS - Print the merged pull requests on Homebrew/brew between two Git refs. - If no is provided it defaults to the latest tag. - If no is provided it defaults to `origin/master`. - - If `--markdown` and a are passed, an extra line containing - a link to the Homebrew blog will be adding to the output. Additionally, - a warning will be shown if the latest minor release was less than one month ago. - EOS - switch "--markdown", - description: "Print as a Markdown list." - - named_args max: 2 - - hide_from_man_page! - end - end - - def release_notes - odisabled "`brew release-notes`", "`brew release`" - end -end diff --git a/Library/Homebrew/extend/ENV/shared.rb b/Library/Homebrew/extend/ENV/shared.rb index 6118c2f4dee5e..64df56acfd4bc 100644 --- a/Library/Homebrew/extend/ENV/shared.rb +++ b/Library/Homebrew/extend/ENV/shared.rb @@ -238,19 +238,6 @@ def determine_cc end end - # Snow Leopard defines an NCURSES value the opposite of most distros. - # @see https://bugs.python.org/issue6848 - sig { void } - def ncurses_define - odisabled "ENV.ncurses_define" - end - - # @private - sig { void } - def userpaths! - odisabled "ENV.userpaths!" - end - sig { void } def fortran # Ignore repeated calls to this function as it will misleadingly warn about @@ -328,11 +315,6 @@ def warn_about_non_apple_gcc(name) sig { void } def permit_arch_flags; end - sig { void } - def permit_weak_imports - odisabled "ENV.permit_weak_imports" - end - # @private sig { params(cc: T.any(Symbol, String)).returns(T::Boolean) } def compiler_any_clang?(cc = compiler) diff --git a/Library/Homebrew/extend/os/mac/hardware/cpu.rb b/Library/Homebrew/extend/os/mac/hardware/cpu.rb index eafe53a6275f4..64f10ec65c04b 100644 --- a/Library/Homebrew/extend/os/mac/hardware/cpu.rb +++ b/Library/Homebrew/extend/os/mac/hardware/cpu.rb @@ -6,7 +6,7 @@ module Hardware class CPU class << self - undef type, family, universal_archs, features, sse4? + undef type, family, features, sse4? # These methods use info spewed out by sysctl. # Look in for decoding info. @@ -31,16 +31,6 @@ def family end end - # Returns an array that's been extended with {ArchitectureListExtension}, - # which provides helpers like `#as_arch_flags`. - def universal_archs - # Amazingly, this order (64, then 32) matters. It shouldn't, but it - # does. GCC (some versions? some systems?) can blow up if the other - # order is used. - # https://superuser.com/questions/740563/gcc-4-8-on-macos-fails-depending-on-arch-order - [arch_64_bit, arch_32_bit].extend ArchitectureListExtension - end - # True when running under an Intel-based shell via Rosetta 2 on an # Apple Silicon Mac. This can be detected via seeing if there's a # conflict between what `uname` reports and the underlying `sysctl` flags, diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index b52826e2c3e06..a1806c4b243c7 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -2973,22 +2973,18 @@ def pour_bottle?(only_if: nil, &block) @pour_bottle_check.instance_eval(&block) end - # Deprecates a {Formula} (on a given date, if provided) so a warning is + # Deprecates a {Formula} (on the given date) so a warning is # shown on each installation. If the date has not yet passed the formula # will not be deprecated. #
deprecate! date: "2020-08-27", because: :unmaintained
#
deprecate! date: "2020-08-27", because: "has been replaced by foo"
# @see https://docs.brew.sh/Deprecating-Disabling-and-Removing-Formulae # @see DeprecateDisable::DEPRECATE_DISABLE_REASONS - def deprecate!(date: nil, because: nil) - odisabled "`deprecate!` without a reason", "`deprecate! because: \"reason\"`" if because.blank? - odisabled "`deprecate!` without a date", "`deprecate! date: \"#{Date.today}\"`" if date.blank? + def deprecate!(date:, because:) + @deprecation_date = Date.parse(date) + return if @deprecation_date > Date.today - @deprecation_date = Date.parse(date) if date.present? - - return if date.present? && Date.parse(date) > Date.today - - @deprecation_reason = because if because.present? + @deprecation_reason = because @deprecated = true end @@ -3012,26 +3008,23 @@ def deprecated? # @see .deprecate! attr_reader :deprecation_reason - # Disables a {Formula} (on a given date, if provided) so it cannot be + # Disables a {Formula} (on the given date) so it cannot be # installed. If the date has not yet passed the formula # will be deprecated instead of disabled. #
disable! date: "2020-08-27", because: :does_not_build
#
disable! date: "2020-08-27", because: "has been replaced by foo"
# @see https://docs.brew.sh/Deprecating-Disabling-and-Removing-Formulae # @see DeprecateDisable::DEPRECATE_DISABLE_REASONS - def disable!(date: nil, because: nil) - odisabled "`disable!` without a reason", "`disable! because: \"reason\"`" if because.blank? - odisabled "`disable!` without a date", "`disable! date: \"#{Date.today}\"`" if date.blank? - - @disable_date = Date.parse(date) if date.present? + def disable!(date:, because:) + @disable_date = Date.parse(date) - if @disable_date && @disable_date > Date.today - @deprecation_reason = because if because.present? + if @disable_date > Date.today + @deprecation_reason = because @deprecated = true return end - @disable_reason = because if because.present? + @disable_reason = because @disabled = true end diff --git a/Library/Homebrew/formula_assertions.rb b/Library/Homebrew/formula_assertions.rb index c6093ed8b5069..7e601ed55ebc0 100644 --- a/Library/Homebrew/formula_assertions.rb +++ b/Library/Homebrew/formula_assertions.rb @@ -42,18 +42,18 @@ def assertions assert_not_same: :refute_same, }.each do |old_method, new_method| define_method(old_method) do |*args| - odeprecated old_method, new_method + odisabled old_method, new_method send(new_method, *args) end end def assert_true(act, msg = nil) - odeprecated "assert_true", "assert(...) or assert_equal(true, ...)" + odisabled "assert_true", "assert(...) or assert_equal(true, ...)" assert_equal(true, act, msg) end def assert_false(act, msg = nil) - odeprecated "assert_false", "assert(!...) or assert_equal(false, ...)" + odisabled "assert_false", "assert(!...) or assert_equal(false, ...)" assert_equal(false, act, msg) end diff --git a/Library/Homebrew/hardware.rb b/Library/Homebrew/hardware.rb index 83fd45e4f7992..52bf2e5e88630 100644 --- a/Library/Homebrew/hardware.rb +++ b/Library/Homebrew/hardware.rb @@ -81,10 +81,6 @@ def arch end end - def universal_archs - odisabled "Hardware::CPU.universal_archs" - end - sig { returns(Symbol) } def type case RUBY_PLATFORM diff --git a/Library/Homebrew/livecheck/livecheck.rb b/Library/Homebrew/livecheck/livecheck.rb index 5c2480dc527c2..a3ade227ad03d 100644 --- a/Library/Homebrew/livecheck/livecheck.rb +++ b/Library/Homebrew/livecheck/livecheck.rb @@ -533,7 +533,7 @@ def latest_version(formula_or_cask, json: false, full_name: false, verbose: fals rescue ArgumentError => e raise unless e.message.include?("unknown keyword: cask") - odeprecated "`def self.find_versions` in `#{strategy}` without a `cask` parameter" + odisabled "`def self.find_versions` in `#{strategy}` without a `cask` parameter" end match_version_map = strategy_data[:matches] regex = strategy_data[:regex] diff --git a/Library/Homebrew/os/mac/architecture_list.rb b/Library/Homebrew/os/mac/architecture_list.rb deleted file mode 100644 index 1268a7a646b69..0000000000000 --- a/Library/Homebrew/os/mac/architecture_list.rb +++ /dev/null @@ -1,25 +0,0 @@ -# typed: false -# frozen_string_literal: true - -# TODO: (3.2) remove this module when the linked deprecated functions are removed. - -require "hardware" - -module ArchitectureListExtension - # @private - def universal? - intersects_all?(Hardware::CPU::INTEL_32BIT_ARCHS, Hardware::CPU::INTEL_64BIT_ARCHS) - end - - def as_arch_flags - map { |a| "-arch #{a}" }.join(" ") - end - - protected - - def intersects_all?(*set) - set.all? do |archset| - archset.any? { |a| include? a } - end - end -end diff --git a/Library/Homebrew/os/mac/mach.rb b/Library/Homebrew/os/mac/mach.rb index a621afb079152..adae8e32f60cc 100644 --- a/Library/Homebrew/os/mac/mach.rb +++ b/Library/Homebrew/os/mac/mach.rb @@ -2,7 +2,6 @@ # frozen_string_literal: true require "macho" -require "os/mac/architecture_list" # {Pathname} extension for dealing with Mach-O files. # @@ -65,8 +64,7 @@ def dynamically_linked_libraries(except: :none) end def archs - # TODO: (3.2) remove ArchitectureListExtension - mach_data.map { |m| m.fetch :arch }.extend(ArchitectureListExtension) + mach_data.map { |m| m.fetch :arch } end def arch diff --git a/Library/Homebrew/software_spec.rb b/Library/Homebrew/software_spec.rb index 7161c8a036b60..060632d67f065 100644 --- a/Library/Homebrew/software_spec.rb +++ b/Library/Homebrew/software_spec.rb @@ -491,7 +491,7 @@ def root_url(var = nil, specs = {}) def cellar(val = nil) if val.present? - odeprecated( + odisabled( "`cellar` in a bottle block", "`brew style --fix` on the formula to update the style or use `sha256` with a `cellar:` argument", ) @@ -552,7 +552,7 @@ def sha256(hash) end if digest && tag - odeprecated( + odisabled( '`sha256 "digest" => :tag` in a bottle block', '`brew style --fix` on the formula to update the style or use `sha256 tag: "digest"`', ) diff --git a/Library/Homebrew/test/dev-cmd/bottle_spec.rb b/Library/Homebrew/test/dev-cmd/bottle_spec.rb index d5d0950c40c03..92949c5f82fbc 100644 --- a/Library/Homebrew/test/dev-cmd/bottle_spec.rb +++ b/Library/Homebrew/test/dev-cmd/bottle_spec.rb @@ -140,70 +140,6 @@ def install - # something here - - end - EOS - end - - it "replaces the bottle block in a formula that already has a bottle block in the old format" do - core_tap.path.cd do - system "git", "init" - setup_test_formula "testball", bottle_block: <<~EOS - - bottle do - cellar :any_skip_relocation - sha256 "6b276491297d4052538bd2fd22d5129389f27d90a98f831987236a5b90511b98" => :big_sur - sha256 "c3c650d75f5188f5d6edd351dd3215e141b73b8ec1cf9144f30e39cbc45de72e" => :arm64_big_sur - sha256 "16cf230afdfcb6306c208d169549cf8773c831c8653d2c852315a048960d7e72" => :catalina - end - EOS - system "git", "add", "--all" - system "git", "commit", "-m", "testball 0.1" - end - - expect { - brew "bottle", - "--merge", - "--write", - "#{TEST_TMPDIR}/testball-1.0.arm64_big_sur.bottle.json", - "#{TEST_TMPDIR}/testball-1.0.big_sur.bottle.json", - "#{TEST_TMPDIR}/testball-1.0.catalina.bottle.json" - }.to output(<<~EOS).to_stdout - ==> testball - bottle do - sha256 cellar: :any_skip_relocation, arm64_big_sur: "8f9aecd233463da6a4ea55f5f88fc5841718c013f3e2a7941350d6130f1dc149" - sha256 cellar: :any_skip_relocation, big_sur: "a0af7dcbb5c83f6f3f7ecd507c2d352c1a018f894d51ad241ce8492fa598010f" - sha256 cellar: :any_skip_relocation, catalina: "5334dd344986e46b2aa4f0471cac7b0914bd7de7cb890a34415771788d03f2ac" - end - EOS - - expect((core_tap.path/"Formula/testball.rb").read).to eq <<~EOS - class Testball < Formula - desc "Some test" - homepage "https://brew.sh/testball" - url "file://#{tarball}" - sha256 "#{tarball.sha256}" - - option "with-foo", "Build with foo" - - bottle do - sha256 cellar: :any_skip_relocation, arm64_big_sur: "8f9aecd233463da6a4ea55f5f88fc5841718c013f3e2a7941350d6130f1dc149" - sha256 cellar: :any_skip_relocation, big_sur: "a0af7dcbb5c83f6f3f7ecd507c2d352c1a018f894d51ad241ce8492fa598010f" - sha256 cellar: :any_skip_relocation, catalina: "5334dd344986e46b2aa4f0471cac7b0914bd7de7cb890a34415771788d03f2ac" - end - - def install - (prefix/"foo"/"test").write("test") if build.with? "foo" - prefix.install Dir["*"] - (buildpath/"test.c").write \ - "#include \\nint main(){printf(\\"test\\");return 0;}" - bin.mkpath - system ENV.cc, "test.c", "-o", bin/"test" - end - - - # something here end @@ -267,71 +203,6 @@ def install - # something here - - end - EOS - end - - it "updates the bottle block in a formula that already has a bottle block (old format) when using --keep-old" do - core_tap.path.cd do - system "git", "init" - setup_test_formula "testball", bottle_block: <<~EOS - - bottle do - cellar :any - sha256 "6971b6eebf4c00eaaed72a1104a49be63861eabc95d679a0c84040398e320059" => :high_sierra - end - EOS - system "git", "add", "--all" - system "git", "commit", "-m", "testball 0.1" - end - - expect { - brew "bottle", - "--merge", - "--write", - "--keep-old", - "#{TEST_TMPDIR}/testball-1.0.arm64_big_sur.bottle.json", - "#{TEST_TMPDIR}/testball-1.0.big_sur.bottle.json", - "#{TEST_TMPDIR}/testball-1.0.catalina.bottle.json" - }.to output(<<~EOS).to_stdout - ==> testball - bottle do - sha256 cellar: :any_skip_relocation, arm64_big_sur: "8f9aecd233463da6a4ea55f5f88fc5841718c013f3e2a7941350d6130f1dc149" - sha256 cellar: :any_skip_relocation, big_sur: "a0af7dcbb5c83f6f3f7ecd507c2d352c1a018f894d51ad241ce8492fa598010f" - sha256 cellar: :any_skip_relocation, catalina: "5334dd344986e46b2aa4f0471cac7b0914bd7de7cb890a34415771788d03f2ac" - sha256 cellar: :any, high_sierra: "6971b6eebf4c00eaaed72a1104a49be63861eabc95d679a0c84040398e320059" - end - EOS - - expect((core_tap.path/"Formula/testball.rb").read).to eq <<~EOS - class Testball < Formula - desc "Some test" - homepage "https://brew.sh/testball" - url "file://#{tarball}" - sha256 "#{tarball.sha256}" - - option "with-foo", "Build with foo" - - bottle do - sha256 cellar: :any_skip_relocation, arm64_big_sur: "8f9aecd233463da6a4ea55f5f88fc5841718c013f3e2a7941350d6130f1dc149" - sha256 cellar: :any_skip_relocation, big_sur: "a0af7dcbb5c83f6f3f7ecd507c2d352c1a018f894d51ad241ce8492fa598010f" - sha256 cellar: :any_skip_relocation, catalina: "5334dd344986e46b2aa4f0471cac7b0914bd7de7cb890a34415771788d03f2ac" - sha256 cellar: :any, high_sierra: "6971b6eebf4c00eaaed72a1104a49be63861eabc95d679a0c84040398e320059" - end - - def install - (prefix/"foo"/"test").write("test") if build.with? "foo" - prefix.install Dir["*"] - (buildpath/"test.c").write \ - "#include \\nint main(){printf(\\"test\\");return 0;}" - bin.mkpath - system ENV.cc, "test.c", "-o", bin/"test" - end - - - # something here end diff --git a/Library/Homebrew/test/dev-cmd/man_spec.rb b/Library/Homebrew/test/dev-cmd/man_spec.rb deleted file mode 100644 index f95903e7765c7..0000000000000 --- a/Library/Homebrew/test/dev-cmd/man_spec.rb +++ /dev/null @@ -1,8 +0,0 @@ -# typed: false -# frozen_string_literal: true - -require "cmd/shared_examples/args_parse" - -describe "brew man" do - it_behaves_like "parseable arguments" -end diff --git a/Library/Homebrew/test/dev-cmd/mirror_spec.rb b/Library/Homebrew/test/dev-cmd/mirror_spec.rb deleted file mode 100644 index ef532d66f464a..0000000000000 --- a/Library/Homebrew/test/dev-cmd/mirror_spec.rb +++ /dev/null @@ -1,8 +0,0 @@ -# typed: false -# frozen_string_literal: true - -require "cmd/shared_examples/args_parse" - -describe "brew mirror" do - it_behaves_like "parseable arguments" -end diff --git a/Library/Homebrew/test/dev-cmd/release-notes_spec.rb b/Library/Homebrew/test/dev-cmd/release-notes_spec.rb deleted file mode 100644 index 5e907105fdc68..0000000000000 --- a/Library/Homebrew/test/dev-cmd/release-notes_spec.rb +++ /dev/null @@ -1,8 +0,0 @@ -# typed: false -# frozen_string_literal: true - -require "cmd/shared_examples/args_parse" - -describe "brew release-notes" do - it_behaves_like "parseable arguments" -end diff --git a/Library/Homebrew/test/os/mac/mach_spec.rb b/Library/Homebrew/test/os/mac/mach_spec.rb index f9e4102d96503..a5c35eef733d6 100644 --- a/Library/Homebrew/test/os/mac/mach_spec.rb +++ b/Library/Homebrew/test/os/mac/mach_spec.rb @@ -109,26 +109,6 @@ end end - describe ArchitectureListExtension do - let(:archs) { [:i386, :x86_64, :ppc7400, :ppc64].extend(described_class) } - - specify "universal checks" do - expect(archs).to be_universal - - non_universal = [:i386].extend(described_class) - expect(non_universal).not_to be_universal - - intel_only = [:i386, :x86_64].extend(described_class) - expect(intel_only).to be_universal - end - - specify "architecture flags" do - pn = dylib_path("fat") - expect(pn.archs).to be_universal - expect(pn.archs.as_arch_flags).to eq("-arch x86_64 -arch i386") - end - end - describe "text executables" do let(:pn) { HOMEBREW_PREFIX/"an_executable" } diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index de12d056b28a3..f6d919ebc2bf6 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -402,14 +402,6 @@ def gzip(*paths) end end - # Returns array of architectures that the given command or library is built for. - def archs_for_command(cmd) - odisabled "archs_for_command" - - cmd = which(cmd) unless Pathname.new(cmd).absolute? - Pathname.new(cmd).archs - end - def ignore_interrupts(_opt = nil) # rubocop:disable Style/GlobalVars $ignore_interrupts_nesting_level = 0 unless defined?($ignore_interrupts_nesting_level) diff --git a/Library/Homebrew/utils/github.rb b/Library/Homebrew/utils/github.rb index 341a7520b9b5f..300871e5172bf 100644 --- a/Library/Homebrew/utils/github.rb +++ b/Library/Homebrew/utils/github.rb @@ -13,12 +13,6 @@ module GitHub module_function - def open_api(url, data: nil, data_binary_path: nil, request_method: nil, scopes: [].freeze, parse_json: true) - odisabled "GitHub.open_api", "GitHub::API.open_rest" - API.open_rest(url, data: data, data_binary_path: data_binary_path, request_method: request_method, - scopes: scopes, parse_json: parse_json) - end - def check_runs(repo: nil, commit: nil, pr: nil) if pr repo = pr.fetch("base").fetch("repo").fetch("full_name")