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 | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/cmd/upgrade.rb | @@ -89,6 +89,8 @@ def upgrade_args
cask_options
conflicts "--build-from-source", "--force-bottle"
+
+ named_args [:installed_formula, :installed_cask]
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/cmd/uses.rb | @@ -46,7 +46,8 @@ def uses_args
description: "Include only casks."
conflicts "--formula", "--cask"
- min_named :formula
+
+ named_args :formula, min: 1
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/audit.rb | @@ -90,6 +90,8 @@ def audit_args
conflicts "--display-cop-names", "--skip-style"
conflicts "--display-cop-names", "--only-cops"
conflicts "--display-cop-names", "--except-cops"
+
+ named_args [:formula, :cask]
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/bottle.rb | @@ -86,7 +86,8 @@ def bottle_args
description: "Use the specified <URL> as the root of the bottle's URL instead of Homebrew's default."
conflicts "--no-rebuild", "--keep-old"
- min_named 1
+
+ named_args :installed_formula, min: 1
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/bump-cask-pr.rb | @@ -52,7 +52,8 @@ def bump_cask_pr_args
conflicts "--dry-run", "--write"
conflicts "--no-audit", "--online"
- named 1
+
+ named_args :cask, number: 1
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/bump-formula-pr.rb | @@ -79,7 +79,8 @@ def bump_formula_pr_args
conflicts "--no-audit", "--strict"
conflicts "--no-audit", "--online"
conflicts "--url", "--tag"
- max_named 1
+
+ named_args :formula, max: 1
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/bump-revision.rb | @@ -23,7 +23,7 @@ def bump_revision_args
flag "--message=",
description: "Append <message> to the default commit message."
- min_named :formula
+ named_args :formula, min: 1
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/bump-unversioned-casks.rb | @@ -29,7 +29,7 @@ def self.bump_unversioned_casks_args
flag "--state-file=",
description: "File for caching state."
- min_named 1
+ named_args [:cask, :tap], min: 1
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/bump.rb | @@ -21,6 +21,8 @@ def bump_args
description: "Limit number of package results returned."
switch :verbose
switch :debug
+
+ named_args :formula
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/cat.rb | @@ -23,7 +23,7 @@ def cat_args
description: "Treat all named arguments as casks."
conflicts "--formula", "--cask"
- named :formula_or_cask
+ named_args [:formula, :cask], number: 1
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/command.rb | @@ -18,7 +18,7 @@ def command_args
Display the path to the file being used when invoking `brew` <cmd>.
EOS
- min_named 1
+ named_args :command, min: 1
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/create.rb | @@ -69,7 +69,7 @@ def create_args
conflicts "--cask", "--HEAD"
conflicts "--cask", "--set-license"
- named 1
+ named_args number: 1
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/dispatch-build-bottle.rb | @@ -28,7 +28,7 @@ def dispatch_build_bottle_args
switch "--upload",
description: "Upload built bottles to Bintray."
- min_named :formula
+ named_args :formula, min: 1
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/edit.rb | @@ -24,6 +24,8 @@ def edit_args
switch "--cask", "--casks",
description: "Treat all named arguments as casks."
conflicts "--formula", "--cask"
+
+ named_args [:formula, :cask]
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/extract.rb | @@ -97,7 +97,7 @@ def extract_args
switch "-f", "--force",
description: "Overwrite the destination formula if it already exists."
- named 2
+ named_args :formula, number: 2
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/formula.rb | @@ -18,7 +18,7 @@ def formula_args
Display the path where <formula> is located.
EOS
- min_named :formula
+ named_args :formula, min: 1
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/install-bundler-gems.rb | @@ -18,7 +18,7 @@ def install_bundler_gems_args
Install Homebrew's Bundler gems.
EOS
- max_named 0
+ named_args :none
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/linkage.rb | @@ -28,6 +28,8 @@ def linkage_args
switch "--cached",
description: "Print the cached linkage values stored in `HOMEBREW_CACHE`, set by a previous "\
"`brew linkage` run."
+
+ named_args :installed_formula
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/livecheck.rb | @@ -49,6 +49,8 @@ def livecheck_args
conflicts "--debug", "--json"
conflicts "--tap=", "--all", "--installed"
conflicts "--cask", "--formula"
+
+ named_args [:formula, :cask]
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/man.rb | @@ -31,7 +31,7 @@ def man_args
switch "--link",
description: "This is now done automatically by `brew update`."
- max_named 0
+ named_args :none
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/mirror.rb | @@ -24,7 +24,7 @@ def mirror_args
switch "--no-publish",
description: "Upload to Bintray, but don't publish."
- min_named :formula
+ named_args :formula, min: 1
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/pr-automerge.rb | @@ -34,7 +34,7 @@ def pr_automerge_args
switch "--ignore-failures",
description: "Include pull requests that have failing status checks."
- max_named 0
+ named_args :none
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/pr-publish.rb | @@ -29,7 +29,7 @@ def pr_publish_args
flag "--workflow=",
description: "Target workflow filename (default: `publish-commit-bottles.yml`)."
- min_named 1
+ named_args number: 1
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/pr-pull.rb | @@ -70,7 +70,8 @@ def pr_pull_args
description: "Comma-separated list of workflows which can be ignored if they have not been run."
conflicts "--clean", "--autosquash"
- min_named 1
+
+ named_args number: 1
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/pr-upload.rb | @@ -33,6 +33,8 @@ def pr_upload_args
description: "Upload to the specified Bintray organisation (default: `homebrew`)."
flag "--root-url=",
description: "Use the specified <URL> as the root of the bottle's URL instead of Homebrew's default."
+
+ named_args :none
end
end... | true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/prof.rb | @@ -18,6 +18,8 @@ def prof_args
EOS
switch "--stackprof",
description: "Use `stackprof` instead of `ruby-prof` (the default)."
+
+ named_args :command
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/release-notes.rb | @@ -25,7 +25,7 @@ def release_notes_args
switch "--markdown",
description: "Print as a Markdown list."
- max_named 2
+ named_args max: 2
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/sh.rb | @@ -27,7 +27,7 @@ def sh_args
flag "-c=", "--cmd=",
description: "Execute commands in a non-interactive shell."
- max_named 1
+ named_args max: 1
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/sponsors.rb | @@ -17,6 +17,8 @@ def sponsors_args
Print a Markdown summary of Homebrew's GitHub Sponsors, suitable for pasting into a README.
EOS
+
+ named_args :none
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/style.rb | @@ -42,6 +42,8 @@ def style_args
conflicts "--formula", "--cask"
conflicts "--only-cops", "--except-cops"
+
+ named_args [:formula, :cask, :tap]
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/tap-new.rb | @@ -26,7 +26,8 @@ def tap_new_args
description: "Initialize Git repository with the specified branch name (default: `main`)."
conflicts "--no-git", "--branch"
- named 1
+
+ named_args :tap, number: 1
end
end
@@ -36,8 +37,7 @@ def tap_new
label = args.pull_label || "pr-pul... | true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/test.rb | @@ -30,7 +30,7 @@ def test_args
switch "--retry",
description: "Retry if a testing fails."
- min_named :formula
+ named_args :installed_formula, min: 1
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/tests.rb | @@ -34,7 +34,7 @@ def tests_args
flag "--seed=",
description: "Randomise tests with the specified <value> instead of a random seed."
- max_named 0
+ named_args :none
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/typecheck.rb | @@ -37,7 +37,8 @@ def typecheck_args
"in their paths (relative to the input path passed to Sorbet)."
conflicts "--dir", "--file"
- max_named 0
+
+ named_args :none
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/unbottled.rb | @@ -24,6 +24,8 @@ def unbottled_args
switch "--total",
description: "Output the number of unbottled and total formulae."
conflicts "--dependents", "--total"
+
+ named_args :formula
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/unpack.rb | @@ -30,7 +30,8 @@ def unpack_args
description: "Overwrite the destination directory if it already exists."
conflicts "--git", "--patch"
- min_named :formula
+
+ named_args :formula, min: 1
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/update-license-data.rb | @@ -21,7 +21,7 @@ def update_license_data_args
description: "Return a failing status code if current license data's version is the same as " \
"the upstream. This can be used to notify CI when the SPDX license data is out of date."
- max_named 0
+ named_args :none
... | true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/update-python-resources.rb | @@ -34,7 +34,7 @@ def update_python_resources_args
comma_array "--exclude-packages=",
description: "Exclude these packages when finding resources."
- min_named :formula
+ named_args :formula, number: 1
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/update-test.rb | @@ -26,7 +26,7 @@ def update_test_args
flag "--before=",
description: "Use the commit at the specified <date> as the start commit."
- max_named 0
+ named_args :none
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/dev-cmd/vendor-gems.rb | @@ -21,7 +21,7 @@ def vendor_gems_args
comma_array "--update",
description: "Update all vendored Gems to the latest version."
- max_named 0
+ named_args :none
end
end
| true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/test/cask/cmd/shared_examples/requires_cask_token.rb | @@ -6,7 +6,7 @@
it "raises an exception " do
expect {
described_class.run
- }.to raise_error(Cask::CaskUnspecifiedError, "This command requires a Cask token.")
+ }.to raise_error(UsageError, /this command requires a .*cask.* argument/)
end
end
end | true |
Other | Homebrew | brew | da811373d3f876da72d53c2828fd4cacefdba210.json | Add named_args DSL for commands | Library/Homebrew/test/cli/named_args_spec.rb | @@ -162,4 +162,37 @@
expect(described_class.new("foo", "baz").to_paths(only: :cask)).to eq [cask_path, Cask::CaskLoader.path("baz")]
end
end
+
+ describe "#to_taps" do
+ it "returns taps" do
+ taps = described_class.new("homebrew/foo", "bar/baz")
+ expect(taps.to_taps.map(&:name)).to eq %w[... | true |
Other | Homebrew | brew | 66f0a35587fffb32f16e51daf3091cb8781a6e10.json | keg: remove trailing whitespace. | Library/Homebrew/keg.rb | @@ -647,7 +647,7 @@ def make_relative_symlink(dst, src, **options)
dst.delete if options[:overwrite] && (dst.exist? || dst.symlink?)
dst.make_relative_symlink(src)
rescue Errno::EEXIST => e
- # Retry if we're linking a different version of the same
+ # Retry if we're linking a different version of t... | false |
Other | Homebrew | brew | 2c3bc08c04e53a8bb024862c7c2b808a43b44af6.json | Update RBI files for tapioca. | Library/Homebrew/sorbet/rbi/gems/parlour@4.0.1.rbi | @@ -1,7 +0,0 @@
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `parlour` gem.
-# Please instead update this file by running `tapioca generate --exclude json`.
-
-# typed: true
-
- | true |
Other | Homebrew | brew | 2c3bc08c04e53a8bb024862c7c2b808a43b44af6.json | Update RBI files for tapioca. | Library/Homebrew/sorbet/rbi/gems/parlour@5.0.0.rbi | @@ -0,0 +1,1272 @@
+# DO NOT EDIT MANUALLY
+# This is an autogenerated file for types exported from the `parlour` gem.
+# Please instead update this file by running `tapioca sync`.
+
+# typed: true
+
+module Parlour
+end
+
+class Parlour::ConflictResolver
+ sig { params(namespace: Parlour::RbiGenerator::Namespace, res... | true |
Other | Homebrew | brew | 2c3bc08c04e53a8bb024862c7c2b808a43b44af6.json | Update RBI files for tapioca. | Library/Homebrew/sorbet/rbi/gems/tapioca@0.4.11.rbi | @@ -146,6 +146,8 @@ class Tapioca::Compilers::SymbolTable::SymbolGenerator
def add_to_alias_namespace(name); end
sig { params(name: String).returns(T::Boolean) }
def alias_namespaced?(name); end
+ sig { params(constant: Module).returns(T::Array[Module]) }
+ def ancestors_of(constant); end
sig { params(con... | true |
Other | Homebrew | brew | 2c3bc08c04e53a8bb024862c7c2b808a43b44af6.json | Update RBI files for tapioca. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -12631,68 +12631,43 @@ module ParallelTests
def self.with_ruby_binary(command); end
end
-module Parlour
- VERSION = ::T.let(nil, ::T.untyped)
-end
-
-class Parlour::ConflictResolver
- def resolve_conflicts(*args, &blk); end
-end
-
class Parlour::ConflictResolver
extend ::T::Sig
extend ::T::Private::Me... | true |
Other | Homebrew | brew | 92b58666efaa469628fe72b4dbe5a8d741b74e51.json | Improve audit for `livecheck` in casks. | Library/Homebrew/cask/audit.rb | @@ -67,6 +67,7 @@ def run!
check_single_uninstall_zap
check_untrusted_pkg
check_hosting_with_appcast
+ check_appcast_and_livecheck
check_latest_with_appcast_or_livecheck
check_latest_with_auto_updates
check_stanza_requires_uninstall
@@ -283,18 +284,24 @@ def check_sha256_i... | true |
Other | Homebrew | brew | 92b58666efaa469628fe72b4dbe5a8d741b74e51.json | Improve audit for `livecheck` in casks. | Library/Homebrew/test/cask/audit_spec.rb | @@ -647,7 +647,7 @@ def tmp_cask(name, text)
end
describe "latest with appcast checks" do
- let(:message) { "Casks with an appcast should not use version :latest" }
+ let(:message) { "Casks with an `appcast` should not use `version :latest`." }
context "when the Cask is :latest and does n... | true |
Other | Homebrew | brew | f1f3fdc315238e6f86892f6228f7da5c5eb462a3.json | settings: add module for managing git config settings | Library/Homebrew/brew.rb | @@ -85,16 +85,14 @@ class MissingEnvironmentVariables < RuntimeError; end
ENV["PATH"] = path
require "commands"
+ require "settings"
if cmd
internal_cmd = Commands.valid_internal_cmd?(cmd)
internal_cmd ||= begin
internal_dev_cmd = Commands.valid_internal_dev_cmd?(cmd)
if internal_d... | true |
Other | Homebrew | brew | f1f3fdc315238e6f86892f6228f7da5c5eb462a3.json | settings: add module for managing git config settings | Library/Homebrew/cmd/update-report.rb | @@ -8,6 +8,7 @@
require "cleanup"
require "description_cache_store"
require "cli/parser"
+require "settings"
module Homebrew
extend T::Sig
@@ -63,16 +64,12 @@ def update_report
Utils::Analytics.messages_displayed! if $stdout.tty?
end
- HOMEBREW_REPOSITORY.cd do
- donation_message_displaye... | true |
Other | Homebrew | brew | f1f3fdc315238e6f86892f6228f7da5c5eb462a3.json | settings: add module for managing git config settings | Library/Homebrew/completions.rb | @@ -2,6 +2,7 @@
# frozen_string_literal: true
require "utils/link"
+require "settings"
# Helper functions for generating shell completions.
#
@@ -13,15 +14,15 @@ module Completions
sig { void }
def link!
- write_completions_option "yes"
+ Settings.write :linkcompletions, true
Tap.each do |tap... | true |
Other | Homebrew | brew | f1f3fdc315238e6f86892f6228f7da5c5eb462a3.json | settings: add module for managing git config settings | Library/Homebrew/settings.rb | @@ -0,0 +1,39 @@
+# typed: true
+# frozen_string_literal: true
+
+# Helper functions for reading and writing settings.
+#
+# @api private
+module Settings
+ extend T::Sig
+
+ module_function
+
+ sig { params(setting: T.any(String, Symbol), repo: Pathname).returns(T.nilable(String)) }
+ def read(setting, repo: HOMEB... | true |
Other | Homebrew | brew | f1f3fdc315238e6f86892f6228f7da5c5eb462a3.json | settings: add module for managing git config settings | Library/Homebrew/tap.rb | @@ -5,6 +5,7 @@
require "completions"
require "extend/cachable"
require "description_cache_store"
+require "settings"
# A {Tap} is used to extend the formulae provided by Homebrew core.
# Usually, it's synced with a remote Git repository. And it's likely
@@ -821,18 +822,14 @@ def [](key)
return unless tap.g... | true |
Other | Homebrew | brew | f1f3fdc315238e6f86892f6228f7da5c5eb462a3.json | settings: add module for managing git config settings | Library/Homebrew/test/completions_spec.rb | @@ -0,0 +1,143 @@
+# typed: false
+# frozen_string_literal: true
+
+require "completions"
+
+describe Completions do
+ let(:internal_path) { HOMEBREW_REPOSITORY/"Library/Taps/homebrew/homebrew-bar" }
+ let(:external_path) { HOMEBREW_REPOSITORY/"Library/Taps/foo/homebrew-bar" }
+
+ before do
+ HOMEBREW_REPOSITORY.... | true |
Other | Homebrew | brew | f1f3fdc315238e6f86892f6228f7da5c5eb462a3.json | settings: add module for managing git config settings | Library/Homebrew/test/settings_spec.rb | @@ -0,0 +1,74 @@
+# typed: false
+# frozen_string_literal: true
+
+require "settings"
+
+describe Settings do
+ before do
+ HOMEBREW_REPOSITORY.cd do
+ system "git", "init"
+ end
+ end
+
+ def setup_setting
+ HOMEBREW_REPOSITORY.cd do
+ system "git", "config", "--replace-all", "homebrew.foo", "tru... | true |
Other | Homebrew | brew | f1f3fdc315238e6f86892f6228f7da5c5eb462a3.json | settings: add module for managing git config settings | Library/Homebrew/test/tap_spec.rb | @@ -87,8 +87,8 @@ def setup_git_repo
def setup_completion(link:)
HOMEBREW_REPOSITORY.cd do
system "git", "init"
- system "git", "config", "--replace-all", "homebrew.linkcompletions", link
- system "git", "config", "--replace-all", "homebrew.completionsmessageshown", "yes"
+ system "git", "... | true |
Other | Homebrew | brew | f1f3fdc315238e6f86892f6228f7da5c5eb462a3.json | settings: add module for managing git config settings | Library/Homebrew/utils/analytics.rb | @@ -3,6 +3,7 @@
require "context"
require "erb"
+require "settings"
module Utils
# Helper module for fetching and reporting analytics data.
@@ -102,27 +103,27 @@ def no_message_output?
end
def uuid
- config_get(:analyticsuuid)
+ Settings.read :analyticsuuid
end
de... | true |
Other | Homebrew | brew | eefe5bb2959c77aa93a6b4a1884644fedbd8b730.json | git_repository: add `safe` argument to `git_head`/`git_short_head` | Library/Homebrew/extend/git_repository.rb | @@ -32,20 +32,21 @@ def git_origin=(origin)
end
# Gets the full commit hash of the HEAD commit.
- sig { returns(T.nilable(String)) }
- def git_head
+ sig { params(safe: T::Boolean).returns(T.nilable(String)) }
+ def git_head(safe: false)
return if !git? || !Utils::Git.available?
- Utils.popen_read... | true |
Other | Homebrew | brew | eefe5bb2959c77aa93a6b4a1884644fedbd8b730.json | git_repository: add `safe` argument to `git_head`/`git_short_head` | Library/Homebrew/utils/git_repository.rb | @@ -4,17 +4,21 @@
module Utils
extend T::Sig
- sig { params(repo: T.any(String, Pathname), length: T.nilable(Integer)).returns(T.nilable(String)) }
- def self.git_head(repo, length: nil)
+ sig do
+ params(repo: T.any(String, Pathname), length: T.nilable(Integer), safe: T::Boolean).returns(T.nilable(String))... | true |
Other | Homebrew | brew | f81e89193e51459f7ec0ff02ddf3b8529f2411f8.json | rubocops: update helpers for rubocop v1 API | Library/Homebrew/rubocops/checksum.rb | @@ -28,7 +28,6 @@ def audit_sha256(checksum)
return if checksum.nil?
if regex_match_group(checksum, /^$/)
- @offense_source_range = @offensive_node.source_range
problem "sha256 is empty"
return
end | true |
Other | Homebrew | brew | f81e89193e51459f7ec0ff02ddf3b8529f2411f8.json | rubocops: update helpers for rubocop v1 API | Library/Homebrew/rubocops/components_order.rb | @@ -27,7 +27,6 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node)
if on_macos_blocks.length > 1
@offensive_node = on_macos_blocks.second
- @offense_source_range = on_macos_blocks.second.source_range
problem "there can only be one `on_macos` block in... | true |
Other | Homebrew | brew | f81e89193e51459f7ec0ff02ddf3b8529f2411f8.json | rubocops: update helpers for rubocop v1 API | Library/Homebrew/rubocops/extend/formula.rb | @@ -18,7 +18,7 @@ module Cop
# Superclass for all formula cops.
#
# @api private
- class FormulaCop < Cop
+ class FormulaCop < Base
include RangeHelp
include HelperFunctions
@@ -71,19 +71,16 @@ def find_node_method_by_name(node, method_name)
next unless method_node.method... | true |
Other | Homebrew | brew | f81e89193e51459f7ec0ff02ddf3b8529f2411f8.json | rubocops: update helpers for rubocop v1 API | Library/Homebrew/rubocops/lines.rb | @@ -534,7 +534,7 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node)
"Pass explicit paths to prevent Homebrew from removing empty folders."
end
- if find_method_def(@processed_source.ast)
+ if find_method_def(processed_source.ast)
prob... | true |
Other | Homebrew | brew | f81e89193e51459f7ec0ff02ddf3b8529f2411f8.json | rubocops: update helpers for rubocop v1 API | Library/Homebrew/rubocops/shared/desc_helper.rb | @@ -27,7 +27,6 @@ def audit_desc(type, name, desc_call)
end
@offensive_node = desc_call
- @offense_source_range = desc_call.source_range
desc = desc_call.first_argument
| true |
Other | Homebrew | brew | f81e89193e51459f7ec0ff02ddf3b8529f2411f8.json | rubocops: update helpers for rubocop v1 API | Library/Homebrew/rubocops/shared/helper_functions.rb | @@ -28,7 +28,6 @@ def regex_match_group(node, pattern)
@length = match_object.to_s.length
@line_no = line_number(node)
@source_buf = source_buffer(node)
- @offense_source_range = source_range(@source_buf, @line_no, @column, @length)
@offensive_node = node
match_object... | true |
Other | Homebrew | brew | 14b4916ddabe5b3349643f847fc140a00b2f8179.json | utils/ast: move helper functions from `FormulaAST` to `AST` | Library/Homebrew/dev-cmd/bottle.rb | @@ -574,7 +574,7 @@ def old_checksums(formula, formula_ast, bottle_hash, args:)
end
return [] unless args.keep_old?
- old_keys = Utils::AST::FormulaAST.body_children(bottle_node.body).map(&:method_name)
+ old_keys = Utils::AST.body_children(bottle_node.body).map(&:method_name)
old_bottle_spec = f... | true |
Other | Homebrew | brew | 14b4916ddabe5b3349643f847fc140a00b2f8179.json | utils/ast: move helper functions from `FormulaAST` to `AST` | Library/Homebrew/test/utils/ast/ast_spec.rb | @@ -0,0 +1,50 @@
+# typed: false
+# frozen_string_literal: true
+
+require "utils/ast"
+
+describe Utils::AST do
+ describe ".stanza_text" do
+ let(:compound_license) do
+ <<~RUBY.chomp
+ license all_of: [
+ :public_domain,
+ "MIT",
+ "GPL-3.0-or-later" => { with: "Autoconf-ex... | true |
Other | Homebrew | brew | 14b4916ddabe5b3349643f847fc140a00b2f8179.json | utils/ast: move helper functions from `FormulaAST` to `AST` | Library/Homebrew/test/utils/ast/formula_ast_spec.rb | @@ -46,50 +46,6 @@ class Foo < Formula
end
end
- describe ".stanza_text" do
- let(:compound_license) do
- <<~RUBY.chomp
- license all_of: [
- :public_domain,
- "MIT",
- "GPL-3.0-or-later" => { with: "Autoconf-exception-3.0" },
- ]
- RUBY
- end
-
- i... | true |
Other | Homebrew | brew | 14b4916ddabe5b3349643f847fc140a00b2f8179.json | utils/ast: move helper functions from `FormulaAST` to `AST` | Library/Homebrew/utils/ast.rb | @@ -9,18 +9,79 @@ module Utils
#
# @api private
module AST
+ extend T::Sig
+
Node = RuboCop::AST::Node
SendNode = RuboCop::AST::SendNode
BlockNode = RuboCop::AST::BlockNode
ProcessedSource = RuboCop::AST::ProcessedSource
TreeRewriter = Parser::Source::TreeRewriter
+ module_func... | true |
Other | Homebrew | brew | 8c6f41d2648beec4fa6548a8de90d1a6bf2453d9.json | sorbet: Update RBI files.
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -30038,7 +30038,8 @@ class User
extend ::T::Private::Methods::SingletonMethodHooks
end
-module Utils::AST
+class Utils::AST::FormulaAST
+ extend ::T::Private::Methods::MethodHooks
extend ::T::Private::Methods::SingletonMethodHooks
end
| false |
Other | Homebrew | brew | 308390ba5b7fe03e5ed899c70e49faa47044ace8.json | Address feedback and expand documentation
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
Co-authored-by: Sean Molenaar <1484494+SMillerDev@users.noreply.github.com> | Library/Homebrew/livecheck.rb | @@ -6,7 +6,8 @@
# also return the related instance variable when no argument is provided.
#
# This information is used by the `brew livecheck` command to control its
-# behavior.
+# behavior. Example `livecheck` blocks can be found in the
+# [`brew livecheck` documentation](https://docs.brew.sh/Brew-Livecheck).
cla... | true |
Other | Homebrew | brew | 308390ba5b7fe03e5ed899c70e49faa47044ace8.json | Address feedback and expand documentation
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
Co-authored-by: Sean Molenaar <1484494+SMillerDev@users.noreply.github.com> | Library/Homebrew/livecheck/strategy/sourceforge.rb | @@ -21,7 +21,7 @@ module Strategy
# pushed out of the feed (especially if it hasn't been updated recently).
#
# Usually we address this situation by adding a `livecheck` block to
- # the formula that checks the page for the relevant directory in the
+ # the formula/cask that checks the pa... | true |
Other | Homebrew | brew | 308390ba5b7fe03e5ed899c70e49faa47044ace8.json | Address feedback and expand documentation
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
Co-authored-by: Sean Molenaar <1484494+SMillerDev@users.noreply.github.com> | docs/Brew-Livecheck.md | @@ -1,115 +1,137 @@
-# Brew Livecheck
+# `brew livecheck`
-**NOTE: This document is a work in progress and will be revised and expanded as time permits.**
+The `brew livecheck` command finds the newest version of a formula or cask's software by checking upstream. Livecheck has [strategies](https://rubydoc.brew.sh/Hom... | true |
Other | Homebrew | brew | 308390ba5b7fe03e5ed899c70e49faa47044ace8.json | Address feedback and expand documentation
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
Co-authored-by: Sean Molenaar <1484494+SMillerDev@users.noreply.github.com> | docs/Formula-Cookbook.md | @@ -545,6 +545,19 @@ Instead of `git diff | pbcopy`, for some editors `git diff >> path/to/your/formu
If anything isn’t clear, you can usually figure it out by `grep`ping the `$(brew --repo homebrew/core)` directory. Please submit a pull request to amend this document if you think it will help!
+### `livecheck` bl... | true |
Other | Homebrew | brew | 308390ba5b7fe03e5ed899c70e49faa47044ace8.json | Address feedback and expand documentation
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
Co-authored-by: Sean Molenaar <1484494+SMillerDev@users.noreply.github.com> | docs/README.md | @@ -43,7 +43,7 @@
- [Deprecating, Disabling, and Removing Formulae](Deprecating-Disabling-and-Removing-Formulae.md)
- [Node for Formula Authors](Node-for-Formula-Authors.md)
- [Python for Formula Authors](Python-for-Formula-Authors.md)
-- [Brew Livecheck](Brew-Livecheck.md)
+- [`brew livecheck`](Brew-Livecheck.md)
... | true |
Other | Homebrew | brew | 94f900ea87f30461730ce3ca0065ef582e180c29.json | docs: add brew livecheck documentation | docs/Brew-Livecheck.md | @@ -0,0 +1,115 @@
+# Brew Livecheck
+
+**NOTE: This document is a work in progress and will be revised and expanded as time permits.**
+
+**NOTE: `livecheck` blocks are currently found in separate files in the [Homebrew/homebrew-livecheck](https://github.com/Homebrew/homebrew-livecheck) repository's `Livecheckables` fo... | true |
Other | Homebrew | brew | 94f900ea87f30461730ce3ca0065ef582e180c29.json | docs: add brew livecheck documentation | docs/README.md | @@ -43,6 +43,7 @@
- [Deprecating, Disabling, and Removing Formulae](Deprecating-Disabling-and-Removing-Formulae.md)
- [Node for Formula Authors](Node-for-Formula-Authors.md)
- [Python for Formula Authors](Python-for-Formula-Authors.md)
+- [Brew Livecheck](Brew-Livecheck.md)
- [Migrating A Formula To A Tap](Migratin... | true |
Other | Homebrew | brew | e7b369273a9b23f0674491fe33a8d3aaf197c292.json | completions: link official taps automatically | Library/Homebrew/cmd/update-report.rb | @@ -8,7 +8,6 @@
require "cleanup"
require "description_cache_store"
require "cli/parser"
-require "completions"
module Homebrew
extend T::Sig
@@ -151,15 +150,6 @@ def update_report
puts "Already up-to-date." unless args.quiet?
end
- if Completions.read_completions_option.empty?
- ohai "Ho... | true |
Other | Homebrew | brew | e7b369273a9b23f0674491fe33a8d3aaf197c292.json | completions: link official taps automatically | Library/Homebrew/completions.rb | @@ -11,43 +11,69 @@ module Completions
module_function
- sig { params(command: String).void }
- def link_if_allowed!(command: "brew completions link")
- if link_completions?
- link! command: command
- else
- unlink!
- end
- end
-
- sig { params(command: String).void }
- def link!(command:... | true |
Other | Homebrew | brew | e7b369273a9b23f0674491fe33a8d3aaf197c292.json | completions: link official taps automatically | Library/Homebrew/tap.rb | @@ -2,6 +2,7 @@
# frozen_string_literal: true
require "commands"
+require "completions"
require "extend/cachable"
require "description_cache_store"
@@ -340,7 +341,13 @@ def install(full_clone: true, quiet: false, clone_target: nil, force_auto_update
def link_completions_and_manpages
command = "brew tap ... | true |
Other | Homebrew | brew | e7b369273a9b23f0674491fe33a8d3aaf197c292.json | completions: link official taps automatically | Library/Homebrew/test/cmd/completions_spec.rb | @@ -18,11 +18,5 @@
.to output(/Completions are linked/).to_stdout
.and not_to_output.to_stderr
.and be_a_success
-
- brew "completions", "unlink"
- expect { brew "completions" }
- .to output(/Completions are not linked/).to_stdout
- .and not_to_output.to_stderr
- .and be_a_success
... | true |
Other | Homebrew | brew | e7b369273a9b23f0674491fe33a8d3aaf197c292.json | completions: link official taps automatically | Library/Homebrew/test/tap_spec.rb | @@ -88,6 +88,7 @@ def setup_completion(link:)
HOMEBREW_REPOSITORY.cd do
system "git", "init"
system "git", "config", "--replace-all", "homebrew.linkcompletions", link
+ system "git", "config", "--replace-all", "homebrew.completionsmessageshown", "yes"
end
end
@@ -316,11 +317,11 @@ def ... | true |
Other | Homebrew | brew | e7b369273a9b23f0674491fe33a8d3aaf197c292.json | completions: link official taps automatically | Library/Homebrew/utils/link.rb | @@ -1,8 +1,6 @@
# typed: true
# frozen_string_literal: true
-require "completions"
-
module Utils
# Helper functions for creating symlinks.
#
@@ -66,11 +64,6 @@ def unlink_manpages(path)
end
def link_completions(path, command)
- unless Completions.link_completions?
- unlink_completion... | true |
Other | Homebrew | brew | e7b369273a9b23f0674491fe33a8d3aaf197c292.json | completions: link official taps automatically | docs/Shell-Completion.md | @@ -4,10 +4,10 @@ Homebrew comes with completion definitions for the `brew` command. Some packages
`zsh`, `bash` and `fish` are currently supported.
-Shell completions for built-in Homebrew commands are not automatically installed. To opt-in to using our completions, they need to be linked to `HOMEBREW_PREFIX` by ... | true |
Other | Homebrew | brew | c56fff39280b6d059f72cdf999f93d705d045c10.json | cmd/prof: raise error when cmd is bash file | Library/Homebrew/brew.rb | @@ -131,8 +131,6 @@ class MissingEnvironmentVariables < RuntimeError; end
end
exec "brew-#{cmd}", *ARGV
else
- raise "command made by bash not ruby: #{cmd}" if Commands.only_bash_command_list.include?(cmd)
-
possible_tap = OFFICIAL_CMD_TAPS.find { |_, cmds| cmds.include?(cmd) }
possible_tap = ... | true |
Other | Homebrew | brew | c56fff39280b6d059f72cdf999f93d705d045c10.json | cmd/prof: raise error when cmd is bash file | Library/Homebrew/commands.rb | @@ -197,8 +197,4 @@ def rebuild_commands_completion_list
file = HOMEBREW_CACHE/"all_commands_list.txt"
file.atomic_write("#{commands(aliases: true).sort.join("\n")}\n")
end
-
- def only_bash_command_list
- internal_commands.reject { |cmd| valid_internal_cmd?(cmd) }
- end
end | true |
Other | Homebrew | brew | c56fff39280b6d059f72cdf999f93d705d045c10.json | cmd/prof: raise error when cmd is bash file | Library/Homebrew/dev-cmd/prof.rb | @@ -26,6 +26,8 @@ def prof
brew_rb = (HOMEBREW_LIBRARY_PATH/"brew.rb").resolved_path
FileUtils.mkdir_p "prof"
+ cmd = args.named.first
+ raise UsageError, "#{cmd} is a Bash command!" if Commands.path(cmd).extname == ".sh"
if args.stackprof?
Homebrew.install_gem_setup_path! "stackprof" | true |
Other | Homebrew | brew | 9f9903f80de9f9701ef7dec4b52e0cf93890bc90.json | Publish API for `Stdenv`.
`@private` hides classes from documentation altogether, while `@api
private` merely marks it as a private API. | Library/Homebrew/extend/ENV/std.rb | @@ -4,7 +4,7 @@
require "hardware"
require "extend/ENV/shared"
-# @private
+# @api private
module Stdenv
extend T::Sig
| false |
Other | Homebrew | brew | ce45868973620a1fed4505e0fc9c2f9a928bdff0.json | Improve documentation and add type signatures. | Library/Homebrew/formula.rb | @@ -67,15 +67,6 @@ class Formula
extend Predicable
# @!method inreplace(paths, before = nil, after = nil)
- # Actually implemented in {Utils::Inreplace.inreplace}.
- # Sometimes we have to change a bit before we install. Mostly we
- # prefer a patch but if you need the `prefix` of this formula in the
- # pa... | true |
Other | Homebrew | brew | ce45868973620a1fed4505e0fc9c2f9a928bdff0.json | Improve documentation and add type signatures. | Library/Homebrew/utils/inreplace.rb | @@ -23,14 +23,22 @@ def initialize(errors)
module_function
# Sometimes we have to change a bit before we install. Mostly we
- # prefer a patch but if you need the `prefix` of this formula in the
- # patch you have to resort to `inreplace`, because in the patch
- # you don't have access to any var d... | true |
Other | Homebrew | brew | ce45868973620a1fed4505e0fc9c2f9a928bdff0.json | Improve documentation and add type signatures. | docs/Bottles.md | @@ -33,7 +33,6 @@ A full example:
```ruby
bottle do
root_url "https://example.com"
- prefix "/opt/homebrew"
cellar "/opt/homebrew/Cellar"
rebuild 4
sha256 "4921af80137af9cc3d38fd17c9120da882448a090b0a8a3a19af3199b415bfca" => :sierra
@@ -50,10 +49,6 @@ By default this is omitted and the Homebrew default b... | true |
Other | Homebrew | brew | bed16128cc73b9a18f1a5b5b26d4f30e095fdb29.json | completions: fix usage text | Library/Homebrew/cmd/completions.rb | @@ -15,7 +15,7 @@ def completions_args
usage_banner <<~EOS
`completions` [<subcommand>]
- Control whether Homebrew automatically links shell files.
+ Control whether Homebrew automatically links shell completion files.
Read more at <https://docs.brew.sh/Shell-Completion>.
... | true |
Other | Homebrew | brew | bed16128cc73b9a18f1a5b5b26d4f30e095fdb29.json | completions: fix usage text | docs/Manpage.md | @@ -96,7 +96,7 @@ Show lists of built-in and external commands.
### `completions` [*`subcommand`*]
-Control whether Homebrew automatically links shell files.
+Control whether Homebrew automatically links shell completion files.
Read more at <https://docs.brew.sh/Shell-Completion>.
`brew completions` [`state`] | true |
Other | Homebrew | brew | bed16128cc73b9a18f1a5b5b26d4f30e095fdb29.json | completions: fix usage text | manpages/brew.1 | @@ -94,7 +94,7 @@ List only the names of commands without category headers\.
Include aliases of internal commands\.
.
.SS "\fBcompletions\fR [\fIsubcommand\fR]"
-Control whether Homebrew automatically links shell files\. Read more at \fIhttps://docs\.brew\.sh/Shell\-Completion\fR\.
+Control whether Homebrew automati... | true |
Other | Homebrew | brew | 2ebfb4221cac250ba31c07fadd7aadd1c9c6594b.json | utils/ast: add `FormulaAST` class | Library/Homebrew/dev-cmd/bottle.rb | @@ -493,22 +493,22 @@ def merge(args:)
require "utils/ast"
path = Pathname.new((HOMEBREW_REPOSITORY/bottle_hash["formula"]["path"]).to_s)
- checksums = old_checksums(path, bottle_hash, args: args)
+ formula = Formulary.factory(path)
+ formula_ast = Utils::AST::FormulaAST.new(pat... | true |
Other | Homebrew | brew | 2ebfb4221cac250ba31c07fadd7aadd1c9c6594b.json | utils/ast: add `FormulaAST` class | Library/Homebrew/dev-cmd/bump-revision.rb | @@ -52,14 +52,13 @@ def bump_revision
Homebrew.install_bundler_gems!
require "utils/ast"
- Utils::Inreplace.inreplace(formula.path) do |s|
- s = s.inreplace_string
- if current_revision.zero?
- Utils::AST.add_formula_stanza!(s, :revision, new_revision)
- ... | true |
Other | Homebrew | brew | 2ebfb4221cac250ba31c07fadd7aadd1c9c6594b.json | utils/ast: add `FormulaAST` class | Library/Homebrew/test/utils/ast_spec.rb | @@ -3,9 +3,9 @@
require "utils/ast"
-describe Utils::AST do
- let(:initial_formula) do
- <<~RUBY
+describe Utils::AST::FormulaAST do
+ subject(:formula_ast) do
+ described_class.new <<~RUBY
class Foo < Formula
url "https://brew.sh/foo-1.0.tar.gz"
license all_of: [
@@ -17,11 +17,10 ... | true |
Other | Homebrew | brew | 2ebfb4221cac250ba31c07fadd7aadd1c9c6594b.json | utils/ast: add `FormulaAST` class | Library/Homebrew/utils/ast.rb | @@ -13,12 +13,28 @@ module AST
SendNode = RuboCop::AST::SendNode
BlockNode = RuboCop::AST::BlockNode
ProcessedSource = RuboCop::AST::ProcessedSource
+ TreeRewriter = Parser::Source::TreeRewriter
- class << self
+ # Helper class for editing formulae.
+ #
+ # @api private
+ class Formul... | true |
Other | Homebrew | brew | 2ebfb4221cac250ba31c07fadd7aadd1c9c6594b.json | utils/ast: add `FormulaAST` class | Library/Homebrew/utils/ast.rbi | @@ -0,0 +1,7 @@
+# typed: strict
+
+module Utils
+ module AST
+ include ::Kernel
+ end
+end | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.