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
4bbefc12e36bb3cbe661983f7533110a0f85758e.json
Eliminate boolean argument to Version.new
Library/Homebrew/version.rb
@@ -155,26 +155,30 @@ def <=>(other) StringToken::PATTERN ) + class FromURL < Version + def detected_from_url? + true + end + end + def self.detect(url, specs={}) if specs.has_key?(:tag) - new(specs[:tag][/((?:\d+\.)*\d+)/, 1], true) + FromURL.new(specs[:tag][/((?:\d+\.)*\d+)/, ...
false
Other
Homebrew
brew
35793f0e0cf855a687176e44ad8e564605de925f.json
Let Version.parse instantiate subclasses
Library/Homebrew/version.rb
@@ -236,7 +236,7 @@ def tokenize def self.parse spec version = _parse(spec) - Version.new(version, true) unless version.nil? + new(version, true) unless version.nil? end def self._parse spec
false
Other
Homebrew
brew
dcad08339e8cc2723cb5b4095528d48bc3a802ac.json
Fix syntax error
Library/Homebrew/cmd/edit.rb
@@ -16,9 +16,9 @@ def edit if editor == "mate" or editor == "subl" # If the user is using TextMate or Sublime Text, # give a nice project view instead. - exec_editor, HOMEBREW_REPOSITORY+"bin/brew", - HOMEBREW_REPOSITORY+'README.md', - HOMEBREW_REP...
false
Other
Homebrew
brew
eec4feccaa06ab909ffc02fcec7d63a3e23fdd2d.json
Include selected spec in Formula#inspect
Library/Homebrew/formula.rb
@@ -436,7 +436,9 @@ def to_s end def inspect - "#<#{self.class.name}: #{path}>" + s = "#<Formula #{name} (" + s << if head? then "head" elsif devel? then "devel" else "stable" end + s << ") #{path}>" end # Standard parameters for CMake builds.
false
Other
Homebrew
brew
8535c037ac8e6e8bff50db271de5e2d9c9370890.json
Remove unused assignment
Library/Homebrew/download_strategy.rb
@@ -380,7 +380,6 @@ class LocalBottleDownloadStrategy < AbstractFileDownloadStrategy attr_reader :cached_location def initialize(formula) - @name = name @cached_location = formula.local_bottle_path end
false
Other
Homebrew
brew
683e209b10e897199595696f9c86a9568fd7bc6c.json
Remove unused argument
Library/Homebrew/formula_versions.rb
@@ -54,7 +54,7 @@ def version_at_revision(rev) formula_at_revision(rev) { |f| f.version } end - def formula_at_revision rev, &block + def formula_at_revision(rev) FileUtils.mktemp(f.name) do path = Pathname.pwd.join("#{f.name}.rb") path.write file_contents_at_revision(rev)
false
Other
Homebrew
brew
bd334c55a00d006168c767ea0442df7d6a1954ea.json
brew.rb: return exit code from internal commands.
Library/brew.rb
@@ -133,6 +133,7 @@ def require? path if internal_cmd Homebrew.send cmd.to_s.gsub('-', '_').downcase + exit 1 if Homebrew.failed? elsif which "brew-#{cmd}" %w[CACHE CELLAR LIBRARY_PATH PREFIX REPOSITORY].each do |e| ENV["HOMEBREW_#{e}"] = Object.const_get("HOMEBREW_#{e}").to_s
false
Other
Homebrew
brew
fc2818b7a54dadcf0c35965ef1f07219da3fc4a7.json
Use more https in urls and updated some lost links Closes Homebrew/homebrew#35531. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/blacklist.rb
@@ -15,7 +15,7 @@ def blacklisted? name Installing TeX from source is weird and gross, requires a lot of patches, and only builds 32-bit (and thus can't use Homebrew deps on Snow Leopard.) - We recommend using a MacTeX distribution: http://www.tug.org/mactex/ + We recommend using a MacTeX distribution...
true
Other
Homebrew
brew
fc2818b7a54dadcf0c35965ef1f07219da3fc4a7.json
Use more https in urls and updated some lost links Closes Homebrew/homebrew#35531. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/cmd/aspell-dictionaries.rb
@@ -5,7 +5,7 @@ module Homebrew def aspell_dictionaries dict_url = "http://ftpmirror.gnu.org/aspell/dict" - dict_mirror = "http://ftp.gnu.org/gnu/aspell/dict" + dict_mirror = "https://ftp.gnu.org/gnu/aspell/dict" languages = {} open("#{dict_url}/0index.html") do |content|
true
Other
Homebrew
brew
fc2818b7a54dadcf0c35965ef1f07219da3fc4a7.json
Use more https in urls and updated some lost links Closes Homebrew/homebrew#35531. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/cmd/create.rb
@@ -10,7 +10,7 @@ def create # Allow searching MacPorts or Fink. if ARGV.include? '--macports' - exec_browser "http://www.macports.org/ports.php?by=name&substr=#{ARGV.next}" + exec_browser "https://www.macports.org/ports.php?by=name&substr=#{ARGV.next}" elsif ARGV.include? '--fink' exe...
true
Other
Homebrew
brew
fc2818b7a54dadcf0c35965ef1f07219da3fc4a7.json
Use more https in urls and updated some lost links Closes Homebrew/homebrew#35531. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/cmd/doctor.rb
@@ -86,7 +86,7 @@ def check_path_for_trailing_slashes end # Installing MacGPG2 interferes with Homebrew in a big way -# http://sourceforge.net/projects/macgpg2/files/ +# https://github.com/GPGTools/MacGPG2 def check_for_macgpg2 return if File.exist? '/usr/local/MacGPG2/share/gnupg/VERSION' @@ -1081,8 +1081,8 ...
true
Other
Homebrew
brew
fc2818b7a54dadcf0c35965ef1f07219da3fc4a7.json
Use more https in urls and updated some lost links Closes Homebrew/homebrew#35531. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/cmd/search.rb
@@ -9,11 +9,11 @@ module Homebrew def search if ARGV.include? '--macports' - exec_browser "http://www.macports.org/ports.php?by=name&substr=#{ARGV.next}" + exec_browser "https://www.macports.org/ports.php?by=name&substr=#{ARGV.next}" elsif ARGV.include? '--fink' exec_browser "http://pdb....
true
Other
Homebrew
brew
fc2818b7a54dadcf0c35965ef1f07219da3fc4a7.json
Use more https in urls and updated some lost links Closes Homebrew/homebrew#35531. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/download_strategy.rb
@@ -285,7 +285,7 @@ def ext # We need a Pathname because we've monkeypatched extname to support double # extensions (e.g. tar.gz). # We can't use basename_without_params, because given a URL like - # http://example.com/download.php?file=foo-1.0.tar.gz + # https://example.com/download.php?file=f...
true
Other
Homebrew
brew
fc2818b7a54dadcf0c35965ef1f07219da3fc4a7.json
Use more https in urls and updated some lost links Closes Homebrew/homebrew#35531. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/extend/ENV/shared.rb
@@ -140,7 +140,7 @@ def determine_cc end # Snow Leopard defines an NCURSES value the opposite of most distros - # See: http://bugs.python.org/issue6848 + # See: https://bugs.python.org/issue6848 # Currently only used by aalib in core def ncurses_define append 'CPPFLAGS', "-DNCURSES_OPAQUE=0"
true
Other
Homebrew
brew
fc2818b7a54dadcf0c35965ef1f07219da3fc4a7.json
Use more https in urls and updated some lost links Closes Homebrew/homebrew#35531. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/os/mac.rb
@@ -136,9 +136,9 @@ def clear_version_cache end # See these issues for some history: - # http://github.com/Homebrew/homebrew/issues/13 - # http://github.com/Homebrew/homebrew/issues/41 - # http://github.com/Homebrew/homebrew/issues/48 + # https://github.com/Homebrew/homebrew/issues/13 + # htt...
true
Other
Homebrew
brew
fc2818b7a54dadcf0c35965ef1f07219da3fc4a7.json
Use more https in urls and updated some lost links Closes Homebrew/homebrew#35531. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/os/mac/xcode.rb
@@ -53,7 +53,7 @@ def toolchain_path # Ask Spotlight where Xcode is. If the user didn't install the # helper tools and installed Xcode in a non-conventional place, this - # is our only option. See: http://superuser.com/questions/390757 + # is our only option. See: https://superuser.com/questio...
true
Other
Homebrew
brew
fc2818b7a54dadcf0c35965ef1f07219da3fc4a7.json
Use more https in urls and updated some lost links Closes Homebrew/homebrew#35531. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/os/mac/xquartz.rb
@@ -42,8 +42,8 @@ def detect_version end end - # http://xquartz.macosforge.org/trac/wiki - # http://xquartz.macosforge.org/trac/wiki/Releases + # https://xquartz.macosforge.org/trac/wiki + # https://xquartz.macosforge.org/trac/wiki/Releases def latest_version case M...
true
Other
Homebrew
brew
fc2818b7a54dadcf0c35965ef1f07219da3fc4a7.json
Use more https in urls and updated some lost links Closes Homebrew/homebrew#35531. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/requirements.rb
@@ -61,7 +61,7 @@ class PostgresqlDependency < Requirement class TeXDependency < Requirement fatal true cask "mactex" - download "http://www.tug.org/mactex/" + download "https://www.tug.org/mactex/" satisfy { which('tex') || which('latex') }
true
Other
Homebrew
brew
fc2818b7a54dadcf0c35965ef1f07219da3fc4a7.json
Use more https in urls and updated some lost links Closes Homebrew/homebrew#35531. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/requirements/mpi_dependency.rb
@@ -50,7 +50,7 @@ def mpi_wrapper_works? compiler env do # Set environment variables to help configure scripts find MPI compilers. # Variable names taken from: - # http://www.gnu.org/software/autoconf-archive/ax_mpi.html + # https://www.gnu.org/software/autoconf-archive/ax_mpi.html @lang_list.ea...
true
Other
Homebrew
brew
fc2818b7a54dadcf0c35965ef1f07219da3fc4a7.json
Use more https in urls and updated some lost links Closes Homebrew/homebrew#35531. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/version.rb
@@ -301,7 +301,7 @@ def self._parse spec m = /_((?:\d+\.)+\d+[abc]?)[.]orig$/.match(stem) return m.captures.first unless m.nil? - # e.g. http://www.openssl.org/source/openssl-0.9.8s.tar.gz + # e.g. https://www.openssl.org/source/openssl-0.9.8s.tar.gz m = /-v?([^-]+)/.match(stem) return m.cap...
true
Other
Homebrew
brew
9e8103cf38f10a4240f0a796bbecdb635dbc74d4.json
Add Homebrew.install_gem_setup_path! function. This uses the logic from tests.rb in man.rb too so that this can be shared in a few places.
Library/Homebrew/cmd/man.rb
@@ -13,7 +13,7 @@ def man end end - which("ronn") || odie("You need to \"gem install ronn\" and put it in your path.") + Homebrew.install_gem_setup_path! "ronn" if ARGV.include?("--server") || ARGV.include?("-s") puts "Man page test server: http://localhost:1207/"
true
Other
Homebrew
brew
9e8103cf38f10a4240f0a796bbecdb635dbc74d4.json
Add Homebrew.install_gem_setup_path! function. This uses the logic from tests.rb in man.rb too so that this can be shared in a few places.
Library/Homebrew/cmd/tests.rb
@@ -1,12 +1,8 @@ module Homebrew def tests - (HOMEBREW_LIBRARY/'Homebrew/test').cd do - ENV['TESTOPTS'] = '-v' if ARGV.verbose? - quiet_system("gem", "list", "--installed", "bundler") || \ - system("gem", "install", "--no-ri", "--no-rdoc", - "--user-install", "bundler") - requ...
true
Other
Homebrew
brew
9e8103cf38f10a4240f0a796bbecdb635dbc74d4.json
Add Homebrew.install_gem_setup_path! function. This uses the logic from tests.rb in man.rb too so that this can be shared in a few places.
Library/Homebrew/utils.rb
@@ -119,6 +119,14 @@ def self.git_head def self.git_last_commit HOMEBREW_REPOSITORY.cd { `git show -s --format="%cr" HEAD 2>/dev/null`.chuzzle } end + + def self.install_gem_setup_path! gem + return if quiet_system "gem", "list", "--installed", gem + system "gem", "install", "--no-ri", "--no-rdoc", + ...
true
Other
Homebrew
brew
1e96c6fec4b449f1357744404d0cc62125db6888.json
formula_versions: ignore another exception.
Library/Homebrew/formula_versions.rb
@@ -4,7 +4,7 @@ class FormulaVersions IGNORED_EXCEPTIONS = [ ArgumentError, NameError, SyntaxError, TypeError, FormulaSpecificationError, FormulaValidationError, - ErrorDuringExecution, + ErrorDuringExecution, LoadError, ] attr_reader :f
false
Other
Homebrew
brew
26a2e4c4d38f111ab89093c12e3532529fc8da0b.json
Avoid formula lookup when we know it will fail Formulary.loader_for cannot raise exceptions, as canonical_name must work for nonexistent formulae. However, we can skip the constant lookup and a redundant file existence check by returning a loader that raises immediately in #get_formula.
Library/Homebrew/formulary.rb
@@ -165,6 +165,16 @@ def get_formula(spec) end end + class NullLoader < FormulaLoader + def initialize(name) + @name = name + end + + def get_formula(spec) + raise FormulaUnavailableError.new(name) + end + end + # Return a Formula instance for the given reference. # `ref` is stri...
false
Other
Homebrew
brew
5bf92cd7ca76a4996941f9dc80a251dad2a22d86.json
Check file existence instead of rescuing LoadError
Library/Homebrew/formulary.rb
@@ -72,11 +72,8 @@ def klass def load_file STDERR.puts "#{$0} (#{self.class.name}): loading #{path}" if ARGV.debug? - begin - require(path) - rescue LoadError => e - raise FormulaUnavailableError, name, e.backtrace - end + raise FormulaUnavailableError.new(name) unless pa...
false
Other
Homebrew
brew
1de21b7f0003aa731ec3fc147237c9d5a19a41c4.json
Use block-form of File.open
Library/Homebrew/formula.rb
@@ -652,8 +652,7 @@ def system cmd, *args logfn = "#{logd}/%02d.%s" % [@exec_count, File.basename(cmd).split(' ').first] mkdir_p(logd) - log = File.open(logfn, "w") - begin + File.open(logfn, "w") do |log| log.puts Time.now, "", cmd, args, "" log.flush @@ -698,8 +697,6 @@ def system...
false
Other
Homebrew
brew
8b51cf019d56c6ab5ab03c7bb4cf504eb7659c93.json
Move exception text into exception object
Library/Homebrew/download_strategy.rb
@@ -184,12 +184,7 @@ def fetch had_incomplete_download = false retry else - if @url =~ %r[^file://] - msg = "File does not exist: #{@url.sub(%r[^file://], "")}" - else - msg = "Download failed: #{@url}" - end - raise CurlDownloadSt...
true
Other
Homebrew
brew
8b51cf019d56c6ab5ab03c7bb4cf504eb7659c93.json
Move exception text into exception object
Library/Homebrew/exceptions.rb
@@ -208,7 +208,16 @@ def initialize(resource, cause) end # raised in CurlDownloadStrategy.fetch -class CurlDownloadStrategyError < RuntimeError; end +class CurlDownloadStrategyError < RuntimeError + def initialize(url) + case url + when %r[^file://(.+)] + super "File does not exist: #{$1}" + else + ...
true
Other
Homebrew
brew
912a586d15daaa9daf4c4831dc5cc9022acc2b62.json
Preserve backtrace for download errors
Library/Homebrew/exceptions.rb
@@ -198,11 +198,12 @@ def initialize(formula) # Raised in Resource.fetch class DownloadError < RuntimeError - def initialize(resource, e) + def initialize(resource, cause) super <<-EOS.undent Failed to download resource #{resource.download_name.inspect} - #{e.message} + #{cause.message} ...
false
Other
Homebrew
brew
a9556651022a92ae8134b1efbfa67831d5eb2e5e.json
Preserve backtrace from original exception
Library/Homebrew/extend/ENV/super.rb
@@ -119,7 +119,7 @@ def determine_path when "gcc-4.2" begin apple_gcc42 = Formulary.factory('apple-gcc42') - rescue Exception # in --debug, catch bare exceptions too + rescue FormulaUnavailableError end paths << apple_gcc42.opt_bin.to_s if apple_gcc42 when GNU_GCC_REGEXP
true
Other
Homebrew
brew
a9556651022a92ae8134b1efbfa67831d5eb2e5e.json
Preserve backtrace from original exception
Library/Homebrew/formulary.rb
@@ -55,8 +55,8 @@ def get_formula(spec) def klass begin have_klass = Formulary.formula_class_defined? class_name - rescue NameError - raise FormulaUnavailableError.new(name) + rescue NameError => e + raise FormulaUnavailableError, name, e.backtrace end load_f...
true
Other
Homebrew
brew
633f29af5d3c96efb79c513375a8914ee0a0c163.json
Remove duplicated logic from FromUrlLoader
Library/Homebrew/formulary.rb
@@ -143,23 +143,10 @@ def initialize url super formula, HOMEBREW_CACHE_FORMULA/File.basename(uri.path) end - # Downloads the formula's .rb file - def fetch - begin - have_klass = Formulary.formula_class_defined? class_name - rescue NameError - raise FormulaUnavailableError.ne...
false
Other
Homebrew
brew
b3d44da9e3ca226829c64421e09fbbbbd6fe09bc.json
TapDependency: add tap accessor.
Library/Homebrew/dependency.rb
@@ -132,8 +132,11 @@ def merge_repeats(all) end class TapDependency < Dependency + attr_reader :tap + def initialize(name, tags=[], env_proc=DEFAULT_ENV_PROC, option_name=name) - super(name, tags, env_proc, name.split("/").last) + @tap, _, option_name = option_name.rpartition "/" + super(name, tags, en...
false
Other
Homebrew
brew
e651e7662aec9ffdb864e883d54b9204b60181a4.json
Use formula helper in tests
Library/Homebrew/test/test_formula.rb
@@ -148,7 +148,7 @@ def test_class_naming end def test_formula_spec_integration - f = Class.new(Formula) do + f = formula do homepage 'http://example.com' url 'http://example.com/test-0.1.tbz' mirror 'http://example.org/test-0.1.tbz' @@ -161,7 +161,7 @@ def test_formula_spec_integrati...
true
Other
Homebrew
brew
e651e7662aec9ffdb864e883d54b9204b60181a4.json
Use formula helper in tests
Library/Homebrew/test/test_formula_validation.rb
@@ -8,7 +8,7 @@ def assert_invalid(attr, &block) end def test_cant_override_brew - e = assert_raises(RuntimeError) { Class.new(Formula) { def brew; end } } + e = assert_raises(RuntimeError) { formula { def brew; end } } assert_match %r{You cannot override Formula#brew}, e.message end
true
Other
Homebrew
brew
d57fe3ededa2d438bc9134b17f4bd082fde53610.json
search: add homebrew-x11 to default taps
Library/Homebrew/cmd/search.rb
@@ -76,6 +76,7 @@ def search %w{Homebrew binary}, %w{Homebrew python}, %w{Homebrew php}, + %w{Homebrew x11}, %w{Caskroom cask}, ]
false
Other
Homebrew
brew
88208af8e488fe202fd5cb6b96a9f508ca635d5e.json
requirement: add cask and download attributes. Print out the message pointing to the Cask and/or download location too.a
Library/Homebrew/requirement.rb
@@ -9,17 +9,42 @@ class Requirement include Dependable - attr_reader :tags, :name + attr_reader :tags, :name, :cask, :download alias_method :option_name, :name def initialize(tags=[]) + @cask ||= self.class.cask + @download ||= self.class.download + tags.each do |tag| + next unless tag.is_...
false
Other
Homebrew
brew
7f29dc13b8ee9ca3a1f28100e9ba6335ba81cf37.json
Drop pointless subclass in test
Library/Homebrew/test/test_formula.rb
@@ -42,7 +42,7 @@ def test_installed? end def test_installed_prefix - f = Class.new(TestBall).new + f = TestBall.new assert_equal f.prefix, f.installed_prefix end
false
Other
Homebrew
brew
3c9bee268bde9675e8091068750a89bb35d4b2f2.json
Preserve signature of #initialize in tests
Library/Homebrew/test/test_formula.rb
@@ -161,11 +161,7 @@ def test_formula_spec_integration mirror 'http://example.org/test-0.2.tbz' sha256 TEST_SHA256 end - - def initialize - super "test", Pathname.new(__FILE__).expand_path, :stable - end - end.new + end.new("test", Pathname.new(__FILE__).expand_path, :sta...
true
Other
Homebrew
brew
3c9bee268bde9675e8091068750a89bb35d4b2f2.json
Preserve signature of #initialize in tests
Library/Homebrew/test/test_formula_install.rb
@@ -54,10 +54,7 @@ def test_script_install f = Class.new(ScriptFileFormula) do url "file://#{File.expand_path(__FILE__)}" version "1" - def initialize - super "test_script_formula", Pathname.new(__FILE__).expand_path, :stable - end - end.new + end.new("test_script_formula", Pat...
true
Other
Homebrew
brew
728a7c62598af32b7d544293ea61988ebb809ebb.json
Remove dead code
Library/Homebrew/test/test_formula.rb
@@ -162,8 +162,6 @@ def test_formula_spec_integration sha256 TEST_SHA256 end - bottle { sha1 TEST_SHA1 => bottle_tag } - def initialize super "test", Pathname.new(__FILE__).expand_path, :stable end
false
Other
Homebrew
brew
c4f7217811bc0f471ad0b4a51506b7ed377991b9.json
audit (strict): add require formula check.
Library/Homebrew/cmd/audit.rb
@@ -41,6 +41,7 @@ def initialize path @text = path.open("rb", &:read) end + def without_patch @text.split("\n__END__").first end @@ -565,6 +566,10 @@ def audit_line(line, lineno) good_quotes = bad_quotes.gsub "'", "\"" problem "use double-quotes for `#{good_quotes}` instead of `#{...
false
Other
Homebrew
brew
9bd8229ba252d9c360b51092db27d84b60db00bc.json
tap_migrations: add missed x3270 formula
Library/Homebrew/tap_migrations.rb
@@ -148,6 +148,7 @@ "viewglob" => "homebrew/x11", "wkhtmltopdf" => "homebrew/boneyard", "wmctrl" => "homebrew/x11", + "x3270" => "homebrew/x11", "xchat" => "homebrew/x11", "xclip" => "homebrew/x11", "xdotool" => "homebrew/x11",
false
Other
Homebrew
brew
b3a15ad6ef106fca4be0c53c53cc5b9961c21139.json
test-bot: use audit --strict on added formulae.
Library/Homebrew/cmd/test-bot.rb
@@ -234,6 +234,15 @@ def single_commit? start_revision, end_revision git("rev-list", "--count", "#{start_revision}..#{end_revision}").to_i == 1 end + def diff_formulae start_revision, end_revision, path, filter + git( + "diff-tree", "-r", "--name-only", "--diff-filter=#{filter}", ...
false
Other
Homebrew
brew
fca32ee7ccb0804473989e36475f3bf838b3867e.json
audit: check options when in strict mode.
Library/Homebrew/cmd/audit.rb
@@ -168,6 +168,15 @@ def audit_conflicts end end + def audit_options + formula.options.each do |o| + next unless @strict + if o.name !~ /with(out)?-/ && o.name != "c++11" && o.name != "universal" + problem "Options should begin with with/without. Migrate '--#{o.name}' with `deprecated_opt...
false
Other
Homebrew
brew
24f183dd12064b9dfd729fda58dee0938fa078f6.json
audit: add strict mode, argument.
Library/Homebrew/cmd/audit.rb
@@ -17,8 +17,10 @@ def audit ARGV.formulae end + strict = ARGV.include? "--strict" + ff.each do |f| - fa = FormulaAuditor.new f + fa = FormulaAuditor.new(f, :strict => strict) fa.audit unless fa.problems.empty? @@ -76,8 +78,9 @@ class FormulaAuditor swig ] - de...
false
Other
Homebrew
brew
a1ba5a5da6ee62aab11c628b7d427091f8356b42.json
Migrate some formula with hard-X11 dependencies. We have the homebrew-x11 tap for this reason so let's migrate everything without any reverse dependencies. Ideally I'd also like to migrate everything that's :recommended and the GTK formulae through there too (or to a dedicated homebrew-gtk).
Library/Homebrew/tap_migrations.rb
@@ -5,74 +5,157 @@ "apple-gcc42" => "homebrew/dupes", "appledoc" => "homebrew/boneyard", "appswitch" => "homebrew/binary", + "atari++" => "homebrew/x11", "authexec" => "homebrew/boneyard", "aws-iam-tools" => "homebrew/boneyard", "blackbox" => "homebrew/boneyard", + "bochs" => "homebrew/x11", "boo...
false
Other
Homebrew
brew
f22aeb14f613d4e9257e0e7e451d5004e59e4d06.json
tap-readme: tweak the format.
Library/Homebrew/cmd/tap-readme.rb
@@ -1,30 +1,27 @@ module Homebrew def tap_readme name = ARGV.first - raise "A name is required" if name.nil? + titleized_name = name.dup + titleized_name[0] = titleized_name[0].upcase + template = <<-EOS.undent - Homebrew-#{name} - =========#{'=' * name.size} + # Homebrew #{titleized...
false
Other
Homebrew
brew
0b8cf49386a6cd6c5cefe26ff150422d12edcff1.json
Remove unnecessary code from debugger
Library/Homebrew/build.rb
@@ -109,10 +109,7 @@ def install end end - if ARGV.debug? - formula.extend(Debrew::Formula) - formula.resources.each { |r| r.extend(Debrew::Resource) } - end + formula.extend(Debrew::Formula) if ARGV.debug? formula.brew do formula.patch
true
Other
Homebrew
brew
0b8cf49386a6cd6c5cefe26ff150422d12edcff1.json
Remove unnecessary code from debugger
Library/Homebrew/debrew.rb
@@ -30,19 +30,6 @@ def test end end - module Resource - def unpack(target=nil) - return super if target - super do - begin - yield self - rescue Exception => e - Debrew.debug(e) - end - end - end - end - class Menu Entry = Struct.new(:name,...
true
Other
Homebrew
brew
d2d7516cc04ec31f105eda64f87b79db316bcb2f.json
Allow debugging patching failures Closes Homebrew/homebrew#33056.
Library/Homebrew/debrew.rb
@@ -21,6 +21,10 @@ def install Debrew.debrew { super } end + def patch + Debrew.debrew { super } + end + def test Debrew.debrew { super } end
true
Other
Homebrew
brew
d2d7516cc04ec31f105eda64f87b79db316bcb2f.json
Allow debugging patching failures Closes Homebrew/homebrew#33056.
Library/Homebrew/patch.rb
@@ -128,7 +128,7 @@ def apply resource.unpack do # Assumption: the only file in the staging directory is the patch patchfile = Pathname.pwd.children.first - safe_system "/usr/bin/patch", "-g", "0", "-f", "-d", dir, "-#{strip}", "-i", patchfile + dir.cd { safe_system "/usr/bin/patch", "-g", ...
true
Other
Homebrew
brew
051658db6552882a4306b9a4240137b9def8db17.json
Remove unnecessary require from test
Library/Homebrew/test/test_formula.rb
@@ -189,7 +189,6 @@ def test_factory path.dirname.mkpath File.open(path, 'w') do |f| f << %{ - require 'formula' class #{Formulary.class_s(name)} < Formula url 'foo-1.0' end
false
Other
Homebrew
brew
8575034f192d0c85bb97c2ad70533c9ed93a60c5.json
Unroll validation loop
Library/Homebrew/formula.rb
@@ -93,7 +93,7 @@ def initialize(name, path, spec) set_spec :head @active_spec = determine_active_spec(spec) - validate_attributes :url, :name, :version + validate_attributes! @pkg_version = PkgVersion.new(version, revision) @build = active_spec.build @pin = FormulaPin.new(self) @@ -114...
true
Other
Homebrew
brew
8575034f192d0c85bb97c2ad70533c9ed93a60c5.json
Unroll validation loop
Library/Homebrew/test/test_formula_validation.rb
@@ -44,6 +44,13 @@ def test_validates_version version "" end end + + assert_invalid :version do + formula do + url "foo" + version nil + end + end end def test_devel_only_valid
true
Other
Homebrew
brew
c50fdbd139439576318460d12c98ba007f28becd.json
Implement GithubGistFormula in a more natural way
Library/Homebrew/formula_specialties.rb
@@ -9,10 +9,9 @@ def install # See browser for an example class GithubGistFormula < ScriptFileFormula - def initialize(*) - url = self.class.stable.url - self.class.stable.version(File.basename(File.dirname(url))[0,6]) + def self.url(val) super + version File.basename(File.dirname(val))[0, 6] end...
false
Other
Homebrew
brew
7afe1ed67aa2509791705cf6d54ecfe771c61862.json
requirements: recommend casks where available. Also, tweak the XQuartz requirement to not show 0.0.0 versions being required. Closes Homebrew/homebrew#35254. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Library/Homebrew/requirements.rb
@@ -73,7 +73,10 @@ def message; <<-EOS.undent A LaTeX distribution is required for Homebrew to install this formula. - You can install MacTeX distribution from: + You can install MacTeX distribution with: + brew cask install mactex + + Or from: http://www.tug.org/mactex/ Make sur...
true
Other
Homebrew
brew
7afe1ed67aa2509791705cf6d54ecfe771c61862.json
requirements: recommend casks where available. Also, tweak the XQuartz requirement to not show 0.0.0 versions being required. Closes Homebrew/homebrew#35254. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Library/Homebrew/requirements/x11_dependency.rb
@@ -12,8 +12,10 @@ def initialize(name="x11", tags=[]) @name = name if /(\d\.)+\d/ === tags.first @min_version = Version.new(tags.shift) + @min_version_string = " #{@min_version}" else @min_version = Version.new("0.0.0") + @min_version_string = "" end super(tags) end ...
true
Other
Homebrew
brew
f9917768a9cfd136c80e807bb4e5e6b32bd35097.json
test-bot: fix use of select!.
Library/Homebrew/cmd/test-bot.rb
@@ -354,8 +354,8 @@ def formula formula_name changed_dependences = dependencies - unchanged_dependencies dependents = `brew uses #{formula_name}`.split("\n") - testable_dependents = dependents.map {|d| Formulary.factory(d)} - testable_dependents.select! {|d| d.test_defined? && d.stable.bottled...
false
Other
Homebrew
brew
73ff7395839dee412f70c010f739210a8fd2a63a.json
Convert dependencies to formulas for name matching Dependency names are prefixed with the tap location, therefore dependency names do not match formula names. We convert dependencies into formulas to ensure proper name checking. Closes Homebrew/homebrew#35058. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/cmd/uses.rb
@@ -15,10 +15,10 @@ def uses uses = formulae.select do |f| used_formulae.all? do |ff| if recursive - f.recursive_dependencies.any? { |dep| dep.name == ff.name } || + f.recursive_dependencies.any? { |dep| dep.to_formula.name == ff.name } || f.recursive_requirements.any...
false
Other
Homebrew
brew
62addcfce8d942eaa96f48f80b8b82ad7d934853.json
uninstall: improve grammar for multiple version message
Library/Homebrew/cmd/uninstall.rb
@@ -15,8 +15,9 @@ def uninstall rack = keg/".." if rack.directory? - versions = rack.subdirs.map(&:basename).join(", ") - puts "#{keg.name} #{versions} are still installed." + versions = rack.subdirs.map(&:basename) + verb = versions.length == 1 ? "is"...
false
Other
Homebrew
brew
d97daa7c1b2203be02c69124bc7b3ae5f2b50f99.json
Fix references to url
Library/Homebrew/download_strategy.rb
@@ -713,7 +713,7 @@ def repo_valid? end def clone_repo - safe_system hgpath, "clone", url, cached_location + safe_system hgpath, "clone", @url, cached_location end def update @@ -746,7 +746,7 @@ def repo_valid? def clone_repo # "lightweight" means history-less - safe_system bzrpath, "...
false
Other
Homebrew
brew
867a87b50afda7fa6d8c81a37eb8ff1f898e5cf6.json
Move url munging to initialize
Library/Homebrew/download_strategy.rb
@@ -639,6 +639,11 @@ def checkout_submodules(dst) end class CVSDownloadStrategy < VCSDownloadStrategy + def initialize(name, resource) + super + @url = @url.sub(%r[^cvs://], "") + end + def stage cp_r Dir[cached_location+"{.}"], Dir.pwd end @@ -671,14 +676,19 @@ def update end def split_u...
false
Other
Homebrew
brew
8c0928ccca77fbc6d32178d21370ce764c2eee5d.json
Use quiet_system to avoid the shell
Library/Homebrew/cmd/cleanup.rb
@@ -112,7 +112,7 @@ def cleanup_lockfiles end def rm_DS_Store - system "find #{HOMEBREW_PREFIX} -name .DS_Store -delete 2>/dev/null" + quiet_system "find", HOMEBREW_PREFIX.to_s, "-name", ".DS_Store", "-delete" end end
false
Other
Homebrew
brew
a70a80511146ec35d9da82f678a0d36efe5c72d4.json
Capitalize descriptions of --HEAD, --devel Closes Homebrew/homebrew#35027. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/cmd/options.rb
@@ -29,7 +29,7 @@ def dump_options_for_formula f f.options.sort_by(&:flag).each do |opt| puts "#{opt.flag}\n\t#{opt.description}" end - puts "--devel\n\tinstall development version #{f.devel.version}" if f.devel - puts "--HEAD\n\tinstall HEAD version" if f.head + puts "--devel\n\tInstall devel...
false
Other
Homebrew
brew
dc1f58dead922ceb5efae8c5cff6a1f67219f436.json
unsigned_kext: use binary and cask options now.
Library/Homebrew/requirements/unsigned_kext_requirement.rb
@@ -5,12 +5,35 @@ class UnsignedKextRequirement < Requirement satisfy { MacOS.version < :yosemite } + def initialize(tags=[]) + tags.each do |tag| + next unless tag.is_a? Hash + @binary ||= tag[:binary] + @cask ||= tag[:cask] + end + super + end + def message - <<-EOS.undent - ...
false
Other
Homebrew
brew
007926d7a6aaec1a5ab8614a1f8d4ad70497908c.json
Correct external command docs
share/doc/homebrew/External-Commands.md
@@ -10,9 +10,7 @@ without modifying Homebrew's internals. ## COMMAND TYPES External commands come in two flavors: Ruby commands and shell scripts. -In both cases, the command file should be `chmod +x` (executable) and live somewhere in `$PATH`. - -Internally, Homebrew finds commands with `which`(1). +In both cases,...
false
Other
Homebrew
brew
56e82c941efa6827a6095630bebbdcc5ad631ff7.json
mach: improve otool failure handling.
Library/Homebrew/mach.rb
@@ -155,7 +155,10 @@ def initialize(path) def parse_otool_L_output ENV["HOMEBREW_MACH_O_FILE"] = path.expand_path.to_s libs = `#{MacOS.locate("otool")} -L "$HOMEBREW_MACH_O_FILE"`.split("\n") - return nil, [] if libs.empty? + unless $?.success? + raise ErrorDuringExecution.new(MacOS....
false
Other
Homebrew
brew
02e5f8ed6b9618023e8adb372f8431e63e9666ba.json
mach: handle empty otool output.
Library/Homebrew/mach.rb
@@ -155,6 +155,7 @@ def initialize(path) def parse_otool_L_output ENV["HOMEBREW_MACH_O_FILE"] = path.expand_path.to_s libs = `#{MacOS.locate("otool")} -L "$HOMEBREW_MACH_O_FILE"`.split("\n") + return nil, [] if libs.empty? libs.shift # first line is the filename
false
Other
Homebrew
brew
65a7a631ea32306cdc39a28fc30076395c183f25.json
Language::Python.setup_install: add deprecation warning
Library/Homebrew/language/python.rb
@@ -54,6 +54,13 @@ def self.in_sys_path? python, path # deprecated; use system "python", *setup_install_args(prefix) instead def self.setup_install python, prefix, *args + opoo <<-EOS.undent + Language::Python.setup_install is deprecated. + If you are a formula author, please use + ...
false
Other
Homebrew
brew
fe16f36f3c19a29c5edfec4483d14b09cefdc175.json
Formula#exec_cmd: recognize setuptools shim and refurbish args
Library/Homebrew/formula.rb
@@ -661,8 +661,12 @@ def exec_cmd(cmd, args, out, logfn) # Turn on argument filtering in the superenv compiler wrapper. # We should probably have a better mechanism for this than adding # special cases to this method. - if cmd == "python" && %w[setup.py build.py].include?(args.first) - ENV.refurb...
false
Other
Homebrew
brew
720f13d8d588156dc85229af3c3820c5bf0f1362.json
Cookbook: Fix the link for squashing-instructions Closes Homebrew/homebrew#34859. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
share/doc/homebrew/Formula-Cookbook.md
@@ -366,7 +366,7 @@ Now, please open a Pull Request (on your github repo page) for new and updated b * One formula per commit; one commit per formula * Keep merge commits out of the request -* If you have any merge or mixup commits, please [squash](http://www.gitready.com/advanced/2009/02/10/squashing-commits...
false
Other
Homebrew
brew
0909b12eb907c550a24a7641e29dcb2a8d58fd77.json
Prefer cached_location over tarball_path
Library/Homebrew/download_strategy.rb
@@ -156,12 +156,12 @@ def initialize(name, resource) super @mirrors = resource.mirrors.dup @tarball_path = HOMEBREW_CACHE.join("#{name}-#{resource.version}#{ext}") - @temporary_path = Pathname.new("#{tarball_path}.incomplete") + @temporary_path = Pathname.new("#{cached_location}.incomplete") end...
false
Other
Homebrew
brew
3e1cc70fb4301a94dbf4c12b4b5a7660efac5f41.json
Move tool path methods to AbstractDownloadStrategy
Library/Homebrew/download_strategy.rb
@@ -37,6 +37,49 @@ def fetch; end def stage; end def cached_location; end def clear_cache; end + + private + + def xzpath + "#{HOMEBREW_PREFIX}/opt/xz/bin/xz" + end + + def lzippath + "#{HOMEBREW_PREFIX}/opt/lzip/bin/lzip" + end + + def cvspath + @cvspath ||= %W[ + /usr/bin/cvs + #{HOM...
false
Other
Homebrew
brew
bec5e0671f5560544680db6585f147a3d83ac91a.json
Use quiet_safe_system to silence CVS checkouts
Library/Homebrew/download_strategy.rb
@@ -622,8 +622,8 @@ def clone_repo mod, url = split_url(@url) HOMEBREW_CACHE.cd do - safe_system cvspath, "-d", url, "login" - safe_system cvspath, "-d", url, "checkout", "-d", cache_filename, mod + quiet_safe_system cvspath, { :quiet_flag => "-Q" }, "-d", url, "login" + quiet_safe_syste...
false
Other
Homebrew
brew
ddf6f51776c59edf07c5b06f8b8892d4660870be.json
Prefer cached_location method over @clone ivar
Library/Homebrew/download_strategy.rb
@@ -384,19 +384,19 @@ def initialize(name, resource) end def fetch - clear_cache unless @url.chomp("/") == repo_url or quiet_system "svn", "switch", @url, @clone + clear_cache unless @url.chomp("/") == repo_url or quiet_system "svn", "switch", @url, cached_location super end def stage su...
false
Other
Homebrew
brew
585ddb5428bf79dd25a65c76346160e3367a7bcf.json
Remove type checks
Library/Homebrew/requirements.rb
@@ -16,13 +16,13 @@ class XcodeDependency < Requirement satisfy(:build_env => false) { xcode_installed_version } def initialize(tags) - @version = tags.each {|t| break tags.delete(t) if t.is_a? String } + @version = tags.find { |t| tags.delete(t) if /(\d\.)+\d/ === t } super end def xcode_ins...
false
Other
Homebrew
brew
e7497e33c0b02c0290721be7075b0c0473459d65.json
formula.rb: add install method. Mostly for links in API documentation.
Library/Homebrew/formula.rb
@@ -574,6 +574,9 @@ def test_fixtures(file) protected + def install + end + # Pretty titles the command and buffers stdout/stderr # Throws if there's an error def system cmd, *args
false
Other
Homebrew
brew
8560ad3ad01c7cbda18d1df81e85926f996dd449.json
Use quiet_safe_system to silence submodule updates
Library/Homebrew/download_strategy.rb
@@ -589,7 +589,7 @@ def reset end def update_submodules - safe_system 'git', 'submodule', 'update', '--init', '--recursive' + quiet_safe_system "git", "submodule", "update", "--init", "--recursive" end def checkout_submodules(dst)
false
Other
Homebrew
brew
5d811c519beee45edac5387e92f1f2bee4f72452.json
Use quiet_safe_system to silence bzr updates
Library/Homebrew/download_strategy.rb
@@ -715,7 +715,7 @@ def clone_repo end def update - @clone.cd { safe_system bzrpath, 'update' } + @clone.cd { quiet_safe_system bzrpath, "update" } end def bzrpath
false
Other
Homebrew
brew
37c08393dbd482c4cfc37a0ec346564f8532257b.json
Use quiet_safe_system to silence CVS updates
Library/Homebrew/download_strategy.rb
@@ -628,7 +628,7 @@ def clone_repo end def update - @clone.cd { safe_system cvspath, "up" } + @clone.cd { quiet_safe_system cvspath, { :quiet_flag => "-Q" }, "up" } end def split_url(in_url)
false
Other
Homebrew
brew
7e844cad1c23e0785fca22345e187c3a7c21b270.json
Simplify fossil checkouts
Library/Homebrew/download_strategy.rb
@@ -729,8 +729,9 @@ def bzrpath class FossilDownloadStrategy < VCSDownloadStrategy def stage super - safe_system fossilpath, "open", @clone - safe_system fossilpath, "checkout", @ref if @ref_type && @ref + args = [fossilpath, "open", @clone] + args << @ref if @ref_type && @ref + safe_system(*arg...
false
Other
Homebrew
brew
df25be78b58a94506985ca812971e41da879239e.json
Demote FIXME to a normal comment
Library/Homebrew/download_strategy.rb
@@ -686,7 +686,7 @@ def hgpath class BazaarDownloadStrategy < VCSDownloadStrategy def stage - # FIXME: The export command doesn't work on checkouts + # The export command doesn't work on checkouts # See https://bugs.launchpad.net/bzr/+bug/897511 FileUtils.cp_r Dir[@clone+"{.}"], Dir.pwd FileU...
false
Other
Homebrew
brew
4026e035add50aaf5627587e5b59ea149f3b57fd.json
Use start_with? instead of a regexp
Library/Homebrew/download_strategy.rb
@@ -364,7 +364,7 @@ def _fetch class SubversionDownloadStrategy < VCSDownloadStrategy def initialize(name, resource) super - @url = @url.sub(/^svn\+/, "") if @url =~ %r[^svn\+http://] + @url = @url.sub(/^svn\+/, "") if @url.start_with?("svn+http://") end def repo_url
false
Other
Homebrew
brew
01dc112b607d2c4707c8835be9b122109088fd75.json
Move SVN URL munging to initialize
Library/Homebrew/download_strategy.rb
@@ -362,12 +362,16 @@ def _fetch end class SubversionDownloadStrategy < VCSDownloadStrategy + def initialize(name, resource) + super + @url = @url.sub(/^svn\+/, "") if @url =~ %r[^svn\+http://] + end + def repo_url `svn info '#{@clone}' 2>/dev/null`.strip[/^URL: (.+)$/, 1] end def fetch - ...
false
Other
Homebrew
brew
3a20562d6ea4f109526c41373f848114d79a3b00.json
Add clone_repo to remaining VCS strategies
Library/Homebrew/download_strategy.rb
@@ -72,6 +72,9 @@ def repo_valid? true end + def clone_repo + end + def extract_ref(specs) key = REF_TYPES.find { |type| specs.key?(type) } return key, specs[key] @@ -586,20 +589,15 @@ class CVSDownloadStrategy < VCSDownloadStrategy def fetch ohai "Checking out #{@url}" - # URL of ...
false
Other
Homebrew
brew
566d6b3a462c740913852d889f39d6f6824d8c88.json
CurlDownloadStrategy: initialize attributes in initializer The downloader is instantiated on-demand, so we no longer need the lazy initialization here.
Library/Homebrew/download_strategy.rb
@@ -73,16 +73,13 @@ def head? end class CurlDownloadStrategy < AbstractDownloadStrategy - def mirrors - @mirrors ||= resource.mirrors.dup - end - - def tarball_path - @tarball_path ||= Pathname.new("#{HOMEBREW_CACHE}/#{name}-#{resource.version}#{ext}") - end + attr_reader :mirrors, :tarball_path, :tempor...
false
Other
Homebrew
brew
72c21fe991a840f70830aa050b0c9741b016af43.json
Simplify bsdmake wrapper, take 2
Library/ENV/4.3/bsdmake
@@ -1,7 +1,3 @@ #!/bin/bash export HOMEBREW_CCCFG="O$HOMEBREW_CCCFG" -pwd="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -bsd="$pwd/../../../bin/bsdmake" -# bsdmake used to be keg-only: support users who don't run brew doctor -[ -x "$bsd" ] || bsd="$(${HOMEBREW_BREW_FILE} --prefix bsdmake)/bin/bsdmake" -exec "$bsd" ...
false
Other
Homebrew
brew
fed9c9a9bec870929c2a646e97096c277ae148f8.json
Simplify bsdmake wrapper Since bsdmake is always specified as a dependency, our xcrun wrapper will always be able to find it, so we can get rid of this wrapper.
Library/ENV/4.3/bsdmake
@@ -1,7 +0,0 @@ -#!/bin/bash -export HOMEBREW_CCCFG="O$HOMEBREW_CCCFG" -pwd="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -bsd="$pwd/../../../bin/bsdmake" -# bsdmake used to be keg-only: support users who don't run brew doctor -[ -x "$bsd" ] || bsd="$(${HOMEBREW_BREW_FILE} --prefix bsdmake)/bin/bsdmake" -exec "$bsd" ...
true
Other
Homebrew
brew
fed9c9a9bec870929c2a646e97096c277ae148f8.json
Simplify bsdmake wrapper Since bsdmake is always specified as a dependency, our xcrun wrapper will always be able to find it, so we can get rid of this wrapper.
Library/ENV/4.3/bsdmake
@@ -0,0 +1 @@ +make \ No newline at end of file
true
Other
Homebrew
brew
fed9c9a9bec870929c2a646e97096c277ae148f8.json
Simplify bsdmake wrapper Since bsdmake is always specified as a dependency, our xcrun wrapper will always be able to find it, so we can get rid of this wrapper.
Library/ENV/4.3/make
@@ -1,3 +1,3 @@ #!/bin/bash export HOMEBREW_CCCFG="O$HOMEBREW_CCCFG" -exec xcrun make "$@" +exec xcrun "${0##*/}" "$@"
true
Other
Homebrew
brew
03159dd831c652f81ea02eff63d3aae02c5c07a9.json
Remove unused entries from test/.gitignore
Library/Homebrew/test/.gitignore
@@ -1,5 +1,3 @@ /.bundle/ /bin/ -/coverage -/prof /vendor/
false
Other
Homebrew
brew
dd3d8a9060bc17377fcd8c79a8c3ba6019a34ea0.json
Use better assertions
Library/Homebrew/test/test_language_module_dependency.rb
@@ -22,7 +22,7 @@ def test_differing_module_and_import_name import_name = "bar" l = LanguageModuleDependency.new(:python, mod_name, import_name) assert_includes l.message, mod_name - assert l.the_test.one? { |c| c.include?(import_name) } + assert_includes l.the_test, "import #{import_name}" end ...
true
Other
Homebrew
brew
dd3d8a9060bc17377fcd8c79a8c3ba6019a34ea0.json
Use better assertions
Library/Homebrew/test/test_software_spec.rb
@@ -74,7 +74,7 @@ def test_option_description_defaults_to_empty_string def test_deprecated_option @spec.deprecated_option('foo' => 'bar') - assert @spec.deprecated_options.any? + refute_empty @spec.deprecated_options assert_equal "foo", @spec.deprecated_options.first.old assert_equal "bar", @s...
true
Other
Homebrew
brew
b89bacb9c94e85386571c7045490b54a98f51411.json
caveats: handle non-Homebrew plists. Mentioned in Homebrew/homebrew#34484.
Library/Homebrew/caveats.rb
@@ -108,7 +108,11 @@ def plist_caveats destination = f.plist_startup ? '/Library/LaunchDaemons' \ : '~/Library/LaunchAgents' - plist_filename = f.plist_path.basename + plist_filename = if f.plist + f.plist_path.basename + else + File.basename Di...
false
Other
Homebrew
brew
6017811397b7ee0797fe452309e37fb5018689a5.json
doctor: handle non-extent methods passed as arguments
Library/Homebrew/cmd/doctor.rb
@@ -1207,7 +1207,13 @@ def doctor first_warning = true methods.each do |method| - out = checks.send(method) + begin + out = checks.send(method) + rescue NoMethodError + Homebrew.failed = true + puts "No check available by the name: #{method}" + next + end ...
false
Other
Homebrew
brew
00f064410660463f00bcd58d1683e05ab9bfc83c.json
test-bot: improve tap building. - allow using (UPSTREAM_)GIT_URL to find the tap name - push bottles to a remote based on the tap name
Library/Homebrew/cmd/test-bot.rb
@@ -546,6 +546,13 @@ def run def test_bot tap = ARGV.value('tap') + git_url = ENV['UPSTREAM_GIT_URL'] || ENV['GIT_URL'] + if !tap && git_url + # Also can get tap from Jenkins GIT_URL. + /([\w-]+\/homebrew-[\w-]+)/ =~ git_url + tap = $1 + end + if Pathname.pwd == HOMEBREW_PREFIX an...
false
Other
Homebrew
brew
14c4c2fd67e9a68e0a717b7a959e5607186c2b84.json
SUPPORTERS.md: update a link. Closes Homebrew/homebrew#34350. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
SUPPORTERS.md
@@ -442,7 +442,7 @@ These wonderful people supported our Kickstarter by giving us £10 or more: * Jakub Suder * [Jason Garber](http://sixtwothree.org) * [Alejandro Caceres](http://punkspider.hyperiongray.com) -* [Slobodan Miskovic](http://www.taskforce-1.com) +* [Slobodan Miskovic](https://miskovic.ca) * [Kurt Oster...
false
Other
Homebrew
brew
dc79f803b1a5b0436a3375999bc10403c3edb513.json
Remove unnecessary array allocations These classes are never instantiated with arguments, so we can get rid of the unnecessary array splatting.
Library/Homebrew/dependencies.rb
@@ -1,8 +1,8 @@ class Dependencies include Enumerable - def initialize(*args) - @deps = Array.new(*args) + def initialize + @deps = [] end def each(*args, &block) @@ -60,8 +60,8 @@ def inspect class Requirements include Enumerable - def initialize(*args) - @reqs = Set.new(*args) + def i...
false