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
a784d2e045af20938b64a580be920362a74cd6ce.json
Move Xcode and CLT modules to a new file Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/xcode.rb
@@ -0,0 +1,153 @@ +module MacOS::Xcode extend self + + V4_BUNDLE_ID = "com.apple.dt.Xcode" + V3_BUNDLE_ID = "com.apple.Xcode" + V4_BUNDLE_PATH = Pathname.new("/Applications/Xcode.app") + V3_BUNDLE_PATH = Pathname.new("/Developer/Applications/Xcode.app") + + # Locate the "current Xcode folder" via xcode-select. See...
true
Other
Homebrew
brew
a8a16928e4e7f77a8f2d73d9dd2fef9d8383fc2a.json
doctor: Skip outdated check when offline Fixes Homebrew/homebrew#13535.
Library/Homebrew/cmd/doctor.rb
@@ -856,8 +856,10 @@ def check_for_outdated_homebrew HOMEBREW_REPOSITORY.cd do if File.directory? ".git" local = `git rev-parse -q --verify refs/remotes/origin/master`.chomp - remote = /^([a-f0-9]{40})/.match(`git ls-remote origin refs/heads/master`)[0] - return if local == remote + remote...
false
Other
Homebrew
brew
17953f2b83ba764c5cd5dc679d98c82fb6cc4b77.json
Keg#unlink: check destination before unlinking Rather than skip unlinking if there's no linked keg record, check to see whether the destination's realpath is the same as the source file in the keg being unlinked.
Library/Homebrew/cmd/unlink.rb
@@ -3,7 +3,6 @@ def unlink raise KegUnspecifiedError if ARGV.named.empty? ARGV.kegs.each do |keg| - return if !keg.linked? print "Unlinking #{keg}... " puts "#{keg.unlink} links removed" end
true
Other
Homebrew
brew
17953f2b83ba764c5cd5dc679d98c82fb6cc4b77.json
Keg#unlink: check destination before unlinking Rather than skip unlinking if there's no linked keg record, check to see whether the destination's realpath is the same as the source file in the keg being unlinked.
Library/Homebrew/keg.rb
@@ -29,14 +29,18 @@ def uninstall def unlink n=0 - return n if !linked? %w[bin etc lib include sbin share var].map{ |d| self/d }.each do |src| next unless src.exist? src.find do |src| next if src == self dst=HOMEBREW_PREFIX+src.relative_path_from(self) - next u...
true
Other
Homebrew
brew
a45bfc87865dcd4aac640cc46fe0ef35a2b55d9c.json
MercurialDownloadStrategy: remove redundant chdir Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/download_strategy.rb
@@ -486,9 +486,7 @@ def stage Dir.chdir @clone do if @spec and @ref ohai "Checking out #{@spec} #{@ref}" - Dir.chdir @clone do - safe_system 'hg', 'archive', '--subrepos', '-y', '-r', @ref, '-t', 'files', dst - end + safe_system 'hg', 'archive', '--subrepos', '-y', '-r...
false
Other
Homebrew
brew
2488998a0fa0bdeb384961d826d2e0f4abe1b968.json
Fix typo in comment Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/exceptions.rb
@@ -149,7 +149,7 @@ class CurlDownloadStrategyError < RuntimeError class ErrorDuringExecution < RuntimeError end -# raised by Pathname#verify_checksum when cksum is nil or empty +# raised by Pathname#verify_checksum when "expected" is nil or empty class ChecksumMissingError < ArgumentError end
false
Other
Homebrew
brew
3696180fd7f6286631108e553107aa6e32d13d4d.json
Update Xcode checks for 10.8
Library/Homebrew/cmd/doctor.rb
@@ -240,6 +240,7 @@ def check_for_latest_xcode when 10.5 then "3.1.4" when 10.6 then "3.2.6" when 10.7 then "4.3.3" + when 10.8 then "4.4" else nil end if latest_xcode.nil?
true
Other
Homebrew
brew
3696180fd7f6286631108e553107aa6e32d13d4d.json
Update Xcode checks for 10.8
Library/Homebrew/macos.rb
@@ -270,8 +270,10 @@ def xcode_version "4.2" when 31 "4.3" + when 40 + "4.4" else - "4.3" + "4.4" end end end @@ -399,7 +401,8 @@ def prefer_64_bit? "4.3" => {:llvm_build_version=>2336, :clang_version=>"3.1", :clang_buil...
true
Other
Homebrew
brew
bb2e67f37e608f1987348c06c6c1435ea6850568.json
doctor: fix incorrect usage of 'or' Eventually I will stop making this mistake. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/cmd/doctor.rb
@@ -402,7 +402,7 @@ def check_xcode_select_path # with the advent of CLT-only support, we don't need xcode-select return if MacOS.clt_installed? unless File.file? "#{MacOS.xcode_folder}/usr/bin/xcodebuild" and not MacOS.xctools_fucked? - path = MacOS.app_with_bundle_id(MacOS::XCODE_4_BUNDLE_ID) or MacOS.app...
false
Other
Homebrew
brew
d4a37c673e41982e8108f734f78780fba890adb7.json
Restore completion for "link" and "ln" Commit 3b5d7939d9a660a83e29a86e6bab234f3e9f2dcb added completion for `brew link` options, but disabled completion of the actual command itself. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Contributions/brew_bash_completion.sh
@@ -393,6 +393,7 @@ _brew () home info abv install + link ln list ls log missing
false
Other
Homebrew
brew
e0b8531bc72d3297d160a108b97f9af97b5b85e1.json
Add completions for brew link
Library/Contributions/brew_bash_completion.sh
@@ -211,6 +211,24 @@ _brew_install () __brew_complete_formulae } +_brew_link () +{ + local cur="${COMP_WORDS[COMP_CWORD]}" + case "$cur" in + --*) + if __brewcomp_words_include "--dry-run"; then + return + elif __brewcomp_words_include "--force"; then + return + ...
false
Other
Homebrew
brew
f17429f842222428d31095e0f604681764824afa.json
ARGV: add .dry_run? method Add an ARGV.dry_run? helper method for '--dry-run'/'-n' now that '-n' is being used as a git-style dry-run in two commands. Closes Homebrew/homebrew#12898. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Library/Homebrew/cmd/cleanup.rb
@@ -16,7 +16,7 @@ def cleanup end clean_cache # seems like a good time to do some additional cleanup - Homebrew.prune unless ARGV.switch? 'n' + Homebrew.prune unless ARGV.dry_run? else ARGV.formulae.each do |f| cleanup_formula f @@ -39,7 +39,7 @@ def cleanup_formula f...
true
Other
Homebrew
brew
f17429f842222428d31095e0f604681764824afa.json
ARGV: add .dry_run? method Add an ARGV.dry_run? helper method for '--dry-run'/'-n' now that '-n' is being used as a git-style dry-run in two commands. Closes Homebrew/homebrew#12898. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Library/Homebrew/cmd/link.rb
@@ -9,12 +9,9 @@ def link abort "Cowardly refusing to `sudo brew link'" end - if ARGV.force? - mode = :force - elsif ARGV.include?("--dry-run") || ARGV.include?("-n") - mode = :dryrun - else - mode = nil + if ARGV.force? then mode = :force + elsif ARGV.dry_run? then mode = :d...
true
Other
Homebrew
brew
f17429f842222428d31095e0f604681764824afa.json
ARGV: add .dry_run? method Add an ARGV.dry_run? helper method for '--dry-run'/'-n' now that '-n' is being used as a git-style dry-run in two commands. Closes Homebrew/homebrew#12898. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Library/Homebrew/extend/ARGV.rb
@@ -87,6 +87,9 @@ def interactive? def one? flag? '--1' end + def dry_run? + include?('--dry-run') || switch?('n') + end def build_head? include? '--HEAD'
true
Other
Homebrew
brew
50b2a32f9a264b8a1297da6a56e37afa2c02510c.json
Add some comments
Library/Homebrew/formula_installer.rb
@@ -376,13 +376,15 @@ def audit_lib end def check_m4 + # Newer versions of Xcode don't come with autotools return if MacOS.xcode_version.to_f >= 4.3 + # If the user has added our path to dirlist, don't complain return if File.open("/usr/share/aclocal/dirlist") do |dirlist| dirlist.grep(...
false
Other
Homebrew
brew
a8c05c9772636b334aa2421ac830a0212d919c74.json
Restore some things to failed install config dump Closes Homebrew/homebrew#11091. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/cmd/--config.rb
@@ -45,11 +45,11 @@ def describe_clt @describe_clt ||= if MacOS.clt_installed? then MacOS.clt_version else 'N/A' end end - def sha - sha = HOMEBREW_REPOSITORY.cd do + def head + head = HOMEBREW_REPOSITORY.cd do `git rev-parse --verify -q HEAD 2>/dev/null`.chomp end - if sha.empty? then ...
false
Other
Homebrew
brew
75a60e5104702c8e65d6922cffec6828dc872f48.json
fetch: remove dead code Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/cmd/fetch.rb
@@ -27,10 +27,6 @@ def fetch the_tarball, _ = f.fetch next unless the_tarball.kind_of? Pathname - previous_md5 = f.active_spec.md5.to_s.downcase - previous_sha1 = f.active_spec.sha1.to_s.downcase - previous_sha2 = f.active_spec.sha256.to_s.downcase - puts "Downloaded to: #{the_tarb...
false
Other
Homebrew
brew
c2f05cfb711401a498d494e9dcc90016e9b168a7.json
Prevent error pipe object from being finalized When the first error pipe object is finalized, the underlying file descriptor is closed, breaking the pipe between the build script and the main Homebrew process. Keep a reference to this object so it isn't closed. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/build.rb
@@ -10,6 +10,8 @@ # the whole of everything must be run in at_exit because the formula has to # be the run script as __END__ must work for *that* formula. + error_pipe = nil + begin raise $! if $! # an exception was already thrown when parsing the formula @@ -35,15 +37,15 @@ # question altogethe...
false
Other
Homebrew
brew
126b1c77e36cc2336f26dcaef4512418353b5562.json
doctor: update xcode chceck * 4.3.3 is the latest on 10.7 * Give up if we don't know what the latest is (10.8 and beyond)
Library/Homebrew/cmd/doctor.rb
@@ -239,7 +239,13 @@ def check_for_latest_xcode latest_xcode = case MacOS.version when 10.5 then "3.1.4" when 10.6 then "3.2.6" - else "4.3" + when 10.7 then "4.3.3" + else nil + end + if latest_xcode.nil? + return <<-EOS.undent + Not sure what version of Xcode is the latest for OS X #{Mac...
false
Other
Homebrew
brew
56fe164e952e888496bc81495cfc0f66338d50d5.json
Teach download strategies to take a SoftwareSpec Now that a URL, version, and the (for lack of a better term) "specs" associated with said URL (e.g. the VCS revision, or a download strategy hint) are neatly bundled up in a SoftwareSpec object, it doesn't make sense to pass them individually to download strategy constr...
Library/Homebrew/cmd/create.rb
@@ -89,7 +89,10 @@ def generate unless ARGV.include? "--no-fetch" and version strategy = DownloadStrategyDetector.new(url).detect - @sha1 = strategy.new(url, name, version, nil).fetch.sha1 if strategy == CurlDownloadStrategy + spec = SoftwareSpec.new + spec.url(url) + spec.version(vers...
true
Other
Homebrew
brew
56fe164e952e888496bc81495cfc0f66338d50d5.json
Teach download strategies to take a SoftwareSpec Now that a URL, version, and the (for lack of a better term) "specs" associated with said URL (e.g. the VCS revision, or a download strategy hint) are neatly bundled up in a SoftwareSpec object, it doesn't make sense to pass them individually to download strategy constr...
Library/Homebrew/download_strategy.rb
@@ -1,9 +1,12 @@ class AbstractDownloadStrategy - def initialize url, name, version, specs - @url=url - case specs when Hash - @spec = specs.keys.first # only use first spec - @ref = specs.values.first + def initialize name, package + @url = package.url + @specs = package.specs + + case @spe...
true
Other
Homebrew
brew
56fe164e952e888496bc81495cfc0f66338d50d5.json
Teach download strategies to take a SoftwareSpec Now that a URL, version, and the (for lack of a better term) "specs" associated with said URL (e.g. the VCS revision, or a download strategy hint) are neatly bundled up in a SoftwareSpec object, it doesn't make sense to pass them individually to download strategy constr...
Library/Homebrew/formula.rb
@@ -58,7 +58,7 @@ def initialize name='__UNKNOWN__', path=nil # If we got an explicit path, use that, else determine from the name @path = path.nil? ? self.class.path(name) : Pathname.new(path) - @downloader = download_strategy.new(@active_spec.url, name, @active_spec.version, @active_spec.specs) + @d...
true
Other
Homebrew
brew
56fe164e952e888496bc81495cfc0f66338d50d5.json
Teach download strategies to take a SoftwareSpec Now that a URL, version, and the (for lack of a better term) "specs" associated with said URL (e.g. the VCS revision, or a download strategy hint) are neatly bundled up in a SoftwareSpec object, it doesn't make sense to pass them individually to download strategy constr...
Library/Homebrew/formula_support.rb
@@ -60,9 +60,9 @@ def version val=nil return @version end - def mirror val, specs=nil + def mirror val @mirrors ||= [] - @mirrors << { :url => val, :specs => specs } + @mirrors << val end end
true
Other
Homebrew
brew
af53f54b24581f697a3e5915c33e152d864cfbf6.json
fetch: use new checksum verification Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/cmd/fetch.rb
@@ -36,14 +36,10 @@ def fetch puts "SHA1: #{the_tarball.sha1}" puts "SHA256: #{the_tarball.sha2}" - unless previous_md5.nil? or previous_md5.empty? or the_tarball.md5 == previous_md5 - opoo "Formula reports different MD5: #{previous_md5}" - end - unless previous_sha1.nil? or previo...
true
Other
Homebrew
brew
af53f54b24581f697a3e5915c33e152d864cfbf6.json
fetch: use new checksum verification Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/exceptions.rb
@@ -158,15 +158,17 @@ class ChecksumMismatchError < RuntimeError attr :advice, true attr :expected attr :actual + attr :hash_type def initialize expected, actual @expected = expected @actual = actual + @hash_type = expected.hash_type.to_s.upcase super <<-EOS.undent - #{expected.h...
true
Other
Homebrew
brew
2c6e93cf8aa77c5cfa6f16cafa7bf372d3afc7ab.json
audit: handle new formula specs
Library/Homebrew/cmd/audit.rb
@@ -195,20 +195,6 @@ def audit_formula_options f, text return problems end -def audit_formula_version f, text - # Version as defined in the DSL (or nil) - version_text = f.class.send('version').to_s - - # Version as determined from the URL - version_url = Pathname.new(f.url).version - - if version_url == ver...
false
Other
Homebrew
brew
6420943552bf2847ae5063c33cd94eb9cbf39560.json
info: display available formula specs
Library/Homebrew/cmd/info.rb
@@ -49,7 +49,15 @@ def github_info f def info_formula f exec 'open', github_info(f) if ARGV.flag? '--github' - puts "#{f.name} #{f.version}" + specs = [] + stable = "stable #{f.stable.version}" if f.stable + stable += " (bottled)" if f.bottle and bottles_supported? + specs << stable if stable +...
false
Other
Homebrew
brew
b6d44dd38a69889c3e8f380d099fc9cae0decfb8.json
fetch: make use of new formula specs
Library/Homebrew/cmd/fetch.rb
@@ -21,33 +21,28 @@ def fetch puts "Fetching: #{bucket * ', '}" if bucket.size > 1 bucket.each do |f| - if ARGV.include? "--force" or ARGV.include? "-f" - where_to = f.cached_download - FileUtils.rm_rf where_to if File.exist? where_to - end - already_downloaded = f.cached_down...
false
Other
Homebrew
brew
98a11b8e57955d43f8ad82d78874c1822936aad7.json
Introduce new formula specs
Library/Homebrew/bottles.rb
@@ -3,8 +3,8 @@ def bottle_filename f, bottle_version=nil name = f.name.downcase - version = f.version || f.standard.detect_version - bottle_version = bottle_version || f.bottle_version + version = f.stable.version + bottle_version ||= f.bottle.revision.to_i "#{name}-#{version}#{bottle_native_suffix(bottle...
true
Other
Homebrew
brew
98a11b8e57955d43f8ad82d78874c1822936aad7.json
Introduce new formula specs
Library/Homebrew/compat/compatibility.rb
@@ -91,6 +91,10 @@ def self.fails_with_llvm msg=nil, data=nil def std_cmake_parameters "-DCMAKE_INSTALL_PREFIX='#{prefix}' -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev" end + + class << self + attr_rw :bottle_sha1 + end end class UnidentifiedFormula < Formula
true
Other
Homebrew
brew
98a11b8e57955d43f8ad82d78874c1822936aad7.json
Introduce new formula specs
Library/Homebrew/formula.rb
@@ -7,64 +7,89 @@ require 'patches' require 'compilers' -# Derive and define at least @url, see Library/Formula for examples + class Formula include FileUtils - attr_reader :name, :path, :url, :version, :homepage, :specs, :downloader - attr_reader :standard, :unstable, :head - attr_reader :bottle_version, ...
true
Other
Homebrew
brew
98a11b8e57955d43f8ad82d78874c1822936aad7.json
Introduce new formula specs
Library/Homebrew/formula_installer.rb
@@ -29,15 +29,15 @@ def check_install_sanity end # Building head-only without --HEAD is an error - if not ARGV.build_head? and f.standard.nil? + if not ARGV.build_head? and f.stable.nil? raise CannotInstallFormulaError, <<-EOS.undent #{f} is a head-only formula Install with `b...
true
Other
Homebrew
brew
98a11b8e57955d43f8ad82d78874c1822936aad7.json
Introduce new formula specs
Library/Homebrew/formula_specialties.rb
@@ -11,7 +11,9 @@ def install class GithubGistFormula < ScriptFileFormula def initialize name='__UNKNOWN__', path=nil super name, path - @version=File.basename(File.dirname(url))[0,6] + @stable.version(File.basename(File.dirname(url))[0,6]) + @version = @active_spec.version + validate_variable :ver...
true
Other
Homebrew
brew
98a11b8e57955d43f8ad82d78874c1822936aad7.json
Introduce new formula specs
Library/Homebrew/formula_support.rb
@@ -1,9 +1,9 @@ require 'download_strategy' +class SoftwareSpec + attr_reader :checksum, :mirrors, :specs, :strategy -# Defines a URL and download method for a stable or HEAD build -class SoftwareSpecification - attr_reader :url, :specs, :using + CHECKSUM_TYPES = [:md5, :sha1, :sha256].freeze VCS_SYMBOLS =...
true
Other
Homebrew
brew
98a11b8e57955d43f8ad82d78874c1822936aad7.json
Introduce new formula specs
Library/Homebrew/test/test_formula.rb
@@ -66,4 +66,238 @@ def test_mirror_support assert_equal downloader.url, "file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz" end end + + def test_formula_specs + f = SpecTestBall.new + + assert_equal 'http://example.com', f.homepage + assert_equal 'file:///foo.com/testball-0.1.tbz', f.url + a...
true
Other
Homebrew
brew
98a11b8e57955d43f8ad82d78874c1822936aad7.json
Introduce new formula specs
Library/Homebrew/test/testball.rb
@@ -94,3 +94,133 @@ class TestBlockWithoutBuildCompilerFailure < TestCompilerFailures cause "failure" end end + +class SpecTestBall < Formula + homepage 'http://example.com' + url 'file:///foo.com/testball-0.1.tbz' + mirror 'file:///foo.org/testball-0.1.tbz' + sha1 '482e737739d946b7c8cbaf127d9ee9c148b999f5...
true
Other
Homebrew
brew
98a11b8e57955d43f8ad82d78874c1822936aad7.json
Introduce new formula specs
Library/Homebrew/test/testing_env.rb
@@ -52,4 +52,9 @@ def shutup end end +unless ARGV.include? "--no-compat" or ENV['HOMEBREW_NO_COMPAT'] + $:.unshift(File.expand_path("#{ABS__FILE__}/../../compat")) + require 'compatibility' +end + require 'test/unit' # must be after at_exit
true
Other
Homebrew
brew
168ccb2821f1e4adb1129b2a73b51805743aee51.json
Update formula template for new X11 dependency Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/cmd/create.rb
@@ -111,9 +111,9 @@ class #{Formula.class_s name} < Formula <% elsif mode == nil %> # depends_on 'cmake' => :build <% end %> + depends_on :x11 # if your formula requires any X11/XQuartz components def install - # ENV.x11 # if your formula requires any X11 headers # ENV.j1 #...
false
Other
Homebrew
brew
65567eb55fc97925b023737456b1e989d48d68f2.json
add method to find XQuartz version
Library/Homebrew/macos.rb
@@ -5,6 +5,8 @@ module MacOS extend self XCODE_3_BUNDLE_ID = "com.apple.Xcode" CLT_STANDALONE_PKG_ID = "com.apple.pkg.DeveloperToolsCLILeo" CLT_FROM_XCODE_PKG_ID = "com.apple.pkg.DeveloperToolsCLI" + APPLE_X11_BUNDLE_ID = "org.x.X11" + XQUARTZ_BUNDLE_ID = "org.macosforge.xquartz.X11" def version MA...
false
Other
Homebrew
brew
a07085df2def6bc25ee0d118e86b10e49c68aab0.json
use XQuartz when present
Library/Homebrew/extend/ENV.rb
@@ -310,25 +310,33 @@ def libxml2 def x11 opoo "You do not have X11 installed, this formula may not build." unless MacOS.x11_installed? - if MacOS.clt_installed? - # For Xcode < 4.3 clt_installed? is true. So here is the old style /usr/X11: - # There are some config scripts (e.g. freetype) here t...
true
Other
Homebrew
brew
a07085df2def6bc25ee0d118e86b10e49c68aab0.json
use XQuartz when present
Library/Homebrew/macos.rb
@@ -313,9 +313,16 @@ def clang_build_version end end + def x11_prefix + @x11_prefix ||= if Pathname.new('/opt/X11/lib/libpng.dylib').exist? + Pathname.new('/opt/X11') + elsif Pathname.new('/usr/X11/lib/libpng.dylib').exist? + Pathname.new('/usr/X11') + end + end + def x11_installed? - ...
true
Other
Homebrew
brew
cfe58531ee6dee0f0a24f0b8d5146ea43ee88c38.json
Address some style issues in MacOS module Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/macos.rb
@@ -128,34 +128,28 @@ def dev_tools_path end def xctoolchain_path - # Beginning with Xcode 4.3, clang and some other tools are located in a xctoolchain dir. + # As of Xcode 4.3, some tools are located in the "xctoolchain" directory @xctoolchain_path ||= begin path = Pathname.new("#{MacOS.xcode...
false
Other
Homebrew
brew
8f6ee310046589680962805f58bcc07b0a064095.json
Add mdfind method to MacOS module Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/macos.rb
@@ -1,4 +1,11 @@ module MacOS extend self + + MDITEM_BUNDLE_ID_KEY = "kMDItemCFBundleIdentifier" + XCODE_4_BUNDLE_ID = "com.apple.dt.Xcode" + XCODE_3_BUNDLE_ID = "com.apple.Xcode" + CLT_STANDALONE_PKG_ID = "com.apple.pkg.DeveloperToolsCLILeo" + CLT_FROM_XCODE_PKG_ID = "com.apple.pkg.DeveloperToolsCLI" + def ve...
false
Other
Homebrew
brew
f2e076e5cc87e25602c07c030c47ecf048906176.json
Organize compiler methods Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/macos.rb
@@ -175,21 +175,6 @@ def default_compiler end end - def gcc_42_build_version - @gcc_42_build_version ||= if File.exist? "#{dev_tools_path}/gcc-4.2" \ - and not Pathname.new("#{dev_tools_path}/gcc-4.2").realpath.basename.to_s =~ /^llvm/ - `#{dev_tools_path}/gcc-4.2 --version` =~ /build (\d{4,})/ ...
false
Other
Homebrew
brew
0bb95960e642782c85eb7e227eba844607fc2d00.json
Extract MacOS module to separate file
Library/Homebrew/macos.rb
@@ -0,0 +1,408 @@ +module MacOS extend self + def version + MACOS_VERSION + end + + def cat + if mountain_lion? + :mountainlion + elsif lion? + :lion + elsif snow_leopard? + :snowleopard + elsif leopard? + :leopard + else + nil + end + end + + def clt_installed? + #...
true
Other
Homebrew
brew
0bb95960e642782c85eb7e227eba844607fc2d00.json
Extract MacOS module to separate file
Library/Homebrew/utils.rb
@@ -1,5 +1,6 @@ require 'pathname' require 'exceptions' +require 'macos' class Tty class <<self @@ -235,415 +236,6 @@ def nostdout end end -module MacOS extend self - def version - MACOS_VERSION - end - - def cat - if mountain_lion? - :mountainlion - elsif lion? - :lion - elsif sn...
true
Other
Homebrew
brew
c32e67b83cc5df5c69726f93d543eeee1c4202dd.json
remove confusing comments
Library/Homebrew/utils.rb
@@ -298,7 +298,6 @@ def locate tool return @locate_cache[tool] if @locate_cache.has_key? tool if File.executable? "/usr/bin/#{tool}" - # Always prefer the unix style. path = Pathname.new "/usr/bin/#{tool}" else # Xcrun was provided first with Xcode 4.3 and allows us to proxy @@ -336,...
false
Other
Homebrew
brew
ef65f3654ff059c4206c45893251a4d9c83f377e.json
Improve bug report wiki page text. Fixes Homebrew/homebrew#12674.
Library/Homebrew/exceptions.rb
@@ -125,16 +125,18 @@ def dump onoe "#{e.to_s.strip} (#{formula_name}.rb:#{error_line})" issues = GitHub.issues_for_formula formula_name if issues.empty? - puts "If `brew doctor' does not help diagnose the issue, please report the bug:" + puts "If `brew doctor` does not, this may help you fix o...
true
Other
Homebrew
brew
ef65f3654ff059c4206c45893251a4d9c83f377e.json
Improve bug report wiki page text. Fixes Homebrew/homebrew#12674.
Library/Homebrew/global.rb
@@ -85,7 +85,7 @@ module Homebrew extend self end FORMULA_META_FILES = %w[README README.md ChangeLog CHANGES COPYING LICENSE LICENCE COPYRIGHT AUTHORS] -ISSUES_URL = "https://github.com/mxcl/homebrew/wiki/reporting-bugs" +ISSUES_URL = "https://github.com/mxcl/homebrew/wiki/bug-fixing-checklist" unless ARGV.inclu...
true
Other
Homebrew
brew
f231a8b07962d5307c16316106a294dbfa98dba7.json
MacOS.sdk_path: use strip instead of chomp.chomp
Library/Homebrew/utils.rb
@@ -362,7 +362,7 @@ def xctoolchain_path def sdk_path(v=MacOS.version) # The path of the MacOSX SDK. if !MacOS.xctools_fucked? and File.directory? `xcode-select -print-path`.chomp - path = `#{locate('xcodebuild')} -version -sdk macosx#{v} Path 2>/dev/null`.chomp.chomp + path = `#{locate('xcodebui...
false
Other
Homebrew
brew
b9f4b682b507d093bb779a5d5355edc93c22b3cb.json
StandardCompilers: add Xcode 4.3.3
Library/Homebrew/utils.rb
@@ -628,7 +628,8 @@ def prefer_64_bit? "4.2" => {:llvm_build_version=>2336, :clang_version=>"3.0", :clang_build_version=>211}, "4.3" => {:llvm_build_version=>2336, :clang_version=>"3.1", :clang_build_version=>318}, "4.3.1" => {:llvm_build_version=>2336, :clang_version=>"3.1", :clang_build_version=>318}, ...
false
Other
Homebrew
brew
9ebb1a3d08a3c84b8f176d2cbe5fbb4fe20716a4.json
audit: prefer ARGV.build_head? to inspecting 'version' Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/cmd/audit.rb
@@ -133,6 +133,10 @@ def audit_formula_text name, text problems << " * Use ENV instead of invoking '#{$1}' to modify the environment" end + if text =~ /version == ['"]HEAD['"]/ + problems << " * Use 'ARGV.build_head?' instead of inspecting 'version'" + end + return problems end
false
Other
Homebrew
brew
075a59e3f11d71afc43b223436a593e31640770e.json
Fix indentation in MachO#mach_data Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/mach.rb
@@ -50,10 +50,10 @@ def mach_data end type = case read(4, offset + 12).unpack("N")[0] - when 0x00000002, 0x02000000 then :executable - when 0x00000006, 0x06000000 then :dylib - else :dunno - end + when 0x00000002, 0x02000000 then :executable + when...
false
Other
Homebrew
brew
1b6f23c8a96fcb78163ba5a58a5e0e342d390663.json
Add comment about error pipe (mis)behavior Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/build.rb
@@ -32,6 +32,12 @@ # can be inconvenient for the user. But we need to be safe. system "/usr/bin/sudo -k" + # The main Homebrew process expects to eventually see EOF on the error + # pipe in FormulaInstaller#build. However, if any child process fails to + # terminate (i.e, fails to close the descrip...
false
Other
Homebrew
brew
ffe21a9cd143353b3b42f278a48539480eda5a00.json
blacklist: update Xcode message for 10.8
Library/Homebrew/blacklist.rb
@@ -53,7 +53,7 @@ def blacklisted? name when /(lib)?lzma/ "lzma is now part of the xz formula." when 'xcode' then <<-EOS.undent - Xcode can be installed via the App Store (on Lion), or from: + Xcode can be installed via the App Store (on Lion or newer), or from: http://connect.apple.com/ EO...
false
Other
Homebrew
brew
34e51fb16b219cdf04bec342980abdd8d10ed7f5.json
Allow --get for non-interactive builds. This is useful for doing a --debug build, as the git repo will pick up any changes that have been made up to that point in the build process. --git is still most useful in conjunction with --interactive, though.
Library/Homebrew/build.rb
@@ -75,14 +75,16 @@ def install f end f.brew do + if ARGV.flag? '--git' + system "git init" + system "git add -A" + end if ARGV.flag? '--interactive' ohai "Entering interactive mode" puts "Type `exit' to return and finalize the installation" puts "Install to this prefix...
false
Other
Homebrew
brew
644af3696b66b282259b8c952e9f4d927c8314b9.json
Use "legacy" search API when completing tap names Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Contributions/brew_bash_completion.sh
@@ -95,28 +95,7 @@ __brew_complete_tapped () __brew_complete_taps () { if [[ -z "$__brew_cached_taps" ]]; then - __brew_cached_taps="$(/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -e ' - require "open-uri" - require "yaml" - - begin - ur...
true
Other
Homebrew
brew
644af3696b66b282259b8c952e9f4d927c8314b9.json
Use "legacy" search API when completing tap names Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Contributions/cmds/brew-ls-taps.rb
@@ -0,0 +1,18 @@ +require 'open-uri' +require 'vendor/multi_json' + +begin + open "https://api.github.com/legacy/repos/search/homebrew" do |f| + MultiJson.decode(f.read)["repositories"].each do |repo| + if repo['name'] =~ /^homebrew-(\S+)$/ + puts tap = if repo['username'] == "Homebrew" + "home...
true
Other
Homebrew
brew
73d047d3ac4fd2d3b6fc87caf92f9e08b5bcb1e9.json
Use sha1 as the default checksum for new formulae See: https://github.com/mxcl/homebrew/pull/12587
Library/Homebrew/cmd/create.rb
@@ -57,7 +57,7 @@ def __gets class FormulaCreator attr :url - attr :md5 + attr :sha1 attr :name, true attr :path, true attr :mode, true @@ -89,7 +89,7 @@ def generate unless ARGV.include? "--no-fetch" and version strategy = detect_download_strategy url - @md5 = strategy.new(url, name...
false
Other
Homebrew
brew
1cce85b1f1946279ecbcbbc0e459071e19ccf6fc.json
Handle EOF in Pathname#text_executable? Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/extend/pathname.rb
@@ -273,6 +273,8 @@ def compression_type def text_executable? %r[#!\s*(/.+)+] === open('r') { |f| f.readline } + rescue EOFError + false end def incremental_hash(hasher)
false
Other
Homebrew
brew
7af4622b0f06d0f505f4e57ea4f65b6e8626e2cc.json
Replace /usr/bin/ruby with full Framework path Rationale: some users insist on replacing the /usr/bin/ruby symlink to point to another ruby on their system, which may break homebrew. Use the full Framework path instead, which is less likely to be tampered with. This also reorganizes the brew --config checks to reflec...
Library/Contributions/brew_bash_completion.sh
@@ -95,7 +95,7 @@ __brew_complete_tapped () __brew_complete_taps () { if [[ -z "$__brew_cached_taps" ]]; then - __brew_cached_taps="$(/usr/bin/ruby -e ' + __brew_cached_taps="$(/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -e ' require "open-uri" requ...
true
Other
Homebrew
brew
7af4622b0f06d0f505f4e57ea4f65b6e8626e2cc.json
Replace /usr/bin/ruby with full Framework path Rationale: some users insist on replacing the /usr/bin/ruby symlink to point to another ruby on their system, which may break homebrew. Use the full Framework path instead, which is less likely to be tampered with. This also reorganizes the brew --config checks to reflec...
Library/Contributions/cmds/brew-server
@@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby ## brew server: Run a local webserver for browsing available and installed brews. # Note: this external command is ruby, but set up as a shell script, so that it gets exec'd.
true
Other
Homebrew
brew
7af4622b0f06d0f505f4e57ea4f65b6e8626e2cc.json
Replace /usr/bin/ruby with full Framework path Rationale: some users insist on replacing the /usr/bin/ruby symlink to point to another ruby on their system, which may break homebrew. Use the full Framework path instead, which is less likely to be tampered with. This also reorganizes the brew --config checks to reflec...
Library/Contributions/install_homebrew.rb
@@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby # This script installs to /usr/local only. To install elsewhere you can just # untar https://github.com/mxcl/homebrew/tarball/master anywhere you like.
true
Other
Homebrew
brew
7af4622b0f06d0f505f4e57ea4f65b6e8626e2cc.json
Replace /usr/bin/ruby with full Framework path Rationale: some users insist on replacing the /usr/bin/ruby symlink to point to another ruby on their system, which may break homebrew. Use the full Framework path instead, which is less likely to be tampered with. This also reorganizes the brew --config checks to reflec...
Library/Homebrew/build.rb
@@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby # This script is called by formula_installer as a separate instance. # Rationale: Formula can use __END__, Formula can change ENV
true
Other
Homebrew
brew
7af4622b0f06d0f505f4e57ea4f65b6e8626e2cc.json
Replace /usr/bin/ruby with full Framework path Rationale: some users insist on replacing the /usr/bin/ruby symlink to point to another ruby on their system, which may break homebrew. Use the full Framework path instead, which is less likely to be tampered with. This also reorganizes the brew --config checks to reflec...
Library/Homebrew/cmd/--config.rb
@@ -91,10 +91,7 @@ def dump_build_config puts hardware puts "MacOS: #{MACOS_FULL_VERSION}-#{kernel}" puts "Xcode: #{xcode_version}" - puts "/usr/bin/ruby: #{RUBY_VERSION}-#{RUBY_PATCHLEVEL}" if RUBY_VERSION.to_f != 1.8 - - ruby = Pathname.new("/usr/bin/ruby") - puts "/usr/bin/ruby => #{ruby.real...
true
Other
Homebrew
brew
7af4622b0f06d0f505f4e57ea4f65b6e8626e2cc.json
Replace /usr/bin/ruby with full Framework path Rationale: some users insist on replacing the /usr/bin/ruby symlink to point to another ruby on their system, which may break homebrew. Use the full Framework path instead, which is less likely to be tampered with. This also reorganizes the brew --config checks to reflec...
Library/Homebrew/formula_installer.rb
@@ -195,7 +195,7 @@ def build begin read.close exec '/usr/bin/nice', - '/usr/bin/ruby', + '/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby', '-I', Pathname.new(__FILE__).dirname, '-rbuild', '--',
true
Other
Homebrew
brew
7af4622b0f06d0f505f4e57ea4f65b6e8626e2cc.json
Replace /usr/bin/ruby with full Framework path Rationale: some users insist on replacing the /usr/bin/ruby symlink to point to another ruby on their system, which may break homebrew. Use the full Framework path instead, which is less likely to be tampered with. This also reorganizes the brew --config checks to reflec...
bin/brew
@@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby # -*- coding: utf-8 -*- HOMEBREW_BREW_FILE = ENV['HOMEBREW_BREW_FILE'] = File.expand_path(__FILE__)
true
Other
Homebrew
brew
a13857b15057586d1cfc268708c8112e2999a39b.json
Introduce std_cmake_args method This differs from the current std_cmake_parameters in that it returns an array instead of a string. Doing so makes dealing with it in formulae much more pleasant, and for new formula hackers, less surprising. std_cmake_parameters is retained in compat to maintain compatibility with ext...
Library/Homebrew/compat/compatibility.rb
@@ -87,6 +87,10 @@ def self.fails_with_llvm msg=nil, data=nil @cc_failures ||= CompilerFailures.new @cc_failures << fails_with_llvm_reason end + + def std_cmake_parameters + "-DCMAKE_INSTALL_PREFIX='#{prefix}' -DCMAKE_BUILD_TYPE=None -Wno-dev" + end end class UnidentifiedFormula < Formula
true
Other
Homebrew
brew
a13857b15057586d1cfc268708c8112e2999a39b.json
Introduce std_cmake_args method This differs from the current std_cmake_parameters in that it returns an array instead of a string. Doing so makes dealing with it in formulae much more pleasant, and for new formula hackers, less surprising. std_cmake_parameters is retained in compat to maintain compatibility with ext...
Library/Homebrew/formula.rb
@@ -239,8 +239,8 @@ def to_s # Setting it to Release would ignore our flags. # Note: there isn't a std_autotools variant because autotools is a lot # less consistent and the standard parameters are more memorable. - def std_cmake_parameters - "-DCMAKE_INSTALL_PREFIX='#{prefix}' -DCMAKE_BUILD_TYPE=None -Wno...
true
Other
Homebrew
brew
28f89c59a2b39738df5a6fc85711be9af250fb53.json
FormulaInstaller: fold dirlist helper into check_m4 Having in_aclocal_dirlist? defined as a method on FormulaInstaller is a little weird; since its just a return condition of check_m4, move the code there. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/formula_installer.rb
@@ -273,12 +273,6 @@ def paths @paths ||= ENV['PATH'].split(':').map{ |p| File.expand_path p } end - def in_aclocal_dirlist? - File.open("/usr/share/aclocal/dirlist") do |dirlist| - dirlist.grep(%r{^#{HOMEBREW_PREFIX}/share/aclocal$}).length > 0 - end rescue false - end - def check_PATH #...
false
Other
Homebrew
brew
428781723b9612198b05b5fb30ce60622f363011.json
Detect uncompressed tars From a patch by @RuiPereira Closes Homebrew/homebrew#12011.
Library/Homebrew/download_strategy.rb
@@ -74,7 +74,7 @@ def stage when :zip quiet_safe_system '/usr/bin/unzip', {:quiet_flag => '-qq'}, @tarball_path chdir - when :gzip, :bzip2, :compress + when :gzip, :bzip2, :compress, :tar # Assume these are also tarred # TODO check if it's really a tar archive safe_system '...
true
Other
Homebrew
brew
428781723b9612198b05b5fb30ce60622f363011.json
Detect uncompressed tars From a patch by @RuiPereira Closes Homebrew/homebrew#12011.
Library/Homebrew/extend/pathname.rb
@@ -247,16 +247,18 @@ def compression_type # OS X installer package return :pkg if self.extname == '.pkg' - # get the first six bytes + # Get enough of the file to detect common file types + # POSIX tar magic has a 257 byte offset magic_bytes = nil - File.open(self) { |f| magic_bytes = f.re...
true
Other
Homebrew
brew
995186a72c6de199114d8701cf2f3a950847ef70.json
Fix Ruby warnings. Fixes Homebrew/homebrew#11966.
Library/Homebrew/dependencies.rb
@@ -105,7 +105,7 @@ def initialize language, module_name, import_name=nil def fatal?; true; end def satisfied? - quiet_system *the_test + quiet_system(*the_test) end def message; <<-EOS.undent
true
Other
Homebrew
brew
995186a72c6de199114d8701cf2f3a950847ef70.json
Fix Ruby warnings. Fixes Homebrew/homebrew#11966.
Library/Homebrew/download_strategy.rb
@@ -355,7 +355,7 @@ def fetch git_args = %w(git clone) git_args << "--depth" << "1" if support_depth? git_args << @url << @clone - safe_system *git_args + safe_system(*git_args) else puts "Updating #{@clone}" Dir.chdir(@clone) do
true
Other
Homebrew
brew
995186a72c6de199114d8701cf2f3a950847ef70.json
Fix Ruby warnings. Fixes Homebrew/homebrew#11966.
Library/Homebrew/extend/fileutils.rb
@@ -27,6 +27,7 @@ def mktemp end # A version of mkdir that also changes to that folder in a block. + alias mkdir_old mkdir def mkdir name, &block FileUtils.mkdir(name) if block_given?
true
Other
Homebrew
brew
995186a72c6de199114d8701cf2f3a950847ef70.json
Fix Ruby warnings. Fixes Homebrew/homebrew#11966.
Library/Homebrew/extend/pathname.rb
@@ -117,6 +117,7 @@ def cp dst end # extended to support common double extensions + alias extname_old extname def extname return $1 if to_s =~ bottle_regex return $1 if to_s =~ old_bottle_regex
true
Other
Homebrew
brew
995186a72c6de199114d8701cf2f3a950847ef70.json
Fix Ruby warnings. Fixes Homebrew/homebrew#11966.
Library/Homebrew/formula.rb
@@ -592,14 +592,14 @@ def url val=nil, specs=nil def stable &block raise "url and md5 must be specified in a block" unless block_given? - instance_eval &block unless ARGV.build_devel? or ARGV.build_head? + instance_eval(&block) unless ARGV.build_devel? or ARGV.build_head? end def dev...
true
Other
Homebrew
brew
995186a72c6de199114d8701cf2f3a950847ef70.json
Fix Ruby warnings. Fixes Homebrew/homebrew#11966.
Library/Homebrew/formula_support.rb
@@ -19,7 +19,9 @@ class SoftwareSpecification def initialize url, specs=nil raise "No url provided" if url.nil? @url = url - unless specs.nil? + if specs.nil? + @using = nil + else # Get download strategy hint, if any @using = specs.delete :using # The rest of the specs a...
true
Other
Homebrew
brew
827d263d017c02637a2745ee155ee3e03725f9cd.json
brew tap: allow dashes in GitHub usernames
Library/Homebrew/cmd/tap.rb
@@ -61,7 +61,7 @@ def link_tap_formula formulae private def tap_args - ARGV.first =~ %r{^(\w+)/(homebrew-)?(\w+)$} + ARGV.first =~ %r{^(\S+)/(homebrew-)?(\w+)$} raise "Invalid usage" unless $1 and $3 [$1, $3] end
false
Other
Homebrew
brew
9d81b0d84765732f81a62fc2bf637d08ccc206f2.json
Improve Formula.resolve_alias warning.
Library/Homebrew/compat/compatibility.rb
@@ -59,6 +59,7 @@ class Formula # in compatability because the naming is somewhat confusing def self.resolve_alias name opoo 'Formula.resolve_alias is deprecated and will eventually be removed' + opoo 'Use Formula.canonical_name instead.' # Don't resolve paths or URLs return name if name.inclu...
false
Other
Homebrew
brew
fe969c21ad199ae27a113e9fb2f01c5bb3fbc942.json
Add ofail command and fix bottle command output.
Library/Contributions/cmds/brew-test-bot.rb
@@ -91,7 +91,7 @@ def initialize arg begin Formula.factory arg rescue FormulaUnavailableError - ofail "#{arg} is not a pull request number or formula." unless arg.to_i > 0 + odie "#{arg} is not a pull request number or formula." unless arg.to_i > 0 @url = arg @formulae = [] ...
true
Other
Homebrew
brew
fe969c21ad199ae27a113e9fb2f01c5bb3fbc942.json
Add ofail command and fix bottle command output.
Library/Homebrew/cmd/audit.rb
@@ -418,9 +418,6 @@ def audit end end - if errors - puts "#{problem_count} problems in #{brew_count} brews" - Homebrew.failed = true - end + ofail "#{problem_count} problems in #{brew_count} brews" if errors end end
true
Other
Homebrew
brew
fe969c21ad199ae27a113e9fb2f01c5bb3fbc942.json
Add ofail command and fix bottle command output.
Library/Homebrew/cmd/bottle.rb
@@ -5,14 +5,12 @@ module Homebrew extend self def bottle_formula f unless f.installed? - onoe "Formula not installed: #{f.name}" - Homebrew.failed = true + return ofail "Formula not installed: #{f.name}" return end unless built_bottle? f - onoe "Formula not installed with...
true
Other
Homebrew
brew
fe969c21ad199ae27a113e9fb2f01c5bb3fbc942.json
Add ofail command and fix bottle command output.
Library/Homebrew/cmd/doctor.rb
@@ -904,9 +904,8 @@ def doctor unless out.nil? or out.empty? puts unless Homebrew.failed? lines = out.to_s.split('\n') - opoo lines.shift + ofail lines.shift puts lines - Homebrew.failed = true end end
true
Other
Homebrew
brew
fe969c21ad199ae27a113e9fb2f01c5bb3fbc942.json
Add ofail command and fix bottle command output.
Library/Homebrew/cmd/install.rb
@@ -76,8 +76,7 @@ def install_formulae formulae fi.caveats fi.finish rescue CannotInstallFormulaError => e - onoe e.message - Homebrew.failed = true + ofail e.message end end end
true
Other
Homebrew
brew
fe969c21ad199ae27a113e9fb2f01c5bb3fbc942.json
Add ofail command and fix bottle command output.
Library/Homebrew/cmd/test.rb
@@ -12,15 +12,13 @@ def test ARGV.formulae.each do |f| # Cannot test uninstalled formulae unless f.installed? - puts "Testing requires the latest version of #{f.name}" - Homebrew.failed = true + ofail "Testing requires the latest version of #{f.name}" next end ...
true
Other
Homebrew
brew
fe969c21ad199ae27a113e9fb2f01c5bb3fbc942.json
Add ofail command and fix bottle command output.
Library/Homebrew/cmd/uninstall.rb
@@ -33,8 +33,7 @@ def uninstall end end rescue MultipleVersionsInstalledError => e - onoe e + ofail e puts "Use `brew remove --force #{e.name}` to remove all versions." - Homebrew.failed = true end end
true
Other
Homebrew
brew
fe969c21ad199ae27a113e9fb2f01c5bb3fbc942.json
Add ofail command and fix bottle command output.
Library/Homebrew/cmd/upgrade.rb
@@ -66,8 +66,7 @@ def upgrade_formula f installer.caveats installer.finish rescue CannotInstallFormulaError => e - onoe e - Homebrew.failed = true + ofail e rescue BuildError => e e.dump puts
true
Other
Homebrew
brew
fe969c21ad199ae27a113e9fb2f01c5bb3fbc942.json
Add ofail command and fix bottle command output.
Library/Homebrew/utils.rb
@@ -54,6 +54,11 @@ def onoe error end def ofail error + onoe error + Homebrew.failed = true +end + +def odie error onoe error exit 1 end
true
Other
Homebrew
brew
1d975de41b90ff8a80458fabf81534dc3b1108f8.json
doctor: add another path to the macgpg2 check
Library/Homebrew/cmd/doctor.rb
@@ -53,7 +53,8 @@ def check_path_for_trailing_slashes # http://sourceforge.net/projects/macgpg2/files/ def check_for_macgpg2 if File.exist? "/Applications/start-gpg-agent.app" or - File.exist? "/Library/Receipts/libiconv1.pkg" + File.exist? "/Library/Receipts/libiconv1.pkg" or + File.exist? "/usr/local...
false
Other
Homebrew
brew
a67478488f1949879a9b8718dde8bff920c3d307.json
Add Brew Test Bot for comprehensive testing. Closes Homebrew/homebrew#11642.
Library/Contributions/cmds/brew-test-bot.commit.html.erb
@@ -0,0 +1,24 @@ +<!DOCTYPE html> +<html> +<head> + <title>BrewBot: <%= @test.name %></title> + <title>BrewBot</title> + <style> + <%= css %> + </style> +</head> +<body> + <div> + <h1><a href="../index.html">BrewBot</a></h1> + <h2><%= @test.name %> <%= DateTime.now.strftime "%T %D" %></h2> + <table> + <% for step ...
true
Other
Homebrew
brew
a67478488f1949879a9b8718dde8bff920c3d307.json
Add Brew Test Bot for comprehensive testing. Closes Homebrew/homebrew#11642.
Library/Contributions/cmds/brew-test-bot.css
@@ -0,0 +1,75 @@ +body { + background: #27221a; + color: #f6e6cc; + font-family: Helvetica, Arial, sans-serif; + font-size: 1.5em; +} + +h1, h2 { + text-align: center; + font-weight: bold; +} + +h1 { + font-size: 3em; + padding-top: 0.5em; + padding-bottom: 0; + margin-bottom: 0; + text-shadow: 1px 1px 10px rgba(0,0,0,...
true
Other
Homebrew
brew
a67478488f1949879a9b8718dde8bff920c3d307.json
Add Brew Test Bot for comprehensive testing. Closes Homebrew/homebrew#11642.
Library/Contributions/cmds/brew-test-bot.index.html.erb
@@ -0,0 +1,23 @@ +<!DOCTYPE html> +<html> +<head> + <title>BrewBot</title> + <style> + <%= css %> + </style> +</head> +<body> + <div> + <h1><a href="index.html">BrewBot</h1> + <table> + <% dirs.each_with_index do |dir,index| %> + <tr> + <td><%= dir %></td> + <td><%= dates[index] %></td> + <td class='stat...
true
Other
Homebrew
brew
a67478488f1949879a9b8718dde8bff920c3d307.json
Add Brew Test Bot for comprehensive testing. Closes Homebrew/homebrew#11642.
Library/Contributions/cmds/brew-test-bot.rb
@@ -0,0 +1,277 @@ +# Comprehensively test a formula or pull request. +# +# Usage: brew test-bot [options...] <pull-request|formula> +# +# Options: +# --log: Writes log files under ./brewbot/ +# --html: Writes html and log files under ./brewbot/ +# --comment: Comment on the pull request +# --clean: Clean the Ho...
true
Other
Homebrew
brew
1fc97a81ec279d7827dcec7eabf6c1c28fe1c6be.json
Fix compiler selection tests on Xcode 4.2+ MacOS.gcc_42_build_version is nil when not available, not 0
Library/Homebrew/test/test_compilers.rb
@@ -53,7 +53,7 @@ def test_no_compiler_failures assert !(f.fails_with? :clang) assert !(f.fails_with? :llvm) assert case MacOS.gcc_42_build_version - when 0 then f.fails_with? :gcc + when nil then f.fails_with? :gcc else !(f.fails_with? :gcc) end @@ -95,7 +95,7 @@ def test_even_...
false
Other
Homebrew
brew
af7bf47e3112a9d50a1cd915d29f36fc6d6463dd.json
tests: add utility method to quell output Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/test/test_formula_install.rb
@@ -23,22 +23,12 @@ def initialize class ConfigureTests < Test::Unit::TestCase def test_detect_failed_configure - tmperr = $stderr - tmpout = $stdout - require 'stringio' - $stderr = StringIO.new - $stdout = StringIO.new - f = ConfigureFails.new - begin - f.brew { f.install } + ...
true
Other
Homebrew
brew
af7bf47e3112a9d50a1cd915d29f36fc6d6463dd.json
tests: add utility method to quell output Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/test/test_patching.rb
@@ -39,7 +39,7 @@ def read_file path end def test_single_patch - nostdout do + shutup do DefaultPatchBall.new('test_patch').brew do s = read_file 'libexec/NOOP' assert !s.include?("NOOP"), "File was unpatched." @@ -49,7 +49,7 @@ def test_single_patch end def test_patch_l...
true
Other
Homebrew
brew
af7bf47e3112a9d50a1cd915d29f36fc6d6463dd.json
tests: add utility method to quell output Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/test/testing_env.rb
@@ -35,4 +35,21 @@ module Homebrew extend self include FileUtils end +def shutup + if ARGV.verbose? + yield + else + begin + tmperr = $stderr.clone + tmpout = $stdout.clone + $stderr.reopen '/dev/null', 'w' + $stdout.reopen '/dev/null', 'w' + yield + ensure + $stderr.reope...
true
Other
Homebrew
brew
c44cb2710ba94e2caaae5de480a895ed2aab490e.json
tests: replace tests script with rake-based runner Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Contributions/cmds/brew-tests.rb
@@ -1,29 +1,11 @@ -require 'utils' - -Dir.chdir HOMEBREW_REPOSITORY + "Library/Homebrew/test" - -$tests_passed = true - -def test t - test_passed = system "/usr/bin/ruby test_#{t}.rb" - $tests_passed &&= test_passed - puts; puts "#" * 80; puts +module Homebrew extend self + def tests + (HOMEBREW_LIBRARY/'Homebre...
true
Other
Homebrew
brew
c44cb2710ba94e2caaae5de480a895ed2aab490e.json
tests: replace tests script with rake-based runner Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/test/Rakefile
@@ -0,0 +1,23 @@ +require 'rake' +require 'rake/testtask' + +Dir.chdir File.expand_path(File.dirname(__FILE__)) + +TEST_FILES = FileList['test_*.rb'] + +task :default => :test + +Rake::TestTask.new :test do |t| + t.libs << Dir.pwd + t.test_files = TEST_FILES +end + +namespace :test do + TEST_FILES.each do |file| + ...
true