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 | 76bfd0cecbe8ca74af5b8ea35a4a7251dd1fc729.json | Add superenv for Linux | Library/Homebrew/extend/os/extend/ENV/super.rb | @@ -1 +1,5 @@
-require "extend/os/mac/extend/ENV/super" if OS.mac?
+if OS.mac?
+ require "extend/os/mac/extend/ENV/super"
+elsif OS.linux?
+ require "extend/os/linux/extend/ENV/super"
+end | true |
Other | Homebrew | brew | 76bfd0cecbe8ca74af5b8ea35a4a7251dd1fc729.json | Add superenv for Linux | Library/Homebrew/extend/os/linux/extend/ENV/super.rb | @@ -0,0 +1,33 @@
+module Superenv
+ # @private
+ def self.bin
+ (HOMEBREW_SHIMS_PATH/"linux/super").realpath
+ end
+
+ def homebrew_extra_paths
+ paths = []
+ paths += %w[binutils make].map do |f|
+ begin
+ bin = Formula[f].opt_bin
+ bin if bin.directory?
+ rescue FormulaUnavailable... | true |
Other | Homebrew | brew | 76bfd0cecbe8ca74af5b8ea35a4a7251dd1fc729.json | Add superenv for Linux | Library/Homebrew/extend/os/mac/extend/ENV/super.rb | @@ -58,6 +58,14 @@ def homebrew_extra_isystem_paths
def homebrew_extra_library_paths
paths = []
+ if compiler == :llvm_clang
+ if MacOS::CLT.installed?
+ paths << "/usr/lib"
+ else
+ paths << "#{MacOS.sdk_path}/usr/lib"
+ end
+ paths << Formula["llvm"].opt_lib.to_s
+ en... | true |
Other | Homebrew | brew | db56b1add5eddfe1413b3d8828635757a977ea39.json | python_virtualenv_constants: update virtualenv to 16.0.0 | Library/Homebrew/language/python_virtualenv_constants.rb | @@ -1,2 +1,2 @@
-PYTHON_VIRTUALENV_URL = "https://files.pythonhosted.org/packages/b1/72/2d70c5a1de409ceb3a27ff2ec007ecdd5cc52239e7c74990e32af57affe9/virtualenv-15.2.0.tar.gz".freeze
-PYTHON_VIRTUALENV_SHA256 = "1d7e241b431e7afce47e77f8843a276f652699d1fa4f93b9d8ce0076fd7b0b54".freeze
+PYTHON_VIRTUALENV_URL = "https://fi... | false |
Other | Homebrew | brew | 16e5799f8607b5120b05793b09d4c3bcc4703c8f.json | shims/linux/super/cc: Make changes for Linux | Library/Homebrew/shims/linux/super/cc | @@ -14,7 +14,7 @@ require "pathname"
require "set"
class Cmd
- attr_reader :config, :prefix, :cellar, :opt, :tmpdir, :sysroot, :deps
+ attr_reader :config, :prefix, :cellar, :opt, :tmpdir, :deps
attr_reader :archflags, :optflags, :keg_regex, :formula_prefix
def initialize(arg0, args)
@@ -25,7 +25,6 @@ cla... | false |
Other | Homebrew | brew | c8084244996e6b7a6f0e018f18703ff5c4190ed2.json | Adjust alignment of select and sort. | Library/Homebrew/cmd/outdated.rb | @@ -41,9 +41,8 @@ def print_outdated(formulae)
verbose = ($stdout.tty? || ARGV.verbose?) && !ARGV.flag?("--quiet")
fetch_head = ARGV.fetch_head?
- outdated_formulae = formulae
- .select { |f| f.outdated?(fetch_head: fetch_head) }
- .sort
+ outdated_formula... | false |
Other | Homebrew | brew | 8ab71de3e90838c685e85bd7c467041501fc3c8d.json | docs/_config.yml: use brew.sh theme name.
This has been updated now we have a newer version of
jekyll-remote-theme. | docs/_config.yml | @@ -1,7 +1,7 @@
title: Homebrew Documentation
description: Documentation for the missing package manager for macOS.
-remote_theme: Homebrew/brew-sh
+remote_theme: Homebrew/brew.sh
exclude:
- bin | false |
Other | Homebrew | brew | 11c7b08a345142775be8b9f647618920f7cb03ca.json | formula: add versioned_formulae to to_hash. | Library/Homebrew/formula.rb | @@ -1559,6 +1559,7 @@ def to_hash
"full_name" => full_name,
"oldname" => oldname,
"aliases" => aliases.sort,
+ "versioned_formulae" => versioned_formulae.map(&:name),
"desc" => desc,
"homepage" => homepage,
"versions" => { | false |
Other | Homebrew | brew | 840c97c1cce29cdb7c5e453deb17b2023b35ea42.json | formula: add versioned formulae method. | Library/Homebrew/dev-cmd/audit.rb | @@ -251,11 +251,9 @@ def audit_file
problem "#{formula} is versioned but no #{unversioned_name} formula exists"
end
elsif ARGV.build_stable? && formula.stable? &&
- !(versioned_formulae = Dir[formula.path.to_s.gsub(/\.rb$/, "@*.rb")]).empty?
+ !(versioned_formulae = form... | true |
Other | Homebrew | brew | 840c97c1cce29cdb7c5e453deb17b2023b35ea42.json | formula: add versioned formulae method. | Library/Homebrew/formula.rb | @@ -370,6 +370,15 @@ def versioned_formula?
name.include?("@")
end
+ # Returns any `@`-versioned formulae for an non-`@`-versioned formula.
+ def versioned_formulae
+ return [] if versioned_formula?
+
+ Pathname.glob(path.to_s.gsub(/\.rb$/, "@*.rb")).map do |path|
+ Formula[path.basename(".rb").t... | true |
Other | Homebrew | brew | 840c97c1cce29cdb7c5e453deb17b2023b35ea42.json | formula: add versioned formulae method. | Library/Homebrew/test/formula_spec.rb | @@ -107,6 +107,56 @@
end
end
+ describe "#versioned_formula?" do
+ let(:f) do
+ formula "foo" do
+ url "foo-1.0"
+ end
+ end
+
+ let(:f2) do
+ formula "foo@2.0" do
+ url "foo-2.0"
+ end
+ end
+
+ it "returns true for @-versioned formulae" do
+ expect(f2.v... | true |
Other | Homebrew | brew | 524379e89785865370dab5300a6e566bef0a0b81.json | formula: improve dependencies hash output.
It doesn't really make any sense for the `dependencies` hash to include
all optional, recommended and build dependencies when these are already
separately output. | Library/Homebrew/formula.rb | @@ -1564,7 +1564,7 @@ def to_hash
"keg_only" => keg_only?,
"options" => [],
"build_dependencies" => dependencies.select(&:build?).map(&:name).uniq,
- "dependencies" => dependencies.map(&:name).uniq,
+ "dependencies" => dependencies.reject(&:optional?).reject(&:recommended?).reject(&:build... | false |
Other | Homebrew | brew | efec2fa0c5cd868ec66a1e3e4ffc737b911ae5be.json | lines_cop: Add deprected options audit for depends_on | Library/Homebrew/rubocops/extend/formula_cop.rb | @@ -58,7 +58,7 @@ def audit_urls(urls, regex)
# Returns all string nodes among the descendants of given node
def find_strings(node)
return [] if node.nil?
- return node if node.str_type?
+ return [node] if node.str_type?
node.each_descendant(:str)
end
| true |
Other | Homebrew | brew | efec2fa0c5cd868ec66a1e3e4ffc737b911ae5be.json | lines_cop: Add deprected options audit for depends_on | Library/Homebrew/rubocops/lines_cop.rb | @@ -228,12 +228,15 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node)
end
find_every_method_call_by_name(body_node, :depends_on).each do |method|
- next if modifier?(method.parent)
param = parameters(method).first
- dep, option = hash_dep(p... | true |
Other | Homebrew | brew | efec2fa0c5cd868ec66a1e3e4ffc737b911ae5be.json | lines_cop: Add deprected options audit for depends_on | Library/Homebrew/test/rubocops/lines_cop_spec.rb | @@ -693,13 +693,27 @@ class Foo < Formula
RUBY
end
- it "dependencies with invalid options" do
+ it "dependencies with invalid options which lead to force rebuild" do
expect_offense(<<~RUBY)
class Foo < Formula
desc "foo"
url 'http://example.com/foo-1.0.tgz'
... | true |
Other | Homebrew | brew | 1ec12ebbf89c8f06fdf1ee5c9588ab4f58525bca.json | Add more Probots
We're already using the stale bot which seems to work quite well for us.
Let's also add:
- [No Response](https://probot.github.io/apps/no-response/) (replacing
[github-snooze-button](https://github.com/tdsmith/github-snooze-button))
- [Move Issues](https://probot.github.io/apps/move/)
- [Support Requ... | .github/lock.yml | @@ -0,0 +1,13 @@
+# Configuration for lock-threads - https://github.com/dessant/lock-threads
+
+# Number of days of inactivity before a closed issue or pull request is locked
+daysUntilLock: 30
+# Comment to post before locking. Set to `false` to disable
+lockComment: false
+# Issues or pull requests with these labels ... | true |
Other | Homebrew | brew | 1ec12ebbf89c8f06fdf1ee5c9588ab4f58525bca.json | Add more Probots
We're already using the stale bot which seems to work quite well for us.
Let's also add:
- [No Response](https://probot.github.io/apps/no-response/) (replacing
[github-snooze-button](https://github.com/tdsmith/github-snooze-button))
- [Move Issues](https://probot.github.io/apps/move/)
- [Support Requ... | .github/move.yml | @@ -0,0 +1,15 @@
+# Configuration for move-issues - https://github.com/dessant/move-issues
+
+# Delete the command comment. Ignored when the comment also contains other content
+deleteCommand: true
+# Close the source issue after moving
+closeSourceIssue: true
+# Lock the source issue after moving
+lockSourceIssue: tru... | true |
Other | Homebrew | brew | 1ec12ebbf89c8f06fdf1ee5c9588ab4f58525bca.json | Add more Probots
We're already using the stale bot which seems to work quite well for us.
Let's also add:
- [No Response](https://probot.github.io/apps/no-response/) (replacing
[github-snooze-button](https://github.com/tdsmith/github-snooze-button))
- [Move Issues](https://probot.github.io/apps/move/)
- [Support Requ... | .github/no-response.yml | @@ -0,0 +1,13 @@
+# Configuration for probot-no-response - https://github.com/probot/no-response
+
+# Number of days of inactivity before an Issue is closed for lack of response
+daysUntilClose: 14
+# Label requiring a response
+responseRequiredLabel: needs response
+# Comment to post when closing an Issue for lack of ... | true |
Other | Homebrew | brew | 1ec12ebbf89c8f06fdf1ee5c9588ab4f58525bca.json | Add more Probots
We're already using the stale bot which seems to work quite well for us.
Let's also add:
- [No Response](https://probot.github.io/apps/no-response/) (replacing
[github-snooze-button](https://github.com/tdsmith/github-snooze-button))
- [Move Issues](https://probot.github.io/apps/move/)
- [Support Requ... | .github/support.yml | @@ -0,0 +1,16 @@
+# Configuration for support-requests - https://github.com/dessant/support-requests
+
+# Label used to mark issues as support requests
+supportLabel: support-request
+# Comment to post on issues marked as support requests. Add a link
+# to a support page, or set to `false` to disable
+supportComment: >... | true |
Other | Homebrew | brew | 877f0595529e4bab54f8bce61604cc9ea43f2a99.json | docs/_config.yml: remove GitHub repository.
This seems like it could fix the GitHub Pages build. | docs/_config.yml | @@ -1,7 +1,7 @@
title: Homebrew Documentation
description: Documentation for the missing package manager for macOS.
-remote_theme: Homebrew/jekyll-theme-homebrew
+remote_theme: Homebrew/brew-sh
exclude:
- bin
@@ -25,9 +25,6 @@ defaults:
logo: /assets/img/homebrew-256x256.png
-github:
- repository_nwo: H... | false |
Other | Homebrew | brew | 38ae15fe7d9a90166cad8b1d6f180eac485bfcc0.json | Remove completions for (un)linkapps commands
These were deleted in cffa5a9864e771f19231537b812b9b32a1160be0. | completions/bash/brew | @@ -251,17 +251,6 @@ _brew_link() {
__brew_complete_installed
}
-_brew_linkapps() {
- local cur="${COMP_WORDS[COMP_CWORD]}"
- case "$cur" in
- --*)
- __brewcomp "--local"
- return
- ;;
- esac
- __brew_complete_installed
-}
-
_brew_list() {
local allopts="--unbrewed --verbose --pinned --v... | true |
Other | Homebrew | brew | 38ae15fe7d9a90166cad8b1d6f180eac485bfcc0.json | Remove completions for (un)linkapps commands
These were deleted in cffa5a9864e771f19231537b812b9b32a1160be0. | completions/zsh/_brew | @@ -89,7 +89,6 @@ __brew_common_commands() {
'reinstall:install a formula anew; re-using its current options'
'leaves:show installed formulae that are not dependencies of another installed formula'
'link:link a formula'
- 'linkapps:symlink .app bundles provided by formulae into /Applications'
'li... | true |
Other | Homebrew | brew | 191724ce83b165479e2663625cf18ef4b50c11ee.json | formula: read runtime dependencies from more tabs.
The fixes the issue mentioned in:
https://github.com/Homebrew/brew/pull/4066#issuecomment-381308153
where `brew missing` was not reading from a tab of an outdated formula.
The `installed_prefix.directory?` check is unnecessary as the following
`opt_or_installed_prefi... | Library/Homebrew/formula.rb | @@ -1502,7 +1502,6 @@ def opt_or_installed_prefix_keg
# @private
def runtime_dependencies(read_from_tab: true)
if read_from_tab &&
- installed_prefix.directory? &&
(keg = opt_or_installed_prefix_keg) &&
(tab_deps = keg.runtime_dependencies)
return tab_deps.map { |d| Dependency.ne... | false |
Other | Homebrew | brew | 8035afcc36ac45ebd127f670b13ab32414c310fa.json | linkage_checker: fix generic pathname calls. | Library/Homebrew/extend/pathname.rb | @@ -472,9 +472,17 @@ def inspect
}
end
+ def binary_executable?
+ false
+ end
+
def mach_o_bundle?
false
end
+
+ def dylib?
+ false
+ end
end
require "extend/os/pathname" | true |
Other | Homebrew | brew | 8035afcc36ac45ebd127f670b13ab32414c310fa.json | linkage_checker: fix generic pathname calls. | Library/Homebrew/linkage_checker.rb | @@ -66,7 +66,7 @@ def check_dylibs
checked_dylibs = Set.new
@keg.find do |file|
next if file.symlink? || file.directory?
- next unless file.dylib? || file.binary_executable? || file.mach_o_bundle?
+ next if !file.dylib? && !file.binary_executable? && !file.mach_o_bundle?
# weakly loa... | true |
Other | Homebrew | brew | 3454d6a96199cc4f405a52d1525d0cc760a0ebf8.json | runtime_deps: improve documentation and consistency. | Library/Homebrew/formula.rb | @@ -1487,34 +1487,45 @@ def recursive_requirements(&block)
Requirement.expand(self, &block)
end
+ # Returns a Keg for the opt_prefix or installed_prefix if they exist.
+ # If not, return nil.
+ # @private
+ def opt_or_installed_prefix_keg
+ if optlinked? && opt_prefix.exist?
+ Keg.new(opt_prefix)
... | true |
Other | Homebrew | brew | 3454d6a96199cc4f405a52d1525d0cc760a0ebf8.json | runtime_deps: improve documentation and consistency. | Library/Homebrew/linkage_checker.rb | @@ -2,6 +2,8 @@
require "formula"
class LinkageChecker
+ attr_reader :undeclared_deps
+
def initialize(keg, formula = nil)
@keg = keg
@formula = formula || resolve_formula(keg)
@@ -142,7 +144,7 @@ def check_undeclared_deps
missing_deps = @broken_deps.values.flatten.map { |d| dylib_to_dep(d) }
... | true |
Other | Homebrew | brew | 3454d6a96199cc4f405a52d1525d0cc760a0ebf8.json | runtime_deps: improve documentation and consistency. | Library/Homebrew/test/formula_spec.rb | @@ -708,19 +708,18 @@ def test
expect(f3.runtime_dependencies.map(&:name)).to eq(["foo/bar/f1", "baz/qux/f2"])
end
- it "includes non-declared direct dependencies" do
+ it "includes non-declared direct dependencies", :focus do
formula = Class.new(Testball).new
dependency = formula("dep... | true |
Other | Homebrew | brew | 71f4f522d7b9d8f3d4996feb6cc36003d3a4246e.json | missing_formula: improve migration messaging.
Particularly in the cask case we can do a better job of communicating
how the new formula can be installed.
Fixes #4089. | Library/Homebrew/missing_formula.rb | @@ -93,17 +93,26 @@ def tap_migration_reason(name)
new_tap = old_tap.tap_migrations[name]
next unless new_tap
- new_tap_user, new_tap_repo, = new_tap.split("/")
+ new_tap_user, new_tap_repo, new_tap_new_name = new_tap.split("/")
new_tap_name = "#{new_tap_user}/#{new_... | false |
Other | Homebrew | brew | aad17dac3580e80b9f4c915c9e7d9feac4e8eabd.json | Shorten some links in README.md | README.md | @@ -22,7 +22,7 @@ Second, read the [Troubleshooting Checklist](https://docs.brew.sh/Troubleshootin
[](https://travis-ci.org/Homebrew/brew)
[](https://codecov.io/gh/Homebrew/brew)
-We'd love... | false |
Other | Homebrew | brew | 9f1b64a9d44650ac36f8bfacfc325c67364a2837.json | Add additional specs for `PATH`. | Library/Homebrew/PATH.rb | @@ -32,7 +32,7 @@ def reject(&block)
end
def to_ary
- @paths
+ @paths.dup.to_ary
end
alias to_a to_ary
| true |
Other | Homebrew | brew | 9f1b64a9d44650ac36f8bfacfc325c67364a2837.json | Add additional specs for `PATH`. | Library/Homebrew/test/PATH_spec.rb | @@ -23,6 +23,13 @@
it "returns a PATH array" do
expect(described_class.new("/path1", "/path2").to_ary).to eq(["/path1", "/path2"])
end
+
+ it "does not allow mutating the original" do
+ path = described_class.new("/path1", "/path2")
+ path.to_ary << "/path3"
+
+ expect(path).not_to in... | true |
Other | Homebrew | brew | 0432feabd33e4fa02e5089783080e9568c982a77.json | Add missing blacklisted Formulae. | Library/Homebrew/test/missing_formula_spec.rb | @@ -66,6 +66,14 @@
expect("haskell-platform").to be_blacklisted
end
+ specify "mysqldump-secure is blacklisted" do
+ expect("mysqldump-secure").to be_blacklisted
+ end
+
+ specify "ngrok is blacklisted" do
+ expect("ngrok").to be_blacklisted
+ end
+
specify "Xcode is blacklisted... | false |
Other | Homebrew | brew | a4bada575ae7957feb0de1ac4ea6bdc403e44da3.json | requirements: define cask on base class.
The `cask` attribute doesn't make as much sense on Linux but can be
ignored there. The advantage of this change is that (like #4086) it
allows figuring out the relevant cask for a formulae requirement on a
Linux machine. | Library/Homebrew/extend/os/mac/requirements/java_requirement.rb | @@ -4,29 +4,10 @@ class JavaRequirement < Requirement
env_oracle_jdk || env_apple
end
- # A strict Java 8 requirement (1.8) should prompt the user to install
- # the legacy java8 cask because versions newer than Java 8 are not
- # completely backwards compatible, and contain breaking changes such as
- # s... | true |
Other | Homebrew | brew | a4bada575ae7957feb0de1ac4ea6bdc403e44da3.json | requirements: define cask on base class.
The `cask` attribute doesn't make as much sense on Linux but can be
ignored there. The advantage of this change is that (like #4086) it
allows figuring out the relevant cask for a formulae requirement on a
Linux machine. | Library/Homebrew/extend/os/mac/requirements/osxfuse_requirement.rb | @@ -1,7 +1,6 @@
require "requirement"
class OsxfuseRequirement < Requirement
- cask "osxfuse"
download "https://osxfuse.github.io/"
satisfy(build_env: false) { self.class.binary_osxfuse_installed? } | true |
Other | Homebrew | brew | a4bada575ae7957feb0de1ac4ea6bdc403e44da3.json | requirements: define cask on base class.
The `cask` attribute doesn't make as much sense on Linux but can be
ignored there. The advantage of this change is that (like #4086) it
allows figuring out the relevant cask for a formulae requirement on a
Linux machine. | Library/Homebrew/extend/os/mac/requirements/x11_requirement.rb | @@ -1,7 +1,6 @@
require "requirement"
class X11Requirement < Requirement
- cask "xquartz"
download "https://xquartz.macosforge.org"
satisfy build_env: false do | true |
Other | Homebrew | brew | a4bada575ae7957feb0de1ac4ea6bdc403e44da3.json | requirements: define cask on base class.
The `cask` attribute doesn't make as much sense on Linux but can be
ignored there. The advantage of this change is that (like #4086) it
allows figuring out the relevant cask for a formulae requirement on a
Linux machine. | Library/Homebrew/requirements/java_requirement.rb | @@ -4,6 +4,20 @@ class JavaRequirement < Requirement
fatal true
download "https://www.oracle.com/technetwork/java/javase/downloads/index.html"
+ # A strict Java 8 requirement (1.8) should prompt the user to install
+ # the legacy java8 cask because versions newer than Java 8 are not
+ # completely backwards ... | true |
Other | Homebrew | brew | a4bada575ae7957feb0de1ac4ea6bdc403e44da3.json | requirements: define cask on base class.
The `cask` attribute doesn't make as much sense on Linux but can be
ignored there. The advantage of this change is that (like #4086) it
allows figuring out the relevant cask for a formulae requirement on a
Linux machine. | Library/Homebrew/requirements/osxfuse_requirement.rb | @@ -1,6 +1,7 @@
require "requirement"
class OsxfuseRequirement < Requirement
+ cask "osxfuse"
fatal true
end
| true |
Other | Homebrew | brew | a4bada575ae7957feb0de1ac4ea6bdc403e44da3.json | requirements: define cask on base class.
The `cask` attribute doesn't make as much sense on Linux but can be
ignored there. The advantage of this change is that (like #4086) it
allows figuring out the relevant cask for a formulae requirement on a
Linux machine. | Library/Homebrew/requirements/x11_requirement.rb | @@ -5,6 +5,7 @@ class X11Requirement < Requirement
fatal true
+ cask "xquartz"
env { ENV.x11 }
def initialize(name = "x11", tags = []) | true |
Other | Homebrew | brew | 7166289ad757641e54812bde742ea8c883510b0b.json | os/mac/xcode: revert an installed? guard removal.
Fixes #4084. | Library/Homebrew/os/mac/xcode.rb | @@ -280,7 +280,9 @@ def version
def detect_version
# CLT isn't a distinct entity pre-4.3, and pkgutil doesn't exist
# at all on Tiger, so just count it as installed if Xcode is installed
- return MacOS::Xcode.version if MacOS::Xcode.version < "3.0"
+ if MacOS::Xcode.installed? && ... | false |
Other | Homebrew | brew | 6714acc09809b3548960ee1d29d180e036348391.json | Add missing `MacOS.release` deprecation. | Library/Homebrew/compat.rb | @@ -8,3 +8,4 @@
require "compat/extend/string"
require "compat/gpg"
require "compat/dependable"
+require "compat/os/mac" | true |
Other | Homebrew | brew | 6714acc09809b3548960ee1d29d180e036348391.json | Add missing `MacOS.release` deprecation. | Library/Homebrew/compat/os/mac.rb | @@ -0,0 +1,10 @@
+module OS
+ module Mac
+ class << self
+ def release
+ odeprecated "MacOS.release", "MacOS.version"
+ version
+ end
+ end
+ end
+end | true |
Other | Homebrew | brew | 20155c8df9569e78a16ea47136a711469a29e5b7.json | bump-formula-pr: Use Parser to parse args | Library/Homebrew/dev-cmd/bump-formula-pr.rb | @@ -42,80 +42,31 @@
#: the preexisting formula already uses.
require "formula"
+require "cli_parser"
module Homebrew
module_function
- def inreplace_pairs(path, replacement_pairs)
- if ARGV.dry_run?
- contents = path.open("r") { |f| Formulary.ensure_utf8_encoding(f).read }
- contents.extend... | false |
Other | Homebrew | brew | cb5684831e30e133ea9d771d6354adaa7e0af8cc.json | Remove unused `Buffer` class. | Library/Homebrew/cask/lib/hbc/utils.rb | @@ -4,17 +4,6 @@
BUG_REPORTS_URL = "https://github.com/caskroom/homebrew-cask#reporting-bugs".freeze
-class Buffer < StringIO
- extend Predicable
-
- attr_predicate :tty?
-
- def initialize(tty = false)
- super()
- @tty = tty
- end
-end
-
# global methods
def odebug(title, *sput) | false |
Other | Homebrew | brew | 6b3ee9b8fd813c7b1479e629348cb1b096a89819.json | docs/Analytics: note retention period.
Due to [GDPR](https://www.eugdpr.org) Google Analytics have added
[data retention controls](https://support.google.com/analytics/answer/7667196).
Let's set these so that we don't keep any anonymous user data any longer
than we need it. | docs/Analytics.md | @@ -8,6 +8,9 @@ Homebrew is provided free of charge and run entirely by volunteers in their spar
- If a formula is widely used and is failing often it will enable us to prioritise fixing that formula over others.
- Collecting the OS version allows us to decide what versions of macOS to prioritise and support and iden... | false |
Other | Homebrew | brew | 9b8c30e0c8d04b66c4415c27041423b372c14066.json | compat/extend/string: fix odisabled return.
`odisabled` will still return for a formula in `.brew`. This means
`EOS.undent` returns `nil` and the formula cannot be parsed. Instead
return the actual string in this case to avoid e.g. patches blowing up
with `nil` strings.
Fixes #4049. | Library/Homebrew/compat/extend/string.rb | @@ -1,6 +1,7 @@
class String
def undent
odisabled "<<-EOS.undent", "<<~EOS"
+ self
end
alias unindent undent
| false |
Other | Homebrew | brew | d8cc56c1d0dbf3754fa52724dc51d5c234712004.json | release-notes: update documentation and manual page | docs/Manpage.md | @@ -850,7 +850,7 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
* `release-notes` [`--markdown`] [`previous_tag`] [`end_ref`]:
Output the merged pull requests on Homebrew/brew between two Git refs.
- If no `previous_tag` is provided it defaults to the newest tag.
+ If... | true |
Other | Homebrew | brew | d8cc56c1d0dbf3754fa52724dc51d5c234712004.json | release-notes: update documentation and manual page | manpages/brew.1 | @@ -868,7 +868,7 @@ If \fB\-\-test\-bot\-user=\fR\fItest\-bot\-user\fR is passed, pull the bottle bl
.
.TP
\fBrelease\-notes\fR [\fB\-\-markdown\fR] [\fIprevious_tag\fR] [\fIend_ref\fR]
-Output the merged pull requests on Homebrew/brew between two Git refs\. If no \fIprevious_tag\fR is provided it defaults to the ne... | true |
Other | Homebrew | brew | 6cdc501a75582613b675acd5294ce7d652854c0e.json | Keg#replace_text_in_files: fix incorrect replace order
The order of the regexes in `Keg#replace_text_in_files` matters.
Otherwise, `/usr/local/Cellar` will be replaced to
`@@HOMEBREW_PREFIX@@/Cellar` instead of `@@HOMEBREW_CELLAR@@`.
Fixes Homebrew/homebrew-core#26043. | Library/Homebrew/keg_relocate.rb | @@ -68,7 +68,7 @@ def replace_text_in_files(relocation, files: nil)
relocation.old_cellar => relocation.new_cellar,
relocation.old_repository => relocation.new_repository,
}
- changed = s.gsub!(Regexp.union(replacements.keys), replacements)
+ changed = s.gsub!(Regexp.union(replacement... | false |
Other | Homebrew | brew | df68d12be40d3c653e20a682529f2012c08f4b67.json | bottle: Add option --or-later
If --or-later is passed, append _or_later to the bottle tag. | Library/Homebrew/dev-cmd/bottle.rb | @@ -1,4 +1,4 @@
-#: * `bottle` [`--verbose`] [`--no-rebuild`|`--keep-old`] [`--skip-relocation`] [`--root-url=`<URL>] [`--force-core-tap`] <formulae>:
+#: * `bottle` [`--verbose`] [`--no-rebuild`|`--keep-old`] [`--skip-relocation`] [`--or-later`] [`--root-url=`<URL>] [`--force-core-tap`] <formulae>:
#: Generate a... | true |
Other | Homebrew | brew | df68d12be40d3c653e20a682529f2012c08f4b67.json | bottle: Add option --or-later
If --or-later is passed, append _or_later to the bottle tag. | docs/Manpage.md | @@ -664,7 +664,7 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
`audit` exits with a non-zero status if any errors are found. This is useful,
for instance, for implementing pre-commit hooks.
- * `bottle` [`--verbose`] [`--no-rebuild`|`--keep-old`] [`--skip-relocation`] [... | true |
Other | Homebrew | brew | df68d12be40d3c653e20a682529f2012c08f4b67.json | bottle: Add option --or-later
If --or-later is passed, append _or_later to the bottle tag. | manpages/brew.1 | @@ -682,7 +682,7 @@ Passing \fB\-\-only\-cops=\fR\fIcops\fR will check for violations of only the li
\fBaudit\fR exits with a non\-zero status if any errors are found\. This is useful, for instance, for implementing pre\-commit hooks\.
.
.TP
-\fBbottle\fR [\fB\-\-verbose\fR] [\fB\-\-no\-rebuild\fR|\fB\-\-keep\-old\f... | true |
Other | Homebrew | brew | f18e4e330241017d3e2503eeecba7925c799eefd.json | docs/Installation: note curl usage on <=10.7.
Need to pass `--insecure` there for it to work. | docs/Installation.md | @@ -19,6 +19,10 @@ it does it too. And you have to confirm everything it will do before it starts.
## Alternative Installs
+### OS X Lion 10.7 and below
+
+Using the instructions on https://brew.sh or below whenever you call `curl` you must pass `--insecure` as an argument. This is because your system `curl` is to... | false |
Other | Homebrew | brew | 7f7eb7e6cdac080e85450def86db420480bdc695.json | Add message to `set_ownership` | Library/Homebrew/cask/lib/hbc/staged.rb | @@ -33,6 +33,7 @@ def set_permissions(paths, permissions_str)
def set_ownership(paths, user: current_user, group: "staff")
full_paths = remove_nonexistent(paths)
return if full_paths.empty?
+ ohai "Changing ownership of paths required by #{@cask}; your password may be necessary"
@command.... | false |
Other | Homebrew | brew | 296d48ba7af0daf010fdb412288b395ea2422bfb.json | Handle error when 'brew search' can't reach GitHub | Library/Homebrew/cmd/search.rb | @@ -111,8 +111,16 @@ def search_taps(query, silent: false)
end
valid_dirnames = ["Formula", "HomebrewFormula", "Casks", "."].freeze
- matches = GitHub.search_code(user: ["Homebrew", "caskroom"], filename: query, extension: "rb")
-
+ matches = begin
+ GitHub.search_code(
+ user: ["Homebrew"... | false |
Other | Homebrew | brew | 0ec47813f10672ab9ef8ce9c2ad5fba0df67634c.json | Prevent .curlrc from being loaded. | Library/Homebrew/cmd/vendor-install.sh | @@ -48,6 +48,7 @@ fetch() {
local temporary_path
curl_args=(
+ -q # do not load .curlrc (must be the first argument)
--fail
--remote-time
--location | true |
Other | Homebrew | brew | 0ec47813f10672ab9ef8ce9c2ad5fba0df67634c.json | Prevent .curlrc from being loaded. | Library/Homebrew/test/utils/curl_spec.rb | @@ -0,0 +1,10 @@
+require "utils/curl"
+
+describe "curl" do
+ describe "curl_args" do
+ it "returns -q as the first argument" do
+ # -q must be the first argument according to "man curl"
+ expect(curl_args("foo")[1]).to eq("-q")
+ end
+ end
+end | true |
Other | Homebrew | brew | 0ec47813f10672ab9ef8ce9c2ad5fba0df67634c.json | Prevent .curlrc from being loaded. | Library/Homebrew/utils/curl.rb | @@ -14,6 +14,7 @@ def curl_executable
def curl_args(*extra_args, show_output: false, user_agent: :default)
args = [
curl_executable.to_s,
+ "-q", # do not load .curlrc (must be the first argument)
"--show-error",
]
| true |
Other | Homebrew | brew | a12b5395d72c09e5409c257e648a003ff61839b3.json | Maintainer-Guidelines: add communication section.
Note the best ways for maintainers to communicate with each other. | docs/Maintainer-Guidelines.md | @@ -104,3 +104,14 @@ Whitespace corrections (to Ruby standard etc.) are allowed (in fact this
is a good opportunity to do it) provided the line itself has some kind
of modification that is not whitespace in it. But be careful about
making changes to inline patches—make sure they still apply.
+
+## Communication
+Mai... | true |
Other | Homebrew | brew | a12b5395d72c09e5409c257e648a003ff61839b3.json | Maintainer-Guidelines: add communication section.
Note the best ways for maintainers to communicate with each other. | docs/New-Maintainer-Checklist.md | @@ -55,7 +55,7 @@ If they accept, follow a few steps to get them set up:
- Add them to the [Jenkins' GitHub Authorization Settings admin user names](https://jenkins.brew.sh/configureSecurity/) so they can adjust settings and restart jobs
- Add them to the [Jenkins' GitHub Pull Request Builder admin list](https://jenk... | true |
Other | Homebrew | brew | 1376b9e41c6483b36d5e12e7b8aa30c48091c996.json | diagnostic: remove missing check. | Library/Homebrew/extend/os/mac/diagnostic.rb | @@ -4,7 +4,6 @@ class Checks
def development_tools_checks
%w[
check_for_unsupported_macos
- check_for_bad_install_name_tool
check_for_installed_developer_tools
check_xcode_license_approved
check_xcode_up_to_date | false |
Other | Homebrew | brew | 7eaaaf6fa294e617969825e973d72e6a3711d403.json | python_virtualenv_constants: update virtualenv to 15.2.0 | Library/Homebrew/language/python_virtualenv_constants.rb | @@ -1,2 +1,2 @@
-PYTHON_VIRTUALENV_URL = "https://files.pythonhosted.org/packages/d4/0c/9840c08189e030873387a73b90ada981885010dd9aea134d6de30cd24cb8/virtualenv-15.1.0.tar.gz".freeze
-PYTHON_VIRTUALENV_SHA256 = "02f8102c2436bb03b3ee6dede1919d1dac8a427541652e5ec95171ec8adbc93a".freeze
+PYTHON_VIRTUALENV_URL = "https://fi... | false |
Other | Homebrew | brew | 4cdee1b53d0fb2573d5f2ca71d63b3d6e6156f12.json | brew create: fix meson template | Library/Homebrew/dev-cmd/create.rb | @@ -185,8 +185,9 @@ class #{Formulary.class_s(name)} < Formula
<% if mode == :cmake %>
depends_on "cmake" => :build
<% elsif mode == :meson %>
- depends_on "meson" => :build
+ depends_on "meson-internal" => :build
depends_on "ninja" => :build
+ depends_on "python" =>... | false |
Other | Homebrew | brew | 49038a2cd9ad76041ba602caa235dc9d6bca7d30.json | Remove mentions to official taps
There are none remaining. We don’t want PHP to get the deprecated
messages until all formulae have been deleted so that will be in a
later PR. | Library/Homebrew/cmd/tap.rb | @@ -25,9 +25,6 @@
#: * `tap` `--repair`:
#: Migrate tapped formulae from symlink-based to directory-based structure.
#:
-#: * `tap` `--list-official`:
-#: List all official taps.
-#:
#: * `tap` `--list-pinned`:
#: List all pinned taps.
@@ -40,8 +37,7 @@ def tap
if ARGV.include? "--repair"
... | true |
Other | Homebrew | brew | 49038a2cd9ad76041ba602caa235dc9d6bca7d30.json | Remove mentions to official taps
There are none remaining. We don’t want PHP to get the deprecated
messages until all formulae have been deleted so that will be in a
later PR. | Library/Homebrew/test/dev-cmd/tap_spec.rb | @@ -15,11 +15,6 @@
.and not_to_output.to_stderr
.and be_a_success
- expect { brew "tap", "--list-official" }
- .to output(%r{homebrew/php}).to_stdout
- .and not_to_output.to_stderr
- .and be_a_success
-
expect { brew "tap-info" }
.to output(/2 taps/).to_stdout
.and n... | true |
Other | Homebrew | brew | 49038a2cd9ad76041ba602caa235dc9d6bca7d30.json | Remove mentions to official taps
There are none remaining. We don’t want PHP to get the deprecated
messages until all formulae have been deleted so that will be in a
later PR. | completions/bash/brew | @@ -430,11 +430,10 @@ _brew_tap() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
--*)
- __brewcomp "--repair --list-official --list-pinned"
+ __brewcomp "--repair --list-pinned"
return
;;
esac
- __brewcomp "$(brew tap --list-official)"
}
_brew_tap_info() {
@@ -716,7 +7... | true |
Other | Homebrew | brew | 49038a2cd9ad76041ba602caa235dc9d6bca7d30.json | Remove mentions to official taps
There are none remaining. We don’t want PHP to get the deprecated
messages until all formulae have been deleted so that will be in a
later PR. | completions/zsh/_brew | @@ -56,12 +56,6 @@ __brew_installed_taps() {
_describe -t installed-taps 'installed taps' taps
}
-__brew_official_taps() {
- local -a taps
- taps=($(brew tap --list-official))
- _describe -t official-taps 'official taps' taps
-}
-
__brew_pinned_taps() {
local -a taps
taps=($(brew tap --list-pinned))
@@ ... | true |
Other | Homebrew | brew | 49038a2cd9ad76041ba602caa235dc9d6bca7d30.json | Remove mentions to official taps
There are none remaining. We don’t want PHP to get the deprecated
messages until all formulae have been deleted so that will be in a
later PR. | docs/Formula-Cookbook.md | @@ -31,7 +31,6 @@ Before submitting a new formula make sure your package:
* meets all our [Acceptable Formulae](Acceptable-Formulae.md) requirements
* isn't already in Homebrew (check `brew search <formula>`)
-* isn't in another official [Homebrew tap](https://github.com/Homebrew)
* isn't already waiting t... | true |
Other | Homebrew | brew | 49038a2cd9ad76041ba602caa235dc9d6bca7d30.json | Remove mentions to official taps
There are none remaining. We don’t want PHP to get the deprecated
messages until all formulae have been deleted so that will be in a
later PR. | docs/How-To-Open-a-Homebrew-Pull-Request.md | @@ -25,8 +25,6 @@ Depending on the change you want to make, you need to send the pull request to t
3. Add your pushable forked repository with `git remote add <YOUR_USERNAME> https://github.com/<YOUR_USERNAME>/homebrew-core.git`
* `<YOUR_USERNAME>` is your GitHub username, not your local machine username.
-For fo... | true |
Other | Homebrew | brew | 49038a2cd9ad76041ba602caa235dc9d6bca7d30.json | Remove mentions to official taps
There are none remaining. We don’t want PHP to get the deprecated
messages until all formulae have been deleted so that will be in a
later PR. | docs/How-to-Create-and-Maintain-a-Tap.md | @@ -16,7 +16,7 @@ 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.
-See [homebrew/php](https://github.com/Homebrew/homebrew-php) for an example of
... | true |
Other | Homebrew | brew | 49038a2cd9ad76041ba602caa235dc9d6bca7d30.json | Remove mentions to official taps
There are none remaining. We don’t want PHP to get the deprecated
messages until all formulae have been deleted so that will be in a
later PR. | docs/Interesting-Taps-and-Forks.md | @@ -3,15 +3,9 @@
A _tap_ is homebrew-speak for a Git repository containing extra formulae.
Homebrew has the capability to add (and remove) multiple taps to your local installation with the `brew tap` and `brew untap` commands. Type `man brew` in your Terminal. The main repository [https://github.com/Homebrew/homebrew... | true |
Other | Homebrew | brew | 49038a2cd9ad76041ba602caa235dc9d6bca7d30.json | Remove mentions to official taps
There are none remaining. We don’t want PHP to get the deprecated
messages until all formulae have been deleted so that will be in a
later PR. | docs/Manpage.md | @@ -474,9 +474,6 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
* `tap` `--repair`:
Migrate tapped formulae from symlink-based to directory-based structure.
- * `tap` `--list-official`:
- List all official taps.
-
* `tap` `--list-pinned`:
List all pinned taps.
| true |
Other | Homebrew | brew | 49038a2cd9ad76041ba602caa235dc9d6bca7d30.json | Remove mentions to official taps
There are none remaining. We don’t want PHP to get the deprecated
messages until all formulae have been deleted so that will be in a
later PR. | docs/Troubleshooting.md | @@ -17,7 +17,7 @@ Follow these steps to fix common problems:
## Check to see if the issue has been reported
* Search the [issue tracker](https://github.com/Homebrew/homebrew-core/issues) to see if someone else has already reported the same issue.
-* Make sure you search issues on the correct repository. If a formul... | true |
Other | Homebrew | brew | 49038a2cd9ad76041ba602caa235dc9d6bca7d30.json | Remove mentions to official taps
There are none remaining. We don’t want PHP to get the deprecated
messages until all formulae have been deleted so that will be in a
later PR. | manpages/brew.1 | @@ -483,10 +483,6 @@ By default, the repository is cloned as a shallow copy (\fB\-\-depth=1\fR), but
Migrate tapped formulae from symlink\-based to directory\-based structure\.
.
.TP
-\fBtap\fR \fB\-\-list\-official\fR
-List all official taps\.
-.
-.TP
\fBtap\fR \fB\-\-list\-pinned\fR
List all pinned taps\.
. | true |
Other | Homebrew | brew | d6e0b7d2bfa41e529c9055c13695afdba50b4a9a.json | use new syntax | Library/Homebrew/linkage_checker.rb | @@ -180,7 +180,7 @@ def display_items(label, things)
return if things.empty?
puts "#{label}:"
if things.is_a? Hash
- things.sort_by { |k, | k.to_s }.each do |list_label, list|
+ things.sort_by(&:to_s).each do |list_label, list|
list.sort.each do |item|
puts " #{item} (#{lis... | false |
Other | Homebrew | brew | 5b68bb84d21fc3dbd5d9cac0100fd0ab1d65dc0e.json | cmd/upgrade: output the outdated version.
This makes it clearer what version is being updated to what version. | Library/Homebrew/cmd/upgrade.rb | @@ -67,7 +67,14 @@ def upgrade
oh1 "No packages to upgrade"
else
oh1 "Upgrading #{Formatter.pluralize(formulae_to_install.length, "outdated package")}, with result:"
- puts formulae_to_install.map { |f| "#{f.full_specified_name} #{f.pkg_version}" } * ", "
+ formulae_upgrades = formulae_to_i... | false |
Other | Homebrew | brew | 262666c82858bfd00b98dd136cbe09d705c73862.json | cleanup_spec: add nicer prune matcher alias. | Library/Homebrew/test/cleanup_spec.rb | @@ -260,6 +260,8 @@
end
describe "::prune?" do
+ alias_matcher :be_pruned, :be_prune
+
before do
foo.mkpath
end
@@ -268,11 +270,11 @@
it "returns true when path_modified_time < days_default" do
allow_any_instance_of(Pathname).to receive(:mtime).and_return(Time.now - sec_in_a_da... | false |
Other | Homebrew | brew | 42a39b16bff43ab6aae516dfd578501f1478e8eb.json | formula: use runtime_dependencies from tab.
Don't do so in `linkage_checker` or `tab` which to avoid recursive loops
and want the actual values specified in the formula itself. | Library/Homebrew/formula.rb | @@ -1486,7 +1486,14 @@ def recursive_requirements(&block)
# Returns a list of Dependency objects that are required at runtime.
# @private
- def runtime_dependencies
+ def runtime_dependencies(read_from_tab: true)
+ if read_from_tab &&
+ installed_prefix.directory? &&
+ (keg = Keg.new(installed_... | true |
Other | Homebrew | brew | 42a39b16bff43ab6aae516dfd578501f1478e8eb.json | formula: use runtime_dependencies from tab.
Don't do so in `linkage_checker` or `tab` which to avoid recursive loops
and want the actual values specified in the formula itself. | Library/Homebrew/linkage_checker.rb | @@ -63,7 +63,8 @@ def check_undeclared_deps
formula.build.without?(dep)
end
declared_deps = formula.deps.reject { |dep| filter_out.call(dep) }.map(&:name)
- recursive_deps = keg.to_formula.runtime_dependencies.map { |dep| dep.to_formula.name }
+ runtime_deps = keg.to_formula.runtime_dependencies(... | true |
Other | Homebrew | brew | 42a39b16bff43ab6aae516dfd578501f1478e8eb.json | formula: use runtime_dependencies from tab.
Don't do so in `linkage_checker` or `tab` which to avoid recursive loops
and want the actual values specified in the formula itself. | Library/Homebrew/tab.rb | @@ -17,6 +17,7 @@ class Tab < OpenStruct
# Instantiates a Tab for a new installation of a formula.
def self.create(formula, compiler, stdlib)
build = formula.build
+ runtime_deps = formula.runtime_dependencies(read_from_tab: false)
attributes = {
"homebrew_version" => HOMEBREW_VERSION,
... | true |
Other | Homebrew | brew | a7727b66b30bdb3c0280a006b763787e9077cc6f.json | keg: add tab, runtime_dependencies methods. | Library/Homebrew/keg.rb | @@ -503,8 +503,16 @@ def remove_oldname_opt_record
@oldname_opt_record = nil
end
+ def tab
+ Tab.for_keg(self)
+ end
+
+ def runtime_dependencies
+ tab.runtime_dependencies
+ end
+
def aliases
- Tab.for_keg(self).aliases || []
+ tab.aliases || []
end
def optlink(mode = OpenStruct.ne... | false |
Other | Homebrew | brew | 92263f51e97daf1005836069625da2ced2e304a6.json | update-test: Use Parser to parse args | Library/Homebrew/dev-cmd/update-test.rb | @@ -14,25 +14,34 @@
#: If `--keep-tmp` is passed, retain the temporary directory containing
#: the new repository clone.
+require "cli_parser"
+
module Homebrew
module_function
def update_test
+ args = Homebrew::CLI::Parser.parse do
+ switch "--to-tag"
+ switch "--keep-tmp"
+ flag ... | false |
Other | Homebrew | brew | 74baf04ad3b0111cace6701caeb5939ef8161bf7.json | pull: Use Parser to parse args | Library/Homebrew/dev-cmd/pull.rb | @@ -52,6 +52,7 @@
require "net/https"
require "utils"
require "json"
+require "cli_parser"
require "formula"
require "formulary"
require "tap"
@@ -62,8 +63,7 @@ module GitHub
module_function
# Return the corresponding test-bot user name for the given GitHub organization.
- def test_bot_user(user)
- te... | false |
Other | Homebrew | brew | 41a05b62fe47baf402639990d3762f85dec60bec.json | bottle: Use Parser to parse args | Library/Homebrew/dev-cmd/bottle.rb | @@ -34,6 +34,7 @@
require "tab"
require "keg"
require "formula_versions"
+require "cli_parser"
require "utils/inreplace"
require "erb"
require "extend/pathname"
@@ -68,6 +69,26 @@
module Homebrew
module_function
+ def bottle
+ @args = Homebrew::CLI::Parser.parse do
+ switch "--merge"
+ switch ... | false |
Other | Homebrew | brew | 2019c289cba33b799a6e1ffbf80c7417d01292a9.json | Add libepoxy to gnome_devel_whitelist | Library/Homebrew/dev-cmd/audit.rb | @@ -564,6 +564,7 @@ def audit_specs
gtk-doc 1.25
libart 2.3.21
pygtkglext 1.1.0
+ libepoxy 1.5.0
].each_slice(2).to_a.map do |formula, version|
[formula, version.split(".")[0..1].join(".")]
end | false |
Other | Homebrew | brew | 191e49511b83dd17e32602de74f3ea7769a02c3a.json | tests: Use Parser to parse args | Library/Homebrew/dev-cmd/tests.rb | @@ -1,4 +1,4 @@
-#: * `tests` [`--verbose`] [`--coverage`] [`--generic`] [`--no-compat`] [`--only=`<test_script>[`:`<line_number>]] [`--seed` <seed>] [`--online`] [`--official-cmd-taps`]:
+#: * `tests` [`--verbose`] [`--coverage`] [`--generic`] [`--no-compat`] [`--only=`<test_script>[`:`<line_number>]] [`--seed=`<see... | true |
Other | Homebrew | brew | 191e49511b83dd17e32602de74f3ea7769a02c3a.json | tests: Use Parser to parse args | docs/Manpage.md | @@ -880,7 +880,7 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
Example: `brew install jruby && brew test jruby`
- * `tests` [`--verbose`] [`--coverage`] [`--generic`] [`--no-compat`] [`--only=``test_script`[`:``line_number`]] [`--seed` `seed`] [`--online`] [`--official-cmd... | true |
Other | Homebrew | brew | 191e49511b83dd17e32602de74f3ea7769a02c3a.json | tests: Use Parser to parse args | manpages/brew.1 | @@ -896,7 +896,7 @@ If \fB\-\-keep\-tmp\fR is passed, the temporary files created for the test are n
Example: \fBbrew install jruby && brew test jruby\fR
.
.TP
-\fBtests\fR [\fB\-\-verbose\fR] [\fB\-\-coverage\fR] [\fB\-\-generic\fR] [\fB\-\-no\-compat\fR] [\fB\-\-only=\fR\fItest_script\fR[\fB:\fR\fIline_number\fR]]... | true |
Other | Homebrew | brew | 164f47a108c26ede3bf3236c4682ca74cc043e2f.json | irb: Use Parser to parse args | Library/Homebrew/dev-cmd/irb.rb | @@ -5,6 +5,9 @@
#: If `--pry` is passed or HOMEBREW_PRY is set, pry will be
#: used instead of irb.
+require "cli_parser"
+require "utils/env"
+
class Symbol
def f(*args)
Formulary.factory(to_s, *args)
@@ -21,15 +24,20 @@ module Homebrew
module_function
def irb
- if ARGV.include? "--exampl... | true |
Other | Homebrew | brew | 164f47a108c26ede3bf3236c4682ca74cc043e2f.json | irb: Use Parser to parse args | Library/Homebrew/extend/ARGV.rb | @@ -268,10 +268,6 @@ def fetch_head?
include? "--fetch-HEAD"
end
- def pry?
- include?("--pry") || !ENV["HOMEBREW_PRY"].nil?
- end
-
# eg. `foo -ns -i --bar` has three switches, n, s and i
def switch?(char)
return false if char.length > 1 | true |
Other | Homebrew | brew | 164f47a108c26ede3bf3236c4682ca74cc043e2f.json | irb: Use Parser to parse args | Library/Homebrew/utils/env.rb | @@ -0,0 +1,9 @@
+module Utils
+ module EnvVars
+ class << self
+ def pry?
+ !ENV["HOMEBREW_PRY"].nil?
+ end
+ end
+ end
+end | true |
Other | Homebrew | brew | 78b41b07f12d503bb130170f1cde87176e8fec0c.json | man: Use Parser to parse args | Library/Homebrew/dev-cmd/man.rb | @@ -10,6 +10,7 @@
require "formula"
require "erb"
require "ostruct"
+require "cli_parser"
module Homebrew
module_function
@@ -19,17 +20,22 @@ module Homebrew
TARGET_DOC_PATH = HOMEBREW_REPOSITORY/"docs"
def man
+ @args = Homebrew::CLI::Parser.new do
+ switch "--fail-if-changed"
+ switch "-... | false |
Other | Homebrew | brew | 56fb2cb67c728f73a1f018eb0da26644ff2ea3c8.json | edit: Use Parser to parse args | Library/Homebrew/dev-cmd/edit.rb | @@ -5,11 +5,16 @@
#: Open <formula> in the editor.
require "formula"
+require "cli_parser"
module Homebrew
module_function
def edit
+ args = Homebrew::CLI::Parser.new do
+ switch "--force"
+ end.parse
+
unless (HOMEBREW_REPOSITORY/".git").directory?
raise <<~EOS
Changes... | false |
Other | Homebrew | brew | 93481ab491a3ba2cde3432b49afe5195a56243d4.json | release-notes: Use Parser to parse args | Library/Homebrew/dev-cmd/release-notes.rb | @@ -5,10 +5,16 @@
#:
#: If `--markdown` is passed, output as a Markdown list.
+require "cli_parser"
+
module Homebrew
module_function
def release_notes
+ args = Homebrew::CLI::Parser.new do
+ switch "--markdown"
+ end.parse
+
previous_tag = ARGV.named.first
previous_tag ||= Utils.po... | false |
Other | Homebrew | brew | fc7fb60b72d47aaf527bf53a7313db8fb84e7bdd.json | system_config: use some puts for clang. | Library/Homebrew/system_config.rb | @@ -212,16 +212,15 @@ def dump_verbose_config(f = $stdout)
f.puts "GCC-4.2: build #{gcc_4_2}" unless gcc_4_2.null?
f.print "Clang: "
if clang.null?
- f.print "N/A"
+ f.puts "N/A"
else
f.print "#{clang} build "
if clang_build.null?
- f.print "(parse er... | false |
Other | Homebrew | brew | 0513d9de5c3c1cd860474df3dfba3847e70331ff.json | display_items: handle nil keys | Library/Homebrew/linkage_checker.rb | @@ -22,11 +22,8 @@ def initialize(keg, formula = nil)
end
def dylib_to_dep(dylib)
- if dylib =~ %r{#{Regexp.escape(HOMEBREW_PREFIX)}/(opt|Cellar)/([\w+-.@]+)/}
- Regexp.last_match(2)
- else
- "Not a Homebrew library"
- end
+ dylib =~ %r{#{Regexp.escape(HOMEBREW_PREFIX)}/(opt|Cellar)/([\w+-... | false |
Other | Homebrew | brew | 8634f19107d98e56fa12165e92800a2120e9b13e.json | linkage: consider missing links to Cellar | Library/Homebrew/linkage_checker.rb | @@ -88,8 +88,8 @@ def check_undeclared_deps
end
missing = []
@broken_dylibs.each do |str|
- next unless str.start_with? "#{HOMEBREW_PREFIX}/opt"
- missing << str.sub("#{HOMEBREW_PREFIX}/opt/", "").split("/")[0]
+ next unless str.start_with?("#{HOMEBREW_PREFIX}/opt", HOMEBREW_CELLAR)
+ ... | false |
Other | Homebrew | brew | b23f66982f823037254e5c4822f1ed2f00c6a2f8.json | Improve external command documentation
Extract `brew bundle` and `brew services` docs from their help. Add a
little for `brew cask` until we can think about e.g. merging the
manpages. | Library/Homebrew/cmd/help.rb | @@ -74,14 +74,13 @@ def help(cmd = nil, flags = {})
end
def command_help(path)
- help_lines = path.read.lines.grep(/^#:/)
+ help_lines = command_help_lines(path)
if help_lines.empty?
opoo "No help text in: #{path}" if ARGV.homebrew_developer?
HOMEBREW_HELP
else
help_lines.ma... | true |
Other | Homebrew | brew | b23f66982f823037254e5c4822f1ed2f00c6a2f8.json | Improve external command documentation
Extract `brew bundle` and `brew services` docs from their help. Add a
little for `brew cask` until we can think about e.g. merging the
manpages. | Library/Homebrew/dev-cmd/man.rb | @@ -71,6 +71,9 @@ def build_man_page
variables[:former_maintainers] = readme.read[/(Former maintainers .*\.)/, 1]
.gsub(/\[([^\]]+)\]\([^)]+\)/, '\1')
+ variables[:homebrew_bundle] = help_output(:bundle)
+ variables[:homebrew_services] = help_output(:services)
+
... | true |
Other | Homebrew | brew | b23f66982f823037254e5c4822f1ed2f00c6a2f8.json | Improve external command documentation
Extract `brew bundle` and `brew services` docs from their help. Add a
little for `brew cask` until we can think about e.g. merging the
manpages. | Library/Homebrew/manpages/brew.1.md.erb | @@ -56,17 +56,21 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
## OFFICIAL EXTERNAL COMMANDS
- * `bundle`:
- Bundler for non-Ruby dependencies from Homebrew:
- <https://github.com/Homebrew/homebrew-bundle>
+ <%= homebrew_bundle.join("\n ").strip %>
- * `cask`:
- ... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.