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
0a9f5c68678f77ea3340de5638db5f4d6bc906e5.json
CurlApacheMirrorDownloadStrategy: fetch mirrors in JSON format Closes Homebrew/homebrew#16457.
Library/Homebrew/download_strategy.rb
@@ -148,19 +148,16 @@ def ext # Detect and download from Apache Mirror class CurlApacheMirrorDownloadStrategy < CurlDownloadStrategy def _fetch - # Fetch mirror list site require 'open-uri' - mirror_list = open(@url).read() + require 'vendor/multi_json' - # Parse out suggested mirror - # Ye...
false
Other
Homebrew
brew
aed70e50e8305e2f2e0dcb80310e0bec20aee429.json
Add tests for ARGV.filter_for_dependencies
Library/Homebrew/test/test_ARGV.rb
@@ -44,4 +44,22 @@ def test_switch? assert !ARGV.switch?('-n') end + def test_filter_for_dependencies_clears_flags + ARGV.unshift("--debug") + ARGV.filter_for_dependencies do + assert ARGV.empty? + end + end + + def test_filter_for_dependencies_ensures_argv_restored + ARGV.expects(:replace...
false
Other
Homebrew
brew
2bacf38833a83e96a6cc2a4d32c313d648351bad.json
Add tests for ENV.with_build_environment
Library/Homebrew/test/test_ENV.rb
@@ -27,12 +27,24 @@ def test_switching_compilers assert_equal ENV['OBJC'], ENV['CC'] end - def test_with_build_environment + def test_with_build_environment_restores_env before = ENV.to_hash ENV.with_build_environment do ENV['foo'] = 'bar' end assert_nil ENV['foo'] assert_equ...
false
Other
Homebrew
brew
a03bbf5797143a5acff5e2e21969d16c6afe81b8.json
Use new requirement syntax
Library/Homebrew/requirements.rb
@@ -8,9 +8,7 @@ def initialize language, module_name, import_name=nil @import_name = import_name || module_name end - def satisfied? - quiet_system(*the_test) - end + satisfy { quiet_system(*the_test) } def message; <<-EOS.undent Unsatisfied dependency: #{@module_name} @@ -65,8 +63,8 @@ def in...
false
Other
Homebrew
brew
1f505af56670599dbdb29d84ef2b683479315e6f.json
tests: add mocha mocking library
Library/Homebrew/test/testing_env.rb
@@ -65,13 +65,18 @@ def shutup end require 'test/unit' # must be after at_exit - require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser -ARGV.extend(HomebrewArgvExtension) - require 'extend/ENV' +ARGV.extend(HomebrewArgvExtension) ENV.extend(HomebrewEnvExtension) +begin + req...
false
Other
Homebrew
brew
e9158ca6dc99e3bb7ae475bee98153e78cafa2b0.json
brew upgrade: improve exit codes. exit 1 if formulae given but none outdated Closes Homebrew/homebrew#17199. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Library/Homebrew/cmd/upgrade.rb
@@ -16,11 +16,11 @@ def upgrade Homebrew.perform_preinstall_checks - outdated = if ARGV.named.empty? + if ARGV.named.empty? require 'cmd/outdated' - Homebrew.outdated_brews + outdated = Homebrew.outdated_brews else - ARGV.formulae.select do |f| + outdated = ARGV.formulae.s...
false
Other
Homebrew
brew
997f9d007563a7522173a4296f1c15e2da6e1a9b.json
Update multi_json to 1.5.0 This contains updates to the OkJson library that allow objects to define to_json for serialization, and this will be used in the upcoming options and deps work.
Library/Homebrew/test/test_json.rb
@@ -0,0 +1,16 @@ +require 'testing_env' +require 'vendor/multi_json' + +class JsonSmokeTest < Test::Unit::TestCase + def test_encode + hash = { "foo" => ["bar", "baz"], "qux" => 1 } + json = %q|{"foo":["bar","baz"],"qux":1}| + assert_equal json, MultiJson.encode(hash) + end + + def test_decode + hash = {...
true
Other
Homebrew
brew
997f9d007563a7522173a4296f1c15e2da6e1a9b.json
Update multi_json to 1.5.0 This contains updates to the OkJson library that allow objects to define to_json for serialization, and this will be used in the upcoming options and deps work.
Library/Homebrew/vendor/multi_json.rb
@@ -1,62 +1,116 @@ module MultiJson - class DecodeError < StandardError; end - module_function - - @engine = nil - - # Get the current engine class. - def engine - return @engine if @engine - self.engine = self.default_engine - @engine + class DecodeError < StandardError + attr_reader :data + def ...
true
Other
Homebrew
brew
997f9d007563a7522173a4296f1c15e2da6e1a9b.json
Update multi_json to 1.5.0 This contains updates to the OkJson library that allow objects to define to_json for serialization, and this will be used in the upcoming options and deps work.
Library/Homebrew/vendor/multi_json/adapters/json_common.rb
@@ -0,0 +1,25 @@ +module MultiJson + module Adapters + module JsonCommon + + def load(string, options={}) + string = string.read if string.respond_to?(:read) + ::JSON.parse(string, :symbolize_names => options[:symbolize_keys], :quirks_mode => true) + end + + def dump(object, options={})...
true
Other
Homebrew
brew
997f9d007563a7522173a4296f1c15e2da6e1a9b.json
Update multi_json to 1.5.0 This contains updates to the OkJson library that allow objects to define to_json for serialization, and this will be used in the upcoming options and deps work.
Library/Homebrew/vendor/multi_json/adapters/json_gem.rb
@@ -0,0 +1,12 @@ +require 'json' unless defined?(::JSON) +require 'multi_json/adapters/json_common' + +module MultiJson + module Adapters + # Use the JSON gem to dump/load. + class JsonGem + ParseError = ::JSON::ParserError + extend JsonCommon + end + end +end
true
Other
Homebrew
brew
997f9d007563a7522173a4296f1c15e2da6e1a9b.json
Update multi_json to 1.5.0 This contains updates to the OkJson library that allow objects to define to_json for serialization, and this will be used in the upcoming options and deps work.
Library/Homebrew/vendor/multi_json/adapters/json_pure.rb
@@ -0,0 +1,12 @@ +require 'json/pure' unless defined?(::JSON) +require 'multi_json/adapters/json_common' + +module MultiJson + module Adapters + # Use JSON pure to dump/load. + class JsonPure + ParseError = ::JSON::ParserError + extend JsonCommon + end + end +end
true
Other
Homebrew
brew
997f9d007563a7522173a4296f1c15e2da6e1a9b.json
Update multi_json to 1.5.0 This contains updates to the OkJson library that allow objects to define to_json for serialization, and this will be used in the upcoming options and deps work.
Library/Homebrew/vendor/multi_json/adapters/nsjsonserialization.rb
@@ -0,0 +1,34 @@ +framework 'Foundation' +require 'multi_json/adapters/ok_json' + +module MultiJson + module Adapters + class Nsjsonserialization < MultiJson::Adapters::OkJson + ParseError = ::MultiJson::OkJson::Error + + def self.load(string, options={}) + string = string.read if string.respond_to...
true
Other
Homebrew
brew
997f9d007563a7522173a4296f1c15e2da6e1a9b.json
Update multi_json to 1.5.0 This contains updates to the OkJson library that allow objects to define to_json for serialization, and this will be used in the upcoming options and deps work.
Library/Homebrew/vendor/multi_json/adapters/oj.rb
@@ -0,0 +1,26 @@ +require 'oj' unless defined?(::Oj) + +module MultiJson + module Adapters + # Use the Oj library to dump/load. + class Oj + ParseError = if defined?(::Oj::ParseError) + ::Oj::ParseError + else + SyntaxError + end + + ::Oj.default_options = {:mode => :compat} + +...
true
Other
Homebrew
brew
997f9d007563a7522173a4296f1c15e2da6e1a9b.json
Update multi_json to 1.5.0 This contains updates to the OkJson library that allow objects to define to_json for serialization, and this will be used in the upcoming options and deps work.
Library/Homebrew/vendor/multi_json/adapters/ok_json.rb
@@ -1,18 +1,18 @@ -require "vendor/multi_json/vendor/ok_json" unless defined?(::OkJson) +require 'multi_json/vendor/okjson' module MultiJson - module Engines + module Adapters class OkJson - ParseError = ::OkJson::Error + ParseError = ::MultiJson::OkJson::Error - def self.decode(string, optio...
true
Other
Homebrew
brew
997f9d007563a7522173a4296f1c15e2da6e1a9b.json
Update multi_json to 1.5.0 This contains updates to the OkJson library that allow objects to define to_json for serialization, and this will be used in the upcoming options and deps work.
Library/Homebrew/vendor/multi_json/adapters/yajl.rb
@@ -0,0 +1,18 @@ +require 'yajl' unless defined?(::Yajl) + +module MultiJson + module Adapters + # Use the Yajl-Ruby library to dump/load. + class Yajl + ParseError = ::Yajl::ParseError + + def self.load(string, options={}) #:nodoc: + ::Yajl::Parser.new(:symbolize_keys => options[:symbolize_keys...
true
Other
Homebrew
brew
997f9d007563a7522173a4296f1c15e2da6e1a9b.json
Update multi_json to 1.5.0 This contains updates to the OkJson library that allow objects to define to_json for serialization, and this will be used in the upcoming options and deps work.
Library/Homebrew/vendor/multi_json/engines/json_gem.rb
@@ -1,21 +0,0 @@ -require 'json' unless defined?(::JSON) - -module MultiJson - module Engines - # Use the JSON gem to encode/decode. - class JsonGem - ParseError = ::JSON::ParserError - - def self.decode(string, options = {}) #:nodoc: - opts = {} - opts[:symbolize_names] = options[:symbol...
true
Other
Homebrew
brew
997f9d007563a7522173a4296f1c15e2da6e1a9b.json
Update multi_json to 1.5.0 This contains updates to the OkJson library that allow objects to define to_json for serialization, and this will be used in the upcoming options and deps work.
Library/Homebrew/vendor/multi_json/engines/json_pure.rb
@@ -1,21 +0,0 @@ -require 'json/pure' unless defined?(::JSON) - -module MultiJson - module Engines - # Use JSON pure to encode/decode. - class JsonPure - ParseError = ::JSON::ParserError - - def self.decode(string, options = {}) #:nodoc: - opts = {} - opts[:symbolize_names] = options[:sym...
true
Other
Homebrew
brew
997f9d007563a7522173a4296f1c15e2da6e1a9b.json
Update multi_json to 1.5.0 This contains updates to the OkJson library that allow objects to define to_json for serialization, and this will be used in the upcoming options and deps work.
Library/Homebrew/vendor/multi_json/engines/yajl.rb
@@ -1,18 +0,0 @@ -require 'yajl' unless defined?(Yajl) - -module MultiJson - module Engines - # Use the Yajl-Ruby library to encode/decode. - class Yajl - ParseError = ::Yajl::ParseError - - def self.decode(string, options = {}) #:nodoc: - ::Yajl::Parser.new(:symbolize_keys => options[:symbolize...
true
Other
Homebrew
brew
997f9d007563a7522173a4296f1c15e2da6e1a9b.json
Update multi_json to 1.5.0 This contains updates to the OkJson library that allow objects to define to_json for serialization, and this will be used in the upcoming options and deps work.
Library/Homebrew/vendor/multi_json/vendor/ok_json.rb
@@ -1,581 +0,0 @@ -# Copyright 2011 Keith Rarick -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, me...
true
Other
Homebrew
brew
997f9d007563a7522173a4296f1c15e2da6e1a9b.json
Update multi_json to 1.5.0 This contains updates to the OkJson library that allow objects to define to_json for serialization, and this will be used in the upcoming options and deps work.
Library/Homebrew/vendor/multi_json/vendor/okjson.rb
@@ -0,0 +1,602 @@ +# encoding: UTF-8 +# +# Copyright 2011, 2012 Keith Rarick +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights...
true
Other
Homebrew
brew
997f9d007563a7522173a4296f1c15e2da6e1a9b.json
Update multi_json to 1.5.0 This contains updates to the OkJson library that allow objects to define to_json for serialization, and this will be used in the upcoming options and deps work.
Library/Homebrew/vendor/multi_json/version.rb
@@ -1,3 +1,3 @@ module MultiJson - VERSION = "1.0.3" + VERSION = "1.5.0" unless defined?(MultiJson::VERSION) end
true
Other
Homebrew
brew
bdece49b05d4fdf5bfec1ad71ca6232e43ddb4ab.json
version: mark some methods as protected
Library/Homebrew/version.rb
@@ -22,17 +22,17 @@ def to_s @elem.to_s end + protected + + attr_reader :elem + def string? - @elem.is_a? String + elem.is_a? String end def numeric? - @elem.is_a? Numeric + elem.is_a? Numeric end - - protected - - attr_reader :elem end class Version
false
Other
Homebrew
brew
2d445d54b5110e03b6a089fed25865f1d02bfed4.json
Add tex requirement * Detect `latex' and `bibtex' commands. * Recommend installing MacTeX when no LaTeX installation is found. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Library/Homebrew/dependencies.rb
@@ -78,6 +78,8 @@ def parse_symbol_spec spec, tag MysqlInstalled.new(tag) when :postgresql PostgresqlInstalled.new(tag) + when :tex + TeXInstalled.new(tag) else raise "Unsupported special dependency #{spec}" end
true
Other
Homebrew
brew
2d445d54b5110e03b6a089fed25865f1d02bfed4.json
Add tex requirement * Detect `latex' and `bibtex' commands. * Recommend installing MacTeX when no LaTeX installation is found. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Library/Homebrew/requirements.rb
@@ -271,3 +271,27 @@ def message EOS end end + +class TeXInstalled < Requirement + fatal true + env :userpaths + + def satisfied? + tex = which 'tex' + latex = which 'latex' + not tex.nil? and not latex.nil? + end + + def message; <<-EOS.undent + A LaTeX distribution is required to install. + ...
true
Other
Homebrew
brew
09b77a7785708ad7c1d72ea4b5169118aaa79268.json
Define HOMEBREW_LIBRARY for tests
Library/Homebrew/test/testing_env.rb
@@ -17,6 +17,7 @@ # homebrew tree, and we do want to test everything :) HOMEBREW_PREFIX=Pathname.new '/private/tmp/testbrew/prefix' HOMEBREW_REPOSITORY=HOMEBREW_PREFIX +HOMEBREW_LIBRARY=HOMEBREW_REPOSITORY+"Library" HOMEBREW_CACHE=HOMEBREW_PREFIX.parent+"cache" HOMEBREW_CACHE_FORMULA=HOMEBREW_PREFIX.parent+"formul...
false
Other
Homebrew
brew
bc3c07d197e010e080af2e44cd896828be10e0ff.json
Give a fresh 🍺 after hard work of brew install - Name of the brewed formula in "Summary" heading. - At the beginning of the summary line a 🍺 is given out (but only on Lion or above). This acts as a nice visual marker for the end of a brew-ing process. - When brewing a dependency, the name is highlighted in gree...
Library/Homebrew/formula_installer.rb
@@ -114,7 +114,7 @@ def install end end - oh1 "Installing #{f}" if show_header + oh1 "Installing #{Tty.green}#{f}#{Tty.reset}" if show_header if install_bottle pour @@ -133,7 +133,7 @@ def install_dependency dep fi = FormulaInstaller.new(dep, dep_tab) fi.ignore_deps = true ...
true
Other
Homebrew
brew
bc3c07d197e010e080af2e44cd896828be10e0ff.json
Give a fresh 🍺 after hard work of brew install - Name of the brewed formula in "Summary" heading. - At the beginning of the summary line a 🍺 is given out (but only on Lion or above). This acts as a nice visual marker for the end of a brew-ing process. - When brewing a dependency, the name is highlighted in gree...
Library/Homebrew/utils.rb
@@ -42,7 +42,7 @@ def ohai title, *sput def oh1 title title = title.to_s[0, Tty.width - 4] if $stdout.tty? unless ARGV.verbose? - puts "#{Tty.green}==> #{Tty.reset}#{title}" + puts "#{Tty.green}==>#{Tty.white} #{title}#{Tty.reset}" end def opoo warning
true
Other
Homebrew
brew
951620f146fde045f106093fcd510a345a6fddd1.json
Restore ARGV even if an exception is raised
Library/Homebrew/extend/ARGV.rb
@@ -181,10 +181,9 @@ def filter_for_dependencies flags_to_clear.concat %w[--verbose -v] if quieter? flags_to_clear.each {|flag| delete flag} - ret = yield - - replace old_args - ret + yield + ensure + replace(old_args) end private
false
Other
Homebrew
brew
0949d952dc1a0eda002108b35c7fda38df7448fc.json
Define Symbol#to_proc for Ruby 1.8.6 Ruby 1.8.6 doesn't have Symbol#to_proc, which allows things like map(&:to_s) rather than map { |o| o.to_s }. 1.8.7 does, though, and since it is used in a bunch of the superenv code we should attempt to keep it compatible with 1.8.6. Closes Homebrew/homebrew#16046.
Library/Homebrew/extend/symbol.rb
@@ -0,0 +1,5 @@ +class Symbol + def to_proc + proc { |obj, *args| obj.send(self, *args) } + end unless method_defined?(:to_proc) +end
true
Other
Homebrew
brew
0949d952dc1a0eda002108b35c7fda38df7448fc.json
Define Symbol#to_proc for Ruby 1.8.6 Ruby 1.8.6 doesn't have Symbol#to_proc, which allows things like map(&:to_s) rather than map { |o| o.to_s }. 1.8.7 does, though, and since it is used in a bunch of the superenv code we should attempt to keep it compatible with 1.8.6. Closes Homebrew/homebrew#16046.
Library/Homebrew/global.rb
@@ -2,6 +2,7 @@ require 'extend/pathname' require 'extend/ARGV' require 'extend/string' +require 'extend/symbol' require 'utils' require 'exceptions' require 'set'
true
Other
Homebrew
brew
05772f8ccfa16ca27e75fa22b7e590241a19b03e.json
doctor: use -V for python version `python --version` doesn't work in some (very) old versions of python. While I doubt this is going to come up very often, it's theoretically possible someone has an old python first in their path. (python -V works on all versions I'm aware of, including python3, and comes before --ver...
Library/Homebrew/cmd/doctor.rb
@@ -890,8 +890,10 @@ def check_for_enthought_python def check_for_bad_python_symlink return unless which "python" - # Indeed Python --version outputs to stderr (WTF?) - `python --version 2>&1` =~ /Python (\d+)\./ + # Indeed Python -V outputs to stderr (WTF?) + `python -V 2>&1` =~ /Python (\d+)\./ + # This wo...
false
Other
Homebrew
brew
c2fd7856d207dca4ec498ea611eec2cdeb40a617.json
Prevent repeated lookups of nil-valued keys
Library/Homebrew/macos.rb
@@ -20,22 +20,23 @@ def locate tool # Don't call tools (cc, make, strip, etc.) directly! # Give the name of the binary you look for as a string to this method # in order to get the full path back as a Pathname. - @locate ||= {} - @locate[tool.to_s] ||= if File.executable? "/usr/bin/#{tool}" - ...
false
Other
Homebrew
brew
429caf69a9bc3f86e510933d45c8d0cad6db7d10.json
Remove Array subclassing Inheriting from Array (and other core types) is problematic: - It exposes a very wide interface with many methods that are not really relevant to the subclass. - It can cause some weird side effects, as many Array operations are in C and have hardcoded return values; for example, ...
Library/Homebrew/compilers.rb
@@ -1,19 +1,45 @@ -class Compilers < Array - def include? cc +class Compilers + include Enumerable + + def initialize(*args) + @compilers = Array.new(*args) + end + + def each(*args, &block) + @compilers.each(*args, &block) + end + + def include?(cc) cc = cc.name if cc.is_a? Compiler - self.any? { ...
true
Other
Homebrew
brew
429caf69a9bc3f86e510933d45c8d0cad6db7d10.json
Remove Array subclassing Inheriting from Array (and other core types) is problematic: - It exposes a very wide interface with many methods that are not really relevant to the subclass. - It can cause some weird side effects, as many Array operations are in C and have hardcoded return values; for example, ...
Library/Homebrew/dependencies.rb
@@ -85,11 +85,28 @@ def parse_symbol_spec spec, tag end +class Dependencies + include Enumerable + + def initialize(*args) + @deps = Array.new(*args) + end + + def each(*args, &block) + @deps.each(*args, &block) + end -# A list of formula dependencies. -class Dependencies < Array def <<(o) - sup...
true
Other
Homebrew
brew
429caf69a9bc3f86e510933d45c8d0cad6db7d10.json
Remove Array subclassing Inheriting from Array (and other core types) is problematic: - It exposes a very wide interface with many methods that are not really relevant to the subclass. - It can cause some weird side effects, as many Array operations are in C and have hardcoded return values; for example, ...
Library/Homebrew/test/test_dependencies.rb
@@ -30,7 +30,7 @@ def test_dependency_tags def test_no_duplicate_dependencies @d.add 'foo' @d.add 'foo' => :build - assert_equal 1, @d.deps.length + assert_equal 1, @d.deps.count assert_empty @d.find_dependency('foo').tags end end
true
Other
Homebrew
brew
7473d2b12f8e39385df3e34a8d4e49655a403d3a.json
Fix local bottle installation with hyphens.
Library/Homebrew/formula.rb
@@ -357,7 +357,7 @@ def self.factory name install_type = :from_url elsif name.match bottle_regex bottle_filename = Pathname(name).realpath - name = name.split('-').first + name = bottle_filename.basename.to_s.rpartition('-').first path = Formula.path(name) install_type = :from...
false
Other
Homebrew
brew
6641fc4017d2b279ef7ff71fc39a55830d12099a.json
version: mark some implementation details as protected
Library/Homebrew/version.rb
@@ -1,8 +1,6 @@ class VersionElement include Comparable - attr_reader :elem - def initialize elem elem = elem.to_s.downcase @elem = case elem @@ -31,6 +29,10 @@ def string? def numeric? @elem.is_a? Numeric end + + protected + + attr_reader :elem end class Version @@ -45,10 +47,6 @@ ...
false
Other
Homebrew
brew
6672ef5f9f4c89353ec5ae8031bb826dcf486b36.json
Add support for external ocaml deps via opam Closes Homebrew/homebrew#16280. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Library/Homebrew/dependencies.rb
@@ -16,7 +16,7 @@ class DependencyCollector # Define the languages that we can handle as external dependencies. LANGUAGE_MODULES = [ - :chicken, :jruby, :lua, :node, :perl, :python, :rbx, :ruby + :chicken, :jruby, :lua, :node, :ocaml, :perl, :python, :rbx, :ruby ].freeze attr_reader :deps, :require...
true
Other
Homebrew
brew
6672ef5f9f4c89353ec5ae8031bb826dcf486b36.json
Add support for external ocaml deps via opam Closes Homebrew/homebrew#16280. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Library/Homebrew/requirements.rb
@@ -25,6 +25,7 @@ def the_test when :jruby then %W{/usr/bin/env jruby -rubygems -e require\ '#{@import_name}'} when :lua then %W{/usr/bin/env luarocks show #{@import_name}} when :node then %W{/usr/bin/env node -e require('#{@import_name}');} + when :ocaml then %W{/usr/bin/env opam list #{@impo...
true
Other
Homebrew
brew
4bcdb8aeb3ecee272722c9bb1eaa6e842dbeb7be.json
audit: remove silly audit, remove duplicate audit
Library/Homebrew/cmd/audit.rb
@@ -277,13 +277,8 @@ def audit_text end # Commented-out cmake support from default template - if (text =~ /# depends_on 'cmake'/) or (text =~ /# system "cmake/) - problem "Commented cmake support found" - end - - # 2 (or more in an if block) spaces before depends_on, please - if text =~ /^\...
false
Other
Homebrew
brew
a0d53f7bc1c78a5425e1fc53bb82fa5f1a0061d8.json
audit: check conflict names
Library/Homebrew/cmd/audit.rb
@@ -155,6 +155,15 @@ def audit_deps end end + def audit_conflicts + f.conflicts.each do |req| + begin + conflict_f = Formula.factory req.formula + rescue + problem "Can't find conflicting formula \"#{req.formula}\"." + end + end + end def audit_urls unless f.home...
false
Other
Homebrew
brew
7a4facae2fc4468e2bc80c847ede1e51a1ed6230.json
Guess system XQuartz version when mdfind fails Fixes Homebrew/homebrew#16857.
Library/Homebrew/macos/xquartz.rb
@@ -11,8 +11,19 @@ def version path = MacOS.app_with_bundle_id(FORGE_BUNDLE_ID) || MacOS.app_with_bundle_id(APPLE_BUNDLE_ID) if not path.nil? and path.exist? `mdls -raw -name kMDItemVersion "#{path}" 2>/dev/null`.strip + elsif prefix.to_s == "/usr/X11" + # Some users disable Spotlight...
false
Other
Homebrew
brew
05f29e7463e793ec3c77d5b1b1d2264a44887810.json
brew-pull: add missing require.
Library/Contributions/cmds/brew-pull.rb
@@ -2,6 +2,7 @@ # Optionally, installs it too. require 'utils' +require 'formula' def tap arg match = arg.match(%r[homebrew-(\w+)/])
false
Other
Homebrew
brew
755a2fbe52cb1938db1093f98d2b83f3f1701828.json
Add caveats class and use in brew info. Probably a better approach than reverted e721c7. Fixes Homebrew/homebrew#16604.
Library/Homebrew/caveats.rb
@@ -0,0 +1,85 @@ +class Caveats + def self.print f + s = [] + + unless f.caveats.to_s.strip.empty? + s << f.caveats + end + + keg = Keg.new(f.prefix) rescue nil + keg ||= Keg.new(f.opt_prefix.realpath) rescue nil + keg ||= Keg.new(f.linked_keg.realpath) rescue nil + + if keg and keg.completio...
true
Other
Homebrew
brew
755a2fbe52cb1938db1093f98d2b83f3f1701828.json
Add caveats class and use in brew info. Probably a better approach than reverted e721c7. Fixes Homebrew/homebrew#16604.
Library/Homebrew/cmd/info.rb
@@ -1,6 +1,7 @@ require 'formula' require 'tab' require 'keg' +require 'caveats' module Homebrew extend self def info @@ -119,10 +120,7 @@ def info_formula f Homebrew.dump_options_for_formula f end - unless f.caveats.to_s.strip.empty? - ohai "Caveats" - puts f.caveats - end + C...
true
Other
Homebrew
brew
755a2fbe52cb1938db1093f98d2b83f3f1701828.json
Add caveats class and use in brew info. Probably a better approach than reverted e721c7. Fixes Homebrew/homebrew#16604.
Library/Homebrew/formula_installer.rb
@@ -3,6 +3,7 @@ require 'keg' require 'tab' require 'bottles' +require 'caveats' class FormulaInstaller attr :f @@ -143,100 +144,15 @@ def install_dependency dep end def caveats - s = [] - - unless f.caveats.to_s.strip.empty? - s << f.caveats - @show_summary_heading = true - end - - ...
true
Other
Homebrew
brew
de1eabf22c0137e4e0ad8c34cc47fd86cb78e557.json
Fix some doublethink in the Xcode module Xcode.prefix and Xcode.installed? use slightly different heuristics to find Xcode. In fact, .installed? basically duplicates a portion of the .prefix logic. In practice, the methods results are usually consistent, but .installed? does not handle non-standard prefixes if mdfind ...
Library/Homebrew/macos/xcode.rb
@@ -58,12 +58,7 @@ def prefix end def installed? - # Telling us whether the Xcode.app is installed or not. - @installed ||= V4_BUNDLE_PATH.exist? || - V3_BUNDLE_PATH.exist? || - MacOS.app_with_bundle_id(V4_BUNDLE_ID) || - MacOS.app_with_bundle_id(V3_BUNDLE_ID) || - false + not prefi...
false
Other
Homebrew
brew
9362a7c89732a1cea6a1ada1062fedcf24505b8a.json
Respect BROWSER environment variable
Library/Homebrew/cmd/create.rb
@@ -8,9 +8,9 @@ def create # Allow searching MacPorts or Fink. if ARGV.include? '--macports' - exec "open", "http://www.macports.org/ports.php?by=name&substr=#{ARGV.next}" + exec_browser "http://www.macports.org/ports.php?by=name&substr=#{ARGV.next}" elsif ARGV.include? '--fink' - exec "...
true
Other
Homebrew
brew
9362a7c89732a1cea6a1ada1062fedcf24505b8a.json
Respect BROWSER environment variable
Library/Homebrew/cmd/home.rb
@@ -1,9 +1,9 @@ module Homebrew extend self def home if ARGV.named.empty? - exec "open", HOMEBREW_WWW + exec_browser HOMEBREW_WWW else - exec "open", *ARGV.formulae.map{ |f| f.homepage } + exec_browser *ARGV.formulae.map{ |f| f.homepage } end end end
true
Other
Homebrew
brew
9362a7c89732a1cea6a1ada1062fedcf24505b8a.json
Respect BROWSER environment variable
Library/Homebrew/cmd/search.rb
@@ -4,9 +4,9 @@ module Homebrew extend self def search if ARGV.include? '--macports' - exec "open", "http://www.macports.org/ports.php?by=name&substr=#{ARGV.next}" + exec_browser "http://www.macports.org/ports.php?by=name&substr=#{ARGV.next}" elsif ARGV.include? '--fink' - exec "open", "htt...
true
Other
Homebrew
brew
9362a7c89732a1cea6a1ada1062fedcf24505b8a.json
Respect BROWSER environment variable
Library/Homebrew/utils.rb
@@ -171,11 +171,18 @@ def which_editor def exec_editor *args return if args.to_s.empty? + safe_exec(which_editor, *args) +end + +def exec_browser *args + browser = ENV['HOMEBREW_BROWSER'] || ENV['BROWSER'] || "open" + safe_exec(browser, *args) +end - # Invoke bash to evaluate env vars in $EDITOR - # This a...
true
Other
Homebrew
brew
1bce10ad6caa96614a770e1e1de86ffb25215e42.json
Replace sceaga/homebrew with mistydemeo/tigerbrew @sceaga has discontinued his homebrew fork, so tigerbrew is now PPC/ Tiger users' best bet.
Library/Homebrew/cmd/install.rb
@@ -29,7 +29,7 @@ def check_ppc case Hardware.cpu_type when :ppc, :dunno abort <<-EOS.undent Sorry, Homebrew does not support your computer's CPU architecture. - For PPC support, see: http://github.com/sceaga/homebrew/tree/powerpc + For PPC support, see: https://github.com/mistydemeo/...
true
Other
Homebrew
brew
1bce10ad6caa96614a770e1e1de86ffb25215e42.json
Replace sceaga/homebrew with mistydemeo/tigerbrew @sceaga has discontinued his homebrew fork, so tigerbrew is now PPC/ Tiger users' best bet.
bin/brew
@@ -38,7 +38,7 @@ end if MACOS and MACOS_VERSION < 10.5 abort <<-EOABORT.undent Homebrew requires Leopard or higher. For Tiger support, see: - http://github.com/sceaga/homebrew/tree/tiger + https://github.com/mistydemeo/tigerbrew EOABORT end
true
Other
Homebrew
brew
d6299af86c6f8304f629184298114ef244e52bd8.json
utils: replace shell `which` with native code Originally written for tigerbrew, but useful enough for core. Replaces the shelled-out which in utils.rb with a native-ruby equivalent, which is moderately faster. Closes Homebrew/homebrew#16659. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Library/Homebrew/utils.rb
@@ -152,12 +152,8 @@ def puts_columns items, star_items=[] end def which cmd - path = `/usr/bin/which #{cmd} 2>/dev/null`.chomp - if path.empty? - nil - else - Pathname.new(path) - end + dir = ENV['PATH'].split(':').find {|p| File.executable? File.join(p, cmd)} + Pathname.new(File.join(dir, cmd)) unless...
false
Other
Homebrew
brew
f8d253950fe9c711a3743266d09effb37cdc5bd3.json
Add a small DSL for setting requirement options
Library/Homebrew/dependencies.rb
@@ -159,7 +159,9 @@ def initialize(*tags) # Should return true if this requirement is met. def satisfied?; false; end # Should return true if not meeting this requirement should fail the build. - def fatal?; false; end + def fatal? + self.class.fatal || false + end # The message to show when the requi...
true
Other
Homebrew
brew
f8d253950fe9c711a3743266d09effb37cdc5bd3.json
Add a small DSL for setting requirement options
Library/Homebrew/requirements.rb
@@ -1,13 +1,13 @@ # A dependency on a language-specific module. class LanguageModuleDependency < Requirement + fatal true + def initialize language, module_name, import_name=nil @language = language @module_name = module_name @import_name = import_name || module_name end - def fatal?; true; e...
true
Other
Homebrew
brew
d2d4813a07ccc077690bb86e522744fa19d2bdd4.json
doctor: add helper for printing file listings
Library/Homebrew/cmd/doctor.rb
@@ -64,6 +64,10 @@ def find_relative_paths *relative_paths found + relative_paths.map{|f| File.join(prefix, f) }.select{|f| File.exist? f } end end + + def inject_file_list(list, str) + list.inject(str) { |s, f| s << " #{f}\n" } + end ############# END HELPERS # See https://github.com/mxcl/ho...
false
Other
Homebrew
brew
73a206a316dcd081a226f341f87673c864c256fa.json
doctor: avoid pointless creation of pathname object
Library/Homebrew/cmd/doctor.rb
@@ -310,7 +310,7 @@ def __check_subdir_access base def check_access_usr_local return unless HOMEBREW_PREFIX.to_s == '/usr/local' - unless Pathname('/usr/local').writable_real? then <<-EOS.undent + unless File.writable_real?("/usr/local") then <<-EOS.undent The /usr/local directory is not writable. Eve...
false
Other
Homebrew
brew
a64e9e542f04b845f12f18f644d6d33a170e3ada.json
doctor: run slowest checks last
Library/Homebrew/cmd/doctor.rb
@@ -1020,7 +1020,7 @@ def doctor checks.methods.sort << "check_for_linked_keg_only_brews" << "check_for_outdated_homebrew" else ARGV.named - end.select{ |method| method =~ /^check_/ }.uniq + end.select{ |method| method =~ /^check_/ }.reverse.uniq.reverse methods.each do |method| o...
false
Other
Homebrew
brew
1e51ccb30d0a8bcbbb843d2cff1739cfdc94e38b.json
cleanup: fix 1.8.6 compatibilty issue Fixes Homebrew/homebrew#16655.
Library/Homebrew/cmd/cleanup.rb
@@ -94,7 +94,7 @@ def can_cleanup? elsif opt_prefix.directory? # SHA records were added to INSTALL_RECEIPTS the same day as opt symlinks !Formula.installed. - select{ |ff| ff.deps.map(&:to_s).include? name }. + select{ |ff| ff.deps.map{ |d| d.to_s }.include? name }. map{ |ff| f...
false
Other
Homebrew
brew
d23366ae9a39390a31f5c1a424209c8169cfa7cb.json
Add launchctl_instructions method Closes Homebrew/homebrew#16604. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Library/Homebrew/cmd/info.rb
@@ -124,6 +124,8 @@ def info_formula f puts f.caveats end + f.launchctl_instructions + rescue FormulaUnavailableError # check for DIY installation d = HOMEBREW_PREFIX+name
true
Other
Homebrew
brew
d23366ae9a39390a31f5c1a424209c8169cfa7cb.json
Add launchctl_instructions method Closes Homebrew/homebrew#16604. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Library/Homebrew/formula.rb
@@ -115,6 +115,64 @@ def prefix end def rack; prefix.parent end + def launchctl_instructions + if plist or Keg.new(prefix).plist_installed? + destination = plist_startup ? '/Library/LaunchDaemons' \ + : '~/Library/LaunchAgents' + + plist_filename = plist_path.bas...
true
Other
Homebrew
brew
d23366ae9a39390a31f5c1a424209c8169cfa7cb.json
Add launchctl_instructions method Closes Homebrew/homebrew#16604. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Library/Homebrew/formula_installer.rb
@@ -174,60 +174,7 @@ def caveats EOS end - if f.plist or keg.plist_installed? - destination = f.plist_startup ? '/Library/LaunchDaemons' \ - : '~/Library/LaunchAgents' - - plist_filename = f.plist_path.basename - plist_link = "#{destination}/#{plist_f...
true
Other
Homebrew
brew
3eedfd80249bc5e54a665656c4554d0f8db1ef3f.json
brew test-bot: handle dependencies better.
Library/Contributions/cmds/brew-test-bot.rb
@@ -244,13 +244,20 @@ def setup def formula formula @category = __method__.to_s + ".#{formula}" + dependencies = `brew deps #{formula}`.split("\n") + dependencies -= `brew list`.split("\n") + dependencies = dependencies.join(' ') + test "brew audit #{formula}" - test "brew fetch --deps #{form...
false
Other
Homebrew
brew
5ce1caa1f3679244ed120e3f091001c5afabcf74.json
Improve Xcode and CLT config reporting We support three configurations: Xcode-only, CLT-only, and Xcode with CLT. Our configuration output should correctly reflect this. While MacOS::Xcode.version has to continue to return a guess if Xcode is not installed in order to maintain backwards compatibility, this is an impl...
Library/Homebrew/cmd/--config.rb
@@ -29,24 +29,22 @@ def clang_build @clang_build ||= MacOS.clang_build_version end - def describe_xcode - @describe_xcode ||= begin - default_prefix = case MacOS.version - when 10.5, 10.6 then '/Developer' - else '/Applications/Xcode.app/Contents/Developer' - end - - guess =...
true
Other
Homebrew
brew
5ce1caa1f3679244ed120e3f091001c5afabcf74.json
Improve Xcode and CLT config reporting We support three configurations: Xcode-only, CLT-only, and Xcode with CLT. Our configuration output should correctly reflect this. While MacOS::Xcode.version has to continue to return a guess if Xcode is not installed in order to maintain backwards compatibility, this is an impl...
Library/Homebrew/macos/xcode.rb
@@ -147,6 +147,14 @@ def provides_autotools? def provides_gcc? version.to_f < 4.3 end + + def default_prefix? + if version.to_f < 4.3 + %r{^/Developer} === prefix + else + %r{^/Applications/Xcode.app} === prefix + end + end end module MacOS::CLT extend self
true
Other
Homebrew
brew
fe4e73db323c7245f26b973ce78fa28f7e4433d4.json
Fix stupid typo in bottle fix.
Library/Homebrew/macos.rb
@@ -226,7 +226,7 @@ def pkgutil_info id def bottles_supported? raise_if_failed=false # We support bottles on all versions of OS X except 32-bit Snow Leopard. - if Hardware.is_32_bit? and MacOS.version = :snow_leopard + if Hardware.is_32_bit? and MacOS.version == :snow_leopard return false unless ...
false
Other
Homebrew
brew
9a4567c2f971320fa63cef3b5e31638a0177aae6.json
pathname.rb: Pass -s to du instead of -d0 The option `du -s` is equivalent to `du -d0`. The former is a POSIX standard (IEEE Std 1003.1-2008), whereas the latter is a BSD extension. From the BSD man page: `-s Display an entry for each specified file. (Equivalent to -d 0)` From SUSv4: `-s Instead of the default outpu...
Library/Homebrew/extend/pathname.rb
@@ -164,7 +164,7 @@ def abv out='' n=`find #{to_s} -type f ! -name .DS_Store | wc -l`.to_i out<<"#{n} files, " if n > 1 - out<<`/usr/bin/du -hd0 #{to_s} | cut -d"\t" -f1`.strip + out<<`/usr/bin/du -hs #{to_s} | cut -d"\t" -f1`.strip end def version
false
Other
Homebrew
brew
4b0e663c2c36db0870688e99fc8a28a758968021.json
Improve bottle error messages. On installation or creation of a bottle error out of the current machine does not support bottles. References Homebrew/homebrew#16291.
Library/Homebrew/bottles.rb
@@ -10,7 +10,7 @@ def bottle_filename f, bottle_version=nil end def install_bottle? f - return true if ARGV.include? '--install-bottle' + return true if ARGV.include? '--install-bottle' and MacOS.bottles_supported?(true) return true if f.downloader and defined? f.downloader.local_bottle_path \ and f.downl...
true
Other
Homebrew
brew
4b0e663c2c36db0870688e99fc8a28a758968021.json
Improve bottle error messages. On installation or creation of a bottle error out of the current machine does not support bottles. References Homebrew/homebrew#16291.
Library/Homebrew/extend/ARGV.rb
@@ -130,7 +130,7 @@ def build_32_bit? end def build_bottle? - include? '--build-bottle' and MacOS.bottles_supported? + include? '--build-bottle' and MacOS.bottles_supported?(true) end def build_from_source?
true
Other
Homebrew
brew
4b0e663c2c36db0870688e99fc8a28a758968021.json
Improve bottle error messages. On installation or creation of a bottle error out of the current machine does not support bottles. References Homebrew/homebrew#16291.
Library/Homebrew/macos.rb
@@ -228,11 +228,24 @@ def pkgutil_info id `/usr/sbin/pkgutil --pkg-info "#{id}" 2>/dev/null`.strip end - def bottles_supported? + def bottles_supported? raise_if_failed=false # We support bottles on all versions of OS X except 32-bit Snow Leopard. - (Hardware.is_64_bit? or not MacOS.version >= :snow...
true
Other
Homebrew
brew
549b07e8df341b25f218b9251ab60644519f1bdb.json
Fix bad reference to local_bottle_path. Fixes Homebrew/homebrew#16337.
Library/Homebrew/bottles.rb
@@ -11,7 +11,8 @@ def bottle_filename f, bottle_version=nil def install_bottle? f return true if ARGV.include? '--install-bottle' - return true if f.downloader and f.downloader.local_bottle_path + return true if f.downloader and defined? f.downloader.local_bottle_path \ + and f.downloader.local_bottle_path ...
false
Other
Homebrew
brew
9c294364c63e61da8a1e292ca8f7894354e5218d.json
Fix Formula.factory for Formula subclasses Fixes Homebrew/homebrew#16288.
Library/Homebrew/formula.rb
@@ -395,7 +395,7 @@ def self.factory name raise LoadError end - raise NameError if klass.superclass != Formula + raise NameError if !klass.ancestors.include? Formula return klass.new(name) if install_type == :from_name return klass.new(name, path.to_s)
false
Other
Homebrew
brew
faf51f254d912e5e0c39a1f4fa5a696bd67c56c4.json
Make generic caveats for launchd plist files.
Library/Homebrew/formula.rb
@@ -139,10 +139,13 @@ def etc; HOMEBREW_PREFIX+'etc' end def var; HOMEBREW_PREFIX+'var' end # override this to provide a plist - def startup_plist; nil; end + def plist; nil; end + alias :startup_plist :plist # plist name, i.e. the name of the launchd service def plist_name; 'homebrew.mxcl.'+name end ...
true
Other
Homebrew
brew
faf51f254d912e5e0c39a1f4fa5a696bd67c56c4.json
Make generic caveats for launchd plist files.
Library/Homebrew/formula_installer.rb
@@ -160,7 +160,6 @@ def caveats end keg = Keg.new(f.prefix) - if keg.completion_installed? :bash ohai 'Caveats', <<-EOS.undent Bash completion has been installed to: @@ -174,6 +173,45 @@ def caveats #{HOMEBREW_PREFIX}/share/zsh/site-functions EOS end + + if f...
true
Other
Homebrew
brew
faf51f254d912e5e0c39a1f4fa5a696bd67c56c4.json
Make generic caveats for launchd plist files.
Library/Homebrew/keg.rb
@@ -76,6 +76,12 @@ def completion_installed? shell dir.directory? and not dir.children.length.zero? end + def plist_installed? + Dir.chdir self do + not Dir.glob("*.plist").empty? + end + end + def version require 'version' Version.new(basename.to_s)
true
Other
Homebrew
brew
340769443c5d2644afdb3af817ea23c0176c89d8.json
Rewrite plists when installing from a bottle
Library/Homebrew/extend/pathname.rb
@@ -98,7 +98,7 @@ def install_symlink_p src, new_basename = nil # we assume this pathname object is a file obviously def write content - #raise "Will not overwrite #{to_s}" if exist? and not ARGV.force? + raise "Will not overwrite #{to_s}" if exist? and not ARGV.force? dirname.mkpath File.open(s...
true
Other
Homebrew
brew
340769443c5d2644afdb3af817ea23c0176c89d8.json
Rewrite plists when installing from a bottle
Library/Homebrew/formula_installer.rb
@@ -288,9 +288,9 @@ def link end def install_plist - # Install a plist if one is defined - # Skip plist file exists check: https://github.com/mxcl/homebrew/issues/15849 if f.startup_plist + # A plist may already exist if we are installing from a bottle + f.plist_path.unlink if f.plist_path....
true
Other
Homebrew
brew
c9ef48724ccd4a46909f619a9578b3c491e08355.json
Remove outdated comment
Library/Homebrew/formula.rb
@@ -78,10 +78,7 @@ def installed? end def explicitly_requested? - # `ARGV.formulae` will throw an exception if it comes up with an empty list. - # FIXME: `ARGV.formulae` shouldn't be throwing exceptions, see issue #8823 - return false if ARGV.named.empty? - ARGV.formulae.include? self + ARGV.formul...
false
Other
Homebrew
brew
8cc3479fb7d2fb0d3ff02ccf08ca27abb8bc51da.json
tests: add profiling support `rake profile` will run ruby-prof on the test suite if the ruby-prof gem is installed.
Library/Homebrew/test/.gitignore
@@ -1 +1,2 @@ /coverage +/prof
true
Other
Homebrew
brew
8cc3479fb7d2fb0d3ff02ccf08ca27abb8bc51da.json
tests: add profiling support `rake profile` will run ruby-prof on the test suite if the ruby-prof gem is installed.
Library/Homebrew/test/Rakefile
@@ -3,14 +3,13 @@ require 'rake/testtask' require 'pathname' TEST_DIRECTORY = Pathname.new(File.expand_path(__FILE__)).parent.realpath - TEST_FILES = FileList["#{TEST_DIRECTORY}/test_*.rb"] -Dir.chdir TEST_DIRECTORY +Dir.chdir(TEST_DIRECTORY) task :default => :test -Rake::TestTask.new :test do |t| +Rake::Te...
true
Other
Homebrew
brew
c6a8dd247e4c31ca1e9e2dba613fae9b9e65b78a.json
Remove m4 macro warning. Fixes Homebrew/homebrew#15956.
Library/Homebrew/formula_installer.rb
@@ -157,7 +157,6 @@ def caveats audit_lib check_manpages check_infopages - check_m4 end keg = Keg.new(f.prefix) @@ -437,25 +436,6 @@ def audit_lib check_jars check_non_libraries end - - def check_m4 - # Newer versions of Xcode don't come with autotools - return ...
false
Other
Homebrew
brew
5a140c0f45c96056e7a2de99f58029ea6ad38e27.json
exclude repository from brew list --unbrewed
Library/Homebrew/cmd/list.rb
@@ -30,6 +30,10 @@ def list_unbrewed cache_folder = (HOMEBREW_CACHE.relative_path_from(HOMEBREW_PREFIX)).to_s dirs -= [cache_folder] + # Exclude the repository, if it has been located under the prefix + cache_folder = (HOMEBREW_REPOSITORY.relative_path_from(HOMEBREW_PREFIX)).to_s + dirs -= [cache_f...
false
Other
Homebrew
brew
f1f6807c0745e29d2e14e7458d77b5649c43f5c5.json
Add more files and extensions to metafiles
Library/Homebrew/metafiles.rb
@@ -1,8 +1,10 @@ class Metafiles def initialize - @exts = %w[.txt .md .html] - @metafiles = %w[readme changelog changes copying license licence copyright authors] + @exts = %w[.md .html .rtf .txt] + @metafiles = %w[ + about authors changelog changes copying copyright history license + licenc...
false
Other
Homebrew
brew
489ebd78d6a95c4b92ebce6d1cfc5902c93ad395.json
Teach Pathname how to scan for metafiles
Library/Homebrew/build.rb
@@ -144,22 +144,11 @@ def install f end # Find and link metafiles - install_meta_files Pathname.pwd, f.prefix + f.prefix.install_metafiles Pathname.pwd end end end -def install_meta_files src_path, dst_path - src_path.children.each do |p| - next if p.directory? - next unless ...
true
Other
Homebrew
brew
489ebd78d6a95c4b92ebce6d1cfc5902c93ad395.json
Teach Pathname how to scan for metafiles
Library/Homebrew/extend/pathname.rb
@@ -373,6 +373,21 @@ def write_jar_script target_jar, script_name, java_opts="" EOS end + def install_metafiles from=nil + # Default to current path, and make sure we have a pathname, not a string + from = "." if from.nil? + from = Pathname.new(from.to_s) + + from.children.each do |p| + next...
true
Other
Homebrew
brew
4b72e444613509b3102a94de1d1029a9318fcbad.json
Use a class for FORMULA_META_FILES * lets more text types get picked up * better filter for `brew list`
Library/Homebrew/build.rb
@@ -144,19 +144,22 @@ def install f end # Find and link metafiles - FORMULA_META_FILES.each do |filename| - next if File.directory? filename - target_file = filename - target_file = "#{filename}.txt" if File.exists? "#{filename}.txt" - # Some software symlinks these file...
true
Other
Homebrew
brew
4b72e444613509b3102a94de1d1029a9318fcbad.json
Use a class for FORMULA_META_FILES * lets more text types get picked up * better filter for `brew list`
Library/Homebrew/cmd/list.rb
@@ -64,7 +64,7 @@ def initialize path else print_dir pn end - elsif not (FORMULA_META_FILES + %w[.DS_Store INSTALL_RECEIPT.json]).include? pn.basename.to_s + elsif FORMULA_META_FILES.should_list? pn.basename.to_s puts pn end end
true
Other
Homebrew
brew
4b72e444613509b3102a94de1d1029a9318fcbad.json
Use a class for FORMULA_META_FILES * lets more text types get picked up * better filter for `brew list`
Library/Homebrew/global.rb
@@ -83,7 +83,8 @@ module Homebrew extend self alias_method :failed?, :failed end -FORMULA_META_FILES = %w[README README.md ChangeLog CHANGES COPYING LICENSE LICENCE COPYRIGHT AUTHORS] +require 'metafiles' +FORMULA_META_FILES = Metafiles.new ISSUES_URL = "https://github.com/mxcl/homebrew/wiki/troubleshooting" ...
true
Other
Homebrew
brew
4b72e444613509b3102a94de1d1029a9318fcbad.json
Use a class for FORMULA_META_FILES * lets more text types get picked up * better filter for `brew list`
Library/Homebrew/metafiles.rb
@@ -0,0 +1,36 @@ +class Metafiles + + def initialize + @exts = %w[.txt .md .html] + @metafiles = %w[readme changelog changes copying license licence copyright authors] + end + + def + other + @metafiles + other + end + + def should_copy? file + include? file + end + + def should_list? file + retur...
true
Other
Homebrew
brew
ff5f3f6b6da9874b79e0f6405778de91839128d0.json
Exclude the cache from `brew list --unbrewed` If you have relocated your HOMEBREW_CACHE under HOMEBREW_PREFIX, then don't show these files as "unbrewed".
Library/Homebrew/cmd/list.rb
@@ -25,6 +25,11 @@ def list def list_unbrewed dirs = HOMEBREW_PREFIX.children.select{ |pn| pn.directory? }.map{ |pn| pn.basename.to_s } dirs -= %w[Library Cellar .git] + + # Exclude the cache, if it has been located under the prefix + cache_folder = (HOMEBREW_CACHE.relative_path_from(HOMEBREW_PREFIX)...
false
Other
Homebrew
brew
25442f20ec639375849f8be65000c367dbc6c5b8.json
brew-test-bot: Change directory only for Git commands.
Library/Contributions/cmds/brew-test-bot.rb
@@ -70,7 +70,14 @@ def write_html def self.run test, command, output_on_success = false step = new test, command step.puts_command - `#{step.command} &>#{step.log_file_path}` + + command = "#{step.command} &>#{step.log_file_path}" + if command.start_with? 'git ' + Dir.chdir HOMEBREW_REPOSITOR...
false
Other
Homebrew
brew
925a9572c927ee6288dd96317054874a880c1be8.json
brew-test-bot: add skip cleanup, setup options.
Library/Contributions/cmds/brew-test-bot.rb
@@ -254,14 +254,14 @@ def check_results def self.run url test = new url - test.cleanup + test.cleanup unless ARGV.include? "--skip-cleanup" test.download - test.setup + test.setup unless ARGV.include? "--skip-setup" test.formulae.each do |f| test.formula f end test.homeb...
false
Other
Homebrew
brew
8d7be8c0b4bf58702fca9c5d1c3d95c7e3285190.json
debrew: take input from same line as prompt
Library/Homebrew/debrew.rb
@@ -26,7 +26,7 @@ def choose menu.entries.each_with_index do |entry, i| puts "#{i+1}. #{entry[:name]}" end - puts menu.prompt unless menu.prompt.nil? + print menu.prompt unless menu.prompt.nil? reply = $stdin.gets.chomp i = reply.to_i @@ -102,7 +102,7 @@ def debrew(exception, formula=...
false
Other
Homebrew
brew
3bdce1a7fa12ec9e779edb429971249fefe9a501.json
Fix typo in postgres requirement
Library/Homebrew/requirements.rb
@@ -243,7 +243,7 @@ def message; <<-EOS.undent end end -class PostgresInstalled < Requirement +class PostgresqlInstalled < Requirement def fatal?; true; end def satisfied?
false
Other
Homebrew
brew
45e208d26b52413efc0bb1dd598bf33c326d5023.json
Move conflict message into conflict class
Library/Homebrew/formula.rb
@@ -721,19 +721,7 @@ def option name, description=nil end def conflicts_with formula, opts={} - message = <<-EOS.undent - #{formula} cannot be installed alongside #{name.downcase}. - EOS - message << "This is because #{opts[:because]}\n" if opts[:because] - unless ARGV.force? then m...
true
Other
Homebrew
brew
45e208d26b52413efc0bb1dd598bf33c326d5023.json
Move conflict message into conflict class
Library/Homebrew/requirements.rb
@@ -177,12 +177,23 @@ def message class ConflictRequirement < Requirement attr_reader :formula - def initialize formula, message + def initialize formula, name, opts={} @formula = formula - @message = message + @name = name + @opts = opts end - def message; @message; end + def message + ...
true
Other
Homebrew
brew
2f542f657e656d2e13a5a7cd0acc406c71c036ab.json
Combine duplicated postfix conditionals
Library/Homebrew/keg.rb
@@ -133,9 +133,10 @@ def link mode=OpenStruct.new end end - linked_keg_record.make_relative_symlink(self) unless mode.dry_run - - optlink unless mode.dry_run + unless mode.dry_run + linked_keg_record.make_relative_symlink(self) + optlink + end return $n + $d rescue Exceptio...
false
Other
Homebrew
brew
c92971f475272109153889b6ada0ed0603eb60d4.json
doctor: Remove fuse.pc from the whitelist Having a third-party `fuse.pc` file will conflict with the `fuse4x` formula.
Library/Homebrew/cmd/doctor.rb
@@ -136,9 +136,7 @@ def check_for_stray_pcs # Package-config files which are generally OK should be added to this list, # with a short description of the software they come with. - white_list = { - "fuse.pc" => "MacFuse", - } + white_list = { } bad_pcs = unbrewed_pcs.reject {|d| white_list.key? File....
false
Other
Homebrew
brew
fa6cf55f588dafa731f170a1c818972ab766120f.json
Add Xcode 4.5.2 to standard compilers map Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/macos.rb
@@ -191,7 +191,8 @@ def prefer_64_bit? "4.4" => { :llvm_build => 2336, :clang => "4.0", :clang_build => 421 }, "4.4.1" => { :llvm_build => 2336, :clang => "4.0", :clang_build => 421 }, "4.5" => { :llvm_build => 2336, :clang => "4.1", :clang_build => 421 }, - "4.5.1" => { :llvm_build => 2336, :clan...
false