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 | a412b49c2ce23d0b917f5c08e0cb453a042c1b26.json | Fix dependency equality | Library/Homebrew/dependencies.rb | @@ -10,7 +10,7 @@ def each(*args, &block)
end
def <<(o)
- @deps << o unless include?(o)
+ @deps << o
self
end
| true |
Other | Homebrew | brew | a412b49c2ce23d0b917f5c08e0cb453a042c1b26.json | Fix dependency equality | Library/Homebrew/dependency.rb | @@ -20,12 +20,12 @@ def to_s
end
def ==(other)
- instance_of?(other.class) && name == other.name
+ instance_of?(other.class) && name == other.name && tags == other.tags
end
alias_method :eql?, :==
def hash
- name.hash
+ name.hash ^ tags.hash
end
def to_formula
@@ -118,12 +118,11 @... | true |
Other | Homebrew | brew | a412b49c2ce23d0b917f5c08e0cb453a042c1b26.json | Fix dependency equality | Library/Homebrew/test/test_dependencies.rb | @@ -12,13 +12,6 @@ def test_shovel_returns_self
assert_same @deps, @deps << Dependency.new("foo")
end
- def test_no_duplicate_deps
- @deps << Dependency.new("foo")
- @deps << Dependency.new("foo", [:build])
- @deps << Dependency.new("foo", [:build])
- assert_equal 1, @deps.count
- end
-
def t... | true |
Other | Homebrew | brew | a412b49c2ce23d0b917f5c08e0cb453a042c1b26.json | Fix dependency equality | Library/Homebrew/test/test_dependency.rb | @@ -47,5 +47,8 @@ def test_equality
assert_eql foo1, foo2
refute_equal foo1, bar
refute_eql foo1, bar
+ foo3 = Dependency.new("foo", [:build])
+ refute_equal foo1, foo3
+ refute_eql foo1, foo3
end
end | true |
Other | Homebrew | brew | a412b49c2ce23d0b917f5c08e0cb453a042c1b26.json | Fix dependency equality | Library/Homebrew/test/test_dependency_collector.rb | @@ -37,13 +37,6 @@ def test_dependency_tags
assert_empty Dependency.new('foo').tags
end
- def test_no_duplicate_dependencies
- @d.add 'foo'
- @d.add 'foo' => :build
- assert_equal 1, @d.deps.count
- assert_empty find_dependency("foo").tags
- end
-
def test_requirement_creation
@d.add :x1... | true |
Other | Homebrew | brew | a412b49c2ce23d0b917f5c08e0cb453a042c1b26.json | Fix dependency equality | Library/Homebrew/test/test_dependency_expansion.rb | @@ -100,16 +100,15 @@ def test_skip_skips_parent_but_yields_children
end
def test_keep_dep_but_prune_recursive_deps
- f = stub(:name => "f", :deps => [
- build_dep(:foo, [:build], [@bar]),
- build_dep(:baz, [:build]),
- ])
+ foo = build_dep(:foo, [:build], @bar)
+ baz = build_dep(:baz, [:b... | true |
Other | Homebrew | brew | 1a1f9aa323ae03ac59ae5ba4c006ef459a586b68.json | Improve inspect output for dependency collections | Library/Homebrew/dependencies.rb | @@ -51,6 +51,10 @@ def ==(other)
deps == other.deps
end
alias_method :eql?, :==
+
+ def inspect
+ "#<#{self.class.name}: #{to_a.inspect}>"
+ end
end
class Requirements | false |
Other | Homebrew | brew | 395d798bc293aae877a92f9535c5621fea226876.json | brew-test-bot: check default_formula requirements.
This handles the case where e.g. a default_formula cannot be installed
on Yosemite which causes the build to fail. | Library/Homebrew/cmd/test-bot.rb | @@ -322,18 +322,25 @@ def skip formula_name
puts "#{Tty.blue}==>#{Tty.white} SKIPPING: #{formula_name}#{Tty.reset}"
end
- def satisfied_requirements? formula, spec
+ def satisfied_requirements? formula, spec, dependency=nil
requirements = formula.send(spec).requirements
unsatisfied_r... | false |
Other | Homebrew | brew | da3c9a1e167ec4f1d819bae0296e4567c3425078.json | brew-pull: make close message detection more precise. | Library/Homebrew/cmd/pull.rb | @@ -132,7 +132,7 @@ def pull
end
# If this is a pull request, append a close message.
- unless message.include? 'Closes #'
+ unless message.include? "Closes ##{issue}."
message += "\nCloses ##{issue}."
safe_system 'git', 'commit', '--amend', '--signoff', '-q', '-m... | false |
Other | Homebrew | brew | aa406df68cb8c5589039b3d82ed9e29c2ac2593a.json | Remove services from zsh completion
Closes Homebrew/homebrew#34230.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Contributions/brew_zsh_completion.zsh | @@ -22,10 +22,6 @@ _brew_outdated_formulae() {
outdated_formulae=(`brew outdated`)
}
-_brew_running_services() {
- running_services=(`brew services list | awk '{print $1}'`)
-}
-
local -a _1st_arguments
_1st_arguments=(
'audit:check formulae for Homebrew coding style'
@@ -52,7 +48,6 @@ _1st_arguments=(
'... | false |
Other | Homebrew | brew | 8e68a9724de109fe08293c9d35f422d78caa341d.json | Tell brew doctor to ignore libTrAPI.dylib
Tell brew doctor to ignore libTrAPI.dylib
TrAPI used by VPN software "Endpoint Security VPN"
Closes Homebrew/homebrew#34129.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/cmd/doctor.rb | @@ -124,6 +124,7 @@ def check_for_stray_dylibs
"libmacfuse_i64.2.dylib", # OSXFuse MacFuse compatibility layer
"libosxfuse_i32.2.dylib", # OSXFuse
"libosxfuse_i64.2.dylib", # OSXFuse
+ "libTrAPI.dylib", # TrAPI
]
__check_stray_files "/usr/local/lib", "*.dylib", white_list, <<-EOS.undent | false |
Other | Homebrew | brew | b89123d487673df623ebbba8aac61b29d2f9470f.json | os: shorten troubleshooting URL. | Library/Homebrew/os.rb | @@ -8,7 +8,7 @@ def self.linux?
end
if OS.mac?
- ISSUES_URL = "https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Troubleshooting.md#troubleshooting"
+ ISSUES_URL = "http://git.io/brew-troubleshooting"
PATH_OPEN = "/usr/bin/open"
elsif OS.linux?
ISSUES_URL = "https://github.c... | false |
Other | Homebrew | brew | 9dfc5e39e8f6898588df6c31823c0deb3b0c7f80.json | Fix Requirement equality | Library/Homebrew/requirement.rb | @@ -75,9 +75,10 @@ def env_proc
self.class.env_proc
end
- def eql?(other)
+ def ==(other)
instance_of?(other.class) && name == other.name && tags == other.tags
end
+ alias_method :eql?, :==
def hash
name.hash ^ tags.hash | true |
Other | Homebrew | brew | 9dfc5e39e8f6898588df6c31823c0deb3b0c7f80.json | Fix Requirement equality | Library/Homebrew/test/test_requirement.rb | @@ -129,12 +129,14 @@ def test_modify_build_environment_without_env_proc
def test_eql
a, b = Requirement.new, Requirement.new
+ assert_equal a, b
assert_eql a, b
assert_equal a.hash, b.hash
end
def test_not_eql
a, b = Requirement.new([:optional]), Requirement.new
+ refute_equal a,... | true |
Other | Homebrew | brew | e537fc41de8baad61c9296d8628a9feb6edb4385.json | Exclude documentation from `brew list --unbrewed` | Library/Homebrew/cmd/list.rb | @@ -31,6 +31,7 @@ def list
lib/gio/*
lib/node_modules/*
lib/python[23].[0-9]/*
+ share/doc/homebrew/*
share/info/dir
share/man/man1/brew.1
share/man/whatis | false |
Other | Homebrew | brew | ab0368cb3422648ed38d7d4dee183f3dd7dc66bb.json | test-bot: make variable names consistent with other code | Library/Homebrew/cmd/test-bot.rb | @@ -298,12 +298,12 @@ def single_commit? start_revision, end_revision
end
end
- def skip formula
- puts "#{Tty.blue}==>#{Tty.white} SKIPPING: #{formula}#{Tty.reset}"
+ def skip formula_name
+ puts "#{Tty.blue}==>#{Tty.white} SKIPPING: #{formula_name}#{Tty.reset}"
end
- def satisf... | false |
Other | Homebrew | brew | 0578f1ff5a5234a4e7ca59c49dc0b0bb414cb78a.json | Pull initialization code out of begin block | Library/Homebrew/extend/pathname.rb | @@ -106,27 +106,29 @@ def binread(*open_args)
def atomic_write content
require "tempfile"
tf = Tempfile.new(basename.to_s, dirname)
- tf.binmode
- tf.write(content)
-
begin
- old_stat = stat
- rescue Errno::ENOENT
- old_stat = default_stat
- end
+ tf.binmode
+ tf.write(... | false |
Other | Homebrew | brew | b34fa6cfd870e23c3876394509ed0a5be6c70b1e.json | Use libexec method in install test | Library/Homebrew/test/test_formula_install.rb | @@ -35,9 +35,8 @@ def test_a_basic_install
assert_predicate f.bin, :directory?
assert_equal 3, f.bin.children.length
- libexec = f.prefix+'libexec'
- assert_predicate libexec, :directory?
- assert_equal 1, libexec.children.length
+ assert_predicate f.libexec, :directory?
+ asser... | false |
Other | Homebrew | brew | 3b1a1962f7cd4bd44a5e4de0098129ee1dce6dc6.json | Remove outdated comment | Library/Homebrew/formula.rb | @@ -279,8 +279,6 @@ def brew
stage do
begin
patch
- # we allow formulae to do anything they want to the Ruby process
- # so load any deps before this point! And exit asap afterwards
yield self
ensure
cp Dir["config.log", "CMakeCache.txt"], HOMEBREW_LOGS+name | false |
Other | Homebrew | brew | d78769743d66c2af3039c85cda69382945691abd.json | Fix broken link in Acceptable Formulae
The link to the Homebrew dupes repo was broken because of a typo.
Closes Homebrew/homebrew#33931.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | share/doc/homebrew/Acceptable-Formulae.md | @@ -36,7 +36,7 @@ There are exceptions:
openssl | OS X's openssl is deprecated
libxml2 | Historically, OS X's libxml2 has been buggy
-We also maintain [a tap](https://github.com/Homebrew/homebrew-dueps) that
+We also maintain [a tap](https://github.com/Homebrew/homebrew-dupes) that
contains man... | false |
Other | Homebrew | brew | 2d67c5ee8f7bfe1ac68bde638af852c67816cb7f.json | brew-pull: allow resolution with --resolve. | Library/Homebrew/cmd/pull.rb | @@ -34,8 +34,12 @@ def pull_url url
begin
safe_system 'git', 'am', *patch_args
rescue ErrorDuringExecution
- system 'git', 'am', '--abort'
- odie 'Patch failed to apply: aborted.'
+ if ARGV.include? "--resolve"
+ odie "Patch failed to apply: try to resolve it."
+ else
+ ... | false |
Other | Homebrew | brew | daabf4f5dc3effbaa1efe7275615f6541b65906c.json | keg: add python_pth_files_installed? helper | Library/Homebrew/keg.rb | @@ -230,6 +230,10 @@ def python_site_packages_installed?
path.join("lib", "python2.7", "site-packages").directory?
end
+ def python_pth_files_installed?
+ Dir["#{path}/lib/python2.7/site-packages/*.pth"].any?
+ end
+
def app_installed?
Dir["#{path}/{,libexec/}*.app"].any?
end | false |
Other | Homebrew | brew | b584689afa5683592371458f7d9383d0fea4e8e1.json | language/python: add helper methods for pth detection | Library/Homebrew/language/python.rb | @@ -8,6 +8,10 @@ def self.major_minor_version python
Version.new(version.to_s)
end
+ def self.homebrew_site_packages(version="2.7")
+ HOMEBREW_PREFIX/"lib/python#{version}/site-packages"
+ end
+
def self.each_python build, &block
original_pythonpath = ENV["PYTHONPATH"]
["pyth... | false |
Other | Homebrew | brew | 175336202475325a6a1b13372f93d7d44dd55385.json | Call #name rather than relying on implicit #to_s | Library/Homebrew/cmd/pull.rb | @@ -110,7 +110,7 @@ def pull
unless ARGV.include?('--bottle')
changed_formulae.each do |f|
next unless f.bottle
- opoo "#{f} has a bottle: do you need to update it with --bottle?"
+ opoo "#{f.name} has a bottle: do you need to update it with --bottle?"
end
en... | false |
Other | Homebrew | brew | 673f08f17e036b7fa200553ae9a6d0a9f73ca4ac.json | audit: compare file mode directly | Library/Homebrew/cmd/audit.rb | @@ -95,7 +95,7 @@ def initialize(formula)
end
def audit_file
- unless formula.path.stat.mode.to_s(8) == "100644"
+ unless formula.path.stat.mode == 0100644
problem "Incorrect file permissions: chmod 644 #{formula.path}"
end
| false |
Other | Homebrew | brew | e5e206f4f1c6735e8b9ce0c8378e76ba56141d64.json | Revert "Revert "xcode: use 6.1 on Mavericks.""
This reverts commit 2b472a6e2634a7b7592abb7084b20a098f4a488b. | Library/Homebrew/os/mac/xcode.rb | @@ -13,7 +13,7 @@ def latest_version
when "10.6" then "3.2.6"
when "10.7" then "4.6.3"
when "10.8" then "5.1.1"
- when "10.9" then "6.0.1"
+ when "10.9" then "6.1"
when "10.10" then "6.1"
else
# Default to newest known version of Xcode for unrel... | false |
Other | Homebrew | brew | 6545e6dad3081baac176e1519206b2b9de7ff233.json | Remove unreachable branch
Requirements meeting this condition are skipped by the first branch
on the caller side:
https://github.com/Homebrew/homebrew/blob/6c54de812f00658404501719d315202a5551cc1b/Library/Homebrew/formula_installer.rb | Library/Homebrew/formula_installer.rb | @@ -237,7 +237,6 @@ def check_requirements(req_map)
def install_requirement_default_formula?(req, dependent, build)
return false unless req.default_formula?
- return false if build.without?(req) && (req.recommended? || req.optional?)
return true unless req.satisfied?
install_bottle_for?(dependent... | false |
Other | Homebrew | brew | 27f2aa5f2c0a9ee5679fcbd5cd6f0d31a6b0bd29.json | Reduce explicit branches in dependency expansion | Library/Homebrew/formula_installer.rb | @@ -69,7 +69,8 @@ def pour_bottle? install_bottle_options={:warn=>false}
true
end
- def install_bottle_for_dep?(dep, build)
+ def install_bottle_for?(dep, build)
+ return pour_bottle? if dep == f
return false if build_from_source?
return false unless dep.bottle && dep.pour_bottle?
return f... | false |
Other | Homebrew | brew | d494c9db8e24740d87c0717ed35ca8731f7e209b.json | Use start_with? instead of regexp | Library/Homebrew/cmd/doctor.rb | @@ -661,7 +661,7 @@ def check_for_config_scripts
paths.each do |p|
next if whitelist.include? p.downcase
- next if p =~ %r[^(#{real_cellar.to_s}|#{HOMEBREW_CELLAR.to_s})]
+ next if p.start_with?(real_cellar.to_s, HOMEBREW_CELLAR.to_s)
configs = Dir["#{p}/*-config"]
config_scripts << [p, conf... | false |
Other | Homebrew | brew | 92e68049d1e09757d498021426a650dfc6405cc3.json | formula_installer: set exit code to failed always.
If we say something failed we should communicate that through the exit
code for the bot and scripts. | Library/Homebrew/formula_installer.rb | @@ -524,6 +524,7 @@ def link(keg)
onoe "Failed to create #{f.opt_prefix}"
puts "Things that depend on #{f.name} will probably not build."
puts e
+ Homebrew.failed = true
end
return
end
@@ -544,6 +545,7 @@ def link(keg)
mode = OpenStruct.new(:dry_run => true, :... | false |
Other | Homebrew | brew | 56aec9494cbe76849140da5b2c4c33c2b42dbbef.json | Fix filename case | Library/Homebrew/test/test_patching.rb | @@ -99,7 +99,7 @@ def test_patch_array
def patches
[PATCH_URL_A]
end
- end.brew { assert_patched 'libexec/noop' }
+ end.brew { assert_patched 'libexec/NOOP' }
end
end
@@ -109,7 +109,7 @@ def test_patch_hash
def patches
{ :p1 => PATCH_URL_A }
... | false |
Other | Homebrew | brew | 3e8c6c8e67b8296b013c535e6d46da6238345236.json | brew-test-bot: start generalization of uploaders. | Library/Homebrew/cmd/test-bot.rb | @@ -543,7 +543,7 @@ def test_bot
ENV['HOMEBREW_LOGS'] = "#{Dir.pwd}/logs"
end
- if ARGV.include? '--ci-pr-upload' or ARGV.include? '--ci-testing-upload'
+ if ARGV.include? '--ci-upload' or ARGV.include? '--ci-pr-upload' or ARGV.include? '--ci-testing-upload'
jenkins = ENV['JENKINS_HOME']
... | false |
Other | Homebrew | brew | d8c34e83b751d8e0cd895985ea2a2cb3eba90d29.json | Add unsigned kext requirement.
Creates a new requirement that dictates packages are unable to install due to requiring a signed kext to function.
Closes Homebrew/homebrew#33404.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/requirements.rb | @@ -2,11 +2,12 @@
require 'requirements/fortran_dependency'
require 'requirements/language_module_dependency'
require 'requirements/minimum_macos_requirement'
+require 'requirements/maximum_macos_requirement'
require 'requirements/mpi_dependency'
require 'requirements/osxfuse_dependency'
require 'requirements/pyt... | true |
Other | Homebrew | brew | d8c34e83b751d8e0cd895985ea2a2cb3eba90d29.json | Add unsigned kext requirement.
Creates a new requirement that dictates packages are unable to install due to requiring a signed kext to function.
Closes Homebrew/homebrew#33404.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/requirements/unsigned_kext_requirement.rb | @@ -0,0 +1,16 @@
+require 'requirement'
+
+class UnsignedKextRequirement < Requirement
+ fatal true
+
+ satisfy { MacOS.version < :yosemite }
+
+ def message
+ <<-EOS.undent
+ OS X Mavericks or older is required for this package.
+ OS X Yosemite introduced a strict unsigned kext ban which breaks this pa... | true |
Other | Homebrew | brew | 93f7f2e9507763816ce1ccbf518c4cbeda31d85a.json | Add security contact | CONTRIBUTING.md | @@ -9,6 +9,10 @@ Second, read the [Troubleshooting Checklist](https://github.com/Homebrew/homebre
**If you don't read these it will take us far longer to help you with your problem.**
+Security
+--------
+Please report security issues to security@brew.sh.
+
Contributing
------------
Please read: | true |
Other | Homebrew | brew | 93f7f2e9507763816ce1ccbf518c4cbeda31d85a.json | Add security contact | README.md | @@ -21,6 +21,10 @@ Second, read the [Troubleshooting Checklist](https://github.com/Homebrew/homebre
**If you don't read these it will take us far longer to help you with your problem.**
+Security
+--------
+Please report security issues to security@brew.sh.
+
Who Are You?
------------
Homebrew's current maintai... | true |
Other | Homebrew | brew | f29376c867571c2416ef698ad11421a212caeb68.json | Revert "xcode: use 6.1 on Mavericks."
Pending resolution of Homebrew/homebrew#33431.
This reverts commit bf434e2f7d18ba7d77ac15d54a43c555bc4019c8. | Library/Homebrew/os/mac/xcode.rb | @@ -13,7 +13,7 @@ def latest_version
when "10.6" then "3.2.6"
when "10.7" then "4.6.3"
when "10.8" then "5.1.1"
- when "10.9" then "6.1"
+ when "10.9" then "6.0.1"
when "10.10" then "6.1"
else
# Default to newest known version of Xcode for unrel... | false |
Other | Homebrew | brew | 5c3c728c47599968e1d6a4167c046ea5f608df25.json | xcode: use 6.1 on Mavericks.
Closes Homebrew/homebrew#33399.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/os/mac/xcode.rb | @@ -13,7 +13,7 @@ def latest_version
when "10.6" then "3.2.6"
when "10.7" then "4.6.3"
when "10.8" then "5.1.1"
- when "10.9" then "6.0.1"
+ when "10.9" then "6.1"
when "10.10" then "6.1"
else
# Default to newest known version of Xcode for unrel... | false |
Other | Homebrew | brew | b4e8e85d23d164bc29479b4877660fc1653ce270.json | remove ext from autocomplete | Library/Contributions/brew_bash_completion.sh | @@ -458,9 +458,6 @@ _brew ()
done
if [[ $i -eq $COMP_CWORD ]]; then
- local ext=$(\ls -p $(brew --repository)/Library/Contributions/cmd \
- 2>/dev/null | sed -e "s/\.rb//g" -e "s/brew-//g" \
- -e "s/.*\///g")
__brewcomp "
--cache --cellar
... | false |
Other | Homebrew | brew | dfda2b5d6d254ba51a6f149645f22c2fcd090336.json | remove versions from autocomplete | Library/Contributions/brew_bash_completion.sh | @@ -500,7 +500,6 @@ _brew ()
update
upgrade
uses
- versions
$ext
"
return
@@ -538,7 +537,6 @@ _brew ()
update) _brew_update ;;
upgrade) _brew_upgrade ;;
uses) ... | false |
Other | Homebrew | brew | 55e0f40d020062a03a56a50cc67c65c3dfea78c0.json | Handle broken symlinks in resolve_any_conflicts
Fixes Homebrew/homebrew#33328. | Library/Homebrew/keg.rb | @@ -328,11 +328,20 @@ def resolve_any_conflicts dst, mode
return unless dst.symlink?
src = dst.resolved_path
+
# src itself may be a symlink, so check lstat to ensure we are dealing with
# a directory, and not a symlink pointing at a directory (which needs to be
# treated as a file). In other... | true |
Other | Homebrew | brew | 55e0f40d020062a03a56a50cc67c65c3dfea78c0.json | Handle broken symlinks in resolve_any_conflicts
Fixes Homebrew/homebrew#33328. | Library/Homebrew/test/test_keg.rb | @@ -239,4 +239,20 @@ def test_links_to_symlinks_are_not_removed
a.uninstall
b.uninstall
end
+
+ def test_removes_broken_symlinks_that_conflict_with_directories
+ a = HOMEBREW_CELLAR.join("a", "1.0")
+ a.join("lib", "foo").mkpath
+
+ keg = Keg.new(a)
+
+ link = HOMEBREW_PREFIX.join("lib", "foo"... | true |
Other | Homebrew | brew | 975f61d9818c7be1e711d28eaa75d191470fe834.json | Fix filesystem leak in keg tests | Library/Homebrew/test/test_keg.rb | @@ -226,11 +226,17 @@ def test_links_to_symlinks_are_not_removed
a.join("lib", "example2").make_symlink "example"
b.join("lib", "example2").mkpath
- Keg.new(a).link
+ a = Keg.new(a)
+ b = Keg.new(b)
+ a.link
lib = HOMEBREW_PREFIX.join("lib")
assert_equal 2, lib.children.length
- a... | false |
Other | Homebrew | brew | 6214b9821786302749edf31ecca316d8ccbe0ee1.json | Drop questionable CLT advice
If an outdated Xcode is installed, it really needs to be updated if
possible. Otherwise things that depend on Xcode at build time will have
that dependency satisfied, but will fail to compile. The CLT is enough
if it is installed by itself, in which case Xcode dependencies will not
be sati... | Library/Homebrew/cmd/doctor.rb | @@ -255,9 +255,6 @@ def check_xcode_up_to_date
s += <<-EOS.undent
Xcode 6.1 is required on Yosemite to compile anything (6.0.1 does not include
the 10.10 SDK). You can install it from the App Store.
-
- For some software installing the CLT may be enough:
- xcode-select... | false |
Other | Homebrew | brew | 94f3f345cb5034169eb51c0ffbc662f6ef06e947.json | add audit check for system OpenSSL linkage | Library/Homebrew/formula_cellar_checks.rb | @@ -134,6 +134,23 @@ def check_easy_install_pth lib
EOS
end
+ def check_openssl_links prefix
+ return unless prefix.directory?
+ keg = Keg.new(prefix)
+ system_openssl = keg.mach_o_files.select do |obj|
+ dlls = obj.dynamically_linked_libraries
+ dlls.any? { |dll| /\/usr\/lib\/lib(crypto|s... | false |
Other | Homebrew | brew | 8c6efd8993215dfa8ae73041300d4d538dcb09b3.json | Drop pointless use of CannotInstallFormulaError
These are not caught anywhere, just raise the string. Missed in
1b3b61ff08a4ee5979838f7dbc171e9b38e83f7c. | Library/Homebrew/cmd/install.rb | @@ -28,15 +28,15 @@ def install
ARGV.formulae.each do |f|
# Building head-only without --HEAD is an error
if not ARGV.build_head? and f.stable.nil?
- raise CannotInstallFormulaError, <<-EOS.undent
+ raise <<-EOS.undent
#{f.name} is a head-only formula
Ins... | false |
Other | Homebrew | brew | bb167ef902a431c90404610935c7716e3e0b9a95.json | yardopts: specify "extra" files.
The current .yardopts is treating extra .md files as source code rather
than registering them as "extra files". YARD needs a "-" to separate
source from non-source files.
Closes Homebrew/homebrew#33362.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | .yardopts | @@ -3,5 +3,6 @@
--exclude Library/Homebrew/test/vendor/
--exclude Library/Homebrew/vendor/
Library/Homebrew/**/*.rb
+-
Library/Homebrew/*.md
*.md | false |
Other | Homebrew | brew | f96c6e5c6c1c4ee86be783441ab682135636643c.json | doctor: clarify 10.10 Xcode situation. | Library/Homebrew/cmd/doctor.rb | @@ -246,11 +246,25 @@ def check_for_installed_developer_tools
end
def check_xcode_up_to_date
- if MacOS::Xcode.installed? && MacOS::Xcode.outdated? then <<-EOS.undent
+ if MacOS::Xcode.installed? && MacOS::Xcode.outdated?
+ s = <<-EOS.undent
Your Xcode (#{MacOS::Xcode.version}) is outdated
... | false |
Other | Homebrew | brew | 02e10beb7c79f29d5c8a17d89649af344034d541.json | Add deprecated_option to software_spec.
Allows remapping one option name to another and updates build options
and flags accordingly. | Library/Homebrew/options.rb | @@ -47,6 +47,11 @@ def old_flag
def current_flag
"--#{current}"
end
+
+ def ==(other)
+ instance_of?(other.class) && old == other.old && current == other.current
+ end
+ alias_method :eql?, :==
end
class Options | true |
Other | Homebrew | brew | 02e10beb7c79f29d5c8a17d89649af344034d541.json | Add deprecated_option to software_spec.
Allows remapping one option name to another and updates build options
and flags accordingly. | Library/Homebrew/software_spec.rb | @@ -20,6 +20,7 @@ class SoftwareSpec
attr_reader :name, :owner
attr_reader :build, :resources, :patches, :options
+ attr_reader :deprecated_flags, :deprecated_options
attr_reader :dependency_collector
attr_reader :bottle_specification
attr_reader :compiler_failures
@@ -36,7 +37,10 @@ def initialize
... | true |
Other | Homebrew | brew | 02e10beb7c79f29d5c8a17d89649af344034d541.json | Add deprecated_option to software_spec.
Allows remapping one option name to another and updates build options
and flags accordingly. | Library/Homebrew/test/test_options.rb | @@ -37,6 +37,23 @@ def test_old
def test_current
assert_equal "bar", @deprecated_option.current
end
+
+ def test_old
+ assert_equal "--foo", @deprecated_option.old_flag
+ end
+
+ def test_current
+ assert_equal "--bar", @deprecated_option.current_flag
+ end
+
+ def test_equality
+ foobar = Depr... | true |
Other | Homebrew | brew | 02e10beb7c79f29d5c8a17d89649af344034d541.json | Add deprecated_option to software_spec.
Allows remapping one option name to another and updates build options
and flags accordingly. | Library/Homebrew/test/test_software_spec.rb | @@ -72,6 +72,30 @@ def test_option_description_defaults_to_empty_string
assert_equal "", @spec.options.first.description
end
+ def test_deprecated_option
+ @spec.deprecated_option('foo' => 'bar')
+ assert @spec.deprecated_options.any?
+ assert_equal "foo", @spec.deprecated_options.first.old
+ ass... | true |
Other | Homebrew | brew | da0a65356d662575c0005b70371050b8015227b2.json | Add DeprecatedOption class.
Used to capture options that are being renamed. | Library/Homebrew/options.rb | @@ -32,6 +32,23 @@ def inspect
end
end
+class DeprecatedOption
+ attr_reader :old, :current
+
+ def initialize(old, current)
+ @old = old
+ @current = current
+ end
+
+ def old_flag
+ "--#{old}"
+ end
+
+ def current_flag
+ "--#{current}"
+ end
+end
+
class Options
include Enumerable
| true |
Other | Homebrew | brew | da0a65356d662575c0005b70371050b8015227b2.json | Add DeprecatedOption class.
Used to capture options that are being renamed. | Library/Homebrew/test/test_options.rb | @@ -25,6 +25,20 @@ def test_description
end
end
+class DeprecatedOptionTests < Homebrew::TestCase
+ def setup
+ @deprecated_option = DeprecatedOption.new("foo", "bar")
+ end
+
+ def test_old
+ assert_equal "foo", @deprecated_option.old
+ end
+
+ def test_current
+ assert_equal "bar", @deprecated_opt... | true |
Other | Homebrew | brew | f7bb5190411006ef1f8a7f6e6a4587ecd7eaf70d.json | Add tdsmith as maintainer. | README.md | @@ -23,7 +23,7 @@ Second, read the [Troubleshooting Checklist](https://github.com/Homebrew/homebre
Who Are You?
------------
-Homebrew's current maintainers are [Misty De Meo][mistydemeo], [Adam Vandenberg][adamv], [Jack Nagel][jacknagel], [Mike McQuaid][mikemcquaid] and [Brett Koonce][asparagui].
+Homebrew's curre... | false |
Other | Homebrew | brew | 93c71bafca01fe14e01843572106eb9dcb909609.json | Use YARD for API documentation.
Massive TODO.
We'll get there eventually... | .gitignore | @@ -1,5 +1,6 @@
/*
!/.gitignore
+!/.yardopts
!/Library/
!/CODEOFCONDUCT.md
!/CONTRIBUTING.md | true |
Other | Homebrew | brew | 93c71bafca01fe14e01843572106eb9dcb909609.json | Use YARD for API documentation.
Massive TODO.
We'll get there eventually... | .yardopts | @@ -0,0 +1,4 @@
+--title "Homebrew"
+--main Library/Homebrew/API.md
+Library/Homebrew/**/*.rb
+*.md | true |
Other | Homebrew | brew | 93c71bafca01fe14e01843572106eb9dcb909609.json | Use YARD for API documentation.
Massive TODO.
We'll get there eventually... | Library/Homebrew/.rdoc_options | @@ -1,17 +0,0 @@
---- !ruby/object:RDoc::Options
-encoding: UTF-8
-static_path: []
-rdoc_include:
-- .
-charset: UTF-8
-exclude:
-hyperlink_all: false
-line_numbers: true
-main_page:
-markup: rdoc
-page_dir:
-show_hash: false
-tab_width: 2
-title: Homebrew
-visibility: :protected
-webcvs: | true |
Other | Homebrew | brew | 93c71bafca01fe14e01843572106eb9dcb909609.json | Use YARD for API documentation.
Massive TODO.
We'll get there eventually... | Library/Homebrew/API.md | @@ -0,0 +1,4 @@
+# Homebrew Public API
+We're (finally) working on a documented public API for Homebrew. It's currently a work in progress; a bunch of public stuff is documented and a bunch of private stuff is undocumented. Sorry about that!
+
+The main class you should look at is {Formula}. Assume everything else is p... | true |
Other | Homebrew | brew | 41cc28ca42e1bcaa9716d6c7930ec9c492ffa356.json | Pull conditional out of begin block | Library/Homebrew/formula_installer.rb | @@ -154,16 +154,17 @@ def install
@@attempted << f
- begin
- if pour_bottle? :warn => true
+ if pour_bottle?(:warn => true)
+ begin
pour
+ rescue => e
+ raise if ARGV.homebrew_developer?
+ @pour_failed = true
+ onoe e.message
+ opoo "Bottle installation... | false |
Other | Homebrew | brew | ca2680d77f312ec8bd8c06467adb1d5077fbed81.json | Move some code to the pour method | Library/Homebrew/formula_installer.rb | @@ -158,15 +158,6 @@ def install
if pour_bottle? :warn => true
pour
@poured_bottle = true
-
- CxxStdlib.check_compatibility(
- f, f.recursive_dependencies,
- Keg.new(f.prefix), MacOS.default_compiler
- )
-
- tab = Tab.for_keg f.prefix
- tab.poured_f... | false |
Other | Homebrew | brew | b6631b9a150250c2f381912d3bd360ae1d72974c.json | audit: call puts once instead of problems.size + 2 times | Library/Homebrew/cmd/audit.rb | @@ -22,11 +22,9 @@ def audit
fa.audit
unless fa.problems.empty?
- puts "#{f.name}:"
- fa.problems.each { |p| puts " * #{p}" }
- puts
formula_count += 1
problem_count += fa.problems.size
+ puts "#{f.name}:", fa.problems.map { |p| " * #{p}" }, ""
end
... | false |
Other | Homebrew | brew | 358fd0ca19ea65e82577a1ff58f51793a9e9b56f.json | brew-test-bot: use Jenkins PR plugin provided URL. | Library/Homebrew/cmd/test-bot.rb | @@ -222,7 +222,7 @@ def single_commit? start_revision, end_revision
# Use Jenkins environment variables if present.
if no_args? and ENV['GIT_PREVIOUS_COMMIT'] and ENV['GIT_COMMIT'] \
- and not ENV['ghprbPullId']
+ and not ENV['ghprbPullLink']
diff_start_sha1 = shorten_revision E... | false |
Other | Homebrew | brew | 7312b4a1a43c77c819b5d02db574572d6d6e4656.json | brew-test-bot: truncate output to 1MB. | Library/Homebrew/cmd/test-bot.rb | @@ -30,6 +30,7 @@
module Homebrew
EMAIL_SUBJECT_FILE = "brew-test-bot.#{MacOS.cat}.email.txt"
+ BYTES_IN_1_MEGABYTE = 1024*1024
def homebrew_git_repo tap=nil
if tap
@@ -621,7 +622,12 @@ def test_bot
if output.respond_to?(:force_encoding) && !output.valid_encoding?
output.for... | false |
Other | Homebrew | brew | 7266ecd4e3799006d0482708a3331bfac4e1e0d1.json | Hide install receipt key names | Library/Homebrew/cmd/reinstall.rb | @@ -20,8 +20,7 @@ def reinstall_formula f
fi = FormulaInstaller.new(f)
fi.options = options
- fi.build_bottle = ARGV.build_bottle?
- fi.build_bottle ||= tab.built_as_bottle && !tab.poured_from_bottle
+ fi.build_bottle = ARGV.build_bottle? || tab.build_bottle?
fi.... | true |
Other | Homebrew | brew | 7266ecd4e3799006d0482708a3331bfac4e1e0d1.json | Hide install receipt key names | Library/Homebrew/cmd/upgrade.rb | @@ -53,8 +53,7 @@ def upgrade_formula f
fi = FormulaInstaller.new(f)
fi.options = tab.used_options
- fi.build_bottle = ARGV.build_bottle?
- fi.build_bottle ||= tab.built_as_bottle && !tab.poured_from_bottle
+ fi.build_bottle = ARGV.build_bottle? || tab.build_bottle?
... | true |
Other | Homebrew | brew | 7266ecd4e3799006d0482708a3331bfac4e1e0d1.json | Hide install receipt key names | Library/Homebrew/tab.rb | @@ -121,6 +121,10 @@ def cxxstdlib
CxxStdlib.create(lib, cc.to_sym)
end
+ def build_bottle?
+ built_as_bottle && !poured_from_bottle
+ end
+
def to_json
Utils::JSON.dump({
:used_options => used_options.as_flags, | true |
Other | Homebrew | brew | 634d67690bbb2f0d6520c2f87a1cf8c7e4ceb089.json | Remove repeated conditional
The post-install audit methods are not run for keg-only installs, so we
don't need to repeat the conditional here. | Library/Homebrew/formula_installer.rb | @@ -647,13 +647,13 @@ def print_check_output(output)
end
def audit_bin
- print_check_output(check_PATH(f.bin)) unless f.keg_only?
+ print_check_output(check_PATH(f.bin))
print_check_output(check_non_executables(f.bin))
print_check_output(check_generic_executables(f.bin))
end
def audit_sb... | false |
Other | Homebrew | brew | b46ebf8a29d9ac150895f426cbcf9a78359709ec.json | Simplify post-install audit output | Library/Homebrew/cmd/audit.rb | @@ -550,10 +550,8 @@ def quote_dep(dep)
Symbol === dep ? dep.inspect : "'#{dep}'"
end
- def audit_check_output warning_and_description
- return unless warning_and_description
- warning, description = *warning_and_description
- problem "#{warning}\n#{description}"
+ def audit_check_output(output)
+ ... | true |
Other | Homebrew | brew | b46ebf8a29d9ac150895f426cbcf9a78359709ec.json | Simplify post-install audit output | Library/Homebrew/formula_cellar_checks.rb | @@ -10,49 +10,48 @@ def check_PATH bin
prefix_bin = prefix_bin.realpath
return if ORIGINAL_PATHS.include? prefix_bin
- ["#{prefix_bin} is not in your PATH",
- "You can amend this by altering your ~/.bashrc file"]
+ <<-EOS.undent
+ #{prefix_bin} is not in your PATH
+ You can amend this b... | true |
Other | Homebrew | brew | b46ebf8a29d9ac150895f426cbcf9a78359709ec.json | Simplify post-install audit output | Library/Homebrew/formula_installer.rb | @@ -639,12 +639,11 @@ def pour
## checks
- def print_check_output warning_and_description
- return unless warning_and_description
- warning, description = *warning_and_description
- opoo warning
- puts description
- @show_summary_heading = true
+ def print_check_output(output)
+ if output
+ ... | true |
Other | Homebrew | brew | 09d53f4fc567dfafb6d9c71742f4633762f55d7c.json | Remove audit whitelist
This is currently unnecessary. | Library/Homebrew/cmd/audit.rb | @@ -484,9 +484,7 @@ def audit_line(line, lineno)
end
if line =~ /ARGV\.(?!(debug\?|verbose\?|value[\(\s]))/
- # Python formulae need ARGV for Requirements
- problem "Use build instead of ARGV to check options",
- :whitelist => %w{pygobject3 qscintilla2}
+ problem "Use build inste... | false |
Other | Homebrew | brew | 3d96dad25cdca41ced3c80d8a3b0a29a0d16d98c.json | Pull cache creation out of begin block | Library/Homebrew/resource.rb | @@ -78,12 +78,14 @@ def files(*files)
end
def fetch
- # Ensure the cache exists
HOMEBREW_CACHE.mkpath
- downloader.fetch
- rescue ErrorDuringExecution, CurlDownloadStrategyError => e
- raise DownloadError.new(self, e)
- else
+
+ begin
+ downloader.fetch
+ rescue ErrorDuringExecution, ... | false |
Other | Homebrew | brew | b3ed5a367df7e551f5e3b30cb140486fa56ff3c7.json | Remove redundant comments | Library/Homebrew/formula.rb | @@ -473,12 +473,10 @@ def to_hash
end
- # For brew-fetch and others.
def fetch
active_spec.fetch
end
- # For FormulaInstaller.
def verify_download_integrity fn
active_spec.verify_download_integrity(fn)
end | true |
Other | Homebrew | brew | b3ed5a367df7e551f5e3b30cb140486fa56ff3c7.json | Remove redundant comments | Library/Homebrew/resource.rb | @@ -77,7 +77,6 @@ def files(*files)
Partial.new(self, files)
end
- # For brew-fetch and others.
def fetch
# Ensure the cache exists
HOMEBREW_CACHE.mkpath | true |
Other | Homebrew | brew | a6df8785d8e51a1b4a916bfb1e555b253aa9cbfd.json | Handle read(n) returning nil
Fixes Homebrew/homebrew#33090. | Library/Homebrew/mach.rb | @@ -60,7 +60,7 @@ def _mach_data
offsets = []
mach_data = []
- header = read(8).unpack("N2")
+ header = (read(8) || "").unpack("N2")
case header[0]
when 0xcafebabe # universal
header[1].times do |i| | false |
Other | Homebrew | brew | 8cc5aabfcf2a5ae8413ec7222b971c18daa69697.json | Allow debugging patch failures
Closes Homebrew/homebrew#33056. | Library/Homebrew/debrew.rb | @@ -17,7 +17,7 @@ def raise(*)
end
module Formula
- def install
+ def brew
Debrew.debrew { super }
end
| false |
Other | Homebrew | brew | 7b550b9486b53f8987e18a2e27b7e8c137391a94.json | Use alias_method instead of an extra ivar | Library/Homebrew/requirement.rb | @@ -11,13 +11,13 @@
class Requirement
include Dependable
- attr_reader :tags, :name, :option_name
+ attr_reader :tags, :name
+ alias_method :option_name, :name
def initialize(tags=[])
@tags = tags
@tags << :build if self.class.build
@name ||= infer_name
- @option_name = @name
end
... | false |
Other | Homebrew | brew | 21c329e0eb25100df64dc4bdab41ba41d64309f2.json | Simplify dispatch in git wrapper | Library/ENV/scm/git | @@ -7,15 +7,9 @@ D = File.expand_path(File.dirname(__FILE__)).freeze
def exec *args
# prevent fork-bombs
- arg0 = if args.size == 1
- args.first.split(' ')
- else
- args
- end.first
- return if arg0 =~ /^#{F}/i
- return if File.expand_path(arg0) == File.expand_path(__FILE__)
-
- Kernel.exec(*args)
+ ... | false |
Other | Homebrew | brew | 54d0043771c0f577554f19a81fc4e251531f5ff4.json | Walk entire keg to find object files to relocate
Closes Homebrew/homebrew#32772. | Library/Homebrew/keg_fix_install_names.rb | @@ -154,15 +154,9 @@ def find_dylib name
def mach_o_files
mach_o_files = []
- dirs = %w{bin sbin lib Frameworks}
- dirs.map! { |dir| path.join(dir) }
- dirs.reject! { |dir| not dir.directory? }
-
- dirs.each do |dir|
- dir.find do |pn|
- next if pn.symlink? or pn.directory?
- ma... | false |
Other | Homebrew | brew | 9f9f5bf31c19b33e2c4d780b59037ba6ff0afbeb.json | Add test for inreplace sub!/gsub! | Library/Homebrew/test/test_inreplace.rb | @@ -76,4 +76,15 @@ def test_change_make_var_with_tabs
s.remove_make_var! "LDFLAGS"
assert_equal "CFLAGS=-O3\n", s
end
+
+ def test_sub_gsub
+ s = "foo"
+ s.extend(StringInreplaceExtension)
+
+ s.sub!("f", "b")
+ assert_equal "boo", s
+
+ s.gsub!("o", "e")
+ assert_equal "bee", s
+ end
... | false |
Other | Homebrew | brew | cb69f339b88bf58d7e40e87859e7efd13823eab7.json | Intercept calls to sub! in inreplace blocks | Library/Homebrew/extend/string.rb | @@ -56,13 +56,21 @@ def chuzzle; end
# used by the inreplace function (in utils.rb)
module StringInreplaceExtension
+ def sub! before, after
+ result = super
+ unless result
+ opoo "inreplace: replacement of '#{before}' with '#{after}' failed"
+ end
+ result
+ end
+
# Warn if nothing was repla... | false |
Other | Homebrew | brew | 701691c261778c8f3b531b2b827f046b97ac0bf0.json | Add missing test for inreplace with tabs | Library/Homebrew/test/test_inreplace.rb | @@ -63,4 +63,17 @@ def test_get_make_var
s.extend(StringInreplaceExtension)
assert_equal "-Wall -O2", s.get_make_var("CFLAGS")
end
+
+ def test_change_make_var_with_tabs
+ s = "CFLAGS\t=\t-Wall -O2\nLDFLAGS\t=\t-lcrypto -lssl"
+ s.extend(StringInreplaceExtension)
+
+ assert_equal "-Wall -O2", s.g... | false |
Other | Homebrew | brew | fb1250a012f6f7896d601c70ef6f8db90a76263d.json | Rescue any SystemCallError from atomic_write | Library/Homebrew/keg_fix_install_names.rb | @@ -47,7 +47,7 @@ def relocate_install_names old_prefix, new_prefix, old_cellar, new_cellar, optio
begin
first.atomic_write(s)
- rescue Errno::EACCES
+ rescue SystemCallError
first.ensure_writable do
first.open("wb") { |f| f.write(s) }
end | false |
Other | Homebrew | brew | 3b8a6c072426922946e74619f8eef511d6c35c34.json | brew-tap-readme: make an internal command. | Library/Contributions/cmd/brew-tap-readme.rb | @@ -1,31 +0,0 @@
-name = ARGV.first
-
-raise "A name is required" if name.nil?
-
-template = <<-EOS
-Homebrew-#{name}
-=========#{'=' * name.size}
-
-How do I install these formulae?
---------------------------------
-Just `brew tap homebrew/#{name}` and then `brew install <formula>`.
-
-If the formula conflicts with o... | true |
Other | Homebrew | brew | 3b8a6c072426922946e74619f8eef511d6c35c34.json | brew-tap-readme: make an internal command. | Library/Homebrew/cmd/tap-readme.rb | @@ -0,0 +1,35 @@
+module Homebrew
+ def tap_readme
+ name = ARGV.first
+
+ raise "A name is required" if name.nil?
+
+ template = <<-EOS
+ Homebrew-#{name}
+ =========#{'=' * name.size}
+
+ How do I install these formulae?
+ --------------------------------
+ Just `brew tap homebrew/#{name}` an... | true |
Other | Homebrew | brew | 8b6978b54dc335bd0780c431cd5efadd8924c7bd.json | Move manpage to Homebrew (from Contributions).
As this is something we support and update. | Library/Contributions/cmd/brew-man | @@ -3,7 +3,7 @@
set -e
shopt -s nullglob
-SOURCE_PATH="$HOMEBREW_REPOSITORY/Library/Contributions/manpages"
+SOURCE_PATH="$HOMEBREW_REPOSITORY/Library/Homebrew/manpages"
TARGET_PATH="$HOMEBREW_REPOSITORY/share/man/man1"
LINKED_PATH="$HOMEBREW_PREFIX/share/man/man1"
| true |
Other | Homebrew | brew | 8b6978b54dc335bd0780c431cd5efadd8924c7bd.json | Move manpage to Homebrew (from Contributions).
As this is something we support and update. | Library/Homebrew/manpages/brew.1.md | @@ -609,4 +609,3 @@ Max Howell, a splendid chap.
## BUGS
See Issues on GitHub: <http://github.com/Homebrew/homebrew/issues>
- | true |
Other | Homebrew | brew | af8a9ff502107fd02f6911bf7c1ab72889add666.json | brew-aspell-dictionaries: make a developer command | Library/Contributions/cmd/brew-aspell-dictionaries.rb | @@ -1,36 +0,0 @@
-require 'open-uri'
-require 'resource'
-require 'formula'
-
-dict_url = "http://ftpmirror.gnu.org/aspell/dict"
-dict_mirror = "http://ftp.gnu.org/gnu/aspell/dict"
-languages = {}
-
-open("#{dict_url}/0index.html") do |content|
- content.each_line do |line|
- break if %r{^</table} === line
- ... | true |
Other | Homebrew | brew | af8a9ff502107fd02f6911bf7c1ab72889add666.json | brew-aspell-dictionaries: make a developer command | Library/Homebrew/cmd/aspell-dictionaries.rb | @@ -0,0 +1,40 @@
+require 'open-uri'
+require 'resource'
+require 'formula'
+
+module Homebrew
+ def aspell_dictionaries
+ dict_url = "http://ftpmirror.gnu.org/aspell/dict"
+ dict_mirror = "http://ftp.gnu.org/gnu/aspell/dict"
+ languages = {}
+
+ open("#{dict_url}/0index.html") do |content|
+ con... | true |
Other | Homebrew | brew | ce6d76ed1c02d06f1eec41e21289b79b94bbdcc0.json | brew-switch: make an internal command. | Library/Contributions/cmd/brew-switch.rb | @@ -1,45 +0,0 @@
-require 'formula'
-require 'keg'
-
-if ARGV.named.length != 2
- onoe "Usage: brew switch <formula> <version>"
- exit 1
-end
-
-name = ARGV.shift
-version = ARGV.shift
-
-# Does this formula have any versions?
-f = Formula.factory(name.downcase)
-cellar = f.prefix.parent
-unless cellar.directory?
- ... | true |
Other | Homebrew | brew | ce6d76ed1c02d06f1eec41e21289b79b94bbdcc0.json | brew-switch: make an internal command. | Library/Homebrew/cmd/switch.rb | @@ -0,0 +1,49 @@
+require 'formula'
+require 'keg'
+
+module Homebrew
+ def switch
+ if ARGV.named.length != 2
+ onoe "Usage: brew switch <formula> <version>"
+ exit 1
+ end
+
+ name = ARGV.shift
+ version = ARGV.shift
+
+ # Does this formula have any versions?
+ f = Formula.factory(name.do... | true |
Other | Homebrew | brew | 3a432bcc2a20ff2c61ae074ff70ca9faaee4b19b.json | brew-pull: make an internal command. | Library/Contributions/cmd/brew-pull.rb | @@ -1,144 +0,0 @@
-# Gets a patch from a GitHub commit or pull request and applies it to Homebrew.
-# Optionally, installs it too.
-
-require 'utils'
-require 'formula'
-
-def tap arg
- match = arg.match(%r[homebrew-(\w+)/])
- match[1].downcase if match
-end
-
-if ARGV.empty?
- onoe 'This command requires at least o... | true |
Other | Homebrew | brew | 3a432bcc2a20ff2c61ae074ff70ca9faaee4b19b.json | brew-pull: make an internal command. | Library/Homebrew/cmd/pull.rb | @@ -0,0 +1,148 @@
+# Gets a patch from a GitHub commit or pull request and applies it to Homebrew.
+# Optionally, installs it too.
+
+require 'utils'
+require 'formula'
+
+module Homebrew
+ def tap arg
+ match = arg.match(%r[homebrew-(\w+)/])
+ match[1].downcase if match
+ end
+
+ def pull
+ if ARGV.empty?
... | true |
Other | Homebrew | brew | 706e8abe290c0c04185d62e29e2551dd8999b982.json | brew-gist-logs: make an internal command. | Library/Contributions/cmd/brew-gist-logs.rb | @@ -1,107 +0,0 @@
-require 'formula'
-require 'cmd/config'
-require 'net/http'
-require 'net/https'
-require 'stringio'
-
-def gist_logs f
- if ARGV.include? '--new-issue'
- unless HOMEBREW_GITHUB_API_TOKEN
- puts 'You need to create an API token: https://github.com/settings/applications'
- puts 'and then... | true |
Other | Homebrew | brew | 706e8abe290c0c04185d62e29e2551dd8999b982.json | brew-gist-logs: make an internal command. | Library/Homebrew/cmd/gist-logs.rb | @@ -0,0 +1,112 @@
+require 'formula'
+require 'cmd/config'
+require 'net/http'
+require 'net/https'
+require 'stringio'
+
+module Homebrew
+ def gistify_logs f
+ if ARGV.include? '--new-issue'
+ unless HOMEBREW_GITHUB_API_TOKEN
+ puts 'You need to create an API token: https://github.com/settings/applica... | true |
Other | Homebrew | brew | b7c9025d931a4e7894f8c3febf109031e775d528.json | brew-test-bot: make an internal command. | Library/Contributions/cmd/brew-test-bot.rb | @@ -1,663 +0,0 @@
-# Comprehensively test a formula or pull request.
-#
-# Usage: brew test-bot [options...] <pull-request|formula>
-#
-# Options:
-# --keep-logs: Write and keep log files under ./brewbot/
-# --cleanup: Clean the Homebrew directory. Very dangerous. Use with care.
-# --clean-cache: Remove all ca... | true |
Other | Homebrew | brew | b7c9025d931a4e7894f8c3febf109031e775d528.json | brew-test-bot: make an internal command. | Library/Homebrew/cmd/test-bot.rb | @@ -0,0 +1,666 @@
+# Comprehensively test a formula or pull request.
+#
+# Usage: brew test-bot [options...] <pull-request|formula>
+#
+# Options:
+# --keep-logs: Write and keep log files under ./brewbot/
+# --cleanup: Clean the Homebrew directory. Very dangerous. Use with care.
+# --clean-cache: Remove all ca... | true |
Other | Homebrew | brew | bd8559c791e7bc37c17a0f270e9b0f98e89d7a8a.json | brew: add contributed tap commands to PATH.
This means that taps root and `cmd` directories are added to the PATH.
This should enable migration of some of our contributed commands into
taps (e.g. `homebrew-boneyard`) and make it easy for third parties to
be able to maintain these. It might also make stuff easier for ... | Library/brew.rb | @@ -109,6 +109,9 @@ def require? path
# Add contributed commands to PATH before checking.
ENV['PATH'] += "#{File::PATH_SEPARATOR}#{HOMEBREW_CONTRIB}/cmd"
+ Dir["#{HOMEBREW_LIBRARY}/Taps/*/*/cmd"].each do |tap_cmd_dir|
+ ENV["PATH"] += "#{File::PATH_SEPARATOR}#{tap_cmd_dir}"
+ end
internal_cmd = requir... | false |
Other | Homebrew | brew | 892d7dc130a6cf88600b71a388f32b9f27874e5c.json | Simplify unbrewed file whitelists
Only the keys of the hashes are used, so we can just use arrays and
comments instead. | Library/Homebrew/cmd/doctor.rb | @@ -108,9 +108,8 @@ def __check_stray_files(dir, pattern, white_list, message)
Dir[pattern].select { |f| File.file?(f) && !File.symlink?(f) }
}
- keys = white_list.keys
bad = files.reject { |file|
- keys.any? { |pat| File.fnmatch?(pat, file) }
+ white_list.any? { |pat| File.fnmatch?(pat, file) }
... | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.