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 | ce7b32cec835bb658df75a0c691db9a97921163c.json | add HOMEBREW_ENV_PATH internal variable
`Library/ENV` like `Library/Homebrew` is part of Homebrew basecode. It
should be able to be accessed during the `brew tests`.
By adding HOMEBREW_ENV_PATH variable, we allow test suit to locate these
codes. | Library/brew.rb | @@ -50,7 +50,7 @@ def require?(path)
end
# Add SCM wrappers.
- ENV["PATH"] += "#{File::PATH_SEPARATOR}#{HOMEBREW_LIBRARY}/ENV/scm"
+ ENV["PATH"] += "#{File::PATH_SEPARATOR}#{HOMEBREW_ENV_PATH}/scm"
if cmd
internal_cmd = require? HOMEBREW_LIBRARY_PATH.join("cmd", cmd) | true |
Other | Homebrew | brew | 28b4923dad7a421f6f6d2598a5661a147268a4c7.json | fix tests for deprecating SHA1
Closes Homebrew/homebrew#50272.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/test/test_checksum.rb | @@ -3,16 +3,16 @@
class ChecksumTests < Homebrew::TestCase
def test_empty?
- assert_empty Checksum.new(:sha1, "")
+ assert_empty Checksum.new(:sha256, "")
end
def test_equality
- a = Checksum.new(:sha1, TEST_SHA1)
- b = Checksum.new(:sha1, TEST_SHA1)
+ a = Checksum.new(:sha256, TEST_SHA256)... | true |
Other | Homebrew | brew | 28b4923dad7a421f6f6d2598a5661a147268a4c7.json | fix tests for deprecating SHA1
Closes Homebrew/homebrew#50272.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/test/test_checksum_verification.rb | @@ -21,22 +21,6 @@ def teardown
@_f.clear_cache
end
- def test_good_sha1
- formula do
- sha1 TESTBALL_SHA1
- end
-
- assert_checksum_good
- end
-
- def test_bad_sha1
- formula do
- sha1 "7ea8a98acb8f918df723c2ae73fe67d5664bfd7e"
- end
-
- assert_checksum_bad
- end
-
def test... | true |
Other | Homebrew | brew | 28b4923dad7a421f6f6d2598a5661a147268a4c7.json | fix tests for deprecating SHA1
Closes Homebrew/homebrew#50272.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/test/test_formula.rb | @@ -159,7 +159,7 @@ def test_formula_spec_integration
homepage "http://example.com"
url "http://example.com/test-0.1.tbz"
mirror "http://example.org/test-0.1.tbz"
- sha1 TEST_SHA1
+ sha256 TEST_SHA256
head "http://example.com/test.git", :tag => "foo"
| true |
Other | Homebrew | brew | 28b4923dad7a421f6f6d2598a5661a147268a4c7.json | fix tests for deprecating SHA1
Closes Homebrew/homebrew#50272.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/test/test_formula_spec_selection.rb | @@ -38,7 +38,7 @@ def test_selects_head_when_exclusive
def test_incomplete_spec_not_selected
f = formula {
- sha1 TEST_SHA1
+ sha256 TEST_SHA256
version "1.0"
head "foo"
}
@@ -48,7 +48,7 @@ def test_incomplete_spec_not_selected
def test_incomplete_stable_not_set
f = form... | true |
Other | Homebrew | brew | 28b4923dad7a421f6f6d2598a5661a147268a4c7.json | fix tests for deprecating SHA1
Closes Homebrew/homebrew#50272.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/test/test_resource.rb | @@ -94,8 +94,6 @@ def test_mirrors
def test_checksum_setters
assert_nil @resource.checksum
- @resource.sha1(TEST_SHA1)
- assert_equal Checksum.new(:sha1, TEST_SHA1), @resource.checksum
@resource.sha256(TEST_SHA256)
assert_equal Checksum.new(:sha256, TEST_SHA256), @resource.checksum
end
@@ -... | true |
Other | Homebrew | brew | 28b4923dad7a421f6f6d2598a5661a147268a4c7.json | fix tests for deprecating SHA1
Closes Homebrew/homebrew#50272.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/test/test_software_spec.rb | @@ -155,19 +155,19 @@ def setup
def test_checksum_setters
checksums = {
- :snow_leopard_32 => "deadbeef"*5,
- :snow_leopard => "faceb00c"*5,
- :lion => "baadf00d"*5,
- :mountain_lion => "8badf00d"*5
+ :snow_leopard_32 => "deadbeef"*8,
+ :snow_leopard => "faceb0... | true |
Other | Homebrew | brew | 8aaa95ee993187f763b0953d3720b5f6308472d3.json | Add advice about keychain credentials
Fixes Homebrew/homebrew#50050. Closes Homebrew/homebrew#50059. | Library/Homebrew/utils.rb | @@ -487,7 +487,7 @@ def initialize(reset, error)
GitHub #{error}
Try again in #{pretty_ratelimit_reset(reset)}, or create a personal access token:
#{Tty.em}https://github.com/settings/tokens/new?scopes=&description=Homebrew#{Tty.reset}
- and then set the token as: HOMEBREW_GITHUB_API... | false |
Other | Homebrew | brew | f30221c7e1d626ddce3d923bc9da2ba880a7ceee.json | Tips & Tricks: remove obsolete ref to SHA1 | share/doc/homebrew/Tips-N'-Tricks.md | @@ -75,7 +75,7 @@ renaming the file from <code>otp_src_R13B03</code> to
download. This means instead of manually renaming a formula, you can
run `mv the_tarball $(brew --cache -s $FORMULA)`.
-You can also pre-cache the download by using the command `brew fetch formula` which also displays the SHA1 and SHA256 value... | false |
Other | Homebrew | brew | 148da475710b882a17e044153102961919c48477.json | Improve error message for invalid regex to search
Fixes https://github.com/Homebrew/homebrew/issues/50131
This commit removes the error backtrace and improves the error message
if a bad regexp is passed to `brew search`.
Closes Homebrew/homebrew#50173.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de> | Library/Homebrew/cmd/search.rb | @@ -93,6 +93,8 @@ def query_regexp(query)
when %r{^/(.*)/$} then Regexp.new($1)
else /.*#{Regexp.escape(query)}.*/i
end
+ rescue RegexpError
+ odie "#{query} is not a valid regex"
end
def search_taps(rx) | false |
Other | Homebrew | brew | f30c264519afd98b5aac8dd5c48810c761983124.json | Avoid pathological trailing slash
Resolves an issue where xcode-select output with a terminal slash leads
to superenv failing to strip system library paths from ccld-style
invocations.
Fixes Homebrew/homebrew#49731. Discussion in Homebrew/homebrew#50154. | Library/Homebrew/os/mac/xcode.rb | @@ -43,7 +43,8 @@ def prefix
path = bundle_path
path.join("Contents", "Developer") if path
else
- Pathname.new(dir)
+ # Use cleanpath to avoid pathological trailing slash
+ Pathname.new(dir).cleanpath
end
end
... | false |
Other | Homebrew | brew | 90246be60a6ba46e07b5ab65ced53b1290b98ab9.json | Formula Cookbook: note $HOME override
See https://github.com/Homebrew/homebrew/pull/50130#discussion_r56254860 | share/doc/homebrew/Formula-Cookbook.md | @@ -241,7 +241,15 @@ Check the top of the e.g. `./configure` output. Some configure scripts do not re
Please add a [`test do`](http://www.rubydoc.info/github/Homebrew/homebrew/master/Formula#test-class_method) block to the formula. This will be run by `brew test foo` and the [Brew Test Bot](Brew-Test-Bot.md).
-The... | false |
Other | Homebrew | brew | 236a18debe51e815f2d81a43d2151c500555abf9.json | audit: fix crash when HOMEBREW_NO_GITHUB_API is set
Running brew audit --strict --online on a formula with a GitHub
homepage/url would crash if HOMEBREW_NO_GITHUB_API is set because
GitHub.repository returns `nil` and the audit code assumes it always
returns a hash.
Closes Homebrew/homebrew#50054.
Signed-off-by: Bap... | Library/Homebrew/cmd/audit.rb | @@ -509,6 +509,8 @@ def audit_github_repository
return
end
+ return if metadata.nil?
+
problem "GitHub fork (not canonical repository)" if metadata["fork"]
if (metadata["forks_count"] < 20) && (metadata["subscribers_count"] < 20) &&
(metadata["stargazers_count"] < 50) | true |
Other | Homebrew | brew | 236a18debe51e815f2d81a43d2151c500555abf9.json | audit: fix crash when HOMEBREW_NO_GITHUB_API is set
Running brew audit --strict --online on a formula with a GitHub
homepage/url would crash if HOMEBREW_NO_GITHUB_API is set because
GitHub.repository returns `nil` and the audit code assumes it always
returns a hash.
Closes Homebrew/homebrew#50054.
Signed-off-by: Bap... | Library/Homebrew/test/test_cmd_audit.rb | @@ -340,4 +340,21 @@ def test_audit_line_default_template
assert_equal "Please remove default template comments",
fa.problems.shift
end
+
+ def test_audit_github_repository_no_api
+ fa = formula_auditor "foo", <<-EOS.undent, :strict => true, :online => true
+ class Foo < Formula
+ homepag... | true |
Other | Homebrew | brew | 1e1184fc2d7bae278b2806ddda296e26dcc9fe97.json | superenv: fix make_jobs regular expression
HOMEBREW_MAKE_JOBS can be a multidigit number. The regex should match
the entire number not just the last digit.
Closes Homebrew/homebrew#50016.
Signed-off-by: Tim D. Smith <git@tim-smith.us> | Library/Homebrew/extend/ENV/super.rb | @@ -263,7 +263,7 @@ def deparallelize
alias_method :j1, :deparallelize
def make_jobs
- self["MAKEFLAGS"] =~ /-\w*j(\d)+/
+ self["MAKEFLAGS"] =~ /-\w*j(\d+)/
[$1.to_i, 1].max
end
| false |
Other | Homebrew | brew | e8caa48cc2858815ef3193d461fb12c2ba8bda07.json | brew.sh: add tap-pin to sudo check list | Library/brew.sh | @@ -146,7 +146,7 @@ fi
if [[ "$(id -u)" = "0" && "$(/usr/bin/stat -f%u "$HOMEBREW_BREW_FILE")" != "0" ]]
then
case "$HOMEBREW_COMMAND" in
- install|reinstall|postinstall|link|pin|update|upgrade|create|migrate|tap|switch)
+ install|reinstall|postinstall|link|pin|update|upgrade|create|migrate|tap|tap-pin|switc... | false |
Other | Homebrew | brew | ec2a3f979ee81e5ed5d5368a6addbe9b31eb3ece.json | utils: use string arg to IO.popen.
Closes Homebrew/homebrew#49882. | Library/Homebrew/utils.rb | @@ -511,7 +511,7 @@ def api_credentials
if ENV["HOMEBREW_GITHUB_API_TOKEN"]
ENV["HOMEBREW_GITHUB_API_TOKEN"]
else
- github_credentials = IO.popen(["git", "credential-osxkeychain", "get"], "w+") do |io|
+ github_credentials = IO.popen("git credential-osxkeychain get", "w+") do |io|
... | false |
Other | Homebrew | brew | 16f8b16f190f92bd9f4af3db5464fc924bdcd854.json | blacklist: suggest Cask for installing mactex
Closes Homebrew/homebrew#49817.
Signed-off-by: Alex Dunn <adunn@ucsb.edu> | Library/Homebrew/blacklist.rb | @@ -8,6 +8,10 @@ def blacklisted?(name)
and only builds 32-bit (and thus can't use Homebrew deps on Snow Leopard.)
We recommend using a MacTeX distribution: https://www.tug.org/mactex/
+
+ You can install it using Cask:
+
+ brew cask install mactex
EOS
when "pip" then <<-EOS.undent
Homebr... | false |
Other | Homebrew | brew | 0578ba0f429708773489fdd8f9647c2712c7025c.json | install_renamed: handle recursive installs.
Closes Homebrew/homebrew#49845.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/extend/pathname.rb | @@ -82,6 +82,7 @@ def install_p(src, new_basename)
src = Pathname(src)
dst = join(new_basename)
dst = yield(src, dst) if block_given?
+ return unless dst
mkpath
| true |
Other | Homebrew | brew | 0578ba0f429708773489fdd8f9647c2712c7025c.json | install_renamed: handle recursive installs.
Closes Homebrew/homebrew#49845.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/install_renamed.rb | @@ -2,7 +2,8 @@ module InstallRenamed
def install_p(_, new_basename)
super do |src, dst|
if src.directory?
- dst
+ dst.install(src.children)
+ next
else
append_default_if_different(src, dst)
end | true |
Other | Homebrew | brew | 0578ba0f429708773489fdd8f9647c2712c7025c.json | install_renamed: handle recursive installs.
Closes Homebrew/homebrew#49845.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/test/test_pathname.rb | @@ -137,6 +137,16 @@ def test_install_renamed_directory
assert_equal "a", File.read(@dst+@src.basename+@file.basename)
end
+ def test_install_renamed_directory_recursive
+ @dst.extend(InstallRenamed)
+ (@dst+@dir.basename).mkpath
+ (@dst+@dir.basename+"another_file").write "a"
+ @dir.mkpath
+ ... | true |
Other | Homebrew | brew | 6f9f3faef3d566641b3fa18e887819da7889018a.json | test-bot: fix wrong tap argument check | Library/Homebrew/cmd/test-bot.rb | @@ -49,15 +49,15 @@ def resolve_test_tap
bot_argv = ENV["UPSTREAM_BOT_PARAMS"].split " "
bot_argv.extend HomebrewArgvExtension
if tap = bot_argv.value("tap")
- return Tap.fetch(tap) if url_path =~ HOMEBREW_TAP_REGEX
+ return Tap.fetch(tap)
end
end
if git_url = ENV["... | false |
Other | Homebrew | brew | 9f96e41b40f52313fbc7832df631827f5e3bcacb.json | tap: add methods to get git related information
These methods will be used in `brew --version`, `brew config`
and `brew doctor` after core/formula separation.
Closes Homebrew/homebrew#49796.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/tap.rb | @@ -83,7 +83,7 @@ def clear_cache
# e.g. `https://github.com/user/homebrew-repo`
def remote
@remote ||= if installed?
- if git?
+ if git? && Utils.git_available?
path.cd do
Utils.popen_read("git", "config", "--get", "remote.origin.url").chomp
end
@@ -98,6 +98,34 @@ def ... | true |
Other | Homebrew | brew | 9f96e41b40f52313fbc7832df631827f5e3bcacb.json | tap: add methods to get git related information
These methods will be used in `brew --version`, `brew config`
and `brew doctor` after core/formula separation.
Closes Homebrew/homebrew#49796.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/test/test_tap.rb | @@ -1,6 +1,8 @@
require "testing_env"
class TapTest < Homebrew::TestCase
+ include FileUtils
+
def setup
@path = Tap::TAP_DIRECTORY/"homebrew/homebrew-foo"
@path.mkpath
@@ -16,7 +18,7 @@ class Foo < Formula
EOS
@alias_file = @path/"Aliases/bar"
@alias_file.parent.mkpath
- FileUtils.l... | true |
Other | Homebrew | brew | 57a81f9e22ef2db7fefc432adafe2d63a2206bc8.json | Clarify case conventions in formula naming
If a formula's class name contains an uppercase-spelled acronym, the
messages given by `brew install` can be pretty confusing (it recommends
a formula named exactly the same…)
Closes Homebrew/homebrew#49639.
Signed-off-by: Tim D. Smith <git@tim-smith.us> | share/doc/homebrew/Formula-Cookbook.md | @@ -272,7 +272,7 @@ When importing classes, Homebrew will require the formula and then create an ins
* `foo-bar.rb` => `FooBar`
* `foobar.rb` => `Foobar`
-Thus, if you change the name of the class, you must also rename the file. Filenames should be all lowercase.
+Thus, if you change the name of the class, you ... | false |
Other | Homebrew | brew | 76767f3d6e89e540241e973b8ffe04690a9a2ccb.json | Formula-Cookbook: Improve testing suggestions
Based on recent feedback on some pull requests, I touched up the section about adding tests to formula.
I wanted to make it clearer that the examples demonstrate how to create files on the fly and add a pointer to the tinyxml2 formula (DomT4 pointed it out to me as a good ... | share/doc/homebrew/Formula-Cookbook.md | @@ -245,7 +245,7 @@ The [`test do`](http://www.rubydoc.info/github/Homebrew/homebrew/master/Formula#
We want tests that don't require any user input and test the basic functionality of the application. For example `foo build-foo input.foo` is a good test and (despite their widespread use) `foo --version` and `foo --... | false |
Other | Homebrew | brew | b4edf23a3624d062fe030a57ad0b2ea1e6b339be.json | test-bot: make bottle stats visible by default
Closes Homebrew/homebrew#49620. | Library/Homebrew/cmd/test-bot.rb | @@ -805,9 +805,14 @@ def test_ci_upload(tap)
unless formula_packaged[formula_name]
package_url = "#{bintray_repo_url}/#{bintray_package}"
unless system "curl", "--silent", "--fail", "--output", "/dev/null", package_url
+ package_blob = <<-EOS.undent
+ {"name": "#{bintray_pac... | false |
Other | Homebrew | brew | bd679c7dc38c06eed8014ef074241836ce605508.json | brew.sh: improve empty argument handling
Follow-up to Homebrew/homebrew#49327 that leaves empty argument handling to the Ruby code
(it is a bit more sophisticated and distinguished between `help` and an
empty argument list and treats them differently) instead of hard-wiring
the former to the `help` command.
Closes Ho... | Library/brew.sh | @@ -117,10 +117,10 @@ then
set -- "$@" -v
fi
+HOMEBREW_ARG_COUNT="$#"
HOMEBREW_COMMAND="$1"
shift
case "$HOMEBREW_COMMAND" in
- '') HOMEBREW_COMMAND="help";;
ls) HOMEBREW_COMMAND="list";;
homepage) HOMEBREW_COMMAND="home";;
-S) HOMEBREW_COMMAND="search";;
@@ -169,5 +169,... | false |
Other | Homebrew | brew | 2ab4f7452702dd89c6e6457b7dc2cccb5da65263.json | brew.sh: drop reference to removed 'update-ruby'
This is a follow-up fix to a minor oversight in Homebrew/homebrew#49523. | Library/brew.sh | @@ -146,7 +146,7 @@ fi
if [[ "$(id -u)" = "0" && "$(/usr/bin/stat -f%u "$HOMEBREW_BREW_FILE")" != "0" ]]
then
case "$HOMEBREW_COMMAND" in
- install|reinstall|postinstall|link|pin|update|update-ruby|upgrade|create|migrate|tap|switch)
+ install|reinstall|postinstall|link|pin|update|upgrade|create|migrate|tap|s... | false |
Other | Homebrew | brew | 43c6061bc95d8e21803b227181f716e6926e28f4.json | Tap#install: support quiet option | Library/Homebrew/tap.rb | @@ -140,17 +140,21 @@ def core_formula_repository?
# @param [Hash] options
# @option options [String] :clone_targe If passed, it will be used as the clone remote.
# @option options [Boolean] :full_clone If set as true, full clone will be used.
+ # @option options [Boolean] :quiet If set, suppress all output.... | false |
Other | Homebrew | brew | b52af53e711d442f2b7097a449a6c077664eb7f3.json | various: use Tap abstraction
formula_rename and tap_migrations are now handled inside Tap.
Closes Homebrew/homebrew#49549.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/cmd/audit.rb | @@ -4,10 +4,8 @@
require "extend/ENV"
require "formula_cellar_checks"
require "official_taps"
-require "tap_migrations"
require "cmd/search"
require "date"
-require "formula_renames"
module Homebrew
def audit
@@ -898,11 +896,11 @@ def audit_caveats
end
def audit_reverse_migration
- # Only enforce ... | true |
Other | Homebrew | brew | b52af53e711d442f2b7097a449a6c077664eb7f3.json | various: use Tap abstraction
formula_rename and tap_migrations are now handled inside Tap.
Closes Homebrew/homebrew#49549.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/cmd/migrate.rb | @@ -1,5 +1,4 @@
require "migrator"
-require "formula_renames"
module Homebrew
def migrate | true |
Other | Homebrew | brew | b52af53e711d442f2b7097a449a6c077664eb7f3.json | various: use Tap abstraction
formula_rename and tap_migrations are now handled inside Tap.
Closes Homebrew/homebrew#49549.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/formula.rb | @@ -11,7 +11,6 @@
require "pkg_version"
require "tap"
require "core_formula_repository"
-require "formula_renames"
require "keg"
require "migrator"
| true |
Other | Homebrew | brew | b52af53e711d442f2b7097a449a6c077664eb7f3.json | various: use Tap abstraction
formula_rename and tap_migrations are now handled inside Tap.
Closes Homebrew/homebrew#49549.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/formulary.rb | @@ -1,5 +1,4 @@
require "digest/md5"
-require "formula_renames"
require "tap"
require "core_formula_repository"
| true |
Other | Homebrew | brew | b52af53e711d442f2b7097a449a6c077664eb7f3.json | various: use Tap abstraction
formula_rename and tap_migrations are now handled inside Tap.
Closes Homebrew/homebrew#49549.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/migrator.rb | @@ -2,7 +2,6 @@
require "formula_lock"
require "keg"
require "tab"
-require "tap_migrations"
class Migrator
class MigrationNeededError < RuntimeError
@@ -126,13 +125,11 @@ def from_same_taps?
if formula.tap == old_tap
true
# Homebrew didn't use to update tabs while performing tap-migrations,
-... | true |
Other | Homebrew | brew | ba147818cb4144e579a35cac949ca97b1253d50e.json | test_formulary: use CoreFormulaRepository abstraction | Library/Homebrew/test/test_formulary.rb | @@ -16,7 +16,7 @@ def test_class_naming
class FormularyFactoryTest < Homebrew::TestCase
def setup
@name = "testball_bottle"
- @path = HOMEBREW_PREFIX/"Library/Formula/#{@name}.rb"
+ @path = CoreFormulaRepository.new.formula_dir/"#{@name}.rb"
@bottle_dir = Pathname.new("#{File.expand_path("..", __FIL... | false |
Other | Homebrew | brew | 9a4987533af8207041c8061a36661286a429003d.json | update-report: fix new_full_name in report | Library/Homebrew/cmd/update-report.rb | @@ -128,7 +128,7 @@ def report
if tap.core_formula_repository?
new_full_name = new_name
else
- new_full_name = "#{tap}/#{new_full_name}"
+ new_full_name = "#{tap}/#{new_name}"
end
renamed_formulae << [old_full_name, new_full_name] if @report[:A].include? new_full_nam... | false |
Other | Homebrew | brew | 849e62c7368cf9d927448548b52387dc0e96c9ce.json | update-report: use tap inside Reporter
* Avoid tons of unnecessary file path manipulation. Use abstraction
offered by Tap class if possible.
* Handle formula rename/tap migration inside reporter in per tap basis.
* Avoid duplicated computation.
* Remove redundant/dead code. | Library/Homebrew/cmd/update-report.rb | @@ -115,119 +115,143 @@ def load_formula_renames
end
class Reporter
- attr_reader :initial_revision, :current_revision, :repository
-
- def self.repository_variable(repository)
- if repository == HOMEBREW_REPOSITORY
- ""
- else
- repository.to_s.
- strip_prefix(Tap::TAP_DIRECTORY.to_s).
- ... | false |
Other | Homebrew | brew | 842e19bbeb9a595995770f4dba952483c8e4789a.json | README.md: Fix a typo
Closes Homebrew/homebrew#49500.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | README.md | @@ -34,7 +34,7 @@ Code is under the [BSD 2 Clause (NetBSD) license](https://github.com/Homebrew/ho
Documentation is under the [Creative Commons Attribution license](https://creativecommons.org/licenses/by/4.0/).
## Donations
-Homebrew is a non-profit project run entirely by unpaid volunteers. We need your funds to ... | false |
Other | Homebrew | brew | 6ac6cb4fcdc5c162543e14688d41c0b10a1b1e4a.json | TapLoader: improve load logic
* Use `Tap#formula_dir` instead of `Tap#formula_files` to find formula
file to have better performance and avoid caching issue.
* Change the loader logic to search name -> search alias -> search old name.
This is more consistence with what we do when loading core formula
file.
Clos... | Library/Homebrew/formulary.rb | @@ -148,15 +148,17 @@ class TapLoader < FormulaLoader
def initialize(tapped_name)
user, repo, name = tapped_name.split("/", 3).map(&:downcase)
@tap = Tap.fetch user, repo
- name = @tap.formula_renames.fetch(name, name)
- path = @tap.formula_files.detect { |file| file.basename(".rb").to_s ==... | false |
Other | Homebrew | brew | 6b6159a858009b6d82b858830533a4a3ce135a28.json | list: exclude .github from unbrewed
Recently added files polluting brew ls --unbrewed results.
Closes Homebrew/homebrew#49456.
Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr> | Library/Homebrew/cmd/list.rb | @@ -42,6 +42,7 @@ def list
UNBREWED_EXCLUDE_FILES = %w[.DS_Store]
UNBREWED_EXCLUDE_PATHS = %w[
+ .github/*
bin/brew
lib/gdk-pixbuf-2.0/*
lib/gio/* | false |
Other | Homebrew | brew | a0855fde264786e5f13169a5e22321793ec1effd.json | README: use secure SFC links | README.md | @@ -56,6 +56,6 @@ Our bottles (binary packages) are hosted by Bintray.
[](https://bintray.com/homebrew)
-Homebrew is a member of the [Software Freedom Conservancy](http://sfconservancy.org)
+Homebrew is a member of the [Software Fr... | false |
Other | Homebrew | brew | e00375e381c7bcd4f0db0d69944dbf831fc62672.json | test_pathname: add append_lines tests
Closes Homebrew/homebrew#49233.
Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com> | Library/Homebrew/test/test_pathname.rb | @@ -51,6 +51,18 @@ def test_write_does_not_overwrite
assert_raises(RuntimeError) { @file.write("CONTENT") }
end
+ def test_append_lines
+ touch @file
+ @file.append_lines("CONTENT")
+ assert_equal "CONTENT\n", File.read(@file)
+ @file.append_lines("CONTENTS")
+ assert_equal "CONTENT\nCONTENTS\... | false |
Other | Homebrew | brew | ff4d16deebaabc374f4dae2786bd01e2865875a4.json | pathname: add append_lines method
* Blocks writing of new files via accidental typos, etc, which the normal open("blah", "a") doesn't.
* Where files don't exist they should ideally be using `(buildpath/"dog").write` instead of open("blah", "a") already.
* It's a bit less cluttered looking if you need several writes to... | Library/Homebrew/extend/pathname.rb | @@ -131,6 +131,12 @@ def write(content, *open_args)
open("w", *open_args) { |f| f.write(content) }
end
+ # Only appends to a file that is already created.
+ def append_lines(content, *open_args)
+ raise "Cannot append file that doesn't exist: #{self}" unless exist?
+ open("a", *open_args) { |f| f.puts... | false |
Other | Homebrew | brew | bfbdfe8d9da53209dcc66ee0e9980078669a4acd.json | env/shared: ignore perl opts
In theory, letting these be set once wasn't an awful idea because it allows
users choice on where Perl modules end up.
In reality, as we've moved closer to sandboxing and at the same time accepted more
perl binding options into formulae it has been exposed as something of a hellraiser.
I... | Library/Homebrew/extend/ENV/shared.rb | @@ -22,7 +22,7 @@ module SharedEnvExtension
CFLAGS CXXFLAGS OBJCFLAGS OBJCXXFLAGS LDFLAGS CPPFLAGS
MACOSX_DEPLOYMENT_TARGET SDKROOT DEVELOPER_DIR
CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_FRAMEWORK_PATH
- GOBIN GOPATH GOROOT
+ GOBIN GOPATH GOROOT PERL_MB_OPT PERL_MM_OPT
LIBRARY_PATH
]
| false |
Other | Homebrew | brew | 7572e91a6031dfc2c5d12d07686436aa44de501e.json | diagnostic: add new osxfuse exceptions
The recent updates to OSXFuse include two new elements that get flagged by
`brew doctor`. Adding them here so it's consistent with how we handle the rest
of OSXFuse.
Closes Homebrew/homebrew#49372. | Library/Homebrew/diagnostic.rb | @@ -175,6 +175,7 @@ def check_for_stray_dylibs
"libmacfuse_i64.2.dylib", # OSXFuse MacFuse compatibility layer
"libosxfuse_i32.2.dylib", # OSXFuse
"libosxfuse_i64.2.dylib", # OSXFuse
+ "libosxfuse.2.dylib", # OSXFuse
"libTrAPI.dylib", # TrAPI / Endpoint Security VPN
... | false |
Other | Homebrew | brew | f8a86e596204d7201a2dd9416ada658545f1c30b.json | tests: add groups and project name to coverage
Groups make it easier to get an overview of the coverage without having
to scan through a single very long list of files. They also display a
possibly helpful per-group coverage.
The project name is normally derived from the `root` directory which
happens to be `Library`... | Library/Homebrew/test/.simplecov | @@ -18,6 +18,19 @@ SimpleCov.start do
unless ENV["HOMEBREW_INTEGRATION_TEST"]
track_files "#{SimpleCov.root}/**/*.rb"
end
+
+ # Add groups and the proper project name to the output.
+ project_name "Homebrew"
+ add_group "Commands", %w[/Homebrew/cmd/ /Homebrew/dev-cmd/]
+ add_group "Extensions", "/Homebre... | false |
Other | Homebrew | brew | 5aa2712694a418e5f4eacacd2752e68799d312cf.json | docs: fix URLs in issue/PR template
Sadly, relative URLs don't work in this context. | .github/ISSUE_TEMPLATE.md | @@ -13,7 +13,7 @@ _Please replace this line with a brief summary of your issue **AND** if reportin
### Feature/Formula Requests:
-**Please note by far the quickest way to get a new feature or formula into Homebrew is to file a [Pull Request](CONTRIBUTING.md).**
+**Please note by far the quickest way to get a new f... | true |
Other | Homebrew | brew | 5aa2712694a418e5f4eacacd2752e68799d312cf.json | docs: fix URLs in issue/PR template
Sadly, relative URLs don't work in this context. | .github/PULL_REQUEST_TEMPLATE.md | @@ -1,6 +1,6 @@
### All Submissions:
-- [ ] Have you followed the guidelines in our [Contributing](CONTRIBUTING.md) document?
+- [ ] Have you followed the guidelines in our [Contributing](https://github.com/Homebrew/homebrew/blob/master/.github/CONTRIBUTING.md) document?
### New Formulae Submissions:
| true |
Other | Homebrew | brew | 3ac1c7b6533dc5cfe4e74155538ded8b2b1ee9ec.json | update: use GitHub API to avoid unneeded fetches.
Check to see if `HEAD` is the same as what we have locally. If it is:
don't bother to `git fetch`.
Closes Homebrew/homebrew#47888.
Closes Homebrew/homebrew#49219.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/cmd/update.sh | @@ -334,6 +334,22 @@ EOS
UPSTREAM_BRANCH="$(upstream_branch)"
# the refspec ensures that the default upstream branch gets updated
(
+ UPSTREAM_REPOSITORY_URL="$(git config remote.origin.url)"
+ if [[ "$UPSTREAM_REPOSITORY_URL" = "https://github.com/"* ]]
+ then
+ UPSTREAM_REPOSITORY... | false |
Other | Homebrew | brew | f2faf49e3f189885c6787f7d4beb680c3a987d4f.json | formula_installer: use new pour_bottle DSL. | Library/Homebrew/formula_installer.rb | @@ -85,7 +85,15 @@ def pour_bottle?(install_bottle_options = { :warn=>false })
return false unless options.empty?
return false if formula.bottle_disabled?
return true if formula.local_bottle_path
- return false unless formula.pour_bottle?
+ unless formula.pour_bottle?
+ if install_bottle_opti... | false |
Other | Homebrew | brew | 81c97e1686b64f969b9af71c5142e6fb20d42ee2.json | PULL_REQUEST_TEMPLATE: create initial template | .github/PULL_REQUEST_TEMPLATE.md | @@ -0,0 +1,17 @@
+### All Submissions:
+- [ ] Have you followed the guidelines in our [Contributing](CONTRIBUTING.md) document?
+
+### New Formulae Submissions:
+
+- [ ] Does your submission pass:
+`brew audit --strict --online <formula>` (where `<formula>` is the name of the formula you're submitting).
+- [ ] Have you... | false |
Other | Homebrew | brew | a049aaa84c311014cd16b264491f7f3d8fcd7999.json | docs: move security reporting guidelines | .github/CONTRIBUTING.md | @@ -34,8 +34,4 @@ First time contributing to Homebrew? Read our [Code of Conduct](https://github.c
* `git commit` with message formatted `foo: fix <insert details>`
* [open a pull request](https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/How-To-Open-a-Homebrew-Pull-Request-(and-get-it-merged).md#ho... | true |
Other | Homebrew | brew | a049aaa84c311014cd16b264491f7f3d8fcd7999.json | docs: move security reporting guidelines | .github/ISSUE_TEMPLATE.md | @@ -16,3 +16,7 @@ _Please replace this line with a brief summary of your issue **AND** if reportin
**Please note by far the quickest way to get a new feature or formula into Homebrew is to file a [Pull Request](CONTRIBUTING.md).**
We will consider your request but it may be closed if it's something we're not active... | true |
Other | Homebrew | brew | bcc5591702968d011af61586a3917413455b0981.json | ISSUE_TEMPLATE: create initial template
Closes Homebrew/homebrew#41321. | .github/ISSUE_TEMPLATE.md | @@ -0,0 +1,18 @@
+# Please follow the general troubleshooting steps first:
+
+- [ ] Ran `brew update` and retried your prior step?
+- [ ] Ran `brew doctor`, fixed as many issues as possible and retried your prior step?
+- [ ] If you're seeing permission errors tried running `sudo chown -R $(whoami) $(brew --prefix)`?
+... | false |
Other | Homebrew | brew | ee9b6572132f7e7f1ee34c05afae6e7bb2e49614.json | gitignore: update documentation paths | .gitignore | @@ -30,6 +30,7 @@
/share/doc
# Unignore our documentation.
+!/.github
!/share/doc/homebrew
!/share/man/man1/brew.1
@@ -38,7 +39,6 @@
!/.travis.yml
!/.yardopts
!/CODEOFCONDUCT.md
-!/CONTRIBUTING.md
!/LICENSE.txt
!/README.md
!/SUPPORTERS.md | false |
Other | Homebrew | brew | 4a289a65d4a1c91c849a24533e56a3f612a6b01b.json | Troubleshooting: remove dead link | share/doc/homebrew/Troubleshooting.md | @@ -14,7 +14,6 @@ brew gist-logs <formula>
* If you’re installing something Java-related, maybe you need to install Java (`brew cask install java`)?
* Check that **Command Line Tools for Xcode (CLT)** and/or **Xcode** are up to date.
* If things fail with permissions errors, check the permissions in `/usr/local`. If... | false |
Other | Homebrew | brew | 691e4aec11a71bdd88a59391aa7b56ea0cf48639.json | bin/brew: move logic to Library.
`bin/brew` is getting a bit bloated and it's annoying to open all of
`HOMEBREW_PREFIX` in your editor of choice and have it search through
the `Cellar`. Let's instead keep the bare minimum in `bin/brew` and
move the rest to `Library`.
Closes Homebrew/homebrew#49185.
Signed-off-by: Mi... | Library/brew.sh | @@ -0,0 +1,172 @@
+odie() {
+ if [[ -t 2 ]] # check whether stderr is a tty.
+ then
+ echo -ne "\033[4;31mError\033[0m: " >&2 # highlight Error with underline and red color
+ else
+ echo -n "Error: " >&2
+ fi
+ if [[ $# -eq 0 ]]
+ then
+ /bin/cat >&2
+ else
+ echo "$*" >&2
+ fi
+ exit 1
+}
+
+chdir... | true |
Other | Homebrew | brew | 691e4aec11a71bdd88a59391aa7b56ea0cf48639.json | bin/brew: move logic to Library.
`bin/brew` is getting a bit bloated and it's annoying to open all of
`HOMEBREW_PREFIX` in your editor of choice and have it search through
the `Cellar`. Let's instead keep the bare minimum in `bin/brew` and
move the rest to `Library`.
Closes Homebrew/homebrew#49185.
Signed-off-by: Mi... | bin/brew | @@ -1,31 +1,8 @@
#!/bin/bash
-
-odie() {
- if [[ -t 2 ]] # check whether stderr is a tty.
- then
- echo -ne "\033[4;31mError\033[0m: " >&2 # highlight Error with underline and red color
- else
- echo -n "Error: " >&2
- fi
- if [[ $# -eq 0 ]]
- then
- /bin/cat >&2
- else
- echo "$*" >&2
- fi
- exit... | true |
Other | Homebrew | brew | f6cbf7bab0a4d743ca4122c39d60ea669b5f7e14.json | Move internal command aliases from Ruby to Bash.
This means that internal command aliases can be used for Bash commands
(such as the new, Bash-based `brew update`).
Fixes Homebrew/homebrew#49182.
Closes Homebrew/homebrew#49184.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/global.rb | @@ -48,6 +48,7 @@ module Homebrew
ORIGINAL_PATHS = ENV["PATH"].split(File::PATH_SEPARATOR).map { |p| Pathname.new(p).expand_path rescue nil }.compact.freeze
+# TODO: remove this as soon as it's removed from commands.rb.
HOMEBREW_INTERNAL_COMMAND_ALIASES = {
"ls" => "list",
"homepage" => "home", | true |
Other | Homebrew | brew | f6cbf7bab0a4d743ca4122c39d60ea669b5f7e14.json | Move internal command aliases from Ruby to Bash.
This means that internal command aliases can be used for Bash commands
(such as the new, Bash-based `brew update`).
Fixes Homebrew/homebrew#49182.
Closes Homebrew/homebrew#49184.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/brew.rb | @@ -44,8 +44,6 @@ def require?(path)
end
end
- cmd = HOMEBREW_INTERNAL_COMMAND_ALIASES.fetch(cmd, cmd)
-
# Add contributed commands to PATH before checking.
Dir["#{HOMEBREW_LIBRARY}/Taps/*/*/cmd"].each do |tap_cmd_dir|
ENV["PATH"] += "#{File::PATH_SEPARATOR}#{tap_cmd_dir}" | true |
Other | Homebrew | brew | f6cbf7bab0a4d743ca4122c39d60ea669b5f7e14.json | Move internal command aliases from Ruby to Bash.
This means that internal command aliases can be used for Bash commands
(such as the new, Bash-based `brew update`).
Fixes Homebrew/homebrew#49182.
Closes Homebrew/homebrew#49184.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | bin/brew | @@ -135,6 +135,24 @@ then
fi
HOMEBREW_COMMAND="$1"
+shift
+case "$HOMEBREW_COMMAND" in
+ ls) HOMEBREW_COMMAND="list";;
+ homepage) HOMEBREW_COMMAND="home";;
+ -S) HOMEBREW_COMMAND="search";;
+ up) HOMEBREW_COMMAND="update";;
+ ln) HOMEBREW_COMMAND="link";;
+ instal) ... | true |
Other | Homebrew | brew | 775c4eedd7f6342ccfe7fe802a5935cb78ab050d.json | Promote update-bash to the default updater.
Also, rename the existing updater to `update-ruby` to allow using as
a fallback. It will eventually be removed.
Closes Homebrew/homebrew#49109.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/cmd/update-ruby.rb | @@ -6,7 +6,7 @@
require "descriptions"
module Homebrew
- def update
+ def update_ruby
unless ARGV.named.empty?
abort <<-EOS.undent
This command updates brew itself, and does not take formula names. | true |
Other | Homebrew | brew | 775c4eedd7f6342ccfe7fe802a5935cb78ab050d.json | Promote update-bash to the default updater.
Also, rename the existing updater to `update-ruby` to allow using as
a fallback. It will eventually be removed.
Closes Homebrew/homebrew#49109.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/cmd/update.sh | @@ -250,7 +250,7 @@ pull() {
trap - SIGINT
}
-homebrew-update-bash() {
+homebrew-update() {
local option
local DIR
local UPSTREAM_BRANCH | true |
Other | Homebrew | brew | 775c4eedd7f6342ccfe7fe802a5935cb78ab050d.json | Promote update-bash to the default updater.
Also, rename the existing updater to `update-ruby` to allow using as
a fallback. It will eventually be removed.
Closes Homebrew/homebrew#49109.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/test/test_updater.rb | @@ -1,5 +1,5 @@
require "testing_env"
-require "cmd/update"
+require "cmd/update-ruby"
require "formula_versions"
require "yaml"
| true |
Other | Homebrew | brew | 775c4eedd7f6342ccfe7fe802a5935cb78ab050d.json | Promote update-bash to the default updater.
Also, rename the existing updater to `update-ruby` to allow using as
a fallback. It will eventually be removed.
Closes Homebrew/homebrew#49109.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | bin/brew | @@ -144,7 +144,7 @@ fi
if [[ "$(id -u)" = "0" && "$(/usr/bin/stat -f%u "$HOMEBREW_BREW_FILE")" != "0" ]]
then
case "$HOMEBREW_COMMAND" in
- instal|install|reinstall|postinstall|ln|link|pin|update|update-bash|upgrade|create|migrate|tap|switch)
+ instal|install|reinstall|postinstall|ln|link|pin|update|update-r... | true |
Other | Homebrew | brew | b389953f5b1b0ec98c069f155c280d60b94eeafb.json | style: update rubocop to 0.37.2
Closes Homebrew/homebrew#49084.
Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com> | Library/Homebrew/cmd/style.rb | @@ -8,7 +8,7 @@ def style
ARGV.formulae.map(&:path)
end
- Homebrew.install_gem_setup_path! "rubocop", "0.36.0"
+ Homebrew.install_gem_setup_path! "rubocop", "0.37.2"
args = [
"--format", "simple", "--force-exclusion", "--config", | false |
Other | Homebrew | brew | 0322d9bd82c2663daf89b28dec32378eea3fb90c.json | pull --bump: add auto-detection of devel bumps
Closes Homebrew/homebrew#48472.
Signed-off-by: Andrew Janke <andrew@apjanke.net> | Library/Homebrew/cmd/pull.rb | @@ -1,57 +1,41 @@
# Gets a patch from a GitHub commit or pull request and applies it to Homebrew.
-# Optionally, installs it too.
+# Optionally, installs the formulae changed by the patch.
+#
+# Usage: brew pull [options...] <patch-source>
+#
+# <patch-source> may be any of:
+# * The ID number of a pull request in t... | false |
Other | Homebrew | brew | 0386f332229d0a6ca28813d84fc0eb480cd36310.json | tests: Add missing version tests
Closes Homebrew/homebrew#49031.
Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr> | Library/Homebrew/test/test_versions.rb | @@ -12,6 +12,32 @@ def test_raises_for_non_string_objects
assert_raises(TypeError) { Version.new(1) }
assert_raises(TypeError) { Version.new(:symbol) }
end
+
+ def test_detected_from_url?
+ refute Version.new("1.0").detected_from_url?
+ assert Version::FromURL.new("1.0").detected_from_url?
+ end
+e... | true |
Other | Homebrew | brew | 0386f332229d0a6ca28813d84fc0eb480cd36310.json | tests: Add missing version tests
Closes Homebrew/homebrew#49031.
Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr> | Library/Homebrew/test/testing_env.rb | @@ -30,8 +30,8 @@ def assert_version_equal(expected, actual)
assert_equal Version.new(expected), actual
end
- def assert_version_detected(expected, url)
- assert_equal expected, Version.parse(url).to_s
+ def assert_version_detected(expected, url, specs={})
+ assert_equal expected, Version.... | true |
Other | Homebrew | brew | e84539135969e84a1b451f524a43f58ff42b6d37.json | os/mac: add Xcode 7.2.1 | Library/Homebrew/os/mac.rb | @@ -270,6 +270,7 @@ def preferred_arch
"7.1" => { :clang => "7.0", :clang_build => 700 },
"7.1.1" => { :clang => "7.0", :clang_build => 700 },
"7.2" => { :clang => "7.0", :clang_build => 700 },
+ "7.2.1" => { :clang => "7.0", :clang_build => 700 },
}
def compilers_standard? | false |
Other | Homebrew | brew | eba429d947a59ab4d80ccac0cffbe34b3c75c48d.json | tests: add leaves & prune integration tests
Closes Homebrew/homebrew#48943.
Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr> | Library/Homebrew/test/test_integration_cmds.rb | @@ -639,6 +639,56 @@ def test_log
(HOMEBREW_REPOSITORY/".git").rmtree
end
+ def test_leaves
+ formula_dir = CoreFormulaRepository.new.formula_dir
+ formula_file1 = formula_dir/"testball1.rb"
+ formula_file2 = formula_dir/"testball2.rb"
+ formula_file1.write <<-EOS.undent
+ class Testball1 < ... | false |
Other | Homebrew | brew | 4ce99fa0102c352f79071d8ae6aa64078ed1493d.json | tests: remove unnecessary cd | Library/Homebrew/test/test_integration_cmds.rb | @@ -152,10 +152,8 @@ class Testball < Formula
url "https://example.com/testball-0.1.tar.gz"
end
EOS
- HOMEBREW_CACHE.cd do
- assert_match(/testball-0\.1.*\.bottle\.tar\.gz/,
- cmd_output("bottle", "--no-revision", "testball"))
- end
+ assert_match(/testball-0\.1.*\.b... | false |
Other | Homebrew | brew | 8749ecc3839c6093f56c6b80ebf794266a611472.json | Dependency.expand: ensure pop stack
During the dependencies expansion, there may be errors (e.g. FormulaUnavaiableError).
As result, some deps will be left behind in the stack and interfere afterwards
dependencies expansion.
So let's ensure stack clean for each expansions.
Fixes Homebrew/homebrew#48834. | Library/Homebrew/dependency.rb | @@ -95,8 +95,9 @@ def expand(dependent, deps = dependent.deps, &block)
end
end
- @expand_stack.pop
merge_repeats(expanded_deps)
+ ensure
+ @expand_stack.pop
end
def action(dependent, dep, &_block) | false |
Other | Homebrew | brew | e94546121284c6178385ebb2a74a84d04632ce51.json | Tips-N'-Tricks: fix symlink for zsh completion
From `Library/Contributions/brew_zsh_completion.zsh`:
````bash
````
Then it should give symlinked file name of `_brew` instead of being just `brew_zsh_completion.zsh`
Closes Homebrew/homebrew#48897.
Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com> | share/doc/homebrew/Tips-N'-Tricks.md | @@ -55,7 +55,7 @@ source $(brew --repository)/Library/Contributions/brew_bash_completion.sh
Run in terminal (may require `sudo`):
```zsh
-ln -s "$(brew --prefix)/Library/Contributions/brew_zsh_completion.zsh" /usr/local/share/zsh/site-functions
+ln -s "$(brew --prefix)/Library/Contributions/brew_zsh_completion.zsh"... | false |
Other | Homebrew | brew | 268fa841deec9d18bfa0e16b109b7cf0d08099ec.json | tests: fix simplecov handling in integration tests
Closes Homebrew/homebrew#48250.
Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr> | Library/Homebrew/test/test_integration_cmds.rb | @@ -30,7 +30,14 @@ def cmd_output(*args)
-rconfig
-rintegration_mocks
]
- cmd_args << "-rsimplecov" if ENV["HOMEBREW_TESTS_COVERAGE"]
+ if ENV["HOMEBREW_TESTS_COVERAGE"]
+ # This is needed only because we currently use a patched version of
+ # simplecov, and gems installed through git... | false |
Other | Homebrew | brew | aec4e0723a909f3db42475d3c97bb5204aeaffef.json | tests: track all files | Library/Homebrew/test/.simplecov | @@ -11,6 +11,13 @@ SimpleCov.start do
add_filter "Homebrew/compat/"
add_filter "Homebrew/test/"
add_filter "Homebrew/vendor/"
+ add_filter "Taps/"
+
+ # Not using this during integration tests makes the tests 4x times faster
+ # without changing the coverage.
+ unless ENV["HOMEBREW_INTEGRATION_TEST"]
+ ... | false |
Other | Homebrew | brew | abf81f98454555f7d2254b27b67abe73e833e65e.json | tests: use our patched simplecov, bump coveralls
We must bump coveralls otherwise we get a conflicting dependency: we use
a patched simplecov v0.11.1 but coveralls 0.8.9 needs simplecov 0.10.x. | Library/Homebrew/test/Gemfile | @@ -3,5 +3,16 @@ source "https://rubygems.org"
gem "mocha", "~> 1.1"
gem "minitest", "~> 5.3"
gem "rake", "~> 10.3"
-gem "simplecov", "~> 0.10.0", :require => false
-gem "coveralls", "0.8.9", :require => false
+# This is a patched version of the v0.11.2. Switch back to the stable version
+# when #436 has been merged... | true |
Other | Homebrew | brew | abf81f98454555f7d2254b27b67abe73e833e65e.json | tests: use our patched simplecov, bump coveralls
We must bump coveralls otherwise we get a conflicting dependency: we use
a patched simplecov v0.11.1 but coveralls 0.8.9 needs simplecov 0.10.x. | Library/Homebrew/test/Gemfile.lock | @@ -1,27 +1,33 @@
+GIT
+ remote: https://github.com/Homebrew/simplecov.git
+ revision: 4c7642496e902ba9028a74500971e40b3e3aaa29
+ branch: tracked-files-root-fix
+ specs:
+ simplecov (0.11.2)
+ docile (~> 1.1.0)
+ json (~> 1.8)
+ simplecov-html (~> 0.10.0)
+
GEM
remote: https://rubygems.org/
... | true |
Other | Homebrew | brew | d45467172d385f56a660e999f1df97e7fb21d98b.json | tests: enforce min. 40% coverage | Library/Homebrew/test/.simplecov | @@ -3,7 +3,7 @@
SimpleCov.start do
tests_path = File.dirname(__FILE__)
- minimum_coverage 60
+ minimum_coverage 40
coverage_dir File.expand_path("#{tests_path}/coverage")
root File.expand_path("#{tests_path}/../../")
| false |
Other | Homebrew | brew | 49990ee93fddb74cb36cec8d7b17946a853ed39c.json | ENV: use HOMEBREW_RUBY_PATH in compiler/SCM shims
Use the same interpreter for the shims that is also used to run the main
Homebrew process (the one invoked via `brew`). The magic basically lies
in executing `ruby` with the `-x` option (supported since at least 1.8)
and in the following shebang line. | Library/ENV/4.3/cc | @@ -1,6 +1,8 @@
-#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby -W0
+#!/bin/sh
+# Make sure this shim uses the same Ruby interpreter that is used by Homebrew.
+exec "$HOMEBREW_RUBY_PATH" -x "$0" "$@"
+#!/usr/bin/env ruby -W0
-$:.unshift Dir["/System/Library/Frameworks/Ruby.framework/Version... | true |
Other | Homebrew | brew | 49990ee93fddb74cb36cec8d7b17946a853ed39c.json | ENV: use HOMEBREW_RUBY_PATH in compiler/SCM shims
Use the same interpreter for the shims that is also used to run the main
Homebrew process (the one invoked via `brew`). The magic basically lies
in executing `ruby` with the `-x` option (supported since at least 1.8)
and in the following shebang line. | Library/ENV/scm/git | @@ -1,4 +1,8 @@
-#!/usr/bin/ruby -W0
+#!/bin/sh
+# Make sure this shim uses the same Ruby interpreter that is used by Homebrew.
+exec "$HOMEBREW_RUBY_PATH" -x "$0" "$@"
+#!/usr/bin/env ruby -W0
+
# This script because we support $GIT, $HOMEBREW_SVN, etc. and Xcode-only
# configurations. Order is careful to be what th... | true |
Other | Homebrew | brew | 12a452557d7695dba69f488a95a77a2650d28251.json | make HOMEBREW_BREW_FILE a Pathname object
Currently HOMEBREW_BREW_FILE is a String, while other of HOMEBREW_*
variables are all Pathname. This commit unifies them all as Pathname,
so it will not cause any confusion.
Closes Homebrew/homebrew#48872.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/config.rb | @@ -26,8 +26,9 @@ def mkpath
# Where brews installed via URL are cached
HOMEBREW_CACHE_FORMULA = HOMEBREW_CACHE+"Formula"
-HOMEBREW_BREW_FILE = ENV["HOMEBREW_BREW_FILE"]
-unless HOMEBREW_BREW_FILE
+if ENV["HOMEBREW_BREW_FILE"]
+ HOMEBREW_BREW_FILE = Pathname.new(ENV["HOMEBREW_BREW_FILE"])
+else
odie "HOMEBREW_B... | true |
Other | Homebrew | brew | 12a452557d7695dba69f488a95a77a2650d28251.json | make HOMEBREW_BREW_FILE a Pathname object
Currently HOMEBREW_BREW_FILE is a String, while other of HOMEBREW_*
variables are all Pathname. This commit unifies them all as Pathname,
so it will not cause any confusion.
Closes Homebrew/homebrew#48872.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/extend/fileutils.rb | @@ -17,8 +17,8 @@ def mktemp(prefix = name)
# Reference from `man 2 open`
# > When a new file is created, it is given the group of the directory which
# contains it.
- group_id = if File.grpowned? HOMEBREW_BREW_FILE
- File.stat(HOMEBREW_BREW_FILE).gid
+ group_id = if HOMEBREW_BREW_FILE.grpowne... | true |
Other | Homebrew | brew | 12a452557d7695dba69f488a95a77a2650d28251.json | make HOMEBREW_BREW_FILE a Pathname object
Currently HOMEBREW_BREW_FILE is a String, while other of HOMEBREW_*
variables are all Pathname. This commit unifies them all as Pathname,
so it will not cause any confusion.
Closes Homebrew/homebrew#48872.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/formula.rb | @@ -871,7 +871,7 @@ def skip_clean?(path)
# @private
def link_overwrite?(path)
# Don't overwrite files not created by Homebrew.
- return false unless path.stat.uid == File.stat(HOMEBREW_BREW_FILE).uid
+ return false unless path.stat.uid == HOMEBREW_BREW_FILE.stat.uid
# Don't overwrite files belong... | true |
Other | Homebrew | brew | 12a452557d7695dba69f488a95a77a2650d28251.json | make HOMEBREW_BREW_FILE a Pathname object
Currently HOMEBREW_BREW_FILE is a String, while other of HOMEBREW_*
variables are all Pathname. This commit unifies them all as Pathname,
so it will not cause any confusion.
Closes Homebrew/homebrew#48872.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/test/lib/config.rb | @@ -1,7 +1,7 @@
require "tmpdir"
require "pathname"
-HOMEBREW_BREW_FILE = ENV["HOMEBREW_BREW_FILE"]
+HOMEBREW_BREW_FILE = Pathname.new(ENV["HOMEBREW_BREW_FILE"])
HOMEBREW_TEMP = Pathname.new(ENV["HOMEBREW_TEMP"] || Dir.tmpdir)
TEST_TMPDIR = ENV.fetch("HOMEBREW_TEST_TMPDIR") { |k| | true |
Other | Homebrew | brew | 12a452557d7695dba69f488a95a77a2650d28251.json | make HOMEBREW_BREW_FILE a Pathname object
Currently HOMEBREW_BREW_FILE is a String, while other of HOMEBREW_*
variables are all Pathname. This commit unifies them all as Pathname,
so it will not cause any confusion.
Closes Homebrew/homebrew#48872.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/brew.rb | @@ -104,7 +104,7 @@ def require?(path)
end
if possible_tap && !possible_tap.installed?
- brew_uid = File.stat(HOMEBREW_BREW_FILE).uid
+ brew_uid = HOMEBREW_BREW_FILE.stat.uid
tap_commands = []
if Process.uid.zero? && !brew_uid.zero?
tap_commands += %W[/usr/bin/sudo -u ##{bre... | true |
Other | Homebrew | brew | 58cf0ec2b908d4bcd12d77036ef8eac60ee95697.json | audit: add check for insecure hackage urls | Library/Homebrew/cmd/audit.rb | @@ -1126,6 +1126,7 @@ def audit_urls
%r{^http://www\.mirrorservice\.org/},
%r{^http://launchpad\.net/},
%r{^http://bitbucket\.org/},
+ %r{^http://hackage\.haskell\.org/},
%r{^http://(?:[^/]*\.)?archive\.org}
problem "Please use https:// for #{p}"
... | false |
Other | Homebrew | brew | 984a70e6e22241d0a9be21d333dca1757b2a3bfa.json | use BSD stat
Closes Homebrew/homebrew#48803. | bin/brew | @@ -141,7 +141,7 @@ elif [[ -n "$HOMEBREW_DEVELOPER" && -f "$HOMEBREW_LIBRARY/Homebrew/dev-cmd/$HOME
HOMEBREW_BASH_COMMAND="$HOMEBREW_LIBRARY/Homebrew/dev-cmd/$HOMEBREW_COMMAND.sh"
fi
-if [[ "$(id -u)" = "0" && "$(stat -f%u "$HOMEBREW_BREW_FILE")" != "0" ]]
+if [[ "$(id -u)" = "0" && "$(/usr/bin/stat -f%u "$HOMEB... | false |
Other | Homebrew | brew | 35e2209c10ffcf6a666ac4a8051a1f20801895ea.json | architecture_list: add new module.
remove old mach.rb, replace with cctools_mach.rb and prune ELF case
move ArchitectureListExtension to separate file ELF support is
maintained in Linuxbrew | Library/Homebrew/os/mac/architecture_list.rb | @@ -0,0 +1,52 @@
+module ArchitectureListExtension
+ # @private
+ def fat?
+ length > 1
+ end
+
+ # @private
+ def intel_universal?
+ intersects_all?(Hardware::CPU::INTEL_32BIT_ARCHS, Hardware::CPU::INTEL_64BIT_ARCHS)
+ end
+
+ # @private
+ def ppc_universal?
+ intersects_all?(Hardware::CPU::PPC_32BIT_... | true |
Other | Homebrew | brew | 35e2209c10ffcf6a666ac4a8051a1f20801895ea.json | architecture_list: add new module.
remove old mach.rb, replace with cctools_mach.rb and prune ELF case
move ArchitectureListExtension to separate file ELF support is
maintained in Linuxbrew | Library/Homebrew/os/mac/cctools_mach.rb | @@ -1,57 +1,6 @@
-module ArchitectureListExtension
- # @private
- def fat?
- length > 1
- end
-
- # @private
- def intel_universal?
- intersects_all?(Hardware::CPU::INTEL_32BIT_ARCHS, Hardware::CPU::INTEL_64BIT_ARCHS)
- end
-
- # @private
- def ppc_universal?
- intersects_all?(Hardware::CPU::PPC_32BIT_... | true |
Other | Homebrew | brew | 37e423ebb2885f9f5799b9914357124b98e79643.json | os/mac/hardware: add Skylake CPU.
Closes Homebrew/homebrew#48781.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/os/mac/hardware.rb | @@ -48,6 +48,8 @@ def family
:haswell
when 0x582ed09c # Broadwell
:broadwell
+ when 0x37fc219f # Skylake
+ :skylake
else
:dunno
end | true |
Other | Homebrew | brew | 37e423ebb2885f9f5799b9914357124b98e79643.json | os/mac/hardware: add Skylake CPU.
Closes Homebrew/homebrew#48781.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/test/test_hardware.rb | @@ -7,7 +7,7 @@ def test_hardware_cpu_type
end
def test_hardware_intel_family
- families = [:core, :core2, :penryn, :nehalem, :arrandale, :sandybridge, :ivybridge, :haswell, :broadwell]
+ families = [:core, :core2, :penryn, :nehalem, :arrandale, :sandybridge, :ivybridge, :haswell, :broadwell, :skylake]
... | true |
Other | Homebrew | brew | 87ee0ab3afb407e74162f8b300df5ef14b664916.json | doc: fix typos in Formula Cookbook
`preprended` > `prepended`
Replace `a` with `an`
`throughly` > `thoroughly`
Remove extra `consider`
Closes Homebrew/homebrew#48697.
Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com> | share/doc/homebrew/Formula-Cookbook.md | @@ -74,7 +74,7 @@ so you can override this with `brew create <url> --set-name <name>`.
A SSL/TLS (https) [`homepage`](http://www.rubydoc.info/github/Homebrew/homebrew/master/Formula#homepage%3D-class_method) is preferred, if one is available.
-Try to summarize from the [`homepage`](http://www.rubydoc.info/github/H... | false |
Other | Homebrew | brew | 6cccc2d0fefe2474fb34e44c849ce0c0375c3a88.json | tests: remove unnecessary code | Library/Homebrew/test/test_integration_cmds.rb | @@ -267,13 +267,12 @@ class Testball < Formula
def test_desc
formula_file = CoreFormulaRepository.new.formula_dir/"testball.rb"
- content = <<-EOS.undent
+ formula_file.write <<-EOS.undent
class Testball < Formula
desc "Some test"
url "https://example.com/testball-0.1.tar.gz"
... | false |
Other | Homebrew | brew | cdd990f9d70b83956d931b4f48d6f9c3ba53023a.json | audit: use start_with? to check the name in the desc | Library/Homebrew/cmd/audit.rb | @@ -411,7 +411,7 @@ def audit_desc
problem "Description shouldn't start with an indefinite article (#{$1})"
end
- if desc =~ /^#{formula.name}\s/i
+ if desc.downcase.start_with? "#{formula.name} "
problem "Description shouldn't include the formula name"
end
end | false |
Other | Homebrew | brew | 5b89c33cac47cb01f63c0a3593ea48d22087802f.json | pull: fix ambiguity issues for tap migrations
`Formula[name]` gets called with an unqualified name and thus will throw
`TapFormulaAmbiguityError` exceptions (silently ignored) if both the old
and the new tap are present and changes for the new tap are pulled
before the migrated formulae are removed from the old tap.
... | Library/Homebrew/cmd/pull.rb | @@ -100,7 +100,7 @@ def pull
"git", "diff-tree", "-r", "--name-only",
"--diff-filter=AM", revision, "HEAD", "--", tap.formula_dir.to_s
).each_line do |line|
- name = File.basename(line.chomp, ".rb")
+ name = "#{tap.name}/#{File.basename(line.chomp, ".rb")}"
begin
... | false |
Other | Homebrew | brew | 604323e641ccd0b125716f4a337b1f9384236716.json | brew.rb: use $stderr for debug and errors.
Closes Homebrew/homebrew#48634.
Closes Homebrew/homebrew#48681.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/brew.rb | @@ -75,7 +75,11 @@ def require?(path)
if empty_argv || (help_flag && (cmd.nil? || internal_cmd))
# TODO: - `brew help cmd` should display subcommand help
require "cmd/help"
- puts ARGV.usage
+ if empty_argv
+ $stderr.puts ARGV.usage
+ else
+ puts ARGV.usage
+ end
exit ARGV.any? ?... | false |
Other | Homebrew | brew | 40a287f3c3d09a12b92b5594e09331b9998c5075.json | config.rb: add comment explaining HOMEBREW_TEMP logic | Library/Homebrew/config.rb | @@ -45,6 +45,7 @@ def mkpath
HOMEBREW_LOGS = Pathname.new(ENV["HOMEBREW_LOGS"] || "~/Library/Logs/Homebrew/").expand_path
+# Must use /tmp instead of $TMPDIR because long paths break Unix domain sockets
HOMEBREW_TEMP = Pathname.new(ENV.fetch("HOMEBREW_TEMP", "/tmp"))
unless defined? HOMEBREW_LIBRARY_PATH | false |
Other | Homebrew | brew | c6e0c9538fdb2a5463bcb28eaa5586cebcb9000b.json | test_cmd_audit: add resource placement test | Library/Homebrew/test/test_cmd_audit.rb | @@ -156,6 +156,23 @@ class Foo < Formula
fa.problems
end
+ def test_audit_file_strict_resource_placement
+ fa = formula_auditor "foo", <<-EOS.undent, :strict => true
+ class Foo < Formula
+ url "https://example.com/foo-1.0.tgz"
+
+ resource "foo2" do
+ url "https://example.co... | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.