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 | 6a83404fd537205f0894acce6f9224df765fb25d.json | add mime-info to Gnome folders | Library/Homebrew/keg.rb | @@ -109,7 +109,7 @@ def link mode=OpenStruct.new
share_mkpaths.concat((1..8).map { |i| "man/man#{i}" })
share_mkpaths.concat((1..8).map { |i| "man/cat#{i}" })
# Paths used by Gnome Desktop support
- share_mkpaths.concat %w[applications icons pixmaps sounds]
+ share_mkpaths.concat %w[applications ic... | false |
Other | Homebrew | brew | e5ba52bf5c64ddab07aa76edbb05b46a0c7f7a0d.json | Give advice when GitHub API requests fail
Refs Homebrew/homebrew#21023. | Library/Homebrew/utils.rb | @@ -269,7 +269,11 @@ def open url, headers={}, &block
Kernel.open(url, default_headers.merge(headers), &block)
rescue OpenURI::HTTPError => e
if e.io.meta['x-ratelimit-remaining'].to_i <= 0
- raise "GitHub #{Utils::JSON.load(e.io.read)['message']}"
+ raise <<-EOS.undent
+ GitHub #{Utils::J... | false |
Other | Homebrew | brew | f4810280f768ee71ece1ab37cc356081420dd5b4.json | SUPPORTERS: Add Hashrocket logo. | SUPPORTERS.md | @@ -10,7 +10,7 @@ until then.
These mindblowing people supported our Kickstarter by giving us £450 or more:
-* [Hashrocket](http://hashrocket.com/)
+[](http://hashrocket.com/)
These spectacular people supported our Kickstarter by giving us £40... | false |
Other | Homebrew | brew | d9487a96ea9fc7b76954b5e04781d87618844ef2.json | Add audit for leading 'v' in version numbers | Library/Homebrew/cmd/audit.rb | @@ -286,6 +286,10 @@ def audit_specs
end
end
+ if s.version.to_s =~ /^v/
+ problem "#{spec} version #{s.version} should not have a leading 'v'"
+ end
+
cksum = s.checksum
next if cksum.nil?
| false |
Other | Homebrew | brew | ec50f2ed89975fcdf081b9002e8645754cc92bbe.json | SUPPORTERS: Add £450, £400, £100 and £50 tiers.
£200 and £15 still awaiting responses.
Closes Homebrew/homebrew#19892. | SUPPORTERS.md | @@ -1,13 +1,87 @@
# Kickstarter Supporters
This file contains a list of the awesome people who gave £5 or more to
-[our Kickstarter](http://www.kickstarter.com/projects/homebrew/brew-test-bot).
+[our Kickstarter](http://www.kickstarter.com/projects/homebrew/brew-test-bot).
This list is still incomplete as we ne... | false |
Other | Homebrew | brew | 53c97c3c96620734cbf55a487d9529f03568577e.json | Remove more nesting in python_helper | Library/Homebrew/python_helper.rb | @@ -55,36 +55,34 @@ def python_helper(options={:allowed_major_versions => [2, 3]}, &block)
filtered_python_reqs.sort_by{ |py| py.version }.map do |py|
# Now is the time to set the site_packages to the correct value
py.site_packages = lib/py.xy/'site-packages'
- if !block_given?
- return py
- els... | false |
Other | Homebrew | brew | 472b6e4fe1f4d7d8a64fde8bc66f11c990b21bc9.json | versions: pass string to factory
Closes Homebrew/homebrew#20951. | Library/Homebrew/cmd/versions.rb | @@ -88,7 +88,7 @@ def version_for_sha sha
# Unload the class so Formula#version returns the correct value
begin
Formulary.unload_formula name
- nostdout { Formula.factory(path).version }
+ nostdout { Formula.factory(path.to_s).version }
rescue *IGNORED_EXCEPTIONS ... | false |
Other | Homebrew | brew | e3f26a9ced340c0903dd50afd4d754457caa59c2.json | Remove message from default_formula'd requirements | Library/Homebrew/requirements.rb | @@ -24,40 +24,13 @@ class MysqlDependency < Requirement
default_formula 'mysql'
satisfy { which 'mysql_config' }
-
- def message; <<-EOS.undent
- MySQL is required to install.
-
- You can install this with Homebrew using:
- brew install mysql-connector-c
- For MySQL client libraries only.
-
-... | true |
Other | Homebrew | brew | e3f26a9ced340c0903dd50afd4d754457caa59c2.json | Remove message from default_formula'd requirements | Library/Homebrew/requirements/fortran_dependency.rb | @@ -10,15 +10,4 @@ class FortranDependency < Requirement
satisfy :build_env => false do
(ENV['FC'] || which('gfortran')) ? true : false
end
-
- def message; <<-EOS.undent
- Fortran is required to install.
-
- You can install this with Homebrew using:
- brew install gfortran
-
- Or you can use ... | true |
Other | Homebrew | brew | e3f26a9ced340c0903dd50afd4d754457caa59c2.json | Remove message from default_formula'd requirements | Library/Homebrew/requirements/mpi_dependency.rb | @@ -60,28 +60,4 @@ def mpi_wrapper_works? compiler
ENV[compiler.upcase] = mpi_path
end
end
-
- def message
- if not @unknown_langs.empty?
- <<-EOS.undent
- There is no MPI compiler wrapper for:
- #{@unknown_langs.join ', '}
-
- The following values are valid arguments to... | true |
Other | Homebrew | brew | 5437a480ebd34246db43a875c799f591d3cbf40d.json | install plist before linking
If linking fails, won't try to re-install the plist.
Closes Homebrew/homebrew#20843. | Library/Homebrew/formula_installer.rb | @@ -246,6 +246,8 @@ def caveats
def finish
ohai 'Finishing up' if ARGV.verbose?
+ install_plist
+
if f.keg_only?
begin
Keg.new(f.prefix).optlink
@@ -258,7 +260,6 @@ def finish
check_PATH unless f.keg_only?
end
- install_plist
fix_install_names
ohai "Summary... | false |
Other | Homebrew | brew | b40615d66ac8572c6735f3bb9d6cd3e781edf740.json | Catch another name error
Closes Homebrew/homebrew#20920. | Library/Homebrew/formulary.rb | @@ -28,7 +28,13 @@ def get_formula; end
# Return the Class for this formula, `require`-ing it if
# it has not been parsed before.
def klass
- unless Formulary.formula_class_defined? name
+ begin
+ have_klass = Formulary.formula_class_defined? name
+ rescue NameError
+ raise F... | false |
Other | Homebrew | brew | 5b75c73df6ff868136831084b5e016f125e8a981.json | Do this in a saner way | Library/Homebrew/cmd/doctor.rb | @@ -1023,7 +1023,11 @@ def check_for_unlinked_but_not_keg_only
if not rack.directory?
true
elsif not (HOMEBREW_REPOSITORY/"Library/LinkedKegs"/rack.basename).directory?
- Formula.factory(rack.basename.to_s).keg_only? rescue nil
+ begin
+ Formula.factory(rack.basename.to_s).keg_only?
+ ... | true |
Other | Homebrew | brew | 5b75c73df6ff868136831084b5e016f125e8a981.json | Do this in a saner way | Library/Homebrew/formula.rb | @@ -350,8 +350,12 @@ class << self
end
def self.installed
- # `rescue nil` is here to skip kegs with no corresponding formulae
- HOMEBREW_CELLAR.children.map{ |rack| factory(rack.basename.to_s) rescue nil }.compact
+ HOMEBREW_CELLAR.children.map do |rack|
+ begin
+ factory(rack.basename.to_... | true |
Other | Homebrew | brew | c2a5e3608ca435a969f62b2fa28722c3a1a106f0.json | Use Formula Loaders | Library/Homebrew/formulary.rb | @@ -1,106 +1,178 @@
+# The Formulary is responsible for creating instances
+# of Formula.
class Formulary
- # Return a Formula instance for the given `name`.
- # `name` may be:
- # * a Formula instance, in which case it is returned
- # TODO: is this code path used?
- # * a Pathname to a local formula
- # * a s... | false |
Other | Homebrew | brew | 3654822f77d05f692f4beffe6a77d7452ec5100b.json | Add TODO to canonical_name | Library/Homebrew/formula.rb | @@ -356,6 +356,7 @@ def self.aliases
Dir["#{HOMEBREW_REPOSITORY}/Library/Aliases/*"].map{ |f| File.basename f }.sort
end
+ # TODO - document what this returns and why
def self.canonical_name name
# if name includes a '/', it may be a tap reference, path, or URL
if name.include? "/" | false |
Other | Homebrew | brew | a6777838d44c66fa6c5051af3b43cd6e596a502b.json | Pass strings to factory | Library/Homebrew/formula.rb | @@ -348,7 +348,8 @@ class << self
end
def self.installed
- HOMEBREW_CELLAR.children.map{ |rack| factory(rack.basename) rescue nil }.compact
+ # `rescue nil` is here to skip kegs with no corresponding formulae
+ HOMEBREW_CELLAR.children.map{ |rack| factory(rack.basename.to_s) rescue nil }.compact
end... | false |
Other | Homebrew | brew | e62ad08af8f6555e838f8c21ab4ad1ac5e47b26e.json | brew-cleanup-installed: add new external command.
brew-cleanup-installed: uninstall all non-whitelisted Homebrew formulae.
Useful for maintainers/testers who regularly install lots of formulae
they don't actually use.
Populate ~/.brew-cleanup-installed with the formulae you want to keep
installed. All others will be... | Library/Contributions/cmd/brew-cleanup-installed | @@ -0,0 +1,22 @@
+#!/bin/sh
+# brew-cleanup-installed: uninstall all non-whitelisted Homebrew formulae.
+#
+# Useful for maintainers/testers who regularly install lots of formulae
+# they don't actually use.
+#
+# Populate ~/.brew-cleanup-installed with the formulae you want to keep
+# installed. All others will be uni... | false |
Other | Homebrew | brew | f6536e9c8bae3c53a0b7c97b7bdddc0ce7beab83.json | Reject versions that aren't strings | Library/Homebrew/formula_support.rb | @@ -40,6 +40,8 @@ def detect_version(val)
when nil then Version.detect(url, specs)
when String then Version.new(val)
when Hash then Version.new_with_scheme(*val.shift)
+ else
+ raise TypeError, "version '#{val.inspect}' should be a string"
end
end
| true |
Other | Homebrew | brew | f6536e9c8bae3c53a0b7c97b7bdddc0ce7beab83.json | Reject versions that aren't strings | Library/Homebrew/test/test_software_spec.rb | @@ -66,6 +66,12 @@ def test_version_from_tag
assert @spec.version.detected_from_url?
end
+ def test_rejects_non_string_versions
+ assert_raises(TypeError) { @spec.version(1) }
+ assert_raises(TypeError) { @spec.version(2.0) }
+ assert_raises(TypeError) { @spec.version(Object.new) }
+ end
+
def t... | true |
Other | Homebrew | brew | 033ef09518f5da1fdb56adb4cb90abd30e7223a6.json | Detect versions in tag specs
Closes Homebrew/homebrew#18300.
Closes Homebrew/homebrew#20891. | Library/Homebrew/cmd/audit.rb | @@ -276,7 +276,7 @@ def audit_specs
problem "Invalid or missing #{spec} version"
else
version_text = s.version unless s.version.detected_from_url?
- version_url = Version.parse(s.url)
+ version_url = Version.detect(s.url, s.specs)
if version_url.to_s == version_text.to_s ... | true |
Other | Homebrew | brew | 033ef09518f5da1fdb56adb4cb90abd30e7223a6.json | Detect versions in tag specs
Closes Homebrew/homebrew#18300.
Closes Homebrew/homebrew#20891. | Library/Homebrew/formula_support.rb | @@ -35,6 +35,14 @@ def verify_download_integrity fn
raise e
end
+ def detect_version(val)
+ case val
+ when nil then Version.detect(url, specs)
+ when String then Version.new(val)
+ when Hash then Version.new_with_scheme(*val.shift)
+ end
+ end
+
# The methods that follow are used in ... | true |
Other | Homebrew | brew | 033ef09518f5da1fdb56adb4cb90abd30e7223a6.json | Detect versions in tag specs
Closes Homebrew/homebrew#18300.
Closes Homebrew/homebrew#20891. | Library/Homebrew/test/test_software_spec.rb | @@ -60,6 +60,12 @@ def test_version_with_scheme
assert_instance_of scheme, @spec.version
end
+ def test_version_from_tag
+ @spec.url('http://foo.com/bar-1.0.tar.gz', :tag => 'v1.0.2')
+ assert_version_equal '1.0.2', @spec.version
+ assert @spec.version.detected_from_url?
+ end
+
def test_mirrors... | true |
Other | Homebrew | brew | 033ef09518f5da1fdb56adb4cb90abd30e7223a6.json | Detect versions in tag specs
Closes Homebrew/homebrew#18300.
Closes Homebrew/homebrew#20891. | Library/Homebrew/version.rb | @@ -154,6 +154,14 @@ def self.new_with_scheme(value, scheme)
end
end
+ def self.detect(url, specs={})
+ if specs.has_key?(:tag)
+ new(specs[:tag][/((?:\d+\.)*\d+)/, 1], true)
+ else
+ parse(url)
+ end
+ end
+
def initialize(val, detected=false)
@version = val.to_s
@detected_f... | true |
Other | Homebrew | brew | edbc0fadd13ccfe4c4791cc6077d93ea58930ff7.json | brew-test-bot: improve JUnit output for Jenkins. | Library/Contributions/cmd/brew-test-bot.xml.erb | @@ -3,11 +3,14 @@
<% tests.each do |test| %>
<testsuite name="brew-test-bot.<%= test.name %>" tests="<%= test.steps.count %>">
<% test.steps.each do |step| %>
- <testcase name="<%= step.command %>" status="<%= step.status %>" time="<%= step.time %>">
+ <testcase name="<%= step.command_short %>" status=... | false |
Other | Homebrew | brew | 254b2b9daf9392301aa0cfccd62615e869e1850b.json | brew-test-bot: move command shortening to method. | Library/Contributions/cmd/brew-test-bot.rb | @@ -49,6 +49,10 @@ def status_upcase
@status.to_s.upcase
end
+ def command_short
+ @command.gsub(/(brew|--verbose|--build-bottle) /, '')
+ end
+
def passed?
@status == :passed
end
@@ -389,7 +393,7 @@ def run
tests.each do |test|
test.steps.each do |step|
next unless step.failed?... | false |
Other | Homebrew | brew | 9497d2f7410871131f66f22a8614b25e51fc7e65.json | brew-test-bot: fix logs in spaced directories. | Library/Contributions/cmd/brew-test-bot.rb | @@ -76,7 +76,7 @@ def run
puts_command
start_time = Time.now
- run_command = "#{@command} &>#{log_file_path}"
+ run_command = "#{@command} &>'#{log_file_path}'"
if run_command.start_with? 'git '
Dir.chdir @repository do
`#{run_command}` | false |
Other | Homebrew | brew | 61076c1a11b932a7803b5c2748a2baa5b1d4bda9.json | brew --env: Add missing CPATH environment variable
Closes Homebrew/homebrew#20813.
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | Library/Homebrew/cmd/--env.rb | @@ -29,7 +29,7 @@ def build_env_keys env
HOMEBREW_USE_GCC HOMEBREW_USE_LLVM HOMEBREW_SVN HOMEBREW_GIT
HOMEBREW_SDKROOT HOMEBREW_BUILD_FROM_SOURCE
MAKE GIT CPP
- ACLOCAL_PATH OBJC PATH ].select{ |key| env.fetch(key) if env.key? key }
+ ACLOCAL_PATH OBJC PATH CPATH].select{ |key| env.fetch(... | false |
Other | Homebrew | brew | db38053840d6d8e4b615503bc1e362048eb40c77.json | Clarify ENV.gcc, ENV.llvm c++ compiler names | Library/Homebrew/superenv.rb | @@ -254,11 +254,11 @@ def deparallelize
alias_method :j1, :deparallelize
def gcc
ENV['CC'] = ENV['OBJC'] = ENV['HOMEBREW_CC'] = "gcc"
- ENV['CXX'] = ENV['OBJCXX'] = "g++"
+ ENV['CXX'] = ENV['OBJCXX'] = "g++-4.2"
end
def llvm
ENV['CC'] = ENV['OBJC'] = ENV['HOMEBREW_CC'] = "llvm-gcc"
- ENV[... | false |
Other | Homebrew | brew | ad291d7f06acefad08453d781b3bbc70edc71238.json | Remove unused guard
Closes Homebrew/homebrew#20716. | Library/Homebrew/bottles.rb | @@ -28,7 +28,6 @@ def install_bottle? f, warn=false
end
def built_as_bottle? f
- f = Formula.factory f unless f.kind_of? Formula
return false unless f.installed?
tab = Tab.for_keg(f.installed_prefix)
# Need to still use the old "built_bottle" until all bottles are updated. | false |
Other | Homebrew | brew | 919aac0b8969550e1db4a21d10ab404bff88e4ed.json | Add syntax sugar for MPIDependency
Closes Homebrew/homebrew#20797. | Library/Homebrew/cmd/audit.rb | @@ -166,9 +166,9 @@ def audit_deps
when 'open-mpi', 'mpich2'
problem <<-EOS.undent
There are multiple conflicting ways to install MPI. Use an MPIDependency:
- depends_on MPIDependency.new(<lang list>)
+ depends_on :mpi => [<lang list>]
Where <lang list> is a c... | true |
Other | Homebrew | brew | 919aac0b8969550e1db4a21d10ab404bff88e4ed.json | Add syntax sugar for MPIDependency
Closes Homebrew/homebrew#20797. | Library/Homebrew/dependency_collector.rb | @@ -94,6 +94,7 @@ def parse_symbol_spec(spec, tags)
when :mysql then MysqlDependency.new(tags)
when :postgresql then PostgresqlDependency.new(tags)
when :fortran then FortranDependency.new(tags)
+ when :mpi then MPIDependency.new(*tags)
when :tex then TeXDependency.new(tags)... | true |
Other | Homebrew | brew | 919aac0b8969550e1db4a21d10ab404bff88e4ed.json | Add syntax sugar for MPIDependency
Closes Homebrew/homebrew#20797. | Library/Homebrew/requirements/mpi_dependency.rb | @@ -13,11 +13,14 @@ class MPIDependency < Requirement
env :userpaths
- def initialize *lang_list
- @lang_list = lang_list
+ # This method must accept varargs rather than an array for
+ # backwards compatibility with formulae that call it directly.
+ def initialize(*tags)
@non_functional = []
@un... | true |
Other | Homebrew | brew | 919aac0b8969550e1db4a21d10ab404bff88e4ed.json | Add syntax sugar for MPIDependency
Closes Homebrew/homebrew#20797. | Library/Homebrew/test/test_mpi_dependency.rb | @@ -0,0 +1,12 @@
+require 'testing_env'
+require 'requirements/mpi_dependency'
+
+class MPIDependencyTests < Test::Unit::TestCase
+ def test_initialize_untangles_tags_and_wrapper_symbols
+ wrappers = [:cc, :cxx, :f77]
+ tags = [:optional, 'some-other-tag']
+ dep = MPIDependency.new(*wrappers + tags)
+ asse... | true |
Other | Homebrew | brew | 4ae5ea7dbeb754a5039775e66b62e3da0419a79b.json | brew-test-bot: remove prefix from email subject. | Library/Contributions/cmd/brew-test-bot.rb | @@ -387,9 +387,9 @@ def run
end
if failed_steps.empty?
- email_subject = 'brew test-bot: PASSED'
+ email_subject = 'PASSED'
else
- email_subject = "brew test-bot: FAILED: #{failed_steps.join ', '}"
+ email_subject = "#{failed_steps.join ', '}"
end
File.open "brew test-bot.email.txt", 'w' ... | false |
Other | Homebrew | brew | faaac9482efdc35268382b65dcea41a274ea4846.json | Fix info --github
Closes Homebrew/homebrew#20780. | Library/Homebrew/cmd/info.rb | @@ -79,7 +79,7 @@ def github_info f
path = "Library/Formula/#{path.basename}"
end
- "From: https://github.com/#{user}/#{repo}/commits/master/#{path}"
+ "https://github.com/#{user}/#{repo}/commits/master/#{path}"
end
def info_formula f
@@ -116,7 +116,7 @@ def info_formula f
end
hi... | false |
Other | Homebrew | brew | a4988411ad49fa0c1935bcb2c725775f0742cd0b.json | brew-server: fix reference to removed method
Fixes Homebrew/homebrew#20744. | Library/Contributions/cmd/brew-server | @@ -8,6 +8,7 @@ $:.unshift(ENV['HOMEBREW_LIBRARY_PATH'])
require 'global'
require 'formula'
+require 'cmd/search'
require 'rubygems'
@@ -109,7 +110,7 @@ end
get '/search' do
q = params['q']
- results = search_brews(q)
+ results = Homebrew.search_formulae(q)
html_page("Results") do |s|
s << <<... | false |
Other | Homebrew | brew | aafe2f20d01ef5b03fd005c4b3107086c8d080a3.json | Add Fortran ENV helpers | Library/Homebrew/extend/ENV.rb | @@ -423,12 +423,16 @@ def remove keys, value
delete(key) if self[key].to_s.empty?
end if value
end
- def cc; self['CC'] or "cc"; end
- def cxx; self['CXX'] or "c++"; end
- def cflags; self['CFLAGS']; end
- def cxxflags;self['CXXFLAGS']; end
- def cppflags;self['CPPFLAGS']; end
- def ldflags; self['... | false |
Other | Homebrew | brew | 1aabba7b9e5ec9d3c3e1e5021236d4d006c97915.json | Show conflicting files on install if linking fails
Closes Homebrew/homebrew#18303.
Closes Homebrew/homebrew#20726. | Library/Homebrew/formula_installer.rb | @@ -364,6 +364,10 @@ def link
onoe "The `brew link` step did not complete successfully"
puts "The formula built, but is not symlinked into #{HOMEBREW_PREFIX}"
puts "You can try again using `brew link #{f.name}'"
+ puts
+ puts "Possible conflicting files are:"
+ mode = OpenStruct.new(... | false |
Other | Homebrew | brew | 6b5e73a2c343ac9947c5d7df2c4aaf99e7aca7e6.json | Copy env_proc when merging deps | Library/Homebrew/dependency.rb | @@ -100,7 +100,10 @@ def merge_repeats(deps)
grouped = deps.group_by(&:name)
deps.uniq.map do |dep|
- dep.class.new(dep.name, grouped.fetch(dep.name).map(&:tags).flatten)
+ tags = grouped.fetch(dep.name).map(&:tags).flatten
+ merged_dep = dep.class.new(dep.name, tags)
+ merge... | true |
Other | Homebrew | brew | 6b5e73a2c343ac9947c5d7df2c4aaf99e7aca7e6.json | Copy env_proc when merging deps | Library/Homebrew/test/test_dependency_expansion.rb | @@ -66,4 +66,9 @@ def test_merges_repeated_deps_with_differing_options
deps = [@foo2, @bar, @baz2, @qux]
assert_equal deps, Dependency.expand(@f)
end
+
+ def test_merger_preserves_env_proc
+ env_proc = @foo.env_proc = stub
+ assert_equal env_proc, Dependency.expand(@f).first.env_proc
+ end
end | true |
Other | Homebrew | brew | 9903e7cd92397323fdfaa05f778d5f16ae27e9d6.json | Remove unused guard in canonical_name
Closes Homebrew/homebrew#20718. | Library/Homebrew/formula.rb | @@ -355,8 +355,6 @@ def self.aliases
end
def self.canonical_name name
- name = name.to_s if name.kind_of? Pathname
-
# if name includes a '/', it may be a tap reference, path, or URL
if name.include? "/"
if name =~ %r{(.+)/(.+)/(.+)} | false |
Other | Homebrew | brew | 8777901cf013864d2acf5e3117dacbb6b68674c5.json | Use unicode escape
Prevents this character from being changed when resaving this file
with TextMate (1) on Snow Leopard.
Closes Homebrew/homebrew#20715. | Library/Homebrew/formula_installer.rb | @@ -264,7 +264,7 @@ def finish
ohai "Summary" if ARGV.verbose? or show_summary_heading
unless ENV['HOMEBREW_NO_EMOJI']
- print "🍺 " if MacOS.version >= :lion
+ print "\xf0\x9f\x8d\xba " if MacOS.version >= :lion
end
print "#{f.prefix}: #{f.prefix.abv}"
print ", built in #{pretty_... | false |
Other | Homebrew | brew | ad320c96fd7675ada7daa77b4975417109c4abbc.json | irb: pass strings to factory, not symbols | Library/Homebrew/cmd/irb.rb | @@ -4,7 +4,7 @@
class Symbol
def f
- Formula.factory(self)
+ Formula.factory(self.to_s)
end
end
class String | false |
Other | Homebrew | brew | 3dd2715ec8fe3505b99386b56fbe1df25b41b3da.json | remove no-op code in bottle.rb
ARGV.formulae returns formulae, so no need to pass through factory | Library/Homebrew/cmd/bottle.rb | @@ -101,7 +101,7 @@ def bottle
end
ARGV.formulae.each do |f|
- bottle_formula Formula.factory f
+ bottle_formula f
end
end
end | false |
Other | Homebrew | brew | f85863cbd0f5cc105908273dbeca532d24893823.json | Clean the cleaner
* Fix a comment; we pass in formulae not names
* Don't pass the formula to factory; this is just a pass-through
* Move require to top-level | Library/Homebrew/cleaner.rb | @@ -6,9 +6,9 @@
# * sets permissions on executables
class Cleaner
- # Create a cleaner for the given formula name, and clean the keg
+ # Create a cleaner for the given formula and clean its keg
def initialize f
- @f = Formula.factory f
+ @f = f
[f.bin, f.sbin, f.lib].select{ |d| d.exist? }.each{ |d|... | true |
Other | Homebrew | brew | f85863cbd0f5cc105908273dbeca532d24893823.json | Clean the cleaner
* Fix a comment; we pass in formulae not names
* Don't pass the formula to factory; this is just a pass-through
* Move require to top-level | Library/Homebrew/formula_installer.rb | @@ -6,6 +6,7 @@
require 'tab'
require 'bottles'
require 'caveats'
+require 'cleaner'
class FormulaInstaller
attr_reader :f
@@ -409,7 +410,6 @@ def clean
puts "in the formula."
return
end
- require 'cleaner'
Cleaner.new f
rescue Exception => e
opoo "The cleaning step did not c... | true |
Other | Homebrew | brew | 5439813c2712ab02191dfeb77df589d2a001e93b.json | Extract method in Github module | Library/Homebrew/utils.rb | @@ -271,6 +271,11 @@ def open url, headers={}, &block
end
end
+ def each_issue_matching(query, &block)
+ uri = URI.parse("https://api.github.com/legacy/issues/search/mxcl/homebrew/open/#{query}")
+ open(uri) { |f| Utils::JSON.load(f.read)['issues'].each(&block) }
+ end
+
def issues_for_formula name... | false |
Other | Homebrew | brew | 863e1a3cc54a7a3fe0b049d5754b235bd4208d3f.json | Remove trailing whitespace | Library/Homebrew/utils.rb | @@ -270,7 +270,7 @@ def open url, headers={}, &block
raise e
end
end
-
+
def issues_for_formula name
# bit basic as depends on the issue at github having the exact name of the
# formula in it. Which for stuff like objective-caml is unlikely. So we | false |
Other | Homebrew | brew | d6929f96a5324e245b4370f94314c8e10655367a.json | Use OkJson directly | Library/Homebrew/options.rb | @@ -15,10 +15,6 @@ def to_s
end
alias_method :to_str, :to_s
- def to_json
- flag.inspect
- end
-
def <=>(other)
name <=> other.name
end | true |
Other | Homebrew | brew | d6929f96a5324e245b4370f94314c8e10655367a.json | Use OkJson directly | Library/Homebrew/tab.rb | @@ -91,8 +91,8 @@ def options
def to_json
Utils::JSON.dump({
- :used_options => used_options.to_a,
- :unused_options => unused_options.to_a,
+ :used_options => used_options.map(&:to_s),
+ :unused_options => unused_options.map(&:to_s),
:built_as_bottle => built_as_bottle,
:pou... | true |
Other | Homebrew | brew | d6929f96a5324e245b4370f94314c8e10655367a.json | Use OkJson directly | Library/Homebrew/test/test_options.rb | @@ -14,10 +14,6 @@ def test_to_str
assert_equal "--foo", @option.to_str
end
- def test_to_json
- assert_equal %q{"--foo"}, @option.to_json
- end
-
def test_equality
foo = Option.new("foo")
bar = Option.new("bar") | true |
Other | Homebrew | brew | d6929f96a5324e245b4370f94314c8e10655367a.json | Use OkJson directly | Library/Homebrew/utils/json.rb | @@ -1,4 +1,4 @@
-require 'vendor/multi_json'
+require 'vendor/okjson'
module Utils
module JSON
@@ -7,15 +7,28 @@ module JSON
Error = Class.new(StandardError)
def load(str)
- MultiJson.load(str)
- rescue MultiJson::DecodeError => e
+ Vendor::OkJson.decode(str)
+ rescue Vendor::OkJson::E... | true |
Other | Homebrew | brew | a02d5f33b42502503dafb28b3796693b1a57ebab.json | deps: use OpenStruct to capture the mode | Library/Homebrew/cmd/deps.rb | @@ -1,18 +1,26 @@
require 'formula'
+require 'ostruct'
module Homebrew extend self
def deps
- if ARGV.include? '--installed'
+ mode = OpenStruct.new(
+ :installed? => ARGV.include?('--installed'),
+ :tree? => ARGV.include?('--tree'),
+ :all? => ARGV.include?('--all'),
+ :t... | false |
Other | Homebrew | brew | c2faf2a0cadc162741f4083178dc35864fcee035.json | deps: remove need for Array extension | Library/Homebrew/cmd/deps.rb | @@ -11,14 +11,18 @@ def deps
puts_deps_tree ARGV.formulae
else
raise FormulaUnspecifiedError if ARGV.named.empty?
- all_deps = ARGV.formulae.map do |f|
- ARGV.one? ? f.deps.default : f.recursive_dependencies
- end.intersection.map(&:name)
+ all_deps = deps_for_formulae ARGV.form... | false |
Other | Homebrew | brew | 6790f6adb05206b005a3b7aeb13c4de6379568a7.json | deps: extract output methods | Library/Homebrew/cmd/deps.rb | @@ -3,20 +3,12 @@
module Homebrew extend self
def deps
if ARGV.include? '--installed'
- Formula.installed.each do |f|
- puts "#{f.name}: #{f.deps*' '}"
- end
+ puts_deps Formula.installed
elsif ARGV.include? '--all'
- Formula.each do |f|
- puts "#{f.name}: #{f.deps*... | false |
Other | Homebrew | brew | daacb69e9b135d2faf5ab34db83c30a0d490cb45.json | Add tap and untap to zsh completion help
Closes Homebrew/homebrew#20676.
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | Library/Contributions/brew_zsh_completion.zsh | @@ -39,8 +39,10 @@ _1st_arguments=(
'remove:remove a formula'
'search:search for a formula (/regex/ or string)'
'server:start a local web app that lets you browse formulae (requires Sinatra)'
+ 'tap:tap a new formula repository from GitHub, or list existing taps'
'unlink:unlink a formula'
'unpin:unpin s... | false |
Other | Homebrew | brew | c774ed05e4ba8a8467805256b69cb4ea824cb98f.json | Update cache location in man page
Fixes Homebrew/homebrew#20640. | Library/Contributions/manpages/brew.1.md | @@ -334,7 +334,7 @@ Note that these flags should only appear after a command.
spaces.
* `--cache`:
- Display Homebrew's download cache. *Default:* `~/Library/Caches/Homebrew`
+ Display Homebrew's download cache. See also `HOMEBREW_CACHE`.
* `--cache` <formula>:
Display the file or directory us... | true |
Other | Homebrew | brew | c774ed05e4ba8a8467805256b69cb4ea824cb98f.json | Update cache location in man page
Fixes Homebrew/homebrew#20640. | share/man/man1/brew.1 | @@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BREW" "1" "May 2013" "Homebrew" "brew"
+.TH "BREW" "1" "June 2013" "Homebrew" "brew"
.
.SH "NAME"
\fBbrew\fR \- The missing package manager for OS X
@@ -368,7 +368,7 @@ If \fB\-\-compact\fR is passed, show all op... | true |
Other | Homebrew | brew | 3ab28ff9ad712f2d235768c1375d361c44fe363b.json | Remove unused accessor | Library/Homebrew/formula.rb | @@ -696,7 +696,7 @@ def self.method_added method
# The methods below define the formula DSL.
class << self
- attr_rw :homepage, :keg_only_reason, :skip_clean_all, :cc_failures
+ attr_rw :homepage, :keg_only_reason, :cc_failures
attr_rw :plist_startup, :plist_manual
Checksum::TYPES.each do |cks... | false |
Other | Homebrew | brew | d8756075f4e44fd4e431e39fbbe6ce5c85813f5f.json | Use a Set for skip_clean_paths | Library/Homebrew/formula.rb | @@ -789,10 +789,9 @@ def skip_clean *paths
return
end
- @skip_clean_paths ||= []
paths.each do |p|
p = p.to_s unless p == :la # Keep :la in paths as a symbol
- @skip_clean_paths << p unless @skip_clean_paths.include? p
+ skip_clean_paths << p
end
end
@@... | false |
Other | Homebrew | brew | a783946b6dc1e2ccbce9260a5d132330811bd317.json | Formula: improve local bottle failure messaging. | Library/Homebrew/formula.rb | @@ -406,7 +406,15 @@ def self.factory name
elsif name.match bottle_regex
bottle_filename = Pathname(name).realpath
version = Version.parse(bottle_filename).to_s
- name = bottle_filename.basename.to_s.rpartition("-#{version}").first
+ bottle_basename = bottle_filename.basename.to_s
+ na... | false |
Other | Homebrew | brew | 45d3e436ee6f4bfcc7d5658a062feb64a184695a.json | Simplify regexp match | Library/Homebrew/os/mac/xquartz.rb | @@ -24,7 +24,7 @@ def version
else
# Finally, try to find it via pkgutil. This is slow, and only works
# for the upstream XQuartz package, so use it as a last resort.
- MacOS.pkgutil_info(FORGE_PKG_ID) =~ /version: (\d\.\d\.\d).+$/ and $1
+ MacOS.pkgutil_info(FORGE_PKG_ID)[/versio... | false |
Other | Homebrew | brew | cf66686a17617e6b9235f8aa655d6f8d3c846abf.json | Add brew-profile to contrib
This command loads all formulae and dumps an HTML profile report to
stdout. So e.g. `brew profile >/tmp/report.html` | Library/Contributions/cmd/brew-profile.rb | @@ -0,0 +1,12 @@
+begin
+ require 'rubygems'
+ require 'ruby-prof'
+rescue LoadError
+ abort 'This command requires the ruby-prof gem'
+end
+
+require 'formula'
+
+RubyProf.start
+Formula.names.each { |n| Formula.factory(n) }
+RubyProf::GraphHtmlPrinter.new(RubyProf.stop).print(STDOUT) | false |
Other | Homebrew | brew | e9d245cf3a6e1ce783931e8e339c11fb0f3757d5.json | Avoid unnecessary float to string conversion | Library/Homebrew/bottles.rb | @@ -81,9 +81,9 @@ def bottle_url f
def bottle_tag
case MacOS.version
- when 10.8, 10.7, 10.5
+ when "10.8", "10.7", "10.5"
MacOS.cat
- when 10.6
+ when "10.6"
Hardware::CPU.is_64_bit? ? :snow_leopard : :snow_leopard_32
else
Hardware::CPU.type == :ppc ? Hardware::CPU.family : MacOS.cat | true |
Other | Homebrew | brew | e9d245cf3a6e1ce783931e8e339c11fb0f3757d5.json | Avoid unnecessary float to string conversion | Library/Homebrew/macos.rb | @@ -11,11 +11,11 @@ def version
def cat
case MacOS.version
- when 10.8 then :mountain_lion
- when 10.7 then :lion
- when 10.6 then :snow_leopard
- when 10.5 then :leopard
- when 10.4 then :tiger
+ when "10.8" then :mountain_lion
+ when "10.7" then :lion
+ when "10.6" then :snow_leopard... | true |
Other | Homebrew | brew | e9d245cf3a6e1ce783931e8e339c11fb0f3757d5.json | Avoid unnecessary float to string conversion | Library/Homebrew/os/mac/xcode.rb | @@ -19,11 +19,11 @@ def bad_xcode_select_path?
def latest_version
case MacOS.version
- when 10.4 then "2.5"
- when 10.5 then "3.1.4"
- when 10.6 then "3.2.6"
- when 10.7, 10.8 then "4.6.3"
- when 10.9 then "5.0"
+ when "10.4" then "2.5"
+ when "10.5" ... | true |
Other | Homebrew | brew | e9d245cf3a6e1ce783931e8e339c11fb0f3757d5.json | Avoid unnecessary float to string conversion | Library/Homebrew/test/test_bottle_tag.rb | @@ -3,42 +3,42 @@
class BottleTagTests < Test::Unit::TestCase
def test_cat_tiger_ppc
- MacOS.stubs(:version).returns(MacOS::Version.new(10.4))
+ MacOS.stubs(:version).returns(MacOS::Version.new("10.4"))
Hardware::CPU.stubs(:type).returns(:ppc)
Hardware::CPU.stubs(:family).returns(:foo)
assert... | true |
Other | Homebrew | brew | e9d245cf3a6e1ce783931e8e339c11fb0f3757d5.json | Avoid unnecessary float to string conversion | Library/Homebrew/test/test_dependency_collector.rb | @@ -102,22 +102,22 @@ def test_autotools_dep_system_autotools
end
def test_x11_proxy_dep_mountain_lion
- MacOS.stubs(:version).returns(MacOS::Version.new(10.8))
+ MacOS.stubs(:version).returns(MacOS::Version.new("10.8"))
assert_equal Dependency.new("libpng"), @d.build(:libpng)
end
def test_x1... | true |
Other | Homebrew | brew | e9d245cf3a6e1ce783931e8e339c11fb0f3757d5.json | Avoid unnecessary float to string conversion | Library/Homebrew/test/test_version_subclasses.rb | @@ -4,7 +4,7 @@
class MacOSVersionTests < Test::Unit::TestCase
def setup
- @v = MacOS::Version.new(10.7)
+ @v = MacOS::Version.new("10.7")
end
def test_compare_with_symbol
@@ -34,9 +34,9 @@ def test_compare_with_string
end
def test_compare_with_version
- assert_operator @v, :>, Version.ne... | true |
Other | Homebrew | brew | 2e2d9221901e072bf9aa684ffebcb441af01d93f.json | Run tests under actual OS version | Library/Homebrew/test/testing_env.rb | @@ -34,8 +34,8 @@
RUBY_PATH = RUBY_BIN + RbConfig::CONFIG['ruby_install_name'] + RbConfig::CONFIG['EXEEXT']
MACOS = true
-MACOS_VERSION = ENV.fetch('MACOS_VERSION', 10.6)
-MACOS_FULL_VERSION = '10.6.8'
+MACOS_FULL_VERSION = `/usr/bin/sw_vers -productVersion`.chomp
+MACOS_VERSION = ENV.fetch('MACOS_VERSION') { MACOS... | false |
Other | Homebrew | brew | 113125d394d2b9530aec111574da10e46b554f5a.json | Remove Version#to_a alias
Exposing this as "to_a" was a mistake, versions are not arrays and it
causes incorrect behavior when splatted or using Kernel#Array(). Use the
more correct name "tokens" instead. | Library/Homebrew/requirements/python_dependency.rb | @@ -24,10 +24,10 @@ class PythonInstalled < Requirement
class PythonVersion < Version
def major
- to_a[0].to_s.to_i # Python's major.minor are always ints.
+ tokens[0].to_s.to_i # Python's major.minor are always ints.
end
def minor
- to_a[1].to_s.to_i
+ tokens[1].to_s.to_i
... | true |
Other | Homebrew | brew | 113125d394d2b9530aec111574da10e46b554f5a.json | Remove Version#to_a alias
Exposing this as "to_a" was a mistake, versions are not arrays and it
causes incorrect behavior when splatted or using Kernel#Array(). Use the
more correct name "tokens" instead. | Library/Homebrew/version.rb | @@ -184,7 +184,6 @@ def pad_to(length)
def tokens
@tokens ||= tokenize
end
- alias_method :to_a, :tokens
def tokenize
@version.scan( | true |
Other | Homebrew | brew | ca10e5005abcf36fba5760b60c0aeeefa5ca6505.json | Fix pretty names | Library/Homebrew/os/mac/version.rb | @@ -15,7 +15,15 @@ def <=>(other)
end
def pretty_name
- @version.split('_').map(&:capitalize).join(' ')
+ case @version
+ when "10.9" then "Mavericks"
+ when "10.8" then "Mountain Lion"
+ when "10.7" then "Lion"
+ when "10.6" then "Snow Leopard"
+ when "10.5" then "Leopard... | false |
Other | Homebrew | brew | 5539c97191aa499d2e1fc78fe97d534bd744076a.json | Fix another constant reference | Library/Homebrew/extend/ENV.rb | @@ -389,10 +389,10 @@ def remove_cc_etc
removed
end
def append_to_cflags newflags
- append(CC_FLAG_VARS, newflags)
+ append(HomebrewEnvExtension::CC_FLAG_VARS, newflags)
end
def remove_from_cflags val
- remove CC_FLAG_VARS, val
+ remove HomebrewEnvExtension::CC_FLAG_VARS, val
end
def ... | false |
Other | Homebrew | brew | a463398a8b30454e532029d67fc481ee5b71b25a.json | Fix constant reference | Library/Homebrew/extend/ENV.rb | @@ -484,8 +484,8 @@ def fortran
self['FC'] = which 'gfortran'
self['F77'] = self['FC']
- FC_FLAG_VARS.each {|key| self[key] = cflags}
- set_cpu_flags(FC_FLAG_VARS)
+ HomebrewEnvExtension::FC_FLAG_VARS.each {|key| self[key] = cflags}
+ set_cpu_flags(HomebrewEnvExtension::FC_FLAG_VARS)... | false |
Other | Homebrew | brew | eee5a0920297dafaeb51007add4be2052c31d4db.json | Favor compound if over compound unless | Library/Homebrew/extend/ENV.rb | @@ -189,7 +189,8 @@ def remove_macosxsdk version=MacOS.version
delete('MACOSX_DEPLOYMENT_TARGET')
delete('CPATH')
remove 'LDFLAGS', "-L#{HOMEBREW_PREFIX}/lib"
- unless (sdk = MacOS.sdk_path(version)).nil? or MacOS::CLT.installed?
+
+ if (sdk = MacOS.sdk_path(version)) && !MacOS::CLT.installed?
... | false |
Other | Homebrew | brew | 9427704176f3c877484fa3d66b2b272455b4225f.json | Use ||= instead of unless | Library/Homebrew/extend/ENV.rb | @@ -457,7 +457,7 @@ def fortran
if self['FC']
ohai "Building with an alternative Fortran compiler"
puts "This is unsupported."
- self['F77'] = self['FC'] unless self['F77']
+ self['F77'] ||= self['FC']
if ARGV.include? '--default-fortran-flags'
flags_to_set = [] | false |
Other | Homebrew | brew | e73f869d8427e093a536cf10c38ec714264245d3.json | Remove outdated comment | Library/Homebrew/extend/ENV.rb | @@ -340,9 +340,6 @@ def set_cpu_cflags default=DEFAULT_FLAGS, map=Hardware::CPU.optimization_flags
# actually c-compiler, so cc would be a better name
def compiler
- # TODO seems that ENV.clang in a Formula.install should warn when called
- # if the user has set something that is tested here
-
# test... | false |
Other | Homebrew | brew | 381255adecbbd16fca0d2ae1b52330a254bfae76.json | Assign this inline | Library/Homebrew/extend/ENV.rb | @@ -181,16 +181,15 @@ def clang
@compiler = :clang
end
- def remove_macosxsdk v=MacOS.version
+ def remove_macosxsdk version=MacOS.version
# Clear all lib and include dirs from CFLAGS, CPPFLAGS, LDFLAGS that were
# previously added by macosxsdk
- v = v.to_s
+ version = version.to_s
remo... | false |
Other | Homebrew | brew | 4e4a5af731b9a17f401d13d9dcd9e33ee99da186.json | Use has_key? rather than accessing the value | Library/Homebrew/extend/ENV.rb | @@ -306,7 +306,7 @@ def universal_binary
def replace_in_cflags before, after
CC_FLAG_VARS.each do |key|
- self[key] = self[key].sub before, after if self[key]
+ self[key] = self[key].sub(before, after) if has_key?(key)
end
end
| false |
Other | Homebrew | brew | a458555ccb5d4d34befabde63eddacdd7a4613a8.json | Make flag lists into constants | Library/Homebrew/extend/ENV.rb | @@ -1,8 +1,10 @@
require 'hardware'
module HomebrewEnvExtension
- # -w: keep signal to noise high
SAFE_CFLAGS_FLAGS = "-w -pipe"
+ CC_FLAG_VARS = %w{CFLAGS CXXFLAGS OBJCFLAGS OBJCXXFLAGS}
+ FC_FLAG_VARS = %w{FCFLAGS FFLAGS}
+ DEFAULT_FLAGS = '-march=core2 -msse4'
def setup_build_environment
# Clear... | false |
Other | Homebrew | brew | 313134fbe361acbf474a5ad9f507e230f70ff4ae.json | ScriptFileFormula: remove override warning
Closes Homebrew/homebrew#20445. | Library/Homebrew/formula_specialties.rb | @@ -5,14 +5,6 @@ class ScriptFileFormula < Formula
def install
bin.install Dir['*']
end
-
- def self.method_added method
- super method
- case method
- when :install
- opoo "#{name}: if you are overriding ScriptFileFormula#install, use a Formula instead"
- end
- end
end
# See browser f... | false |
Other | Homebrew | brew | 776c08490fdc6451e8c53e33cd22756d4f0477ed.json | Fix bug in `brew list --pinned`
Pinned formulae which were pinned at a previous version but then upgraded
would not be listed by `brew list --pinned`. This is due to the good old
"File.exist? thinks broken symlinks don't exist" gotcha, so the test in
the select block in list_pinned has been changed to check if the pin... | Library/Homebrew/cmd/list.rb | @@ -58,7 +58,8 @@ def list_pinned
else
ARGV.named.map{ |n| HOMEBREW_CELLAR+n }.select{ |pn| pn.exist? }
end.select do |d|
- (HOMEBREW_LIBRARY/"PinnedKegs"/d.basename.to_s).exist?
+ keg_pin = (HOMEBREW_LIBRARY/"PinnedKegs"/d.basename.to_s)
+ keg_pin.exist? or keg_pin.symlink?
end.eac... | false |
Other | Homebrew | brew | 0f314f9808fa86ede1abb1183e21d29ddff87fd0.json | Remove unused variable | Library/Homebrew/build.rb | @@ -140,7 +140,7 @@ def install
if f.fails_with? ENV.compiler
begin
- ENV.send CompilerSelector.new(f, ENV.compiler).compiler
+ ENV.send CompilerSelector.new(f).compiler
rescue CompilerSelectionError => e
raise e.message
end | true |
Other | Homebrew | brew | 0f314f9808fa86ede1abb1183e21d29ddff87fd0.json | Remove unused variable | Library/Homebrew/compilers.rb | @@ -35,9 +35,8 @@ def empty?
end
class CompilerSelector
- def initialize(f, old_compiler)
+ def initialize(f)
@f = f
- @old_compiler = old_compiler
@compilers = CompilerQueue.new
%w{clang llvm gcc gcc_4_0}.map(&:to_sym).each do |cc|
unless MacOS.send("#{cc}_build_version").nil? | true |
Other | Homebrew | brew | 0f314f9808fa86ede1abb1183e21d29ddff87fd0.json | Remove unused variable | Library/Homebrew/test/test_compiler_selector.rb | @@ -27,7 +27,7 @@ def setup
end
def actual_cc
- CompilerSelector.new(@f, @cc).compiler
+ CompilerSelector.new(@f).compiler
end
def test_all_compiler_failures | true |
Other | Homebrew | brew | e0fba99699e168d863dd7bcb57190766d612c95b.json | Pull tap list into a constant | Library/Homebrew/cmd/search.rb | @@ -29,19 +29,11 @@ def search
if query
found = search_results.length
- threads = []
results = []
- threads << Thread.new { search_tap "josegonzalez", "php", rx }
- threads << Thread.new { search_tap "samueljohn", "python", rx }
- threads << Thread.new { search_tap... | false |
Other | Homebrew | brew | c30f00c37cf8a6405426bc7b4091b49aee68620e.json | Remove use of global variable | Library/Homebrew/cmd/search.rb | @@ -27,7 +27,7 @@ def search
end
if query
- $found = search_results.length
+ found = search_results.length
threads = []
results = []
@@ -42,12 +42,13 @@ def search
threads << Thread.new { search_tap "Homebrew", "x11", rx }
threads.each do |t|
- ... | false |
Other | Homebrew | brew | 1d1c292bcb462332945d601751d63def9e516360.json | Extract query construction | Library/Homebrew/cmd/search.rb | @@ -13,13 +13,7 @@ def search
exec_browser "http://packages.debian.org/search?keywords=#{ARGV.next}&searchon=names&suite=all§ion=all"
else
query = ARGV.first
- rx = case query
- when nil then ""
- when %r{^/(.*)/$} then Regexp.new($1)
- else
- /.*#{Regexp.escape query}.... | false |
Other | Homebrew | brew | 90768d03d28f5c88a0049532f914ad867e1b7241.json | Use inspect instead of escaping quotes | Library/Homebrew/cmd/search.rb | @@ -26,7 +26,7 @@ def search
if not query.to_s.empty? and $stdout.tty? and msg = blacklisted?(query)
unless search_results.empty?
puts
- puts "If you meant `#{query}' precisely:"
+ puts "If you meant #{query.inspect} precisely:"
puts
end
puts msg... | false |
Other | Homebrew | brew | d23ce833d7cfc13ed07c5f1edbc35b0c1e036755.json | Add pkg-config files for 10.9
Seems to be that 10.9 needs the same ones as 10.8.
Fixes Homebrew/homebrew#20436. | Library/ENV/pkgconfig/10.9 | @@ -0,0 +1 @@
+10.8
\ No newline at end of file | false |
Other | Homebrew | brew | 2045217a6895ea8b5ba0c3aab14b848dac9edea3.json | install: remove overcautious array manipulation | Library/Homebrew/cmd/install.rb | @@ -18,7 +18,8 @@ def install
end
end unless ARGV.force?
- install_formulae ARGV.formulae
+ perform_preinstall_checks
+ ARGV.formulae.each { |f| install_formula(f) }
end
def check_ppc
@@ -69,16 +70,6 @@ def perform_preinstall_checks
check_cellar
end
- def install_formulae formu... | false |
Other | Homebrew | brew | 5369199df36a0fbf707e08ef5f3569782fb0cde4.json | Fix version misdetection from fa582cb9ac65 | Library/Homebrew/version.rb | @@ -276,7 +276,7 @@ def self._parse spec
return m.captures.first unless m.nil?
# e.g. http://www.openssl.org/source/openssl-0.9.8s.tar.gz
- m = /-([^-]+)/.match(stem)
+ m = /-v?([^-]+)/.match(stem)
return m.captures.first unless m.nil?
# e.g. astyle_1.23_macosx.tar.gz | false |
Other | Homebrew | brew | fdaea3189d490c585c5752f4a0423dcfb972d5fd.json | Check method existence rather than Ruby version | Library/Homebrew/test/testing_env.rb | @@ -107,7 +107,7 @@ module Test::Unit::Assertions
def assert_empty(obj, msg=nil)
assert_respond_to(obj, :empty?, msg)
assert(obj.empty?, msg)
- end if RUBY_VERSION.to_f <= 1.8
+ end unless method_defined?(:assert_empty)
end
class Test::Unit::TestCase | false |
Other | Homebrew | brew | 15626b38cacd6151b9b215a421c433c9fcea8893.json | Recognize OS X 10.9 and Xcode 5.0
Closes Homebrew/homebrew#20410.
Closes Homebrew/homebrew#20401.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/macos.rb | @@ -206,6 +206,7 @@ def prefer_64_bit?
"4.6" => { :llvm_build => 2336, :clang => "4.2", :clang_build => 425 },
"4.6.1" => { :llvm_build => 2336, :clang => "4.2", :clang_build => 425 },
"4.6.2" => { :llvm_build => 2336, :clang => "4.2", :clang_build => 425 },
+ "5.0" => { :clang => "5.0", :clang_bu... | true |
Other | Homebrew | brew | 15626b38cacd6151b9b215a421c433c9fcea8893.json | Recognize OS X 10.9 and Xcode 5.0
Closes Homebrew/homebrew#20410.
Closes Homebrew/homebrew#20401.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/os/mac/xcode.rb | @@ -23,10 +23,11 @@ def latest_version
when 10.5 then "3.1.4"
when 10.6 then "3.2.6"
when 10.7, 10.8 then "4.6.2"
+ when 10.9 then "5.0"
else
# Default to newest known version of Xcode for unreleased OSX versions.
- if MacOS.version > 10.8
- "4.6.2"
+ if ... | true |
Other | Homebrew | brew | 652e0982f08494b1b6ba7617c77c6c85f9f6719f.json | Add doctor check for OS X > 10.8 | Library/Homebrew/cmd/doctor.rb | @@ -243,6 +243,14 @@ def check_for_osx_gcc_installer
end
end
+def check_for_unsupported_osx
+ if MacOS.version > 10.8 then <<-EOS.undent
+ You are using Mac OS X #{MacOS.version}.
+ We do not yet provide support for this (unreleased) version.
+ EOS
+ end
+end
+
def check_for_stray_developer_directory
... | false |
Other | Homebrew | brew | ef054a2d029199a1a67c45c7e44ee82f0f6a828c.json | doctor: add check for osx-gcc-installer
This might not detect all cases, but should detect the two most
common ones. | Library/Homebrew/cmd/doctor.rb | @@ -232,6 +232,17 @@ def __check_clt_up_to_date
end
end
+def check_for_osx_gcc_installer
+ if (MacOS.version < 10.7 || MacOS::Xcode.version < "4.1") && \
+ MacOS.clang_version == "2.1" then <<-EOS.undent
+ You have osx-gcc-installer installed.
+ Homebrew doesn't support osx-gcc-installer, and it is know... | false |
Other | Homebrew | brew | 784c9670f1573d5ccb97a102ac7ee7ccb15652c5.json | Add failing test for a misdetected version | Library/Homebrew/test/test_versions.rb | @@ -292,4 +292,9 @@ def test_fontforge_version
def test_ezlupdate_version
assert_version_detected '2011.10', 'https://github.com/downloads/ezsystems/ezpublish-legacy/ezpublish_community_project-2011.10-with_ezc.tar.bz2'
end
+
+ def test_aespipe_version_style
+ assert_version_detected '2.4c',
+ 'http... | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.