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 | d0c138ad985fa70f55792288f73a31e01656e37b.json | cache: Remove slashes from documentation | Library/Homebrew/cmd/--cache.rb | @@ -11,11 +11,11 @@ module Homebrew
def __cache_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
- `--cache` [<options>] [<formula/cask>]
+ `--cache` [<options>] [<formula>]
Display Homebrew's download cache. See also `HOMEBREW_CACHE`.
- If <formula/cask> is provided, display the file or directory used to cache <formula/cask>.
+ If <formula> is provided, display the file or directory used to cache <formula>.
EOS
switch "-s", "--build-from-source",
description: "Show the cache file used when building from source." | false |
Other | Homebrew | brew | 11fbf9d035033467009ae0252b4496b34923c425.json | cache: Add flags for printing only formulae or casks | Library/Homebrew/cmd/--cache.rb | @@ -11,17 +11,22 @@ module Homebrew
def __cache_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
- `--cache` [<options>] [<formula>]
+ `--cache` [<options>] [<formula/cask>]
Display Homebrew's download cache. See also `HOMEBREW_CACHE`.
- If <formula> is provided, display the file or directory used to cache <formula>.
+ If <formula/cask> is provided, display the file or directory used to cache <formula/cask>.
EOS
switch "-s", "--build-from-source",
description: "Show the cache file used when building from source."
switch "--force-bottle",
description: "Show the cache file used when pouring a bottle."
+ switch "--formula",
+ description: "Show cache files for only formulae"
+ switch "--cask",
+ description: "Show cache files for only casks"
conflicts "--build-from-source", "--force-bottle"
+ conflicts "--formula", "--cask"
end
end
@@ -30,26 +35,39 @@ def __cache
if args.no_named?
puts HOMEBREW_CACHE
+ elsif args.formula?
+ args.named.each do |name|
+ print_formula_cache name
+ end
+ elsif args.cask?
+ args.named.each do |name|
+ print_cask_cache name
+ end
else
args.named.each do |name|
- formula = Formulary.factory name
- if Fetch.fetch_bottle?(formula)
- puts formula.bottle.cached_download
- else
- puts formula.cached_download
- end
+ print_formula_cache name
rescue FormulaUnavailableError => e
- formula_error_message = e.message
begin
- cask = Cask::CaskLoader.load name
- puts "cask: #{Cask::Cmd::Cache.cached_location(cask)}"
+ print_cask_cache name
rescue Cask::CaskUnavailableError => e
- cask_error_message = e.message
- odie "No available formula or cask with the name \"#{name}\"\n" \
- "#{formula_error_message}\n" \
- "#{cask_error_message}\n"
+ odie "No available formula or cask with the name \"#{name}\""
end
end
end
end
+
+ def print_formula_cache(name)
+ formula = Formulary.factory name
+ if Fetch.fetch_bottle?(formula)
+ puts formula.bottle.cached_download
+ else
+ puts formula.cached_download
+ end
+ end
+
+ def print_cask_cache(name)
+ cask = Cask::CaskLoader.load name
+ puts Cask::Cmd::Cache.cached_location(cask)
+ end
+
end | false |
Other | Homebrew | brew | 01f78582fa064e807289bb73aed0ea176080eac8.json | Use commands cache in bash/fish completions | completions/bash/brew | @@ -96,8 +96,12 @@ __brew_complete_tapped() {
__brew_complete_commands() {
local cur="${COMP_WORDS[COMP_CWORD]}"
+ HOMEBREW_CACHE=$(brew --cache)
+ HOMEBREW_REPOSITORY=$(brew --repo)
# Do not auto-complete "*instal" or "*uninstal" aliases for "*install" commands.
- local cmds="$(brew commands --quiet --include-aliases | \grep -v instal$)"
+ [[ -f "$HOMEBREW_CACHE/all_commands_list.txt" ]] &&
+ local cmds="$(cat "$HOMEBREW_CACHE/all_commands_list.txt" | \grep -v instal$)" ||
+ local cmds="$(cat "$HOMEBREW_REPOSITORY/completions/internal_commands_list.txt" | \grep -v instal$)"
COMPREPLY=($(compgen -W "$cmds" -- "$cur"))
}
| true |
Other | Homebrew | brew | 01f78582fa064e807289bb73aed0ea176080eac8.json | Use commands cache in bash/fish completions | completions/fish/brew.fish | @@ -181,7 +181,11 @@ function __fish_brew_suggest_taps_pinned -d "List only pinned taps"
end
function __fish_brew_suggest_commands -d "Lists all commands names, including aliases"
- brew commands --quiet --include-aliases
+ if test -f (brew --cache)/all_commands_list.txt
+ cat (brew --cache)/all_commands_list.txt | \grep -v instal\$
+ else
+ cat (brew --repo)/completions/internal_commands_list.txt | \grep -v instal\$
+ end
end
# TODO: any better way to list available services? | true |
Other | Homebrew | brew | 6a3f18b0ae65806710c8d7d7a3b95bef81b05b11.json | OS::Mac::CPU: add Apple Silicon
Co-authored-by: Shaun Jackman <sjackman@gmail.com> | Library/Homebrew/extend/os/mac/hardware/cpu.rb | @@ -11,12 +11,16 @@ def type
case sysctl_int("hw.cputype")
when 7
:intel
+ when MachO::Headers::CPU_TYPE_ARM64
+ :arm
else
:dunno
end
end
def family
+ return :dunno if arm?
+
case sysctl_int("hw.cpufamily")
when 0x73d67300 # Yonah: Core Solo/Duo
:core | false |
Other | Homebrew | brew | 6106bfc4976dff2b03cf3fadbbf92dd1fd9e0f09.json | Enable patchelf.rb for HOMEBREW_DEVELOPERs.
HOMEBREW_PATCHELF_RB is enabled on 2 cases.
1) `HOMEBREW_PATCHELF_RB` is set
2) `HOMEBREW_DEVELOPER` is set , and `HOMEBREW_NO_PATCHELF_RB` is not set.
use `HOMEBREW_NO_PATCHELF_RB` to turn it off for devs.
Note: When HOMEBREW_PATCHELF_RB and HOMEBREW_NO_PATCHELF_RB both are
present, it is on | Library/Homebrew/os/linux/global.rb | @@ -1,7 +1,8 @@
# frozen_string_literal: true
# enables experimental readelf.rb, patchelf support.
-HOMEBREW_PATCHELF_RB = ENV["HOMEBREW_PATCHELF_RB"].present?.freeze
+HOMEBREW_PATCHELF_RB = (ENV["HOMEBREW_PATCHELF_RB"].present? ||
+ (ENV["HOMEBREW_DEVELOPER"].present? && ENV["HOMEBREW_NO_PATCHELF_RB"].blank?)).freeze
module Homebrew
DEFAULT_PREFIX ||= if Homebrew::EnvConfig.force_homebrew_on_linux? | false |
Other | Homebrew | brew | 8d29e79f7eb4c6169fd6b0ec2149a7bcf51be45b.json | OS::Mac::Version: add Big Sur | Library/Homebrew/os/mac/version.rb | @@ -6,6 +6,7 @@ module OS
module Mac
class Version < ::Version
SYMBOLS = {
+ big_sur: "10.16",
catalina: "10.15",
mojave: "10.14",
high_sierra: "10.13", | false |
Other | Homebrew | brew | 7c24ff19d56b73051b3e7f8f6f3fd0a8b325dcb6.json | args: remove unused field | Library/Homebrew/cli/args.rb | @@ -38,7 +38,6 @@ def freeze_named_args!(named_args)
@resolved_formulae = nil
@formulae_paths = nil
@casks = nil
- @formulae_and_casks = nil
@kegs = nil
self[:named_args] = named_args | false |
Other | Homebrew | brew | 36520b0a9d54a19635b953613ed7a37863ae9a7e.json | cache: fix bug when calling class method | Library/Homebrew/cask/cmd/--cache.rb | @@ -16,7 +16,7 @@ def initialize(*)
def run
casks.each do |cask|
- puts cached_location(cask)
+ puts self.class.cached_location(cask)
end
end
| false |
Other | Homebrew | brew | a919ba9ccd7c26179cd4490ce467ffa0f255ce80.json | srb: resolve error 4012. 18 errors => 13 errors | Library/Homebrew/os/mac/xquartz.rb | @@ -2,9 +2,7 @@
module OS
module Mac
- X11 = XQuartz = Module.new # rubocop:disable Style/MutableConstant
-
- module XQuartz
+ X11 = XQuartz = Module.new do # rubocop:disable Style/MutableConstant
module_function
DEFAULT_BUNDLE_PATH = Pathname.new("Applications/Utilities/XQuartz.app").freeze | false |
Other | Homebrew | brew | cf6ff4d84ce30d79b2247d95daff96f01b917793.json | cache: add test for casks | Library/Homebrew/test/cmd/--cache_spec.rb | @@ -13,4 +13,18 @@
.and not_to_output.to_stderr
.and be_a_success
end
+
+ it "prints the cache files for a given Cask" do
+ expect { brew "--cache", cask_path("local-caffeine") }
+ .to output(%r{cask: #{HOMEBREW_CACHE}/downloads/[\da-f]{64}--caffeine\.zip}).to_stdout
+ .and not_to_output.to_stderr
+ .and be_a_success
+ end
+
+ it "prints the cache files for a given Formula and Cask" do
+ expect { brew "--cache", testball, cask_path("local-caffeine") }
+ .to output(%r{#{HOMEBREW_CACHE}/downloads/[\da-f]{64}--testball-.*\ncask: #{HOMEBREW_CACHE}/downloads/[\da-f]{64}--caffeine\.zip}).to_stdout
+ .and not_to_output.to_stderr
+ .and be_a_success
+ end
end | false |
Other | Homebrew | brew | 049528132582a5587f353a8a015a8f918ecdab44.json | home: write tests using cask as argument | Library/Homebrew/cmd/--cache.rb | @@ -32,23 +32,20 @@ def __cache
puts HOMEBREW_CACHE
else
args.named.each do |name|
+ formula = Formulary.factory name
+ if Fetch.fetch_bottle?(formula)
+ puts formula.bottle.cached_download
+ else
+ puts formula.cached_download
+ end
+ rescue FormulaUnavailableError
begin
- formula = Formulary.factory name
- if Fetch.fetch_bottle?(formula)
- puts formula.bottle.cached_download
- else
- puts formula.cached_download
- end
- rescue FormulaUnavailableError => e
- begin
- cask = Cask::CaskLoader.load name
- puts "cask: #{Cask::Cmd::Cache.cached_location(cask)}"
- rescue Cask::CaskUnavailableError
- ofail "No available formula or cask with the name \"#{name}\""
- end
+ cask = Cask::CaskLoader.load name
+ puts "cask: #{Cask::Cmd::Cache.cached_location(cask)}"
+ rescue Cask::CaskUnavailableError
+ ofail "No available formula or cask with the name \"#{name}\""
end
end
end
end
-
end | true |
Other | Homebrew | brew | 049528132582a5587f353a8a015a8f918ecdab44.json | home: write tests using cask as argument | Library/Homebrew/cmd/home.rb | @@ -25,21 +25,20 @@ def home
if args.no_named?
exec_browser HOMEBREW_WWW
else
- homepages = args.named.flat_map do |name|
+ homepages = args.named.flat_map do |ref|
+ [Formulary.factory(ref).homepage]
+ rescue FormulaUnavailableError => e
+ puts e.message
begin
- [Formulary.factory(name).homepage]
- rescue FormulaUnavailableError => e
+ cask = Cask::CaskLoader.load(ref)
+ puts "Found a cask with ref \"#{ref}\" instead."
+ [cask.homepage]
+ rescue Cask::CaskUnavailableError => e
puts e.message
- begin
- cask = Cask::CaskLoader.load(name)
- puts "Found a cask named \"#{name}\" instead."
- [cask.homepage]
- rescue Cask::CaskUnavailableError
- []
- end
+ []
end
end
- exec_browser *homepages
+ exec_browser(*homepages) unless homepages.empty?
end
end
end | true |
Other | Homebrew | brew | 049528132582a5587f353a8a015a8f918ecdab44.json | home: write tests using cask as argument | Library/Homebrew/test/cmd/home_spec.rb | @@ -1,17 +1,43 @@
# frozen_string_literal: true
require "cmd/shared_examples/args_parse"
+require "support/lib/config"
describe "Homebrew.home_args" do
it_behaves_like "parseable arguments"
end
describe "brew home", :integration_test do
+ let(:testballhome_homepage) {
+ Formula["testballhome"].homepage
+ }
+
+ let(:local_caffeine_homepage) {
+ Cask::CaskLoader.load(cask_path("local-caffeine")).homepage
+ }
+
it "opens the homepage for a given Formula" do
setup_test_formula "testballhome"
expect { brew "home", "testballhome", "HOMEBREW_BROWSER" => "echo" }
- .to output("#{Formula["testballhome"].homepage}\n").to_stdout
+ .to output("#{testballhome_homepage}\n").to_stdout
+ .and not_to_output.to_stderr
+ .and be_a_success
+ end
+
+ it "opens the homepage for a given Cask" do
+ expect { brew "home", cask_path("local-caffeine"), "HOMEBREW_BROWSER" => "echo" }
+ .to output(/Found a cask with ref ".*" instead.\n#{local_caffeine_homepage}/m).to_stdout
+ .and not_to_output.to_stderr
+ .and be_a_success
+ end
+
+ it "opens the homepages for a given formula and Cask" do
+ setup_test_formula "testballhome"
+
+ expect { brew "home", "testballhome", cask_path("local-caffeine"), "HOMEBREW_BROWSER" => "echo" }
+ .to output(/Found a cask with ref ".*" instead.\n#{testballhome_homepage} #{local_caffeine_homepage}/m)
+ .to_stdout
.and not_to_output.to_stderr
.and be_a_success
end | true |
Other | Homebrew | brew | d6e587453e166c2c62ef05c06f19b70a21914c7f.json | srb: resolve error 4015. 25 errors => 18 errors | Library/Homebrew/os/linux.rb | @@ -27,7 +27,7 @@ module Mac
# rubocop:disable Naming/ConstantName
# rubocop:disable Style/MutableConstant
- ::MacOS = self
+ ::MacOS = OS::Mac
# rubocop:enable Naming/ConstantName
# rubocop:enable Style/MutableConstant
| true |
Other | Homebrew | brew | d6e587453e166c2c62ef05c06f19b70a21914c7f.json | srb: resolve error 4015. 25 errors => 18 errors | Library/Homebrew/os/mac.rb | @@ -12,7 +12,7 @@ module Mac
# rubocop:disable Naming/ConstantName
# rubocop:disable Style/MutableConstant
- ::MacOS = self
+ ::MacOS = OS::Mac
# rubocop:enable Naming/ConstantName
# rubocop:enable Style/MutableConstant
| true |
Other | Homebrew | brew | d6e587453e166c2c62ef05c06f19b70a21914c7f.json | srb: resolve error 4015. 25 errors => 18 errors | Library/Homebrew/sorbet/rbi/todo.rbi | @@ -7,13 +7,6 @@ module ELFShim::Metadata::PatchELF::PatchError; end
module ELFShim::PatchELF::PatchError; end
module ELFShim::PatchELF::Patcher; end
module Homebrew::Error; end
-module MacOS::CLT; end
-module MacOS::CLT::PKG_PATH; end
-module MacOS::Version; end
-module MacOS::Version::SYMBOLS; end
-module MacOS::X11; end
-module MacOS::XQuartz; end
-module MacOS::Xcode; end
module OS::Mac::Version::NULL; end
module T::CompatibilityPatches::RSpecCompatibility::MethodDoubleExtensions; end
module T::CompatibilityPatches::RSpecCompatibility::RecorderExtensions; end | true |
Other | Homebrew | brew | d1b6a8581900458ee5262d727b5611d7290d8ccf.json | show help for aliased commands | Library/Homebrew/brew.rb | @@ -58,6 +58,7 @@ def output_unsupported_error
help_flag = true
elsif !cmd && !help_flag_list.include?(arg)
cmd = ARGV.delete_at(i)
+ cmd = Commands::HOMEBREW_INTERNAL_COMMAND_ALIASES.fetch(cmd, cmd)
end
end
| false |
Other | Homebrew | brew | 2b990aa53c12d873ad2513e7168268c28ca234cf.json | pr-pull: pass verbose and debug to subcommands | Library/Homebrew/dev-cmd/pr-pull.rb | @@ -147,6 +147,8 @@ def mirror_formulae(tap, original_commit, publish: true, org:, repo:)
else
odebug "Mirroring #{mirror_url}"
mirror_args = ["mirror", f.full_name]
+ mirror_args << "--debug" if Homebrew.args.debug?
+ mirror_args << "--verbose" if Homebrew.args.verbose?
mirror_args << "--bintray-org=#{org}" if org
mirror_args << "--bintray-repo=#{repo}" if repo
mirror_args << "--no-publish" unless publish
@@ -247,6 +249,8 @@ def pr_pull
next if args.no_upload?
upload_args = ["pr-upload"]
+ upload_args << "--debug" if Homebrew.args.debug?
+ upload_args << "--verbose" if Homebrew.args.verbose?
upload_args << "--no-publish" if args.no_publish?
upload_args << "--dry-run" if args.dry_run?
upload_args << "--root_url=#{args.root_url}" if args.root_url | true |
Other | Homebrew | brew | 2b990aa53c12d873ad2513e7168268c28ca234cf.json | pr-pull: pass verbose and debug to subcommands | Library/Homebrew/dev-cmd/pr-upload.rb | @@ -21,6 +21,8 @@ def pr_upload_args
description: "Upload to the specified Bintray organisation (default: homebrew)."
flag "--root-url=",
description: "Use the specified <URL> as the root of the bottle's URL instead of Homebrew's default."
+ switch :verbose
+ switch :debug
end
end
@@ -31,6 +33,8 @@ def pr_upload
bintray = Bintray.new(org: bintray_org)
bottle_args = ["bottle", "--merge", "--write"]
+ bottle_args << "--verbose" if args.verbose?
+ bottle_args << "--debug" if args.debug?
bottle_args << "--root-url=#{args.root_url}" if args.root_url
odie "No JSON files found in the current working directory" if Dir["*.json"].empty?
bottle_args += Dir["*.json"] | true |
Other | Homebrew | brew | ceb56df834d558d94251414672b97d1c7833ab95.json | home: integrate brew home and cask home | Library/Homebrew/cmd/home.rb | @@ -23,7 +23,7 @@ def home
if args.no_named?
exec_browser HOMEBREW_WWW
else
- exec_browser(*args.formulae.map(&:homepage))
+ exec_browser(*args.formulae_and_casks.map(&:homepage))
end
end
end | false |
Other | Homebrew | brew | cf76f6e721354db4c0501aeb69164d785a3da13e.json | cache: integrate brew --cache and cask --cache | Library/Homebrew/cask/cmd/--cache.rb | @@ -16,10 +16,14 @@ def initialize(*)
def run
casks.each do |cask|
- puts Download.new(cask).downloader.cached_location
+ puts cached_location(cask)
end
end
+ def self.cached_location(cask)
+ Download.new(cask).downloader.cached_location
+ end
+
def self.help
"display the file used to cache the Cask"
end | true |
Other | Homebrew | brew | cf76f6e721354db4c0501aeb69164d785a3da13e.json | cache: integrate brew --cache and cask --cache | Library/Homebrew/cmd/--cache.rb | @@ -2,6 +2,7 @@
require "fetch"
require "cli/parser"
+require "cask/cmd"
module Homebrew
module_function
@@ -29,13 +30,21 @@ def __cache
if args.no_named?
puts HOMEBREW_CACHE
else
- args.formulae.each do |f|
- if Fetch.fetch_bottle?(f)
- puts f.bottle.cached_download
- else
- puts f.cached_download
+ args.formulae_and_casks.each do |formula_or_cask|
+ case formula_or_cask
+ when Formula
+ formula = formula_or_cask
+ if Fetch.fetch_bottle?(formula)
+ puts formula.bottle.cached_download
+ else
+ puts formula.cached_download
+ end
+ when Cask::Cask
+ cask = formula_or_cask
+ puts "cask: #{Cask::Cmd::Cache.cached_location(cask)}"
end
end
end
end
+
end | true |
Other | Homebrew | brew | 72ebd2127f65d3edf0951b5b3e39b277808ce9cb.json | args: add method to retrieve formula and casks | Library/Homebrew/cli/args.rb | @@ -38,6 +38,7 @@ def freeze_named_args!(named_args)
@resolved_formulae = nil
@formulae_paths = nil
@casks = nil
+ @formulae_and_casks = nil
@kegs = nil
self[:named_args] = named_args
@@ -107,6 +108,23 @@ def casks
.freeze
end
+ def formulae_and_casks
+ require "cask/cask_loader"
+ require "cask/exceptions"
+
+ @formulae_and_casks ||= downcased_unique_named.map do |name|
+ begin
+ Formulary.factory(name, spec)
+ rescue FormulaUnavailableError => e
+ begin
+ Cask::CaskLoader.load(name)
+ rescue Cask::CaskUnavailableError
+ raise e
+ end
+ end
+ end.uniq.freeze
+ end
+
def kegs
require "keg"
require "formula" | false |
Other | Homebrew | brew | c244e992afbab4e74fa5134c21c345e281b3f5aa.json | extend/pathname: add args argument to write_env_script | Library/Homebrew/extend/pathname.rb | @@ -346,13 +346,17 @@ def write_exec_script(*targets)
end
# Writes an exec script that sets environment variables
- def write_env_script(target, env)
+ def write_env_script(target, args, env = nil)
+ unless env
+ env = args
+ args = nil
+ end
env_export = +""
env.each { |key, value| env_export << "#{key}=\"#{value}\" " }
dirname.mkpath
write <<~SH
#!/bin/bash
- #{env_export}exec "#{target}" "$@"
+ #{env_export}exec "#{target}" #{args} "$@"
SH
end
| false |
Other | Homebrew | brew | cd93d4e38a4a850680cde1edef63448633a9f1dd.json | language/java: add support for OpenJDK formula | Library/Homebrew/extend/os/mac/language/java.rb | @@ -4,17 +4,25 @@ module Language
module Java
def self.system_java_home_cmd(version = nil)
version_flag = " --version #{version}" if version
- "/usr/libexec/java_home#{version_flag}"
+ "/usr/libexec/java_home#{version_flag} --failfast 2>/dev/null"
end
private_class_method :system_java_home_cmd
def self.java_home(version = nil)
+ f = find_openjdk_formula(version)
+ return f.opt_libexec/"openjdk.jdk/Contents/Home" if f
+
cmd = system_java_home_cmd(version)
- Pathname.new Utils.popen_read(cmd).chomp
+ path = Utils.popen_read(cmd).chomp
+
+ Pathname.new path if path.present?
end
# @private
def self.java_home_shell(version = nil)
+ f = find_openjdk_formula(version)
+ return (f.opt_libexec/"openjdk.jdk/Contents/Home").to_s if f
+
"$(#{system_java_home_cmd(version)})"
end
end | true |
Other | Homebrew | brew | cd93d4e38a4a850680cde1edef63448633a9f1dd.json | language/java: add support for OpenJDK formula | Library/Homebrew/language/java.rb | @@ -2,7 +2,31 @@
module Language
module Java
+ def self.find_openjdk_formula(version = nil)
+ can_be_newer = version&.end_with?("+")
+ version = version.to_i
+
+ openjdk = Formula["openjdk"]
+ [openjdk, *openjdk.versioned_formulae].find do |f|
+ next false unless f.any_version_installed?
+
+ unless version.zero?
+ major = f.version.to_s[/\d+/].to_i
+ next false if major < version
+ next false if major > version && !can_be_newer
+ end
+
+ true
+ end
+ rescue FormulaUnavailableError
+ nil
+ end
+ private_class_method :find_openjdk_formula
+
def self.java_home(version = nil)
+ f = find_openjdk_formula(version)
+ return f.opt_libexec if f
+
req = JavaRequirement.new [*version]
raise UnsatisfiedRequirements, req.message unless req.satisfied?
| true |
Other | Homebrew | brew | b2cccfcf68b131d2eab734b1e105a5b0407a06ba.json | Apply suggestions from code review
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/dev-cmd/audit.rb | @@ -353,7 +353,7 @@ def audit_license
if @spdx_ids.key?(formula.license)
return unless @online
- user, repo = get_repo_data(%r{https?://github\.com/([^/]+)/([^/]+)/?.*}, false)
+ user, repo = get_repo_data(%r{https?://github\.com/([^/]+)/([^/]+)/?.*})
return if user.nil?
github_license = GitHub.get_repo_license(user, repo)
@@ -369,19 +369,6 @@ def audit_license
end
end
- # def get_github_repo_license_data(user, repo)
- # return unless @online
- #
- # begin
- # res = GitHub.open_api("#{GitHub::API_URL}/repos/#{user}/#{repo}/license")
- # return unless res.key?("license")
- #
- # res["license"]["spdx_id"] || nil
- # rescue GitHub::HTTPNotFoundError
- # nil
- # end
- # end
-
def audit_deps
@specs.each do |spec|
# Check for things we don't like to depend on.
@@ -590,8 +577,6 @@ def get_repo_data(regex, new_formula_only = true)
return unless @core_tap
return unless @online
- return unless @new_formula || !new_formula_only
-
_, user, repo = *regex.match(formula.stable.url) if formula.stable
_, user, repo = *regex.match(formula.homepage) unless user
return if !user || !repo | false |
Other | Homebrew | brew | eca528ccccf2c73c6059fc821f756de7630c6251.json | util github: remove nil as that is already expected behaviour
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/utils/github.rb | @@ -480,7 +480,7 @@ def get_repo_license(user, repo)
res = GitHub.open_api("#{GitHub::API_URL}/repos/#{user}/#{repo}/license")
return unless res.key?("license")
- res["license"]["spdx_id"] || nil
+ res["license"]["spdx_id"]
rescue GitHub::HTTPNotFoundError
nil
end | false |
Other | Homebrew | brew | 4b8745f32b0220214084df67d6f67b3386724de4.json | srb: resolve error 4010. 28 errors=> 25 errors
Sorbet was reporting errors (error code: 4010) on the auto-generated tapioca RBI files.
Since sorbet-typed has a good enough RBI for json hence we can exclude json from tapioca generation using the --exclude flag. | Library/Homebrew/sorbet/rbi/gems/json@2.3.0.rbi | @@ -1,87 +0,0 @@
-# This file is autogenerated. Do not edit it by hand. Regenerate it with:
-# tapioca sync
-
-# typed: true
-
-class Class < ::Module
- def json_creatable?; end
-end
-
-module JSON
-
- private
-
- def dump(obj, anIO = _, limit = _); end
- def fast_generate(obj, opts = _); end
- def fast_unparse(obj, opts = _); end
- def generate(obj, opts = _); end
- def load(source, proc = _, options = _); end
- def parse(source, opts = _); end
- def parse!(source, opts = _); end
- def pretty_generate(obj, opts = _); end
- def pretty_unparse(obj, opts = _); end
- def recurse_proc(result, &proc); end
- def restore(source, proc = _, options = _); end
- def unparse(obj, opts = _); end
-
- def self.[](object, opts = _); end
- def self.create_id; end
- def self.create_id=(_); end
- def self.deep_const_get(path); end
- def self.dump(obj, anIO = _, limit = _); end
- def self.dump_default_options; end
- def self.dump_default_options=(_); end
- def self.fast_generate(obj, opts = _); end
- def self.fast_unparse(obj, opts = _); end
- def self.generate(obj, opts = _); end
- def self.generator; end
- def self.generator=(generator); end
- def self.iconv(to, from, string); end
- def self.load(source, proc = _, options = _); end
- def self.load_default_options; end
- def self.load_default_options=(_); end
- def self.parse(source, opts = _); end
- def self.parse!(source, opts = _); end
- def self.parser; end
- def self.parser=(parser); end
- def self.pretty_generate(obj, opts = _); end
- def self.pretty_unparse(obj, opts = _); end
- def self.recurse_proc(result, &proc); end
- def self.restore(source, proc = _, options = _); end
- def self.state; end
- def self.state=(_); end
- def self.unparse(obj, opts = _); end
-end
-
-class JSON::GenericObject < ::OpenStruct
- def as_json(*_); end
- def to_hash; end
- def to_json(*a); end
- def |(other); end
-
- def self.dump(obj, *args); end
- def self.from_hash(object); end
- def self.json_creatable=(_); end
- def self.json_creatable?; end
- def self.json_create(data); end
- def self.load(source, proc = _, opts = _); end
-end
-
-class JSON::JSONError < ::StandardError
- def self.wrap(exception); end
-end
-
-JSON::Parser = JSON::Ext::Parser
-
-JSON::State = JSON::Ext::Generator::State
-
-JSON::UnparserError = JSON::GeneratorError
-
-module Kernel
-
- private
-
- def JSON(object, *args); end
- def j(*objs); end
- def jj(*objs); end
-end | true |
Other | Homebrew | brew | 4b8745f32b0220214084df67d6f67b3386724de4.json | srb: resolve error 4010. 28 errors=> 25 errors
Sorbet was reporting errors (error code: 4010) on the auto-generated tapioca RBI files.
Since sorbet-typed has a good enough RBI for json hence we can exclude json from tapioca generation using the --exclude flag. | Library/Homebrew/sorbet/rbi/hidden-definitions/errors.txt | @@ -3499,6 +3499,7 @@
# wrong constant name class_attribute<defaultArg>4
# wrong constant name class_attribute<defaultArg>5
# wrong constant name class_attribute
+# wrong constant name json_creatable?
# wrong constant name <Class:Duo>
# wrong constant name <Class:Encoders>
# wrong constant name <Class:FileType>
@@ -13075,7 +13076,7 @@
# wrong constant name <Class:NormalizeRGBTriple>
# wrong constant name <Class:WeightedEuclideanDistance>
# wrong constant name <static-init>
-# undefined method `weighted_euclidean_distance_to<defaultArg>1' for module `#<Module:0x00007faec77ec8e0>'
+# undefined method `weighted_euclidean_distance_to<defaultArg>1' for module `#<Module:0x00007f8ad76ac2c8>'
# wrong constant name weighted_euclidean_distance_to<defaultArg>1
# wrong constant name weighted_euclidean_distance_to
# wrong constant name <static-init> | true |
Other | Homebrew | brew | 4b8745f32b0220214084df67d6f67b3386724de4.json | srb: resolve error 4010. 28 errors=> 25 errors
Sorbet was reporting errors (error code: 4010) on the auto-generated tapioca RBI files.
Since sorbet-typed has a good enough RBI for json hence we can exclude json from tapioca generation using the --exclude flag. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -5854,6 +5854,8 @@ class Class
def any_instance(); end
def class_attribute(*attrs, instance_accessor: T.unsafe(nil), instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_predicate: T.unsafe(nil), default: T.unsafe(nil)); end
+
+ def json_creatable?(); end
end
module CodeRay
@@ -10311,6 +10313,12 @@ class JSON::Ext::Parser
def initialize(*_); end
end
+JSON::Parser = JSON::Ext::Parser
+
+JSON::State = JSON::Ext::Generator::State
+
+JSON::UnparserError = JSON::GeneratorError
+
class JavaRequirement::CaskSuggestion
def self.[](*_); end
| true |
Other | Homebrew | brew | d92f747b1e1ac9e4fdc4f839174cf36d89aab879.json | create: add license field as parsable arg | Library/Homebrew/dev-cmd/create.rb | @@ -45,8 +45,11 @@ def create_args
description: "Explicitly set the <name> of the new formula."
flag "--set-version=",
description: "Explicitly set the <version> of the new formula."
+ flag "--set-license=",
+ description: "Explicitly set the <license> of the new formula."
flag "--tap=",
description: "Generate the new formula within the given tap, specified as <user>`/`<repo>."
+
switch :force
switch :verbose
switch :debug
@@ -66,11 +69,13 @@ def create
version = args.set_version
name = args.set_name
+ license = args.set_license
tap = args.tap
fc = FormulaCreator.new
fc.name = name
fc.version = version
+ fc.license = license
fc.tap = Tap.fetch(tap || "homebrew/core")
raise TapUnavailableError, tap unless fc.tap.installed?
| true |
Other | Homebrew | brew | d92f747b1e1ac9e4fdc4f839174cf36d89aab879.json | create: add license field as parsable arg | Library/Homebrew/formula_creator.rb | @@ -5,8 +5,8 @@
module Homebrew
class FormulaCreator
- attr_reader :url, :sha256, :desc, :homepage, :license
- attr_accessor :name, :version, :tap, :path, :mode
+ attr_reader :url, :sha256, :desc, :homepage
+ attr_accessor :name, :version, :tap, :path, :mode, :license
def url=(url)
@url = url
@@ -49,6 +49,7 @@ def head?
end
def generate!
+ p "generate"
raise "#{path} already exists" if path.exist?
if version.nil? || version.null? | true |
Other | Homebrew | brew | b5584fc03516189befad312aead01c2c3dc002eb.json | update: Update the symbolic ref origin/HEAD | Library/Homebrew/cmd/update-reset.sh | @@ -38,6 +38,7 @@ homebrew-update-reset() {
cd "$DIR" || continue
ohai "Fetching $DIR..."
git fetch --force --tags origin
+ git remote set-head origin --auto >/dev/null
echo
ohai "Resetting $DIR..." | true |
Other | Homebrew | brew | b5584fc03516189befad312aead01c2c3dc002eb.json | update: Update the symbolic ref origin/HEAD | Library/Homebrew/cmd/update.sh | @@ -38,6 +38,7 @@ git_init_if_necessary() {
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
latest_tag="$(git ls-remote --tags --refs -q origin | tail -n1 | cut -f2)"
git fetch --force origin --shallow-since="$latest_tag"
+ git remote set-head origin --auto >/dev/null
git reset --hard origin/master
SKIP_FETCH_BREW_REPOSITORY=1
set +e
@@ -59,6 +60,7 @@ git_init_if_necessary() {
git config remote.origin.url "$HOMEBREW_CORE_GIT_REMOTE"
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
git fetch --force --depth=1 origin refs/heads/master:refs/remotes/origin/master
+ git remote set-head origin --auto >/dev/null
git reset --hard origin/master
SKIP_FETCH_CORE_REPOSITORY=1
set +e
@@ -84,6 +86,11 @@ upstream_branch() {
local upstream_branch
upstream_branch="$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null)"
+ if [[ -z "$upstream_branch" ]]
+ then
+ git remote set-head origin --auto >/dev/null
+ upstream_branch="$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null)"
+ fi
upstream_branch="${upstream_branch#refs/remotes/origin/}"
[[ -z "$upstream_branch" ]] && upstream_branch="master"
echo "$upstream_branch" | true |
Other | Homebrew | brew | ba824d9488de3ad4e8efd58478f3ba3d9aaf1684.json | audit: remove spdx-id as a attr_reader attribute | Library/Homebrew/dev-cmd/audit.rb | @@ -206,7 +206,7 @@ def reverse_line_number(regex)
class FormulaAuditor
include FormulaCellarChecks
- attr_reader :formula, :text, :problems, :new_formula_problems, :spdx_ids
+ attr_reader :formula, :text, :problems, :new_formula_problems
def initialize(formula, options = {})
@formula = formula
@@ -358,7 +358,7 @@ def audit_license
return if github_license && (github_license == formula.license)
problem "License mismatch - Github license is: #{github_license}, \
-but Formulae license states: #{formula.license}"
+but Formulae license states: #{formula.license}."
else
problem "#{formula.license} is not a standard SPDX license id."
end | false |
Other | Homebrew | brew | ff1016b72997c3f6f33d39d48b335c08c734df24.json | Modify code to load spdx data once | Library/Homebrew/dev-cmd/audit.rb | @@ -110,7 +110,9 @@ def audit
# Check style in a single batch run up front for performance
style_results = Style.check_style_json(style_files, options) if style_files
-
+ # load licenses
+ path = File.join(File.dirname(__FILE__),"spdx.json")
+ spdx_ids = JSON.load( File.open(File.expand_path(path)))
new_formula_problem_lines = []
audit_formulae.sort.each do |f|
only = only_cops ? ["style"] : args.only
@@ -121,6 +123,7 @@ def audit
git: git,
only: only,
except: args.except,
+ spdx_ids: spdx_ids
}
options[:style_offenses] = style_results.file_offenses(f.path) if style_results
options[:display_cop_names] = args.display_cop_names?
@@ -224,6 +227,7 @@ def initialize(formula, options = {})
@new_formula_problems = []
@text = FormulaText.new(formula.path)
@specs = %w[stable devel head].map { |s| formula.send(s) }.compact
+ @spdx_ids = options[:spdx_ids]
end
def audit_style
@@ -343,11 +347,8 @@ def audit_formula_name
].freeze
def audit_licenses
- path = File.join(File.dirname(__FILE__),"spdx.json")
- file = File.open(File.expand_path(path))
- valid_licenses = JSON.load(file)
unless formula.license.nil?
- if valid_licenses.key?(formula.license)
+ if @spdx_ids.key?(formula.license)
return unless @online
user, repo = get_repo_data(%r{https?://github\.com/([^/]+)/([^/]+)/?.*}, false)
return if user.nil? | false |
Other | Homebrew | brew | 73d2c986893139e4a479d4c12e7eeab70c541a97.json | Gemfile: add tapioca gem | .gitignore | @@ -130,6 +130,7 @@
**/vendor/bundle/ruby/*/gems/simplecov-html-*/
**/vendor/bundle/ruby/*/gems/sorbet-*/
**/vendor/bundle/ruby/*/gems/sorbet-runtime-*/
+**/vendor/bundle/ruby/*/gems/tapioca-*/
**/vendor/bundle/ruby/*/gems/term-ansicolor-*/
**/vendor/bundle/ruby/*/gems/thor-*/
**/vendor/bundle/ruby/*/gems/tins-*/ | true |
Other | Homebrew | brew | 73d2c986893139e4a479d4c12e7eeab70c541a97.json | Gemfile: add tapioca gem | Library/Homebrew/Gemfile | @@ -16,6 +16,7 @@ gem "simplecov", require: false
if ENV["HOMEBREW_SORBET"]
gem "sorbet"
gem "sorbet-runtime"
+ gem "tapioca"
end
# vendored gems | true |
Other | Homebrew | brew | f94a38e4b1c0276557a2e2807554bd729ded6864.json | tap-new: restrict new tap names.
Don't want to restrict this for all taps otherwise existing ones may
explode.
Fixes #7734 | Library/Homebrew/dev-cmd/tap-new.rb | @@ -22,7 +22,10 @@ def tap_new_args
def tap_new
tap_new_args.parse
+ tap_name = args.named.first
tap = Tap.fetch(args.named.first)
+ raise "Invalid tap name '#{tap_name}'" unless tap.path.to_s.match?(HOMEBREW_TAP_PATH_REGEX)
+
titleized_user = tap.user.dup
titleized_repo = tap.repo.dup
titleized_user[0] = titleized_user[0].upcase | true |
Other | Homebrew | brew | f94a38e4b1c0276557a2e2807554bd729ded6864.json | tap-new: restrict new tap names.
Don't want to restrict this for all taps otherwise existing ones may
explode.
Fixes #7734 | Library/Homebrew/tap.rb | @@ -34,10 +34,7 @@ def self.fetch(*args)
return CoreTap.instance if ["Homebrew", "Linuxbrew"].include?(user) && ["core", "homebrew"].include?(repo)
cache_key = "#{user}/#{repo}".downcase
- tap = cache.fetch(cache_key) { |key| cache[key] = Tap.new(user, repo) }
- raise "Invalid tap name '#{args.join("/")}'" unless tap.path.to_s.match?(HOMEBREW_TAP_PATH_REGEX)
-
- tap
+ cache.fetch(cache_key) { |key| cache[key] = Tap.new(user, repo) }
end
def self.from_path(path) | true |
Other | Homebrew | brew | 0495b533264ae1a566790180a7a1333e85f3186d.json | add files.yaml to override typed sigil | Library/Homebrew/sorbet/files.yaml | @@ -0,0 +1,937 @@
+ignore:
+ - ./bintray.rb
+ - ./bottle_publisher.rb
+ - ./brew.rb
+ - ./build.rb
+ - ./cask/artifact/abstract_artifact.rb
+ - ./cask/artifact/abstract_flight_block.rb
+ - ./cask/artifact/abstract_uninstall.rb
+ - ./cask/artifact/app.rb
+ - ./cask/artifact/artifact.rb
+ - ./cask/artifact/audio_unit_plugin.rb
+ - ./cask/artifact/binary.rb
+ - ./cask/artifact/colorpicker.rb
+ - ./cask/artifact/dictionary.rb
+ - ./cask/artifact/font.rb
+ - ./cask/artifact/input_method.rb
+ - ./cask/artifact/installer.rb
+ - ./cask/artifact/internet_plugin.rb
+ - ./cask/artifact/manpage.rb
+ - ./cask/artifact/mdimporter.rb
+ - ./cask/artifact/moved.rb
+ - ./cask/artifact/pkg.rb
+ - ./cask/artifact/postflight_block.rb
+ - ./cask/artifact/preflight_block.rb
+ - ./cask/artifact/prefpane.rb
+ - ./cask/artifact/qlplugin.rb
+ - ./cask/artifact/relocated.rb
+ - ./cask/artifact/screen_saver.rb
+ - ./cask/artifact/service.rb
+ - ./cask/artifact/stage_only.rb
+ - ./cask/artifact/suite.rb
+ - ./cask/artifact/symlinked.rb
+ - ./cask/artifact/uninstall.rb
+ - ./cask/artifact/vst3_plugin.rb
+ - ./cask/artifact/vst_plugin.rb
+ - ./cask/artifact/zap.rb
+ - ./cask/audit.rb
+ - ./cask/auditor.rb
+ - ./cask/cask.rb
+ - ./cask/cask_loader.rb
+ - ./cask/caskroom.rb
+ - ./cask/checkable.rb
+ - ./cask/cmd.rb
+ - ./cask/cmd/--cache.rb
+ - ./cask/cmd/abstract_command.rb
+ - ./cask/cmd/abstract_internal_command.rb
+ - ./cask/cmd/audit.rb
+ - ./cask/cmd/cat.rb
+ - ./cask/cmd/create.rb
+ - ./cask/cmd/doctor.rb
+ - ./cask/cmd/edit.rb
+ - ./cask/cmd/fetch.rb
+ - ./cask/cmd/help.rb
+ - ./cask/cmd/home.rb
+ - ./cask/cmd/info.rb
+ - ./cask/cmd/install.rb
+ - ./cask/cmd/internal_help.rb
+ - ./cask/cmd/internal_stanza.rb
+ - ./cask/cmd/list.rb
+ - ./cask/cmd/outdated.rb
+ - ./cask/cmd/reinstall.rb
+ - ./cask/cmd/style.rb
+ - ./cask/cmd/uninstall.rb
+ - ./cask/cmd/upgrade.rb
+ - ./cask/cmd/zap.rb
+ - ./cask/download.rb
+ - ./cask/dsl.rb
+ - ./cask/dsl/base.rb
+ - ./cask/dsl/caveats.rb
+ - ./cask/dsl/conflicts_with.rb
+ - ./cask/dsl/depends_on.rb
+ - ./cask/dsl/postflight.rb
+ - ./cask/dsl/preflight.rb
+ - ./cask/dsl/uninstall_preflight.rb
+ - ./cask/exceptions.rb
+ - ./cask/installer.rb
+ - ./cask/metadata.rb
+ - ./cask/pkg.rb
+ - ./cask/quarantine.rb
+ - ./cask/staged.rb
+ - ./cask/utils.rb
+ - ./cask/verify.rb
+ - ./caveats.rb
+ - ./cleaner.rb
+ - ./cleanup.rb
+ - ./cli/args.rb
+ - ./cli/parser.rb
+ - ./cmd/--cache.rb
+ - ./cmd/--cellar.rb
+ - ./cmd/--env.rb
+ - ./cmd/--prefix.rb
+ - ./cmd/--repository.rb
+ - ./cmd/--version.rb
+ - ./cmd/analytics.rb
+ - ./cmd/cleanup.rb
+ - ./cmd/commands.rb
+ - ./cmd/config.rb
+ - ./cmd/deps.rb
+ - ./cmd/desc.rb
+ - ./cmd/doctor.rb
+ - ./cmd/fetch.rb
+ - ./cmd/gist-logs.rb
+ - ./cmd/help.rb
+ - ./cmd/home.rb
+ - ./cmd/info.rb
+ - ./cmd/install.rb
+ - ./cmd/leaves.rb
+ - ./cmd/link.rb
+ - ./cmd/list.rb
+ - ./cmd/log.rb
+ - ./cmd/migrate.rb
+ - ./cmd/missing.rb
+ - ./cmd/options.rb
+ - ./cmd/outdated.rb
+ - ./cmd/pin.rb
+ - ./cmd/postinstall.rb
+ - ./cmd/readall.rb
+ - ./cmd/reinstall.rb
+ - ./cmd/search.rb
+ - ./cmd/switch.rb
+ - ./cmd/tap-info.rb
+ - ./cmd/tap.rb
+ - ./cmd/uninstall.rb
+ - ./cmd/unlink.rb
+ - ./cmd/unpin.rb
+ - ./cmd/untap.rb
+ - ./cmd/update-report.rb
+ - ./cmd/upgrade.rb
+ - ./cmd/uses.rb
+ - ./commands.rb
+ - ./compat/language/python.rb
+ - ./compilers.rb
+ - ./cxxstdlib.rb
+ - ./debrew.rb
+ - ./debrew/irb.rb
+ - ./dependencies.rb
+ - ./dependency.rb
+ - ./dependency_collector.rb
+ - ./description_cache_store.rb
+ - ./descriptions.rb
+ - ./dev-cmd/audit.rb
+ - ./dev-cmd/bottle.rb
+ - ./dev-cmd/bump-formula-pr.rb
+ - ./dev-cmd/bump-revision.rb
+ - ./dev-cmd/cat.rb
+ - ./dev-cmd/command.rb
+ - ./dev-cmd/create.rb
+ - ./dev-cmd/diy.rb
+ - ./dev-cmd/edit.rb
+ - ./dev-cmd/extract.rb
+ - ./dev-cmd/formula.rb
+ - ./dev-cmd/install-bundler-gems.rb
+ - ./dev-cmd/irb.rb
+ - ./dev-cmd/linkage.rb
+ - ./dev-cmd/man.rb
+ - ./dev-cmd/mirror.rb
+ - ./dev-cmd/pr-automerge.rb
+ - ./dev-cmd/pr-publish.rb
+ - ./dev-cmd/pr-pull.rb
+ - ./dev-cmd/pr-upload.rb
+ - ./dev-cmd/prof.rb
+ - ./dev-cmd/pull.rb
+ - ./dev-cmd/release-notes.rb
+ - ./dev-cmd/ruby.rb
+ - ./dev-cmd/sh.rb
+ - ./dev-cmd/style.rb
+ - ./dev-cmd/tap-new.rb
+ - ./dev-cmd/test.rb
+ - ./dev-cmd/tests.rb
+ - ./dev-cmd/unpack.rb
+ - ./dev-cmd/update-test.rb
+ - ./dev-cmd/vendor-gems.rb
+ - ./development_tools.rb
+ - ./diagnostic.rb
+ - ./download_strategy.rb
+ - ./env_config.rb
+ - ./exceptions.rb
+ - ./extend/ENV.rb
+ - ./extend/ENV/shared.rb
+ - ./extend/ENV/std.rb
+ - ./extend/ENV/super.rb
+ - ./extend/os/linux/dependency_collector.rb
+ - ./extend/os/linux/extend/ENV/std.rb
+ - ./extend/os/linux/extend/ENV/super.rb
+ - ./extend/os/linux/hardware/cpu.rb
+ - ./extend/os/linux/install.rb
+ - ./extend/os/linux/keg_relocate.rb
+ - ./extend/os/linux/requirements/osxfuse_requirement.rb
+ - ./extend/os/linux/system_config.rb
+ - ./extend/os/linux/tap.rb
+ - ./extend/os/linux/utils/analytics.rb
+ - ./extend/os/mac/dependency_collector.rb
+ - ./extend/os/mac/development_tools.rb
+ - ./extend/os/mac/diagnostic.rb
+ - ./extend/os/mac/extend/ENV/shared.rb
+ - ./extend/os/mac/extend/ENV/std.rb
+ - ./extend/os/mac/extend/ENV/super.rb
+ - ./extend/os/mac/extend/pathname.rb
+ - ./extend/os/mac/formula_cellar_checks.rb
+ - ./extend/os/mac/hardware.rb
+ - ./extend/os/mac/missing_formula.rb
+ - ./extend/os/mac/requirements/x11_requirement.rb
+ - ./extend/os/mac/search.rb
+ - ./extend/os/mac/software_spec.rb
+ - ./extend/os/mac/system_config.rb
+ - ./extend/os/mac/unpack_strategy/zip.rb
+ - ./extend/os/mac/utils/bottles.rb
+ - ./extend/pathname.rb
+ - ./formula.rb
+ - ./formula_assertions.rb
+ - ./formula_cellar_checks.rb
+ - ./formula_creator.rb
+ - ./formula_info.rb
+ - ./formula_installer.rb
+ - ./formula_versions.rb
+ - ./formulary.rb
+ - ./global.rb
+ - ./help.rb
+ - ./install.rb
+ - ./keg.rb
+ - ./language/go.rb
+ - ./language/java.rb
+ - ./language/node.rb
+ - ./language/python.rb
+ - ./linkage_checker.rb
+ - ./lock_file.rb
+ - ./migrator.rb
+ - ./missing_formula.rb
+ - ./os/linux.rb
+ - ./os/mac.rb
+ - ./os/mac/keg.rb
+ - ./os/mac/mach.rb
+ - ./os/mac/sdk.rb
+ - ./os/mac/version.rb
+ - ./os/mac/xcode.rb
+ - ./os/mac/xquartz.rb
+ - ./patch.rb
+ - ./postinstall.rb
+ - ./readall.rb
+ - ./reinstall.rb
+ - ./requirement.rb
+ - ./requirements/java_requirement.rb
+ - ./requirements/macos_requirement.rb
+ - ./requirements/xcode_requirement.rb
+ - ./resource.rb
+ - ./rubocops/cask/ast/cask_block.rb
+ - ./rubocops/cask/extend/node.rb
+ - ./rubocops/cask/stanza_grouping.rb
+ - ./rubocops/caveats.rb
+ - ./rubocops/checksum.rb
+ - ./rubocops/class.rb
+ - ./rubocops/components_order.rb
+ - ./rubocops/components_redundancy.rb
+ - ./rubocops/conflicts.rb
+ - ./rubocops/dependency_order.rb
+ - ./rubocops/extend/formula.rb
+ - ./rubocops/files.rb
+ - ./rubocops/formula_desc.rb
+ - ./rubocops/homepage.rb
+ - ./rubocops/keg_only.rb
+ - ./rubocops/lines.rb
+ - ./rubocops/options.rb
+ - ./rubocops/patches.rb
+ - ./rubocops/text.rb
+ - ./rubocops/urls.rb
+ - ./rubocops/uses_from_macos.rb
+ - ./rubocops/version.rb
+ - ./sandbox.rb
+ - ./search.rb
+ - ./software_spec.rb
+ - ./style.rb
+ - ./system_command.rb
+ - ./system_config.rb
+ - ./tab.rb
+ - ./tap.rb
+ - ./test.rb
+ - ./test/ENV_spec.rb
+ - ./test/bintray_spec.rb
+ - ./test/bottle_publisher_spec.rb
+ - ./test/cask/artifact/alt_target_spec.rb
+ - ./test/cask/artifact/app_spec.rb
+ - ./test/cask/artifact/binary_spec.rb
+ - ./test/cask/artifact/generic_artifact_spec.rb
+ - ./test/cask/artifact/installer_spec.rb
+ - ./test/cask/artifact/manpage_spec.rb
+ - ./test/cask/artifact/pkg_spec.rb
+ - ./test/cask/artifact/postflight_block_spec.rb
+ - ./test/cask/artifact/preflight_block_spec.rb
+ - ./test/cask/artifact/shared_examples/uninstall_zap.rb
+ - ./test/cask/artifact/suite_spec.rb
+ - ./test/cask/artifact/two_apps_correct_spec.rb
+ - ./test/cask/artifact/uninstall_no_zap_spec.rb
+ - ./test/cask/artifact/uninstall_spec.rb
+ - ./test/cask/artifact/zap_spec.rb
+ - ./test/cask/audit_spec.rb
+ - ./test/cask/cask_loader/from__path_loader_spec.rb
+ - ./test/cask/cask_spec.rb
+ - ./test/cask/cmd/audit_spec.rb
+ - ./test/cask/cmd/cache_spec.rb
+ - ./test/cask/cmd/cat_spec.rb
+ - ./test/cask/cmd/create_spec.rb
+ - ./test/cask/cmd/doctor_spec.rb
+ - ./test/cask/cmd/edit_spec.rb
+ - ./test/cask/cmd/fetch_spec.rb
+ - ./test/cask/cmd/home_spec.rb
+ - ./test/cask/cmd/info_spec.rb
+ - ./test/cask/cmd/install_spec.rb
+ - ./test/cask/cmd/internal_stanza_spec.rb
+ - ./test/cask/cmd/list_spec.rb
+ - ./test/cask/cmd/outdated_spec.rb
+ - ./test/cask/cmd/reinstall_spec.rb
+ - ./test/cask/cmd/shared_examples/requires_cask_token.rb
+ - ./test/cask/cmd/style_spec.rb
+ - ./test/cask/cmd/uninstall_spec.rb
+ - ./test/cask/cmd/upgrade_spec.rb
+ - ./test/cask/cmd/zap_spec.rb
+ - ./test/cask/cmd_spec.rb
+ - ./test/cask/conflicts_with_spec.rb
+ - ./test/cask/depends_on_spec.rb
+ - ./test/cask/dsl/caveats_spec.rb
+ - ./test/cask/dsl/postflight_spec.rb
+ - ./test/cask/dsl/preflight_spec.rb
+ - ./test/cask/dsl/shared_examples/staged.rb
+ - ./test/cask/dsl/uninstall_postflight_spec.rb
+ - ./test/cask/dsl/uninstall_preflight_spec.rb
+ - ./test/cask/dsl_spec.rb
+ - ./test/cask/installer_spec.rb
+ - ./test/cask/macos_spec.rb
+ - ./test/cask/pkg_spec.rb
+ - ./test/cask/quarantine_spec.rb
+ - ./test/cask/verify_spec.rb
+ - ./test/checksum_verification_spec.rb
+ - ./test/cleanup_spec.rb
+ - ./test/cli/parser_spec.rb
+ - ./test/cmd/--version_spec.rb
+ - ./test/cmd/config_spec.rb
+ - ./test/cmd/log_spec.rb
+ - ./test/cmd/readall_spec.rb
+ - ./test/cmd/uninstall_spec.rb
+ - ./test/cmd/update-report_spec.rb
+ - ./test/commands_spec.rb
+ - ./test/compiler_selector_spec.rb
+ - ./test/dependencies_spec.rb
+ - ./test/dependency_collector_spec.rb
+ - ./test/dependency_expansion_spec.rb
+ - ./test/dependency_spec.rb
+ - ./test/description_cache_store_spec.rb
+ - ./test/dev-cmd/audit_spec.rb
+ - ./test/dev-cmd/create_spec.rb
+ - ./test/dev-cmd/extract_spec.rb
+ - ./test/diagnostic_checks_spec.rb
+ - ./test/download_strategies_spec.rb
+ - ./test/error_during_execution_spec.rb
+ - ./test/exceptions_spec.rb
+ - ./test/formula_info_spec.rb
+ - ./test/formula_installer_bottle_spec.rb
+ - ./test/formula_installer_spec.rb
+ - ./test/formula_spec.rb
+ - ./test/formula_validation_spec.rb
+ - ./test/formulary_spec.rb
+ - ./test/keg_spec.rb
+ - ./test/language/perl/shebang_spec.rb
+ - ./test/language/python_spec.rb
+ - ./test/lock_file_spec.rb
+ - ./test/migrator_spec.rb
+ - ./test/missing_formula_spec.rb
+ - ./test/os/linux/dependency_collector_spec.rb
+ - ./test/os/mac/diagnostic_spec.rb
+ - ./test/os/mac/formula_spec.rb
+ - ./test/os/mac/software_spec_spec.rb
+ - ./test/os/mac/version_spec.rb
+ - ./test/os/mac_spec.rb
+ - ./test/patch_spec.rb
+ - ./test/patching_spec.rb
+ - ./test/requirements/macos_requirement_spec.rb
+ - ./test/resource_spec.rb
+ - ./test/rubocops/files_spec.rb
+ - ./test/rubocops/keg_only_spec.rb
+ - ./test/rubocops/urls_spec.rb
+ - ./test/sandbox_spec.rb
+ - ./test/search_spec.rb
+ - ./test/software_spec_spec.rb
+ - ./test/spec_helper.rb
+ - ./test/support/fixtures/cask/Casks/compat/with-depends-on-macos-string.rb
+ - ./test/support/fixtures/cask/Casks/with-depends-on-macos-array.rb
+ - ./test/support/fixtures/cask/Casks/with-depends-on-macos-failure.rb
+ - ./test/support/fixtures/cask/Casks/with-depends-on-macos-symbol.rb
+ - ./test/support/fixtures/testball_bottle.rb
+ - ./test/support/helper/cask/fake_system_command.rb
+ - ./test/support/helper/cask/install_helper.rb
+ - ./test/support/helper/cask/never_sudo_system_command.rb
+ - ./test/support/helper/formula.rb
+ - ./test/support/helper/integration_mocks.rb
+ - ./test/support/helper/spec/shared_context/homebrew_cask.rb
+ - ./test/support/helper/spec/shared_context/integration_test.rb
+ - ./test/support/no_seed_progress_formatter.rb
+ - ./test/system_command_spec.rb
+ - ./test/tab_spec.rb
+ - ./test/tap_spec.rb
+ - ./test/unpack_strategy/dmg_spec.rb
+ - ./test/unpack_strategy/jar_spec.rb
+ - ./test/unpack_strategy/subversion_spec.rb
+ - ./test/unpack_strategy/xar_spec.rb
+ - ./test/utils/analytics_spec.rb
+ - ./test/utils/bottles/bintray_spec.rb
+ - ./test/utils/bottles/bottles_spec.rb
+ - ./test/utils/bottles/collector_spec.rb
+ - ./test/utils/fork_spec.rb
+ - ./test/utils/user_spec.rb
+ - ./test/utils_spec.rb
+ - ./test/x11_requirement_spec.rb
+ - ./unpack_strategy.rb
+ - ./unpack_strategy/air.rb
+ - ./unpack_strategy/bazaar.rb
+ - ./unpack_strategy/bzip2.rb
+ - ./unpack_strategy/cab.rb
+ - ./unpack_strategy/compress.rb
+ - ./unpack_strategy/cvs.rb
+ - ./unpack_strategy/directory.rb
+ - ./unpack_strategy/dmg.rb
+ - ./unpack_strategy/executable.rb
+ - ./unpack_strategy/fossil.rb
+ - ./unpack_strategy/generic_unar.rb
+ - ./unpack_strategy/git.rb
+ - ./unpack_strategy/gzip.rb
+ - ./unpack_strategy/jar.rb
+ - ./unpack_strategy/lha.rb
+ - ./unpack_strategy/lua_rock.rb
+ - ./unpack_strategy/lzip.rb
+ - ./unpack_strategy/lzma.rb
+ - ./unpack_strategy/mercurial.rb
+ - ./unpack_strategy/microsoft_office_xml.rb
+ - ./unpack_strategy/otf.rb
+ - ./unpack_strategy/p7zip.rb
+ - ./unpack_strategy/pax.rb
+ - ./unpack_strategy/pkg.rb
+ - ./unpack_strategy/rar.rb
+ - ./unpack_strategy/self_extracting_executable.rb
+ - ./unpack_strategy/sit.rb
+ - ./unpack_strategy/subversion.rb
+ - ./unpack_strategy/tar.rb
+ - ./unpack_strategy/ttf.rb
+ - ./unpack_strategy/xar.rb
+ - ./unpack_strategy/xz.rb
+ - ./unpack_strategy/zip.rb
+ - ./utils.rb
+ - ./utils/analytics.rb
+ - ./utils/bottles.rb
+ - ./utils/curl.rb
+ - ./utils/fork.rb
+ - ./utils/formatter.rb
+ - ./utils/git.rb
+ - ./utils/github.rb
+ - ./utils/notability.rb
+ - ./utils/popen.rb
+ - ./utils/tty.rb
+ - ./utils/user.rb
+
+false:
+ - ./PATH.rb
+ - ./build_environment.rb
+ - ./cask/cmd/options.rb
+ - ./cask/config.rb
+ - ./cask/dsl/appcast.rb
+ - ./cask/dsl/container.rb
+ - ./cask/dsl/version.rb
+ - ./cask/topological_hash.rb
+ - ./cmd/cask.rb
+ - ./compat/extend/nil.rb
+ - ./compat/extend/string.rb
+ - ./compat/formula.rb
+ - ./compat/language/haskell.rb
+ - ./compat/language/java.rb
+ - ./compat/os/mac.rb
+ - ./dependable.rb
+ - ./extend/git_repository.rb
+ - ./extend/hash_validator.rb
+ - ./extend/io.rb
+ - ./extend/module.rb
+ - ./extend/os/linux/diagnostic.rb
+ - ./extend/os/linux/extend/ENV/shared.rb
+ - ./extend/os/linux/formula_cellar_checks.rb
+ - ./extend/os/linux/linkage_checker.rb
+ - ./extend/os/linux/requirements/java_requirement.rb
+ - ./extend/os/mac/caveats.rb
+ - ./extend/os/mac/hardware/cpu.rb
+ - ./extend/os/mac/keg_relocate.rb
+ - ./extend/os/mac/language/java.rb
+ - ./extend/os/mac/requirements/java_requirement.rb
+ - ./extend/os/mac/requirements/osxfuse_requirement.rb
+ - ./extend/predicable.rb
+ - ./extend/string.rb
+ - ./fetch.rb
+ - ./formula_pin.rb
+ - ./hardware.rb
+ - ./keg_relocate.rb
+ - ./language/perl.rb
+ - ./messages.rb
+ - ./mktemp.rb
+ - ./options.rb
+ - ./os.rb
+ - ./os/linux/elf.rb
+ - ./os/linux/glibc.rb
+ - ./os/linux/global.rb
+ - ./os/linux/kernel.rb
+ - ./os/mac/architecture_list.rb
+ - ./pkg_version.rb
+ - ./requirements/arch_requirement.rb
+ - ./requirements/codesign_requirement.rb
+ - ./requirements/linux_requirement.rb
+ - ./requirements/tuntap_requirement.rb
+ - ./requirements/x11_requirement.rb
+ - ./rubocops/cask/homepage_matches_url.rb
+ - ./rubocops/cask/homepage_url_trailing_slash.rb
+ - ./rubocops/cask/mixin/cask_help.rb
+ - ./rubocops/cask/mixin/on_homepage_stanza.rb
+ - ./rubocops/cask/no_dsl_version.rb
+ - ./rubocops/cask/stanza_order.rb
+ - ./searchable.rb
+ - ./test/PATH_spec.rb
+ - ./test/bash_spec.rb
+ - ./test/bottle_filename_spec.rb
+ - ./test/build_environment_spec.rb
+ - ./test/build_options_spec.rb
+ - ./test/cache_store_spec.rb
+ - ./test/cask/cask_loader/from_content_loader_spec.rb
+ - ./test/cask/cask_loader/from_uri_loader_spec.rb
+ - ./test/cask/cmd/options_spec.rb
+ - ./test/cask/cmd/shared_examples/invalid_option.rb
+ - ./test/cask/config_spec.rb
+ - ./test/cask/denylist_spec.rb
+ - ./test/cask/dsl/appcast_spec.rb
+ - ./test/cask/dsl/shared_examples/base.rb
+ - ./test/cask/dsl/version_spec.rb
+ - ./test/caveats_spec.rb
+ - ./test/checksum_spec.rb
+ - ./test/cleaner_spec.rb
+ - ./test/cmd/--cache_spec.rb
+ - ./test/cmd/--cellar_spec.rb
+ - ./test/cmd/--env_spec.rb
+ - ./test/cmd/--prefix_spec.rb
+ - ./test/cmd/--repository_spec.rb
+ - ./test/cmd/analytics_spec.rb
+ - ./test/cmd/bundle_spec.rb
+ - ./test/cmd/cask_spec.rb
+ - ./test/cmd/cleanup_spec.rb
+ - ./test/cmd/commands_spec.rb
+ - ./test/cmd/custom-external-command_spec.rb
+ - ./test/cmd/deps_spec.rb
+ - ./test/cmd/desc_spec.rb
+ - ./test/cmd/doctor_spec.rb
+ - ./test/cmd/fetch_spec.rb
+ - ./test/cmd/gist-logs_spec.rb
+ - ./test/cmd/help_spec.rb
+ - ./test/cmd/home_spec.rb
+ - ./test/cmd/info_spec.rb
+ - ./test/cmd/install_spec.rb
+ - ./test/cmd/leaves_spec.rb
+ - ./test/cmd/link_spec.rb
+ - ./test/cmd/list_spec.rb
+ - ./test/cmd/migrate_spec.rb
+ - ./test/cmd/missing_spec.rb
+ - ./test/cmd/options_spec.rb
+ - ./test/cmd/outdated_spec.rb
+ - ./test/cmd/pin_spec.rb
+ - ./test/cmd/postinstall_spec.rb
+ - ./test/cmd/reinstall_spec.rb
+ - ./test/cmd/search_spec.rb
+ - ./test/cmd/services_spec.rb
+ - ./test/cmd/shared_examples/args_parse.rb
+ - ./test/cmd/switch_spec.rb
+ - ./test/cmd/tap-info_spec.rb
+ - ./test/cmd/tap_spec.rb
+ - ./test/cmd/unlink_spec.rb
+ - ./test/cmd/unpin_spec.rb
+ - ./test/cmd/untap_spec.rb
+ - ./test/cmd/upgrade_spec.rb
+ - ./test/cmd/uses_spec.rb
+ - ./test/compiler_failure_spec.rb
+ - ./test/cxxstdlib_spec.rb
+ - ./test/dependable_spec.rb
+ - ./test/descriptions_spec.rb
+ - ./test/dev-cmd/bottle_spec.rb
+ - ./test/dev-cmd/bump-formula-pr_spec.rb
+ - ./test/dev-cmd/bump-revision_spec.rb
+ - ./test/dev-cmd/cat_spec.rb
+ - ./test/dev-cmd/command_spec.rb
+ - ./test/dev-cmd/diy_spec.rb
+ - ./test/dev-cmd/edit_spec.rb
+ - ./test/dev-cmd/formula_spec.rb
+ - ./test/dev-cmd/irb_spec.rb
+ - ./test/dev-cmd/linkage_spec.rb
+ - ./test/dev-cmd/man_spec.rb
+ - ./test/dev-cmd/mirror_spec.rb
+ - ./test/dev-cmd/pr-automerge_spec.rb
+ - ./test/dev-cmd/pr-publish_spec.rb
+ - ./test/dev-cmd/pr-pull_spec.rb
+ - ./test/dev-cmd/pr-upload_spec.rb
+ - ./test/dev-cmd/prof_spec.rb
+ - ./test/dev-cmd/pull_spec.rb
+ - ./test/dev-cmd/release-notes_spec.rb
+ - ./test/dev-cmd/ruby_spec.rb
+ - ./test/dev-cmd/sh_spec.rb
+ - ./test/dev-cmd/style_spec.rb
+ - ./test/dev-cmd/tap-new_spec.rb
+ - ./test/dev-cmd/test_spec.rb
+ - ./test/dev-cmd/unpack_spec.rb
+ - ./test/dev-cmd/vendor-gems_spec.rb
+ - ./test/env_config_spec.rb
+ - ./test/formatter_spec.rb
+ - ./test/formula_free_port_spec.rb
+ - ./test/formula_pin_spec.rb
+ - ./test/formula_spec_selection_spec.rb
+ - ./test/formula_support_spec.rb
+ - ./test/hardware/cpu_spec.rb
+ - ./test/inreplace_spec.rb
+ - ./test/java_requirement_spec.rb
+ - ./test/language/go_spec.rb
+ - ./test/language/java_spec.rb
+ - ./test/language/node_spec.rb
+ - ./test/lazy_object_spec.rb
+ - ./test/linkage_cache_store_spec.rb
+ - ./test/livecheck_spec.rb
+ - ./test/locale_spec.rb
+ - ./test/messages_spec.rb
+ - ./test/options_spec.rb
+ - ./test/os/linux/diagnostic_spec.rb
+ - ./test/os/linux/formula_spec.rb
+ - ./test/os/mac/dependency_collector_spec.rb
+ - ./test/os/mac/java_requirement_spec.rb
+ - ./test/os/mac/keg_spec.rb
+ - ./test/os/mac/mach_spec.rb
+ - ./test/pathname_spec.rb
+ - ./test/pkg_version_spec.rb
+ - ./test/requirement_spec.rb
+ - ./test/requirements/codesign_requirement_spec.rb
+ - ./test/requirements/java_requirement_spec.rb
+ - ./test/requirements/linux_requirement_spec.rb
+ - ./test/requirements/osxfuse_requirement_spec.rb
+ - ./test/requirements_spec.rb
+ - ./test/rubocop_spec.rb
+ - ./test/rubocops/cask/homepage_matches_url_spec.rb
+ - ./test/rubocops/cask/homepage_url_trailing_slash_spec.rb
+ - ./test/rubocops/cask/no_dsl_version_spec.rb
+ - ./test/rubocops/cask/shared_examples/cask_cop.rb
+ - ./test/rubocops/cask/stanza_grouping_spec.rb
+ - ./test/rubocops/cask/stanza_order_spec.rb
+ - ./test/rubocops/caveats_spec.rb
+ - ./test/rubocops/checksum_spec.rb
+ - ./test/rubocops/class_spec.rb
+ - ./test/rubocops/components_order_spec.rb
+ - ./test/rubocops/components_redundancy_spec.rb
+ - ./test/rubocops/conflicts_spec.rb
+ - ./test/rubocops/dependency_order_spec.rb
+ - ./test/rubocops/formula_desc_spec.rb
+ - ./test/rubocops/homepage_spec.rb
+ - ./test/rubocops/lines_spec.rb
+ - ./test/rubocops/options_spec.rb
+ - ./test/rubocops/patches_spec.rb
+ - ./test/rubocops/text_spec.rb
+ - ./test/rubocops/uses_from_macos_spec.rb
+ - ./test/rubocops/version_spec.rb
+ - ./test/searchable_spec.rb
+ - ./test/string_spec.rb
+ - ./test/style_spec.rb
+ - ./test/support/fixtures/cask/Casks/adobe-air.rb
+ - ./test/support/fixtures/cask/Casks/adobe-illustrator.rb
+ - ./test/support/fixtures/cask/Casks/appdir-interpolation.rb
+ - ./test/support/fixtures/cask/Casks/auto-updates.rb
+ - ./test/support/fixtures/cask/Casks/bad-checksum.rb
+ - ./test/support/fixtures/cask/Casks/bad-checksum2.rb
+ - ./test/support/fixtures/cask/Casks/basic-cask.rb
+ - ./test/support/fixtures/cask/Casks/booby-trap.rb
+ - ./test/support/fixtures/cask/Casks/container-7z.rb
+ - ./test/support/fixtures/cask/Casks/container-bzip2.rb
+ - ./test/support/fixtures/cask/Casks/container-cab.rb
+ - ./test/support/fixtures/cask/Casks/container-dmg.rb
+ - ./test/support/fixtures/cask/Casks/container-gzip.rb
+ - ./test/support/fixtures/cask/Casks/container-pkg.rb
+ - ./test/support/fixtures/cask/Casks/container-tar-gz.rb
+ - ./test/support/fixtures/cask/Casks/container-xar.rb
+ - ./test/support/fixtures/cask/Casks/devmate-with-appcast.rb
+ - ./test/support/fixtures/cask/Casks/devmate-without-appcast.rb
+ - ./test/support/fixtures/cask/Casks/generic-artifact-absolute-target.rb
+ - ./test/support/fixtures/cask/Casks/generic-artifact-relative-target.rb
+ - ./test/support/fixtures/cask/Casks/github-with-appcast.rb
+ - ./test/support/fixtures/cask/Casks/github-without-appcast.rb
+ - ./test/support/fixtures/cask/Casks/hockeyapp-with-appcast.rb
+ - ./test/support/fixtures/cask/Casks/hockeyapp-without-appcast.rb
+ - ./test/support/fixtures/cask/Casks/installer-with-uninstall.rb
+ - ./test/support/fixtures/cask/Casks/invalid-sha256.rb
+ - ./test/support/fixtures/cask/Casks/invalid/invalid-appcast-multiple.rb
+ - ./test/support/fixtures/cask/Casks/invalid/invalid-appcast-url.rb
+ - ./test/support/fixtures/cask/Casks/invalid/invalid-conflicts-with-key.rb
+ - ./test/support/fixtures/cask/Casks/invalid/invalid-depends-on-arch-value.rb
+ - ./test/support/fixtures/cask/Casks/invalid/invalid-depends-on-key.rb
+ - ./test/support/fixtures/cask/Casks/invalid/invalid-depends-on-macos-bad-release.rb
+ - ./test/support/fixtures/cask/Casks/invalid/invalid-depends-on-macos-conflicting-forms.rb
+ - ./test/support/fixtures/cask/Casks/invalid/invalid-depends-on-x11-value.rb
+ - ./test/support/fixtures/cask/Casks/invalid/invalid-generic-artifact-no-target.rb
+ - ./test/support/fixtures/cask/Casks/invalid/invalid-header-format.rb
+ - ./test/support/fixtures/cask/Casks/invalid/invalid-header-token-mismatch.rb
+ - ./test/support/fixtures/cask/Casks/invalid/invalid-header-version.rb
+ - ./test/support/fixtures/cask/Casks/invalid/invalid-manpage-no-section.rb
+ - ./test/support/fixtures/cask/Casks/invalid/invalid-stage-only-conflict.rb
+ - ./test/support/fixtures/cask/Casks/invalid/invalid-two-homepage.rb
+ - ./test/support/fixtures/cask/Casks/invalid/invalid-two-url.rb
+ - ./test/support/fixtures/cask/Casks/invalid/invalid-two-version.rb
+ - ./test/support/fixtures/cask/Casks/latest-with-appcast.rb
+ - ./test/support/fixtures/cask/Casks/latest-with-auto-updates.rb
+ - ./test/support/fixtures/cask/Casks/local-caffeine.rb
+ - ./test/support/fixtures/cask/Casks/local-transmission.rb
+ - ./test/support/fixtures/cask/Casks/missing-checksum.rb
+ - ./test/support/fixtures/cask/Casks/missing-homepage.rb
+ - ./test/support/fixtures/cask/Casks/missing-name.rb
+ - ./test/support/fixtures/cask/Casks/missing-sha256.rb
+ - ./test/support/fixtures/cask/Casks/missing-url.rb
+ - ./test/support/fixtures/cask/Casks/missing-version.rb
+ - ./test/support/fixtures/cask/Casks/naked-executable.rb
+ - ./test/support/fixtures/cask/Casks/nested-app.rb
+ - ./test/support/fixtures/cask/Casks/no-checksum.rb
+ - ./test/support/fixtures/cask/Casks/no-dsl-version.rb
+ - ./test/support/fixtures/cask/Casks/osdn-correct-url-format.rb
+ - ./test/support/fixtures/cask/Casks/osdn-incorrect-url-format.rb
+ - ./test/support/fixtures/cask/Casks/outdated/auto-updates.rb
+ - ./test/support/fixtures/cask/Casks/outdated/bad-checksum.rb
+ - ./test/support/fixtures/cask/Casks/outdated/bad-checksum2.rb
+ - ./test/support/fixtures/cask/Casks/outdated/local-caffeine.rb
+ - ./test/support/fixtures/cask/Casks/outdated/local-transmission.rb
+ - ./test/support/fixtures/cask/Casks/outdated/version-latest.rb
+ - ./test/support/fixtures/cask/Casks/outdated/will-fail-if-upgraded.rb
+ - ./test/support/fixtures/cask/Casks/pkg-without-uninstall.rb
+ - ./test/support/fixtures/cask/Casks/sha256-for-empty-string.rb
+ - ./test/support/fixtures/cask/Casks/sourceforge-correct-url-format.rb
+ - ./test/support/fixtures/cask/Casks/sourceforge-incorrect-url-format.rb
+ - ./test/support/fixtures/cask/Casks/sourceforge-version-latest-correct-url-format.rb
+ - ./test/support/fixtures/cask/Casks/sourceforge-with-appcast.rb
+ - ./test/support/fixtures/cask/Casks/stage-only.rb
+ - ./test/support/fixtures/cask/Casks/test-opera-mail.rb
+ - ./test/support/fixtures/cask/Casks/test-opera.rb
+ - ./test/support/fixtures/cask/Casks/version-latest-string.rb
+ - ./test/support/fixtures/cask/Casks/version-latest-with-checksum.rb
+ - ./test/support/fixtures/cask/Casks/version-latest.rb
+ - ./test/support/fixtures/cask/Casks/will-fail-if-upgraded.rb
+ - ./test/support/fixtures/cask/Casks/with-allow-untrusted.rb
+ - ./test/support/fixtures/cask/Casks/with-alt-target.rb
+ - ./test/support/fixtures/cask/Casks/with-appcast.rb
+ - ./test/support/fixtures/cask/Casks/with-auto-updates.rb
+ - ./test/support/fixtures/cask/Casks/with-autodetected-manpage-section.rb
+ - ./test/support/fixtures/cask/Casks/with-binary.rb
+ - ./test/support/fixtures/cask/Casks/with-caveats.rb
+ - ./test/support/fixtures/cask/Casks/with-choices.rb
+ - ./test/support/fixtures/cask/Casks/with-conditional-caveats.rb
+ - ./test/support/fixtures/cask/Casks/with-conflicts-with.rb
+ - ./test/support/fixtures/cask/Casks/with-depends-on-arch.rb
+ - ./test/support/fixtures/cask/Casks/with-depends-on-cask-cyclic-helper.rb
+ - ./test/support/fixtures/cask/Casks/with-depends-on-cask-cyclic.rb
+ - ./test/support/fixtures/cask/Casks/with-depends-on-cask-multiple.rb
+ - ./test/support/fixtures/cask/Casks/with-depends-on-cask.rb
+ - ./test/support/fixtures/cask/Casks/with-depends-on-formula-multiple.rb
+ - ./test/support/fixtures/cask/Casks/with-depends-on-formula.rb
+ - ./test/support/fixtures/cask/Casks/with-depends-on-macos-comparison.rb
+ - ./test/support/fixtures/cask/Casks/with-depends-on-x11-false.rb
+ - ./test/support/fixtures/cask/Casks/with-depends-on-x11.rb
+ - ./test/support/fixtures/cask/Casks/with-embedded-binary.rb
+ - ./test/support/fixtures/cask/Casks/with-generic-artifact.rb
+ - ./test/support/fixtures/cask/Casks/with-installable.rb
+ - ./test/support/fixtures/cask/Casks/with-installer-manual.rb
+ - ./test/support/fixtures/cask/Casks/with-installer-script.rb
+ - ./test/support/fixtures/cask/Casks/with-languages.rb
+ - ./test/support/fixtures/cask/Casks/with-macosx-dir.rb
+ - ./test/support/fixtures/cask/Casks/with-non-executable-binary.rb
+ - ./test/support/fixtures/cask/Casks/with-pkgutil-zap.rb
+ - ./test/support/fixtures/cask/Casks/with-postflight-multi.rb
+ - ./test/support/fixtures/cask/Casks/with-postflight.rb
+ - ./test/support/fixtures/cask/Casks/with-preflight-multi.rb
+ - ./test/support/fixtures/cask/Casks/with-preflight.rb
+ - ./test/support/fixtures/cask/Casks/with-suite.rb
+ - ./test/support/fixtures/cask/Casks/with-two-apps-correct.rb
+ - ./test/support/fixtures/cask/Casks/with-two-apps-subdir.rb
+ - ./test/support/fixtures/cask/Casks/with-uninstall-delete.rb
+ - ./test/support/fixtures/cask/Casks/with-uninstall-early-script.rb
+ - ./test/support/fixtures/cask/Casks/with-uninstall-kext.rb
+ - ./test/support/fixtures/cask/Casks/with-uninstall-launchctl.rb
+ - ./test/support/fixtures/cask/Casks/with-uninstall-login-item.rb
+ - ./test/support/fixtures/cask/Casks/with-uninstall-multi.rb
+ - ./test/support/fixtures/cask/Casks/with-uninstall-pkgutil.rb
+ - ./test/support/fixtures/cask/Casks/with-uninstall-postflight-multi.rb
+ - ./test/support/fixtures/cask/Casks/with-uninstall-postflight.rb
+ - ./test/support/fixtures/cask/Casks/with-uninstall-preflight-multi.rb
+ - ./test/support/fixtures/cask/Casks/with-uninstall-preflight.rb
+ - ./test/support/fixtures/cask/Casks/with-uninstall-quit.rb
+ - ./test/support/fixtures/cask/Casks/with-uninstall-rmdir.rb
+ - ./test/support/fixtures/cask/Casks/with-uninstall-script-app.rb
+ - ./test/support/fixtures/cask/Casks/with-uninstall-script.rb
+ - ./test/support/fixtures/cask/Casks/with-uninstall-signal.rb
+ - ./test/support/fixtures/cask/Casks/with-uninstall-trash.rb
+ - ./test/support/fixtures/cask/Casks/with-zap-delete.rb
+ - ./test/support/fixtures/cask/Casks/with-zap-early-script.rb
+ - ./test/support/fixtures/cask/Casks/with-zap-kext.rb
+ - ./test/support/fixtures/cask/Casks/with-zap-launchctl.rb
+ - ./test/support/fixtures/cask/Casks/with-zap-login-item.rb
+ - ./test/support/fixtures/cask/Casks/with-zap-multi.rb
+ - ./test/support/fixtures/cask/Casks/with-zap-pkgutil.rb
+ - ./test/support/fixtures/cask/Casks/with-zap-quit.rb
+ - ./test/support/fixtures/cask/Casks/with-zap-rmdir.rb
+ - ./test/support/fixtures/cask/Casks/with-zap-script.rb
+ - ./test/support/fixtures/cask/Casks/with-zap-signal.rb
+ - ./test/support/fixtures/cask/Casks/with-zap-trash.rb
+ - ./test/support/fixtures/cask/Casks/with-zap.rb
+ - ./test/support/fixtures/cask/Casks/without-languages.rb
+ - ./test/support/fixtures/failball.rb
+ - ./test/support/fixtures/testball.rb
+ - ./test/support/fixtures/third-party/Casks/pharo.rb
+ - ./test/support/fixtures/third-party/Casks/third-party-cask.rb
+ - ./test/support/helper/mktmpdir.rb
+ - ./test/support/helper/output_as_tty.rb
+ - ./test/support/helper/spec/shared_examples/formulae_exist.rb
+ - ./test/system_command_result_spec.rb
+ - ./test/unpack_strategy/bazaar_spec.rb
+ - ./test/unpack_strategy/bzip2_spec.rb
+ - ./test/unpack_strategy/cvs_spec.rb
+ - ./test/unpack_strategy/directory_spec.rb
+ - ./test/unpack_strategy/git_spec.rb
+ - ./test/unpack_strategy/gzip_spec.rb
+ - ./test/unpack_strategy/lha_spec.rb
+ - ./test/unpack_strategy/lzip_spec.rb
+ - ./test/unpack_strategy/mercurial_spec.rb
+ - ./test/unpack_strategy/p7zip_spec.rb
+ - ./test/unpack_strategy/rar_spec.rb
+ - ./test/unpack_strategy/shared_examples.rb
+ - ./test/unpack_strategy/tar_spec.rb
+ - ./test/unpack_strategy/uncompressed_spec.rb
+ - ./test/unpack_strategy/xz_spec.rb
+ - ./test/unpack_strategy/zip_spec.rb
+ - ./test/unpack_strategy_spec.rb
+ - ./test/utils/curl_spec.rb
+ - ./test/utils/git_spec.rb
+ - ./test/utils/github_spec.rb
+ - ./test/utils/popen_spec.rb
+ - ./test/utils/shell_spec.rb
+ - ./test/utils/svn_spec.rb
+ - ./test/utils/tty_spec.rb
+ - ./test/version_spec.rb
+ - ./unpack_strategy/uncompressed.rb
+ - ./utils/gems.rb
+ - ./utils/inreplace.rb
+ - ./utils/link.rb
+ - ./utils/shebang.rb
+ - ./utils/shell.rb
+ - ./utils/svn.rb
+ - ./version.rb
+
+true:
+ - ./build_options.rb
+ - ./cache_store.rb
+ - ./cask/cache.rb
+ - ./cask/denylist.rb
+ - ./cask/macos.rb
+ - ./cask/url.rb
+ - ./checksum.rb
+ - ./config.rb
+ - ./extend/cachable.rb
+ - ./extend/os/linux/development_tools.rb
+ - ./extend/os/linux/formula.rb
+ - ./extend/os/linux/resource.rb
+ - ./extend/os/linux/software_spec.rb
+ - ./extend/os/mac/cleaner.rb
+ - ./extend/os/mac/formula.rb
+ - ./extend/os/mac/keg.rb
+ - ./extend/os/mac/resource.rb
+ - ./extend/os/mac/utils/analytics.rb
+ - ./formula_free_port.rb
+ - ./formula_support.rb
+ - ./install_renamed.rb
+ - ./lazy_object.rb
+ - ./linkage_cache_store.rb
+ - ./livecheck.rb
+ - ./load_path.rb
+ - ./locale.rb
+ - ./metafiles.rb
+ - ./official_taps.rb
+ - ./rubocops/cask/ast/cask_header.rb
+ - ./rubocops/cask/ast/stanza.rb
+ - ./rubocops/cask/constants/stanza.rb
+ - ./rubocops/cask/extend/string.rb
+ - ./tap_constants.rb
+ - ./test/support/helper/fixtures.rb
+ - ./test/support/lib/config.rb
+ - ./version/null.rb
+
+strict:
+ - ./cask/all.rb
+ - ./cask/artifact.rb
+ - ./cask/dsl/uninstall_postflight.rb
+ - ./compat.rb
+ - ./extend/optparse.rb
+ - ./extend/os/bottles.rb
+ - ./extend/os/caveats.rb
+ - ./extend/os/cleaner.rb
+ - ./extend/os/dependency_collector.rb
+ - ./extend/os/development_tools.rb
+ - ./extend/os/diagnostic.rb
+ - ./extend/os/extend/ENV/shared.rb
+ - ./extend/os/extend/ENV/std.rb
+ - ./extend/os/extend/ENV/super.rb
+ - ./extend/os/formula.rb
+ - ./extend/os/formula_cellar_checks.rb
+ - ./extend/os/formula_support.rb
+ - ./extend/os/hardware.rb
+ - ./extend/os/install.rb
+ - ./extend/os/keg.rb
+ - ./extend/os/keg_relocate.rb
+ - ./extend/os/language/java.rb
+ - ./extend/os/linkage_checker.rb
+ - ./extend/os/linux/cleaner.rb
+ - ./extend/os/linux/extend/pathname.rb
+ - ./extend/os/mac/formula_support.rb
+ - ./extend/os/missing_formula.rb
+ - ./extend/os/pathname.rb
+ - ./extend/os/requirements/java_requirement.rb
+ - ./extend/os/requirements/osxfuse_requirement.rb
+ - ./extend/os/requirements/x11_requirement.rb
+ - ./extend/os/resource.rb
+ - ./extend/os/search.rb
+ - ./extend/os/software_spec.rb
+ - ./extend/os/system_config.rb
+ - ./extend/os/tap.rb
+ - ./extend/os/utils/analytics.rb
+ - ./language/haskell.rb
+ - ./language/python_virtualenv_constants.rb
+ - ./os/global.rb
+ - ./os/linux/diagnostic.rb
+ - ./requirements.rb
+ - ./requirements/osxfuse_requirement.rb
+ - ./rubocops.rb
+ - ./rubocops/rubocop-cask.rb | false |
Other | Homebrew | brew | 2427e063402d3196c7ffd3515013ab5419458cd8.json | docs: restore h1 headings for pages with front matter
Plus other fixes for Homebrew-on-Linux.md.
GitHub Pages' jekyll-titles-from-headings sets a page's title to its first Markdown heading. | docs/Brew-Test-Bot.md | @@ -1,8 +1,10 @@
---
-title: Brew Test Bot
logo: https://brew.sh/assets/img/brewtestbot.png
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).
| true |
Other | Homebrew | brew | 2427e063402d3196c7ffd3515013ab5419458cd8.json | docs: restore h1 headings for pages with front matter
Plus other fixes for Homebrew-on-Linux.md.
GitHub Pages' jekyll-titles-from-headings sets a page's title to its first Markdown heading. | docs/Homebrew-on-Linux.md | @@ -1,15 +1,17 @@
---
-title: Homebrew on Linux
logo: https://brew.sh/assets/img/linuxbrew.png
image: https://brew.sh/assets/img/linuxbrew.png
redirect_from:
- /linux
- /Linux
- /Linuxbrew
---
+
+# Homebrew on Linux
+
The Homebrew package manager may be used on Linux and [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/about). Homebrew was formerly referred to as Linuxbrew when running on Linux or WSL. It can be installed in your home directory, in which case it does not use *sudo*. Homebrew does not use any libraries provided by your host system, except *glibc* and *gcc* if they are new enough. Homebrew can install its own current versions of *glibc* and *gcc* for older distributions of Linux.
-[Features](#features), [dependencies](#dependencies) and [installation instructions](#install) are described below. Terminology (e.g. the difference between a Cellar, Tap, Cask and so forth) is [explained in the documentation](Formula-Cookbook.md#homebrew-terminology).
+[Features](#features), [installation instructions](#install) and [requirements](#requirements) are described below. Terminology (e.g. the difference between a Cellar, Tap, Cask and so forth) is [explained in the documentation](Formula-Cookbook.md#homebrew-terminology).
## Features
@@ -39,7 +41,7 @@ You're done! Try installing a package:
brew install hello
```
-If you're using an older distribution of Linux, installing your first package will also install a recent version of `glibc` and `gcc`. Use `brew doctor` to troubleshoot common issues.
+If you're using an older distribution of Linux, installing your first package will also install a recent version of *glibc* and *gcc*. Use `brew doctor` to troubleshoot common issues.
## Requirements
@@ -68,7 +70,7 @@ sudo yum install libxcrypt-compat # needed by Fedora 30 and up
Homebrew can run on 32-bit ARM (Raspberry Pi and others) and 64-bit ARM (AArch64), but no binary packages (bottles) are available. Support for ARM is on a best-effort basis. Pull requests are welcome to improve the experience on ARM platforms.
-You may need to install your own Ruby using your system package manager, a PPA, or `rbenv/ruby-build` as in the future we will no longer distribute a Homebrew Portable Ruby for ARM.
+You may need to install your own Ruby using your system package manager, a PPA, or `rbenv/ruby-build` as we no longer distribute a Homebrew Portable Ruby for ARM.
### 32-bit x86
| true |
Other | Homebrew | brew | 4a24908fe4e54c8a3c44a44d8190ccf6e0d2cd23.json | cask: codify the token rules | Library/Homebrew/cask/audit.rb | @@ -38,6 +38,8 @@ def run!
check_sha256
check_url
check_generic_artifacts
+ check_token_valid
+ check_token_bad_words
check_token_conflicts
check_download
check_https_availability
@@ -282,6 +284,56 @@ def check_token_conflicts
add_warning "possible duplicate, cask token conflicts with Homebrew core formula: #{core_formula_url}"
end
+ def check_token_valid
+ return unless @strict
+
+ add_warning "cask token is not lowercase" if cask.token.downcase!
+
+ add_warning "cask token contains non-ascii characters" unless cask.token.ascii_only?
+
+ add_warning "cask token + should be replaced by -plus-" if cask.token.include? "+"
+
+ add_warning "cask token @ should be replaced by -at-" if cask.token.include? "@"
+
+ add_warning "cask token whitespace should be replaced by hyphens" if cask.token.include? " "
+
+ add_warning "cask token underscores should be replaced by hyphens" if cask.token.include? "_"
+
+ if cask.token.match?(/[^a-z0-9\-]/)
+ add_warning "cask token should only contain alphanumeric characters and hyphens"
+ end
+
+ add_warning "cask token should not contain double hyphens" if cask.token.include? "--"
+
+ return unless cask.token.end_with?("-") || cask.token.start_with?("-")
+
+ add_warning "cask token should not have leading or trailing hyphens"
+ end
+
+ def check_token_bad_words
+ return unless @strict
+
+ token = cask.token
+
+ add_warning "cask token contains .app" if token.end_with? ".app"
+
+ if cask.token.end_with? "alpha", "beta", "release candidate"
+ add_warning "cask token contains version designation"
+ end
+
+ add_warning "cask token mentions launcher" if token.end_with? "launcher"
+
+ add_warning "cask token mentions desktop" if token.end_with? "desktop"
+
+ add_warning "cask token mentions platform" if token.end_with? "mac", "osx", "macos"
+
+ add_warning "cask token mentions architecture" if token.end_with? "x86", "32_bit", "x86_64", "64_bit"
+
+ return unless token.end_with?("cocoa", "qt", "gtk", "wx", "java") && !%w[cocoa qt gtk wx java].include?(token)
+
+ add_warning "cask token mentions framework"
+ end
+
def core_tap
@core_tap ||= CoreTap.instance
end | true |
Other | Homebrew | brew | 4a24908fe4e54c8a3c44a44d8190ccf6e0d2cd23.json | cask: codify the token rules | Library/Homebrew/test/cask/audit_spec.rb | @@ -40,11 +40,13 @@ def include_msg?(messages, msg)
let(:cask) { instance_double(Cask::Cask) }
let(:download) { false }
let(:token_conflicts) { false }
+ let(:strict) { false }
let(:fake_system_command) { class_double(SystemCommand) }
let(:audit) {
described_class.new(cask, download: download,
token_conflicts: token_conflicts,
- command: fake_system_command)
+ command: fake_system_command,
+ strict: strict)
}
describe "#result" do
@@ -83,6 +85,16 @@ def include_msg?(messages, msg)
describe "#run!" do
subject { audit.run! }
+ def tmp_cask(name, text)
+ path = Pathname.new "#{dir}/#{name}.rb"
+ path.open("w") do |f|
+ f.write text
+ end
+
+ Cask::CaskLoader.load(path)
+ end
+
+ let(:dir) { mktmpdir }
let(:cask) { Cask::CaskLoader.load(cask_token) }
describe "required stanzas" do
@@ -95,6 +107,174 @@ def include_msg?(messages, msg)
end
end
+ describe "token validation" do
+ let(:strict) { true }
+ let(:cask) do
+ tmp_cask cask_token.to_s, <<~RUBY
+ cask '#{cask_token}' do
+ version '1.0'
+ sha256 '8dd95daa037ac02455435446ec7bc737b34567afe9156af7d20b2a83805c1d8a'
+ url "https://brew.sh/"
+ name 'Audit'
+ homepage 'https://brew.sh/'
+ app 'Audit.app'
+ end
+ RUBY
+ end
+
+ context "when cask token is not lowercase" do
+ let(:cask_token) { "Upper-Case" }
+
+ it "warns about lowercase" do
+ expect(subject).to warn_with(/token is not lowercase/)
+ end
+ end
+
+ context "when cask token is not ascii" do
+ let(:cask_token) { "ascii⌘" }
+
+ it "warns about ascii" do
+ expect(subject).to warn_with(/contains non-ascii characters/)
+ end
+ end
+
+ context "when cask token has +" do
+ let(:cask_token) { "app++" }
+
+ it "warns about +" do
+ expect(subject).to warn_with(/\+ should be replaced by -plus-/)
+ end
+ end
+
+ context "when cask token has @" do
+ let(:cask_token) { "app@stuff" }
+
+ it "warns about +" do
+ expect(subject).to warn_with(/@ should be replaced by -at-/)
+ end
+ end
+
+ context "when cask token has whitespace" do
+ let(:cask_token) { "app stuff" }
+
+ it "warns about whitespace" do
+ expect(subject).to warn_with(/whitespace should be replaced by hyphens/)
+ end
+ end
+
+ context "when cask token has underscores" do
+ let(:cask_token) { "app_stuff" }
+
+ it "warns about underscores" do
+ expect(subject).to warn_with(/underscores should be replaced by hyphens/)
+ end
+ end
+
+ context "when cask token has non-alphanumeric characters" do
+ let(:cask_token) { "app(stuff)" }
+
+ it "warns about non-alphanumeric characters" do
+ expect(subject).to warn_with(/should only contain alphanumeric characters and hyphens/)
+ end
+ end
+
+ context "when cask token has double hyphens" do
+ let(:cask_token) { "app--stuff" }
+
+ it "warns about double hyphens" do
+ expect(subject).to warn_with(/should not contain double hyphens/)
+ end
+ end
+
+ context "when cask token has trailing hyphens" do
+ let(:cask_token) { "app-" }
+
+ it "warns about trailing hyphens" do
+ expect(subject).to warn_with(/should not have leading or trailing hyphens/)
+ end
+ end
+ end
+
+ describe "token bad words" do
+ let(:strict) { true }
+ let(:cask) do
+ tmp_cask cask_token.to_s, <<~RUBY
+ cask '#{cask_token}' do
+ version '1.0'
+ sha256 '8dd95daa037ac02455435446ec7bc737b34567afe9156af7d20b2a83805c1d8a'
+ url "https://brew.sh/"
+ name 'Audit'
+ homepage 'https://brew.sh/'
+ app 'Audit.app'
+ end
+ RUBY
+ end
+
+ context "when cask token contains .app" do
+ let(:cask_token) { "token.app" }
+
+ it "warns about .app" do
+ expect(subject).to warn_with(/token contains .app/)
+ end
+ end
+
+ context "when cask token contains version" do
+ let(:cask_token) { "token-beta" }
+
+ it "warns about version in token" do
+ expect(subject).to warn_with(/token contains version/)
+ end
+ end
+
+ context "when cask token contains launcher" do
+ let(:cask_token) { "token-launcher" }
+
+ it "warns about launcher in token" do
+ expect(subject).to warn_with(/token mentions launcher/)
+ end
+ end
+
+ context "when cask token contains desktop" do
+ let(:cask_token) { "token-desktop" }
+
+ it "warns about desktop in token" do
+ expect(subject).to warn_with(/token mentions desktop/)
+ end
+ end
+
+ context "when cask token contains platform" do
+ let(:cask_token) { "token-osx" }
+
+ it "warns about platform in token" do
+ expect(subject).to warn_with(/token mentions platform/)
+ end
+ end
+
+ context "when cask token contains architecture" do
+ let(:cask_token) { "token-x86" }
+
+ it "warns about architecture in token" do
+ expect(subject).to warn_with(/token mentions architecture/)
+ end
+ end
+
+ context "when cask token contains framework" do
+ let(:cask_token) { "token-java" }
+
+ it "warns about framework in token" do
+ expect(subject).to warn_with(/cask token mentions framework/)
+ end
+ end
+
+ context "when cask token is framework" do
+ let(:cask_token) { "java" }
+
+ it "does not warn about framework" do
+ expect(subject).not_to warn_with(/token contains version/)
+ end
+ end
+ end
+
describe "pkg allow_untrusted checks" do
let(:warning_msg) { "allow_untrusted is not permitted in official Homebrew Cask taps" }
| true |
Other | Homebrew | brew | 89bd6a76ee6983768dbceb2a41c59264eb6b29fc.json | docs: clarify Formula location in Tap repositories
Make clear that Formula locations cannot be mixed, they are mutually
exclusive. This avoids the (false) implication that top-level Formula
can override those in the Formula subdirectory.
This makes no change in recommendations following the original
discussion in https://github.com/Homebrew/legacy-homebrew/pull/41858 | docs/How-to-Create-and-Maintain-a-Tap.md | @@ -16,10 +16,11 @@ See the [manpage](Manpage.md) for more information on repository naming.
The `brew tap-new` command can be used to create a new tap along with some
template files.
-Tap formulae follow the same format as the core’s ones, and can be added at the
-repository’s root, or under `Formula` or `HomebrewFormula` subdirectories. We
-recommend the latter options because it makes the repository organisation
-easier to grasp, and top-level files are not mixed with formulae.
+Tap formulae follow the same format as the core’s ones, and can be added under
+either the `Formula` subdirectory, the `HomebrewFormula` subdirectory or the
+repository’s root. The first available directory is used, other locations will
+be ignored. We recommend use of subdirectories because it makes the repository
+organisation easier to grasp, and top-level files are not mixed with formulae.
See [homebrew/core](https://github.com/Homebrew/homebrew-core) for an example of
a tap with a `Formula` subdirectory. | false |
Other | Homebrew | brew | 536726799d24afb704d420f772a8f9b60150fa32.json | Gemfile: add sorbet and sorbet-runtime
bundler/setup: add sorbet and sorbet-runtime | .gitignore | @@ -82,6 +82,7 @@
# Ignore dependencies we don't wish to vendor
**/vendor/bundle/ruby/*/gems/ast-*/
**/vendor/bundle/ruby/*/gems/bundler-*/
+**/vendor/bundle/ruby/*/gems/byebug-*/
**/vendor/bundle/ruby/*/gems/coderay-*/
**/vendor/bundle/ruby/*/gems/connection_pool-*/
**/vendor/bundle/ruby/*/gems/coveralls-*/
@@ -127,14 +128,15 @@
**/vendor/bundle/ruby/*/gems/simplecov-*/
**/vendor/bundle/ruby/*/gems/simplecov-cobertura-*/
**/vendor/bundle/ruby/*/gems/simplecov-html-*/
+**/vendor/bundle/ruby/*/gems/sorbet-*/
+**/vendor/bundle/ruby/*/gems/sorbet-runtime-*/
**/vendor/bundle/ruby/*/gems/term-ansicolor-*/
**/vendor/bundle/ruby/*/gems/thor-*/
**/vendor/bundle/ruby/*/gems/tins-*/
**/vendor/bundle/ruby/*/gems/unf_ext-*/
**/vendor/bundle/ruby/*/gems/unf-*/
**/vendor/bundle/ruby/*/gems/unicode-display_width-*/
**/vendor/bundle/ruby/*/gems/webrobots-*/
-**/vendor/bundle/ruby/*/gems/byebug-*/
# Ignore `bin` contents (again).
/bin | true |
Other | Homebrew | brew | 536726799d24afb704d420f772a8f9b60150fa32.json | Gemfile: add sorbet and sorbet-runtime
bundler/setup: add sorbet and sorbet-runtime | Library/Homebrew/Gemfile | @@ -13,6 +13,8 @@ gem "rspec-retry", require: false
gem "rspec-wait", require: false
gem "rubocop"
gem "simplecov", require: false
+gem "sorbet"
+gem "sorbet-runtime"
# vendored gems
gem "activesupport" | true |
Other | Homebrew | brew | 536726799d24afb704d420f772a8f9b60150fa32.json | Gemfile: add sorbet and sorbet-runtime
bundler/setup: add sorbet and sorbet-runtime | Library/Homebrew/Gemfile.lock | @@ -104,6 +104,10 @@ GEM
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
+ sorbet (0.5.5742)
+ sorbet-static (= 0.5.5742)
+ sorbet-runtime (0.5.5742)
+ sorbet-static (0.5.5742-universal-darwin-14)
sync (0.5.0)
term-ansicolor (1.7.1)
tins (~> 1.0)
@@ -141,6 +145,8 @@ DEPENDENCIES
rubocop-rspec
ruby-macho
simplecov
+ sorbet
+ sorbet-runtime
BUNDLED WITH
1.17.2 | true |
Other | Homebrew | brew | 536726799d24afb704d420f772a8f9b60150fa32.json | Gemfile: add sorbet and sorbet-runtime
bundler/setup: add sorbet and sorbet-runtime | Library/Homebrew/vendor/bundle/bundler/setup.rb | @@ -20,6 +20,8 @@
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/docile-1.3.2/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-html-0.10.2/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-0.16.1/lib"
+$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-0.5.5742"
+$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-runtime-0.5.5742/lib"
$:.unshift "#{path}/../../../../../../../../Library/Ruby/Gems/2.6.0/gems/sync-0.5.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/tins-1.25.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/term-ansicolor-1.7.1/lib" | true |
Other | Homebrew | brew | 2a50ef045fdb6a56a018853f70ef0a0d36a153a7.json | on_os blocks: remove url tests
This is not allowed by the style audit, and we do not want
to allow different source url's depending on the os. | Library/Homebrew/test/os/linux/formula_spec.rb | @@ -33,26 +33,6 @@
end
end
- describe "#on_linux" do
- it "defines an url on Linux only" do
- f = formula do
- homepage "https://brew.sh"
-
- on_macos do
- url "https://brew.sh/test-macos-0.1.tbz"
- sha256 TEST_SHA256
- end
-
- on_linux do
- url "https://brew.sh/test-linux-0.1.tbz"
- sha256 TEST_SHA256
- end
- end
-
- expect(f.stable.url).to eq("https://brew.sh/test-linux-0.1.tbz")
- end
- end
-
describe "#on_linux" do
it "adds a dependency on Linux only" do
f = formula do | true |
Other | Homebrew | brew | 2a50ef045fdb6a56a018853f70ef0a0d36a153a7.json | on_os blocks: remove url tests
This is not allowed by the style audit, and we do not want
to allow different source url's depending on the os. | Library/Homebrew/test/os/mac/formula_spec.rb | @@ -40,26 +40,6 @@
end
end
- describe "#on_macos" do
- it "defines an url on macos only" do
- f = formula do
- homepage "https://brew.sh"
-
- on_macos do
- url "https://brew.sh/test-macos-0.1.tbz"
- sha256 TEST_SHA256
- end
-
- on_linux do
- url "https://brew.sh/test-linux-0.1.tbz"
- sha256 TEST_SHA256
- end
- end
-
- expect(f.stable.url).to eq("https://brew.sh/test-macos-0.1.tbz")
- end
- end
-
describe "#on_macos" do
it "adds a dependency on macos only" do
f = formula do | true |
Other | Homebrew | brew | 1f8ebf5d20f81aea87b95710a2841134dbfa4a32.json | resource: allow on_os blocks | Library/Homebrew/extend/os/linux/resource.rb | @@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class Resource
+ undef on_linux
+
+ def on_linux(&_block)
+ yield
+ end
+end | true |
Other | Homebrew | brew | 1f8ebf5d20f81aea87b95710a2841134dbfa4a32.json | resource: allow on_os blocks | Library/Homebrew/extend/os/mac/resource.rb | @@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class Resource
+ undef on_macos
+
+ def on_macos(&_block)
+ yield
+ end
+end | true |
Other | Homebrew | brew | 1f8ebf5d20f81aea87b95710a2841134dbfa4a32.json | resource: allow on_os blocks | Library/Homebrew/extend/os/resource.rb | @@ -0,0 +1,7 @@
+# frozen_string_literal: true
+
+if OS.mac?
+ require "extend/os/mac/resource"
+elsif OS.linux?
+ require "extend/os/linux/resource"
+end | true |
Other | Homebrew | brew | 1f8ebf5d20f81aea87b95710a2841134dbfa4a32.json | resource: allow on_os blocks | Library/Homebrew/formula.rb | @@ -2474,13 +2474,13 @@ def uses_from_macos(dep, bounds = {})
specs.each { |spec| spec.uses_from_macos(dep, bounds) }
end
- # Block executed only executed on macOS. No-op on Linux.
+ # Block only executed on macOS. No-op on Linux.
# <pre>on_macos do
# depends_on "mac_only_dep"
# end</pre>
def on_macos(&_block); end
- # Block executed only executed on Linux. No-op on macOS.
+ # Block only executed on Linux. No-op on macOS.
# <pre>on_linux do
# depends_on "linux_only_dep"
# end</pre> | true |
Other | Homebrew | brew | 1f8ebf5d20f81aea87b95710a2841134dbfa4a32.json | resource: allow on_os blocks | Library/Homebrew/resource.rb | @@ -178,6 +178,18 @@ def patch(strip = :p1, src = nil, &block)
patches << p
end
+ # Block only executed on macOS. No-op on Linux.
+ # <pre>on_macos do
+ # url "mac_only_url"
+ # end</pre>
+ def on_macos(&_block); end
+
+ # Block only executed on Linux. No-op on macOS.
+ # <pre>on_linux do
+ # url "linux_only_url"
+ # end</pre>
+ def on_linux(&_block); end
+
protected
def mktemp(prefix)
@@ -252,3 +264,5 @@ def to_s
"<#{self.class}: resource=#{resource} staging=#{staging}>"
end
end
+
+require "extend/os/resource" | true |
Other | Homebrew | brew | 1f8ebf5d20f81aea87b95710a2841134dbfa4a32.json | resource: allow on_os blocks | Library/Homebrew/test/os/linux/formula_spec.rb | @@ -110,4 +110,23 @@
expect(f.patchlist.second.url).to eq("patch_linux")
end
end
+
+ describe "#on_linux" do
+ it "uses on_linux within a resource block" do
+ f = formula do
+ homepage "https://brew.sh"
+
+ url "https://brew.sh/test-0.1.tbz"
+ sha256 TEST_SHA256
+
+ resource "test_resource" do
+ on_linux do
+ url "on_linux"
+ end
+ end
+ end
+ expect(f.resources.length).to eq(1)
+ expect(f.resources.first.url).to eq("on_linux")
+ end
+ end
end | true |
Other | Homebrew | brew | 1f8ebf5d20f81aea87b95710a2841134dbfa4a32.json | resource: allow on_os blocks | Library/Homebrew/test/os/mac/formula_spec.rb | @@ -117,4 +117,23 @@
expect(f.patchlist.second.url).to eq("patch_macos")
end
end
+
+ describe "#on_macos" do
+ it "uses on_macos within a resource block" do
+ f = formula do
+ homepage "https://brew.sh"
+
+ url "https://brew.sh/test-0.1.tbz"
+ sha256 TEST_SHA256
+
+ resource "test_resource" do
+ on_macos do
+ url "resource_macos"
+ end
+ end
+ end
+ expect(f.resources.length).to eq(1)
+ expect(f.resources.first.url).to eq("resource_macos")
+ end
+ end
end | true |
Other | Homebrew | brew | b07685291b65e51e0afc2b6cee91251419e0b3c1.json | Add license to formula DSL | Library/Homebrew/formula.rb | @@ -351,6 +351,9 @@ def bottle
# @see .desc=
delegate desc: :"self.class"
+ # The SPDX ID of the software license.
+ delegate license: :"self.class"
+
# The homepage for the software.
# @method homepage
# @see .homepage=
@@ -1678,6 +1681,7 @@ def to_hash
"aliases" => aliases.sort,
"versioned_formulae" => versioned_formulae.map(&:name),
"desc" => desc,
+ "license" => license,
"homepage" => homepage,
"versions" => {
"stable" => stable&.version&.to_s,
@@ -2199,6 +2203,13 @@ def method_added(method)
# <pre>desc "Example formula"</pre>
attr_rw :desc
+ # @!attribute [w]
+ # The SPDX ID of the open-source license that the formula uses.
+ # Shows when running `brew info`.
+ #
+ # <pre>license " BSD-2-Clause"</pre>
+ attr_rw :license
+
# @!attribute [w] homepage
# The homepage for the software. Used by users to get more information
# about the software and Homebrew maintainers as a point of contact for | false |
Other | Homebrew | brew | bbb269674270b145614780dbaa2258f6c770ff65.json | language/java: add support for OpenJDK formula | Library/Homebrew/extend/os/mac/language/java.rb | @@ -4,17 +4,25 @@ module Language
module Java
def self.system_java_home_cmd(version = nil)
version_flag = " --version #{version}" if version
- "/usr/libexec/java_home#{version_flag}"
+ "/usr/libexec/java_home#{version_flag} --failfast 2>/dev/null"
end
private_class_method :system_java_home_cmd
def self.java_home(version = nil)
+ f = find_openjdk_formula(version)
+ return f.opt_libexec/"openjdk.jdk/Contents/Home" if f
+
cmd = system_java_home_cmd(version)
- Pathname.new Utils.popen_read(cmd).chomp
+ path = Utils.popen_read(cmd).chomp
+
+ Pathname.new path if path.present?
end
# @private
def self.java_home_shell(version = nil)
+ f = find_openjdk_formula(version)
+ return (f.opt_libexec/"openjdk.jdk/Contents/Home").to_s if f
+
"$(#{system_java_home_cmd(version)})"
end
end | true |
Other | Homebrew | brew | bbb269674270b145614780dbaa2258f6c770ff65.json | language/java: add support for OpenJDK formula | Library/Homebrew/language/java.rb | @@ -2,7 +2,31 @@
module Language
module Java
+ def self.find_openjdk_formula(version = nil)
+ can_be_newer = version&.end_with?("+")
+ version = version.to_i
+
+ openjdk = Formula["openjdk"]
+ [openjdk, *openjdk.versioned_formulae].find do |f|
+ next false unless f.any_version_installed?
+
+ unless version.zero?
+ major = f.version.to_s[/\d+/].to_i
+ next false if major < version
+ next false if major > version && !can_be_newer
+ end
+
+ true
+ end
+ rescue FormulaUnavailableError
+ nil
+ end
+ private_class_method :find_openjdk_formula
+
def self.java_home(version = nil)
+ f = find_openjdk_formula(version)
+ return f.opt_libexec if f
+
req = JavaRequirement.new [*version]
raise UnsatisfiedRequirements, req.message unless req.satisfied?
| true |
Other | Homebrew | brew | a793bc500cf5f4c00fb37e15688b7dc6ade1e1a3.json | Fix failing appcast check. | Library/Homebrew/cask/audit.rb | @@ -310,10 +310,16 @@ def check_appcast_contains_version
return if cask.appcast.must_contain == :no_check
appcast_stanza = cask.appcast.to_s
- appcast_contents, = curl_output("--compressed", "--user-agent", HOMEBREW_USER_AGENT_FAKE_SAFARI, "--location",
- "--globoff", "--max-time", "5", appcast_stanza)
+ appcast_contents, = begin
+ curl_output("--compressed", "--user-agent", HOMEBREW_USER_AGENT_FAKE_SAFARI, "--location",
+ "--globoff", "--max-time", "5", appcast_stanza)
+ rescue
+ add_error "appcast at URL '#{appcast_stanza}' offline or looping"
+ return
+ end
+
version_stanza = cask.version.to_s
- adjusted_version_stanza = if cask.appcast.configuration.blank?
+ adjusted_version_stanza = if cask.appcast.must_contain.blank?
version_stanza.match(/^[[:alnum:].]+/)[0]
else
cask.appcast.must_contain
@@ -322,8 +328,6 @@ def check_appcast_contains_version
add_warning "appcast at URL '#{appcast_stanza}' does not contain"\
" the version number '#{adjusted_version_stanza}':\n#{appcast_contents}"
- rescue
- add_error "appcast at URL '#{appcast_stanza}' offline or looping"
end
def check_github_repository | false |
Other | Homebrew | brew | 87931e1c038ebc79c6688d926adb5ea9a303f62b.json | utils/ruby.sh: set TERMINFO_DIRS to bundled terminfo | Library/Homebrew/utils/ruby.sh | @@ -23,9 +23,11 @@ If there's no Homebrew Portable Ruby available for your processor:
"
vendor_dir="$HOMEBREW_LIBRARY/Homebrew/vendor"
- vendor_ruby_path="$vendor_dir/portable-ruby/current/bin/ruby"
+ vendor_ruby_root="$vendor_dir/portable-ruby/current"
+ vendor_ruby_path="$vendor_ruby_root/bin/ruby"
+ vendor_ruby_terminfo="$vendor_ruby_root/share/terminfo"
vendor_ruby_latest_version=$(<"$vendor_dir/portable-ruby-version")
- vendor_ruby_current_version=$(readlink "$vendor_dir/portable-ruby/current")
+ vendor_ruby_current_version=$(readlink "$vendor_ruby_root")
unset HOMEBREW_RUBY_PATH
@@ -37,6 +39,7 @@ If there's no Homebrew Portable Ruby available for your processor:
if [[ -x "$vendor_ruby_path" ]]
then
HOMEBREW_RUBY_PATH="$vendor_ruby_path"
+ [[ -z "$HOMEBREW_MACOS" ]] && TERMINFO_DIRS="$vendor_ruby_terminfo"
if [[ $vendor_ruby_current_version != $vendor_ruby_latest_version ]]
then
if ! brew vendor-install ruby
@@ -87,8 +90,10 @@ If there's no Homebrew Portable Ruby available for your processor:
fi
fi
HOMEBREW_RUBY_PATH="$vendor_ruby_path"
+ [[ -z "$HOMEBREW_MACOS" ]] && TERMINFO_DIRS="$vendor_ruby_terminfo"
fi
fi
export HOMEBREW_RUBY_PATH
+ export TERMINFO_DIRS
} | false |
Other | Homebrew | brew | ee9c335b513cb49a9e853d2f5ff316e2933bc8bd.json | pr-pull: preserve trailers when signing off commit | Library/Homebrew/dev-cmd/pr-pull.rb | @@ -70,12 +70,22 @@ def setup_git_environment!
def signoff!(pr, path: ".")
message = Utils.popen_read "git", "-C", path, "log", "-1", "--pretty=%B"
+ subject = message.lines.first.strip
+
+ # Skip the subject and separate lines that look like trailers (e.g. "Co-authored-by")
+ # from lines that look like regular body text.
+ trailers, body = message.lines.drop(1).partition { |s| s.match?(/^[a-z-]+-by:/i) }
+ trailers = trailers.uniq.join.strip
+ body = body.join.strip.gsub(/\n{3,}/, "\n\n")
+
close_message = "Closes ##{pr}."
- message += "\n#{close_message}" unless message.include? close_message
+ body += "\n\n#{close_message}" unless body.include? close_message
+ new_message = [subject, body, trailers].join("\n\n").strip
+
if Homebrew.args.dry_run?
puts "git commit --amend --signoff -m $message"
else
- safe_system "git", "-C", path, "commit", "--amend", "--signoff", "--allow-empty", "-q", "-m", message
+ safe_system "git", "-C", path, "commit", "--amend", "--signoff", "--allow-empty", "-q", "-m", new_message
end
end
| false |
Other | Homebrew | brew | b58fa4ebb1e6b918d8556cba629cb55b79d423f5.json | Drop Mavericks support.
Companion to https://github.com/Homebrew/brew/pull/7698.
Provide better, `odeprecated` messaging for
`depends_on :macos => :mavericks` and otherwise just fix up the code
that relied on `:mavericks`. | Library/Homebrew/exceptions.rb | @@ -612,3 +612,12 @@ def initialize(inner)
set_backtrace inner["b"]
end
end
+
+class MacOSVersionError < RuntimeError
+ attr_reader :version
+
+ def initialize(version)
+ @version = version
+ super "unknown or unsupported macOS version: #{version.inspect}"
+ end
+end | true |
Other | Homebrew | brew | b58fa4ebb1e6b918d8556cba629cb55b79d423f5.json | Drop Mavericks support.
Companion to https://github.com/Homebrew/brew/pull/7698.
Provide better, `odeprecated` messaging for
`depends_on :macos => :mavericks` and otherwise just fix up the code
that relied on `:mavericks`. | Library/Homebrew/extend/os/mac/formula_cellar_checks.rb | @@ -10,10 +10,6 @@ def check_shadowed_headers
end
return if formula.name&.match?(Version.formula_optionally_versioned_regex(:php))
-
- return if MacOS.version < :mavericks && formula.name.start_with?("postgresql")
- return if MacOS.version < :yosemite && formula.name.start_with?("memcached")
-
return if formula.keg_only? || !formula.include.directory?
files = relative_glob(formula.include, "**/*.h") | true |
Other | Homebrew | brew | b58fa4ebb1e6b918d8556cba629cb55b79d423f5.json | Drop Mavericks support.
Companion to https://github.com/Homebrew/brew/pull/7698.
Provide better, `odeprecated` messaging for
`depends_on :macos => :mavericks` and otherwise just fix up the code
that relied on `:mavericks`. | Library/Homebrew/extend/os/mac/utils/bottles.rb | @@ -30,13 +30,13 @@ def find_matching_tag(tag)
def find_older_compatible_tag(tag)
tag_version = begin
MacOS::Version.from_symbol(tag)
- rescue ArgumentError
+ rescue MacOSVersionError
return
end
keys.find do |key|
MacOS::Version.from_symbol(key) <= tag_version
- rescue ArgumentError
+ rescue MacOSVersionError
false
end
end | true |
Other | Homebrew | brew | b58fa4ebb1e6b918d8556cba629cb55b79d423f5.json | Drop Mavericks support.
Companion to https://github.com/Homebrew/brew/pull/7698.
Provide better, `odeprecated` messaging for
`depends_on :macos => :mavericks` and otherwise just fix up the code
that relied on `:mavericks`. | Library/Homebrew/formula.rb | @@ -2327,9 +2327,9 @@ def mirror(val)
# prefix "/opt/homebrew" # Optional HOMEBREW_PREFIX in which the bottles were built.
# cellar "/opt/homebrew/Cellar" # Optional HOMEBREW_CELLAR in which the bottles were built.
# rebuild 1 # Making the old bottle outdated without bumping the version/revision of the formula.
- # sha256 "4355a46b19d348dc2f57c046f8ef63d4538ebb936000f3c9ee954a27460dd865" => :el_capitan
- # sha256 "53c234e5e8472b6ac51c1ae1cab3fe06fad053beb8ebfd8977b010655bfdd3c3" => :yosemite
- # sha256 "1121cfccd5913f0a63fec40a6ffd44ea64f9dc135c66634ba001d10bcf4302a2" => :mavericks
+ # sha256 "ef65c759c5097a36323fa9c77756468649e8d1980a3a4e05695c05e39568967c" => :catalina
+ # sha256 "28f4090610946a4eb207df102d841de23ced0d06ba31cb79e040d883906dcd4f" => :mojave
+ # sha256 "91dd0caca9bd3f38c439d5a7b6f68440c4274945615fae035ff0a369264b8a2f" => :high_sierra
# end</pre>
#
# Only formulae where the upstream URL breaks or moves frequently, require compiling
@@ -2452,7 +2452,7 @@ def go_resource(name, &block)
# <pre># Optional and enforce that boost is built with `--with-c++11`.
# depends_on "boost" => [:optional, "with-c++11"]</pre>
# <pre># If a dependency is only needed in certain cases:
- # depends_on "sqlite" if MacOS.version == :mavericks
+ # depends_on "sqlite" if MacOS.version == :catalina
# depends_on :xcode # If the formula really needs full Xcode.
# depends_on :macos => :mojave # Needs at least macOS Mojave (10.14).
# depends_on :x11 => :optional # X11/XQuartz components. | true |
Other | Homebrew | brew | b58fa4ebb1e6b918d8556cba629cb55b79d423f5.json | Drop Mavericks support.
Companion to https://github.com/Homebrew/brew/pull/7698.
Provide better, `odeprecated` messaging for
`depends_on :macos => :mavericks` and otherwise just fix up the code
that relied on `:mavericks`. | Library/Homebrew/os/mac/version.rb | @@ -12,13 +12,10 @@ class Version < ::Version
sierra: "10.12",
el_capitan: "10.11",
yosemite: "10.10",
- mavericks: "10.9",
}.freeze
def self.from_symbol(sym)
- str = SYMBOLS.fetch(sym) do
- raise ArgumentError, "unknown version #{sym.inspect}"
- end
+ str = SYMBOLS.fetch(sym) { raise MacOSVersionError, sym }
new(str)
end
| true |
Other | Homebrew | brew | b58fa4ebb1e6b918d8556cba629cb55b79d423f5.json | Drop Mavericks support.
Companion to https://github.com/Homebrew/brew/pull/7698.
Provide better, `odeprecated` messaging for
`depends_on :macos => :mavericks` and otherwise just fix up the code
that relied on `:mavericks`. | Library/Homebrew/os/mac/xcode.rb | @@ -287,13 +287,7 @@ def outdated?
end
def detect_clang_version
- path = if MacOS.version >= :mavericks
- "#{PKG_PATH}/usr/bin/clang"
- else
- "/usr/bin/clang"
- end
-
- version_output = Utils.popen_read("#{path} --version")
+ version_output = Utils.popen_read("#{PKG_PATH}/usr/bin/clang --version")
version_output[/clang-(\d+\.\d+\.\d+(\.\d+)?)/, 1]
end
| true |
Other | Homebrew | brew | b58fa4ebb1e6b918d8556cba629cb55b79d423f5.json | Drop Mavericks support.
Companion to https://github.com/Homebrew/brew/pull/7698.
Provide better, `odeprecated` messaging for
`depends_on :macos => :mavericks` and otherwise just fix up the code
that relied on `:mavericks`. | Library/Homebrew/requirements/macos_requirement.rb | @@ -8,10 +8,16 @@ class MacOSRequirement < Requirement
attr_reader :comparator, :version
def initialize(tags = [], comparator: ">=")
- if comparator == "==" && tags.first.respond_to?(:map)
- @version = tags.shift.map { |s| MacOS::Version.from_symbol(s) }
- else
- @version = MacOS::Version.from_symbol(tags.shift) unless tags.empty?
+ begin
+ @version = if comparator == "==" && tags.first.respond_to?(:map)
+ tags.shift.map { |s| MacOS::Version.from_symbol(s) }
+ else
+ MacOS::Version.from_symbol(tags.shift) unless tags.empty?
+ end
+ rescue MacOSVersionError => e
+ raise if e.version != :mavericks
+
+ odeprecated "depends_on :macos => :mavericks"
end
@comparator = comparator | true |
Other | Homebrew | brew | b58fa4ebb1e6b918d8556cba629cb55b79d423f5.json | Drop Mavericks support.
Companion to https://github.com/Homebrew/brew/pull/7698.
Provide better, `odeprecated` messaging for
`depends_on :macos => :mavericks` and otherwise just fix up the code
that relied on `:mavericks`. | Library/Homebrew/software_spec.rb | @@ -386,7 +386,7 @@ def checksums
# Sort non-MacOS tags below MacOS tags.
OS::Mac::Version.from_symbol tag
- rescue ArgumentError
+ rescue MacOSVersionError
"0.#{tag}"
end
checksums = {} | true |
Other | Homebrew | brew | b58fa4ebb1e6b918d8556cba629cb55b79d423f5.json | Drop Mavericks support.
Companion to https://github.com/Homebrew/brew/pull/7698.
Provide better, `odeprecated` messaging for
`depends_on :macos => :mavericks` and otherwise just fix up the code
that relied on `:mavericks`. | Library/Homebrew/test/os/mac/software_spec_spec.rb | @@ -46,7 +46,7 @@
it "raises an error if passing invalid OS versions" do
expect {
spec.uses_from_macos("foo", since: :bar)
- }.to raise_error(ArgumentError, "unknown version :bar")
+ }.to raise_error(MacOSVersionError, "unknown or unsupported macOS version: :bar")
end
end
end | true |
Other | Homebrew | brew | b58fa4ebb1e6b918d8556cba629cb55b79d423f5.json | Drop Mavericks support.
Companion to https://github.com/Homebrew/brew/pull/7698.
Provide better, `odeprecated` messaging for
`depends_on :macos => :mavericks` and otherwise just fix up the code
that relied on `:mavericks`. | Library/Homebrew/test/os/mac/version_spec.rb | @@ -4,13 +4,13 @@
require "os/mac/version"
describe OS::Mac::Version do
- subject { described_class.new("10.10") }
+ subject { described_class.new("10.14") }
specify "comparison with Symbol" do
- expect(subject).to be > :mavericks
- expect(subject).to be == :yosemite
- expect(subject).to be === :yosemite # rubocop:disable Style/CaseEquality
- expect(subject).to be < :el_capitan
+ expect(subject).to be > :high_sierra
+ expect(subject).to be == :mojave
+ expect(subject).to be === :mojave # rubocop:disable Style/CaseEquality
+ expect(subject).to be < :catalina
end
specify "comparison with Fixnum" do
@@ -19,28 +19,28 @@
end
specify "comparison with Float" do
- expect(subject).to be > 10.9
- expect(subject).to be < 10.11
+ expect(subject).to be > 10.13
+ expect(subject).to be < 10.15
end
specify "comparison with String" do
- expect(subject).to be > "10.9"
- expect(subject).to be == "10.10"
- expect(subject).to be === "10.10" # rubocop:disable Style/CaseEquality
- expect(subject).to be < "10.11"
+ expect(subject).to be > "10.3"
+ expect(subject).to be == "10.14"
+ expect(subject).to be === "10.14" # rubocop:disable Style/CaseEquality
+ expect(subject).to be < "10.15"
end
specify "comparison with Version" do
- expect(subject).to be > Version.create("10.9")
- expect(subject).to be == Version.create("10.10")
- expect(subject).to be === Version.create("10.10") # rubocop:disable Style/CaseEquality
- expect(subject).to be < Version.create("10.11")
+ expect(subject).to be > Version.create("10.3")
+ expect(subject).to be == Version.create("10.14")
+ expect(subject).to be === Version.create("10.14") # rubocop:disable Style/CaseEquality
+ expect(subject).to be < Version.create("10.15")
end
specify "#from_symbol" do
- expect(described_class.from_symbol(:yosemite)).to eq(subject)
+ expect(described_class.from_symbol(:mojave)).to eq(subject)
expect { described_class.from_symbol(:foo) }
- .to raise_error(ArgumentError)
+ .to raise_error(MacOSVersionError, "unknown or unsupported macOS version: :foo")
end
specify "#pretty_name" do | true |
Other | Homebrew | brew | b58fa4ebb1e6b918d8556cba629cb55b79d423f5.json | Drop Mavericks support.
Companion to https://github.com/Homebrew/brew/pull/7698.
Provide better, `odeprecated` messaging for
`depends_on :macos => :mavericks` and otherwise just fix up the code
that relied on `:mavericks`. | Library/Homebrew/test/requirements/macos_requirement_spec.rb | @@ -16,8 +16,8 @@
end
it "supports maximum versions", :needs_macos do
- requirement = described_class.new([:mavericks], comparator: "<=")
- expect(requirement.satisfied?).to eq MacOS.version <= :mavericks
+ requirement = described_class.new([:catalina], comparator: "<=")
+ expect(requirement.satisfied?).to eq MacOS.version <= :catalina
end
end
end | true |
Other | Homebrew | brew | b58fa4ebb1e6b918d8556cba629cb55b79d423f5.json | Drop Mavericks support.
Companion to https://github.com/Homebrew/brew/pull/7698.
Provide better, `odeprecated` messaging for
`depends_on :macos => :mavericks` and otherwise just fix up the code
that relied on `:mavericks`. | Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-depends-on-macos-conflicting-forms.rb | @@ -1,12 +1,14 @@
-cask 'invalid-depends-on-macos-conflicting-forms' do
- version '1.2.3'
- sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
+# frozen_string_literal: true
+
+cask "invalid-depends-on-macos-conflicting-forms" do
+ version "1.2.3"
+ sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94"
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
- homepage 'https://brew.sh/invalid-depends-on-macos-conflicting-forms'
+ homepage "https://brew.sh/invalid-depends-on-macos-conflicting-forms"
- depends_on macos: :yosemite
- depends_on macos: '>= :mavericks'
+ depends_on macos: :catalina
+ depends_on macos: ">= :mojave"
- app 'Caffeine.app'
+ app "Caffeine.app"
end | true |
Other | Homebrew | brew | b58fa4ebb1e6b918d8556cba629cb55b79d423f5.json | Drop Mavericks support.
Companion to https://github.com/Homebrew/brew/pull/7698.
Provide better, `odeprecated` messaging for
`depends_on :macos => :mavericks` and otherwise just fix up the code
that relied on `:mavericks`. | Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-macos-array.rb | @@ -1,12 +1,14 @@
-cask 'with-depends-on-macos-array' do
- version '1.2.3'
- sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
+# frozen_string_literal: true
+
+cask "with-depends-on-macos-array" do
+ version "1.2.3"
+ sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94"
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
- homepage 'https://brew.sh/with-depends-on-macos-array'
+ homepage "https://brew.sh/with-depends-on-macos-array"
# since all OS releases are included, this should always pass
- depends_on macos: [:mavericks, :sierra, MacOS.version.to_sym]
+ depends_on macos: [:catalina, MacOS.version.to_sym]
- app 'Caffeine.app'
+ app "Caffeine.app"
end | true |
Other | Homebrew | brew | b58fa4ebb1e6b918d8556cba629cb55b79d423f5.json | Drop Mavericks support.
Companion to https://github.com/Homebrew/brew/pull/7698.
Provide better, `odeprecated` messaging for
`depends_on :macos => :mavericks` and otherwise just fix up the code
that relied on `:mavericks`. | Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-macos-comparison.rb | @@ -1,11 +1,13 @@
-cask 'with-depends-on-macos-comparison' do
- version '1.2.3'
- sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
+# frozen_string_literal: true
+
+cask "with-depends-on-macos-comparison" do
+ version "1.2.3"
+ sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94"
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
- homepage 'https://brew.sh/with-depends-on-macos-comparison'
+ homepage "https://brew.sh/with-depends-on-macos-comparison"
- depends_on macos: '>= :mavericks'
+ depends_on macos: ">= :catalina"
- app 'Caffeine.app'
+ app "Caffeine.app"
end | true |
Other | Homebrew | brew | b58fa4ebb1e6b918d8556cba629cb55b79d423f5.json | Drop Mavericks support.
Companion to https://github.com/Homebrew/brew/pull/7698.
Provide better, `odeprecated` messaging for
`depends_on :macos => :mavericks` and otherwise just fix up the code
that relied on `:mavericks`. | Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-macos-failure.rb | @@ -6,7 +6,7 @@
homepage 'https://brew.sh/with-depends-on-macos-failure'
# guarantee a mismatched release
- depends_on macos: MacOS.version == :mavericks ? :sierra : :mavericks
+ depends_on macos: MacOS.version == :catalina ? :mojave : :catalina
app 'Caffeine.app'
end | true |
Other | Homebrew | brew | b58fa4ebb1e6b918d8556cba629cb55b79d423f5.json | Drop Mavericks support.
Companion to https://github.com/Homebrew/brew/pull/7698.
Provide better, `odeprecated` messaging for
`depends_on :macos => :mavericks` and otherwise just fix up the code
that relied on `:mavericks`. | Library/Homebrew/test/utils/bottles/bottles_spec.rb | @@ -4,9 +4,9 @@
describe Utils::Bottles do
describe "#tag", :needs_macos do
- it "returns :mavericks on Mavericks" do
- allow(MacOS).to receive(:version).and_return(MacOS::Version.new("10.9"))
- expect(described_class.tag).to eq(:mavericks)
+ it "returns :catalina on Catalina" do
+ allow(MacOS).to receive(:version).and_return(MacOS::Version.new("10.15"))
+ expect(described_class.tag).to eq(:catalina)
end
end
end | true |
Other | Homebrew | brew | b58fa4ebb1e6b918d8556cba629cb55b79d423f5.json | Drop Mavericks support.
Companion to https://github.com/Homebrew/brew/pull/7698.
Provide better, `odeprecated` messaging for
`depends_on :macos => :mavericks` and otherwise just fix up the code
that relied on `:mavericks`. | Library/Homebrew/test/utils/bottles/collector_spec.rb | @@ -5,41 +5,41 @@
describe Utils::Bottles::Collector do
describe "#fetch_checksum_for" do
it "returns passed tags" do
- subject[:yosemite] = "foo"
- subject[:el_captain] = "bar"
- expect(subject.fetch_checksum_for(:el_captain)).to eq(["bar", :el_captain])
+ subject[:mojave] = "foo"
+ subject[:catalina] = "bar"
+ expect(subject.fetch_checksum_for(:catalina)).to eq(["bar", :catalina])
end
it "returns nil if empty" do
expect(subject.fetch_checksum_for(:foo)).to be nil
end
it "returns nil when there is no match" do
- subject[:yosemite] = "foo"
+ subject[:catalina] = "foo"
expect(subject.fetch_checksum_for(:foo)).to be nil
end
it "uses older tags when needed", :needs_macos do
- subject[:mavericks] = "foo"
- expect(subject.send(:find_matching_tag, :mavericks)).to eq(:mavericks)
- expect(subject.send(:find_matching_tag, :yosemite)).to eq(:mavericks)
+ subject[:mojave] = "foo"
+ expect(subject.send(:find_matching_tag, :mojave)).to eq(:mojave)
+ expect(subject.send(:find_matching_tag, :catalina)).to eq(:mojave)
end
it "does not use older tags when requested not to", :needs_macos do
allow(Homebrew::EnvConfig).to receive(:developer?).and_return(true)
allow(Homebrew::EnvConfig).to receive(:skip_or_later_bottles?).and_return(true)
allow(OS::Mac).to receive(:prerelease?).and_return(true)
- subject[:mavericks] = "foo"
- expect(subject.send(:find_matching_tag, :mavericks)).to eq(:mavericks)
- expect(subject.send(:find_matching_tag, :yosemite)).to be_nil
+ subject[:mojave] = "foo"
+ expect(subject.send(:find_matching_tag, :mojave)).to eq(:mojave)
+ expect(subject.send(:find_matching_tag, :catalina)).to be_nil
end
it "ignores HOMEBREW_SKIP_OR_LATER_BOTTLES on release versions", :needs_macos do
allow(Homebrew::EnvConfig).to receive(:skip_or_later_bottles?).and_return(true)
allow(OS::Mac).to receive(:prerelease?).and_return(false)
- subject[:mavericks] = "foo"
- expect(subject.send(:find_matching_tag, :mavericks)).to eq(:mavericks)
- expect(subject.send(:find_matching_tag, :yosemite)).to eq(:mavericks)
+ subject[:mojave] = "foo"
+ expect(subject.send(:find_matching_tag, :mojave)).to eq(:mojave)
+ expect(subject.send(:find_matching_tag, :catalina)).to eq(:mojave)
end
end
end | true |
Other | Homebrew | brew | b58fa4ebb1e6b918d8556cba629cb55b79d423f5.json | Drop Mavericks support.
Companion to https://github.com/Homebrew/brew/pull/7698.
Provide better, `odeprecated` messaging for
`depends_on :macos => :mavericks` and otherwise just fix up the code
that relied on `:mavericks`. | docs/Formula-Cookbook.md | @@ -11,7 +11,7 @@ A *formula* is a package definition written in Ruby. It can be created with `bre
| **opt prefix** | A symlink to the active version of a **Keg** | `/usr/local/opt/foo ` |
| **Cellar** | All **Kegs** are installed here | `/usr/local/Cellar` |
| **Tap** | A Git repository of **Formulae** and/or commands | `/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core` |
-| **Bottle** | Pre-built **Keg** used instead of building from source | `qt-4.8.4.mavericks.bottle.tar.gz` |
+| **Bottle** | Pre-built **Keg** used instead of building from source | `qt-4.8.4.catalina.bottle.tar.gz` |
| **Cask** | An [extension of Homebrew](https://github.com/Homebrew/homebrew-cask) to install macOS native apps | `/Applications/MacDown.app/Contents/SharedSupport/bin/macdown` |
| **Brew Bundle**| An [extension of Homebrew](https://github.com/Homebrew/homebrew-bundle) to describe dependencies | `brew 'myservice', restart_service: true` |
| true |
Other | Homebrew | brew | 1eefc4c5846a7035e7ab42435a86db12c7871a02.json | Adjust documentation for `devel` deprecation.
Update the documentation to be consistent with #7688. | Library/Homebrew/formula.rb | @@ -2383,6 +2383,7 @@ def stable(&block)
# depends_on "cairo"
# depends_on "pixman"
# end</pre>
+ # @private
def devel(&block)
@devel ||= SoftwareSpec.new
return @devel unless block_given?
@@ -2415,7 +2416,7 @@ def head(val = nil, specs = {}, &block)
end
# Additional downloads can be defined as resources and accessed in the
- # install method. Resources can also be defined inside a {.stable}, {.devel} or
+ # install method. Resources can also be defined inside a {.stable} or
# {.head} block. This mechanism replaces ad-hoc "subformula" classes.
# <pre>resource "additional_files" do
# url "https://example.com/additional-stuff.tar.gz"
@@ -2525,7 +2526,7 @@ def deprecated_option(hash)
# sha256 "c6bc3f48ce8e797854c4b865f6a8ff969867bbcaebd648ae6fd825683e59fef2"
# end</pre>
#
- # Patches can be declared in stable, devel, and head blocks. This form is
+ # Patches can be declared in stable and head blocks. This form is
# preferred over using conditionals.
# <pre>stable do
# patch do | true |
Other | Homebrew | brew | 1eefc4c5846a7035e7ab42435a86db12c7871a02.json | Adjust documentation for `devel` deprecation.
Update the documentation to be consistent with #7688. | docs/Formula-Cookbook.md | @@ -476,7 +476,7 @@ patch :p0 do
end
```
-[`patch`](https://rubydoc.brew.sh/Formula#patch-class_method)es can be declared in [`stable`](https://rubydoc.brew.sh/Formula#stable-class_method), [`devel`](https://rubydoc.brew.sh/Formula#devel-class_method), and [`head`](https://rubydoc.brew.sh/Formula#head-class_method) blocks. Always use a block instead of a conditional, i.e. `stable do ... end` instead of `if build.stable? then ... end`.
+[`patch`](https://rubydoc.brew.sh/Formula#patch-class_method)es can be declared in [`stable`](https://rubydoc.brew.sh/Formula#stable-class_method) and [`head`](https://rubydoc.brew.sh/Formula#head-class_method) blocks. Always use a block instead of a conditional, i.e. `stable do ... end` instead of `if build.stable? then ... end`.
```ruby
stable do
@@ -532,9 +532,9 @@ Instead of `git diff | pbcopy`, for some editors `git diff >> path/to/your/formu
If anything isn’t clear, you can usually figure it out by `grep`ping the `$(brew --repo homebrew/core)` directory. Please submit a pull request to amend this document if you think it will help!
-### Unstable versions (`devel`, `head`)
+### Unstable versions (`head`)
-Formulae can specify alternate downloads for the upstream project’s [`head`](https://rubydoc.brew.sh/Formula#head-class_method) (`master`/`trunk`) or [`devel`](https://rubydoc.brew.sh/Formula#devel-class_method) release (unstable but not `master`/`trunk`).
+Formulae can specify an alternate download for the upstream project’s [`head`](https://rubydoc.brew.sh/Formula#head-class_method) (`master`/`trunk`).
#### `head`
@@ -559,21 +559,6 @@ class Foo < Formula
end
```
-#### `devel`
-
-The [`devel`](https://rubydoc.brew.sh/Formula#devel-class_method) spec (activated by passing `--devel`) is used for a project’s unstable releases. `devel` specs are not allowed in Homebrew/homebrew-core.
-
-A `devel` spec is specified in a block:
-
-```ruby
-devel do
- url "https://foo.com/foo-0.1.tar.gz"
- sha256 "85cc828a96735bdafcf29eb6291ca91bac846579bcef7308536e0c875d6c81d7"
-end
-```
-
-You can test if the [`devel`](https://rubydoc.brew.sh/Formula#devel-class_method) spec is in use with `build.devel?`.
-
### Compiler selection
Sometimes a package fails to build when using a certain compiler. Since recent [Xcode versions](Xcode.md) no longer include a GCC compiler we cannot simply force the use of GCC. Instead, the correct way to declare this is the [`fails_with`](https://rubydoc.brew.sh/Formula#fails_with-class_method) DSL method. A properly constructed [`fails_with`](https://rubydoc.brew.sh/Formula#fails_with-class_method) block documents the latest compiler build version known to cause compilation to fail, and the cause of the failure. For example:
@@ -763,7 +748,7 @@ In summary, environment variables used by a formula need to conform to these fil
## Updating formulae
-Eventually a new version of the software will be released. In this case you should update the [`url`](https://rubydoc.brew.sh/Formula#url-class_method) and [`sha256`](https://rubydoc.brew.sh/Formula#sha256%3D-class_method). If a [`revision`](https://rubydoc.brew.sh/Formula#revision%3D-class_method) line exists outside any `bottle do` block *and* the new release is stable rather than devel, it should be removed.
+Eventually a new version of the software will be released. In this case you should update the [`url`](https://rubydoc.brew.sh/Formula#url-class_method) and [`sha256`](https://rubydoc.brew.sh/Formula#sha256%3D-class_method). If a [`revision`](https://rubydoc.brew.sh/Formula#revision%3D-class_method) line exists outside any `bottle do` block it should be removed.
Leave the `bottle do ... end` block as-is; our CI system will update it when we pull your change.
| true |
Other | Homebrew | brew | 1eefc4c5846a7035e7ab42435a86db12c7871a02.json | Adjust documentation for `devel` deprecation.
Update the documentation to be consistent with #7688. | docs/How-To-Open-a-Homebrew-Pull-Request.md | @@ -63,7 +63,7 @@ To make a new branch and submit it for review, create a GitHub pull request with
brew audit --strict <CHANGED_FORMULA>
```
6. [Make a separate commit](Formula-Cookbook.md#commit) for each changed formula with `git add` and `git commit`.
- * Please note that our preferred commit message format for simple version updates is "`<FORMULA_NAME> <NEW_VERSION>`", e.g. "`source-highlight 3.1.8`" but `devel` version updates should have the commit message suffixed with `(devel)`, e.g. "`nginx 1.9.1 (devel)`". If updating both `stable` and `devel`, the format should be a concatenation of these two forms, e.g. "`x264 r2699, r2705 (devel)`".
+ * Please note that our preferred commit message format for simple version updates is "`<FORMULA_NAME> <NEW_VERSION>`", e.g. "`source-highlight 3.1.8`".
7. Upload your branch of new commits to your fork:
```sh
git push --set-upstream <YOUR_USERNAME> <YOUR_BRANCH_NAME> | true |
Other | Homebrew | brew | 0dd004f53d8c513b9b0f5fffcbf07e82bfb567fe.json | dev-cmd/audit: handle nil newest_committed_revision.
Fixes #7712. | Library/Homebrew/dev-cmd/audit.rb | @@ -786,7 +786,8 @@ def audit_revision_and_version_scheme
!previous_revision.nil? &&
current_revision < previous_revision
problem "revision should not decrease (from #{previous_revision} to #{current_revision})"
- elsif current_revision > (newest_committed_revision + 1)
+ elsif newest_committed_revision &&
+ current_revision > (newest_committed_revision + 1)
problem "revisions should only increment by 1"
end
end | false |
Other | Homebrew | brew | 2a94d382ac03a1766a2de5edde536a4a5ce4585f.json | audit: make audit_revision_and_version_scheme faster.
This is really, really slow at the moment for a few reasons:
- it goes through the list of revisions twice
- it checks many more revisions than it needs to
Even after these improvements it's still by far the slowest audit so
am also making it a `--git` only audit.
Additionally, to further improve default `brew audit` performance do not
run `brew style` checks when doing `brew audit` with no arguments.
`brew style` can be run quickly and efficiently on all of a tap (and is
cached) so no need to duplicate it here. | Library/Homebrew/dev-cmd/audit.rb | @@ -23,11 +23,13 @@ def audit_args
Check <formula> for Homebrew coding style violations. This should be run before
submitting a new formula. If no <formula> are provided, check all locally
- available formulae. Will exit with a non-zero status if any errors are
- found, which can be useful for implementing pre-commit hooks.
+ available formulae and skip style checks. Will exit with a non-zero status if any
+ errors are found.
EOS
switch "--strict",
description: "Run additional, stricter style checks."
+ switch "--git",
+ description: "Run additional, slower style checks that navigate the Git repository."
switch "--online",
description: "Run additional, slower style checks that require a network connection."
switch "--new-formula",
@@ -82,17 +84,14 @@ def audit
new_formula = args.new_formula?
strict = new_formula || args.strict?
online = new_formula || args.online?
+ git = args.git?
+ skip_style = args.skip_style? || args.no_named?
ENV.activate_extensions!
ENV.setup_build_environment
- if args.no_named?
- audit_formulae = Formula
- style_files = Tap.map(&:formula_dir)
- else
- audit_formulae = args.resolved_formulae
- style_files = args.formulae_paths
- end
+ audit_formulae = args.no_named? ? Formula : args.resolved_formulae
+ style_files = args.formulae_paths unless skip_style
only_cops = args.only_cops
except_cops = args.except_cops
@@ -109,13 +108,20 @@ def audit
end
# Check style in a single batch run up front for performance
- style_results = Style.check_style_json(style_files, options) unless args.skip_style?
+ style_results = Style.check_style_json(style_files, options) if style_files
new_formula_problem_lines = []
audit_formulae.sort.each do |f|
only = only_cops ? ["style"] : args.only
- options = { new_formula: new_formula, strict: strict, online: online, only: only, except: args.except }
- options[:style_offenses] = style_results.file_offenses(f.path) unless args.skip_style?
+ options = {
+ new_formula: new_formula,
+ strict: strict,
+ online: online,
+ git: git,
+ only: only,
+ except: args.except,
+ }
+ options[:style_offenses] = style_results.file_offenses(f.path) if style_results
options[:display_cop_names] = args.display_cop_names?
fa = FormulaAuditor.new(f, options)
@@ -126,7 +132,7 @@ def audit
formula_count += 1
problem_count += fa.problems.size
problem_lines = format_problem_lines(fa.problems)
- corrected_problem_count = options[:style_offenses].count(&:corrected?) unless args.skip_style?
+ corrected_problem_count = options[:style_offenses].count(&:corrected?) if options[:style_offenses]
new_formula_problem_lines = format_problem_lines(fa.new_formula_problems)
if args.display_filename?
puts problem_lines.map { |s| "#{f.path}: #{s}" }
@@ -205,6 +211,7 @@ def initialize(formula, options = {})
@new_formula = options[:new_formula] && !@versioned_formula
@strict = options[:strict]
@online = options[:online]
+ @git = options[:git]
@display_cop_names = options[:display_cop_names]
@only = options[:only]
@except = options[:except]
@@ -709,86 +716,78 @@ def audit_specs
end
def audit_revision_and_version_scheme
+ return unless @git
return unless formula.tap # skip formula not from core or any taps
return unless formula.tap.git? # git log is required
- return if @new_formula
+ return if formula.stable.blank?
fv = FormulaVersions.new(formula)
- previous_version_and_checksum = fv.previous_version_and_checksum("origin/master")
- [:stable, :devel].each do |spec_sym|
- next unless spec = formula.send(spec_sym)
- next unless previous_version_and_checksum[spec_sym][:version] == spec.version
- next if previous_version_and_checksum[spec_sym][:checksum] == spec.checksum
+ current_version = formula.stable.version
+ current_checksum = formula.stable.checksum
+ current_version_scheme = formula.version_scheme
+ current_revision = formula.revision
- problem(
- "#{spec_sym}: sha256 changed without the version also changing; " \
- "please create an issue upstream to rule out malicious " \
- "circumstances and to find out why the file changed.",
- )
- end
+ previous_version = nil
+ previous_checksum = nil
+ previous_version_scheme = nil
+ previous_revision = nil
- attributes = [:revision, :version_scheme]
- attributes_map = fv.version_attributes_map(attributes, "origin/master")
+ newest_committed_version = nil
+ newest_committed_revision = nil
- current_version_scheme = formula.version_scheme
- [:stable, :devel].each do |spec|
- spec_version_scheme_map = attributes_map[:version_scheme][spec]
- next if spec_version_scheme_map.empty?
-
- version_schemes = spec_version_scheme_map.values.flatten
- max_version_scheme = version_schemes.max
- max_version = spec_version_scheme_map.select do |_, version_scheme|
- version_scheme.first == max_version_scheme
- end.keys.max
-
- if max_version_scheme && current_version_scheme < max_version_scheme
- problem "version_scheme should not decrease (from #{max_version_scheme} to #{current_version_scheme})"
- end
+ fv.rev_list("origin/master") do |rev|
+ fv.formula_at_revision(rev) do |f|
+ stable = f.stable
+ next if stable.blank?
- if max_version_scheme && current_version_scheme >= max_version_scheme &&
- current_version_scheme > 1 &&
- !version_schemes.include?(current_version_scheme - 1)
- problem "version_schemes should only increment by 1"
- end
+ previous_version = stable.version
+ previous_checksum = stable.checksum
+ previous_version_scheme = f.version_scheme
+ previous_revision = f.revision
- formula_spec = formula.send(spec)
- next unless formula_spec
+ newest_committed_version ||= previous_version
+ newest_committed_revision ||= previous_revision
+ end
- spec_version = formula_spec.version
- next unless max_version
- next if spec_version >= max_version
+ break if previous_version && current_version != previous_version
+ end
- above_max_version_scheme = current_version_scheme > max_version_scheme
- map_includes_version = spec_version_scheme_map.key?(spec_version)
- next if !current_version_scheme.zero? &&
- (above_max_version_scheme || map_includes_version)
+ if current_version == previous_version &&
+ current_checksum != previous_checksum
+ problem(
+ "stable sha256 changed without the version also changing; " \
+ "please create an issue upstream to rule out malicious " \
+ "circumstances and to find out why the file changed.",
+ )
+ end
- problem "#{spec} version should not decrease (from #{max_version} to #{spec_version})"
+ if !newest_committed_version.nil? &&
+ current_version < newest_committed_version &&
+ current_version_scheme == previous_version_scheme
+ problem "stable version should not decrease (from #{newest_committed_version} to #{current_version})"
end
- current_revision = formula.revision
- revision_map = attributes_map[:revision][:stable]
- if formula.stable && !revision_map.empty?
- stable_revisions = revision_map[formula.stable.version]
- stable_revisions ||= []
- max_revision = stable_revisions.max || 0
-
- if current_revision < max_revision
- problem "revision should not decrease (from #{max_revision} to #{current_revision})"
+ unless previous_version_scheme.nil?
+ if current_version_scheme < previous_version_scheme
+ problem "version_scheme should not decrease (from #{previous_version_scheme} " \
+ "to #{current_version_scheme})"
+ elsif current_version_scheme > (previous_version_scheme + 1)
+ problem "version_schemes should only increment by 1"
end
+ end
- stable_revisions -= [formula.revision]
- if !current_revision.zero? && stable_revisions.empty? &&
- revision_map.keys.length > 1
- problem "'revision #{formula.revision}' should be removed"
- elsif current_revision > 1 &&
- current_revision != max_revision &&
- !stable_revisions.include?(current_revision - 1)
- problem "revisions should only increment by 1"
- end
- elsif !current_revision.zero? # head/devel-only formula
+ if previous_version != newest_committed_version &&
+ !current_revision.zero? &&
+ current_revision == newest_committed_revision &&
+ current_revision == previous_revision
problem "'revision #{current_revision}' should be removed"
+ elsif current_version == previous_version &&
+ !previous_revision.nil? &&
+ current_revision < previous_revision
+ problem "revision should not decrease (from #{previous_revision} to #{current_revision})"
+ elsif current_revision > (newest_committed_revision + 1)
+ problem "revisions should only increment by 1"
end
end
| true |
Other | Homebrew | brew | 2a94d382ac03a1766a2de5edde536a4a5ce4585f.json | audit: make audit_revision_and_version_scheme faster.
This is really, really slow at the moment for a few reasons:
- it goes through the list of revisions twice
- it checks many more revisions than it needs to
Even after these improvements it's still by far the slowest audit so
am also making it a `--git` only audit.
Additionally, to further improve default `brew audit` performance do not
run `brew style` checks when doing `brew audit` with no arguments.
`brew style` can be run quickly and efficiently on all of a tap (and is
cached) so no need to duplicate it here. | Library/Homebrew/formula_versions.rb | @@ -65,66 +65,4 @@ def bottle_version_map(branch)
end
map
end
-
- def previous_version_and_checksum(branch)
- map = {}
-
- rev_list(branch) do |rev|
- formula_at_revision(rev) do |f|
- [:stable, :devel].each do |spec_sym|
- next unless spec = f.send(spec_sym)
-
- map[spec_sym] ||= { version: spec.version, checksum: spec.checksum }
- end
- end
-
- break if map[:stable] || map[:devel]
- end
-
- map[:stable] ||= {}
- map[:devel] ||= {}
-
- map
- end
-
- def version_attributes_map(attributes, branch)
- attributes_map = {}
- return attributes_map if attributes.empty?
-
- attributes.each do |attribute|
- attributes_map[attribute] ||= {
- stable: {},
- devel: {},
- }
- end
-
- stable_versions_seen = 0
- rev_list(branch) do |rev|
- formula_at_revision(rev) do |f|
- attributes.each do |attribute|
- map = attributes_map[attribute]
- set_attribute_map(map, f, attribute)
-
- stable_keys_length = (map[:stable].keys + [f.version]).uniq.length
- stable_versions_seen = [stable_versions_seen, stable_keys_length].max
- end
- end
- break if stable_versions_seen > MAX_VERSIONS_DEPTH
- end
-
- attributes_map
- end
-
- private
-
- def set_attribute_map(map, f, attribute)
- if f.stable
- map[:stable][f.stable.version] ||= []
- map[:stable][f.stable.version] << f.send(attribute)
- end
- return unless f.devel
-
- map[:devel][f.devel.version] ||= []
- map[:devel][f.devel.version] << f.send(attribute)
- end
end | true |
Other | Homebrew | brew | 2a94d382ac03a1766a2de5edde536a4a5ce4585f.json | audit: make audit_revision_and_version_scheme faster.
This is really, really slow at the moment for a few reasons:
- it goes through the list of revisions twice
- it checks many more revisions than it needs to
Even after these improvements it's still by far the slowest audit so
am also making it a `--git` only audit.
Additionally, to further improve default `brew audit` performance do not
run `brew style` checks when doing `brew audit` with no arguments.
`brew style` can be run quickly and efficiently on all of a tap (and is
cached) so no need to duplicate it here. | Library/Homebrew/test/dev-cmd/audit_spec.rb | @@ -302,7 +302,7 @@ class Foo < Formula
describe "#audit_revision_and_version_scheme" do
subject {
- fa = described_class.new(Formulary.factory(formula_path))
+ fa = described_class.new(Formulary.factory(formula_path), git: true)
fa.audit_revision_and_version_scheme
fa.problems.first
} | true |
Other | Homebrew | brew | 2a94d382ac03a1766a2de5edde536a4a5ce4585f.json | audit: make audit_revision_and_version_scheme faster.
This is really, really slow at the moment for a few reasons:
- it goes through the list of revisions twice
- it checks many more revisions than it needs to
Even after these improvements it's still by far the slowest audit so
am also making it a `--git` only audit.
Additionally, to further improve default `brew audit` performance do not
run `brew style` checks when doing `brew audit` with no arguments.
`brew style` can be run quickly and efficiently on all of a tap (and is
cached) so no need to duplicate it here. | docs/Manpage.md | @@ -634,11 +634,13 @@ Homebrew/homebrew-cask (if tapped) to standard output.
Check *`formula`* for Homebrew coding style violations. This should be run before
submitting a new formula. If no *`formula`* are provided, check all locally
-available formulae. Will exit with a non-zero status if any errors are found,
-which can be useful for implementing pre-commit hooks.
+available formulae and skip style checks. Will exit with a non-zero status if
+any errors are found.
* `--strict`:
Run additional, stricter style checks.
+* `--git`:
+ Run additional, slower style checks that navigate the Git repository.
* `--online`:
Run additional, slower style checks that require a network connection.
* `--new-formula`: | true |
Other | Homebrew | brew | 2a94d382ac03a1766a2de5edde536a4a5ce4585f.json | audit: make audit_revision_and_version_scheme faster.
This is really, really slow at the moment for a few reasons:
- it goes through the list of revisions twice
- it checks many more revisions than it needs to
Even after these improvements it's still by far the slowest audit so
am also making it a `--git` only audit.
Additionally, to further improve default `brew audit` performance do not
run `brew style` checks when doing `brew audit` with no arguments.
`brew style` can be run quickly and efficiently on all of a tap (and is
cached) so no need to duplicate it here. | manpages/brew.1 | @@ -801,13 +801,17 @@ Print the version numbers of Homebrew, Homebrew/homebrew\-core and Homebrew/home
.SH "DEVELOPER COMMANDS"
.
.SS "\fBaudit\fR [\fIoptions\fR] [\fIformula\fR]"
-Check \fIformula\fR for Homebrew coding style violations\. This should be run before submitting a new formula\. If no \fIformula\fR are provided, check all locally available formulae\. Will exit with a non\-zero status if any errors are found, which can be useful for implementing pre\-commit hooks\.
+Check \fIformula\fR for Homebrew coding style violations\. This should be run before submitting a new formula\. If no \fIformula\fR are provided, check all locally available formulae and skip style checks\. Will exit with a non\-zero status if any errors are found\.
.
.TP
\fB\-\-strict\fR
Run additional, stricter style checks\.
.
.TP
+\fB\-\-git\fR
+Run additional, slower style checks that navigate the Git repository\.
+.
+.TP
\fB\-\-online\fR
Run additional, slower style checks that require a network connection\.
. | true |
Other | Homebrew | brew | 16f304c3e01203005b72338ba81aff585dd73e75.json | workflows/doctor: add macOS `brew doctor` CI.
When we change any of the files related to `brew doctor` or Xcode
versions ensure that we test them on the macOS self-hosted workers so
we don't merge changes here that break `brew doctor` there. | .github/workflows/doctor.yml | @@ -0,0 +1,50 @@
+name: brew doctor
+on:
+ pull_request:
+ paths:
+ - .github/workflows/doctor.yml
+ - Library/Homebrew/cmd/doctor.rb
+ - Library/Homebrew/diagnostic.rb
+ - Library/Homebrew/extend/os/diagnostic.rb
+ - Library/Homebrew/extend/os/mac/diagnostic.rb
+ - Library/Homebrew/os/mac/xcode.rb
+jobs:
+ tests:
+ strategy:
+ matrix:
+ version: [10.15, 10.14, 10.13]
+ fail-fast: false
+ runs-on: ${{ matrix.version }}
+ env:
+ PATH: '/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin'
+ HOMEBREW_DEVELOPER: 1
+ HOMEBREW_NO_ANALYTICS: 1
+ HOMEBREW_NO_AUTO_UPDATE: 1
+ steps:
+ - name: Update Homebrew
+ run: brew update-reset
+
+ - name: Set up Git repository
+ run: |
+ cd $(brew --repo)
+ git clean -ffdx
+ git fetch --prune --force origin master
+ git fetch --prune --force origin ${{github.sha}}
+ git checkout --force ${{github.sha}}
+ git log -1
+
+ - name: Run brew test-bot --only-cleanup-before
+ run: brew test-bot --only-cleanup-before
+
+ - name: Run brew test-bot --only-setup
+ run: brew test-bot --only-setup
+
+ - name: Run brew test-bot --only-cleanup-after
+ if: always()
+ run: brew test-bot --only-cleanup-after
+
+ - name: Cleanup
+ if: always()
+ run: |
+ find .
+ rm -rf * | false |
Other | Homebrew | brew | 0041ea21f57c8abf4a543d8645ec25e1704542a6.json | Change occurrences of "whitelist" to "allowlist" | Library/Homebrew/.rubocop.yml | @@ -74,7 +74,7 @@ Naming/PredicateName:
# can't rename these
AllowedMethods: is_32_bit?, is_64_bit?
-# whitelist those that are standard
+# allow those that are standard
# TODO: try to remove some of these
Naming/MethodParameterName:
AllowedNames: | true |
Other | Homebrew | brew | 0041ea21f57c8abf4a543d8645ec25e1704542a6.json | Change occurrences of "whitelist" to "allowlist" | Library/Homebrew/dev-cmd/audit.rb | @@ -327,7 +327,7 @@ def audit_formula_name
problem "Formula name conflicts with existing core formula."
end
- USES_FROM_MACOS_WHITELIST = %w[
+ USES_FROM_MACOS_ALLOWLIST = %w[
apr
apr-util
openblas
@@ -369,7 +369,7 @@ def audit_deps
dep_f.keg_only? &&
dep_f.keg_only_reason.provided_by_macos? &&
dep_f.keg_only_reason.applicable? &&
- !USES_FROM_MACOS_WHITELIST.include?(dep.name)
+ !USES_FROM_MACOS_ALLOWLIST.include?(dep.name)
new_formula_problem(
"Dependency '#{dep.name}' is provided by macOS; " \
"please replace 'depends_on' with 'uses_from_macos'.",
@@ -441,7 +441,7 @@ def audit_postgresql
end
end
- VERSIONED_KEG_ONLY_WHITELIST = %w[
+ VERSIONED_KEG_ONLY_ALLOWLIST = %w[
autoconf@2.13
bash-completion@2
gnupg@1.4
@@ -463,7 +463,7 @@ def audit_versioned_keg_only
end
end
- return if VERSIONED_KEG_ONLY_WHITELIST.include?(formula.name) || formula.name.start_with?("gcc@")
+ return if VERSIONED_KEG_ONLY_ALLOWLIST.include?(formula.name) || formula.name.start_with?("gcc@")
problem "Versioned formulae in homebrew/core should use `keg_only :versioned_formula`"
end
@@ -552,7 +552,7 @@ def get_repo_data(regex)
[user, repo]
end
- VERSIONED_HEAD_SPEC_WHITELIST = %w[
+ VERSIONED_HEAD_SPEC_ALLOWLIST = %w[
bash-completion@2
imagemagick@6
].freeze
@@ -564,7 +564,7 @@ def get_repo_data(regex)
"vim" => "50",
}.freeze
- UNSTABLE_WHITELIST = {
+ UNSTABLE_ALLOWLIST = {
"aalib" => "1.4rc",
"automysqlbackup" => "3.0-rc",
"aview" => "1.3.0rc",
@@ -582,7 +582,7 @@ def get_repo_data(regex)
"vbindiff" => "3.0_beta",
}.freeze
- GNOME_DEVEL_WHITELIST = {
+ GNOME_DEVEL_ALLOWLIST = {
"libart" => "2.3",
"gtk-mac-integration" => "2.1",
"gtk-doc" => "1.31",
@@ -646,7 +646,7 @@ def audit_specs
if formula.head && @versioned_formula
head_spec_message = "Formulae should not have a `HEAD` spec"
- problem head_spec_message unless VERSIONED_HEAD_SPEC_WHITELIST.include?(formula.name)
+ problem head_spec_message unless VERSIONED_HEAD_SPEC_ALLOWLIST.include?(formula.name)
end
THROTTLED_BLACKLIST.each do |f, v|
@@ -672,12 +672,12 @@ def audit_specs
when /[\d._-](alpha|beta|rc\d)/
matched = Regexp.last_match(1)
version_prefix = stable_version_string.sub(/\d+$/, "")
- return if UNSTABLE_WHITELIST[formula.name] == version_prefix
+ return if UNSTABLE_ALLOWLIST[formula.name] == version_prefix
problem "Stable version URLs should not contain #{matched}"
when %r{download\.gnome\.org/sources}, %r{ftp\.gnome\.org/pub/GNOME/sources}i
version_prefix = stable_version_string.split(".")[0..1].join(".")
- return if GNOME_DEVEL_WHITELIST[formula.name] == version_prefix
+ return if GNOME_DEVEL_ALLOWLIST[formula.name] == version_prefix
return if stable_url_version < Version.create("1.0")
return if stable_url_minor_version.even?
| true |
Other | Homebrew | brew | 0041ea21f57c8abf4a543d8645ec25e1704542a6.json | Change occurrences of "whitelist" to "allowlist" | Library/Homebrew/diagnostic.rb | @@ -171,11 +171,11 @@ def check_for_anaconda
EOS
end
- def __check_stray_files(dir, pattern, white_list, message)
+ def __check_stray_files(dir, pattern, allow_list, message)
return unless File.directory?(dir)
files = Dir.chdir(dir) do
- (Dir.glob(pattern) - Dir.glob(white_list))
+ (Dir.glob(pattern) - Dir.glob(allow_list))
.select { |f| File.file?(f) && !File.symlink?(f) }
.map { |f| File.join(dir, f) }
end
@@ -187,7 +187,7 @@ def __check_stray_files(dir, pattern, white_list, message)
def check_for_stray_dylibs
# Dylibs which are generally OK should be added to this list,
# with a short description of the software they come with.
- white_list = [
+ allow_list = [
"libfuse.2.dylib", # MacFuse
"libfuse_ino64.2.dylib", # MacFuse
"libmacfuse_i32.2.dylib", # OSXFuse MacFuse compatibility layer
@@ -207,7 +207,7 @@ def check_for_stray_dylibs
"sentinel-*.dylib", # SentinelOne
]
- __check_stray_files "/usr/local/lib", "*.dylib", white_list, <<~EOS
+ __check_stray_files "/usr/local/lib", "*.dylib", allow_list, <<~EOS
Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
@@ -219,7 +219,7 @@ def check_for_stray_dylibs
def check_for_stray_static_libs
# Static libs which are generally OK should be added to this list,
# with a short description of the software they come with.
- white_list = [
+ allow_list = [
"libntfs-3g.a", # NTFS-3G
"libntfs.a", # NTFS-3G
"libublio.a", # NTFS-3G
@@ -232,7 +232,7 @@ def check_for_stray_static_libs
"libtrustedcomponents.a", # Symantec Endpoint Protection
]
- __check_stray_files "/usr/local/lib", "*.a", white_list, <<~EOS
+ __check_stray_files "/usr/local/lib", "*.a", allow_list, <<~EOS
Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
@@ -244,15 +244,15 @@ def check_for_stray_static_libs
def check_for_stray_pcs
# Package-config files which are generally OK should be added to this list,
# with a short description of the software they come with.
- white_list = [
+ allow_list = [
"fuse.pc", # OSXFuse/MacFuse
"macfuse.pc", # OSXFuse MacFuse compatibility layer
"osxfuse.pc", # OSXFuse
"libntfs-3g.pc", # NTFS-3G
"libublio.pc", # NTFS-3G
]
- __check_stray_files "/usr/local/lib/pkgconfig", "*.pc", white_list, <<~EOS
+ __check_stray_files "/usr/local/lib/pkgconfig", "*.pc", allow_list, <<~EOS
Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
@@ -262,7 +262,7 @@ def check_for_stray_pcs
end
def check_for_stray_las
- white_list = [
+ allow_list = [
"libfuse.la", # MacFuse
"libfuse_ino64.la", # MacFuse
"libosxfuse_i32.la", # OSXFuse
@@ -273,7 +273,7 @@ def check_for_stray_las
"libublio.la", # NTFS-3G
]
- __check_stray_files "/usr/local/lib", "*.la", white_list, <<~EOS
+ __check_stray_files "/usr/local/lib", "*.la", allow_list, <<~EOS
Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
@@ -283,7 +283,7 @@ def check_for_stray_las
end
def check_for_stray_headers
- white_list = [
+ allow_list = [
"fuse.h", # MacFuse
"fuse/**/*.h", # MacFuse
"macfuse/**/*.h", # OSXFuse MacFuse compatibility layer
@@ -292,7 +292,7 @@ def check_for_stray_headers
"ntfs-3g/**/*.h", # NTFS-3G
]
- __check_stray_files "/usr/local/include", "**/*.h", white_list, <<~EOS
+ __check_stray_files "/usr/local/include", "**/*.h", allow_list, <<~EOS
Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
@@ -444,7 +444,7 @@ def check_for_config_scripts
scripts = []
- whitelist = %W[
+ allowlist = %W[
/bin /sbin
/usr/bin /usr/sbin
/usr/X11/bin /usr/X11R6/bin /opt/X11/bin
@@ -454,7 +454,7 @@ def check_for_config_scripts
].map(&:downcase)
paths.each do |p|
- next if whitelist.include?(p.downcase) || !File.directory?(p)
+ next if allowlist.include?(p.downcase) || !File.directory?(p)
realpath = Pathname.new(p).realpath.to_s
next if realpath.start_with?(real_cellar.to_s, HOMEBREW_CELLAR.to_s) | true |
Other | Homebrew | brew | 0041ea21f57c8abf4a543d8645ec25e1704542a6.json | Change occurrences of "whitelist" to "allowlist" | Library/Homebrew/download_strategy.rb | @@ -603,7 +603,7 @@ def clone_repo
end
class GitDownloadStrategy < VCSDownloadStrategy
- SHALLOW_CLONE_WHITELIST = [
+ SHALLOW_CLONE_ALLOWLIST = [
%r{git://},
%r{https://github\.com},
%r{http://git\.sv\.gnu\.org},
@@ -654,7 +654,7 @@ def shallow_dir?
end
def support_depth?
- @ref_type != :revision && SHALLOW_CLONE_WHITELIST.any? { |regex| @url =~ regex }
+ @ref_type != :revision && SHALLOW_CLONE_ALLOWLIST.any? { |regex| @url =~ regex }
end
def git_dir | true |
Other | Homebrew | brew | 0041ea21f57c8abf4a543d8645ec25e1704542a6.json | Change occurrences of "whitelist" to "allowlist" | Library/Homebrew/extend/os/linux/linkage_checker.rb | @@ -2,7 +2,7 @@
class LinkageChecker
# Libraries provided by glibc and gcc.
- SYSTEM_LIBRARY_WHITELIST = %w[
+ SYSTEM_LIBRARY_ALLOWLIST = %w[
ld-linux-x86-64.so.2
libanl.so.1
libc.so.6
@@ -28,7 +28,7 @@ def check_dylibs(rebuild_cache:)
# glibc and gcc are implicit dependencies.
# No other linkage to system libraries is expected or desired.
@unwanted_system_dylibs = @system_dylibs.reject do |s|
- SYSTEM_LIBRARY_WHITELIST.include? File.basename(s)
+ SYSTEM_LIBRARY_ALLOWLIST.include? File.basename(s)
end
@undeclared_deps -= ["gcc", "glibc"]
end | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.