diff --git a/Library/Homebrew/.rubocop_todo.yml b/Library/Homebrew/.rubocop_todo.yml index ad5c59bac70ba0de5cde990426667b194baa2459..249ddfbd948f3f6921c81bedc7eddb922ff2ec2a 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 94c032dec0b38de6c0740300fb73a21dd6ed2938..f99cea17d71444f47ea729e015c135d9f08939b1 100644 --- a/Library/Homebrew/cli/named_args.rb +++ b/Library/Homebrew/cli/named_args.rb @@ -100,10 +100,11 @@ module Homebrew 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 5792b62a2867fbebbb2409bf9f8f8e7be7ac8530..a4b536d61984ce12ef6bd4043d57d8b8779b0c06 100644 --- a/Library/Homebrew/cli/parser.rb +++ b/Library/Homebrew/cli/parser.rb @@ -406,18 +406,6 @@ module Homebrew 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 2d8bafe8bb9059ece85f033c074c43324805318a..4858b60bcb632d6cc7df6de6b4a514e55d0da592 100644 --- a/Library/Homebrew/cmd/search.rb +++ b/Library/Homebrew/cmd/search.rb @@ -60,8 +60,7 @@ module Homebrew 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 @@ module Homebrew 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 28c4a677ee34d76af3d1d1c3aa4a8d9a8822129b..f044c18df3aca3ef730dc67fd1b99ef86e2bfc67 100644 --- a/Library/Homebrew/cmd/tap.rb +++ b/Library/Homebrew/cmd/tap.rb @@ -56,17 +56,9 @@ module Homebrew 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 4f0d4338c8ff91ee5e77e2f05b08029537e0e1a4..b4806eee619c0262eed5905ff3b9547d488c0139 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 2df8500f9487d9846c22dcf9512119b7d8c73e40..0000000000000000000000000000000000000000 --- 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 62655f4d9af9e13e41eef0f22c394f84050d1d5b..e1a839779a5b010379274296c47fe050272b1888 100644 --- a/Library/Homebrew/dev-cmd/man.rb +++ b/Library/Homebrew/dev-cmd/man.rb @@ -24,13 +24,6 @@ module Homebrew 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 5764ec79193c9ba05e6f1969adf7d48281a63990..0000000000000000000000000000000000000000 --- 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 b01c8579229c559422d8da783795a310734e96b1..0000000000000000000000000000000000000000 --- 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` [<options>] [<previous_tag>] [<end_ref>]" - description <<~EOS - Print the merged pull requests on Homebrew/brew between two Git refs. - If no <previous_tag> is provided it defaults to the latest tag. - If no <end_ref> is provided it defaults to `origin/master`. - - If `--markdown` and a <previous_tag> 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 6118c2f4dee5ef22c5874819066d54b299bb97d2..64df56acfd4bc5ecc2709c1f02a88692856d77f1 100644 --- a/Library/Homebrew/extend/ENV/shared.rb +++ b/Library/Homebrew/extend/ENV/shared.rb @@ -238,19 +238,6 @@ module SharedEnvExtension 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 @@ module SharedEnvExtension 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 eafe53a6275f44e7a5eee083b8bbce2579c6d027..64f10ec65c04bc6f028fe2c1a562c138d68c8dd2 100644 --- a/Library/Homebrew/extend/os/mac/hardware/cpu.rb +++ b/Library/Homebrew/extend/os/mac/hardware/cpu.rb @@ -6,7 +6,7 @@ require "macho" 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 <mach/machine.h> for decoding info. @@ -31,16 +31,6 @@ module Hardware 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 b52826e2c3e06caf5917ffa5272037d4af558d7e..a1806c4b243c7ff0000d3e80b04d3ca4e32f7b22 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -2973,22 +2973,18 @@ class Formula @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. # <pre>deprecate! date: "2020-08-27", because: :unmaintained</pre> # <pre>deprecate! date: "2020-08-27", because: "has been replaced by foo"</pre> # @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 @@ class Formula # @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. # <pre>disable! date: "2020-08-27", because: :does_not_build</pre> # <pre>disable! date: "2020-08-27", because: "has been replaced by foo"</pre> # @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 c6093ed8b5069f16f015e2ae5629350f48a74d31..7e601ed55ebc0420b9cdd41a4c74f325e6a60723 100644 --- a/Library/Homebrew/formula_assertions.rb +++ b/Library/Homebrew/formula_assertions.rb @@ -42,18 +42,18 @@ module Homebrew 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 83fd45e4f79926936433a452bffcefac503f3be6..52bf2e5e88630f734cf7a29b5504130919d9bea5 100644 --- a/Library/Homebrew/hardware.rb +++ b/Library/Homebrew/hardware.rb @@ -81,10 +81,6 @@ module Hardware 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 5c2480dc527c245f8a71fe3dc2dec568a0f794b8..a3ade227ad03dbeb6e444836463b5aeb6e6294dd 100644 --- a/Library/Homebrew/livecheck/livecheck.rb +++ b/Library/Homebrew/livecheck/livecheck.rb @@ -533,7 +533,7 @@ module Homebrew 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 1268a7a646b69d481187ae23d8a6509b845fae2d..0000000000000000000000000000000000000000 --- 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 a621afb079152b2b9a29ec5f0eb7bc7031b4add9..adae8e32f60cc92d997c2b331833a5a0c53a80be 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 @@ module MachOShim 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 7161c8a036b605ffbf83ba3d5ab8695560078344..060632d67f065da38c3b955da77e18f5b57354e7 100644 --- a/Library/Homebrew/software_spec.rb +++ b/Library/Homebrew/software_spec.rb @@ -491,7 +491,7 @@ class BottleSpecification 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 @@ class BottleSpecification 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 d5d0950c40c0324914fd4b61bca25c10dd4a2940..92949c5f82fbcade5d1040e35c31c93e805126bd 100644 --- a/Library/Homebrew/test/dev-cmd/bottle_spec.rb +++ b/Library/Homebrew/test/dev-cmd/bottle_spec.rb @@ -140,70 +140,6 @@ describe "brew bottle" do - # 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 <stdio.h>\\nint main(){printf(\\"test\\");return 0;}" - bin.mkpath - system ENV.cc, "test.c", "-o", bin/"test" - end - - - # something here end @@ -267,71 +203,6 @@ describe "brew bottle" do - # 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 <stdio.h>\\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 f95903e7765c7c8597511f1754cb9e47223a3694..0000000000000000000000000000000000000000 --- 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 ef532d66f464a792898b2972849a3f31f7819f84..0000000000000000000000000000000000000000 --- 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 5e907105fdc685205bdb2248090b22b2c07f4c66..0000000000000000000000000000000000000000 --- 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 f9e4102d965035d2b859c1605d8c77b08599f42e..a5c35eef733d6852256d4bb8ad72dd5b3dfb0398 100644 --- a/Library/Homebrew/test/os/mac/mach_spec.rb +++ b/Library/Homebrew/test/os/mac/mach_spec.rb @@ -109,26 +109,6 @@ describe "Mach-O" do 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 de12d056b28a3301ee73d136dc512b9f7f659c0b..f6d919ebc2bf6d20db46e84f5e85e04fd864bdb2 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -402,14 +402,6 @@ module Kernel 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 341a7520b9b5ffaef35fdb89175c6d0f2d2ae60f..300871e5172bf917175f59895fabcd2aae58a265 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")