diff --git a/Library/Homebrew/cask/dsl/version.rb b/Library/Homebrew/cask/dsl/version.rb index bd7568c667..6a643217fc 100644 --- a/Library/Homebrew/cask/dsl/version.rb +++ b/Library/Homebrew/cask/dsl/version.rb @@ -150,20 +150,6 @@ module Cask version { split(",", 2).second } end - # @api public - sig { returns(T.self_type) } - def before_colon - odisabled "Cask::DSL::Version#before_colon", "Cask::DSL::Version#csv" - version { split(":", 2).first } - end - - # @api public - sig { returns(T.self_type) } - def after_colon - odisabled "Cask::DSL::Version#after_colon", "Cask::DSL::Version#csv" - version { split(":", 2).second } - end - # @api public sig { returns(T.self_type) } def no_dividers diff --git a/Library/Homebrew/compat/cask.rb b/Library/Homebrew/compat/cask.rb index aa1521766e..8c5121759a 100644 --- a/Library/Homebrew/compat/cask.rb +++ b/Library/Homebrew/compat/cask.rb @@ -1,21 +1,2 @@ # typed: true # frozen_string_literal: true - -module Cask - class Cask - extend Enumerable - - def self.each(&block) - odisabled "`Enumerable` methods on `Cask::Cask`", - "`Cask::Cask.all` (but avoid looping over all casks, it's slow and insecure)" - - return to_enum unless block - - Tap.flat_map(&:cask_files).each do |f| - yield CaskLoader::FromTapPathLoader.new(f).load(config: nil) - rescue CaskUnreadableError => e - opoo e.message - end - end - end -end diff --git a/Library/Homebrew/compat/formula.rb b/Library/Homebrew/compat/formula.rb index e9a7e7096c..8c5121759a 100644 --- a/Library/Homebrew/compat/formula.rb +++ b/Library/Homebrew/compat/formula.rb @@ -1,20 +1,2 @@ # typed: true # frozen_string_literal: true - -class Formula - extend Enumerable - - def self.each(&_block) - odisabled "`Enumerable` methods on `Formula`", - "`Formula.all` (but avoid looping over all formulae, it's slow and insecure)" - - files.each do |file| - yield Formulary.factory(file) - rescue FormulaUnavailableError, FormulaUnreadableError => e - # Don't let one broken formula break commands. But do complain. - onoe "Failed to import: #{file}" - $stderr.puts e - next - end - end -end diff --git a/Library/Homebrew/dev-cmd/bump-formula-pr.rb b/Library/Homebrew/dev-cmd/bump-formula-pr.rb index fbcc4de792..b7715ba306 100644 --- a/Library/Homebrew/dev-cmd/bump-formula-pr.rb +++ b/Library/Homebrew/dev-cmd/bump-formula-pr.rb @@ -39,7 +39,6 @@ module Homebrew hidden: true switch "--write-only", description: "Make the expected file modifications without taking any Git actions." - switch "--write", hidden: true switch "--commit", depends_on: "--write-only", description: "When passed with `--write-only`, generate a new commit after writing changes " \ @@ -87,7 +86,6 @@ module Homebrew description: "Exclude these Python packages when finding resources." conflicts "--dry-run", "--write-only" - conflicts "--dry-run", "--write" conflicts "--no-audit", "--strict" conflicts "--no-audit", "--online" conflicts "--url", "--tag" @@ -100,8 +98,6 @@ module Homebrew def bump_formula_pr args = bump_formula_pr_args.parse - odisabled "`brew bump-formula-pr --write`", "`brew bump-formula-pr --write-only`" if args.write? - if args.revision.present? && args.tag.nil? && args.version.nil? raise UsageError, "`--revision` must be passed with either `--tag` or `--version`!" end diff --git a/Library/Homebrew/dev-cmd/pr-upload.rb b/Library/Homebrew/dev-cmd/pr-upload.rb index d1abdbc943..f0296d4f75 100644 --- a/Library/Homebrew/dev-cmd/pr-upload.rb +++ b/Library/Homebrew/dev-cmd/pr-upload.rb @@ -30,7 +30,6 @@ module Homebrew description: "Skip running `brew bottle` before uploading." flag "--committer=", description: "Specify a committer name and email in `git`'s standard author format." - flag "--github-org=", hidden: true flag "--root-url=", description: "Use the specified as the root of the bottle's URL instead of Homebrew's default." flag "--root-url-using=", @@ -90,8 +89,6 @@ module Homebrew def pr_upload args = pr_upload_args.parse - odisabled "`brew pr-upload --github-org`", "`brew pr-upload` without `--github-org`" if args.github_org - json_files = Dir["*.bottle.json"] odie "No bottle JSON files found in the current working directory" if json_files.blank? bottles_hash = bottles_hash_from_json_files(json_files, args)