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
a7d74df430a8dfba7bc701c5b526e5d2887c5e1c.json
Move ARGV tests to separate file.
Library/Homebrew/test/test_ARGV.rb
@@ -0,0 +1,35 @@ +require 'testing_env' + +require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser +ARGV.extend(HomebrewArgvExtension) + + +module ExtendArgvPlusYeast + def reset + @named = nil + @downcased_unique_named = nil + @formulae = nil + @kegs = nil + ARGV.shift ...
true
Other
Homebrew
brew
a7d74df430a8dfba7bc701c5b526e5d2887c5e1c.json
Move ARGV tests to separate file.
Library/Homebrew/test/test_bucket.rb
@@ -1,3 +1,6 @@ +require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser +ARGV.extend(HomebrewArgvExtension) + # All other tests so far -- feel free to break them out into # separate TestCase classes. @@ -71,20 +74,6 @@ def test_zip # assert_equal 1, n # end - def test_...
true
Other
Homebrew
brew
a7d74df430a8dfba7bc701c5b526e5d2887c5e1c.json
Move ARGV tests to separate file.
Library/Homebrew/test/tests
@@ -35,3 +35,6 @@ ruby test_pathname_install.rb $* # Test utility functions ruby test_utils.rb $* + +# Test ARGV extensions +ruby test_ARGV.rb $*
true
Other
Homebrew
brew
a7d74df430a8dfba7bc701c5b526e5d2887c5e1c.json
Move ARGV tests to separate file.
Library/Homebrew/test/unittest.rb
@@ -93,15 +93,4 @@ def brew end end -module ExtendArgvPlusYeast - def reset - @named = nil - @downcased_unique_named = nil - @formulae = nil - @kegs = nil - ARGV.shift while ARGV.length > 0 - end -end -ARGV.extend ExtendArgvPlusYeast - require 'test/test_bucket'
true
Other
Homebrew
brew
ccdffb2c31d00ea0d79b04d1e63d1085233012a0.json
Add external deps. tests.
Library/Homebrew/test/test_external_deps.rb
@@ -0,0 +1,120 @@ +require 'testing_env' + +require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser +ARGV.extend(HomebrewArgvExtension) + +require 'test/testball' +require 'formula_installer' +require 'utils' + + +# Custom formula installer that checks deps but does not +# run the insta...
false
Other
Homebrew
brew
1f82fe4dc7acb1edd81fa41b9fa3829c7d1b9c12.json
Move TestBall definition to separate file.
Library/Homebrew/test/test_checksums.rb
@@ -3,24 +3,10 @@ require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser ARGV.extend(HomebrewArgvExtension) -require 'formula' +require 'test/testball' require 'utils' -class TestBall <Formula - # name parameter required for some Formula::factory - def initialize name=nil - ...
true
Other
Homebrew
brew
1f82fe4dc7acb1edd81fa41b9fa3829c7d1b9c12.json
Move TestBall definition to separate file.
Library/Homebrew/test/test_formula_install.rb
@@ -4,24 +4,11 @@ ARGV.extend(HomebrewArgvExtension) require 'formula' +require 'test/testball' require 'keg' require 'utils' -class TestBall <Formula - # name parameter required for some Formula::factory - def initialize name=nil - @url="file:///#{TEST_FOLDER}/testball-0.1.tbz" - @homepage = 'http://...
true
Other
Homebrew
brew
1f82fe4dc7acb1edd81fa41b9fa3829c7d1b9c12.json
Move TestBall definition to separate file.
Library/Homebrew/test/test_patching.rb
@@ -3,21 +3,10 @@ require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser ARGV.extend(HomebrewArgvExtension) -require 'formula' +require 'test/testball' require 'utils' -class TestBall <Formula - def initialize name - @url="file:///#{TEST_FOLDER}/testball-0.1.tbz" - @hom...
true
Other
Homebrew
brew
1f82fe4dc7acb1edd81fa41b9fa3829c7d1b9c12.json
Move TestBall definition to separate file.
Library/Homebrew/test/testball.rb
@@ -0,0 +1,14 @@ +require 'formula' + +class TestBall <Formula + # name parameter required for some Formula::factory + def initialize name=nil + @url="file:///#{TEST_FOLDER}/testball-0.1.tbz" + @homepage = 'http://example.com/' + super "testball" + end + def install + prefix.install "bin" + prefix.in...
true
Other
Homebrew
brew
259ae27cc441d0fe273d5fcd8a8b72ac32d73ae7.json
Move checksum tests to separate file.
Library/Homebrew/test/test_checksums.rb
@@ -1,57 +1,82 @@ +require 'testing_env' + +require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser +ARGV.extend(HomebrewArgvExtension) + +require 'formula' +require 'utils' + + +class TestBall <Formula + # name parameter required for some Formula::factory + def initialize name=nil + ...
true
Other
Homebrew
brew
259ae27cc441d0fe273d5fcd8a8b72ac32d73ae7.json
Move checksum tests to separate file.
Library/Homebrew/test/tests
@@ -11,6 +11,8 @@ ruby unittest.rb $* ruby test_versions.rb $* +ruby test_checksums.rb $* + ruby test_inreplace.rb $* # Test hardware sniffers
true
Other
Homebrew
brew
259ae27cc441d0fe273d5fcd8a8b72ac32d73ae7.json
Move checksum tests to separate file.
Library/Homebrew/test/unittest.rb
@@ -104,5 +104,4 @@ def reset end ARGV.extend ExtendArgvPlusYeast -require 'test/test_checksums' require 'test/test_bucket'
true
Other
Homebrew
brew
4c2a8a7f1c306cf539537056cce93d330a9df18a.json
Move version tests to separate file.
Library/Homebrew/test/test_bucket.rb
@@ -28,15 +28,6 @@ def test_prefix end end - def test_no_version - assert_nil Pathname.new("http://example.com/blah.tar").version - assert_nil Pathname.new("arse").version - end - - def test_bad_version - assert_raises(RuntimeError) {f=TestBadVersion.new} - end - FOOBAR='foo-bar' def ...
true
Other
Homebrew
brew
4c2a8a7f1c306cf539537056cce93d330a9df18a.json
Move version tests to separate file.
Library/Homebrew/test/test_versions.rb
@@ -1,111 +1,138 @@ +require 'testing_env' + +require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser +ARGV.extend(HomebrewArgvExtension) + +require 'formula' +require 'test/testball' + +class MockFormula <Formula + def initialize url + @url=url + @homepage = 'http://example.com/...
true
Other
Homebrew
brew
4c2a8a7f1c306cf539537056cce93d330a9df18a.json
Move version tests to separate file.
Library/Homebrew/test/tests
@@ -9,6 +9,8 @@ # Bulk of the tests ruby unittest.rb $* +ruby test_versions.rb $* + ruby test_inreplace.rb $* # Test hardware sniffers
true
Other
Homebrew
brew
4c2a8a7f1c306cf539537056cce93d330a9df18a.json
Move version tests to separate file.
Library/Homebrew/test/unittest.rb
@@ -85,10 +85,6 @@ def initialize end end -class TestBadVersion <TestBall - @version="versions can't have spaces" -end - class TestBallOverrideBrew <Formula def initialize super "foo" @@ -108,6 +104,5 @@ def reset end ARGV.extend ExtendArgvPlusYeast -require 'test/test_versions' require 'test/test_...
true
Other
Homebrew
brew
d49230733f616da01b2f2fab71b10615cc4582e1.json
Move inreplace tests to separate file.
Library/Homebrew/test/test_inreplace.rb
@@ -1,18 +1,21 @@ +require 'testing_env' +require 'utils' + class InreplaceTest < Test::Unit::TestCase def test_change_make_var # Replace flag - s1="FLAG = abc" + s1="OTHER=def\nFLAG = abc\nFLAG2=abc" s1.extend(HomebrewInreplaceExtension) s1.change_make_var! "FLAG", "def" - assert_equal "FLA...
true
Other
Homebrew
brew
d49230733f616da01b2f2fab71b10615cc4582e1.json
Move inreplace tests to separate file.
Library/Homebrew/test/tests
@@ -9,6 +9,8 @@ # Bulk of the tests ruby unittest.rb $* +ruby test_inreplace.rb $* + # Test hardware sniffers ruby test_hardware.rb $*
true
Other
Homebrew
brew
d49230733f616da01b2f2fab71b10615cc4582e1.json
Move inreplace tests to separate file.
Library/Homebrew/test/unittest.rb
@@ -111,4 +111,3 @@ def reset require 'test/test_versions' require 'test/test_checksums' require 'test/test_bucket' -require 'test/test_inreplace'
true
Other
Homebrew
brew
9d127ac3d58f99a744fe017f89ca64dcaeeed778.json
Move updater tests to separate file.
Library/Homebrew/test/test_updater.rb
@@ -1,3 +1,38 @@ +abort if ARGV.include? "--skip-update" + +require 'testing_env' + +require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser +ARGV.extend(HomebrewArgvExtension) + +require 'formula' +require 'utils' +require 'update' + +class RefreshBrewMock < RefreshBrew + def in_prefi...
true
Other
Homebrew
brew
9d127ac3d58f99a744fe017f89ca64dcaeeed778.json
Move updater tests to separate file.
Library/Homebrew/test/tests
@@ -9,6 +9,9 @@ # Bulk of the tests ruby unittest.rb $* +# Update tests (only seem to work for mxcl) +ruby test_updater.rb $* + # Patching tests ruby test_patching.rb $*
true
Other
Homebrew
brew
9d127ac3d58f99a744fe017f89ca64dcaeeed778.json
Move updater tests to separate file.
Library/Homebrew/test/unittest.rb
@@ -30,7 +30,6 @@ require 'utils' require 'brew.h' require 'hardware' -require 'update' # for some reason our utils.rb safe_system behaves completely differently # during these tests. This is worrying for sure. @@ -113,30 +112,6 @@ def initialize end end -class RefreshBrewMock < RefreshBrew - def in_pref...
true
Other
Homebrew
brew
fd453107c6bade4320ca7bafcc7707eef24ce01e.json
Add tests for patching.
Library/Homebrew/test/patches/noop-a.diff
@@ -0,0 +1,10 @@ +diff --git a/libexec/NOOP b/libexec/NOOP +index bfdda4c..e08d8f4 100755 +--- a/libexec/NOOP ++++ b/libexec/NOOP +@@ -1,2 +1,2 @@ + #!/bin/bash +-echo NOOP +\ No newline at end of file ++echo ABCD +\ No newline at end of file
true
Other
Homebrew
brew
fd453107c6bade4320ca7bafcc7707eef24ce01e.json
Add tests for patching.
Library/Homebrew/test/patches/noop-b.diff
@@ -0,0 +1,10 @@ +diff --git libexec/NOOP libexec/NOOP +index bfdda4c..e08d8f4 100755 +--- libexec/NOOP ++++ libexec/NOOP +@@ -1,2 +1,2 @@ + #!/bin/bash +-echo NOOP +\ No newline at end of file ++echo ABCD +\ No newline at end of file
true
Other
Homebrew
brew
fd453107c6bade4320ca7bafcc7707eef24ce01e.json
Add tests for patching.
Library/Homebrew/test/test_patching.rb
@@ -0,0 +1,91 @@ +require 'testing_env' + +require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser +ARGV.extend(HomebrewArgvExtension) + +require 'formula' +require 'utils' + + +class TestBall <Formula + def initialize name + @url="file:///#{TEST_FOLDER}/testball-0.1.tbz" + @home...
true
Other
Homebrew
brew
fd453107c6bade4320ca7bafcc7707eef24ce01e.json
Add tests for patching.
Library/Homebrew/test/tests
@@ -8,3 +8,9 @@ # Bulk of the tests ruby unittest.rb $* + +# Patching tests +ruby test_patching.rb $* + +# External dependency tests +ruby test_external_deps.rb $*
true
Other
Homebrew
brew
298c74d147479186dbe1f99988ccda1de0747753.json
Add new "testing environment" include.
Library/Homebrew/test/testing_env.rb
@@ -0,0 +1,54 @@ +# This software is in the public domain, furnished "as is", without technical +# support, and with no warranty, express or implied, as to its usefulness for +# any purpose. + +# Require this file to build a testing environment. + +ABS__FILE__=File.expand_path(__FILE__) + +$:.push(File.expand_path(__FI...
false
Other
Homebrew
brew
1d4699163760757826eba2d2ee971b20df20247b.json
Remove silly concatenation.
Library/Homebrew/test/test_bucket.rb
@@ -90,7 +90,7 @@ def test_formula_funcs assert_equal "FooBar", classname assert_match Regexp.new("^#{HOMEBREW_PREFIX}/Library/Formula"), path.to_s - path=HOMEBREW_PREFIX+'Library'+'Formula'+"#{FOOBAR}.rb" + path=HOMEBREW_PREFIX+"Library/Formula/#{FOOBAR}.rb" path.dirname.mkpath File.open(pa...
false
Other
Homebrew
brew
06745aa6d198ec3374d620afc3a9457edea8c5d3.json
Add pkg-config check.
Library/Homebrew/brew_doctor.rb
@@ -141,6 +141,21 @@ def check_user_path end end +def check_pkg_config + binary = `which pkg-config`.chomp + return if binary.empty? + + unless binary == "#{HOMEBREW_PREFIX}/bin/pkg-config" + puts <<-EOS.undent + You have a non-brew 'pkg-config' in your PATH: + #{binary} + + `./configure` m...
false
Other
Homebrew
brew
a37d53aa890e7cf0e21fa1b71ebf74c009efce21.json
Add path check.
Library/Homebrew/brew_doctor.rb
@@ -103,6 +103,44 @@ def check_homebrew_prefix end end +def check_user_path + seen_prefix_bin = false + seen_prefix_sbin = false + seen_usr_bin = false + + paths = ENV['PATH'].split(":") + + paths.each do |p| + if p == '/usr/bin' + seen_usr_bin = true + unless seen_prefix_bin + puts <...
false
Other
Homebrew
brew
11e779d917808501cedb62a45a23c33eb068de90.json
Check both gcc's
Library/Homebrew/brew_doctor.rb
@@ -36,8 +36,17 @@ def brew_doctor check_for_stray_dylibs - if gcc_build < HOMEBREW_RECOMMENDED_GCC - puts "Your GCC version is older than the recommended version. It may be advisable" + gcc_42 = gcc_42_build + gcc_40 = gcc_40_build + + if gcc_42 < RECOMMENDED_GCC_42 + puts "Your ...
false
Other
Homebrew
brew
71f9d74adf93dc8294c345f13036a1bb817ba06a.json
Move X11 check.
Library/Homebrew/brew_doctor.rb
@@ -9,6 +9,13 @@ def check_for_stray_dylibs end end +def check_for_x11 + unless File.exists? '/usr/X11/lib/libpng.dylib' + puts "You don't have X11 installed as part of your Xcode installation." + puts "This isn't required for all formula. But it is expected by some." + end +end + def brew_doctor read...
false
Other
Homebrew
brew
b23ae3688c20677dca5636897ebdbe8396aca25f.json
Add doctor to bash completion.
Library/Contributions/brew_bash_completion.sh
@@ -12,7 +12,7 @@ _brew_to_completion() cur="${COMP_WORDS[COMP_CWORD]}" # We only complete unabbreviated commands... - actions="cat cleanup configure create deps edit generate homepage info install list link log outdated prune remove search unlink update uses" + actions="cat cleanup configure crea...
false
Other
Homebrew
brew
4643f0171b96e9e1c0c77c4fc9c79e4e3bd9c9dc.json
Move dylib check.
Library/Homebrew/brew_doctor.rb
@@ -1,19 +1,23 @@ +def check_for_stray_dylibs + bad_dylibs = Dir['/usr/local/lib/*.dylib'].select { |f| File.file? f and not File.symlink? f } + if bad_dylibs.count > 0 + puts "You have unbrewed dylibs in /usr/local/lib. These could cause build problems" + puts "when building Homebrew formula. If you no longer ...
false
Other
Homebrew
brew
d2b2ecbd0b719e0839b51e3a83bedb5686faf84b.json
Add test script to extract version from URL/path.
Library/Homebrew/test/get_version.rb
@@ -0,0 +1,7 @@ +#!/usr/bin/ruby +$:.push(File.expand_path(__FILE__+'/../..')) +require 'extend/pathname' + +p = Pathname.new(ARGV[0]) +v = p.version +puts v
false
Other
Homebrew
brew
0b56c62bf50c1291f0259aa2ea9ff86afe826c0b.json
Add support for rar archives.
Library/Homebrew/download_strategy.rb
@@ -73,6 +73,8 @@ def stage # TODO check if it's really a tar archive safe_system '/usr/bin/tar', 'xf', @tarball_path chdir + when 'Rar!' + quiet_safe_system 'unrar', 'x', {:quiet_flag => '-inul'}, @tarball_path else # we are assuming it is not an archive, use original filename ...
false
Other
Homebrew
brew
04855ddd484389bc8292a4d82106185466a3eb89.json
fix github version parser with multidigit number Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Library/Homebrew/extend/pathname.rb
@@ -110,7 +110,7 @@ def version # github tarballs are special # we only support numbered tagged downloads - %r[github.com/.*/tarball/v?((\d\.)+\d)$].match to_s + %r[github.com/.*/tarball/v?((\d\.)+\d+)$].match to_s return $1 if $1 # eg. boost_1_39_0
true
Other
Homebrew
brew
04855ddd484389bc8292a4d82106185466a3eb89.json
fix github version parser with multidigit number Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Library/Homebrew/test/test_versions.rb
@@ -74,6 +74,11 @@ def test_version_github assert_equal '1.0.5', r.version end + def test_version_github_with_high_patch_number + r=MockFormula.new "http://github.com/lloyd/yajl/tarball/v1.2.34" + assert_equal '1.2.34', r.version + end + def test_yet_another_version r=MockFormula.new "http://e...
true
Other
Homebrew
brew
6586f89a29325d312a660cd80a3ea857c350e38a.json
Add md5 on 'brew create' if we can figure it out.
Library/Homebrew/brew.h.rb
@@ -26,6 +26,7 @@ def check_for_blacklisted_formula names def __make url, name require 'formula' + require 'digest' path = Formula.path name raise "#{path} already exists" if path.exist? @@ -45,13 +46,26 @@ def __make url, name puts "Version detected as #{version}." end + md5 = '' + if ARGV.i...
true
Other
Homebrew
brew
6586f89a29325d312a660cd80a3ea857c350e38a.json
Add md5 on 'brew create' if we can figure it out.
Library/Homebrew/download_strategy.rb
@@ -287,3 +287,19 @@ def stage end end end + +def detect_download_strategy url + case url + when %r[^cvs://] then CVSDownloadStrategy + when %r[^hg://] then MercurialDownloadStrategy + when %r[^svn://] then SubversionDownloadStrategy + when %r[^svn+http://] then SubversionDownloadStrategy + when %r[^git:...
true
Other
Homebrew
brew
6586f89a29325d312a660cd80a3ea857c350e38a.json
Add md5 on 'brew create' if we can figure it out.
Library/Homebrew/formula.rb
@@ -134,19 +134,7 @@ def etc; HOMEBREW_PREFIX+'etc' end # reimplement if we don't autodetect the download strategy you require def download_strategy - case url - when %r[^cvs://] then CVSDownloadStrategy - when %r[^hg://] then MercurialDownloadStrategy - when %r[^svn://] then SubversionDownloadStr...
true
Other
Homebrew
brew
d84b1711d052cc1ed5f3b818532fe629d04acbf4.json
Fix external perl checker.
Library/Homebrew/formula_installer.rb
@@ -51,7 +51,7 @@ def check_external_deps f raise pyerr(dep) unless quiet_system "/usr/bin/env", "python", "-c", "import #{dep}" end f.external_deps[:perl].each do |dep| - raise plerr(dep) unless quiet_system "/usr/bin/env", "perl", "-e", "use '#{dep}'" + raise plerr(dep) unless quiet_system ...
false
Other
Homebrew
brew
97b66ea1debc4c85d1d98810376fc8caff862034.json
Add log to bash completions.
Library/Contributions/brew_bash_completion.sh
@@ -12,7 +12,7 @@ _brew_to_completion() cur="${COMP_WORDS[COMP_CWORD]}" # We only complete unabbreviated commands... - actions="cat cleanup configure create deps edit generate homepage info install list link outdated prune remove search unlink update uses" + actions="cat cleanup configure create d...
false
Other
Homebrew
brew
ca313defe4658d16c003871ef63784fe0b7d1d49.json
Add GCC 4.0 info to --config output. * Adds GCC 4.0 version info to --config output. * Splits gcc_build into gcc_40_build and gcc_42_build. * Adds alias gcc_build to gcc_42_build for compatibility. * Updates Xcode checking to also check GCC 4.0 version. These changes are a combination of work by AdamV and my work on ...
Library/Homebrew/brew.h.rb
@@ -494,7 +494,7 @@ def clean_dir d end end -def gcc_build +def gcc_42_build `/usr/bin/gcc-4.2 -v 2>&1` =~ /build (\d{4,})/ if $1 $1.to_i @@ -508,6 +508,16 @@ def gcc_build nil end end +alias :gcc_build :gcc_42_build # For compatibility + +def gcc_40_build + `/usr/bin/gcc-4.0 -v 2>&1` =~ /bu...
true
Other
Homebrew
brew
ca313defe4658d16c003871ef63784fe0b7d1d49.json
Add GCC 4.0 info to --config output. * Adds GCC 4.0 version info to --config output. * Splits gcc_build into gcc_40_build and gcc_42_build. * Adds alias gcc_build to gcc_42_build for compatibility. * Updates Xcode checking to also check GCC 4.0 version. These changes are a combination of work by AdamV and my work on ...
bin/brew
@@ -43,7 +43,8 @@ def dump_config bits = Hardware.bits cores = Hardware.cores_as_words llvm = llvm_build - gcc = gcc_build + gcc_42 = gcc_42_build + gcc_40 = gcc_40_build sha = `cd #{HOMEBREW_REPOSITORY} && git rev-parse --verify HEAD 2> /dev/null`.chomp kernel_arch = `uname -m`.chomp @@ -59,7 +60,8...
true
Other
Homebrew
brew
098b97801bbc237dc9a4105c5a016478dfdcdb9c.json
Use tab/space when finding vars (and not newlines).
Library/Homebrew/test/test_inreplace.rb
@@ -15,6 +15,14 @@ def test_change_make_var_empty assert_equal "FLAG=def\nFLAG2=abc", s1 end + def test_change_make_var_empty_2 + # Replace empty flag + s1="FLAG = \nmv file_a file_b" + s1.extend(HomebrewInreplaceExtension) + s1.change_make_var! "FLAG", "def" + assert_equal "FLAG=def\nmv f...
true
Other
Homebrew
brew
098b97801bbc237dc9a4105c5a016478dfdcdb9c.json
Use tab/space when finding vars (and not newlines).
Library/Homebrew/utils.rb
@@ -157,13 +157,13 @@ module HomebrewInreplaceExtension # value with "new_value", or removes the definition entirely. def change_make_var! flag, new_value new_value = "#{flag}=#{new_value}" - gsub! Regexp.new("^#{flag}\\s*=[ \\t]*(.*)$"), new_value + gsub! Regexp.new("^#{flag}[ \\t]*=[ \\t]*(.*)$"), ne...
true
Other
Homebrew
brew
01eddfea0043e755f859e17c298179dcf5ec68fa.json
Avoid GitHub bug with capitalisation in wiki pages
README.md
@@ -1,6 +1,7 @@ Homebrew ======== -Homebrew helps you install the UNIX tools that didn't come with OS X. +Homebrew is the easiest and most flexible way to install the UNIX tools Apple +didn't include with OS X. Requirements @@ -12,7 +13,7 @@ Quick Install ------------- Install [Xcode][] and then run this scrip...
false
Other
Homebrew
brew
f61ffc24144a2be49d344165cdbdd6abdb51d59a.json
Point users to Homepage for usage examples.
README.md
@@ -5,7 +5,7 @@ Homebrew helps you install the UNIX tools that didn't come with OS X. Quick Install ------------- -Install [Xcode][xcode] and then run this script: <http://gist.github.com/323731> +Install [Xcode][] and then run this script: <http://gist.github.com/323731> If you want to install Homebrew somewher...
false
Other
Homebrew
brew
07934ce3ab72a1b677609aeb5595f0de5e7de335.json
Install line needs -L
README.md
@@ -17,7 +17,7 @@ Alright then… as long as you're sure: cd /usr/local sudo chown -R $USER . - curl -sf http://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 + curl -Lsf http://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 The Wiki
false
Other
Homebrew
brew
1e7a71bfef9a1067f49dabd1f16a38c7be94e088.json
Change the return value of Pathname.install. The change to Pathname to support renaming changed the return value. This commit puts it back, so the associated unit test passes again.
Library/Homebrew/extend/pathname.rb
@@ -17,8 +17,10 @@ def install_p src, new_basename = nil if new_basename new_basename = File.basename(new_basename) # rationale: see Pathname.+ dst = self+new_basename + return_value =Pathname.new(dst) else dst = self + return_value = self+File.basename(src) end src ...
false
Other
Homebrew
brew
5fc319236f9d9571e320158d7a18848d83583dec.json
Add support for `brew --prefix [formula ...]`. When `brew --prefix` is called with arguments, assume each argument is a formula and print their prefixes instead. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
bin/brew
@@ -81,7 +81,12 @@ begin case arg = ARGV.shift when '--prefix' - puts HOMEBREW_PREFIX + if ARGV.named.empty? + puts HOMEBREW_PREFIX + else + puts *ARGV.formulae.collect {|f| f.prefix} + end + when '--repository' puts HOMEBREW_REPOSITORY when '--cellar'
false
Other
Homebrew
brew
a9b19f025545fa937b9142c0062e3922839d09c0.json
Move license block to separate LICENSE file.
Library/Homebrew/LICENSE
@@ -0,0 +1,22 @@ +Copyright 2009-2010 Max Howell and other contributors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of con...
true
Other
Homebrew
brew
a9b19f025545fa937b9142c0062e3922839d09c0.json
Move license block to separate LICENSE file.
Library/Homebrew/brew.h.rb
@@ -1,26 +1,3 @@ -# Copyright 2009 Max Howell and other contributors. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, thi...
true
Other
Homebrew
brew
a9b19f025545fa937b9142c0062e3922839d09c0.json
Move license block to separate LICENSE file.
Library/Homebrew/download_strategy.rb
@@ -1,26 +1,3 @@ -# Copyright 2009 Max Howell and other contributors. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, thi...
true
Other
Homebrew
brew
a9b19f025545fa937b9142c0062e3922839d09c0.json
Move license block to separate LICENSE file.
Library/Homebrew/extend/ARGV.rb
@@ -1,26 +1,3 @@ -# Copyright 2009 Max Howell and other contributors. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, thi...
true
Other
Homebrew
brew
a9b19f025545fa937b9142c0062e3922839d09c0.json
Move license block to separate LICENSE file.
Library/Homebrew/extend/ENV.rb
@@ -1,27 +1,3 @@ -# Copyright 2009 Max Howell and other contributors. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, thi...
true
Other
Homebrew
brew
a9b19f025545fa937b9142c0062e3922839d09c0.json
Move license block to separate LICENSE file.
Library/Homebrew/extend/pathname.rb
@@ -1,26 +1,3 @@ -# Copyright 2009 Max Howell and other contributors. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, thi...
true
Other
Homebrew
brew
a9b19f025545fa937b9142c0062e3922839d09c0.json
Move license block to separate LICENSE file.
Library/Homebrew/formula.rb
@@ -1,26 +1,3 @@ -# Copyright 2009 Max Howell and other contributors. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, thi...
true
Other
Homebrew
brew
a9b19f025545fa937b9142c0062e3922839d09c0.json
Move license block to separate LICENSE file.
Library/Homebrew/global.rb
@@ -1,26 +1,3 @@ -# Copyright 2009 Max Howell and other contributors. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, thi...
true
Other
Homebrew
brew
a9b19f025545fa937b9142c0062e3922839d09c0.json
Move license block to separate LICENSE file.
Library/Homebrew/hardware.rb
@@ -1,27 +1,3 @@ -# Copyright 2009 Max Howell and other contributors. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, thi...
true
Other
Homebrew
brew
a9b19f025545fa937b9142c0062e3922839d09c0.json
Move license block to separate LICENSE file.
Library/Homebrew/keg.rb
@@ -1,26 +1,3 @@ -# Copyright 2009 Max Howell and other contributors. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, thi...
true
Other
Homebrew
brew
a9b19f025545fa937b9142c0062e3922839d09c0.json
Move license block to separate LICENSE file.
Library/Homebrew/update.rb
@@ -1,26 +1,3 @@ -# Copyright 2009 Max Howell and other contributors. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, thi...
true
Other
Homebrew
brew
a9b19f025545fa937b9142c0062e3922839d09c0.json
Move license block to separate LICENSE file.
Library/Homebrew/utils.rb
@@ -1,26 +1,3 @@ -# Copyright 2009 Max Howell and other contributors. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, thi...
true
Other
Homebrew
brew
1ade7ef4e0d5c11fd4c8720f9268d23ff3db1e90.json
Update bash completions * Bring command list up-to-date * Subcommand completion now ignores switches
Library/Contributions/brew_bash_completion.sh
@@ -5,27 +5,35 @@ _brew_to_completion() { - local actions cur prev + local actions cur prev prev_index local cellar_contents formulae which_cellar brew_base COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" - prev="${COMP_WORDS[COMP_CWORD-1]}" # We only complete unabbreviated command...
false
Other
Homebrew
brew
15e145709bb4a7ccf3095b51e6826b1d97a22ec9.json
Fix inreplace barfing over Pathnames This fix should be fairly tolerant of types.
Library/Homebrew/utils.rb
@@ -195,7 +195,7 @@ def remove_make_var! flags end def inreplace path, before=nil, after=nil - path.each do |path| + [*path].each do |path| f = File.open(path, 'r') s = f.read
false
Other
Homebrew
brew
8cdb504b149afd5b0742a31cc1f04f0cf2ea93ec.json
Fix Pathname.install for relative symlinks If you have a bunch of symlinks and they all point at one file and you use Pathname.install on them all the error checking would fail if the file was moved before the symlinks because the symlinks would then point at a non existent file.
Library/Homebrew/extend/pathname.rb
@@ -29,7 +29,12 @@ def install src if src.is_a? Array src.collect {|src| install src } else - raise "#{src} does not exist" unless File.exist? src + # if it's a symlink, don't resolve it to a file because if we are moving + # files one by one, it's likely we will break the symlink by mov...
false
Other
Homebrew
brew
2e3585872b0e5856cce6c53b178744bc10a91c0b.json
Set correct LDFLAGS for universal binaries Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Library/Homebrew/extend/ENV.rb
@@ -205,6 +205,7 @@ def m32 def universal_binary append_to_cflags '-arch i386 -arch x86_64' ENV.O3 if self['CFLAGS'].include? '-O4' # O4 seems to cause the build to fail + ENV.append 'LDFLAGS', '-arch i386 -arch x86_64' end def prepend key, value, separator = ' '
false
Other
Homebrew
brew
3c47f7918b47377732a26445b27566a226e85831.json
Add formula check for crufy SourceForge URLs.
Library/Homebrew/test/formula_test.rb
@@ -39,4 +39,12 @@ def test_for_misquoted_prefix assert_equal('', result, "--prefix is incorrectly single-quoted in #{f}") end end + + def test_for_crufy_sourceforge_url + # Don't specify mirror for SourceForge downloads + Formulary.paths.each do |f| + result = `grep "\?use_mirror=" "#{f}"`...
false
Other
Homebrew
brew
5474cf1a95616243f5592c8c5951048ea5cbafe3.json
Let change_make_var! append to existing value. To existing flag value can be specified with "\\1". To append values to a flag, call with: s.change_make_var! "THE_FLAG", "\\1 more-flag-values" The same trick can be used to prepend or surround values as well.
Library/Homebrew/utils.rb
@@ -181,9 +181,9 @@ module HomebrewInreplaceExtension # Looks for Makefile style variable defintions and replaces the # value with "new_value", or removes the definition entirely. # See inreplace in utils.rb - def change_make_var! flag, new_value - new_value = "#{flag}=#{new_value}" unless new_value.to_s.e...
false
Other
Homebrew
brew
fb8707df4e894e4828b6357d915326a98d81c534.json
Remove spaces around make-style variables. Removing the spaces around equals for make-style variables makes the change_make_var! method compatible with shell scripts as well as makefiles.
Library/Homebrew/utils.rb
@@ -182,7 +182,7 @@ module HomebrewInreplaceExtension # value with "new_value", or removes the definition entirely. # See inreplace in utils.rb def change_make_var! flag, new_value - new_value = "#{flag} = #{new_value}" unless new_value.to_s.empty? + new_value = "#{flag}=#{new_value}" unless new_value.to...
false
Other
Homebrew
brew
16132cab6b6ad516f9758fe7c268f5096d0c2931.json
Use Ruby rather than external commands `ls` could go wrong more than Pathname.children
bin/brew
@@ -210,8 +210,8 @@ begin when 'cleanup' if ARGV.named.empty? require 'formula' - `ls #{HOMEBREW_CELLAR}`.each do |name| - cleanup name.strip + HOMEBREW_CELLAR.children.each do |rack| + cleanup(rack.basename.to_s) end else ARGV.named.each { |name| cleanup name}
false
Other
Homebrew
brew
0d84f3ee17451ed56c3d834aeba3f8b5fcbd77f7.json
Add cleanup command * `brew cleanup foo` removes any unlinked foo kegs * `brew cleanup` removes all unlinked kegs
Library/Homebrew/brew.h.rb
@@ -245,6 +245,22 @@ def issues_for_formula name [] end +def cleanup name + require 'formula' + + f = Formula.factory name + + if f.prefix.parent.directory? + kids = f.prefix.parent.children + kids.each do |keg| + next if f.prefix == keg + print "Uninstalling #{keg}..." + FileUtils.rm_rf k...
true
Other
Homebrew
brew
0d84f3ee17451ed56c3d834aeba3f8b5fcbd77f7.json
Add cleanup command * `brew cleanup foo` removes any unlinked foo kegs * `brew cleanup` removes all unlinked kegs
bin/brew
@@ -207,6 +207,16 @@ begin ARGV.named.each {|name| info name} end + when 'cleanup' + if ARGV.named.empty? + require 'formula' + `ls #{HOMEBREW_CELLAR}`.each do |name| + cleanup name.strip + end + else + ARGV.named.each { |name| cleanup name} + end + when 'instal...
true
Other
Homebrew
brew
0bc1127f543d3af65edf2c36d7b558217f943772.json
Add recommended GCC & LLVM versions to --config.
bin/brew
@@ -62,8 +62,8 @@ Hardware: #{cores}-core #{bits}-bit #{Hardware.intel_family} OS X: #{MACOS_FULL_VERSION} Kernel Architecture: #{kernel_arch} Ruby: #{RUBY_VERSION}-#{RUBY_PATCHLEVEL} -GCC-4.2: #{gcc ? "build #{gcc}" : "N/A"} -LLVM: #{llvm ? "build #{llvm}" : "N/A" } +GCC-4.2: #{gcc ? "build #{gcc}" : "N/A"} (5577 o...
false
Other
Homebrew
brew
5193d835a443d6901bb28cbe451aaa0c08e299e7.json
Improve error when no url given
Library/Homebrew/formula.rb
@@ -99,7 +99,7 @@ def initialize name='__UNKNOWN__' @version='HEAD' end - raise if @url.nil? + raise "No url provided for formula #{name}" if @url.nil? @name=name validate_variable :name
false
Other
Homebrew
brew
1ead7d380ab85946f156ef64a0bc6324691b1704.json
Escape any spaces in path during strip step Not using path.basename for mktemp due to risk of bugs due to incorrect escaping. But mainly, mktemp gives a unique name and this operation is procedural.
Library/Homebrew/brew.h.rb
@@ -442,11 +442,13 @@ def strip path, args='' puts "strip #{path}" if ARGV.verbose? path.chmod 0644 # so we can strip unless path.stat.nlink > 1 - `strip #{args} #{path}` + system "strip", *(args+path) else + path = path.to_s.gsub ' ', '\\ ' + # strip unlinks the file and recre...
false
Other
Homebrew
brew
d8c3b3a80a94bbc121539cd8d52eb252fb26c577.json
Use full paths to strip, mktemp, cat and ls
Library/Homebrew/brew.h.rb
@@ -350,7 +350,7 @@ def macports_or_fink_installed? end def versions_of(keg_name) - `ls #{HOMEBREW_CELLAR}/#{keg_name}`.collect { |version| version.strip }.reverse + `/bin/ls #{HOMEBREW_CELLAR}/#{keg_name}`.collect { |version| version.strip }.reverse end @@ -446,9 +446,9 @@ def strip path, args='' else ...
false
Other
Homebrew
brew
56351558b8210d2ee9cfabf939db61dfeb9438af.json
Check GitHub for issues relating to build failures Uses the GitHub issue search API, so it's very neat and concise. However you can get false positives, so it's not 100% useful. Still I think it is more useful than before, which was, nothing. A further issue is it depends on the ticket at GitHub using the formula's p...
Library/Homebrew/brew.h.rb
@@ -212,6 +212,28 @@ def info name end end +def issues_for_formula name + # bit basic as depends on the issue at github having the exact name of the + # formula in it. Which for stuff like objective-caml is unlikely. So we + # really should search for aliases too. + + name = f.name if Formula === name + + re...
true
Other
Homebrew
brew
56351558b8210d2ee9cfabf939db61dfeb9438af.json
Check GitHub for issues relating to build failures Uses the GitHub issue search API, so it's very neat and concise. However you can get false positives, so it's not 100% useful. Still I think it is more useful than before, which was, nothing. A further issue is it depends on the ticket at GitHub using the formula's p...
bin/brew
@@ -326,12 +326,18 @@ rescue Interrupt => e exit 130 rescue BuildError => e e.backtrace[1] =~ %r{Library/Formula/(.+)\.rb:(\d+)} - puts "http://github.com/mxcl/homebrew/blob/master/Library/Formula/#{$1}.rb#L#{$2}" + formula_name = $1 + puts "http://github.com/mxcl/homebrew/blob/master/Library/Formula/#{formul...
true
Other
Homebrew
brew
89479912ecbfe343a7d002c9b71d2359cc1cbde2.json
Use full path to du Fixes Homebrew/homebrew#354
Library/Homebrew/extend/pathname.rb
@@ -93,7 +93,7 @@ def abv out='' n=`find #{to_s} -type f | wc -l`.to_i out<<"#{n} files, " if n > 1 - out<<`du -hd0 #{to_s} | cut -d"\t" -f1`.strip + out<<`/usr/bin/du -hd0 #{to_s} | cut -d"\t" -f1`.strip end # attempts to retrieve the version component of this path, so generally
false
Other
Homebrew
brew
596d26f8b430bfbe2250a7de90009c5f949997fd.json
Remove unused method expand_deps.
Library/Homebrew/brew.h.rb
@@ -235,15 +235,6 @@ def clean f end -def expand_deps ff - deps = [] - ff.deps.collect do |f| - deps += expand_deps(Formula.factory(f)) - end - deps << ff -end - - def prune $n=0 $d=0
false
Other
Homebrew
brew
db559a97dc7f1a7461b0cf1fbc4524691ac4eab4.json
Fix Formula path. Linking "Library" under prefix is optional, but Library will always exist relative to the REPOSITORY folder, so use that instead of prefix for formula paths.
Library/Homebrew/formula.rb
@@ -287,7 +287,7 @@ def self.factory name end def self.path name - HOMEBREW_PREFIX+'Library'+'Formula'+"#{name.downcase}.rb" + HOMEBREW_REPOSITORY+"Library/Formula/#{name.downcase}.rb" end def deps
false
Other
Homebrew
brew
ac1d366fab387d3a1b7ae3a679482b587169371d.json
Ignore .DS_Store, everywhere
.gitignore
@@ -3,3 +3,4 @@ !/Library/ !/README.md !/bin/brew +.DS_Store
false
Other
Homebrew
brew
1a52c7f8644f0d6871c3c5fabd4bd7c124b3c9d3.json
Allow https on more download strategies.
Library/Homebrew/formula.rb
@@ -163,8 +163,8 @@ def download_strategy when %r[^svn+http://] then SubversionDownloadStrategy when %r[^git://] then GitDownloadStrategy when %r[^https?://(.+?\.)?googlecode\.com/hg] then MercurialDownloadStrategy - when %r[^http://(.+?\.)?googlecode\.com/svn] then SubversionDownloadStrategy - whe...
false
Other
Homebrew
brew
a4ed7ff619eaae7a2953dfa9ca1a09cd668f4081.json
Update VCS caches when installing I held off on this as I wasn't sure it made sense. Eg. if you install you'd expect it to install the same version as before? But with HEAD formula you always want the newest, that's the point. Otherwise it should be tagged/revisioned.
Library/Homebrew/download_strategy.rb
@@ -135,8 +135,8 @@ def fetch unless @co.exist? quiet_safe_system svn, 'checkout', @url, @co else - # TODO svn up? - puts "Repository already checked out" + puts "Updating #{@co}" + quiet_safe_system svn, 'up', @co end end @@ -162,8 +162,8 @@ def fetch unless @clone.e...
false
Other
Homebrew
brew
4731add213b5bc4b1670b779d2bf9c3952377adb.json
Fix selflink script.
Library/Contributions/selflink.sh
@@ -17,30 +17,25 @@ source_base=`pwd` if [[ $mode == install ]]; then # Ensure that the Cellar exists -- otherwise Homebrew breaks if [[ ! -e "$source_base/Cellar" ]] ; then - mkdir -p "$source_base/Cellar" + mkdir -p "$install_base/Cellar" fi - if [[ ! -e "$install_base/bin" ]] ;...
false
Other
Homebrew
brew
a9895432ce92fcb4cb3794805d2a82e409626493.json
Use our Bazaar formula for now Bzr on PyPi is problematic for now.
Library/Homebrew/brew.h.rb
@@ -29,12 +29,14 @@ def check_for_blacklisted_formula names names.each do |name| case name - when 'bazaar', 'bzr' then abort <<-EOS -Bazaar can be installed thusly: - - brew install pip && pip install bzr==2.0.1 - - EOS + # bazaar don't maintain their PyPi entry properly yet + # when they d...
false
Other
Homebrew
brew
3eac79f90561c31772906e5866f71497a8bb677a.json
Export the revision, checkout HEAD
Library/Homebrew/download_strategy.rb
@@ -111,24 +111,20 @@ def fetch ohai "Checking out #{@url}" @co=HOMEBREW_CACHE+@unique_token unless @co.exist? - checkout_args = ['/usr/bin/svn', 'checkout', @url] - - if (@spec == :revision) and @ref - checkout_args << '-r' - checkout_args << @ref - end - - checko...
false
Other
Homebrew
brew
dd0df9bd3714c2a087fa8d85d7c2684d5736d379.json
Show exit status properly Turns out $?.to_i is a 16bit int with some bit flags in the first byte.
bin/brew
@@ -310,7 +310,7 @@ rescue BuildError => e puts e.backtrace[1] ohai "Environment" dump_config - puts "Exit status: #{e.status}" + puts "Exit status: #{e.status.exitstatus}" onoe e puts PLEASE_REPORT_BUG exit 1
false
Other
Homebrew
brew
95eb1b4a5d79463bca362386029a46a2f8d13414.json
Remove redundant cflags -fomit-frame-pointer is included for any optimisation level above O2 (including Os) Setting MACOS_DEPLOYMENT_TARGET is unecessary if you are just setting it the same as the OS X you are running.
Library/Homebrew/extend/ENV.rb
@@ -24,14 +24,12 @@ module HomebrewEnvExtension # -w: keep signal to noise high - # -fomit-frame-pointer: we are not debugging this software, we are using it - SAFE_CFLAGS_FLAGS = "-w -pipe -fomit-frame-pointer" + SAFE_CFLAGS_FLAGS = "-w -pipe" def setup_build_environment # Clear CDPATH to avoid make...
false
Other
Homebrew
brew
56f82a33b1412a79e8519f3debe9fdb8b581776d.json
Update bash and zsh for 'uses'.
Library/Contributions/brew_bash_completion.sh
@@ -13,7 +13,7 @@ _brew_to_completion() prev="${COMP_WORDS[COMP_CWORD-1]}" # We only complete unabbreviated commands... - actions="configure create edit generate homepage info install list link options prune remove search unlink update" + actions="configure create edit generate homepage info insta...
true
Other
Homebrew
brew
56f82a33b1412a79e8519f3debe9fdb8b581776d.json
Update bash and zsh for 'uses'.
Library/Contributions/brew_zsh_completion.zsh
@@ -29,6 +29,7 @@ _1st_arguments=( 'log:git commit log for a formula' 'create:create a new formula' 'edit:edit a formula' + 'uses:show formulas which depend on a formula' ) local expl @@ -56,7 +57,7 @@ case "$words[1]" in _brew_installed_formulae _requested installed_formulae expl 'insta...
true
Other
Homebrew
brew
95e398ab130b1edd5346b74e684c30f02ce61e62.json
Add alias support to formulae * brew install will find an aliased formula * aliases are searched against * warn when creating a new formula that has an existing alias. If Subversion has an alias "svn", then warn when the user tries to create a new formula "svn". The formula can still be created, though the user shoul...
Library/Homebrew/brew.h.rb
@@ -29,6 +29,13 @@ def __make url, name path = Formula.path name raise "#{path} already exists" if path.exist? + + # Check if a formula aliased to this name exists. + already_aka = Formulary.find_alias name + if already_aka != nil + opoo "Formula #{already_aka} is aliased to #{name}." + puts "Please ...
true
Other
Homebrew
brew
95e398ab130b1edd5346b74e684c30f02ce61e62.json
Add alias support to formulae * brew install will find an aliased formula * aliases are searched against * warn when creating a new formula that has an existing alias. If Subversion has an alias "svn", then warn when the user tries to create a new formula "svn". The formula can still be created, though the user shoul...
Library/Homebrew/formula.rb
@@ -52,6 +52,22 @@ def self.read_all yield name, klass end end + + def self.get_aliases + aliases = {} + Formulary.read_all do |name, klass| + aka = klass.aliases + next if aka == nil + + aka.each {|item| aliases[item.to_s] = name } + end + return aliases + end + + def sel...
true
Other
Homebrew
brew
95e398ab130b1edd5346b74e684c30f02ce61e62.json
Add alias support to formulae * brew install will find an aliased formula * aliases are searched against * warn when creating a new formula that has an existing alias. If Subversion has an alias "svn", then warn when the user tries to create a new formula "svn". The formula can still be created, though the user shoul...
bin/brew
@@ -98,7 +98,9 @@ begin end when 'search', '-S' - formulae = (HOMEBREW_REPOSITORY+'Library/Formula').children.sort.map{|f| f.basename('.rb') } + require "formula" + formulae = Formulary.names with_aliases=true + if ARGV.first =~ /^\/(.*)\/$/ puts_columns formulae.grep(Regexp...
true
Other
Homebrew
brew
af29299f37417f436f6fb0a612578abb3edfd21b.json
Add brew command 'uses' 'uses' shows the formulas that depend on a formula given on the command-line.
Library/Homebrew/formula.rb
@@ -201,6 +201,22 @@ def self.class_s name name.capitalize.gsub(/[-_.\s]([a-zA-Z0-9])/) { $1.upcase } \ .gsub('+', 'x') end + + def self.get_used_by + used_by = {} + Formulary.read_all do |name, klass| + deps = klass.deps + next if deps == nil + + deps.each do |dep| +...
true
Other
Homebrew
brew
af29299f37417f436f6fb0a612578abb3edfd21b.json
Add brew command 'uses' 'uses' shows the formulas that depend on a formula given on the command-line.
bin/brew
@@ -226,6 +226,24 @@ begin when 'log' Dir.chdir HOMEBREW_REPOSITORY exec "git", "log", ARGV.formulae.first.path, *ARGV.options + + when 'uses' + # For each formula given, show which other formulas depend on it. + # We only go one level up, direct dependencies. + require 'formula' + require...
true
Other
Homebrew
brew
ed4992f467e0c3b8b84959d279e2be9d8be25ab1.json
Add a Formulary class for managing the Formulae These methods could be static on Formula, but splitting them out makes it clear to formular authors that these functions don't have anything to do with writing new formulas.
Library/Homebrew/formula.rb
@@ -33,6 +33,28 @@ def initialize name end +# The Formulary is the collection of all Formulae, of course. +class Formulary + # Returns all formula names as strings, with or without aliases + def self.names with_aliases=false + everything = (HOMEBREW_REPOSITORY+'Library/Formula').children.map{|f| f.basename('....
false
Other
Homebrew
brew
4fbcf13e658eaa0b1a02185c05cd84c5fe7a2567.json
Move some helper functions into Hardware
Library/Homebrew/hardware.rb
@@ -59,10 +59,24 @@ def self.intel_family def self.processor_count @@processor_count ||= `/usr/sbin/sysctl -n hw.ncpu`.to_i end + + def self.cores_as_words + case Hardware.processor_count + when 1 then 'single' + when 2 then 'dual' + when 4 then 'quad' + else + Hardware.processor_count...
true