language
stringclasses
1 value
owner
stringlengths
2
15
repo
stringlengths
2
21
sha
stringlengths
45
45
message
stringlengths
7
36.3k
path
stringlengths
1
199
patch
stringlengths
15
102k
is_multipart
bool
2 classes
Other
Homebrew
brew
ffed8fdbb3855fdae0dbef464cfcf68b26b84436.json
Add a `desc` stanza to the cask DSL
Library/Homebrew/cask/cmd/create.rb
@@ -30,6 +30,7 @@ def self.template(cask_token) url "https://" name "" + desc "" homepage "" app ""
true
Other
Homebrew
brew
ffed8fdbb3855fdae0dbef464cfcf68b26b84436.json
Add a `desc` stanza to the cask DSL
Library/Homebrew/cask/dsl.rb
@@ -64,6 +64,7 @@ class DSL :caveats, :conflicts_with, :container, + :desc, :depends_on, :homepage, :language, @@ -93,6...
true
Other
Homebrew
brew
ffed8fdbb3855fdae0dbef464cfcf68b26b84436.json
Add a `desc` stanza to the cask DSL
Library/Homebrew/rubocops/cask/constants/stanza.rb
@@ -6,7 +6,7 @@ module Cask module Constants STANZA_GROUPS = [ [:version, :sha256], - [:url, :appcast, :name, :homepage], + [:url, :appcast, :desc, :name, :homepage], [ :auto_updates, :conflicts_with,
true
Other
Homebrew
brew
ffed8fdbb3855fdae0dbef464cfcf68b26b84436.json
Add a `desc` stanza to the cask DSL
Library/Homebrew/test/cask/cmd/create_spec.rb
@@ -35,6 +35,7 @@ url "https://" name "" + desc "" homepage "" app ""
true
Other
Homebrew
brew
ffed8fdbb3855fdae0dbef464cfcf68b26b84436.json
Add a `desc` stanza to the cask DSL
Library/Homebrew/test/cask/cmd/list_spec.rb
@@ -90,7 +90,7 @@ let(:casks) { ["local-caffeine", "local-transmission"] } let(:expected_output) { <<~EOS - [{"token":"local-caffeine","name":[],"homepage":"https://brew.sh/","url":"file:///usr/local/Homebrew/Library/Homebrew/test/support/fixtures/cask/caffeine.zip","appcast":null,"version":"1.2...
true
Other
Homebrew
brew
ffed8fdbb3855fdae0dbef464cfcf68b26b84436.json
Add a `desc` stanza to the cask DSL
Library/Homebrew/test/cask/dsl_spec.rb
@@ -107,6 +107,16 @@ end end + describe "desc stanza" do + it "lets you set the description via a desc stanza" do + cask = Cask::Cask.new("desc-cask") do + desc "The package's description" + end + + expect(cask.desc).to eq("The package's description") + end + end + describe "s...
true
Other
Homebrew
brew
53ebef4c675f70a324ee0d8e2c7146801ce14b3a.json
Gemfile: drop sorbet environment
Library/Homebrew/Gemfile
@@ -13,11 +13,9 @@ gem "rspec-retry", require: false gem "rspec-wait", require: false gem "rubocop" gem "simplecov", require: false -if ENV["HOMEBREW_SORBET"] - gem "sorbet", "0.5.5823" - gem "sorbet-runtime", "0.5.5823" - gem "tapioca" -end +gem "sorbet", "0.5.5823" +gem "sorbet-runtime", "0.5.5823" +gem "tapioc...
true
Other
Homebrew
brew
53ebef4c675f70a324ee0d8e2c7146801ce14b3a.json
Gemfile: drop sorbet environment
Library/Homebrew/Gemfile.lock
@@ -14,7 +14,10 @@ GEM colorize json simplecov + coderay (1.1.3) colorize (0.8.1) + commander (4.5.2) + highline (~> 2.0.0) concurrent-ruby (1.1.6) connection_pool (2.2.3) diff-lcs (1.4.4) @@ -23,6 +26,7 @@ GEM unf (>= 0.0.5, < 1.0.0) elftools (1.1.2) ...
true
Other
Homebrew
brew
05b3518b0cb3dac595531014326858016a622ae2.json
Improve documentation comments for Livecheck DSL
Library/Homebrew/livecheck.rb
@@ -1,13 +1,15 @@ # frozen_string_literal: true -# Livecheck can be used to check for newer versions of the software. -# The livecheck DSL specified in the formula is evaluated the methods -# of this class, which set the instance variables accordingly. The -# information is used by brew livecheck when checking for n...
false
Other
Homebrew
brew
47d07b2f1baaa2a999c64b768d66ba2f7a80b892.json
Improve existing tests for Livecheck DSL
Library/Homebrew/test/livecheck_spec.rb
@@ -4,19 +4,25 @@ require "livecheck" describe Livecheck do + HOMEPAGE_URL = "https://example.com/" + STABLE_URL = "https://example.com/example-1.2.3.tar.gz" + HEAD_URL = "https://example.com/example.git" + let(:f) do formula do - url "https://brew.sh/test-0.1.tbz" + homepage HOMEPAGE_URL + ...
false
Other
Homebrew
brew
b99e8626e28ef3f3941d7bf9b755fbddcdbcd8b9.json
Raise TypeError in Livecheck DSL for invalid arg We previously added `raise TypeError` logic to the `Livecheck` DSL's `#strategy` method. This updates the existing methods to follow suit and modifies the tests accordingly.
Library/Homebrew/livecheck.rb
@@ -22,18 +22,28 @@ def initialize(formula) # Sets the regex instance variable to the argument given, returns the # regex instance variable when no argument is given. def regex(pattern = nil) - return @regex if pattern.nil? - - @regex = pattern + case pattern + when nil + @regex + when Rege...
true
Other
Homebrew
brew
b99e8626e28ef3f3941d7bf9b755fbddcdbcd8b9.json
Raise TypeError in Livecheck DSL for invalid arg We previously added `raise TypeError` logic to the `Livecheck` DSL's `#strategy` method. This updates the existing methods to follow suit and modifies the tests accordingly.
Library/Homebrew/test/livecheck_spec.rb
@@ -20,6 +20,12 @@ livecheckable.regex(/foo/) expect(livecheckable.regex).to eq(/foo/) end + + it "raises a TypeError if the argument isn't a Regexp" do + expect { + livecheckable.regex("foo") + }.to raise_error(TypeError, "Livecheck#regex expects a Regexp") + end end d...
true
Other
Homebrew
brew
70b5af4162eb27ca72f48a6ef7396fe351907b8d.json
cask/dsl/base: fix undefined method `method_missing_message'
Library/Homebrew/cask/dsl/base.rb
@@ -1,5 +1,7 @@ # frozen_string_literal: true +require "cask/utils" + module Cask class DSL class Base
false
Other
Homebrew
brew
6ecef73131178459ab9aa787bd9eaaacb48a6300.json
test: add spdx spec
Library/Homebrew/test/utils/spdx_spec.rb
@@ -0,0 +1,32 @@ +# frozen_string_literal: true + +require "utils/spdx" + +describe SPDX do + describe ".spdx_data" do + it "has the license list version" do + expect(described_class.spdx_data["licenseListVersion"]).not_to eq(nil) + end + + it "has the release date" do + expect(described_class.spdx_...
true
Other
Homebrew
brew
6ecef73131178459ab9aa787bd9eaaacb48a6300.json
test: add spdx spec
Library/Homebrew/utils/spdx.rb
@@ -12,9 +12,9 @@ def spdx_data @spdx_data ||= JSON.parse(JSON_PATH.read) end - def download_latest_license_data! + def download_latest_license_data!(to: JSON_PATH) latest_tag = GitHub.open_api(API_URL)["tag_name"] data_url = "https://raw.githubusercontent.com/spdx/license-list-data/#{latest_tag}/...
true
Other
Homebrew
brew
753b8621dfe3630e9e78ed286b59980c8efc9641.json
utils: add SPDX module
Library/Homebrew/dev-cmd/audit.rb
@@ -4,6 +4,7 @@ require "formula_versions" require "utils/curl" require "utils/notability" +require "utils/spdx" require "extend/ENV" require "formula_cellar_checks" require "cmd/search" @@ -118,8 +119,7 @@ def audit # Check style in a single batch run up front for performance style_results = Style.chec...
true
Other
Homebrew
brew
753b8621dfe3630e9e78ed286b59980c8efc9641.json
utils: add SPDX module
Library/Homebrew/dev-cmd/update-license-data.rb
@@ -1,14 +1,11 @@ # frozen_string_literal: true require "cli/parser" -require "utils/github" +require "utils/spdx" module Homebrew module_function - SPDX_PATH = (HOMEBREW_LIBRARY_PATH/"data/spdx.json").freeze - SPDX_API_URL = "https://api.github.com/repos/spdx/license-list-data/releases/latest" - def u...
true
Other
Homebrew
brew
753b8621dfe3630e9e78ed286b59980c8efc9641.json
utils: add SPDX module
Library/Homebrew/utils/spdx.rb
@@ -0,0 +1,20 @@ +# frozen_string_literal: true + +require "utils/github" + +module SPDX + module_function + + JSON_PATH = (HOMEBREW_LIBRARY_PATH/"data/spdx.json").freeze + API_URL = "https://api.github.com/repos/spdx/license-list-data/releases/latest" + + def spdx_data + @spdx_data ||= JSON.parse(JSON_PATH.read...
true
Other
Homebrew
brew
3a2dc79153db5658a0bc14188a2ea77844a4e873.json
cask/create: update template to match new style
Library/Homebrew/cask/cmd/create.rb
@@ -24,15 +24,15 @@ def run def self.template(cask_token) <<~RUBY - cask '#{cask_token}' do - version '' - sha256 '' + cask "#{cask_token}" do + version "" + sha256 "" url "https://" - name '' - homepage...
true
Other
Homebrew
brew
3a2dc79153db5658a0bc14188a2ea77844a4e873.json
cask/create: update template to match new style
Library/Homebrew/test/cask/cmd/create_spec.rb
@@ -29,15 +29,15 @@ described_class.run("new-cask") template = File.read(Cask::CaskLoader.path("new-cask")) expect(template).to eq <<~RUBY - cask 'new-cask' do - version '' - sha256 '' + cask "new-cask" do + version "" + sha256 "" url "https://" - n...
true
Other
Homebrew
brew
652480207979026e9db9ab5e19e69cbe636d6964.json
Pass remaining args to `Help`.
Library/Homebrew/brew.rb
@@ -104,8 +104,8 @@ class MissingEnvironmentVariables < RuntimeError; end # - if cmd is Cask, let Cask handle the help command instead if (empty_argv || help_flag) && cmd != "cask" require "help" - Homebrew::Help.help cmd, empty_argv: empty_argv - # `Homebrew.help` never returns, except for unknown com...
true
Other
Homebrew
brew
652480207979026e9db9ab5e19e69cbe636d6964.json
Pass remaining args to `Help`.
Library/Homebrew/cmd/help.rb
@@ -3,7 +3,7 @@ require "help" module Homebrew - def help(cmd = nil, flags = {}) - Help.help(cmd, flags) + def help + Help.help end end
true
Other
Homebrew
brew
652480207979026e9db9ab5e19e69cbe636d6964.json
Pass remaining args to `Help`.
Library/Homebrew/help.rb
@@ -40,7 +40,7 @@ module Homebrew module Help module_function - def help(cmd = nil, empty_argv: false, usage_error: nil) + def help(cmd = nil, empty_argv: false, usage_error: nil, remaining_args: []) if cmd.nil? # Handle `brew` (no arguments). if empty_argv @@ -58,7 +58,7 @@ def...
true
Other
Homebrew
brew
62671b1703c8fb8fd17d5548ff2f21df43678fd7.json
Remove wrong test.
Library/Homebrew/test/rubocops/lines_spec.rb
@@ -821,18 +821,6 @@ class Foo < Formula RUBY end - it "Using ARGV to check options" do - expect_no_offenses(<<~RUBY) - class Foo < Formula - desc "foo" - url 'https://brew.sh/foo-1.0.tgz' - def install - verbose = Homebrew.args.verbose? - end ...
false
Other
Homebrew
brew
5db764f3cb3d8b3e356cc8f209ff4c52c126362e.json
Pass `debug?` and `verbose?` in `brew style`.
Library/Homebrew/dev-cmd/audit.rb
@@ -103,7 +103,7 @@ def audit only_cops = args.only_cops except_cops = args.except_cops - options = { fix: args.fix? } + options = { fix: args.fix?, debug: args.debug?, verbose: args.verbose? } if only_cops options[:only_cops] = only_cops
true
Other
Homebrew
brew
5db764f3cb3d8b3e356cc8f209ff4c52c126362e.json
Pass `debug?` and `verbose?` in `brew style`.
Library/Homebrew/dev-cmd/style.rb
@@ -50,7 +50,9 @@ def style only_cops = args.only_cops except_cops = args.except_cops - options = { fix: args.fix?, display_cop_names: args.display_cop_names? } + options = { + fix: args.fix?, display_cop_names: args.display_cop_names?, debug: args.debug?, verbose: args.verbose? + } if on...
true
Other
Homebrew
brew
5db764f3cb3d8b3e356cc8f209ff4c52c126362e.json
Pass `debug?` and `verbose?` in `brew style`.
Library/Homebrew/style.rb
@@ -16,7 +16,9 @@ def check_style_json(files, **options) check_style_impl(files, :json, **options) end - def check_style_impl(files, output_type, fix: false, except_cops: nil, only_cops: nil, display_cop_names: false) + def check_style_impl(files, output_type, + fix: false, e...
true
Other
Homebrew
brew
add10377b893d8e970bc4122a32f0dfcd1091481.json
Pass `debug?` and `verbose?` to `Cleaner`.
Library/Homebrew/cleaner.rb
@@ -10,9 +10,15 @@ # * sets permissions on executables # * removes unresolved symlinks class Cleaner + extend Predicable + + attr_predicate :verbose?, :debug? + # Create a cleaner for the given formula - def initialize(f) + def initialize(f, verbose: false, debug: false) @f = f + @verbose = verbose + ...
true
Other
Homebrew
brew
add10377b893d8e970bc4122a32f0dfcd1091481.json
Pass `debug?` and `verbose?` to `Cleaner`.
Library/Homebrew/formula_installer.rb
@@ -956,7 +956,7 @@ def fix_dynamic_linkage(keg) def clean ohai "Cleaning" if verbose? - Cleaner.new(formula).clean + Cleaner.new(formula, verbose: verbose?, debug: debug?).clean rescue Exception => e # rubocop:disable Lint/RescueException opoo "The cleaning step did not complete successfully" ...
true
Other
Homebrew
brew
57fa48b7581ebf3c7acae959bc7ec88e83f50118.json
Remove unneeded call to `#shutup!` in spec.
Library/Homebrew/test/download_strategies_spec.rb
@@ -121,7 +121,6 @@ def setup_git_repo git_commit_all end - subject.shutup! expect(subject.fetch_last_commit).to eq("f68266e") end end
false
Other
Homebrew
brew
99bff13cbbfffe17706e1b60c633e6200ad527f1.json
cmd/tap-info: improve comma usage. Broken in https://github.com/Homebrew/brew/pull/8230.
Library/Homebrew/cmd/tap-info.rb
@@ -69,14 +69,14 @@ def print_tap_info(taps) puts unless i.zero? info = "#{tap}: " if tap.installed? - info += ", private" if tap.private? - info += if (contents = tap.contents).empty? - ", no commands/casks/formulae" + info += if (contents = tap.contents...
false
Other
Homebrew
brew
ced084bd49fa58a239d283997fcf6b5e84054b11.json
Handle casks in commands more consistently. - Ensure the usage documentation always mentions casks when appropriate - Use --formulae or --casks consistently - Provide --formulae and --casks switches to upgrade - Mark more switches as conflicting
Library/Homebrew/cmd/--cache.rb
@@ -13,7 +13,7 @@ module Homebrew def __cache_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `--cache` [<options>] [<formula>] + `--cache` [<options>] [<formula|cask>] Display Homebrew's download cache. See also `HOMEBREW_CACHE`. @@ -23,12 +23,12 @@ def __cache_args ...
true
Other
Homebrew
brew
ced084bd49fa58a239d283997fcf6b5e84054b11.json
Handle casks in commands more consistently. - Ensure the usage documentation always mentions casks when appropriate - Use --formulae or --casks consistently - Provide --formulae and --casks switches to upgrade - Mark more switches as conflicting
Library/Homebrew/cmd/list.rb
@@ -11,9 +11,9 @@ module Homebrew def list_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `list`, `ls` [<options>] [<formula>] + `list`, `ls` [<options>] [<formula|cask>] - List all installed formulae. + List all installed formulae or casks If <formula> i...
true
Other
Homebrew
brew
ced084bd49fa58a239d283997fcf6b5e84054b11.json
Handle casks in commands more consistently. - Ensure the usage documentation always mentions casks when appropriate - Use --formulae or --casks consistently - Provide --formulae and --casks switches to upgrade - Mark more switches as conflicting
Library/Homebrew/cmd/outdated.rb
@@ -12,15 +12,19 @@ module Homebrew def outdated_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `outdated` [<options>] [<formula>] + `outdated` [<options>] [<formula>|<cask>] - List installed formulae that have an updated version available. By default, version + Lis...
true
Other
Homebrew
brew
ced084bd49fa58a239d283997fcf6b5e84054b11.json
Handle casks in commands more consistently. - Ensure the usage documentation always mentions casks when appropriate - Use --formulae or --casks consistently - Provide --formulae and --casks switches to upgrade - Mark more switches as conflicting
Library/Homebrew/cmd/upgrade.rb
@@ -14,18 +14,22 @@ module Homebrew def upgrade_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `upgrade` [<options>] [<formula>] + `upgrade` [<options>] [<formula>|<cask>] - Upgrade outdated, unpinned formulae using the same options they were originally - installed ...
true
Other
Homebrew
brew
ced084bd49fa58a239d283997fcf6b5e84054b11.json
Handle casks in commands more consistently. - Ensure the usage documentation always mentions casks when appropriate - Use --formulae or --casks consistently - Provide --formulae and --casks switches to upgrade - Mark more switches as conflicting
docs/Manpage.md
@@ -274,9 +274,9 @@ automatically when you install formulae but can be useful for DIY installations. * `-f`, `--force`: Allow keg-only formulae to be linked. -### `list`, `ls` [*`options`*] [*`formula`*] +### `list`, `ls` [*`options`*] [*`formula|cask`*] -List all installed formulae. +List all installed formula...
true
Other
Homebrew
brew
ced084bd49fa58a239d283997fcf6b5e84054b11.json
Handle casks in commands more consistently. - Ensure the usage documentation always mentions casks when appropriate - Use --formulae or --casks consistently - Provide --formulae and --casks switches to upgrade - Mark more switches as conflicting
manpages/brew.1
@@ -366,8 +366,8 @@ List files which would be linked or deleted by \fBbrew link \-\-overwrite\fR wit \fB\-f\fR, \fB\-\-force\fR Allow keg\-only formulae to be linked\. . -.SS "\fBlist\fR, \fBls\fR [\fIoptions\fR] [\fIformula\fR]" -List all installed formulae\. +.SS "\fBlist\fR, \fBls\fR [\fIoptions\fR] [\fIformula|c...
true
Other
Homebrew
brew
72985277e84339912cc4f6771cfba12fd7e0b508.json
Add strategy to livecheck DSL
Library/Homebrew/livecheck.rb
@@ -15,6 +15,7 @@ def initialize(formula) @regex = nil @skip = false @skip_msg = nil + @strategy = nil @url = nil end @@ -40,6 +41,22 @@ def skip? @skip end + # Sets the strategy instance variable to the provided symbol or returns the + # strategy instance variable when no argume...
true
Other
Homebrew
brew
72985277e84339912cc4f6771cfba12fd7e0b508.json
Add strategy to livecheck DSL
Library/Homebrew/test/livecheck_spec.rb
@@ -44,6 +44,23 @@ end end + describe "#strategy" do + it "returns nil if not set" do + expect(livecheckable.strategy).to be nil + end + + it "returns the Symbol if set" do + livecheckable.strategy(:page_match) + expect(livecheckable.strategy).to eq(:page_match) + end + + it "ra...
true
Other
Homebrew
brew
a3278ad3453b42d0e15a487d1991b85f9f9b1e01.json
add bump spec
Library/Homebrew/dev-cmd/bump.rb
@@ -23,9 +23,10 @@ def bump_args end def bump - bump_args.parse + args = bump_args.parse - requested_formula = Homebrew.args.formula + requested_formula = args.formula + requested_limit = args.limit ? args.limit.to_i : nil requested_formula&.downcase! raise FormulaUnavailableError, ...
true
Other
Homebrew
brew
a3278ad3453b42d0e15a487d1991b85f9f9b1e01.json
add bump spec
Library/Homebrew/test/dev-cmd/bump_spec.rb
@@ -0,0 +1,7 @@ +# frozen_string_literal: true + +require "cmd/shared_examples/args_parse" + +describe "Homebrew.bump_args" do + it_behaves_like "parseable arguments" +end
true
Other
Homebrew
brew
a3278ad3453b42d0e15a487d1991b85f9f9b1e01.json
add bump spec
Library/Homebrew/utils/repology.rb
@@ -53,7 +53,7 @@ def parse_api_response outdated_packages end - def validate_and_format_packages(outdated_repology_packages) + def validate_and_format_packages(outdated_repology_packages, limit) packages = {} outdated_repology_packages.each do |_name, repositories| # identify homebrew repo...
true
Other
Homebrew
brew
b1ca2f7e3c4499d347a831d988e91ea93d01d65e.json
Add shared method for upgrading casks.
Library/Homebrew/cask/cmd/upgrade.rb
@@ -1,5 +1,6 @@ # frozen_string_literal: true +require "env_config" require "cask/config" module Cask @@ -17,35 +18,65 @@ def initialize(*) end def run - outdated_casks = casks(alternative: lambda { + self.class.upgrade_casks( + *casks, + force: force?, + ...
true
Other
Homebrew
brew
b1ca2f7e3c4499d347a831d988e91ea93d01d65e.json
Add shared method for upgrading casks.
Library/Homebrew/cmd/upgrade.rb
@@ -133,10 +133,16 @@ def upgrade_outdated_formulae(formulae, args:) end def upgrade_outdated_casks(casks, args:) - cask_upgrade = Cask::Cmd::Upgrade.new(casks) - cask_upgrade.force = args.force? - cask_upgrade.dry_run = args.dry_run? - cask_upgrade.greedy = args.greedy? - cask_upgrade.run + C...
true
Other
Homebrew
brew
b1ca2f7e3c4499d347a831d988e91ea93d01d65e.json
Add shared method for upgrading casks.
Library/Homebrew/env_config.rb
@@ -54,6 +54,9 @@ module EnvConfig "Linux: `$XDG_CACHE_HOME/Homebrew` or `$HOME/.cache/Homebrew`.", default: HOMEBREW_DEFAULT_CACHE, }, + HOMEBREW_CASK_OPTS: { + description: "Options which should be used for all `cask` commands.", + }, ...
true
Other
Homebrew
brew
5157c08327f58ffdd9fe6aaf6acfa2bd08b1ba41.json
style: clarify GitHub .git error message
Library/Homebrew/rubocops/homepage.rb
@@ -64,7 +64,7 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node) when %r{^https://github.com.*\.git} offending_node(parameters(homepage_node).first) - problem "GitHub URLs (`#{homepage}`) should not end with .git" + problem "GitHub homepages (`#{home...
true
Other
Homebrew
brew
5157c08327f58ffdd9fe6aaf6acfa2bd08b1ba41.json
style: clarify GitHub .git error message
Library/Homebrew/test/rubocops/homepage_spec.rb
@@ -104,7 +104,7 @@ class #{name.capitalize} < Formula column: 2, source: source }] elsif homepage.match?("https://github.com/foo/bar.git") - expected_offenses = [{ message: "GitHub URLs (`#{homepage}`) should not end with .gi...
true
Other
Homebrew
brew
f1e06b865a0eabaf938a2f1026853642db253e5d.json
audit: permit license groups
Library/Homebrew/dev-cmd/audit.rb
@@ -335,6 +335,14 @@ def audit_formula_name openssl@1.1 ].freeze + PERMITTED_LICENSE_MISMATCHES = { + "AGPL-3.0" => ["AGPL-3.0-only", "AGPL-3.0-or-later"], + "GPL-2.0" => ["GPL-2.0-only", "GPL-2.0-or-later"], + "GPL-3.0" => ["GPL-3.0-only", "GPL-3.0-or-later"], + "LGPL-2.1" => [...
true
Other
Homebrew
brew
f1e06b865a0eabaf938a2f1026853642db253e5d.json
audit: permit license groups
Library/Homebrew/test/dev-cmd/audit_spec.rb
@@ -102,14 +102,14 @@ class Foo < Formula end it "detects no license info" do - fa = formula_auditor "foo", <<~RUBY, spdx_data: spdx_data, new_formula: true + fa = formula_auditor "foo", <<~RUBY, spdx_data: spdx_data, new_formula: true, core_tap: true class Foo < Formula ...
true
Other
Homebrew
brew
86359c4c91d8b4d2934828129a8de9cd310adf01.json
Implement `Homebrew.args` compatibility layer.
Library/Homebrew/compat.rb
@@ -1,5 +1,7 @@ # frozen_string_literal: true +require "compat/dependencies_helpers" +require "compat/cli/parser" require "compat/extend/nil" require "compat/extend/string" require "compat/formula"
true
Other
Homebrew
brew
86359c4c91d8b4d2934828129a8de9cd310adf01.json
Implement `Homebrew.args` compatibility layer.
Library/Homebrew/compat/cli/parser.rb
@@ -0,0 +1,32 @@ +# frozen_string_literal: true + +module Homebrew + module CLI + class Parser + module Compat + module DeprecatedArgs + def respond_to_missing?(*) + super + end + + def method_missing(method, *) + if ![:debug?, :quiet?, :verbose?].include...
true
Other
Homebrew
brew
86359c4c91d8b4d2934828129a8de9cd310adf01.json
Implement `Homebrew.args` compatibility layer.
Library/Homebrew/compat/dependencies_helpers.rb
@@ -0,0 +1,17 @@ +# frozen_string_literal: true + +require "cli/args" + +module DependenciesHelpers + module Compat + def argv_includes_ignores(argv = nil) + unless @printed_includes_ignores_warning + odeprecated "Homebrew.argv_includes_ignores", "Homebrew.args_includes_ignores" + @printed_includ...
true
Other
Homebrew
brew
754beb64fc72fcf7ee249c05e13bacbeafafaa35.json
rubocop: exclude formula.rb from ClassLength. We want to allow this class to grow larger still while still enforcing this on other classes.
Library/.rubocop.yml
@@ -161,7 +161,6 @@ Lint/AmbiguousRegexpLiteral: Lint/ParenthesesAsGroupedExpression: Enabled: false - # most metrics don't make sense to apply for formulae/taps Metrics/AbcSize: Enabled: false
true
Other
Homebrew
brew
754beb64fc72fcf7ee249c05e13bacbeafafaa35.json
rubocop: exclude formula.rb from ClassLength. We want to allow this class to grow larger still while still enforcing this on other classes.
Library/.rubocop_cask.yml
@@ -20,6 +20,8 @@ Cask/StanzaOrder: Description: 'Ensure that cask stanzas are sorted correctly. More info at https://github.com/Homebrew/homebrew-cask/blob/HEAD/CONTRIBUTING.md#stanza-order' Enabled: true -# don't want this for casks but re-enabled for Library/Homebrew +# don't want these for casks but re-enab...
true
Other
Homebrew
brew
754beb64fc72fcf7ee249c05e13bacbeafafaa35.json
rubocop: exclude formula.rb from ClassLength. We want to allow this class to grow larger still while still enforcing this on other classes.
Library/Homebrew/.rubocop.yml
@@ -37,30 +37,33 @@ Lint/ParenthesesAsGroupedExpression: # TODO: try to bring down all metrics maximums Metrics/AbcSize: Enabled: true - Max: 275 + Max: 250 Metrics/BlockLength: Enabled: true - Max: 1100 + Max: 100 Exclude: - - 'test/formula_spec.rb' + - 'test/**/*' Metrics/BlockNesting: Enabl...
true
Other
Homebrew
brew
acfdbce6d4259f9b6440f606f1dc48d4497d8393.json
tap-new: update GitHub Actions. This should be using the split options for a better user experience and can use both Linux and macOS now.
Library/Homebrew/dev-cmd/tap-new.rb
@@ -53,23 +53,37 @@ def tap_new pull_request: [] jobs: test-bot: - runs-on: macos-latest + runs-on: [ubuntu-latest, macos-latest] steps: + - name: Update Homebrew + run: brew update + - name: Set up Git repository ...
true
Other
Homebrew
brew
acfdbce6d4259f9b6440f606f1dc48d4497d8393.json
tap-new: update GitHub Actions. This should be using the split options for a better user experience and can use both Linux and macOS now.
Library/Homebrew/test/dev-cmd/tap-new_spec.rb
@@ -7,13 +7,13 @@ end describe "brew tap-new", :integration_test do - it "initializes a new Tap with a ReadMe file and GitHub Actions CI" do + it "initializes a new tap with a README file and GitHub Actions CI" do expect { brew "tap-new", "homebrew/foo", "--verbose" } .to be_a_success .and outp...
true
Other
Homebrew
brew
94274f7ffcbf394f59cb67203526129d43970fd4.json
docs/Formula-Cookbook: improve license text. Co-authored-by: Jonathan Chang <jchang641@gmail.com>
docs/Formula-Cookbook.md
@@ -91,7 +91,9 @@ Try to summarise from the [`homepage`](https://rubydoc.brew.sh/Formula#homepage% **We don’t accept new formulae into Homebrew/homebrew-core without a [`license`](https://rubydoc.brew.sh/Formula#license-class_method)!** -Find the license identifier from the [SPDX License List](https://spdx.org/lic...
false
Other
Homebrew
brew
281a5986856f3505c23b45c786b5e98ec1643f07.json
cmd/uses: extract function `intersection_of_dependents`
Library/Homebrew/cmd/uses.rb
@@ -65,15 +65,25 @@ def uses end use_runtime_dependents = args.installed? && + !used_formulae_missing && !args.include_build? && !args.include_test? && !args.include_optional? && ...
false
Other
Homebrew
brew
7e47d1be94d02522057554cca73d77a41c3395ce.json
cmd/log: fix args error
Library/Homebrew/cmd/log.rb
@@ -37,7 +37,7 @@ def log ENV["PATH"] = ENV["HOMEBREW_PATH"] if args.no_named? - git_log HOMEBREW_REPOSITORY + git_log HOMEBREW_REPOSITORY, args: args else path = Formulary.path(args.named.first) tap = Tap.from_path(path)
false
Other
Homebrew
brew
4cfd80451a28977a8621fcedfd2ffdcc9f82f734.json
deps: fix args for --installed with no formula
Library/Homebrew/cmd/deps.rb
@@ -96,7 +96,7 @@ def deps if args.no_named? raise FormulaUnspecifiedError unless args.installed? - puts_deps sorted_dependents(Formula.installed + Cask::Caskroom.casks), recursive + puts_deps sorted_dependents(Formula.installed + Cask::Caskroom.casks), recursive, args: args return e...
false
Other
Homebrew
brew
1173d00bf6316fa4ce98a46a1fcbe9d120d75dcc.json
Add links for determining more restrictive license
docs/Formula-Cookbook.md
@@ -99,7 +99,7 @@ If the software is available under multiple licenses, you should list them all i license ["MIT", "GPL-2.0"] ``` -Note: only specify multiple licenses if the formula gives the user a choice between the licenses. Formulae that have different licenses for different parts of their software should spec...
false
Other
Homebrew
brew
7c6cd247ee8f1eae426ba61c7bfa9ea3b4c91a33.json
Apply suggestions from code review Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
docs/Formula-Cookbook.md
@@ -89,11 +89,11 @@ Try to summarise from the [`homepage`](https://rubydoc.brew.sh/Formula#homepage% ### Fill in the `license` -**We don’t accept formulae without a [`license`](https://rubydoc.brew.sh/Formula#license-class_method)!** +**We don’t accept new formulae into Homebrew/homebrew-core without a [`license`]...
false
Other
Homebrew
brew
b57b83feeccbfd1435e018a5a79328a2313078e8.json
dev-cmd/ruby: improve args passing
Library/Homebrew/dev-cmd/ruby.rb
@@ -13,21 +13,26 @@ def ruby_args Run a Ruby instance with Homebrew's libraries loaded, e.g. `brew ruby -e "puts :gcc.f.deps"` or `brew ruby script.rb`. EOS - switch "-r", - description: "Load a library using `require`." - switch "-e", - description: "Execute t...
false
Other
Homebrew
brew
25009f94e72ee69e982e832c15e8a8e27893d999.json
cmd/list: remove ARGV usage
Library/Homebrew/cmd/list.rb
@@ -165,7 +165,7 @@ def filtered_list(args:) def list_casks(args:) cask_list = Cask::Cmd::List.new args.named - cask_list.one = ARGV.include? "-1" + cask_list.one = args.public_send(:'1?') cask_list.versions = args.versions? cask_list.full_name = args.full_name? cask_list.run
false
Other
Homebrew
brew
10f2a5025621aed308122880d0796e8a7b713bb9.json
dev-cmd/prof: improve arg passing
Library/Homebrew/dev-cmd/prof.rb
@@ -8,20 +8,19 @@ module Homebrew def prof_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `prof` <command> + `prof` [<command>] Run Homebrew with the Ruby profiler, e.g. `brew prof readall`. EOS - min_named 1 end end def prof - prof_args.parse...
true
Other
Homebrew
brew
10f2a5025621aed308122880d0796e8a7b713bb9.json
dev-cmd/prof: improve arg passing
docs/Manpage.md
@@ -966,7 +966,7 @@ Apply the bottle commit and publish bottles to Bintray. * `--root-url`: Use the specified *`URL`* as the root of the bottle's URL instead of Homebrew's default. -### `prof` *`command`* +### `prof` [*`command`*] Run Homebrew with the Ruby profiler, e.g. `brew prof readall`.
true
Other
Homebrew
brew
10f2a5025621aed308122880d0796e8a7b713bb9.json
dev-cmd/prof: improve arg passing
manpages/brew-cask.1
@@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BREW\-CASK" "1" "July 2020" "Homebrew" "brew-cask" +.TH "BREW\-CASK" "1" "August 2020" "Homebrew" "brew-cask" . .SH "NAME" \fBbrew\-cask\fR \- a friendly binary installer for macOS
true
Other
Homebrew
brew
10f2a5025621aed308122880d0796e8a7b713bb9.json
dev-cmd/prof: improve arg passing
manpages/brew.1
@@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BREW" "1" "July 2020" "Homebrew" "brew" +.TH "BREW" "1" "August 2020" "Homebrew" "brew" . .SH "NAME" \fBbrew\fR \- The Missing Package Manager for macOS @@ -1285,7 +1285,7 @@ Upload to the specified Bintray organ...
true
Other
Homebrew
brew
bcc4f1bb292698c1ba3fbad5720706ddd123fbd0.json
version: disallow nil value for Token#create
Library/Homebrew/version.rb
@@ -13,9 +13,6 @@ class Token include Comparable def self.create(val) - return NULL_TOKEN if val.nil? - return NULL_TOKEN if val.respond_to?(:null?) && val.null? - raise TypeError, "Token value must be a string; got a #{val.class} (#{val})" unless val.respond_to?(:to_str) case val
false
Other
Homebrew
brew
144a454e3487a75c68759eb5035a8c8ac41082f0.json
test/version_spec: add special token comparison examples
Library/Homebrew/test/version_spec.rb
@@ -16,6 +16,28 @@ specify "#to_s" do expect(described_class.new("foo").to_s).to eq("foo") end + + it "can be compared against nil" do + expect(described_class.create("2")).to be > nil + expect(described_class.create("p194")).to be > nil + end + + it "can be compared against Version::NULL_TOKEN" do ...
false
Other
Homebrew
brew
9fb3a80e383f11e94e763cae048efecaf87a52d3.json
Add cloudformation-cli to blocklist
Library/Homebrew/utils/pypi.rb
@@ -8,6 +8,7 @@ module PyPI AUTOMATIC_RESOURCE_UPDATE_BLOCKLIST = %w[ ansible ansible@2.8 + cloudformation-cli diffoscope dxpy molecule
false
Other
Homebrew
brew
1b3ae7f9e68a43fdb56d5a3d05a4b520edc7684b.json
Remove unused `BottlePublisher` class.
Library/Homebrew/bottle_publisher.rb
@@ -1,160 +0,0 @@ -# frozen_string_literal: true - -require "utils" -require "formula_info" - -class BottlePublisher - def initialize(tap, changed_formulae_names, bintray_org, no_publish, warn_on_publish_failure) - @tap = tap - @changed_formulae_names = changed_formulae_names - @no_publish = no_publish - @...
true
Other
Homebrew
brew
1b3ae7f9e68a43fdb56d5a3d05a4b520edc7684b.json
Remove unused `BottlePublisher` class.
Library/Homebrew/sorbet/files.yaml
@@ -1,6 +1,5 @@ false: - ./bintray.rb - - ./bottle_publisher.rb - ./brew.rb - ./build.rb - ./cask/artifact/abstract_artifact.rb @@ -268,7 +267,6 @@ false: - ./test.rb - ./test/ENV_spec.rb - ./test/bintray_spec.rb - - ./test/bottle_publisher_spec.rb - ./test/cask_dependent_spec.rb - ./test/...
true
Other
Homebrew
brew
1b3ae7f9e68a43fdb56d5a3d05a4b520edc7684b.json
Remove unused `BottlePublisher` class.
Library/Homebrew/test/bottle_publisher_spec.rb
@@ -1,48 +0,0 @@ -# frozen_string_literal: true - -require "bottle_publisher" - -describe BottlePublisher do - subject(:bottle_publisher) { - described_class.new( - CoreTap.instance, ["#{CoreTap.instance.name}/hello.rb"], "homebrew", false, false - ) - } - - let(:tap) { CoreTap.new } - - describe "publis...
true
Other
Homebrew
brew
97e05ae4106bc7315233d9d35f8d02e913378b1a.json
cmd/outdated: restore sorting of formulae
Library/Homebrew/cmd/outdated.rb
@@ -189,7 +189,7 @@ def outdated_formulae_casks(args:) casks = Cask::Caskroom.casks end - [select_outdated(formulae, args: args), select_outdated(casks, args: args)] + [select_outdated(formulae, args: args).sort, select_outdated(casks, args: args)] end def select_outdated(formulae_or_casks, ...
false
Other
Homebrew
brew
39f000c6ab7cffe661549aec1d3651502b339957.json
bump-formula-pr: restore formula unless read only run
Library/Homebrew/dev-cmd/bump-formula-pr.rb
@@ -246,7 +246,8 @@ def bump_formula_pr ] end - old_contents = File.read(formula.path) unless args.dry_run? + read_only_run = args.dry_run? && !args.write? + old_contents = File.read(formula.path) unless read_only_run if new_mirrors replacement_pairs << [ @@ -310,13 +311,13 @@ def b...
false
Other
Homebrew
brew
5e98d4df088128d32036bc2518db754714aa6f81.json
cli/parser: restore env setting for global options
Library/Homebrew/cli/parser.rb
@@ -49,7 +49,7 @@ def initialize(&block) @formula_options = false self.class.global_options.each do |short, long, desc| - switch short, long, description: desc + switch short, long, description: desc, env: option_to_name(long) end instance_eval(&block) if block_...
false
Other
Homebrew
brew
c494789d700fbb76035c2cd5d8c92cbe3ef2c0b0.json
list: pass args properly
Library/Homebrew/cmd/list.rb
@@ -53,7 +53,7 @@ def list_args def list args = list_args.parse - return list_casks if args.cask? + return list_casks(args: args) if args.cask? return list_unbrewed if args.unbrewed? @@ -66,7 +66,7 @@ def list end if args.pinned? || args.versions? - filtered_list + filtere...
false
Other
Homebrew
brew
59b9d80ebd526ce8ee15df199f2a52148e7752b5.json
bump-formula-pr: add args to check_all_pull_requests
Library/Homebrew/dev-cmd/bump-formula-pr.rb
@@ -128,7 +128,7 @@ def bump_formula_pr check_open_pull_requests(formula, tap_full_name, args: args) new_version = args.version - check_all_pull_requests(formula, tap_full_name, version: new_version) if new_version + check_all_pull_requests(formula, tap_full_name, version: new_version, args: args) if ...
false
Other
Homebrew
brew
465a1faa8a41156d0992af1b02c299a061d47d71.json
docs: add reference to update-python-resources
docs/Python-for-Formula-Authors.md
@@ -26,7 +26,9 @@ Applications should be installed into a Python [virtualenv](https://virtualenv.p All of the Python module dependencies of the application (and their dependencies, recursively) should be declared as `resource`s in the formula and installed into the virtualenv, as well. Each dependency should be expl...
false
Other
Homebrew
brew
df5aac8b092f6552b065aa68c09e034b3e5e71e0.json
docs: add license information
docs/Formula-Cookbook.md
@@ -54,6 +54,7 @@ class Foo < Formula homepage "" url "https://example.com/foo-0.1.tar.gz" sha256 "85cc828a96735bdafcf29eb6291ca91bac846579bcef7308536e0c875d6c81d7" + license "" # depends_on "cmake" => :build @@ -86,6 +87,20 @@ An SSL/TLS (https) [`homepage`](https://rubydoc.brew.sh/Formula#homepage%3D...
false
Other
Homebrew
brew
57cac495594aa36544e8ec5749cf66c5f918de2d.json
Use formula.full_name for blocklist
Library/Homebrew/utils/pypi.rb
@@ -47,7 +47,7 @@ def get_pypi_info(package, version) def update_python_resources!(formula, version = nil, print_only: false, silent: false, ignore_non_pypi_packages: false) - if !print_only && AUTOMATIC_RESOURCE_UPDATE_BLOCKLIST.include?(formula.name) + if !print_only && AUTO...
false
Other
Homebrew
brew
7f158df8420d574e4bcb2228f3c9c2b845a739cd.json
extend/pathname: use absolute path to java in write_jar_script
Library/Homebrew/extend/pathname.rb
@@ -374,8 +374,11 @@ def env_script_all_files(dst, env) # Writes an exec script that invokes a Java jar def write_jar_script(target_jar, script_name, java_opts = "", java_version: nil) - (self/script_name).write_env_script "java", "#{java_opts} -jar \"#{target_jar}\"", - ...
false
Other
Homebrew
brew
17d0a46afd931a565eb38087ad27866e6f01abbd.json
.gitignore: add sorbet and tapioca dependencies
.gitignore
@@ -86,11 +86,13 @@ **/vendor/bundle/ruby/*/gems/byebug-*/ **/vendor/bundle/ruby/*/gems/coderay-*/ **/vendor/bundle/ruby/*/gems/colorize-*/ +**/vendor/bundle/ruby/*/gems/commander-*/ **/vendor/bundle/ruby/*/gems/connection_pool-*/ **/vendor/bundle/ruby/*/gems/codecov-*/ **/vendor/bundle/ruby/*/gems/diff-lcs-*/ *...
false
Other
Homebrew
brew
e8dbbc2975d6a305aa0d3017b5911d217266d3eb.json
sorbet: update hidden definitions
Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi
@@ -13549,6 +13549,94 @@ module ParallelTests WINDOWS = ::T.let(nil, ::T.untyped) end +class Parlour::ConflictResolver + extend ::T::Private::Methods::MethodHooks + extend ::T::Private::Methods::SingletonMethodHooks +end + +module Parlour::Debugging::Tree + extend ::T::Private::Methods::MethodHooks + extend :...
false
Other
Homebrew
brew
58848e402a66b9ca496346359db6525f01809371.json
sorbet/files.yaml: add new files
Library/Homebrew/sorbet/files.yaml
@@ -163,6 +163,7 @@ false: - ./dev-cmd/tests.rb - ./dev-cmd/unpack.rb - ./dev-cmd/update-license-data.rb + - ./dev-cmd/update-python-resources.rb - ./dev-cmd/update-test.rb - ./dev-cmd/vendor-gems.rb - ./development_tools.rb @@ -268,6 +269,7 @@ false: - ./test/ENV_spec.rb - ./test/bintray_spec....
false
Other
Homebrew
brew
b08d1a28ad6c9c12b9f5bbc2cfa3a5df5df95d5c.json
update-python-resources: handle no sdist for package
Library/Homebrew/utils/pypi.rb
@@ -35,6 +35,8 @@ def get_pypi_info(package, version) end sdist = json["urls"].find { |url| url["packagetype"] == "sdist" } + return json["info"]["name"] if sdist.nil? + [json["info"]["name"], sdist["url"], sdist["digests"]["sha256"]] end
false
Other
Homebrew
brew
5efed5d8c54ca541791c8b9b6dd91b94ed3929b3.json
Remove debug message.
Library/Homebrew/dev-cmd/irb.rb
@@ -56,8 +56,6 @@ def irb require "keg" require "cask/all" - puts ARGV.inspect - ohai "Interactive Homebrew Shell" puts "Example commands available with: brew irb --examples" if args.pry?
false
Other
Homebrew
brew
b6a326f6ee28ffceba433a0c1ee13b3fba8e9909.json
Run `brew man` to update `brew bundle` manpage.
docs/Manpage.md
@@ -1194,6 +1194,8 @@ flags which will help find keg-only dependencies like `openssl`, `icu4c`, etc. Read the `Brewfile` from this location. Use `--file=-` to pipe to stdin/stdout. * `--global`: Read the `Brewfile` from `~/.Brewfile`. +* `-v`, `--verbose`: + `install` prints output from commands as they are run...
true
Other
Homebrew
brew
b6a326f6ee28ffceba433a0c1ee13b3fba8e9909.json
Run `brew man` to update `brew bundle` manpage.
manpages/brew.1
@@ -1543,6 +1543,10 @@ Read the \fBBrewfile\fR from this location\. Use \fB\-\-file=\-\fR to pipe to st Read the \fBBrewfile\fR from \fB~/\.Brewfile\fR\. . .TP +\fB\-v\fR, \fB\-\-verbose\fR +\fBinstall\fR prints output from commands as they are run\. \fBcheck\fR lists all missing dependencies\. +. +.TP \fB\-\-no\-u...
true
Other
Homebrew
brew
ce721f43a8d5976d9864a8b8df82494b58001553.json
display version data when formula is up-to-date
Library/Homebrew/dev-cmd/bump.rb
@@ -28,34 +28,34 @@ def bump requested_formula = Homebrew.args.formula requested_formula&.downcase! - raise FormulaUnavailableError, requested_formula if requested_formula && !get_formula_details(requested_formula) + raise FormulaUnavailableError, requested_formula if requested_formula && !validate_fo...
true
Other
Homebrew
brew
ce721f43a8d5976d9864a8b8df82494b58001553.json
display version data when formula is up-to-date
Library/Homebrew/utils/repology.rb
@@ -21,11 +21,11 @@ def single_package_query(name) output, _errors, _status = curl_output(url.to_s) data = JSON.parse(output) - outdated_homebrew = data.select do |repo| - repo["repo"] == "homebrew" && repo["status"] == "outdated" + homebrew = data.select do |repo| + repo["repo"] == "homebre...
true
Other
Homebrew
brew
e05538a7d9f50c821b5605deff534beed85b8a04.json
Create DependenciesHelpers file, add tests
Library/Homebrew/cmd/deps.rb
@@ -4,6 +4,7 @@ require "ostruct" require "cli/parser" require "cask/caskroom" +require "dependencies_helpers" module Homebrew extend DependenciesHelpers
true
Other
Homebrew
brew
e05538a7d9f50c821b5605deff534beed85b8a04.json
Create DependenciesHelpers file, add tests
Library/Homebrew/cmd/uses.rb
@@ -7,6 +7,7 @@ require "formula" require "cli/parser" require "cask/caskroom" +require "dependencies_helpers" module Homebrew extend DependenciesHelpers
true
Other
Homebrew
brew
e05538a7d9f50c821b5605deff534beed85b8a04.json
Create DependenciesHelpers file, add tests
Library/Homebrew/dependencies.rb
@@ -56,81 +56,3 @@ def inspect "#<#{self.class.name}: {#{to_a.join(", ")}}>" end end - -module DependenciesHelpers - def argv_includes_ignores(argv) - includes = [] - ignores = [] - - if argv.include? "--include-build" - includes << "build?" - else - ignores << "build?" - end - - i...
true
Other
Homebrew
brew
e05538a7d9f50c821b5605deff534beed85b8a04.json
Create DependenciesHelpers file, add tests
Library/Homebrew/dependencies_helpers.rb
@@ -0,0 +1,82 @@ +# frozen_string_literal: true + +require "cask_dependent" + +module DependenciesHelpers + def argv_includes_ignores(argv) + includes = [] + ignores = [] + + if argv.include? "--include-build" + includes << "build?" + else + ignores << "build?" + end + + if argv.include? "-...
true
Other
Homebrew
brew
e05538a7d9f50c821b5605deff534beed85b8a04.json
Create DependenciesHelpers file, add tests
Library/Homebrew/test/dependencies_helpers_spec.rb
@@ -0,0 +1,47 @@ +# frozen_string_literal: true + +require "dependencies_helpers" + +describe DependenciesHelpers do + specify "#dependents" do + foo = formula "foo" do + url "foo" + version "1.0" + end + + foo_cask = Cask::CaskLoader.load(+<<-RUBY) + cask "foo_cask" do + end + RUBY + +...
true
Other
Homebrew
brew
4381c32524c999fd7de308ef775c66b4f056497d.json
Add test for parsing with `ignore_invalid_options`.
Library/Homebrew/cli/args.rb
@@ -20,6 +20,7 @@ def initialize(argv = ARGV.dup.freeze, set_default_args: false) # Can set these because they will be overwritten by freeze_named_args! # (whereas other values below will only be overwritten if passed). self[:named_args] = argv.reject { |arg| arg.start_with?("-") } + s...
true
Other
Homebrew
brew
4381c32524c999fd7de308ef775c66b4f056497d.json
Add test for parsing with `ignore_invalid_options`.
Library/Homebrew/cli/parser.rb
@@ -156,9 +156,7 @@ def summary @parser.to_s end - def parse(argv = @argv, ignore_invalid_options: false) - raise "Arguments were already parsed!" if @args_parsed - + def parse_remaining(argv, ignore_invalid_options: false) i = 0 remaining = [] @@ -189,6 +187,14 @@...
true