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 | eedd108acec7e94724b226c85e7c651d9b9623ae.json | PageMatch: Return fetched content in match_data
If we want caching to work in the `Xorg` strategy, it's necessary to
pass fetched content back in the `match_data` hash. | Library/Homebrew/livecheck/strategy/page_match.rb | @@ -92,7 +92,7 @@ def self.find_versions(url, regex, provided_content = nil, &block)
provided_content
else
match_data.merge!(Strategy.page_content(url))
- match_data.delete(:content)
+ match_data[:content]
end
return match_data if content.... | false |
Other | Homebrew | brew | 9bc1326ac2b8a509d7bed4f6f44848a3e0f0c98c.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 | @@ -7851,6 +7851,11 @@ class Homebrew::Livecheck::Strategy::HeaderMatch
extend ::T::Private::Methods::SingletonMethodHooks
end
+class Homebrew::Livecheck::Strategy::PageMatch
+ extend ::T::Private::Methods::MethodHooks
+ extend ::T::Private::Methods::SingletonMethodHooks
+end
+
class Homebrew::Livecheck::Strat... | false |
Other | Homebrew | brew | a0e663d833f9a320cd50ab63d6b904b4fdd5f51b.json | update: show either changelog or release noted link | Library/Homebrew/cmd/update-report.rb | @@ -89,8 +89,7 @@ def update_report
puts "Updated Homebrew from #{shorten_revision(initial_revision)} to #{shorten_revision(current_revision)}."
updated = true
- tag = Utils.safe_popen_read("git", "tag", "--points-at", "HEAD")
- new_repository_version = tag.chomp if tag.present?
+ new_rep... | false |
Other | Homebrew | brew | 13e0188187056c5f0523fdd13a5c26a085f8c61d.json | bottle_spec: reduce code duplication in tests | Library/Homebrew/test/dev-cmd/bottle_spec.rb | @@ -196,6 +196,7 @@ def stub_hash(parameters)
end
describe "brew bottle --merge", :integration_test, :needs_linux do
+ let(:core_tap) { CoreTap.new }
let(:tarball) do
if OS.linux?
TEST_FIXTURE_DIR/"tarballs/testball-0.1-linux.tbz"
@@ -204,67 +205,60 @@ def stub_hash(parameters)
end
end
+ ... | false |
Other | Homebrew | brew | 88843d2e437ba7d46c6e39659c4d07863f490deb.json | Livecheck: Fix final url spacing in debug output | Library/Homebrew/livecheck/livecheck.rb | @@ -524,7 +524,7 @@ def latest_version(formula_or_cask, json: false, full_name: false, verbose: fals
if debug
puts "URL (strategy): #{strategy_data[:url]}" if strategy_data[:url] != url
- puts "URL (final): #{strategy_data[:final_url]}" if strategy_data[:final_url]
+ puts "UR... | false |
Other | Homebrew | brew | 27ffa4e6e02d1108393e50b728712af74cf6b7ef.json | audit: fix prerelease audit | Library/Homebrew/utils/shared_audits.rb | @@ -43,7 +43,9 @@ def github_release(user, repo, tag, formula: nil, cask: nil)
return "#{tag} is a GitHub pre-release." if release["prerelease"] && [version, "all"].exclude?(exception)
- return "#{tag} is not a GitHub pre-release but '#{name}' is in the GitHub prerelease allowlist." if exception
+ if !re... | false |
Other | Homebrew | brew | 174645fb9576c805c4900b1ff42aaf4174567a18.json | test/rubocops: improve test descriptions | Library/Homebrew/test/rubocops/caveats_spec.rb | @@ -6,8 +6,8 @@
describe RuboCop::Cop::FormulaAudit::Caveats do
subject(:cop) { described_class.new }
- context "When auditing caveats" do
- it "When there is setuid mentioned in caveats" do
+ context "when auditing `caveats`" do
+ it "reports an offense if `setuid` is mentioned" do
expect_offense(... | true |
Other | Homebrew | brew | 174645fb9576c805c4900b1ff42aaf4174567a18.json | test/rubocops: improve test descriptions | Library/Homebrew/test/rubocops/checksum_spec.rb | @@ -6,8 +6,8 @@
describe RuboCop::Cop::FormulaAudit::Checksum do
subject(:cop) { described_class.new }
- context "When auditing spec checksums" do
- it "When the checksum is empty" do
+ context "when auditing spec checksums" do
+ it "reports an offense if a checksum is empty" do
expect_offense(<<~R... | true |
Other | Homebrew | brew | 174645fb9576c805c4900b1ff42aaf4174567a18.json | test/rubocops: improve test descriptions | Library/Homebrew/test/rubocops/components_redundancy_spec.rb | @@ -6,8 +6,8 @@
describe RuboCop::Cop::FormulaAudit::ComponentsRedundancy do
subject(:cop) { described_class.new }
- context "When auditing formula components common errors" do
- it "When url outside stable block" do
+ context "when auditing formula components" do
+ it "reports an offense if `url` is outs... | true |
Other | Homebrew | brew | 174645fb9576c805c4900b1ff42aaf4174567a18.json | test/rubocops: improve test descriptions | Library/Homebrew/test/rubocops/conflicts_spec.rb | @@ -6,8 +6,8 @@
describe RuboCop::Cop::FormulaAudit::Conflicts do
subject(:cop) { described_class.new }
- context "When auditing conflicts_with" do
- it "conflicts_with reason is capitalized" do
+ context "when auditing `conflicts_with`" do
+ it "reports an offense if reason is capitalized" do
expe... | true |
Other | Homebrew | brew | 174645fb9576c805c4900b1ff42aaf4174567a18.json | test/rubocops: improve test descriptions | Library/Homebrew/test/rubocops/dependency_order_spec.rb | @@ -6,8 +6,8 @@
describe RuboCop::Cop::FormulaAudit::DependencyOrder do
subject(:cop) { described_class.new }
- context "uses_from_macos" do
- it "wrong conditional uses_from_macos order" do
+ context "when auditing `uses_from_macos`" do
+ it "reports an offense if wrong conditional order" do
expec... | true |
Other | Homebrew | brew | 174645fb9576c805c4900b1ff42aaf4174567a18.json | test/rubocops: improve test descriptions | Library/Homebrew/test/rubocops/deprecate_disable_spec.rb | @@ -6,8 +6,8 @@
describe RuboCop::Cop::FormulaAudit::DeprecateDisableDate do
subject(:cop) { described_class.new }
- context "When auditing formula for deprecate! date:" do
- it "deprecation date is not ISO 8601 compliant" do
+ context "when auditing `deprecate!`" do
+ it "reports an offense if `date` is ... | true |
Other | Homebrew | brew | 9acbc6c3f4847a1c48f244fa77ec60244abe1c33.json | bump-cask-pr: ignore closed duplicate PRs | Library/Homebrew/dev-cmd/bump-cask-pr.rb | @@ -88,10 +88,6 @@ def bump_cask_pr
check_open_pull_requests(cask, tap_full_name, args: args)
- if new_version.present? && !new_version.latest?
- check_closed_pull_requests(cask, tap_full_name, version: new_version, args: args)
- end
-
old_contents = File.read(cask.sourcefile_path)
repla... | false |
Other | Homebrew | brew | 1d710047a5e4e4ab5e8855f6aa6a3394b386573d.json | formula: add more tests for `shared_library` | Library/Homebrew/test/os/linux/formula_spec.rb | @@ -107,6 +107,12 @@
f = Testball.new
expect(f.shared_library("foobar")).to eq("foobar.so")
expect(f.shared_library("foobar", 2)).to eq("foobar.so.2")
+ expect(f.shared_library("foobar", nil)).to eq("foobar.so")
+ expect(f.shared_library("foobar", "*")).to eq("foobar.so{,.*}")
+ expe... | true |
Other | Homebrew | brew | 1d710047a5e4e4ab5e8855f6aa6a3394b386573d.json | formula: add more tests for `shared_library` | Library/Homebrew/test/os/mac/formula_spec.rb | @@ -112,6 +112,12 @@
f = Testball.new
expect(f.shared_library("foobar")).to eq("foobar.dylib")
expect(f.shared_library("foobar", 2)).to eq("foobar.2.dylib")
+ expect(f.shared_library("foobar", nil)).to eq("foobar.dylib")
+ expect(f.shared_library("foobar", "*")).to eq("foobar{,.*}.dylib")... | true |
Other | Homebrew | brew | d7323f30d3ce781519044585fab2b030e29b3efb.json | extend/os/mac/extend/ENV: fix pkg-config paths | Library/Homebrew/extend/os/mac/extend/ENV/std.rb | @@ -7,7 +7,7 @@ module Stdenv
undef homebrew_extra_pkg_config_paths
def homebrew_extra_pkg_config_paths
- ["#{HOMEBREW_LIBRARY}/Homebrew/os/mac/pkgconfig/#{MacOS.sdk_version}"]
+ ["#{HOMEBREW_LIBRARY}/Homebrew/os/mac/pkgconfig/#{MacOS.version}"]
end
def setup_build_environment(formula: nil, cc: ni... | true |
Other | Homebrew | brew | d7323f30d3ce781519044585fab2b030e29b3efb.json | extend/os/mac/extend/ENV: fix pkg-config paths | Library/Homebrew/extend/os/mac/extend/ENV/super.rb | @@ -34,7 +34,7 @@ def homebrew_extra_paths
# @private
def homebrew_extra_pkg_config_paths
paths = \
- ["/usr/lib/pkgconfig", "#{HOMEBREW_LIBRARY}/Homebrew/os/mac/pkgconfig/#{MacOS.sdk_version}"]
+ ["/usr/lib/pkgconfig", "#{HOMEBREW_LIBRARY}/Homebrew/os/mac/pkgconfig/#{MacOS.version}"]
paths <<... | true |
Other | Homebrew | brew | b02acb37c080a6f697a6b534bdc768bf4d8ce6c9.json | Remove warning on ARM | Library/Homebrew/extend/os/mac/diagnostic.rb | @@ -63,7 +63,6 @@ def fatal_setup_build_environment_checks
def supported_configuration_checks
%w[
- check_for_unsupported_arch
check_for_unsupported_macos
].freeze
end
@@ -91,18 +90,6 @@ def check_for_non_prefixed_findutils
nil
end
- def check... | true |
Other | Homebrew | brew | b02acb37c080a6f697a6b534bdc768bf4d8ce6c9.json | Remove warning on ARM | Library/Homebrew/install.rb | @@ -51,11 +51,6 @@ def check_prefix
end
def check_cpu
- return if Hardware::CPU.intel? && Hardware::CPU.is_64_bit?
-
- # Handled by check_for_unsupported_arch in extend/os/mac/diagnostic.rb
- return if Hardware::CPU.arm?
-
return unless Hardware::CPU.ppc?
odie <<~EOS | true |
Other | Homebrew | brew | 42ae6adcbe56043f443bec3e42a3b27a9405a878.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/gems/rspec-github@2.3.1.rbi | @@ -0,0 +1,8 @@
+# DO NOT EDIT MANUALLY
+# This is an autogenerated file for types exported from the `rspec-github` gem.
+# Please instead update this file by running `tapioca sync`.
+
+# typed: true
+
+# THIS IS AN EMPTY RBI FILE.
+# see https://github.com/Shopify/tapioca/blob/master/README.md#manual-gem-requires | true |
Other | Homebrew | brew | 42ae6adcbe56043f443bec3e42a3b27a9405a878.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 | @@ -21869,9 +21869,36 @@ module RSpec::Expectations
def self.fail_with(message, expected=T.unsafe(nil), actual=T.unsafe(nil)); end
end
+module RSpec::Github
+ VERSION = ::T.let(nil, ::T.untyped)
+end
+
+class RSpec::Github::Formatter
+ def example_failed(failure); end
+
+ def example_pending(pending); end
+end... | true |
Other | Homebrew | brew | 9fd2319afa9ad3c40b365bff7e5668f640aed82b.json | update-report: add links to changelog and blog | Library/Homebrew/cmd/update-report.rb | @@ -78,6 +78,7 @@ def update_report
install_core_tap_if_necessary
updated = false
+ new_repository_version = nil
initial_revision = ENV["HOMEBREW_UPDATE_BEFORE"].to_s
current_revision = ENV["HOMEBREW_UPDATE_AFTER"].to_s
@@ -87,6 +88,9 @@ def update_report
update_preinstall_header args:... | false |
Other | Homebrew | brew | 76c69b7bb35077bbb94c8f6337bc1899b2b71b63.json | release-notes: add message directing users to the blog. | Library/Homebrew/dev-cmd/release-notes.rb | @@ -58,6 +58,7 @@ def release_notes
end
$stderr.puts "Release notes between #{previous_tag} and #{end_ref}:"
+ puts "Release notes for major and minor releases can be found in the [Homebrew blog](https://brew.sh/blog/)."
puts output
end
end | false |
Other | Homebrew | brew | c77c9422915773c33c33ebba0d913c4f5ca29c57.json | os/mac/sdk: parse version from SDKSettings.json
This implements feedback from https://github.com/Homebrew/brew/pull/10072. | Library/Homebrew/os/mac/sdk.rb | @@ -93,10 +93,11 @@ def sdk_paths
# Use unversioned SDK path on Big Sur to avoid issues such as:
# https://github.com/Homebrew/homebrew-core/issues/67075
- if OS::Mac.version >= :big_sur
- sdk_path = File.join(sdk_prefix, "MacOSX.sdk")
- version = OS::Mac... | false |
Other | Homebrew | brew | 0b574eff9050853d687f6fdd5d791b25b18d4a33.json | search: add two options | Library/Homebrew/cmd/search.rb | @@ -51,7 +51,13 @@ def search_args
"a name matching <text>."
switch "--pull-request",
description: "Search for GitHub pull requests containing <text>."
-
+ switch "--open",
+ depends_on: "--pull-request",
+ description: "Search for only open ... | true |
Other | Homebrew | brew | 0b574eff9050853d687f6fdd5d791b25b18d4a33.json | search: add two options | Library/Homebrew/utils/github.rb | @@ -342,8 +342,8 @@ def merge_pull_request(repo, number:, sha:, merge_method:, commit_message: nil)
open_api(url, data: data, request_method: :PUT, scopes: CREATE_ISSUE_FORK_OR_PR_SCOPES)
end
- def print_pull_requests_matching(query)
- open_or_closed_prs = search_issues(query, type: "pr", user: "Homebrew"... | true |
Other | Homebrew | brew | 0b574eff9050853d687f6fdd5d791b25b18d4a33.json | search: add two options | docs/Manpage.md | @@ -486,6 +486,10 @@ No online search is performed.
Search for formulae with a description matching *`text`* and casks with a name matching *`text`*.
* `--pull-request`:
Search for GitHub pull requests containing *`text`*.
+* `--open`:
+ Search for only open GitHub pull requests
+* `--closed`:
+ Search for onl... | true |
Other | Homebrew | brew | 0b574eff9050853d687f6fdd5d791b25b18d4a33.json | search: add two options | manpages/brew.1 | @@ -667,6 +667,14 @@ Search for formulae with a description matching \fItext\fR and casks with a name
Search for GitHub pull requests containing \fItext\fR\.
.
.TP
+\fB\-\-open\fR
+Search for only open GitHub pull requests
+.
+.TP
+\fB\-\-closed\fR
+Search for only closed GitHub pull requests
+.
+.TP
\fB\-\-macport... | true |
Other | Homebrew | brew | 2eb34b0b27160ed26f46594ff21bd2a629176398.json | formula: add deprecation_date and disable_date methods | Library/Homebrew/formula.rb | @@ -1165,6 +1165,12 @@ def link_overwrite?(path)
# @return [Boolean]
delegate deprecated?: :"self.class"
+ # The date that this {Formula} was or becomes deprecated.
+ # Returns `nil` if no date is specified.
+ # @!method deprecation_date
+ # @return Date
+ delegate deprecation_date: :"self.class"
+
# Th... | false |
Other | Homebrew | brew | aaf7bc2bc5533f2ab177374193ad260f97b79985.json | utils: add AST helper functions for editing formulae | Library/Homebrew/test/utils/ast_spec.rb | @@ -0,0 +1,50 @@
+# typed: false
+# frozen_string_literal: true
+
+require "utils/ast"
+
+describe Utils::AST do
+ let(:initial_formula) do
+ <<~RUBY
+ class Foo < Formula
+ url "https://brew.sh/foo-1.0.tar.gz"
+ license all_of: [
+ :public_domain,
+ "MIT",
+ "GPL-3.0-o... | true |
Other | Homebrew | brew | aaf7bc2bc5533f2ab177374193ad260f97b79985.json | utils: add AST helper functions for editing formulae | Library/Homebrew/utils/ast.rb | @@ -0,0 +1,122 @@
+# typed: true
+# frozen_string_literal: true
+
+module Utils
+ # Helper functions for editing Ruby files.
+ #
+ # @api private
+ module AST
+ class << self
+ extend T::Sig
+
+ def replace_formula_stanza!(formula_contents, name:, replacement:, type: nil)
+ processed_source, bod... | true |
Other | Homebrew | brew | aaf7bc2bc5533f2ab177374193ad260f97b79985.json | utils: add AST helper functions for editing formulae | Library/Homebrew/utils/bottles.rb | @@ -2,6 +2,7 @@
# frozen_string_literal: true
require "tab"
+require "utils/ast"
module Utils
# Helper functions for bottles.
@@ -76,75 +77,10 @@ def formula_contents(bottle_file,
end
def add_bottle_stanza!(formula_contents, bottle_output)
- Homebrew.install_bundler_gems!
- requi... | true |
Other | Homebrew | brew | 668f0475eb59e4edc594481e0651f2eca598157a.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 | @@ -30099,6 +30099,10 @@ class String
def html_safe(); end
+ def indent(amount, indent_string=T.unsafe(nil), indent_empty_lines=T.unsafe(nil)); end
+
+ def indent!(amount, indent_string=T.unsafe(nil), indent_empty_lines=T.unsafe(nil)); end
+
def iseuc(); end
def isjis(); end | false |
Other | Homebrew | brew | 095798be405be47429877f9d92f416153f86e147.json | hardware: optimize Big Sur bottles for Ivy Bridge | Library/Homebrew/extend/os/mac/hardware.rb | @@ -7,6 +7,8 @@ module Hardware
def self.oldest_cpu(version = MacOS.version)
if CPU.arch == :arm64
:arm_vortex_tempest
+ elsif version >= :big_sur
+ :ivybridge
elsif version >= :mojave
:nehalem
else | true |
Other | Homebrew | brew | 095798be405be47429877f9d92f416153f86e147.json | hardware: optimize Big Sur bottles for Ivy Bridge | Library/Homebrew/hardware.rb | @@ -26,8 +26,9 @@ class << self
def optimization_flags
@optimization_flags ||= {
native: arch_flag("native"),
- nehalem: "-march=nehalem",
+ ivybridge: "-march=ivybridge",
sandybridge: "-march=sandybridge",
+ nehalem... | true |
Other | Homebrew | brew | 4afcae58c30a6055831cb1f3d26e79242b39c4e4.json | bottle: add test for writing part
In preparation for https://github.com/Homebrew/brew/issues/9315 | Library/Homebrew/test/.rubocop_todo.yml | @@ -11,6 +11,7 @@
RSpec/ExampleLength:
Exclude:
- 'rubocops/patches_spec.rb'
+ - 'dev-cmd/bottle_spec.rb'
# Offense count: 6
# Configuration parameters: AssignmentOnly. | true |
Other | Homebrew | brew | 4afcae58c30a6055831cb1f3d26e79242b39c4e4.json | bottle: add test for writing part
In preparation for https://github.com/Homebrew/brew/issues/9315 | Library/Homebrew/test/dev-cmd/bottle_spec.rb | @@ -42,39 +42,39 @@
end
end
+def stub_hash(parameters)
+ <<~EOS
+ {
+ "#{parameters[:name]}":{
+ "formula":{
+ "pkg_version":"#{parameters[:version]}",
+ "path":"#{parameters[:path]}"
+ },
+ "bottle":{
+ "root_url":"#{HOMEBREW_BOTTLE_DEFAULT_DOMAIN... | true |
Other | Homebrew | brew | 722a040c49f20952aeade6d5737bbffa2e4f75e8.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 | @@ -7827,6 +7827,22 @@ class Homebrew::FormulaCreator
extend ::T::Private::Methods::SingletonMethodHooks
end
+class Homebrew::Livecheck::Strategy::HeaderMatch
+ extend ::T::Private::Methods::MethodHooks
+ extend ::T::Private::Methods::SingletonMethodHooks
+end
+
+class Homebrew::Livecheck::Strategy::Sparkle::It... | false |
Other | Homebrew | brew | cdb07d89ae54468d66a3f6948c937b00a3bbcdf0.json | integration_test: fix indentation for test formulae | Library/Homebrew/global.rb | @@ -29,6 +29,7 @@
require "active_support/core_ext/file/atomic"
require "active_support/core_ext/enumerable"
require "active_support/core_ext/string/exclude"
+require "active_support/core_ext/string/indent"
I18n.backend.available_locales # Initialize locales so they can be overwritten.
I18n.backend.store_transla... | true |
Other | Homebrew | brew | cdb07d89ae54468d66a3f6948c937b00a3bbcdf0.json | integration_test: fix indentation for test formulae | Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb | @@ -171,7 +171,7 @@ def install
Formulary.core_path(name).tap do |formula_path|
formula_path.write <<~RUBY
class #{Formulary.class_s(name)} < Formula
- #{content}
+ #{content.indent(2)}
end
RUBY
end | true |
Other | Homebrew | brew | cdb07d89ae54468d66a3f6948c937b00a3bbcdf0.json | integration_test: fix indentation for test formulae | Library/Homebrew/test/utils/bottles/bottles_spec.rb | @@ -17,8 +17,6 @@
describe "#add_bottle_stanza!" do
let(:bottle_output) do
- require "active_support/core_ext/string/indent"
-
<<~RUBY.chomp.indent(2)
bottle do
sha256 "f7b1fc772c79c20fddf621ccc791090bc1085fcef4da6cca03399424c66e06ca" => :sierra | true |
Other | Homebrew | brew | 8b17017108d5b550562b556c5d407361cea27781.json | Improve error message for missing PKG source. | Library/Homebrew/cask/artifact/pkg.rb | @@ -42,7 +42,14 @@ def run_installer(command: nil, verbose: false, **_options)
ohai "Running installer for #{cask}; your password may be necessary."
ohai "Package installers may write to any location; options such as --appdir are ignored."
unless path.exist?
- raise CaskError, "pkg s... | false |
Other | Homebrew | brew | 82c1e6fb0ebeb5bb34f03c1ef1b4cd482515f76c.json | Fix basename for extracting cask downloads. | Library/Homebrew/cask/download.rb | @@ -52,6 +52,10 @@ def cached_download
downloader.cached_location
end
+ def basename
+ downloader.basename
+ end
+
def verify_download_integrity(fn)
if @cask.sha256 == :no_check
opoo "No checksum defined for cask '#{@cask}', skipping verification." | true |
Other | Homebrew | brew | 82c1e6fb0ebeb5bb34f03c1ef1b4cd482515f76c.json | Fix basename for extracting cask downloads. | Library/Homebrew/cask/installer.rb | @@ -152,10 +152,14 @@ def summary
s.freeze
end
+ sig { returns(Download) }
+ def downloader
+ @downloader ||= Download.new(@cask, quarantine: quarantine?)
+ end
+
sig { returns(Pathname) }
def download
- @download ||= Download.new(@cask, quarantine: quarantine?)
- ... | true |
Other | Homebrew | brew | 3f0ed01a2aeceb9fbe8ff410a170d7f30b7936e4.json | sdk: use unversioned SDK path on Big Sur
Fixes https://github.com/Homebrew/homebrew-core/issues/67075.
This implements @fxcoudert's suggestion in the issue linked above. | Library/Homebrew/os/mac/sdk.rb | @@ -91,6 +91,14 @@ def sdk_paths
paths[OS::Mac::Version.new(version)] = sdk_path if version.present?
end
+ # Use unversioned SDK path on Big Sur to avoid issues such as:
+ # https://github.com/Homebrew/homebrew-core/issues/67075
+ if OS::Mac.version >= :big... | false |
Other | Homebrew | brew | bade687f118ecd857a5fa843a00160ceb9699f90.json | upgrade: fix style in help text | Library/Homebrew/cmd/upgrade.rb | @@ -39,7 +39,7 @@ def upgrade_args
description: "Show what would be upgraded, but do not actually upgrade anything."
[
[:switch, "--formula", "--formulae", {
- description: "Treat all named arguments as formulae. If no named arguments" \
+ description: "Treat all named ar... | true |
Other | Homebrew | brew | bade687f118ecd857a5fa843a00160ceb9699f90.json | upgrade: fix style in help text | docs/Manpage.md | @@ -612,7 +612,7 @@ upgraded formulae or, every 30 days, for all formulae.
* `-n`, `--dry-run`:
Show what would be upgraded, but do not actually upgrade anything.
* `--formula`:
- Treat all named arguments as formulae. If no named argumentsare specified, upgrade only outdated formulae.
+ Treat all named argument... | true |
Other | Homebrew | brew | bade687f118ecd857a5fa843a00160ceb9699f90.json | upgrade: fix style in help text | manpages/brew.1 | @@ -823,7 +823,7 @@ Show what would be upgraded, but do not actually upgrade anything\.
.
.TP
\fB\-\-formula\fR
-Treat all named arguments as formulae\. If no named argumentsare specified, upgrade only outdated formulae\.
+Treat all named arguments as formulae\. If no named arguments are specified, upgrade only outd... | true |
Other | Homebrew | brew | 9f7e471382d61b5a6ea61c48767271edcedcebe2.json | livecheck: raise error if no watchlist | Library/Homebrew/dev-cmd/livecheck.rb | @@ -96,6 +96,9 @@ def livecheck
rescue Errno::ENOENT => e
onoe e
end
+ else
+ raise UsageError, "ENV['HOMEBREW_LIVECHECK_WATCHLIST'] or ~/.brew_livecheck_watchlist is required " \
+ "if no formula or cask argument is passed"
end&.sort_by do |formu... | false |
Other | Homebrew | brew | e604cf742bf158b9f133c14ac438822326fbbd2e.json | dev-cmd/livecheck: use safe navigation on #sort_by | Library/Homebrew/dev-cmd/livecheck.rb | @@ -60,44 +60,45 @@ def livecheck
puts ENV["HOMEBREW_LIVECHECK_WATCHLIST"] if ENV["HOMEBREW_LIVECHECK_WATCHLIST"].present?
end
- formulae_and_casks_to_check = if args.tap
- tap = Tap.fetch(args.tap)
- formulae = args.cask? ? [] : tap.formula_files.map { |path| Formulary.factory(path) }
- ... | false |
Other | Homebrew | brew | 91ee5e0a6592a45a5b0cdce8a2f00f41f7c84c55.json | Simplify assignment of `curl` result. | Library/Homebrew/livecheck/strategy.rb | @@ -98,13 +98,12 @@ def self.page_headers(url)
"--max-time", "10" # Max time allowed for transfer (secs)
]
- result = curl_with_workarounds(
+ stdout, _, status = curl_with_workarounds(
*args, url,
print_stdout: false, print_stderr: false,
... | false |
Other | Homebrew | brew | edf6a11be601918ae1374124407ea244a35e2824.json | Simplify creation of `merged_headers`. | Library/Homebrew/livecheck/strategy/header_match.rb | @@ -37,8 +37,7 @@ def self.find_versions(url, regex, &block)
headers = Strategy.page_headers(url)
# Merge the headers from all responses into one hash
- merged_headers = {}
- headers.each { |resp_headers| merged_headers.merge!(resp_headers) }
+ merged_headers = headers... | false |
Other | Homebrew | brew | 0148ee870eedc0d850c25fd7c6fb3e0e02893653.json | Livecheck: Use alphabetical order in symbols array | Library/Homebrew/livecheck/livecheck.rb | @@ -29,8 +29,8 @@ module Livecheck
STRATEGY_SYMBOLS_TO_SKIP_PREPROCESS_URL = [
:github_latest,
- :sparkle,
:page_match,
+ :sparkle,
].freeze
UNSTABLE_VERSION_KEYWORDS = %w[ | false |
Other | Homebrew | brew | f5774c1af430b8798b6be7ebb8cffec7ba644549.json | Sparkle: Use demodulized class name in error text | Library/Homebrew/livecheck/strategy/sparkle.rb | @@ -19,7 +19,7 @@ class Sparkle < PageMatch
# Checks the content at the URL for new versions.
sig { params(url: String, regex: T.nilable(Regexp)).returns(T::Hash[Symbol, T.untyped]) }
def self.find_versions(url, regex, &block)
- raise ArgumentError, "The #{NICE_NAME} strategy does no... | false |
Other | Homebrew | brew | 3723cd7decc4d94ad772e3e6948262ceff35ee94.json | Remove detection for Sparkle strategy. | Library/Homebrew/livecheck/strategy/sparkle.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
require "bundle_version"
@@ -11,36 +11,11 @@ module Strategy
# its contents as a Sparkle appcast in XML format.
#
# @api private
- class Sparkle
+ class Sparkle < PageMatch
extend T::Sig
N... | false |
Other | Homebrew | brew | 71759035dd82b40b7ad8a4a1f30e917b4306e6c8.json | Fix Sparkle detection if content type is missing. | Library/Homebrew/livecheck/strategy/sparkle.rb | @@ -26,8 +26,8 @@ def self.match?(url)
xml = url.end_with?(".xml")
xml ||= begin
headers = Strategy.page_headers(url)
- content_type = headers["content-type"]&.split(";", 2)&.first
- ["application/xml", "text/xml"].include?(content_type)
+ content_type... | false |
Other | Homebrew | brew | 0deceac28cf190900ca861f7da27f05cf82f8b61.json | Allow regex without capture groups. | Library/Homebrew/livecheck/strategy/page_match.rb | @@ -61,7 +61,14 @@ def self.page_matches(url, regex, &block)
end
end
- page.scan(regex).map(&:first).uniq
+ page.scan(regex).map do |match|
+ case match
+ when String
+ match
+ else
+ match.first
+ end
+ ... | false |
Other | Homebrew | brew | 3a4c7223df13161c834d85258ba8567c5e55a722.json | Allow accessing version in `livecheck` blocks. | Library/Homebrew/livecheck.rb | @@ -8,6 +8,8 @@
# This information is used by the `brew livecheck` command to control its
# behavior.
class Livecheck
+ extend Forwardable
+
# A very brief description of why the formula/cask is skipped (e.g. `No longer
# developed or maintained`).
# @return [String, nil]
@@ -107,6 +109,9 @@ def url(val = ... | false |
Other | Homebrew | brew | d3e2a98136385197f52f6f979378efed6cdad202.json | Remove debug output. | Library/Homebrew/livecheck/strategy/page_match.rb | @@ -49,8 +49,6 @@ def self.match?(url)
def self.page_matches(url, regex, &block)
page = Strategy.page_contents(url)
- odebug "Page Contents", page
-
if block
data = { page: page }
case (value = block.call(data)) | false |
Other | Homebrew | brew | 605c33c70ce5e57d6a7762afc0c52faf70d4a692.json | Improve matching of Sparkle strategy. | Library/Homebrew/livecheck/strategy.rb | @@ -63,10 +63,11 @@ def from_url(url, livecheck_strategy: nil, url_provided: nil, regex_provided: ni
# Only treat the `PageMatch` strategy as usable if a regex is
# present in the `livecheck` block
next unless regex_provided || block_provided
- elsif strategy == Sparkle &... | false |
Other | Homebrew | brew | 82535696fad17f62c6f82fc4d7f43b9f02225da2.json | Fix code style. | Library/Homebrew/livecheck/strategy/sparkle.rb | @@ -23,10 +23,10 @@ class Sparkle
def self.match?(url)
return false unless url.match?(%r{^https?://})
- xml = url.end_with?('.xml')
+ xml = url.end_with?(".xml")
xml ||= begin
headers = Strategy.page_headers(url)
- content_type = headers["conten... | false |
Other | Homebrew | brew | 8b7f38faf0e770c8446f328364e639e78307f062.json | Fix code style. | Library/Homebrew/livecheck/livecheck.rb | @@ -477,7 +477,7 @@ def latest_version(formula_or_cask, json: false, full_name: false, verbose: fals
livecheck_strategy: livecheck_strategy,
url_provided: livecheck_url.present?,
regex_provided: livecheck_regex.present?,
- block_provided: livecheck.strategy_block.pres... | true |
Other | Homebrew | brew | 8b7f38faf0e770c8446f328364e639e78307f062.json | Fix code style. | Library/Homebrew/livecheck/strategy.rb | @@ -62,7 +62,7 @@ def from_url(url, livecheck_strategy: nil, url_provided: nil, regex_provided: ni
if strategy == PageMatch
# Only treat the `PageMatch` strategy as usable if a regex is
# present in the `livecheck` block
- next unless (regex_provided || block_provided)
+ ... | true |
Other | Homebrew | brew | 775c2fd245c5a2eb9976885778ff91d7b6c66b35.json | Clarify error message. | Library/Homebrew/livecheck/strategy/page_match.rb | @@ -49,6 +49,8 @@ def self.match?(url)
def self.page_matches(url, regex, &block)
page = Strategy.page_contents(url)
+ odebug "Page Contents", page
+
if block
data = { page: page }
case (value = block.call(data))
@@ -57,7 +59,7 @@ def self.page_matches(... | false |
Other | Homebrew | brew | b3c46ba2b931aa8d6e99eaf1733f0349f2c09a19.json | Allow extracting URL in Sparkle strategy. | Library/Homebrew/livecheck.rb | @@ -67,7 +67,9 @@ def skip?
#
# @param symbol [Symbol] symbol for the desired strategy
# @return [Symbol, nil]
- def strategy(symbol = nil)
+ def strategy(symbol = nil, &block)
+ @strategy_block = block if block
+
case symbol
when nil
@strategy
@@ -78,6 +80,8 @@ def strategy(symbol = nil)... | true |
Other | Homebrew | brew | b3c46ba2b931aa8d6e99eaf1733f0349f2c09a19.json | Allow extracting URL in Sparkle strategy. | Library/Homebrew/livecheck/livecheck.rb | @@ -480,7 +480,7 @@ def latest_version(formula_or_cask, json: false, full_name: false, verbose: fals
next if strategy.blank?
- strategy_data = strategy.find_versions(url, livecheck_regex)
+ strategy_data = strategy.find_versions(url, livecheck_regex, &livecheck.strategy_block)
match_... | true |
Other | Homebrew | brew | b3c46ba2b931aa8d6e99eaf1733f0349f2c09a19.json | Allow extracting URL in Sparkle strategy. | Library/Homebrew/livecheck/strategy/sparkle.rb | @@ -1,6 +1,7 @@
# typed: false
# frozen_string_literal: true
+require "bundle_version"
require_relative "page_match"
module Homebrew
@@ -27,7 +28,7 @@ def self.match?(url)
# Checks the content at the URL for new versions.
sig { params(url: String, regex: T.nilable(Regexp)).returns(T::Hash[Sy... | true |
Other | Homebrew | brew | 10b5548eace342387afc97f5a809792dbd94b4b5.json | Fix `page_headers` method for multiple headers. | Library/Homebrew/livecheck/strategy.rb | @@ -83,11 +83,27 @@ def from_url(url, livecheck_strategy: nil, regex_provided: nil)
def self.page_headers(url)
@headers ||= {}
- @headers[url] ||= curl_output("--head", "--location", url).stdout
- .split("\r\n\r\n", 2).first
- ... | false |
Other | Homebrew | brew | c24af82a25f9ce625a81dbe19a93b0242989ae11.json | Add `Sparkle` livecheck strategy. | Library/Homebrew/livecheck/strategy.rb | @@ -112,4 +112,5 @@ def self.page_contents(url)
require_relative "strategy/pypi"
require_relative "strategy/follow_redirection"
require_relative "strategy/sourceforge"
+require_relative "strategy/sparkle"
require_relative "strategy/xorg" | true |
Other | Homebrew | brew | c24af82a25f9ce625a81dbe19a93b0242989ae11.json | Add `Sparkle` livecheck strategy. | Library/Homebrew/livecheck/strategy/sparkle.rb | @@ -0,0 +1,56 @@
+# typed: false
+# frozen_string_literal: true
+
+require_relative "page_match"
+
+module Homebrew
+ module Livecheck
+ module Strategy
+ # The {Sparkle} strategy fetches content at a URL and parses
+ # its contents as a Sparkle appcast in XML format.
+ #
+ # @api private
+ ... | true |
Other | Homebrew | brew | b293acc89bc1dbc1c8bde6c40cd7dd0bc0cc745c.json | Add `FollowRedirection` livecheck strategy. | Library/Homebrew/livecheck/strategy.rb | @@ -110,5 +110,6 @@ def self.page_contents(url)
require_relative "strategy/npm"
require_relative "strategy/page_match"
require_relative "strategy/pypi"
+require_relative "strategy/follow_redirection"
require_relative "strategy/sourceforge"
require_relative "strategy/xorg" | true |
Other | Homebrew | brew | b293acc89bc1dbc1c8bde6c40cd7dd0bc0cc745c.json | Add `FollowRedirection` livecheck strategy. | Library/Homebrew/livecheck/strategy/follow_redirection.rb | @@ -0,0 +1,47 @@
+# typed: false
+# frozen_string_literal: true
+
+require_relative "page_match"
+
+module Homebrew
+ module Livecheck
+ module Strategy
+ # The {FollowRedirection} strategy follows all URL redirections and scans
+ # the final URL for matching text using the provided regex.
+ #
+ ... | true |
Other | Homebrew | brew | aad02c4524199f6e558609dc4b62860783da8d25.json | shared_audits: add xit to GITHUB_PRERELEASE_ALLOWLIST | Library/Homebrew/utils/shared_audits.rb | @@ -46,6 +46,7 @@ def github_release_data(user, repo, tag)
"telegram-cli" => "1.3.1",
"toggl-track" => :all,
"volta" => "0.8.6",
+ "xit" => :all,
}.freeze
def github_release(user, repo, tag, formula: nil, cask: nil) | false |
Other | Homebrew | brew | 27b7713f1ec1f02d184730c44f9289694bb01e9c.json | Expand tests for Curl#curl_args | Library/Homebrew/test/utils/curl_spec.rb | @@ -3,25 +3,61 @@
require "utils/curl"
-describe "curl" do
+describe "Utils::Curl" do
describe "curl_args" do
+ let(:args) { "foo" }
+ let(:user_agent_string) { "Lorem ipsum dolor sit amet" }
+
it "returns --disable as the first argument when HOMEBREW_CURLRC is not set" do
# --disable must be ... | false |
Other | Homebrew | brew | e687774e8adf892b0a955c8bc1d3dfef18788579.json | Curl: Allow option to omit `--retry` in curl_args | Library/Homebrew/utils/curl.rb | @@ -21,7 +21,7 @@ def curl_executable
@curl
end
- def curl_args(*extra_args, show_output: false, user_agent: :default)
+ def curl_args(*extra_args, **options)
args = []
# do not load .curlrc unless requested (must be the first argument)
@@ -31,25 +31,25 @@ def curl_args(*extra_args, ... | false |
Other | Homebrew | brew | 9d92ed868b74cfbacab3a1f082bd5c56b8b4802d.json | Curl: Add debug parameter to curl_with_workarounds | Library/Homebrew/utils/curl.rb | @@ -55,12 +55,13 @@ def curl_args(*extra_args, show_output: false, user_agent: :default)
end
def curl_with_workarounds(
- *args, secrets: nil, print_stdout: nil, print_stderr: nil, verbose: nil, env: {}, **options
+ *args, secrets: nil, print_stdout: nil, print_stderr: nil, debug: nil, verbose: ni... | false |
Other | Homebrew | brew | d94afb91dd583330cf36dca598929455c152ec39.json | SystemCommand: Add debug parameter | Library/Homebrew/system_command.rb | @@ -74,13 +74,15 @@ def run!
must_succeed: T::Boolean,
print_stdout: T::Boolean,
print_stderr: T::Boolean,
+ debug: T::Boolean,
verbose: T::Boolean,
secrets: T.any(String, T::Array[String]),
chdir: T.any(String, Pathname),
).void
end
def ... | false |
Other | Homebrew | brew | 19c118d0026482d9e0a59833570cc9985092cb4d.json | formula: activate env extensions for postinstall | Library/Homebrew/formula.rb | @@ -1049,6 +1049,7 @@ def run_post_install
with_env(new_env) do
ENV.clear_sensitive_environment!
+ ENV.activate_extensions!
etc_var_dirs = [bottle_prefix/"etc", bottle_prefix/"var"]
T.unsafe(Find).find(*etc_var_dirs.select(&:directory?)) do |path| | false |
Other | Homebrew | brew | bdfa7a757dbcaddbb1502991b8d2a95530898ce4.json | Hide `parser` warning. | Library/Homebrew/style.rb | @@ -144,10 +144,12 @@ def run_rubocop(files, output_type,
args << "--color" if Tty.color?
- system cache_env, "rubocop", *args
+ system cache_env, RUBY_PATH, ENV["HOMEBREW_RUBY_WARNINGS"], "-S", "rubocop", *args
$CHILD_STATUS.success?
when :json
- result = system_comman... | false |
Other | Homebrew | brew | 207a45b52623c90408f9eb522b80c48839f276cb.json | Update RBI files for sorbet. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -6938,10 +6938,6 @@ module FileUtils
extend ::FileUtils::StreamUtils_
end
-class Formula
- include ::Formula::Compat
-end
-
module FormulaCellarChecks
extend ::T::Private::Methods::MethodHooks
extend ::T::Private::Methods::SingletonMethodHooks
@@ -7690,10 +7686,6 @@ class Homebrew::CLI::NamedArgs
ex... | false |
Other | Homebrew | brew | 19435e6f1775a03384c17b15ebf4608761d064ba.json | Update RBI files for rubocop-rspec. | Library/Homebrew/sorbet/rbi/gems/rubocop-rspec@2.1.0.rbi | @@ -652,11 +652,11 @@ class RuboCop::Cop::RSpec::FilePath < ::RuboCop::Cop::RSpec::Base
def custom_transform; end
def ensure_correct_file_path(send_node, described_class, arguments); end
def expected_path(constant); end
- def filename_ends_with?(glob); end
- def glob_for(described_class, method_name); end
- ... | true |
Other | Homebrew | brew | 19435e6f1775a03384c17b15ebf4608761d064ba.json | Update RBI files for rubocop-rspec. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -6938,10 +6938,6 @@ module FileUtils
extend ::FileUtils::StreamUtils_
end
-class Formula
- include ::Formula::Compat
-end
-
module FormulaCellarChecks
extend ::T::Private::Methods::MethodHooks
extend ::T::Private::Methods::SingletonMethodHooks
@@ -7690,10 +7686,6 @@ class Homebrew::CLI::NamedArgs
ex... | true |
Other | Homebrew | brew | 2dd40720f075bf93551a27fe0be64c96312632fd.json | Add test for `SystemCommand` with `SIGINT` handler. | Library/Homebrew/test/spec_helper.rb | @@ -165,34 +165,37 @@
config.around do |example|
def find_files
+ return [] unless File.exist?(TEST_TMPDIR)
+
Find.find(TEST_TMPDIR)
.reject { |f| File.basename(f) == ".DS_Store" }
+ .reject { |f| TEST_DIRECTORIES.include?(Pathname(f)) }
.map { |f| f.sub(TEST_TMPDIR,... | true |
Other | Homebrew | brew | 2dd40720f075bf93551a27fe0be64c96312632fd.json | Add test for `SystemCommand` with `SIGINT` handler. | Library/Homebrew/test/system_command_spec.rb | @@ -281,5 +281,28 @@
}.to raise_error.with_message(redacted_msg).and output(redacted_msg).to_stderr
end
end
+
+ context "when a `SIGINT` handler is set in the parent process" do
+ it "is not interrupted" do
+ start_time = Time.now
+
+ pid = fork do
+ trap("INT") do
+ ... | true |
Other | Homebrew | brew | 3db55d13d6996df22a0169df4dbbc8f854b2f051.json | Improve handling of SIGINT. | Library/Homebrew/dev-cmd/ruby.rb | @@ -32,14 +32,10 @@ def ruby
ruby_sys_args << "-e #{args.e}" if args.e
ruby_sys_args += args.named
- begin
- safe_system RUBY_PATH,
- ENV["HOMEBREW_RUBY_WARNINGS"],
- "-I", $LOAD_PATH.join(File::PATH_SEPARATOR),
- "-rglobal", "-rdev-cmd/irb",
- ... | true |
Other | Homebrew | brew | 3db55d13d6996df22a0169df4dbbc8f854b2f051.json | Improve handling of SIGINT. | Library/Homebrew/exceptions.rb | @@ -578,14 +578,24 @@ def initialize(cmd, status:, output: nil, secrets: [])
@status = status
@output = output
- exitstatus = if status.respond_to?(:exitstatus)
- status.exitstatus
- else
+ exitstatus = case status
+ when Integer
status
+ else
+ status.exitstatus
end
... | true |
Other | Homebrew | brew | 3db55d13d6996df22a0169df4dbbc8f854b2f051.json | Improve handling of SIGINT. | Library/Homebrew/system_command.rb | @@ -20,6 +20,8 @@ class SystemCommand
# Helper functions for calling {SystemCommand.run}.
module Mixin
+ extend T::Sig
+
def system_command(*args)
T.unsafe(SystemCommand).run(*args)
end
@@ -32,8 +34,6 @@ def system_command!(*args)
include Context
extend Predicable
- attr_reader :pid... | true |
Other | Homebrew | brew | 3db55d13d6996df22a0169df4dbbc8f854b2f051.json | Improve handling of SIGINT. | Library/Homebrew/test/system_command_spec.rb | @@ -24,7 +24,11 @@
it "includes the given variables explicitly" do
expect(Open3)
.to receive(:popen3)
- .with(an_instance_of(Hash), ["/usr/bin/env", "/usr/bin/env"], "A=1", "B=2", "C=3", "env", *env_args, {})
+ .with(
+ an_instance_of(Hash), ["/usr/bin... | true |
Other | Homebrew | brew | 3db55d13d6996df22a0169df4dbbc8f854b2f051.json | Improve handling of SIGINT. | Library/Homebrew/utils.rb | @@ -388,13 +388,30 @@ def archs_for_command(cmd)
Pathname.new(cmd).archs
end
- def ignore_interrupts(opt = nil)
- std_trap = trap("INT") do
- puts "One sec, just cleaning up" unless opt == :quietly
+ def ignore_interrupts(_opt = nil)
+ # rubocop:disable Style/GlobalVars
+ $ignore_interrupts_ne... | true |
Other | Homebrew | brew | 2777369da798dad955d1dd03723425e8d105ebed.json | formula_installer: exclude more from build-from-source warning.
We should only complain when installing requested formulae that aren't
currently installed. | Library/Homebrew/formula_installer.rb | @@ -234,7 +234,8 @@ def check_install_sanity
if Homebrew.default_prefix? && !Homebrew::EnvConfig.developer? &&
!build_from_source? && !build_bottle? &&
- formula.tap&.core_tap? && !formula.bottle_unneeded? &&
+ !installed_as_dependency? &&
+ formula.tap&.core_tap? && !formula.bottle_unn... | false |
Other | Homebrew | brew | e2d032a6b6c765e0a6311a84a7b70f5ddf12b665.json | keg_relocate: ensure @@HOMEBREW_REPOSITORY@@ is always relocated.
This will be needed to pour older bottles after 2.7.0. | Library/Homebrew/keg_relocate.rb | @@ -4,16 +4,15 @@
class Keg
PREFIX_PLACEHOLDER = "@@HOMEBREW_PREFIX@@"
CELLAR_PLACEHOLDER = "@@HOMEBREW_CELLAR@@"
+ REPOSITORY_PLACEHOLDER = "@@HOMEBREW_REPOSITORY@@"
LIBRARY_PLACEHOLDER = "@@HOMEBREW_LIBRARY@@"
- # TODO: delete these after Homebrew 2.7.0 is released.
- REPOSITORY_PLACEHOLDER = "@@HOMEBR... | false |
Other | Homebrew | brew | 09c3058618a5f938f5d648a5dc510bd3f770cf3f.json | Remove basic authentication support for GitHub.
Since we (and GitHub) no longer support password authentication
using non-token passwords, always set the Authorization header,
rather than needlessly checking for a (possibly incorrect) username. | Library/Homebrew/dev-cmd/pr-pull.rb | @@ -343,15 +343,10 @@ def changed_formulae(tap, original_commit)
end
def download_artifact(url, dir, pr)
- token, username = GitHub.api_credentials
- case GitHub.api_credentials_type
- when :env_username_password, :keychain_username_password
- curl_args = ["--user", "#{username}:#{token}"]
- wh... | true |
Other | Homebrew | brew | 09c3058618a5f938f5d648a5dc510bd3f770cf3f.json | Remove basic authentication support for GitHub.
Since we (and GitHub) no longer support password authentication
using non-token passwords, always set the Authorization header,
rather than needlessly checking for a (possibly incorrect) username. | Library/Homebrew/utils/github.rb | @@ -99,6 +99,9 @@ def env_username_password
odisabled "the GitHub API with HOMEBREW_GITHUB_API_PASSWORD", "HOMEBREW_GITHUB_API_TOKEN"
end
+ # Gets the password field from `git-credential-osxkeychain` for github.com,
+ # but only if that password looks like a GitHub Personal Access Token.
+ sig { returns(T.... | true |
Other | Homebrew | brew | 7be216fcbec3021df87fb37b17bbbd91202af6f5.json | change function name | Library/Homebrew/cli/args.rb | @@ -133,7 +133,7 @@ def context
Context::ContextStruct.new(debug: debug?, quiet: quiet?, verbose: verbose?)
end
- def only_path_formula_or_cask
+ def only_formula_or_cask
return :formula if formula? && !cask?
return :cask if cask? && !formula?
end | true |
Other | Homebrew | brew | 7be216fcbec3021df87fb37b17bbbd91202af6f5.json | change function name | Library/Homebrew/cmd/fetch.rb | @@ -81,7 +81,7 @@ def fetch
end
end
else
- args.named.to_formulae_and_casks(only: args.only_path_formula_or_cask)
+ args.named.to_formulae_and_casks(only: args.only_formula_or_cask)
end.uniq
puts "Fetching: #{bucket * ", "}" if bucket.size > 1 | true |
Other | Homebrew | brew | 7be216fcbec3021df87fb37b17bbbd91202af6f5.json | change function name | Library/Homebrew/cmd/home.rb | @@ -35,7 +35,7 @@ def home
return
end
- homepages = args.named.to_formulae_and_casks(only: args.only_path_formula_or_cask).map do |formula_or_cask|
+ homepages = args.named.to_formulae_and_casks(only: args.only_formula_or_cask).map do |formula_or_cask|
puts "Opening homepage for #{name_of(for... | true |
Other | Homebrew | brew | 7be216fcbec3021df87fb37b17bbbd91202af6f5.json | change function name | Library/Homebrew/cmd/info.rb | @@ -90,17 +90,17 @@ def info
end
end
- print_analytics(args: args, only: args.only_path_formula_or_cask)
+ print_analytics(args: args, only: args.only_formula_or_cask)
elsif args.json
- print_json(args: args, only: args.only_path_formula_or_cask)
+ print_json(args: args, only:... | true |
Other | Homebrew | brew | 7be216fcbec3021df87fb37b17bbbd91202af6f5.json | change function name | Library/Homebrew/cmd/install.rb | @@ -148,7 +148,7 @@ def install
EOS
end
- formulae, casks = args.named.to_formulae_and_casks(only: args.only_path_formula_or_cask)
+ formulae, casks = args.named.to_formulae_and_casks(only: args.only_formula_or_cask)
.partition { |formula_or_cask| formula_or_cask.is_a?(For... | true |
Other | Homebrew | brew | 7be216fcbec3021df87fb37b17bbbd91202af6f5.json | change function name | Library/Homebrew/cmd/uninstall.rb | @@ -48,7 +48,7 @@ def uninstall
args = uninstall_args.parse
all_kegs, casks = args.named.to_kegs_to_casks(
- only: args.only_path_formula_or_cask,
+ only: args.only_formula_or_cask,
ignore_unavailable: args.force?,
all_kegs: args.force?,
) | true |
Other | Homebrew | brew | 7be216fcbec3021df87fb37b17bbbd91202af6f5.json | change function name | Library/Homebrew/cmd/upgrade.rb | @@ -95,7 +95,7 @@ def upgrade_args
def upgrade
args = upgrade_args.parse
- formulae, casks = args.named.to_resolved_formulae_to_casks(only: args.only_path_formula_or_cask)
+ formulae, casks = args.named.to_resolved_formulae_to_casks(only: args.only_formula_or_cask)
# If one or more formulae are spe... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.