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 | 5e41d0f51fb0a1fcf08a4ff2beb0bc5924d05f60.json | SUPPORTERS: add final list. | SUPPORTERS.md | @@ -86,6 +86,72 @@ These awesome people supported our Kickstarter by giving us £50 or more:
* [Paul Howard](https://github.com/pauldhoward)
* [Mårten Gustafson](http://marten.gustafson.pp.se)
* [Markus Heurung](http://markusheurung.de)
+* [Rajiv Aaron Manglani](http://www.rajivmanglani.com/)
+* Zachary Elliott
+* [J... | false |
Other | Homebrew | brew | 809a52a6a3e8b0899aa2697f767b8dcc22210bd8.json | audit: activate ENV extensions | Library/Homebrew/cmd/--env.rb | @@ -8,6 +8,7 @@ def __env
if superenv?
ENV.deps = ARGV.formulae.map(&:name) unless ARGV.named.empty?
end
+
ENV.setup_build_environment
ENV.universal_binary if ARGV.build_universal?
if $stdout.tty? | true |
Other | Homebrew | brew | 809a52a6a3e8b0899aa2697f767b8dcc22210bd8.json | audit: activate ENV extensions | Library/Homebrew/cmd/audit.rb | @@ -8,6 +8,7 @@ def audit
formula_count = 0
problem_count = 0
+ ENV.activate_extensions!
ENV.setup_build_environment
ff = if ARGV.named.empty? | true |
Other | Homebrew | brew | 9a5b15bb61e3c043c1121d51e12a55b8d5dba50a.json | Move common ENV methods to a shared module | Library/Homebrew/extend/ENV.rb | @@ -1,4 +1,5 @@
require 'hardware'
+require 'extend/ENV/shared'
require 'extend/ENV/super'
def superenv?
@@ -21,9 +22,9 @@ def activate_extensions!
ENV.extend(EnvActivation)
module HomebrewEnvExtension
+ include SharedEnvExtension
+
SAFE_CFLAGS_FLAGS = "-w -pipe"
- CC_FLAG_VARS = %w{CFLAGS CXXFLAGS OBJCFL... | true |
Other | Homebrew | brew | 9a5b15bb61e3c043c1121d51e12a55b8d5dba50a.json | Move common ENV methods to a shared module | Library/Homebrew/extend/ENV/super.rb | @@ -1,4 +1,5 @@
require 'macos'
+require 'extend/ENV/shared'
### Why `superenv`?
# 1) Only specify the environment we need (NO LDFLAGS for cmake)
@@ -11,6 +12,8 @@
# 8) Build-system agnostic configuration of the tool-chain
module Superenv
+ include SharedEnvExtension
+
attr_accessor :keg_only_deps, :deps, ... | true |
Other | Homebrew | brew | 061f8cb35f8ac155e16943951ae39aa75cbd24d2.json | Fix superenv ENV[] hack
We override ENV[] to always return strings under superenv, because
legacy formulae assume that CFLAGS, etc. are non-nil.
However, the current implementation has a bug. If I simply concatenate
ENV['CFLAGS'] with another string, it mutates ENV['CFLAGS']:
irb> ENV['CFLAGS']
=> ""
irb> ENV[... | Library/Homebrew/superenv.rb | @@ -29,15 +29,7 @@ def [] key
if has_key? key
fetch(key)
elsif %w{CPPFLAGS CFLAGS LDFLAGS}.include? key
- class << (a = "")
- attr_accessor :key
- def + value
- ENV[key] = value
- end
- alias_method '<<', '+'
- end
-... | false |
Other | Homebrew | brew | d09e23c8b1df7404d95b963e53bef3d1936a921a.json | Move extra stdenv setup to extended callback | Library/Homebrew/extend/ENV.rb | @@ -14,7 +14,6 @@ def activate_extensions!
extend(Superenv)
else
extend(HomebrewEnvExtension)
- prepend 'PATH', "#{HOMEBREW_PREFIX}/bin", ':' unless ORIGINAL_PATHS.include? HOMEBREW_PREFIX/'bin'
end
end
end
@@ -27,6 +26,12 @@ module HomebrewEnvExtension
FC_FLAG_VARS = %w{FCFLAGS FFLA... | false |
Other | Homebrew | brew | eebc04ec9bfaca32024e2cb80ebf52b8ee68a7c9.json | Move common stuff to extend/ENV.rb | Library/Homebrew/build.rb | @@ -34,7 +34,7 @@ def main
require 'hardware'
require 'keg'
- require 'superenv'
+ require 'extend/ENV'
# Force any future invocations of sudo to require the user's password to be
# re-entered. This is in-case any build script call sudo. Certainly this is | true |
Other | Homebrew | brew | eebc04ec9bfaca32024e2cb80ebf52b8ee68a7c9.json | Move common stuff to extend/ENV.rb | Library/Homebrew/cmd/--env.rb | @@ -1,4 +1,4 @@
-require 'superenv'
+require 'extend/ENV'
require 'hardware'
module Homebrew extend self | true |
Other | Homebrew | brew | eebc04ec9bfaca32024e2cb80ebf52b8ee68a7c9.json | Move common stuff to extend/ENV.rb | Library/Homebrew/cmd/audit.rb | @@ -1,6 +1,6 @@
require 'formula'
require 'utils'
-require 'superenv'
+require 'extend/ENV'
require 'formula_cellar_checks'
module Homebrew extend self | true |
Other | Homebrew | brew | eebc04ec9bfaca32024e2cb80ebf52b8ee68a7c9.json | Move common stuff to extend/ENV.rb | Library/Homebrew/cmd/sh.rb | @@ -1,4 +1,4 @@
-require 'superenv'
+require 'extend/ENV'
require 'formula'
module Homebrew extend self | true |
Other | Homebrew | brew | eebc04ec9bfaca32024e2cb80ebf52b8ee68a7c9.json | Move common stuff to extend/ENV.rb | Library/Homebrew/extend/ENV.rb | @@ -1,4 +1,25 @@
require 'hardware'
+require 'superenv'
+
+def superenv?
+ return false if MacOS::Xcode.without_clt? && MacOS.sdk_path.nil?
+ return false unless Superenv.bin && Superenv.bin.directory?
+ return false if ARGV.include? "--env=std"
+ true
+end
+
+module EnvActivation
+ def activate_extensions!
+ ... | true |
Other | Homebrew | brew | eebc04ec9bfaca32024e2cb80ebf52b8ee68a7c9.json | Move common stuff to extend/ENV.rb | Library/Homebrew/requirement.rb | @@ -1,6 +1,7 @@
require 'dependable'
require 'dependency'
require 'build_environment'
+require 'extend/ENV'
# A base class for non-formula requirements needed by formulae.
# A "fatal" requirement is one that will fail the build if it is not present.
@@ -117,7 +118,6 @@ def yielder
if instance_variable_def... | true |
Other | Homebrew | brew | eebc04ec9bfaca32024e2cb80ebf52b8ee68a7c9.json | Move common stuff to extend/ENV.rb | Library/Homebrew/superenv.rb | @@ -1,4 +1,3 @@
-require 'extend/ENV'
require 'macos'
### Why `superenv`?
@@ -11,26 +10,6 @@
# 7) Simpler formula that *just work*
# 8) Build-system agnostic configuration of the tool-chain
-def superenv?
- return false if MacOS::Xcode.without_clt? && MacOS.sdk_path.nil?
- return false unless Superenv.bin && ... | true |
Other | Homebrew | brew | a04f1ac3d362e3da38db7aea0bc89ebc55f92478.json | Move superbin into Superenv module | Library/Homebrew/superenv.rb | @@ -11,13 +11,9 @@
# 7) Simpler formula that *just work*
# 8) Build-system agnostic configuration of the tool-chain
-def superbin
- @bin ||= (HOMEBREW_REPOSITORY/"Library/ENV").children.reject{|d| d.basename.to_s > MacOS::Xcode.version }.max
-end
-
def superenv?
return false if MacOS::Xcode.without_clt? && Mac... | false |
Other | Homebrew | brew | e6d5e813d45b3ec65ccc393d4341ab9d906274a0.json | LinuxCPUs: provide stub methods | Library/Homebrew/os/linux/hardware.rb | @@ -2,6 +2,11 @@ module LinuxCPUs
OPTIMIZATION_FLAGS = {}.freeze
def optimization_flags; OPTIMIZATION_FLAGS; end
+ # Linux supports x86 only, and universal archs do not apply
+ def arch_32_bit; :i386; end
+ def arch_64_bit; :x86_64; end
+ def universal_archs; []; end
+
def type
@cpu_type ||= case `u... | false |
Other | Homebrew | brew | b0d45b29bd91a76d1fc41a2aedd0cfe5238fd6da.json | Mach: add as_cmake_arch_flags helper | Library/Homebrew/mach.rb | @@ -32,6 +32,10 @@ def as_arch_flags
self.collect{ |a| "-arch #{a}" }.join(' ')
end
+ def as_cmake_arch_flags
+ self.join(';')
+ end
+
protected
def intersects_all?(*set) | false |
Other | Homebrew | brew | ab633864d5db641d27fdce49c7c66074b931b19d.json | Mach: improve PPC arch detection
Also adds some reusable constants into the global Hardware::CPU
namespace, available on both OS X and Linux. | Library/Homebrew/hardware.rb | @@ -1,5 +1,10 @@
class Hardware
module CPU extend self
+ INTEL_32BIT_ARCHS = [:i386].freeze
+ INTEL_64BIT_ARCHS = [:x86_64].freeze
+ PPC_32BIT_ARCHS = [:ppc, :ppc7400, :ppc7450, :ppc970].freeze
+ PPC_64BIT_ARCHS = [:ppc64].freeze
+
def type
@type || :dunno
end | true |
Other | Homebrew | brew | ab633864d5db641d27fdce49c7c66074b931b19d.json | Mach: improve PPC arch detection
Also adds some reusable constants into the global Hardware::CPU
namespace, available on both OS X and Linux. | Library/Homebrew/mach.rb | @@ -1,20 +1,44 @@
module ArchitectureListExtension
+ def fat?
+ length > 1
+ end
+
+ def intel_universal?
+ intersects_all?(Hardware::CPU::INTEL_32BIT_ARCHS, Hardware::CPU::INTEL_64BIT_ARCHS)
+ end
+
+ def ppc_universal?
+ intersects_all?(Hardware::CPU::PPC_32BIT_ARCHS, Hardware::CPU::PPC_64BIT_ARCHS)
+ ... | true |
Other | Homebrew | brew | 8bb26ee2d9567cb91180d31e747753e4dd803f53.json | SubversionDownloadStrategy: fix reference to removed method | Library/Homebrew/download_strategy.rb | @@ -290,7 +290,7 @@ def shell_quote str
end
def get_externals
- `'#{shell_quote(svn)}' propget svn:externals '#{shell_quote(@url)}'`.chomp.each_line do |line|
+ `'#{shell_quote(@@svn)}' propget svn:externals '#{shell_quote(@url)}'`.chomp.each_line do |line|
name, url = line.split(/\s+/)
yiel... | false |
Other | Homebrew | brew | 31348c34aeffe045181237cc393c177cfa6e08b4.json | add ubuntu package search | Library/Contributions/manpages/brew.1.md | @@ -269,7 +269,7 @@ Note that these flags should only appear after a command.
surrounded with slashes, then it is interpreted as a regular expression.
If no search term is given, all available formula are displayed.
- * `search --debian`|`--fedora`|`--fink`|`--macports`|`--opensuse` <text>:
+ * `search --... | true |
Other | Homebrew | brew | 31348c34aeffe045181237cc393c177cfa6e08b4.json | add ubuntu package search | Library/Homebrew/cmd/search.rb | @@ -15,6 +15,8 @@ def search
exec_browser "http://software.opensuse.org/search?q=#{ARGV.next}"
elsif ARGV.include? '--fedora'
exec_browser "https://admin.fedoraproject.org/pkgdb/acls/list/*#{ARGV.next}*"
+ elsif ARGV.include? '--ubuntu'
+ exec_browser "http://packages.ubuntu.com/search?keywor... | true |
Other | Homebrew | brew | 31348c34aeffe045181237cc393c177cfa6e08b4.json | add ubuntu package search | share/man/man1/brew.1 | @@ -296,7 +296,7 @@ If \fB\-\-force\fR is passed, and there are multiple versions of \fIformula\fR i
Perform a substring search of formula names for \fItext\fR\. If \fItext\fR is surrounded with slashes, then it is interpreted as a regular expression\. If no search term is given, all available formula are displayed\.
... | true |
Other | Homebrew | brew | 124ddce2627d7205191e095d28d695e69da6c378.json | audit: show real name for aliases | Library/Homebrew/cmd/audit.rb | @@ -127,7 +127,8 @@ def audit_deps
# Don't depend_on aliases; use full name
@@aliases ||= Formula.aliases
f.deps.select { |d| @@aliases.include? d.name }.each do |d|
- problem "Dependency #{d} is an alias; use the canonical name."
+ real_name = d.to_formula.name
+ problem "Dependency '#{d}... | false |
Other | Homebrew | brew | c4b278dfce430d9c11d9f3969009bba869b6e3f7.json | unpack: remove dead code | Library/Contributions/cmd/brew-unpack.rb | @@ -45,10 +45,6 @@ def patch
do_patch
end
end
-
- # handle_llvm_failure() requires extend/ENV, so let's never fail
- # with llvm since we don't particularly care in this context.
- def fails_with_llvm?; false; end
end
module Homebrew extend self | false |
Other | Homebrew | brew | cae03e33630ccae6d3b11e63f5fe6a61d8b989ea.json | brew reinstall: Reuse options from last time
Now, we can finally stop stuggesting to
`brew rm <foo>` and then `brew install <foo> <with-your-preferred options>
So `brew reinstall` will honor all options that have been recorded
into the INSTALL_RECEIPT.json plus if `--build-bottle` was used. | Library/Homebrew/cmd/reinstall.rb | @@ -3,7 +3,23 @@
module Homebrew extend self
def reinstall
- self.uninstall
- self.install
+ # At first save the named formulae and remove them from ARGV
+ named = ARGV.named
+ ARGV.delete_if { |arg| named.include? arg }
+ clean_ARGV = ARGV.clone
+
+ # Add the used_options for each named form... | false |
Other | Homebrew | brew | c9a4e1e1c932bbc69d35a2f544955c956552165d.json | Use each instead of while loop | Library/Homebrew/python_helper.rb | @@ -33,8 +33,7 @@ def python_helper(options={:allowed_major_versions => [2, 3]}, &block)
# check that no two python binaries are the same (which could be the case
# because more than one `depends_on :python => 'module_name' may be present).
filtered_python_reqs = []
- while !python_reqs.empty?
- py = pytho... | false |
Other | Homebrew | brew | 7ddc432c9e55ea4a2f3244d95c2d0d3b39fa4e90.json | Replace long conditional with guard clauses | Library/Homebrew/python_helper.rb | @@ -35,15 +35,11 @@ def python_helper(options={:allowed_major_versions => [2, 3]}, &block)
filtered_python_reqs = []
while !python_reqs.empty?
py = python_reqs.shift
- # this is ulgy but Ruby 1.8 has no `uniq! { }`
- if !filtered_python_reqs.map{ |fpr| fpr.binary }.include?(py.binary) &&
- py.sat... | false |
Other | Homebrew | brew | 5561d3d09c760effce6621628a6612df16f5ec66.json | Remove stray space | Library/Homebrew/requirements/python_dependency.rb | @@ -31,7 +31,7 @@ def minor
end
end
- def initialize(default_version="2.6", tags=[] )
+ def initialize(default_version="2.6", tags=[])
tags = [tags].flatten
# Extract the min_version if given. Default to default_version else
if /(\d+\.)*\d+/ === tags.first.to_s | false |
Other | Homebrew | brew | 7c1671667f23e98b301647a2ad0e2d29b7da01e9.json | pathname: remove unused return values
Return value was used only by one test, rewrote test to know expected value. | Library/Homebrew/extend/pathname.rb | @@ -8,36 +8,32 @@ class Pathname
BOTTLE_EXTNAME_RX = /(\.[a-z_]+(32)?\.bottle\.(\d+\.)?tar\.gz)$/
def install *sources
- results = []
sources.each do |src|
case src
when Array
if src.empty?
opoo "tried to install empty array to #{self}"
- return []
+ r... | true |
Other | Homebrew | brew | 7c1671667f23e98b301647a2ad0e2d29b7da01e9.json | pathname: remove unused return values
Return value was used only by one test, rewrote test to know expected value. | Library/Homebrew/test/test_pathname.rb | @@ -95,14 +95,11 @@ def test_install_missing_file
end
def test_install_removes_original
- orig_file = @file
touch @file
+ @dst.install(@file)
- @file, _ = @dst.install(@file)
-
- assert_equal orig_file.basename, @file.basename
- assert @file.exist?
- assert !orig_file.exist?
+ assert... | true |
Other | Homebrew | brew | b730a85e3a327040ae4a8d8f6dcee9335573c100.json | Remove outdated comment | Library/Homebrew/download_strategy.rb | @@ -135,13 +135,6 @@ def stage
raise "You must install 7zip: brew install p7zip" unless which "7zr"
safe_system '7zr', 'x', @tarball_path
else
- # we are assuming it is not an archive, use original filename
- # this behaviour is due to ScriptFileFormula expectations
- # So I guess we s... | false |
Other | Homebrew | brew | 49cd13406b8c51ee2674e160a2d576d3916ab493.json | Update URL for CLT download
http://connect.apple.com is still down, but
https://developer.apple.com/downloads has all of the Apple developer
downloads available.
Fixes Homebrew/homebrew#21812. | Library/Homebrew/blacklist.rb | @@ -37,7 +37,7 @@ def blacklisted? name
"lzma is now part of the xz formula."
when 'xcode' then <<-EOS.undent
Xcode can be installed via the App Store (on Lion or newer), or from:
- http://connect.apple.com/
+ https://developer.apple.com/downloads/
EOS
when 'gtest', 'googletest', 'google-... | true |
Other | Homebrew | brew | 49cd13406b8c51ee2674e160a2d576d3916ab493.json | Update URL for CLT download
http://connect.apple.com is still down, but
https://developer.apple.com/downloads has all of the Apple developer
downloads available.
Fixes Homebrew/homebrew#21812. | Library/Homebrew/cmd/doctor.rb | @@ -223,11 +223,13 @@ def __check_xcode_up_to_date
def __check_clt_up_to_date
if not MacOS::CLT.installed? then <<-EOS.undent
No developer tools installed
- You should install the Command Line Tools: http://connect.apple.com
+ You should install the Command Line Tools:
+ https://developer.apple.com/... | true |
Other | Homebrew | brew | 49cd13406b8c51ee2674e160a2d576d3916ab493.json | Update URL for CLT download
http://connect.apple.com is still down, but
https://developer.apple.com/downloads has all of the Apple developer
downloads available.
Fixes Homebrew/homebrew#21812. | Library/Homebrew/requirements.rb | @@ -60,7 +60,8 @@ class CLTDependency < Requirement
def message; <<-EOS.undent
The Command Line Tools are required to compile this software.
- The standalone package can be obtained from http://connect.apple.com,
+ The standalone package can be obtained from
+ https://developer.apple.com/downloads/,
... | true |
Other | Homebrew | brew | e4b951520aafc3e5b4e9719d5b38962022f6133e.json | Keep track of pruned parent directories | Library/Homebrew/keg.rb | @@ -41,8 +41,8 @@ def unlink
next unless dir.exist?
dir.find do |src|
next if src == self
- dst=HOMEBREW_PREFIX+src.relative_path_from(self)
- dst.extend ObserverPathnameExtension
+ dst = HOMEBREW_PREFIX + src.relative_path_from(self)
+ dst.extend(ObserverPathnameExten... | true |
Other | Homebrew | brew | e4b951520aafc3e5b4e9719d5b38962022f6133e.json | Keep track of pruned parent directories | Library/Homebrew/test/test_keg.rb | @@ -31,7 +31,7 @@ def test_linking_keg
def test_unlinking_keg
@keg.link
- assert_equal 3, @keg.unlink
+ assert_equal 4, @keg.unlink
end
def test_link_dry_run | true |
Other | Homebrew | brew | bca37554b7f0f7fbd671ee714e435445141137f0.json | Remove hardcoded paths in keg tests | Library/Homebrew/test/test_keg.rb | @@ -40,7 +40,7 @@ def test_link_dry_run
assert !@keg.linked?
['hiworld', 'helloworld', 'goodbye_cruel_world'].each do |file|
- assert_match "/private/tmp/testbrew/prefix/bin/#{file}", $stdout.string
+ assert_match "#{HOMEBREW_PREFIX}/bin/#{file}", $stdout.string
end
assert_equal 3, $stdo... | false |
Other | Homebrew | brew | 755c786040e4c83735c8468c6bea4644e3b31aa4.json | Move MacOS.xcode43_without_clt? into Xcode module | Library/Homebrew/os/mac/xcode.rb | @@ -38,6 +38,10 @@ def outdated?
version < latest_version
end
+ def without_clt?
+ version >= "4.3" and not MacOS::CLT.installed?
+ end
+
def prefix
@prefix ||= begin
path = Pathname.new(folder) | true |
Other | Homebrew | brew | 755c786040e4c83735c8468c6bea4644e3b31aa4.json | Move MacOS.xcode43_without_clt? into Xcode module | Library/Homebrew/superenv.rb | @@ -11,18 +11,12 @@
# 7) Simpler formula that *just work*
# 8) Build-system agnostic configuration of the tool-chain
-module MacOS
- def xcode43_without_clt?
- MacOS::Xcode.version >= "4.3" and not MacOS::CLT.installed?
- end
-end
-
def superbin
@bin ||= (HOMEBREW_REPOSITORY/"Library/ENV").children.reject{... | true |
Other | Homebrew | brew | bcaa8235386b29bc1953333a4eb430df686d78f1.json | Add fedora to brew search | Library/Contributions/manpages/brew.1.md | @@ -269,7 +269,7 @@ Note that these flags should only appear after a command.
surrounded with slashes, then it is interpreted as a regular expression.
If no search term is given, all available formula are displayed.
- * `search --macports`|`--fink`|`--debian`|`--opensuse` <text>:
+ * `search --debian`|`--... | true |
Other | Homebrew | brew | bcaa8235386b29bc1953333a4eb430df686d78f1.json | Add fedora to brew search | Library/Homebrew/cmd/search.rb | @@ -13,6 +13,8 @@ def search
exec_browser "http://packages.debian.org/search?keywords=#{ARGV.next}&searchon=names&suite=all§ion=all"
elsif ARGV.include? '--opensuse'
exec_browser "http://software.opensuse.org/search?q=#{ARGV.next}"
+ elsif ARGV.include? '--fedora'
+ exec_browser "https://... | true |
Other | Homebrew | brew | bcaa8235386b29bc1953333a4eb430df686d78f1.json | Add fedora to brew search | share/man/man1/brew.1 | @@ -296,7 +296,7 @@ If \fB\-\-force\fR is passed, and there are multiple versions of \fIformula\fR i
Perform a substring search of formula names for \fItext\fR\. If \fItext\fR is surrounded with slashes, then it is interpreted as a regular expression\. If no search term is given, all available formula are displayed\.
... | true |
Other | Homebrew | brew | 5bb82e30713683a81955435f02724dad6c20663a.json | Improve docs for Formula#python (python_helper) | Library/Homebrew/formula.rb | @@ -307,6 +307,10 @@ def std_cmake_args
]
end
+ # Install python bindings inside of a block given to this method and/or
+ # call python so: `system python, "setup.py", "install", "--prefix=#{prefix}"
+ # Note that there are no quotation marks around python!
+ # <https://github.com/mxcl/homebrew/wiki/Homeb... | false |
Other | Homebrew | brew | 9c300020f898b759ec68ccf64f150ba7b2afa666.json | Eliminate MacSystem module | Library/Homebrew/superenv.rb | @@ -1,6 +1,5 @@
require 'extend/ENV'
require 'macos'
-require 'superenv/macsystem'
### Why `superenv`?
# 1) Only specify the environment we need (NO LDFLAGS for cmake)
@@ -12,12 +11,18 @@
# 7) Simpler formula that *just work*
# 8) Build-system agnostic configuration of the tool-chain
+module MacOS
+ def xcod... | true |
Other | Homebrew | brew | 9c300020f898b759ec68ccf64f150ba7b2afa666.json | Eliminate MacSystem module | Library/Homebrew/superenv/macsystem.rb | @@ -1,15 +0,0 @@
-module MacSystem
- extend self
-
- def xcode_clt_installed?
- MacOS::CLT.installed?
- end
-
- def xcode43_without_clt?
- MacOS::Xcode.version >= "4.3" and not MacSystem.xcode_clt_installed?
- end
-
- def x11_prefix
- MacOS::X11.prefix
- end
-end | true |
Other | Homebrew | brew | e7ee57d5e5cf0502aaff8ad03cec195a723f43c5.json | Raise a useful message | Library/Homebrew/superenv.rb | @@ -127,7 +127,7 @@ def determine_cc
when 'gcc', 'gcc-4.2' then 'gcc-4.2'
when 'llvm', 'llvm-gcc' then 'llvm-gcc'
else
- opoo "Invalid value for HOMEBREW_CC: #{ENV['HOMEBREW_CC']}"
+ opoo "Invalid value for HOMEBREW_CC: #{ENV['HOMEBREW_CC'].inspect}"
raise # use default
... | false |
Other | Homebrew | brew | 3ff3e7443857aa15ec6a2c9db6810c6dbf91a915.json | Remove dead code | Library/Homebrew/superenv.rb | @@ -21,8 +21,6 @@ def superenv?
MacOS.sdk_path.nil?) and # because superenv will fail to find stuff
superbin and superbin.directory? and
not ARGV.include? "--env=std"
-rescue # blanket rescue because there are naked raises
- false
end
# Note that this block is guarded with `if superenv?` | false |
Other | Homebrew | brew | 5600713bbba68bf4aa27de8a88edc47ecef4e155.json | Add opensuse package search | Library/Contributions/manpages/brew.1.md | @@ -269,8 +269,8 @@ Note that these flags should only appear after a command.
surrounded with slashes, then it is interpreted as a regular expression.
If no search term is given, all available formula are displayed.
- * `search --macports`|`--fink`|`--debian` <text>:
- Search for <text> in MacPorts, Fin... | true |
Other | Homebrew | brew | 5600713bbba68bf4aa27de8a88edc47ecef4e155.json | Add opensuse package search | Library/Homebrew/cmd/search.rb | @@ -11,6 +11,8 @@ def search
exec_browser "http://pdb.finkproject.org/pdb/browse.php?summary=#{ARGV.next}"
elsif ARGV.include? '--debian'
exec_browser "http://packages.debian.org/search?keywords=#{ARGV.next}&searchon=names&suite=all§ion=all"
+ elsif ARGV.include? '--opensuse'
+ exec_brows... | true |
Other | Homebrew | brew | 5600713bbba68bf4aa27de8a88edc47ecef4e155.json | Add opensuse package search | share/man/man1/brew.1 | @@ -296,8 +296,8 @@ If \fB\-\-force\fR is passed, and there are multiple versions of \fIformula\fR i
Perform a substring search of formula names for \fItext\fR\. If \fItext\fR is surrounded with slashes, then it is interpreted as a regular expression\. If no search term is given, all available formula are displayed\.
... | true |
Other | Homebrew | brew | 20986e3ff5121e267b2791c067b9acb673b6ed7a.json | ENV: add usage note to ncurses_define | Library/Homebrew/extend/ENV.rb | @@ -436,6 +436,7 @@ def fcflags; self['FCFLAGS']; end
# Snow Leopard defines an NCURSES value the opposite of most distros
# See: http://bugs.python.org/issue6848
+ # Currently only used by aalib in core
def ncurses_define
append 'CPPFLAGS', "-DNCURSES_OPAQUE=0"
end | false |
Other | Homebrew | brew | 5f6b10f39adbf6fc256eaf58945f5c95db0cbd14.json | fix printing of unexpected bin/lib files | Library/Homebrew/formula_cellar_checks.rb | @@ -49,9 +49,9 @@ def check_jars
Installing JARs to "lib" can cause conflicts between packages.
For Java software, it is typically better for the formula to
install to "libexec" and then symlink or wrap binaries into "bin".
- "See "activemq", "jruby", etc. for examples."
- "The ... | false |
Other | Homebrew | brew | 5104fd21a52d7b377314cc8124b5d50193d6ee48.json | bottles: update version regex messaging. | Library/Homebrew/cmd/bottle.rb | @@ -53,7 +53,7 @@ def bottle_formula f
filename = bottle_filename f, bottle_revision
if bottle_filename_formula_name(filename).empty?
- return ofail "Add a new version regex to version.rb to parse the bottle filename."
+ return ofail "Add a new regex to bottle_version.rb to parse the bottle filena... | true |
Other | Homebrew | brew | 5104fd21a52d7b377314cc8124b5d50193d6ee48.json | bottles: update version regex messaging. | Library/Homebrew/formulary.rb | @@ -62,7 +62,7 @@ def initialize bottle_name
name_without_version = bottle_filename_formula_name @bottle_filename
if name_without_version.empty?
if ARGV.homebrew_developer?
- opoo "Add a new version regex to version.rb to parse this filename."
+ opoo "Add a new regex to bottle_v... | true |
Other | Homebrew | brew | 98c3d39e655881c79f485c599902722180068df9.json | bottle_versions: add ssh_copy_id bottle detection. | Library/Homebrew/bottle_version.rb | @@ -7,6 +7,10 @@ def self._parse spec
m = /-([\d\.]+-x86(_64)?)/.match(stem)
return m.captures.first unless m.nil?
+ # e.g. ssh-copy-id-6.2p2.bottle.tar.gz
+ m = /(\d\.(\d)+(p(\d)+)?)/.match(stem)
+ return m.captures.first unless m.nil?
+
super
end
end | true |
Other | Homebrew | brew | 98c3d39e655881c79f485c599902722180068df9.json | bottle_versions: add ssh_copy_id bottle detection. | Library/Homebrew/test/test_bottle_versions.rb | @@ -10,4 +10,9 @@ def test_perforce_style
assert_version_detected '2013.1.610569-x86_64',
'/usr/local/perforce-2013.1.610569-x86_64.mountain_lion.bottle.tar.gz'
end
+
+ def test_ssh_copy_id_style
+ assert_version_detected '6.2p2',
+ '/usr/local/ssh-copy-id-6.2p2.mountain_lion.bottle.tar.gz'
+ e... | true |
Other | Homebrew | brew | cfdd23b3efcfc994908dfb6792c8d062a19f12f1.json | bottles: use dedicated version class. | Library/Homebrew/bottle_version.rb | @@ -0,0 +1,8 @@
+class BottleVersion < Version
+ def self._parse spec
+ spec = Pathname.new(spec) unless spec.is_a? Pathname
+ stem = spec.stem
+
+ super
+ end
+end | true |
Other | Homebrew | brew | cfdd23b3efcfc994908dfb6792c8d062a19f12f1.json | bottles: use dedicated version class. | Library/Homebrew/bottles.rb | @@ -1,6 +1,7 @@
require 'tab'
require 'macos'
require 'extend/ARGV'
+require 'bottle_version'
# TODO: use options={} for some arguments.
@@ -91,8 +92,8 @@ def bottle_tag
end
def bottle_filename_formula_name filename
- version = Version.parse(filename).to_s
path = Pathname.new filename
+ version = Bottl... | true |
Other | Homebrew | brew | cfdd23b3efcfc994908dfb6792c8d062a19f12f1.json | bottles: use dedicated version class. | Library/Homebrew/test/test_bottle_versions.rb | @@ -0,0 +1,8 @@
+require 'testing_env'
+require 'bottle_version'
+
+class BottleVersionParsingTests < Test::Unit::TestCase
+ def assert_version_detected expected, path
+ assert_equal expected, BottleVersion.parse(path).to_s
+ end
+end | true |
Other | Homebrew | brew | 73547fc750d0692f32a651466f6ba1face88c768.json | Remove ARCHFLAGS fixme from Python dependency
This will be handled by env/superenv, not Python. | Library/Homebrew/requirements/python_dependency.rb | @@ -260,8 +260,6 @@ def modify_build_environment
ENV['PYTHONHOME'] = nil # to avoid fuck-ups.
ENV['PYTHONPATH'] = global_site_packages.to_s unless brewed?
- # Python respects the ARCHFLAGS var if set. Shall we set them here?
- # ENV['ARCHFLAGS'] = ??? # FIXME
ENV.append 'CMAKE_INCLUDE_PATH', inc... | false |
Other | Homebrew | brew | 71a4b8c6b976c68bc1a1b4c6d3100d521c840535.json | Add comment to superenv ENV to note trailing if | Library/Homebrew/superenv.rb | @@ -25,6 +25,7 @@ def superenv?
false
end
+# Note that this block is guarded with `if superenv?`
class << ENV
attr_accessor :keg_only_deps, :deps, :x11
alias_method :x11?, :x11 | false |
Other | Homebrew | brew | 583dd38b0887f8121cdd3ac65449665542987f6a.json | Add homebrew-binary to search | Library/Homebrew/cmd/search.rb | @@ -52,6 +52,7 @@ def search
%w{Homebrew science},
%w{Homebrew completions},
%w{Homebrew x11},
+ %w{Homebrew binary},
]
def query_regexp(query) | false |
Other | Homebrew | brew | 6f908880d88febe5e3a0afbb23564c74f0800f4e.json | man page: fix argument order for `brew create`
The implementation requires that the URL is the first argument.
Closes Homebrew/homebrew#21597.
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | Library/Contributions/manpages/brew.1.md | @@ -63,7 +63,7 @@ Note that these flags should only appear after a command.
versions of formula. Note downloads for any installed formula will still not be
deleted. If you want to delete those too: `rm -rf $(brew --cache)`
- * `create [--autotools|--cmake] [--no-fetch] [--set-name <name>] [--set-version <v... | false |
Other | Homebrew | brew | 36f5452ae362a7ce8b83a9530031f7b9f4dcb8be.json | Handle mkpath of node_modules directory in keg | Library/Homebrew/keg.rb | @@ -141,7 +141,7 @@ def link mode=OpenStruct.new
when /^gdk-pixbuf/ then :mkpath
when 'ghc' then :mkpath
when 'lua' then :mkpath
- when 'node' then :mkpath
+ when /^node/ then :mkpath
when /^ocaml/ then :mkpath
when /^perl5/ then :mkpath
when 'php' then :mkpath | false |
Other | Homebrew | brew | 613546a9948828850f9503ce7a07e5813cde729f.json | Fix expansion of deps with --build-bottle | Library/Homebrew/formula_installer.rb | @@ -169,13 +169,19 @@ def requested_deps
# All dependencies that we must install before installing f.
# These do not honor flags like --HEAD and --devel.
def necessary_deps
+ # FIXME: can't check this inside the block for the top-level dependent
+ # because it depends on the contents of ARGV.
+ pour_b... | false |
Other | Homebrew | brew | 023aff10c7ec66b194badac612fb83b444190e53.json | Adjust logic to properly sort erlang versions
Fixes Homebrew/homebrew#21417. | Library/Homebrew/test/test_versions.rb | @@ -46,6 +46,12 @@ def test_comparison_returns_nil_for_non_version
def test_compare_patchlevel_to_non_patchlevel
assert_operator version('9.9.3-P1'), :>, version('9.9.3')
end
+
+ def test_erlang_version
+ versions = %w{R16B R15B03-1 R15B03 R15B02 R15B01 R14B04 R14B03
+ R14B02 R14B01 R14B... | true |
Other | Homebrew | brew | 023aff10c7ec66b194badac612fb83b444190e53.json | Adjust logic to properly sort erlang versions
Fixes Homebrew/homebrew#21417. | Library/Homebrew/version.rb | @@ -80,12 +80,12 @@ def <=>(other)
class CompositeToken < StringToken
def rev
- value[/([0-9]+)/, 1]
+ value[/([0-9]+)/, 1] || "0"
end
end
class AlphaToken < CompositeToken
- PATTERN = /a(?:lpha)?[0-9]+/i
+ PATTERN = /a(?:lpha)?[0-9]*/i
def <=>(other)
case other
@@ -... | true |
Other | Homebrew | brew | 4a2817d8260348f94ad6ae64c93e5d4ebda13c8c.json | SUPPORTERS: Add £15, cleanup. | SUPPORTERS.md | @@ -80,13 +80,214 @@ These awesome people supported our Kickstarter by giving us £50 or more:
* [Dmitri Akatov](http://akatov.com)
* [Joey Mink](http://joeymink.com)
* [MentalPower](http://mentalpower.us)
-* [@worldofchris](http://www.worldofchris.com)
+* [worldofchris](http://www.worldofchris.com)
* [Joël Kuijten]... | false |
Other | Homebrew | brew | a3863394c0cbf38255d9b71cb589710729bbbcc6.json | audit: escape dep before regexp interpolation | Library/Homebrew/cmd/audit.rb | @@ -511,6 +511,7 @@ def audit_line(line)
end
def audit_conditional_dep(dep, condition, line)
+ dep = Regexp.escape(dep)
case condition
when /if build\.include\? ['"]with-#{dep}['"]$/, /if build\.with\? ['"]#{dep}['"]$/
problem %{Replace #{line.inspect} with "depends_on #{quote_dep(dep)} => :... | false |
Other | Homebrew | brew | dd9b317e245670ac06610e4f69bbba98e224b851.json | audit: fix broken condition | Library/Homebrew/cmd/audit.rb | @@ -553,7 +553,7 @@ def audit_python
end
# Checks that apply only to code in def caveats
- if text =~ /(\s*)def\s+caveats((.*\n)*?)(\1end)/ || /(\s*)def\s+caveats;(.*?)end/
+ if text =~ /(\s*)def\s+caveats((.*\n)*?)(\1end)/ || text =~ /(\s*)def\s+caveats;(.*?)end/
caveats_body = $2
if ... | false |
Other | Homebrew | brew | 93af660c7fd043d1dce809a7bfb5017252f28990.json | Handle optional build-time deps correctly | Library/Homebrew/build.rb | @@ -94,10 +94,10 @@ def expand_reqs
def expand_deps
f.recursive_dependencies do |dependent, dep|
- if dep.optional? || dep.recommended?
- Dependency.prune unless dependent.build.with?(dep.name)
- elsif dep.build?
- Dependency.prune unless dependent == f
+ if (dep.optional? || dep.... | false |
Other | Homebrew | brew | b0138b9c9b8ac12deaebd83b0c665c46c16815c8.json | Remove redundant reader method | Library/Homebrew/requirements/python_dependency.rb | @@ -16,7 +16,6 @@
class PythonInstalled < Requirement
attr_reader :min_version
attr_reader :if3then3
- attr_reader :site_packages
attr_accessor :site_packages
attr_accessor :binary # The python.rb formula needs to set the binary
| false |
Other | Homebrew | brew | a1e7d7177f713c3d3bed79e5723849875cd0df2f.json | Eliminate nested conditional | Library/Homebrew/os/mac/xcode.rb | @@ -50,13 +50,9 @@ def prefix
elsif File.executable? "#{V4_BUNDLE_PATH}/Contents/Developer/usr/bin/make"
# fallback for broken Xcode 4.3 installs
Pathname.new("#{V4_BUNDLE_PATH}/Contents/Developer")
- else
- path = bundle_path
-
- unless path.nil?
- path += "Contents... | false |
Other | Homebrew | brew | 4adf8f047ab30c55605e2276ab9c102aec0e71e5.json | Pull another unwieldy condition into a method | Library/Homebrew/macos.rb | @@ -40,17 +40,14 @@ def locate tool
end
def dev_tools_path
- @dev_tools_path ||= \
- if File.exist? MacOS::CLT::STANDALONE_PKG_PATH and
- File.exist? "#{MacOS::CLT::STANDALONE_PKG_PATH}/usr/bin/cc" and
- File.exist? "#{MacOS::CLT::STANDALONE_PKG_PATH}/usr/bin/make"
+ @dev_tools_path ||= if ... | false |
Other | Homebrew | brew | 988316a16d0ab17fca416e051c7c75785642f7e1.json | Enable superenv on Snow Leopard
This has been tested with several dozen formulae without any
superenv-related issues. | Library/ENV/3.2.6 | @@ -0,0 +1 @@
+4.3
\ No newline at end of file | true |
Other | Homebrew | brew | 988316a16d0ab17fca416e051c7c75785642f7e1.json | Enable superenv on Snow Leopard
This has been tested with several dozen formulae without any
superenv-related issues. | Library/ENV/4.2 | @@ -0,0 +1 @@
+4.3
\ No newline at end of file | true |
Other | Homebrew | brew | 753adbb0ce1498bd74d1c2935a4394497624b373.json | upgrade: put exit statements in both conditional branches
This check was only occurring in one branch of the conditional.
As a result, if you ran `brew upgrade` with no args and there were no packages to upgrade,
the nonsensical message
"==> Upgrading 0 outdated package, with result:"
would be printed.
Closes Homeb... | Library/Homebrew/cmd/upgrade.rb | @@ -13,6 +13,7 @@ def upgrade
if ARGV.named.empty?
outdated = Homebrew.outdated_brews
+ exit 0 if outdated.empty?
else
outdated = ARGV.formulae.select do |f|
if f.installed? | false |
Other | Homebrew | brew | 16b69317fe926acaa742f520b13340fb4f117e7d.json | Remove stray quotation mark | Library/Homebrew/formula_cellar_checks.rb | @@ -82,7 +82,7 @@ def check_non_executables bin
["Non-executables were installed to \"#{bin}\".",
<<-EOS.undent
The offending files are:
- #{non_exes}"
+ #{non_exes}
EOS
]
end | false |
Other | Homebrew | brew | 1bb7dfcafd223fd02639d99d6e3a4472df05b8e5.json | Escape interpolation examples | Library/Homebrew/formula_cellar_checks.rb | @@ -18,7 +18,7 @@ def check_manpages
['A top-level "man" directory was found.',
<<-EOS.undent
Homebrew requires that man pages live under share.
- This can often be fixed by passing "--mandir=#{man}" to configure.
+ This can often be fixed by passing "--mandir=\#{man}" to configure.
... | false |
Other | Homebrew | brew | ebcf8be7892568f2cfba9880d2995cc0499eb092.json | audit: skip an audit for mongodb | Library/Homebrew/cmd/audit.rb | @@ -463,8 +463,10 @@ def audit_line(line)
problem "No double 'without': Use `build.without? '#{$1}'` to check for \"--without-#{$1}\""
end
- if line =~ /ARGV\.(?!(debug\?|verbose\?|value[\(\s]))/
- problem "Use build instead of ARGV to check options"
+ unless f.name == 'mongodb' # Mongo writes ... | false |
Other | Homebrew | brew | f432a59fd0d68a7b17143699fa7e4dc93bd6a5e8.json | add full lib path to audit | Library/Homebrew/formula_cellar_checks.rb | @@ -41,7 +41,7 @@ def check_jars
jars = f.lib.children.select{|g| g.to_s =~ /\.jar$/}
return if jars.empty?
- ['JARs were installed to "lib".',
+ ["JARs were installed to \"#{f.lib}\".",
<<-EOS.undent
Installing JARs to "lib" can cause conflicts between packages.
For Java soft... | false |
Other | Homebrew | brew | 897607b3d7f95f9d6ffe0a0fd79b0fcb34be1742.json | audit: use FormulaCellarChecks module.
Perform post-installation checks if a formula is installed.
Added for brew test-bot to be able to fail on bad Cellar installation. | Library/Homebrew/cmd/audit.rb | @@ -1,6 +1,7 @@
require 'formula'
require 'utils'
require 'superenv'
+require 'formula_cellar_checks'
module Homebrew extend self
def audit
@@ -75,6 +76,8 @@ def has_trailing_newline?
end
class FormulaAuditor
+ include FormulaCellarChecks
+
attr_reader :f, :text, :problems
BUILD_TIME_DEPS = %W[
@@... | true |
Other | Homebrew | brew | 897607b3d7f95f9d6ffe0a0fd79b0fcb34be1742.json | audit: use FormulaCellarChecks module.
Perform post-installation checks if a formula is installed.
Added for brew test-bot to be able to fail on bad Cellar installation. | Library/Homebrew/formula_installer.rb | @@ -449,13 +449,11 @@ def print_check_output warning_and_description
end
def audit_bin
- return unless f.bin.directory?
print_check_output(check_PATH(f.bin)) unless f.keg_only?
print_check_output(check_non_executables(f.bin))
end
def audit_sbin
- return unless f.sbin.directory?
prin... | true |
Other | Homebrew | brew | 91c5c15a488ad46bf111c7c97c68574a59ac6fac.json | FormulaInstaller: move Cellar checks to module. | Library/Homebrew/formula_cellar_checks.rb | @@ -0,0 +1,89 @@
+module FormulaCellarChecks
+ def check_PATH bin
+ # warn the user if stuff was installed outside of their PATH
+ return unless bin.directory?
+ return unless bin.children.length > 0
+
+ bin = (HOMEBREW_PREFIX/bin.basename).realpath
+ return if ORIGINAL_PATHS.include? bin
+
+ ["#{bin... | true |
Other | Homebrew | brew | 91c5c15a488ad46bf111c7c97c68574a59ac6fac.json | FormulaInstaller: move Cellar checks to module. | Library/Homebrew/formula_installer.rb | @@ -7,8 +7,11 @@
require 'bottles'
require 'caveats'
require 'cleaner'
+require 'formula_cellar_checks'
class FormulaInstaller
+ include FormulaCellarChecks
+
attr_reader :f
attr_accessor :tab, :options, :ignore_deps
attr_accessor :show_summary_heading, :show_header
@@ -437,110 +440,37 @@ def pour
... | true |
Other | Homebrew | brew | 1678a4a65d9a592c137f49e4bd558dfacc67c46d.json | upgrade: remove redundant conditional
Since e1c62c35465eb6149688c745e4309438c08c410b, we exit early if the
outdated array is empty, so we no longer need to check this before
proceeding. | Library/Homebrew/cmd/upgrade.rb | @@ -31,10 +31,8 @@ def upgrade
outdated -= pinned
end
- if outdated.length > 0
- oh1 "Upgrading #{outdated.length} outdated package#{outdated.length.plural_s}, with result:"
- puts outdated.map{ |f| "#{f.name} #{f.version}" } * ", "
- end
+ oh1 "Upgrading #{outdated.length} outdated pac... | false |
Other | Homebrew | brew | e143c3a799b531d6b3793f7bb677652f418d7a46.json | Fix multiple execution of python do ... end blocks
Only run the `python do ... end` loop once even if
multiple `depends_on :python => 'module-name'` are
present. | Library/Homebrew/python_helper.rb | @@ -39,7 +39,8 @@ def python_helper(options={:allowed_major_versions => [2, 3]}, &block)
if !filtered_python_reqs.map{ |fpr| fpr.binary }.include?(py.binary) &&
py.satisfied? &&
options[:allowed_major_versions].include?(py.version.major) &&
- self.build.with?(py.name) || !(py.optional? || py.... | false |
Other | Homebrew | brew | 4eb7116c9cc0175a37e5c2fd2c1bc2b85bd799b0.json | bottle: fix cellar output. | Library/Homebrew/cmd/bottle.rb | @@ -19,9 +19,12 @@ def bottle_output bottle
puts "bottle do"
prefix = bottle.prefix.to_s
puts " prefix '#{prefix}'" if prefix != '/usr/local'
- cellar = bottle.cellar.to_s
- cellar = ":#{bottle.cellar}" if bottle.cellar.is_a? Symbol
- puts " cellar '#{cellar}'" if bottle.cellar.to_s != '/usr/l... | false |
Other | Homebrew | brew | 34ae063c6734b8cab9562d44e771dfcf5ac4582a.json | audit: remove github warning
All core formulae have been migrated to .io addresses except
for software maintained by github itself. | Library/Homebrew/cmd/audit.rb | @@ -204,12 +204,6 @@ def audit_urls
problem "Google Code homepage should end with a slash (url is #{f.homepage})."
end
- if f.homepage =~ %r[^http://(.*)\.github\.com/]
- if $1 != 'github'
- problem "GitHub pages should use the github.io domain (url is #{f.homepage})"
- end
- end
-
... | false |
Other | Homebrew | brew | c8e79c3309d79b95ccdf166574485e638522c8db.json | Move inreplace off of Object
Closes Homebrew/homebrew#21163. | Library/Homebrew/formula.rb | @@ -14,6 +14,7 @@
class Formula
include FileUtils
+ include Utils::Inreplace
extend BuildEnvironmentDSL
attr_reader :name, :path, :homepage, :downloader | true |
Other | Homebrew | brew | c8e79c3309d79b95ccdf166574485e638522c8db.json | Move inreplace off of Object
Closes Homebrew/homebrew#21163. | Library/Homebrew/utils.rb | @@ -2,6 +2,7 @@
require 'exceptions'
require 'macos'
require 'utils/json'
+require 'utils/inreplace'
require 'open-uri'
class Tty
@@ -213,27 +214,6 @@ def archs_for_command cmd
Pathname.new(cmd).archs
end
-def inreplace paths, before=nil, after=nil
- Array(paths).each do |path|
- f = File.open(path, 'r... | true |
Other | Homebrew | brew | c8e79c3309d79b95ccdf166574485e638522c8db.json | Move inreplace off of Object
Closes Homebrew/homebrew#21163. | Library/Homebrew/utils/inreplace.rb | @@ -0,0 +1,24 @@
+module Utils
+ module Inreplace
+ def inreplace paths, before=nil, after=nil
+ Array(paths).each do |path|
+ f = File.open(path, 'r')
+ s = f.read
+
+ if before.nil? && after.nil?
+ s.extend(StringInreplaceExtension)
+ yield s
+ else
+ su... | true |
Other | Homebrew | brew | 38c1d25036d3851de120df46179dd78d31ccb369.json | Remove unreachable branch in ENV.fortran
Now that this is handled by a Requirement with a default formula, this
code cannot be triggered under normal circumstances.
The advice given has now been moved to the Formula Cookbook on the wiki. | Library/Homebrew/extend/ENV.rb | @@ -490,22 +490,6 @@ def fortran
HomebrewEnvExtension::FC_FLAG_VARS.each {|key| self[key] = cflags}
set_cpu_flags(HomebrewEnvExtension::FC_FLAG_VARS)
- else
- onoe <<-EOS
-This formula requires a fortran compiler, but we could not find one by
-looking at the FC environment variable or searching ... | false |
Other | Homebrew | brew | e805b8636cfe8d59dc9e82e1b60b8ff26d59cc07.json | Show symlink target if linking fails
Closes Homebrew/homebrew#21060. | Library/Homebrew/keg.rb | @@ -208,18 +208,27 @@ def resolve_any_conflicts dst
def make_relative_symlink dst, src, mode=OpenStruct.new
if dst.exist? and dst.realpath == src.realpath
puts "Skipping; already exists: #{dst}" if ARGV.verbose?
+ return
+ end
+
# cf. git-clean -n: list files to delete, don't really link or ... | false |
Other | Homebrew | brew | 9b51f986c8645749d1bfd2d96b045c6fa8c787d6.json | Remove duplication in updater tests | Library/Homebrew/test/test_updater.rb | @@ -41,89 +41,53 @@ def self.load_fixture_data
YAML.load_file(Pathname.new(ABS__FILE__).parent.realpath + 'fixtures/updater_fixture.yaml')
end
- def test_update_homebrew_without_any_changes
- HOMEBREW_REPOSITORY.cd do
- updater = UpdaterMock.new
- updater.in_repo_expect("git checkout -q master")... | false |
Other | Homebrew | brew | 81984411b0d9d4295b4782a9490bee928f460155.json | Respect $VISUAL when picking an editor | Library/Contributions/manpages/brew.1.md | @@ -64,8 +64,8 @@ Note that these flags should only appear after a command.
deleted. If you want to delete those too: `rm -rf $(brew --cache)`
* `create [--autotools|--cmake] [--no-fetch] [--set-name <name>] [--set-version <version>]` <URL>:
- Generate a formula for the downloadable file at <URL> and open ... | true |
Other | Homebrew | brew | 81984411b0d9d4295b4782a9490bee928f460155.json | Respect $VISUAL when picking an editor | Library/Homebrew/utils.rb | @@ -171,7 +171,7 @@ def which cmd
end
def which_editor
- editor = ENV['HOMEBREW_EDITOR'] || ENV['EDITOR']
+ editor = ENV.values_at('HOMEBREW_EDITOR', 'VISUAL', 'EDITOR').compact.first
# If an editor wasn't set, try to pick a sane default
return editor unless editor.nil?
| true |
Other | Homebrew | brew | 81984411b0d9d4295b4782a9490bee928f460155.json | Respect $VISUAL when picking an editor | 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" "June 2013" "Homebrew" "brew"
+.TH "BREW" "1" "July 2013" "Homebrew" "brew"
.
.SH "NAME"
\fBbrew\fR \- The missing package manager for OS X
@@ -72,7 +72,7 @@ If \fB\-s\fR is passed, scrubs the cache, re... | true |
Other | Homebrew | brew | a90ec1ae80a4cf33fcff66be1830c603b6fddf16.json | fix comment typo | Library/Homebrew/build_options.rb | @@ -93,7 +93,7 @@ def unused_options
def implicit_options
implicit = unused_options.map do |o|
if o.name =~ /^with-(.+)$/ && without?($1)
- Option.new("without-#{$1}") # we loose the description, but that's ok
+ Option.new("without-#{$1}") # we lose the description, but that's ok
e... | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.