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 | 81f262ece3ba6215579c1a0147bc281590ea7d3d.json | utils/gems: use env shebang when installing gems | Library/Homebrew/utils/gems.rb | @@ -81,7 +81,8 @@ def install_gem!(name, version: nil, setup_gem_environment: true)
ohai_if_defined "Installing '#{name}' gem"
# `document: []` is equivalent to --no-document
# `build_args: []` stops ARGV being used as a default
- specs = Gem.install name, version, document: [], build_args: []... | false |
Other | Homebrew | brew | 75eb7c56f56883e9b36794317c06a7ba2de851aa.json | Update RBI files for bootsnap.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/bootsnap@1.14.0.rbi | @@ -14,12 +14,12 @@ module Bootsnap
def absolute_path?(path); end
def default_setup; end
def instrumentation=(callback); end
- def iseq_cache_supported?; end
def log!; end
def logger; end
def logger=(logger); end
def rb_get_path(fname); end
- def setup(cache_dir:, development_mo... | true |
Other | Homebrew | brew | 75eb7c56f56883e9b36794317c06a7ba2de851aa.json | Update RBI files for bootsnap.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -4281,6 +4281,7 @@ class Gem::Specification
def to_ruby(); end
LATEST_RUBY_WITHOUT_PATCH_VERSIONS = ::T.let(nil, ::T.untyped)
+ ORIGINAL_LOCAL_PLATFORM = ::T.let(nil, ::T.untyped)
end
module Gem::Specification::YamlBackfiller | true |
Other | Homebrew | brew | e21c926f9be7a770017b11f381280822b5e75fa8.json | Update Bundler to 2.3.26 | Library/Homebrew/Gemfile.lock | @@ -265,4 +265,4 @@ RUBY VERSION
ruby 2.6.8p205
BUNDLED WITH
- 2.3.24
+ 2.3.26 | true |
Other | Homebrew | brew | e21c926f9be7a770017b11f381280822b5e75fa8.json | Update Bundler to 2.3.26 | Library/Homebrew/rubyext/rubygems/defaults/operating_system.rb | @@ -1,32 +0,0 @@
-# typed: false
-# frozen_string_literal: true
-
-# Fixes universal-ruby getting confused whether to install arm64 or x86_64 macOS versions.
-# This can be removed when integrated into Bundler: https://github.com/rubygems/rubygems/pull/5978
-module Gem
- # @private
- class Specification
- if /^uni... | true |
Other | Homebrew | brew | e21c926f9be7a770017b11f381280822b5e75fa8.json | Update Bundler to 2.3.26 | Library/Homebrew/shims/ruby/bundle | @@ -1,15 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: true
-
-# Insert our system Ruby patch script, if neeeded.
-# Fixes universal-ruby getting confused whether to install arm64 or x86_64 macOS versions.
-# https://github.com/rubygems/rubygems/issues/4234
-if RUBY_PLATFORM.match?(/universal\..*-darwin/)
- r... | true |
Other | Homebrew | brew | e21c926f9be7a770017b11f381280822b5e75fa8.json | Update Bundler to 2.3.26 | Library/Homebrew/utils/gems.rb | @@ -10,7 +10,7 @@
module Homebrew
# Keep in sync with the `Gemfile.lock`'s BUNDLED WITH.
# After updating this, run `brew vendor-gems --update=--bundler`.
- HOMEBREW_BUNDLER_VERSION = "2.3.24"
+ HOMEBREW_BUNDLER_VERSION = "2.3.26"
module_function
@@ -64,7 +64,6 @@ def setup_gem_environment!(setup_path: ... | true |
Other | Homebrew | brew | 90f056218cf252f28b03b5c634615b00583e2943.json | Update RBI files for rubocop-performance.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/rubocop-performance@1.15.1.rbi | @@ -236,6 +236,11 @@ class RuboCop::Cop::Performance::Count < ::RuboCop::Cop::Base
def autocorrect(corrector, node, selector_node, selector); end
def eligible_node?(node); end
+ def negate_block_pass_as_inline_block(node); end
+ def negate_block_pass_reject(corrector, node); end
+ def negate_block_reject(cor... | false |
Other | Homebrew | brew | 034bf72235183c66c1a03850ad240c423d6b6a3f.json | Contributors docs: adjust line breaks | docs/Acceptable-Casks.md | @@ -1,8 +1,6 @@
# Acceptable Casks
-Some casks should not go in
-[homebrew/cask](https://github.com/Homebrew/homebrew-cask). But there are
-additional [Interesting Taps and Forks](Interesting-Taps-and-Forks.md) and anyone can [start their own](Taps.md)!
+Some casks should not go in [homebrew/cask](https://github.com... | true |
Other | Homebrew | brew | 034bf72235183c66c1a03850ad240c423d6b6a3f.json | Contributors docs: adjust line breaks | docs/Acceptable-Formulae.md | @@ -1,49 +1,43 @@
# Acceptable Formulae
-Some formulae should not go in
-[homebrew/core](https://github.com/Homebrew/homebrew-core). But there are
-additional [Interesting Taps and Forks](Interesting-Taps-and-Forks.md) and anyone can start their
-own!
+Some formulae should not go in [homebrew/core](https://github.co... | true |
Other | Homebrew | brew | 034bf72235183c66c1a03850ad240c423d6b6a3f.json | Contributors docs: adjust line breaks | docs/Brew-Test-Bot.md | @@ -5,21 +5,15 @@ image: https://brew.sh/assets/img/brewtestbot.png
# Brew Test Bot
-`brew test-bot` is the name for the automated review and testing system funded
-by [our Kickstarter in 2013](https://www.kickstarter.com/projects/homebrew/brew-test-bot).
+`brew test-bot` is the name for the automated review and t... | true |
Other | Homebrew | brew | 034bf72235183c66c1a03850ad240c423d6b6a3f.json | Contributors docs: adjust line breaks | docs/How-To-Open-a-Homebrew-Pull-Request.md | @@ -5,87 +5,111 @@ The following commands are used by Homebrew contributors to set up a fork of Hom
Depending on the change you want to make, you need to send the pull request to the appropriate one of Homebrew's main repositories. If you want to submit a change to Homebrew core code (the `brew` implementation), you s... | true |
Other | Homebrew | brew | 034bf72235183c66c1a03850ad240c423d6b6a3f.json | Contributors docs: adjust line breaks | docs/How-to-Create-and-Maintain-a-Tap.md | @@ -1,87 +1,52 @@
# How to Create and Maintain a Tap
-[Taps](Taps.md) are external sources of Homebrew formulae, casks and/or external commands. They
-can be created by anyone to provide their own formulae, casks and/or external commands
-to any Homebrew user.
+[Taps](Taps.md) are external sources of Homebrew form... | true |
Other | Homebrew | brew | 034bf72235183c66c1a03850ad240c423d6b6a3f.json | Contributors docs: adjust line breaks | docs/Prose-Style-Guidelines.md | @@ -1,6 +1,7 @@
+# Prose Style Guidelines
+
<!-- vale off -->
<!-- Disable vale linting for the whole of the style guide, because it contains deliberately bad examples. -->
-# Prose Style Guidelines
This is a set of style and usage guidelines for Homebrew's prose documentation aimed at users, contributors, and mai... | true |
Other | Homebrew | brew | 034bf72235183c66c1a03850ad240c423d6b6a3f.json | Contributors docs: adjust line breaks | docs/Rename-A-Formula.md | @@ -1,7 +1,6 @@
# Renaming a Formula
-Sometimes software and formulae need to be renamed. To rename a formula
-you need to:
+Sometimes software and formulae need to be renamed. To rename a formula you need to:
1. Rename the formula file and its class to a new formula. The new name must meet all the usual rules of... | true |
Other | Homebrew | brew | 034bf72235183c66c1a03850ad240c423d6b6a3f.json | Contributors docs: adjust line breaks | docs/Typechecking.md | @@ -1,20 +1,14 @@
# Type Checking With Sorbet
-The majority of the code in Homebrew is written in Ruby which is a dynamic
-language. To avail the benefits of static type checking, we have set up
-Sorbet in our codebase which provides the benefits of static type checking
-to dynamic languages like Ruby.
+The majority... | true |
Other | Homebrew | brew | 034bf72235183c66c1a03850ad240c423d6b6a3f.json | Contributors docs: adjust line breaks | docs/Versions.md | @@ -3,6 +3,7 @@
[homebrew/core](https://github.com/homebrew/homebrew-core) supports multiple versions of formulae with a special naming format. For example, the formula for GCC 6 is named `gcc@6.rb` and begins with `class GccAT6 < Formula`.
## Acceptable versioned formulae
+
Versioned formulae we include in [homeb... | true |
Other | Homebrew | brew | bca9eb05d1c0b55176cc3659cadfe894467352fa.json | dev-cmd/unbottled: simulate target tag | Library/Homebrew/dev-cmd/unbottled.rb | @@ -44,6 +44,15 @@ def unbottled
Utils::Bottles.tag
end
+ Homebrew::SimulateSystem.os = @bottle_tag.system
+ Homebrew::SimulateSystem.arch = if Hardware::CPU::INTEL_ARCHS.include?(@bottle_tag.arch)
+ :intel
+ elsif Hardware::CPU::ARM_ARCHS.include?(@bottle_tag.arch)
+ :arm
+ else
+ ... | true |
Other | Homebrew | brew | bca9eb05d1c0b55176cc3659cadfe894467352fa.json | dev-cmd/unbottled: simulate target tag | Library/Homebrew/hardware.rb | @@ -9,15 +9,16 @@ module Hardware
class CPU
INTEL_32BIT_ARCHS = [:i386].freeze
INTEL_64BIT_ARCHS = [:x86_64].freeze
+ INTEL_ARCHS = (INTEL_32BIT_ARCHS + INTEL_64BIT_ARCHS).freeze
PPC_32BIT_ARCHS = [:ppc, :ppc32, :ppc7400, :ppc7450, :ppc970].freeze
PPC_64BIT_ARCHS = [:ppc64, :ppc64le,... | true |
Other | Homebrew | brew | 449b872916c29a7b9d4155b176f7aca85b8c2c84.json | CPU: fix M2 detection | Library/Homebrew/extend/os/mac/hardware/cpu.rb | @@ -152,7 +152,11 @@ def sysctl_bool(key)
end
def sysctl_int(key)
- sysctl_n(key).to_i
+ if (x = sysctl_n(key).to_i) >= 0
+ x
+ else
+ x & 0xffffffff
+ end
end
def sysctl_n(*keys) | false |
Other | Homebrew | brew | 2bc54e56e4ab6d3af50fa6ed52c57c99e1a4aab7.json | Optimize CoreTap in `.deleted_reason`
This limits the previous change to only the
core tap in `MissingFormula.deleted_reason`.
The reason for this is that the `git log` command
only becomes a performance issue when the number
of monthly commits is high which really only happens
with the core tap. | Library/Homebrew/missing_formula.rb | @@ -154,25 +154,36 @@ def deleted_reason(name, silent: false)
end
end
- commit_command = "git log --before='1 month ago' --max-count=1 --format=%H"
- month_old_commit = Utils.popen_read(commit_command).chomp
-
- # Check if the formula has been deleted in the last mon... | false |
Other | Homebrew | brew | 9c22c47e4f411a0e5fbcca0462f2912efea707de.json | Cookbooks: adjust line breaks | docs/Cask-Cookbook.md | @@ -29,17 +29,15 @@ Exception: `do` blocks such as `postflight` may enclose a block of pure Ruby cod
### Efficiency
-Conditional statements are permitted, but only if they are very efficient.
-Tests on the following values are known to be acceptable:
+Conditional statements are permitted, but only if they are very... | true |
Other | Homebrew | brew | 9c22c47e4f411a0e5fbcca0462f2912efea707de.json | Cookbooks: adjust line breaks | docs/Formula-Cookbook.md | @@ -77,8 +77,7 @@ end
If `brew` said `Warning: Version cannot be determined from URL` when doing the `create` step, you’ll need to explicitly add the correct [`version`](https://rubydoc.brew.sh/Formula#version-class_method) to the formula and then save the formula.
-Homebrew will try to guess the formula’s name fr... | true |
Other | Homebrew | brew | e7f723e5435b434f015a0f8d55f6769c63e02f5d.json | uses_from_macos: add mandoc to allowed list
- see https://github.com/Homebrew/homebrew-core/pull/115411 | Library/Homebrew/rubocops/uses_from_macos.rb | @@ -85,6 +85,7 @@ class UsesFromMacos < FormulaCop
groff
gzip
less
+ mandoc
openssl
perl
php | false |
Other | Homebrew | brew | f81857140f70ade6b0497eb718400e707889bc58.json | docs: Fix env variable typo | Library/Homebrew/env_config.rb | @@ -204,7 +204,7 @@ module EnvConfig
},
HOMEBREW_DOCKER_REGISTRY_TOKEN: {
description: "Use this bearer token for authenticating with a Docker registry proxying GitHub Packages. " \
- "Preferred over HOMEBREW_DOCKER_REGISTRY_TOKEN_BASIC.",
+ "Pre... | true |
Other | Homebrew | brew | f81857140f70ade6b0497eb718400e707889bc58.json | docs: Fix env variable typo | docs/Manpage.md | @@ -2123,7 +2123,7 @@ example, run `export HOMEBREW_NO_INSECURE_REDIRECT=1` rather than just
<br>Use this base64 encoded username and password for authenticating with a Docker registry proxying GitHub Packages. If HOMEBREW_DOCKER_REGISTRY_TOKEN is set, it will be used instead.
- `HOMEBREW_DOCKER_REGISTRY_TOKEN`
-... | true |
Other | Homebrew | brew | f81857140f70ade6b0497eb718400e707889bc58.json | docs: Fix env variable typo | manpages/brew.1 | @@ -3091,7 +3091,7 @@ Use this base64 encoded username and password for authenticating with a Docker r
\fBHOMEBREW_DOCKER_REGISTRY_TOKEN\fR
.
.br
-Use this bearer token for authenticating with a Docker registry proxying GitHub Packages\. Preferred over HOMEBREW_DOCKER_REGISTRY_TOKEN_BASIC\.
+Use this bearer token fo... | true |
Other | Homebrew | brew | a92c9eed823a5fd9b1904ab14a1609e3a87a8fea.json | style: check more shell scripts.
We were missing a few here so add them. Also, fix the changes in
`on-create-command.sh` that this catches. | .devcontainer/on-create-command.sh | @@ -5,8 +5,9 @@ set -e
sudo chmod -R g-w,o-w /home/linuxbrew
# everything below is too slow to do unless prebuilding so skip it
-CODESPACES_ACTION_NAME="$(cat /workspaces/.codespaces/shared/environment-variables.json | jq -r '.ACTION_NAME')"
-if [ "$CODESPACES_ACTION_NAME" != "createPrebuildTemplate" ];
+CODESPACES... | true |
Other | Homebrew | brew | a92c9eed823a5fd9b1904ab14a1609e3a87a8fea.json | style: check more shell scripts.
We were missing a few here so add them. Also, fix the changes in
`on-create-command.sh` that this catches. | Library/Homebrew/style.rb | @@ -262,12 +262,13 @@ def shell_scripts
HOMEBREW_BREW_FILE,
HOMEBREW_REPOSITORY/"completions/bash/brew",
HOMEBREW_REPOSITORY/"Dockerfile",
- *HOMEBREW_LIBRARY.glob("Homebrew/*.sh"),
+ *HOMEBREW_REPOSITORY.glob(".devcontainer/**/*.sh"),
+ *HOMEBREW_LIBRARY.glob("Homebrew/*... | true |
Other | Homebrew | brew | 33d3a5d7284c30f326d0f9006415d2a47ff6acf9.json | cask/artifiact/abstract_uninstall: allow wildcard entries for launchctl | Library/Homebrew/cask/artifact/abstract_uninstall.rb | @@ -90,7 +90,22 @@ def uninstall_early_script(directives, **options)
# :launchctl must come before :quit/:signal for cases where app would instantly re-launch
def uninstall_launchctl(*services, command: nil, **_)
booleans = [false, true]
+
+ all_services = []
+
+ # if launchctl item... | false |
Other | Homebrew | brew | 9eac310468b60a4ab4ef02aeda9e513337bbb198.json | Allow multiple macOS requirements | Library/Homebrew/requirement.rb | @@ -126,7 +126,7 @@ def ==(other)
alias eql? ==
def hash
- [name, tags].hash
+ [self.class, name, tags].hash
end
sig { returns(String) } | true |
Other | Homebrew | brew | 9eac310468b60a4ab4ef02aeda9e513337bbb198.json | Allow multiple macOS requirements | Library/Homebrew/requirements/macos_requirement.rb | @@ -88,6 +88,15 @@ def message(type: :formula)
end
end
+ def ==(other)
+ super(other) && comparator == other.comparator && version == other.version
+ end
+ alias eql? ==
+
+ def hash
+ [super, comparator, version].hash
+ end
+
sig { returns(String) }
def inspect
"#<#{self.class.name}: ve... | true |
Other | Homebrew | brew | ccb51a519d84be12cebe232e470bb0c813010c92.json | Update RBI files for zeitwerk.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/zeitwerk@2.6.6.rbi | @@ -28,16 +28,18 @@ module Zeitwerk::ExplicitNamespace
extend ::Zeitwerk::RealModName
class << self
- def cpaths; end
- def mutex; end
- def register(cpath, loader); end
- def tracer; end
- def unregister_loader(loader); end
+ def __register(cpath, loader); end
+ def __unregister_loader(loa... | false |
Other | Homebrew | brew | 561602fa5132bf33c61cbd3dcd4306ffde014a7d.json | use Manpages method on dev-cmd/update_maintainers | Library/Homebrew/dev-cmd/update-maintainers.rb | @@ -3,9 +3,7 @@
require "cli/parser"
require "utils/github"
-
-# TODO: move function to manpages.rb and require that instead
-require "dev-cmd/generate-man-completions"
+require "manpages"
module Homebrew
extend T::Sig
@@ -61,8 +59,7 @@ def update_maintainers
if diff.status.success?
ofail "No chan... | false |
Other | Homebrew | brew | d89344b41de6f9a51840869300924bd59962620a.json | add manpage.rb to generating homebrew manual | Library/Homebrew/dev-cmd/generate-man-completions.rb | @@ -2,20 +2,15 @@
# frozen_string_literal: true
require "formula"
-require "erb"
require "ostruct"
-require "cli/parser"
require "completions"
+require "manpages"
module Homebrew
extend T::Sig
module_function
- SOURCE_PATH = (HOMEBREW_LIBRARY_PATH/"manpages").freeze
- TARGET_MAN_PATH = (HOMEBREW_RE... | true |
Other | Homebrew | brew | d89344b41de6f9a51840869300924bd59962620a.json | add manpage.rb to generating homebrew manual | Library/Homebrew/manpages.rb | @@ -0,0 +1,228 @@
+# typed: true
+# frozen_string_literal: true
+
+require "cli/parser"
+require "erb"
+
+SOURCE_PATH = (HOMEBREW_LIBRARY_PATH/"manpages").freeze
+TARGET_MAN_PATH = (HOMEBREW_REPOSITORY/"manpages").freeze
+TARGET_DOC_PATH = (HOMEBREW_REPOSITORY/"docs").freeze
+module Homebrew
+ # Helper functions for g... | true |
Other | Homebrew | brew | d89344b41de6f9a51840869300924bd59962620a.json | add manpage.rb to generating homebrew manual | Library/Homebrew/manpages.rbi | @@ -0,0 +1,7 @@
+# typed: strict
+
+module Homebrew
+ module Manpages
+ include Kernel
+ end
+end | true |
Other | Homebrew | brew | bc4274fda0385029fdf5bbe51937bfb4e02eca6d.json | devcontainer/on-create-command: fix Ubuntu 18.04, add debugging.
Add some debugging information to be able to customise the prebuild/not
cases for this script.
Also, handle `zsh-autosuggestions` not being available for Ubuntu 18.04. | .devcontainer/on-create-command.sh | @@ -1,6 +1,20 @@
#!/bin/bash
set -e
+# dump information variables for debugging
+echo "==> env"
+env | grep -v TOKEN
+echo
+echo "==> /etc/os-release"
+cat /etc/os-release || true
+echo
+echo "==> /etc/lsb-release"
+cat /etc/lsb-release || true
+echo
+echo "==> /etc/issue"
+cat /etc/issue || true
+echo
+
# fix per... | false |
Other | Homebrew | brew | d477d1663acaee53ec73acf7e4c3a1b2fd256878.json | Service: add method to define a root requirement | Library/Homebrew/formula.rb | @@ -995,6 +995,8 @@ def with_logging(log_type)
# </plist>
# EOS
# end</pre>
+ #
+ # @deprecated Please use {#service} instead
def plist
nil
end
@@ -1014,6 +1016,13 @@ def service_name
# The generated launchd {.plist} file path.
sig { returns(Pathname) }
def plist_path
+ odeprecated... | true |
Other | Homebrew | brew | d477d1663acaee53ec73acf7e4c3a1b2fd256878.json | Service: add method to define a root requirement | Library/Homebrew/service.rb | @@ -129,6 +129,26 @@ def keep_alive(value = nil)
end
end
+ sig { params(value: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) }
+ def require_root(value = nil)
+ case T.unsafe(value)
+ when nil
+ @require_root
+ when true, false
+ @require_root = value
+ else... | true |
Other | Homebrew | brew | d477d1663acaee53ec73acf7e4c3a1b2fd256878.json | Service: add method to define a root requirement | Library/Homebrew/test/formula_spec.rb | @@ -733,7 +733,7 @@
expect(f.plist_name).to eq("homebrew.mxcl.formula_name")
expect(f.service_name).to eq("homebrew.formula_name")
- expect(f.plist_path).to eq(HOMEBREW_PREFIX/"opt/formula_name/homebrew.mxcl.formula_name.plist")
+ expect(f.launchd_service_path).to eq(HOMEBREW_PREFIX/"opt/formu... | true |
Other | Homebrew | brew | d477d1663acaee53ec73acf7e4c3a1b2fd256878.json | Service: add method to define a root requirement | Library/Homebrew/test/service_spec.rb | @@ -64,6 +64,29 @@ def stub_formula(&block)
end
end
+ describe "#requires_root?" do
+ it "returns status when set" do
+ f = stub_formula do
+ service do
+ run opt_bin/"beanstalkd"
+ require_root true
+ end
+ end
+
+ expect(f.service.requires_root?).to be(true... | true |
Other | Homebrew | brew | 7177bd587706cf2c3c15129564c08dded8becb0a.json | Update RBI files for json_schemer.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/json_schemer@0.2.23.rbi | @@ -14,10 +14,12 @@ module JSONSchemer
end
end
-class JSONSchemer::CachedRefResolver
- def initialize(&ref_resolver); end
+class JSONSchemer::CachedRefResolver < ::JSONSchemer::CachedResolver; end
- def call(uri); end
+class JSONSchemer::CachedResolver
+ def initialize(&resolver); end
+
+ def call(*args); e... | false |
Other | Homebrew | brew | e77dafd413a09452588952ae5f0fa0756485d757.json | Update RBI files for rubocop-rails.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.17.2.rbi | @@ -175,6 +175,24 @@ RuboCop::Cop::Rails::ActionFilter::FILTER_METHODS = T.let(T.unsafe(nil), Array)
RuboCop::Cop::Rails::ActionFilter::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Rails::ActionFilter::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+class RuboCop::Cop::Rails::ActionOrder < ::RuboCop::Cop::Base
... | true |
Other | Homebrew | brew | e77dafd413a09452588952ae5f0fa0756485d757.json | Update RBI files for rubocop-rails.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/zeitwerk@2.6.4.rbi | @@ -70,22 +70,28 @@ class Zeitwerk::Inflector
def overrides; end
end
+module Zeitwerk::Internal
+ def internal(method_name); end
+end
+
class Zeitwerk::Loader
include ::Zeitwerk::RealModName
include ::Zeitwerk::Loader::Callbacks
include ::Zeitwerk::Loader::Helpers
include ::Zeitwerk::Loader::Config
... | true |
Other | Homebrew | brew | a4c9dd11b2abaf3d2959ad893070ac78d57867e6.json | Update RBI files for rdiscount.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/rdiscount@2.2.7.rbi | @@ -11,6 +11,8 @@ class RDiscount
def autolink; end
def autolink=(_arg0); end
+ def explicitlist; end
+ def explicitlist=(_arg0); end
def filter_html; end
def filter_html=(_arg0); end
def filter_styles; end
@@ -21,6 +23,10 @@ class RDiscount
def footnotes=(_arg0); end
def generate_toc; end
d... | false |
Other | Homebrew | brew | 70588be10611eac7021ce4c6ae84aac138a50179.json | Update RBI files for rubocop-rspec.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/rubocop-rspec@2.15.0.rbi | @@ -172,6 +172,47 @@ end
RuboCop::Cop::RSpec::Capybara::FeatureMethods::MAP = T.let(T.unsafe(nil), Hash)
RuboCop::Cop::RSpec::Capybara::FeatureMethods::MSG = T.let(T.unsafe(nil), String)
+class RuboCop::Cop::RSpec::Capybara::NegationMatcher < ::RuboCop::Cop::RSpec::Base
+ include ::RuboCop::Cop::ConfigurableEnforc... | false |
Other | Homebrew | brew | 6a428a8791e739aab31c64b65de8c54384b69e40.json | Update RBI files for rspec-github.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/rspec-github@2.4.0.rbi | @@ -39,6 +39,7 @@ module RSpec::Github; end
class RSpec::Github::Formatter < ::RSpec::Core::Formatters::BaseFormatter
def example_failed(failure); end
def example_pending(pending); end
+ def seed(notification); end
end
class RSpec::Github::NotificationDecorator | false |
Other | Homebrew | brew | ae93123fe495755819ba6cd159c34c34b64ee609.json | Update RBI files for rspec-mocks.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/rspec-mocks@3.11.2.rbi | @@ -431,6 +431,7 @@ class RSpec::Mocks::ClassNewMethodReference < ::RSpec::Mocks::ObjectMethodRefere
class << self
def applies_to?(method_name); end
+ def uses_class_new?(klass); end
end
end
| false |
Other | Homebrew | brew | c32a4312cf04204c97dce4f22eb02b00736e950b.json | Update RBI files for rubocop-ast.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/rubocop-ast@1.23.0.rbi | @@ -1442,6 +1442,7 @@ RuboCop::AST::NodePattern::Sets::SET_INSTANCE_EXEC_CLASS_EXEC_MODULE_EXEC = T.le
RuboCop::AST::NodePattern::Sets::SET_IO_FILE = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_IS_EXPECTED_SHOULD_SHOULD_NOT = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_KEYS_VALU... | true |
Other | Homebrew | brew | c32a4312cf04204c97dce4f22eb02b00736e950b.json | Update RBI files for rubocop-ast.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -6739,12 +6739,9 @@ module RuboCop::AST::NodePattern::Sets
SET_BUILD_RECOMMENDED_TEST_OPTIONAL = ::T.let(nil, ::T.untyped)
SET_DEPENDS_ON_USES_FROM_MACOS = ::T.let(nil, ::T.untyped)
SET_INCLUDE_WITH_WITHOUT = ::T.let(nil, ::T.untyped)
- SET_KEYS_VALUES_TO_H_TO_XML = ::T.let(nil, ::T.untyped)
SET_ON_INTE... | true |
Other | Homebrew | brew | 796bad98ff44634c4a462ac5ca5bd4d1f3f0ddd0.json | Allow gem installation on Rubies other than 2.6 | .gitignore | @@ -31,6 +31,7 @@
**/vendor/bundle/ruby/*/cache
**/vendor/bundle/ruby/*/extensions
**/vendor/bundle/ruby/*/gems/*/*
+**/vendor/bundle/ruby/*/plugins
**/vendor/bundle/ruby/*/specifications
# Ignore YARD files | true |
Other | Homebrew | brew | 796bad98ff44634c4a462ac5ca5bd4d1f3f0ddd0.json | Allow gem installation on Rubies other than 2.6 | Library/Homebrew/Gemfile | @@ -42,7 +42,6 @@ end
gem "activesupport"
gem "addressable"
gem "concurrent-ruby"
-gem "did_you_mean" # remove when HOMEBREW_REQUIRED_RUBY_VERSION >= 2.7
gem "mechanize"
gem "patchelf"
gem "plist"
@@ -52,3 +51,8 @@ gem "rubocop-rspec"
gem "rubocop-sorbet"
gem "ruby-macho"
gem "sorbet-runtime"
+
+# remove when ... | true |
Other | Homebrew | brew | 796bad98ff44634c4a462ac5ca5bd4d1f3f0ddd0.json | Allow gem installation on Rubies other than 2.6 | Library/Homebrew/utils/gems.rb | @@ -64,7 +64,7 @@ def setup_gem_environment!(setup_path: true)
paths = ENV.fetch("PATH").split(":")
paths.unshift(ruby_bindir) unless paths.include?(ruby_bindir)
paths.unshift(Gem.bindir) unless paths.include?(Gem.bindir)
- paths.unshift(HOMEBREW_SHIMS_PATH/"ruby") unless paths.include?(HOMEBREW_SHIMS... | true |
Other | Homebrew | brew | 6ede5d2dd5cf378729669dc02e8b324b86986dde.json | rubocops: handle empty formula body in various cops | Library/Homebrew/rubocops/class.rb | @@ -75,9 +75,10 @@ module FormulaAuditStrict
#
# @api private
class TestPresent < FormulaCop
- def audit_formula(_node, _class_node, _parent_class_node, body_node)
+ def audit_formula(_node, class_node, _parent_class_node, body_node)
return if find_block(body_node, :test)
... | true |
Other | Homebrew | brew | 6ede5d2dd5cf378729669dc02e8b324b86986dde.json | rubocops: handle empty formula body in various cops | Library/Homebrew/rubocops/components_order.rb | @@ -15,6 +15,8 @@ class ComponentsOrder < FormulaCop
extend AutoCorrector
def audit_formula(_node, _class_node, _parent_class_node, body_node)
+ return if body_node.nil?
+
@present_components, @offensive_nodes = check_order(FORMULA_COMPONENT_PRECEDENCE_LIST, body_node)
... | true |
Other | Homebrew | brew | 6ede5d2dd5cf378729669dc02e8b324b86986dde.json | rubocops: handle empty formula body in various cops | Library/Homebrew/rubocops/components_redundancy.rb | @@ -20,6 +20,8 @@ class ComponentsRedundancy < FormulaCop
STABLE_MSG = "`stable do` should not be present without a `head` spec"
def audit_formula(_node, _class_node, _parent_class_node, body_node)
+ return if body_node.nil?
+
urls = find_method_calls_by_name(body_node, :url)
... | true |
Other | Homebrew | brew | 6ede5d2dd5cf378729669dc02e8b324b86986dde.json | rubocops: handle empty formula body in various cops | Library/Homebrew/rubocops/conflicts.rb | @@ -15,6 +15,8 @@ class Conflicts < FormulaCop
"Use `keg_only :versioned_formula` instead."
def audit_formula(_node, _class_node, _parent_class_node, body_node)
+ return if body_node.nil?
+
find_method_calls_by_name(body_node, :conflicts_with).each do |conflicts_with_call|
... | true |
Other | Homebrew | brew | 6ede5d2dd5cf378729669dc02e8b324b86986dde.json | rubocops: handle empty formula body in various cops | Library/Homebrew/rubocops/extend/formula.rb | @@ -50,6 +50,8 @@ def audit_urls(urls, regex)
#
# @param dependency_name dependency's name
def depends_on?(dependency_name, *types)
+ return if @body.nil?
+
types = [:any] if types.empty?
dependency_nodes = find_every_method_call_by_name(@body, :depends_on)
idx = d... | true |
Other | Homebrew | brew | 6ede5d2dd5cf378729669dc02e8b324b86986dde.json | rubocops: handle empty formula body in various cops | Library/Homebrew/rubocops/formula_desc.rb | @@ -14,9 +14,10 @@ class Desc < FormulaCop
include DescHelper
extend AutoCorrector
- def audit_formula(_node, _class_node, _parent_class_node, body_node)
+ def audit_formula(_node, class_node, _parent_class_node, body_node)
@name = @formula_name
desc_call = find_n... | true |
Other | Homebrew | brew | 6ede5d2dd5cf378729669dc02e8b324b86986dde.json | rubocops: handle empty formula body in various cops | Library/Homebrew/rubocops/homepage.rb | @@ -10,10 +10,11 @@ module FormulaAudit
class Homepage < FormulaCop
extend AutoCorrector
- def audit_formula(_node, _class_node, _parent_class_node, body_node)
+ def audit_formula(_node, class_node, _parent_class_node, body_node)
homepage_node = find_node_method_by_name(body_n... | true |
Other | Homebrew | brew | 6ede5d2dd5cf378729669dc02e8b324b86986dde.json | rubocops: handle empty formula body in various cops | Library/Homebrew/rubocops/lines.rb | @@ -91,6 +91,8 @@ def audit_formula(_node, _class_node, _parent_class_node, _body_node)
# @api private
class AssertStatements < FormulaCop
def audit_formula(_node, _class_node, _parent_class_node, body_node)
+ return if body_node.nil?
+
find_every_method_call_by_name(body_node... | true |
Other | Homebrew | brew | 6ede5d2dd5cf378729669dc02e8b324b86986dde.json | rubocops: handle empty formula body in various cops | Library/Homebrew/rubocops/options.rb | @@ -15,6 +15,8 @@ class Options < FormulaCop
OPTION = "Formulae in homebrew/core should not use `option`."
def audit_formula(_node, _class_node, _parent_class_node, body_node)
+ return if body_node.nil?
+
option_call_nodes = find_every_method_call_by_name(body_node, :option)
... | true |
Other | Homebrew | brew | 6ede5d2dd5cf378729669dc02e8b324b86986dde.json | rubocops: handle empty formula body in various cops | Library/Homebrew/rubocops/patches.rb | @@ -16,6 +16,8 @@ class Patches < FormulaCop
def audit_formula(node, _class_node, _parent_class_node, body)
@full_source_content = source_buffer(node).source
+ return if body.nil?
+
external_patches = find_all_blocks(body, :patch)
external_patches.each do |patch_bloc... | true |
Other | Homebrew | brew | 6ede5d2dd5cf378729669dc02e8b324b86986dde.json | rubocops: handle empty formula body in various cops | Library/Homebrew/rubocops/text.rb | @@ -22,6 +22,8 @@ def audit_formula(node, _class_node, _parent_class_node, body_node)
end
end
+ return if body_node.nil?
+
if !find_node_method_by_name(body_node, :plist_options) &&
find_method_def(body_node, :plist)
problem "Please set plist_opti... | true |
Other | Homebrew | brew | 6ede5d2dd5cf378729669dc02e8b324b86986dde.json | rubocops: handle empty formula body in various cops | Library/Homebrew/rubocops/urls.rb | @@ -11,6 +11,8 @@ module FormulaAudit
# @api private
class Urls < FormulaCop
def audit_formula(_node, _class_node, _parent_class_node, body_node)
+ return if body_node.nil?
+
urls = find_every_func_call_by_name(body_node, :url)
mirrors = find_every_func_call_by_name... | true |
Other | Homebrew | brew | 6ede5d2dd5cf378729669dc02e8b324b86986dde.json | rubocops: handle empty formula body in various cops | Library/Homebrew/rubocops/uses_from_macos.rb | @@ -61,6 +61,8 @@ class ProvidedByMacos < FormulaCop
].freeze
def audit_formula(_node, _class_node, _parent_class_node, body_node)
+ return if body_node.nil?
+
find_method_with_args(body_node, :keg_only, :provided_by_macos) do
return if PROVIDED_BY_MACOS_FORMULAE.inc... | true |
Other | Homebrew | brew | 41c935bb761479a68387e5398731b4265e75df6d.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 | @@ -107,8 +107,20 @@ class BigDecimal
def to_digits(); end
end
+module BigDecimal::Deprecation
+ def new(*args, **kwargs); end
+end
+
+module BigDecimal::Deprecation
+end
+
class BigDecimal
- def self.new(*args, **kwargs); end
+ extend ::BigDecimal::Deprecation
+ def self.inherited(subclass); end
+
+ def se... | false |
Other | Homebrew | brew | 6f2f97b98f1069fa299386fca31502e1101dbf13.json | test/rubocops/formula_desc: Ensure autocorrect when `desc` ends in `.`
- This was another thing that I should have done in PR 3411 in 2017,
tested that the regex for autocorrecting `desc` stanzas ending in full
stops actually worked. At least I'm getting to it now. | Library/Homebrew/test/rubocops/formula_desc_spec.rb | @@ -118,12 +118,19 @@ class Foo < Formula
RUBY
end
- it "reports an offense when the description ends with a full stop" do
+ it "report and corrects an offense when the description ends with a full stop" do
expect_offense(<<~RUBY, "/homebrew-core/Formula/foo.rb")
class Foo < Formula
... | false |
Other | Homebrew | brew | 94c0d8917eb11f68313bb962b9a595c6bbbd4fd1.json | fix: allow sparkle without a macOS version | Library/Homebrew/cask/audit.rb | @@ -550,7 +550,7 @@ def check_livecheck_min_os
return unless cask.livecheckable?
return unless cask.livecheck.strategy == :sparkle
- out, _, status = curl_output(cask.livecheck.url)
+ out, _, status = curl_output("--fail", "--silent", "--location", cask.livecheck.url)
return unless stat... | true |
Other | Homebrew | brew | 94c0d8917eb11f68313bb962b9a595c6bbbd4fd1.json | fix: allow sparkle without a macOS version | Library/Homebrew/cask/dsl/depends_on.rb | @@ -11,6 +11,7 @@ class DSL
#
# @api private
class DependsOn < SimpleDelegator
+ extend T::Sig
VALID_KEYS = Set.new([
:formula,
:cask,
@@ -49,6 +50,7 @@ def cask=(*args)
@cask.concat(args)
end
+ sig { params(args: String).returns(T.nilable(MacOSRequire... | true |
Other | Homebrew | brew | d8940d3caecb2c174542a74569360a0942f39f92.json | devcontainer/on-create-command: do more stuff.
- fix permissions
- install more gems/formulae
- remove system shellcheck that won't be used | .devcontainer/on-create-command.sh | @@ -1,10 +1,22 @@
#!/bin/bash
set -e
+# fix permissions so Homebrew and Bundler don't complain
+sudo chmod -R g-w,o-w /home/linuxbrew
+
+# install Homebrew's development gems
+brew install-bundler-gems
+
+# install Homebrew formulae we might need
+brew install shellcheck shfmt gh gnu-tar
+
+# cleanup any mess
+brew... | false |
Other | Homebrew | brew | dd39b2be6449ecc83b92fbac9a8983afe330093b.json | Add VSCode devcontainers
Should be useful for getting a development environment setup quickly. | .devcontainer/devcontainer.json | @@ -0,0 +1,10 @@
+{
+ "name": "Homebrew/brew",
+ "image": "ghcr.io/homebrew/brew:latest",
+ "workspaceFolder": "/home/linuxbrew/.linuxbrew/Homebrew",
+ "workspaceMount": "source=${localWorkspaceFolder},target=/home/linuxbrew/.linuxbrew/Homebrew,type=bind,consistency=cached",
+ "onCreateCommand": ".devcontainer/on-... | true |
Other | Homebrew | brew | dd39b2be6449ecc83b92fbac9a8983afe330093b.json | Add VSCode devcontainers
Should be useful for getting a development environment setup quickly. | .devcontainer/on-create-command.sh | @@ -0,0 +1,10 @@
+#!/bin/bash
+set -e
+
+sudo apt-get update
+sudo apt-get install -y \
+ -o Dpkg::Options::=--force-confdef \
+ -o Dpkg::Options::=--force-confnew \
+ zsh \
+ shellcheck \
+ zsh-autosuggestions | true |
Other | Homebrew | brew | dd39b2be6449ecc83b92fbac9a8983afe330093b.json | Add VSCode devcontainers
Should be useful for getting a development environment setup quickly. | .devcontainer/ubuntu18.04/devcontainer.json | @@ -0,0 +1,10 @@
+{
+ "name": "Homebrew/brew-ubuntu18.04",
+ "image": "ghcr.io/homebrew/ubuntu18.04:latest",
+ "workspaceFolder": "/home/linuxbrew/.linuxbrew/Homebrew",
+ "workspaceMount": "source=${localWorkspaceFolder},target=/home/linuxbrew/.linuxbrew/Homebrew,type=bind,consistency=cached",
+ "onCreateCommand":... | true |
Other | Homebrew | brew | dd39b2be6449ecc83b92fbac9a8983afe330093b.json | Add VSCode devcontainers
Should be useful for getting a development environment setup quickly. | .gitignore | @@ -171,7 +171,8 @@
# Unignore our `brew` script.
!/bin/brew
-# Unignore our documentation/completions.
+# Unignore our configuration/completions/documentation.
+!/.devcontainer
!/.github
!/completions
!/docs | true |
Other | Homebrew | brew | 9256a01afeb94611f3fa7024f96f6558cd235f4f.json | Apply suggestions from code review
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/cask/artifact/moved.rb | @@ -44,7 +44,7 @@ def move(adopt: false, force: false, verbose: false, command: nil, **options)
ohai "Adopting existing #{self.class.english_name} at '#{target}'"
same = command.run(
"/usr/bin/diff",
- args: ["-rq", source, target],
+ args: ... | false |
Other | Homebrew | brew | 476b5e74246b72c50fc02d7c0b9b6b8ae1291e18.json | os/mac/diagnostic: allow Ruby 2.6.10 on < Ventura | Library/Homebrew/extend/os/mac/diagnostic.rb | @@ -205,19 +205,13 @@ def check_if_xcode_needs_clt_installed
end
def check_ruby_version
- # TODO: update portable-ruby to 2.6.10 when Ventura reaches RC
- required_version = if MacOS.version >= :ventura &&
- ENV["HOMEBREW_RUBY_PATH"].to_s.exclude?("/vendor/port... | false |
Other | Homebrew | brew | 8cb056c657756abe6f225eeb85dd01e403004bbf.json | Remove sitedir from LOAD_PATH | Library/Homebrew/brew.sh | @@ -724,7 +724,7 @@ then
fi
# Disable Ruby options we don't need.
-RUBY_DISABLE_OPTIONS="--disable=rubyopt"
+RUBY_DISABLE_OPTIONS="--disable=gems,rubyopt"
if [[ -z "${HOMEBREW_RUBY_WARNINGS}" ]]
then | true |
Other | Homebrew | brew | 8cb056c657756abe6f225eeb85dd01e403004bbf.json | Remove sitedir from LOAD_PATH | Library/Homebrew/standalone/load_path.rb | @@ -1,8 +1,12 @@
# typed: true
# frozen_string_literal: true
-require "pathname"
+# We trust base Ruby to provide what we need.
+# Don't look into the user-installed sitedir, which may contain older versions of RubyGems.
+require "rbconfig"
+$LOAD_PATH.reject! { |path| path.start_with?(RbConfig::CONFIG["sitedir"]) ... | true |
Other | Homebrew | brew | 8cb056c657756abe6f225eeb85dd01e403004bbf.json | Remove sitedir from LOAD_PATH | Library/Homebrew/utils/gems.rb | @@ -44,6 +44,9 @@ def odie_if_defined(message)
end
def setup_gem_environment!(setup_path: true)
+ require "rubygems"
+ raise "RubyGems too old!" if Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.2.0")
+
# Match where our bundler gems are.
gem_home = "#{HOMEBREW_LIBRARY_PATH}/vendor/bundle/... | true |
Other | Homebrew | brew | cc358c2cadd16751f4df925b0a14a781de4a0160.json | Fix minor version typo | docs/Installation.md | @@ -86,7 +86,7 @@ Uninstallation is documented in the [FAQ](FAQ.md).
<a name="1"><sup>1</sup></a> For 32-bit or PPC support see [Tigerbrew](https://github.com/mistydemeo/tigerbrew).
-<a name="2"><sup>2</sup></a> macOS 11 (Ventura) or higher is best and supported, 10.11 (El Capitan) – 10.14 (Mojave) are unsupported... | false |
Other | Homebrew | brew | 237a4181c08de37d87966a68f3f7aeaf9ce9c414.json | Add docs for casks that use git URLs | docs/Cask-Cookbook.md | @@ -1138,6 +1138,18 @@ In rare cases, a distribution may not be available over ordinary HTTP/S. Subvers
| `revision:` | a string identifying the subversion revision to download
| `trust_cert:` | set to `true` to automatically trust the certificate presented by the server (avoiding an interactive prompt)
... | false |
Other | Homebrew | brew | a715dec49d825da2c09da3e3fe83d7009a415cb8.json | Add `--adopt` switch
Allows `brew install` & co. to adopt existing cask artifacts that are
identical to those being installed.
Discussion: #14006 | Library/Homebrew/cask/artifact/moved.rb | @@ -34,8 +34,33 @@ def summarize_installed
private
- def move(force: false, command: nil, **options)
+ def move(adopt: false, force: false, verbose: false, command: nil, **options)
+ unless source.exist?
+ raise CaskError, "It seems the #{self.class.english_name} source '#{source}' ... | true |
Other | Homebrew | brew | a715dec49d825da2c09da3e3fe83d7009a415cb8.json | Add `--adopt` switch
Allows `brew install` & co. to adopt existing cask artifacts that are
identical to those being installed.
Discussion: #14006 | Library/Homebrew/cask/cmd/install.rb | @@ -10,6 +10,10 @@ class Install < AbstractCommand
extend T::Sig
OPTIONS = [
+ [:switch, "--adopt", {
+ description: "Adopt existing artifacts in the destination that are identical to those being installed. " \
+ "Cannot be combined with --force.",
+ }],
... | true |
Other | Homebrew | brew | a715dec49d825da2c09da3e3fe83d7009a415cb8.json | Add `--adopt` switch
Allows `brew install` & co. to adopt existing cask artifacts that are
identical to those being installed.
Discussion: #14006 | Library/Homebrew/cask/cmd/reinstall.rb | @@ -16,6 +16,7 @@ def run
binaries: args.binaries?,
verbose: args.verbose?,
force: args.force?,
+ adopt: args.adopt?,
skip_cask_deps: args.skip_cask_deps?,
require_sha: args.require_sha?,
quarantine: args.qu... | true |
Other | Homebrew | brew | a715dec49d825da2c09da3e3fe83d7009a415cb8.json | Add `--adopt` switch
Allows `brew install` & co. to adopt existing cask artifacts that are
identical to those being installed.
Discussion: #14006 | Library/Homebrew/cask/cmd/upgrade.rb | @@ -13,6 +13,10 @@ class Upgrade < AbstractCommand
extend T::Sig
OPTIONS = [
+ [:switch, "--adopt", {
+ description: "Adopt existing artifacts in the destination that are identical to those being installed. " \
+ "Cannot be combined with --force.",
+ }],
... | true |
Other | Homebrew | brew | a715dec49d825da2c09da3e3fe83d7009a415cb8.json | Add `--adopt` switch
Allows `brew install` & co. to adopt existing cask artifacts that are
identical to those being installed.
Discussion: #14006 | Library/Homebrew/cask/installer.rb | @@ -20,14 +20,15 @@ class Installer
extend Predicable
- def initialize(cask, command: SystemCommand, force: false,
+ def initialize(cask, command: SystemCommand, force: false, adopt: false,
skip_cask_deps: false, binaries: true, verbose: false,
zap: false, require_... | true |
Other | Homebrew | brew | a715dec49d825da2c09da3e3fe83d7009a415cb8.json | Add `--adopt` switch
Allows `brew install` & co. to adopt existing cask artifacts that are
identical to those being installed.
Discussion: #14006 | Library/Homebrew/cmd/install.rb | @@ -140,6 +140,7 @@ def install_args
conflicts "--ignore-dependencies", "--only-dependencies"
conflicts "--build-from-source", "--build-bottle", "--force-bottle"
+ conflicts "--adopt", "--force"
named_args [:formula, :cask], min: 1
end
@@ -193,6 +194,7 @@ def install
binaries... | true |
Other | Homebrew | brew | a715dec49d825da2c09da3e3fe83d7009a415cb8.json | Add `--adopt` switch
Allows `brew install` & co. to adopt existing cask artifacts that are
identical to those being installed.
Discussion: #14006 | Library/Homebrew/cmd/reinstall.rb | @@ -152,6 +152,7 @@ def reinstall
binaries: args.binaries?,
verbose: args.verbose?,
force: args.force?,
+ adopt: args.adopt?,
require_sha: args.require_sha?,
skip_cask_deps: args.skip_cask_deps?,
quarantine: args.quaranti... | true |
Other | Homebrew | brew | a715dec49d825da2c09da3e3fe83d7009a415cb8.json | Add `--adopt` switch
Allows `brew install` & co. to adopt existing cask artifacts that are
identical to those being installed.
Discussion: #14006 | Library/Homebrew/cmd/upgrade.rb | @@ -97,6 +97,7 @@ def upgrade_args
cask_options
conflicts "--build-from-source", "--force-bottle"
+ conflicts "--adopt", "--force"
named_args [:outdated_formula, :outdated_cask]
end
@@ -226,6 +227,7 @@ def upgrade_outdated_casks(casks, args:)
Cask::Cmd::Upgrade.upgrade_casks(
... | true |
Other | Homebrew | brew | a715dec49d825da2c09da3e3fe83d7009a415cb8.json | Add `--adopt` switch
Allows `brew install` & co. to adopt existing cask artifacts that are
identical to those being installed.
Discussion: #14006 | Library/Homebrew/test/cask/artifact/app_spec.rb | @@ -4,13 +4,14 @@
describe Cask::Artifact::App, :cask do
let(:cask) { Cask::CaskLoader.load(cask_path("local-caffeine")) }
let(:command) { SystemCommand }
+ let(:adopt) { false }
let(:force) { false }
let(:app) { cask.artifacts.find { |a| a.is_a?(described_class) } }
let(:source_path) { cask.staged_p... | true |
Other | Homebrew | brew | cc78b155c6f1ced33b864f21613f29b235ca1c7a.json | Add stable checksum to the JSON API | Library/Homebrew/formula.rb | @@ -2107,6 +2107,7 @@ def to_hash
"url" => stable.url,
"tag" => stable.specs[:tag],
"revision" => stable.specs[:revision],
+ "checksum" => stable.checksum&.to_s,
}
hsh["bottle"]["stable"] = bottle_hash if bottle_defined? | true |
Other | Homebrew | brew | cc78b155c6f1ced33b864f21613f29b235ca1c7a.json | Add stable checksum to the JSON API | Library/Homebrew/formulary.rb | @@ -159,6 +159,7 @@ def self.load_formula_from_api(name, flags:)
stable do
url urls_stable["url"]
version json_formula["versions"]["stable"]
+ sha256 urls_stable["checksum"] if urls_stable["checksum"].present?
end
end
| true |
Other | Homebrew | brew | 6219cd0a9279989caf56eb1f6c530c69ae5dd713.json | Use different cache tag for sparse checkouts | Library/Homebrew/download_strategy.rb | @@ -811,10 +811,13 @@ def clone_repo(timeout: nil)
# @api public
class GitDownloadStrategy < VCSDownloadStrategy
def initialize(url, name, version, **meta)
+ # Needs to be before the call to `super`, as the VCSDownloadStrategy's
+ # constructor calls `cache_tag` and sets the cache path.
+ @only_paths = me... | false |
Other | Homebrew | brew | bfd22634252577fc851c6a925bf796dd1cd3c0a1.json | integration_test: fix Bundler deprecation.
Otherwise in some configurations some tests will fail. | Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb | @@ -116,7 +116,7 @@ def brew(*args)
ruby_args << (HOMEBREW_LIBRARY_PATH/"brew.rb").resolved_path.to_s
end
- Bundler.with_clean_env do
+ Bundler.with_unbundled_env do
stdout, stderr, status = Open3.capture3(env, *@ruby_args, *args)
$stdout.print stdout
$stderr.print stderr
@@ -12... | false |
Other | Homebrew | brew | 40199404cfe26492bc24577d73b893871644c8b2.json | Allow livecheck method in on_system blocks
It's sometimes necessary to have a `livecheck` block in an `on_macos`
or `on_linux` block. For example, a formula may be disabled on macOS
but not on Linux. In that scenario, we only want a `livecheck` block
to apply to Linux, so livecheck will automatically skip the formula
... | Library/Homebrew/rubocops/components_order.rb | @@ -120,14 +120,15 @@ def check_on_system_block_content(component_precedence_list, on_system_block)
end
end
on_system_allowed_methods = %w[
- depends_on
- patch
- resource
- deprecate!
+ livecheck
+ keg_only
... | false |
Other | Homebrew | brew | 1db08dc8b643982070b3c0e9d3f975f1332fe3af.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 | @@ -267,14 +267,6 @@ class Bundler::Definition
def self.no_lock=(no_lock); end
end
-class Bundler::DepProxy
- def clone(); end
-end
-
-class Bundler::DepProxy
- def self.get_proxy(dep, platform); end
-end
-
class Bundler::Dependency
def branch(); end
@@ -318,6 +310,7 @@ end
class Bundler::EndpointSpecifi... | false |
Other | Homebrew | brew | 942f419a48426d14a1b49d35f343cbe00a583e71.json | ResourceAuditor: Fix #audit_head_branch error
The existing logic in `#audit_head_branch` for identifying the `HEAD`
branch in a Git repository will give an ```undefined method `[]' for
nil:NilClass``` error when a repository doesn't provide this
reference. Expected output is as follows:
```
ref: refs/heads/master HE... | Library/Homebrew/resource_auditor.rb | @@ -146,9 +146,8 @@ def audit_head_branch
return if specs[:tag].present?
branch = Utils.popen_read("git", "ls-remote", "--symref", url, "HEAD")
- .match(%r{ref: refs/heads/(.*?)\s+HEAD})[1]
-
- return if branch == specs[:branch]
+ .match(%r{ref: refs/heads/(.*?... | false |
Other | Homebrew | brew | f54de5a8481bc9dc4ab2880a69c98efc6f4a9552.json | Fix curl_output for curl download strategy | Library/Homebrew/download_strategy.rb | @@ -580,6 +580,13 @@ def _curl_download(resolved_url, to, timeout)
curl_download resolved_url, to: to, try_partial: @try_partial, timeout: timeout, use_homebrew_curl: true
end
+
+ def curl_output(*args, **options)
+ raise HomebrewCurlDownloadStrategyError, url unless Formula["curl"].any_version_installed?... | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.