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
3f1cd069c462670f02d01185f76a58aa2a78cfbc.json
keg_fix_install_names: gsub shebangd bottle files. Closes Homebrew/homebrew#27126. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Library/Homebrew/keg_fix_install_names.rb
@@ -38,7 +38,7 @@ def relocate_install_names old_prefix, new_prefix, old_cellar, new_cellar, optio end end - (pkgconfig_files | libtool_files).each do |file| + (pkgconfig_files | libtool_files | script_files).each do |file| file.ensure_writable do file.open('rb') do |f| s ...
false
Other
Homebrew
brew
79caaf5112f98d6c4b81d968995b501d5ec25520.json
Move wkhtmltopdf to the boneyard Closes Homebrew/homebrew#26813.
Library/Homebrew/tap_migrations.rb
@@ -19,4 +19,5 @@ 'nlopt' => 'homebrew/science', 'comparepdf' => 'homebrew/boneyard', 'colormake' => 'homebrew/headonly', + 'wkhtmltopdf' => 'homebrew/boneyard', }
false
Other
Homebrew
brew
95d7776a905bb89d2bf98407dfab9d12f906d88b.json
add check for /Library Python Closes Homebrew/homebrew#24788.
Library/Homebrew/cmd/doctor.rb
@@ -948,6 +948,17 @@ def check_for_enthought_python end end +def check_for_library_python + if File.exist?("/Library/Frameworks/Python.framework") then <<-EOS.undent + A Python is installed in /Library/Frameworks + + Homebrew only supports building against the System-provided Python or a + brewed Python...
false
Other
Homebrew
brew
536430e0ae2707955ab8fdcf33772a6d64b83898.json
ENV: request no byte code Python when bottling.
Library/Homebrew/extend/ENV/std.rb
@@ -53,6 +53,8 @@ def setup_build_environment(formula=nil) self['CMAKE_FRAMEWORK_PATH'] = HOMEBREW_PREFIX/"Frameworks" end + self['PYTHONDONTWRITEBYTECODE'] = "1" if ARGV.build_bottle? + # Os is the default Apple uses for all its stuff so let's trust them set_cflags "-Os #{SAFE_CFLAGS_FLAGS}"...
true
Other
Homebrew
brew
536430e0ae2707955ab8fdcf33772a6d64b83898.json
ENV: request no byte code Python when bottling.
Library/Homebrew/extend/ENV/super.rb
@@ -84,6 +84,7 @@ def setup_build_environment(formula=nil) self['CMAKE_LIBRARY_PATH'] = determine_cmake_library_path self['ACLOCAL_PATH'] = determine_aclocal_path self['M4'] = MacOS.locate("m4") if deps.include? "autoconf" + self['PYTHONDONTWRITEBYTECODE'] = "1" if ARGV.build_bottle? # The HOME...
true
Other
Homebrew
brew
6d949599b5a9b4d770420fa2e0eec0c143d0e11d.json
Compare pathnames directly
Library/Homebrew/formula.rb
@@ -452,7 +452,7 @@ def tap # True if this formula is provided by Homebrew itself def core_formula? - path.realpath.to_s == Formula.path(name).to_s + path.realpath == Formula.path(name) end def self.path name
false
Other
Homebrew
brew
cf4e7e595498c852d9cbcecb2a2b036c3a299d9b.json
reinstall: fix incorrect use of Formula.canonical_name Fixes Homebrew/homebrew#27117.
Library/Homebrew/cmd/reinstall.rb
@@ -18,12 +18,11 @@ def reinstall ARGV << '--build-bottle' end - canonical_name = Formula.canonical_name(name) - formula = Formula.factory(canonical_name) + formula = Formulary.factory(name) begin oh1 "Reinstalling #{name} #{ARGV.options_only*' '}" - opt_link = ...
false
Other
Homebrew
brew
281494c2556febe95fe64357577cd713846fcbf4.json
brew-test-bot: use fetch --retry. Closes Homebrew/homebrew#27110. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Library/Contributions/cmd/brew-test-bot.rb
@@ -275,11 +275,11 @@ def formula formula test "brew install apple-gcc42" end - test "brew fetch #{dependencies}" unless dependencies.empty? + test "brew fetch --retry #{dependencies}" unless dependencies.empty? formula_fetch_options = " " formula_fetch_options << " --build-bottle" unless ...
false
Other
Homebrew
brew
3872f78d666ab6ed765773907cdbd84cdb5e28ad.json
Add custom exception for untapped formulae
Library/Homebrew/exceptions.rb
@@ -39,22 +39,31 @@ class FormulaUnavailableError < RuntimeError attr_reader :name attr_accessor :dependent + def initialize name + @name = name + end + def dependent_s "(dependency of #{dependent})" if dependent and dependent != name end def to_s - if name =~ HOMEBREW_TAP_FORMULA_REGEX ...
true
Other
Homebrew
brew
3872f78d666ab6ed765773907cdbd84cdb5e28ad.json
Add custom exception for untapped formulae
Library/Homebrew/formulary.rb
@@ -155,7 +155,9 @@ def initialize tapped_name end def get_formula - klass.new(tapped_name, path) + klass.new(name, path) + rescue FormulaUnavailableError => e + raise TapFormulaUnavailableError.new(e.name) end end
true
Other
Homebrew
brew
369f9b3251e1206eab10c778e591e054f4a7942b.json
FormulaInstaller: verify dependencies map to formulae before locking
Library/Homebrew/formula_installer.rb
@@ -31,6 +31,7 @@ def initialize ff @poured_bottle = false @pour_failed = false + verify_deps_exist lock check_install_sanity end @@ -41,6 +42,13 @@ def pour_bottle? install_bottle_options={:warn=>false} install_bottle?(f, install_bottle_options) end + def verify_deps_exist + ...
false
Other
Homebrew
brew
479f4bc7cd731a481bde9beb9dc21a09e1494a17.json
Remove deprecation notice from system "xcodebuild" The new xcodebuild method calls system "xcodebuild" underneath, so this notice would always be printed. Instead we will just rely on the audit check. Fixes Homebrew/homebrew#27092.
Library/Homebrew/formula.rb
@@ -565,7 +565,6 @@ def system cmd, *args ohai "#{cmd} #{pretty_args*' '}".strip if cmd.to_s.start_with? "xcodebuild" - opoo %{system "xcodebuild" is deprecated, use the xcodebuild method instead} removed_ENV_variables.update(ENV.remove_cc_etc) end
false
Other
Homebrew
brew
88565ac3d43ce4ce942070a1d4125d3a3ee2981d.json
move scons helper to fileutils
Library/Homebrew/extend/fileutils.rb
@@ -82,6 +82,14 @@ def copy_metadata(path) end end + # Run scons using a Homebrew-installed version, instead of whatever + # is in the user's PATH + def scons *args + scons = Formulary.factory("scons").opt_prefix/'bin/scons' + raise "#{scons} is not executable" unless scons.exist? and scons.executabl...
true
Other
Homebrew
brew
88565ac3d43ce4ce942070a1d4125d3a3ee2981d.json
move scons helper to fileutils
Library/Homebrew/utils.rb
@@ -148,14 +148,6 @@ def curl *args safe_system curl, *args end -# Run scons using a Homebrew-installed version, instead of whatever -# is in the user's PATH -def scons *args - scons = Formulary.factory("scons").opt_prefix/'bin/scons' - raise "#{scons} is not executable" unless scons.exist? and scons.executable...
true
Other
Homebrew
brew
26c71b19f6f715e1f558da1c904aafe6eecebe11.json
Add audit check for system "xcodebuild"
Library/Homebrew/cmd/audit.rb
@@ -296,8 +296,12 @@ def audit_text problem "use \"scons *args\" instead of \"system 'scons', *args\"" end - if text =~ /system\s+['"]xcodebuild/ && text !~ /SYMROOT=/ - problem "xcodebuild should be passed an explicit \"SYMROOT\"" + if text =~ /system\s+['"]xcodebuild/ + problem %{use "xc...
false
Other
Homebrew
brew
1981e78eb2fe7231c999edf86c862597320ec5fe.json
Eliminate mutation of Dependency objects
Library/Homebrew/dependency.rb
@@ -4,12 +4,15 @@ class Dependency include Dependable - attr_reader :name, :tags - attr_accessor :env_proc, :option_name + attr_reader :name, :tags, :env_proc, :option_name - def initialize(name, tags=[]) - @name = @option_name = name + DEFAULT_ENV_PROC = proc {} + + def initialize(name, tags=[], env_p...
true
Other
Homebrew
brew
1981e78eb2fe7231c999edf86c862597320ec5fe.json
Eliminate mutation of Dependency objects
Library/Homebrew/requirement.rb
@@ -70,10 +70,7 @@ def inspect def to_dependency f = self.class.default_formula raise "No default formula defined for #{inspect}" if f.nil? - dep = Dependency.new(f, tags) - dep.option_name = name - dep.env_proc = method(:modify_build_environment) - dep + Dependency.new(f, tags, method(:modi...
true
Other
Homebrew
brew
1981e78eb2fe7231c999edf86c862597320ec5fe.json
Eliminate mutation of Dependency objects
Library/Homebrew/test/test_dependency_expansion.rb
@@ -71,7 +71,10 @@ def test_merges_repeated_deps_with_differing_options end def test_merger_preserves_env_proc - env_proc = @foo.env_proc = stub + env_proc = stub + dep = Dependency.new("foo", [], env_proc) + dep.stubs(:to_formula).returns(stub(:deps => [])) + @deps.replace [dep] assert_equa...
true
Other
Homebrew
brew
b2ccbfe6af2adaf7cc4f0e2af691f428704d5658.json
Add set union to Options
Library/Homebrew/options.rb
@@ -83,6 +83,10 @@ def &(o) Options.new(@options & o) end + def |(o) + Options.new(@options | o) + end + def *(arg) @options.to_a * arg end
true
Other
Homebrew
brew
b2ccbfe6af2adaf7cc4f0e2af691f428704d5658.json
Add set union to Options
Library/Homebrew/test/test_options.rb
@@ -126,6 +126,13 @@ def test_intersection assert_equal [foo], (@options & options).to_a end + def test_set_union + foo, bar, baz = %w{foo bar baz}.map { |o| Option.new(o) } + options = Options.new << foo << bar + @options << foo << baz + assert_equal [foo, bar, baz].sort, (@options | options).to...
true
Other
Homebrew
brew
96df4fe1da62efe9be9f1a9b5d885672c8f09d75.json
Apply cyclic dependency hack unconditionally
Library/Homebrew/dependency.rb
@@ -75,6 +75,9 @@ def expand(dependent, deps=dependent.deps, &block) expanded_deps = [] deps.each do |dep| + # FIXME don't hide cyclic dependencies + next if dependent.name == dep.name + case action(dependent, dep, &block) when :prune next @@ -83,7 +86,6 @@ def...
true
Other
Homebrew
brew
96df4fe1da62efe9be9f1a9b5d885672c8f09d75.json
Apply cyclic dependency hack unconditionally
Library/Homebrew/test/test_dependency_expansion.rb
@@ -4,7 +4,7 @@ class DependencyExpansionTests < Test::Unit::TestCase def build_dep(name, tags=[], deps=[]) dep = Dependency.new(name.to_s, tags) - dep.stubs(:to_formula).returns(stub(:deps => deps)) + dep.stubs(:to_formula).returns(stub(:deps => deps, :name => name)) dep end @@ -14,7 +14,7 @@ ...
true
Other
Homebrew
brew
750b843edc2f2486f8a3bc519453843a32fbcf90.json
Use Formula[] in example formula
Library/Contributions/example-formula.rb
@@ -272,7 +272,7 @@ def install # break if they remember that exact path. In contrast to that, the # `$(brew --prefix)/opt/formula` is the same path for all future # versions of the formula! - args << "--with-readline=#{Formula.factory('readline').opt_prefix}/lib" if build.with? "readline" + args <...
false
Other
Homebrew
brew
4002abb1469f19b182f2e2af5d27b55f3700fef1.json
deps: use Dependency objects in recursive_deps_tree
Library/Homebrew/cmd/deps.rb
@@ -56,13 +56,12 @@ def puts_deps_tree(formulae) end def recursive_deps_tree f, level - f.requirements.each do |requirement| - next unless requirement.default_formula? - puts "| "*(level-1)+"|- :"+requirement.class.default_formula.to_s + f.requirements.select(&:default_formula?).each do |req| +...
false
Other
Homebrew
brew
87cbe716d9e9a49e93847c643696b95467c59dba.json
deps: keep "--all" output sorted
Library/Homebrew/cmd/deps.rb
@@ -22,7 +22,7 @@ def deps else raise FormulaUnspecifiedError if ARGV.named.empty? all_deps = deps_for_formulae(ARGV.formulae, !ARGV.one?) - all_deps.sort! unless mode.topo_order? + all_deps = all_deps.sort_by(&:name) unless mode.topo_order? puts all_deps end end @@ -35,17 +3...
false
Other
Homebrew
brew
50b94ada1b0dd0462ab3bf252243b6f1892f3dd4.json
add audit for Formula.factory
Library/Homebrew/cmd/audit.rb
@@ -180,7 +180,7 @@ def audit_deps def audit_conflicts f.conflicts.each do |c| begin - Formula.factory(c.name) + Formulary.factory(c.name) rescue FormulaUnavailableError problem "Can't find conflicting formula #{c.name.inspect}." end @@ -299,6 +299,10 @@ def audit_tex...
false
Other
Homebrew
brew
4a4b960558b420676af25dfcd772cc5d4e35cc65.json
fix typo in audit
Library/Homebrew/cmd/audit.rb
@@ -293,7 +293,7 @@ def audit_patches def audit_text if text =~ /system\s+['"]scons/ - problem "use \"scons, *args\" instead of \"system 'scons', *args\"" + problem "use \"scons *args\" instead of \"system 'scons', *args\"" end if text =~ /system\s+['"]xcodebuild/ && text !~ /SYMROOT=/
false
Other
Homebrew
brew
758a60155538820e11bea5c473c2171cd4df183f.json
add audit for scons
Library/Homebrew/cmd/audit.rb
@@ -292,6 +292,10 @@ def audit_patches end def audit_text + if text =~ /system\s+['"]scons/ + problem "use \"scons, *args\" instead of \"system 'scons', *args\"" + end + if text =~ /system\s+['"]xcodebuild/ && text !~ /SYMROOT=/ problem "xcodebuild should be passed an explicit \"SYMROOT\"...
false
Other
Homebrew
brew
9055c1e3617269e2d28f97addf4d56f6b57d348a.json
add scons helper
Library/Homebrew/utils.rb
@@ -148,6 +148,14 @@ def curl *args safe_system curl, *args end +# Run scons using a Homebrew-installed version, instead of whatever +# is in the user's PATH +def scons *args + scons = Formulary.factory("scons").opt_prefix/'bin/scons' + raise "#{scons} is not executable" unless scons.exist? and scons.executable...
false
Other
Homebrew
brew
f5cc07dfea3ebc965287ceda828c63f2811fe062.json
add more documentation
Library/Homebrew/cleaner.rb
@@ -3,6 +3,7 @@ # * removes .la files # * removes empty directories # * sets permissions on executables +# * removes unresolved symlinks class Cleaner # Create a cleaner for the given formula @@ -33,6 +34,8 @@ def clean private + # Removes any empty directories in the formula's prefix subtree + # Keep...
false
Other
Homebrew
brew
0bdce89d65dfe39abb851090b1224f1a810ea277.json
fix incorrect comment
Library/Homebrew/cleaner.rb
@@ -74,7 +74,8 @@ def clean_file_permissions path path.chmod perms end - # Clean a single folder (non-recursively) + # Removes .la files and fixes file permissions for a directory tree, keeping + # existing files and permissions if instructed to by the formula def clean_dir d d.find do |path| ...
false
Other
Homebrew
brew
3a4a529453c49572be1e0738cb4e9fd8efa75581.json
remove charset.alias directly
Library/Homebrew/cleaner.rb
@@ -13,6 +13,12 @@ def initialize f # Clean the keg of formula @f def clean ObserverPathnameExtension.reset_counts! + + # Many formulae include 'lib/charset.alias', but it is not strictly needed + # and will conflict if more than one formula provides it + alias_path = @f.lib/'charset.alias' + ali...
false
Other
Homebrew
brew
03811e6423879162225a6912cbfbda535d72067f.json
Add example using a stable block
Library/Contributions/example-formula.rb
@@ -38,6 +38,17 @@ class ExampleFormula < Formula # Leave it empty at first and `brew install` will tell you the expected. sha1 'cafebabe78901234567890123456789012345678' + # Stable-only dependencies should be nested inside a `stable` block rather than + # using a conditional. It is preferrable to also pull t...
false
Other
Homebrew
brew
d6f7bc6446ecaf25a8434a20881c34e119781390.json
Remove some bad practices from example formula
Library/Contributions/example-formula.rb
@@ -45,11 +45,21 @@ class ExampleFormula < Formula head 'https://example.com/.git', :branch => 'name_of_branch', :revision => 'abc123' head 'https://hg.is.awesome.but.git.has.won.example.com/', :using => :hg # If autodetect fails. + head do + url "https://example.com/repo.git" + + depends_on :autoconf + ...
false
Other
Homebrew
brew
9cd95bc0b7ff44fd13894e17318cb33abbdea280.json
Remove unused variable
Library/Homebrew/cmd/tap.rb
@@ -110,7 +110,7 @@ def tap_args def private_tap?(user, repo) GitHub.private_repo?(user, "homebrew-#{repo}") - rescue GitHub::HTTPNotFoundError => e + rescue GitHub::HTTPNotFoundError true rescue GitHub::Error false
false
Other
Homebrew
brew
fab5e1d905cd243a9e8306dcd4e74b5f1d596f8f.json
add doctor check for HOMEBREW_KEEP_INFO
Library/Homebrew/cmd/doctor.rb
@@ -1085,6 +1085,16 @@ def check_for_latest_xquartz https://xquartz.macosforge.org EOS end + + def check_for_old_env_vars + if ENV["HOMEBREW_KEEP_INFO"] + <<-EOS.undent + `HOMEBREW_KEEP_INFO` is no longer used + info files are no longer deleted by default; you may + remove this ...
false
Other
Homebrew
brew
43358b2bd33a8580e630b510f7e229329d4588a4.json
remove HOMEBREW_KEEP_INFO from man page
Library/Contributions/manpages/brew.1.md
@@ -513,13 +513,6 @@ can take several different forms: <http://developer.github.com/v3/#rate-limiting> for more information. Homebrew uses the GitHub API for features such as `brew search`. - * HOMEBREW\_KEEP\_INFO: - If set, Homebrew will not remove files from `share/info`, allowing them - to be lin...
true
Other
Homebrew
brew
43358b2bd33a8580e630b510f7e229329d4588a4.json
remove HOMEBREW_KEEP_INFO from man page
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" "January 2014" "Homebrew" "brew" +.TH "BREW" "1" "February 2014" "Homebrew" "brew" . .SH "NAME" \fBbrew\fR \- The missing package manager for OS X @@ -545,13 +545,6 @@ HOMEBREW_GITHUB_API_TOKEN A perso...
true
Other
Homebrew
brew
311dd6f5e8e85864619e0354a62fd8c02b11481f.json
CODEOFCONDUCT: add Homebrew CoC, diversity doc. Add the Homebrew Code of Conduct and Diversity statement. These are heavily based on those created by Python: http://www.python.org/psf/codeofconduct/ http://www.python.org/community/diversity/ Closes Homebrew/homebrew#26904.
.gitignore
@@ -1,6 +1,7 @@ /* !/.gitignore !/Library/ +!/CODEOFCONDUCT.md !/CONTRIBUTING.md !/README.md !/SUPPORTERS.md
true
Other
Homebrew
brew
311dd6f5e8e85864619e0354a62fd8c02b11481f.json
CODEOFCONDUCT: add Homebrew CoC, diversity doc. Add the Homebrew Code of Conduct and Diversity statement. These are heavily based on those created by Python: http://www.python.org/psf/codeofconduct/ http://www.python.org/community/diversity/ Closes Homebrew/homebrew#26904.
CODEOFCONDUCT.md
@@ -0,0 +1,25 @@ +# Code of Conduct +The Homebrew community is made up of members from around the globe with a diverse set of skills, personalities, and experiences. It is through these differences that our community experiences great successes and continued growth. When you're working with members of the community, we...
true
Other
Homebrew
brew
311dd6f5e8e85864619e0354a62fd8c02b11481f.json
CODEOFCONDUCT: add Homebrew CoC, diversity doc. Add the Homebrew Code of Conduct and Diversity statement. These are heavily based on those created by Python: http://www.python.org/psf/codeofconduct/ http://www.python.org/community/diversity/ Closes Homebrew/homebrew#26904.
CONTRIBUTING.md
@@ -13,6 +13,7 @@ Contributing ------------ Please read: +* [Code of Conduct](https://github.com/Homebrew/homebrew/blob/master/CODEOFCONDUCT.md) * [Formula Cookbook](https://github.com/Homebrew/homebrew/wiki/Formula-Cookbook) * [Acceptable Formulae](https://github.com/Homebrew/homebrew/wiki/Acceptable-Formulae) ...
true
Other
Homebrew
brew
85feea33c003748740f3a3dc1e410549afa50e95.json
Hoist assignment to simplify a conditional
Library/Homebrew/formula.rb
@@ -548,6 +548,7 @@ def test_defined? # Throws if there's an error def system cmd, *args removed_ENV_variables = {} + rd, wr = IO.pipe # remove "boring" arguments so that the important ones are more likely to # be shown considering that we trim long ohai lines to the terminal width @@ -568,7 +...
false
Other
Homebrew
brew
d1dd4b0e6792beec55b714ddb4e2aacb8b86d948.json
create: pull requires out of method
Library/Homebrew/cmd/create.rb
@@ -1,5 +1,7 @@ require 'formula' require 'blacklist' +require 'digest' +require 'erb' module Homebrew extend self @@ -96,9 +98,6 @@ def url= url def generate! raise "#{path} already exists" if path.exist? - require 'digest' - require 'erb' - if version.nil? opoo "Version cannot be de...
false
Other
Homebrew
brew
9d3b9edb4dc0303a884d5bd826ad62788ced9c89.json
Remove download_strategy from SoftwareSpec
Library/Homebrew/software_spec.rb
@@ -13,8 +13,7 @@ class SoftwareSpec attr_reader :build, :resources, :owner attr_reader :dependency_collector - def_delegators :@resource, :stage, :fetch - def_delegators :@resource, :download_strategy, :verify_download_integrity + def_delegators :@resource, :stage, :fetch, :verify_download_integrity def_...
false
Other
Homebrew
brew
b33203604efbc4aead76233fe8c7a39e537b7b1b.json
brew-test-bot: push master with tags.
Library/Contributions/cmd/brew-test-bot.rb
@@ -447,7 +447,7 @@ def run remote = "git@github.com:BrewTestBot/homebrew.git" tag = pr ? "pr-#{pr}" : "testing-#{number}" - safe_system "git push --force #{remote} :refs/tags/#{tag}" + safe_system "git push --force #{remote} master:master :refs/tags/#{tag}" path = "/home/frs/project/m/ma/machomebrew/Bot...
false
Other
Homebrew
brew
ac81d3b0d8a95ff7ea5738655d7dda79d98dcc4d.json
bottle_version: improve test filenames.
Library/Homebrew/bottle_version.rb
@@ -3,12 +3,12 @@ def self._parse spec spec = Pathname.new(spec) unless spec.is_a? Pathname stem = spec.stem - # e.g. perforce-2013.1.610569-x86_64 + # e.g. perforce-2013.1.610569-x86_64.mountain_lion.bottle.tar.gz m = /-([\d\.]+-x86(_64)?)/.match(stem) return m.captures.first unless m.nil? ...
true
Other
Homebrew
brew
ac81d3b0d8a95ff7ea5738655d7dda79d98dcc4d.json
bottle_version: improve test filenames.
Library/Homebrew/test/test_bottle_versions.rb
@@ -18,6 +18,6 @@ def test_ssh_copy_id_style def test_icu4c_style assert_version_detected '52.1', - '/usr/local/icu4c-52.1.bottle.tar.gz' + '/usr/local/icu4c-52.1.mavericks.bottle.tar.gz' end end
true
Other
Homebrew
brew
b96411052ea23a6085788c18f7d19a24fa1c5b29.json
Use reader method
Library/Homebrew/formula.rb
@@ -638,7 +638,7 @@ def patch # Explicitly request changing C++ standard library compatibility check # settings. Use with caution! def cxxstdlib_check check_type - @cxxstdlib << check_type + cxxstdlib << check_type end def self.method_added method
false
Other
Homebrew
brew
e3e14a0cdfbd0b4bdc4757689055e3e3ee890438.json
Eliminate nil check on path parameter
Library/Homebrew/formula.rb
@@ -30,10 +30,9 @@ class Formula attr_reader :cxxstdlib # Homebrew determines the name - def initialize name='__UNKNOWN__', path=nil + def initialize name='__UNKNOWN__', path=self.class.path(name) @name = name - # If we got an explicit path, use that, else determine from the name - @path = path.nil...
true
Other
Homebrew
brew
e3e14a0cdfbd0b4bdc4757689055e3e3ee890438.json
Eliminate nil check on path parameter
Library/Homebrew/test/test_formula.rb
@@ -4,6 +4,20 @@ class FormulaTests < Test::Unit::TestCase include VersionAssertions + def test_formula_path_initialization + name = "formula_name" + klass = Class.new(Formula) { url "http://example.com/foo-1.0.tar.gz" } + + f = klass.new(name) + assert_equal Formula.path(name), f.path + + f = kla...
true
Other
Homebrew
brew
fb350bad0fb3b4781ec24696d222fe4f8b6c012b.json
Remove downloader from Formula
Library/Homebrew/formula.rb
@@ -119,16 +119,12 @@ def requirements active_spec.requirements end - def downloader - active_spec.downloader - end - def cached_download - downloader.cached_location + active_spec.cached_download end def clear_cache - downloader.clear_cache + active_spec.clear_cache end # ...
true
Other
Homebrew
brew
fb350bad0fb3b4781ec24696d222fe4f8b6c012b.json
Remove downloader from Formula
Library/Homebrew/software_spec.rb
@@ -15,6 +15,7 @@ class SoftwareSpec def_delegators :@resource, :stage, :fetch def_delegators :@resource, :download_strategy, :verify_download_integrity + def_delegators :@resource, :cached_download, :clear_cache def_delegators :@resource, :checksum, :mirrors, :specs, :using, :downloader def_delegators :...
true
Other
Homebrew
brew
fb350bad0fb3b4781ec24696d222fe4f8b6c012b.json
Remove downloader from Formula
Library/Homebrew/test/test_formula.rb
@@ -161,7 +161,6 @@ def initialize(name="spec_test_ball", path=nil) assert_equal 'http://example.com', f.homepage assert_version_equal '0.1', f.version assert_equal f.stable, f.active_spec - assert_instance_of CurlDownloadStrategy, f.downloader assert_instance_of SoftwareSpec, f.stable ass...
true
Other
Homebrew
brew
662560e40d347b996efe85313f9be1f852a31fd3.json
Remove test with too much implementation knowledge
Library/Homebrew/test/test_formula.rb
@@ -136,19 +136,6 @@ def test_class_naming assert_equal 'FooBar', Formula.class_s('foo_bar') end - def test_mirror_support - f = Class.new(Formula) do - url "file:///#{TEST_FOLDER}/bad_url/testball-0.1.tbz" - mirror "file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz" - end.new("test_mirror_sup...
false
Other
Homebrew
brew
129e25032beec324f3441608c14b86f0e75227aa.json
Move methods to a more logical place
Library/Homebrew/formula.rb
@@ -123,6 +123,14 @@ def downloader active_spec.downloader end + def cached_download + downloader.cached_location + end + + def clear_cache + downloader.clear_cache + end + # if the dir is there, but it's empty we consider it not installed def installed? (dir = installed_prefix).directory...
false
Other
Homebrew
brew
abbed076f091e6420734bda094dc13527f4e1620.json
Pass path into the Formula constructor When the path argument to the Formula constructor is omitted, the instance's path attribute is created using the Formula.path class method. However, we have already done this work, so we can just pass it into the constructor. This translates to one less call to Pathname#to_s per...
Library/Homebrew/formulary.rb
@@ -94,7 +94,7 @@ def initialize name end def get_formula - return klass.new(name) + klass.new(name, path) end end
false
Other
Homebrew
brew
7bdaa7ffe1cd837d0f2d6c5007907534b8aaeb0e.json
search: use a queue to collect errors The threading in the tap search code makes handling errors difficult. If an API-related error is raised in one thread, it is likely to be raised in each of the rest as well. This results in duplicated error messages, which is ugly and bad UX. This patch adds a synchronized queue ...
Library/Homebrew/cmd/search.rb
@@ -1,9 +1,12 @@ require 'formula' require 'blacklist' require 'utils' +require 'thread' module Homebrew extend self + SEARCH_ERROR_QUEUE = Queue.new + # A regular expession to capture the username (one or more char but no `/`, # which has to be escaped like `\/`), repository, followed by an optional `/`...
false
Other
Homebrew
brew
3cbb49930c812b09c3fa8cd62fff8d722104e406.json
Move error text and helper into error class
Library/Homebrew/utils.rb
@@ -252,10 +252,28 @@ module GitHub extend self ISSUES_URI = URI.parse("https://api.github.com/search/issues") Error = Class.new(RuntimeError) - RateLimitExceededError = Class.new(Error) HTTPNotFoundError = Class.new(Error) AuthenticationFailedError = Class.new(Error) + class RateLimitExceededError < ...
false
Other
Homebrew
brew
6fd0125ad9e2fc4eab2639f57136d8b15cffd744.json
Handle GitHub API authentication failures
Library/Homebrew/utils.rb
@@ -254,6 +254,7 @@ module GitHub extend self Error = Class.new(StandardError) RateLimitExceededError = Class.new(Error) HTTPNotFoundError = Class.new(Error) + AuthenticationFailedError = Class.new(Error) def open url, headers={}, &block # This is a no-op if the user is opting out of using the GitHu...
false
Other
Homebrew
brew
1d5ab3195cb9c19a349ccdcdf6c4f75d7c02460b.json
Extract error handling from GitHub.open
Library/Homebrew/utils.rb
@@ -271,21 +271,28 @@ def open url, headers={}, &block yield Utils::JSON.load(f.read) end rescue OpenURI::HTTPError => e + handle_api_error(e) + rescue SocketError, OpenSSL::SSL::SSLError => e + raise Error, "Failed to connect to: #{url}\n#{e.message}", e.backtrace + rescue Utils::JSON::Error => ...
false
Other
Homebrew
brew
34930586c342dcf10e36ab3eb0c5388dff708e5f.json
audit: handle recommended/optional options better.
Library/Homebrew/cmd/audit.rb
@@ -143,8 +143,14 @@ def audit_deps end dep.options.reject do |opt| - # TODO -- fix for :recommended, should still allow --with-xyz - dep_f.build.has_option?(opt.name) + next true if dep_f.build.has_option?(opt.name) + dep_f.requirements.detect do |r| + if r.tags.inc...
false
Other
Homebrew
brew
1fecd418e4e93a0bb7c92496746ba75f1d80acd8.json
versions: ignore validation errors. References Homebrew/homebrew#26748.
Library/Homebrew/cmd/versions.rb
@@ -94,7 +94,8 @@ def text_from_sha sha end IGNORED_EXCEPTIONS = [SyntaxError, TypeError, NameError, - ArgumentError, FormulaSpecificationError] + ArgumentError, FormulaSpecificationError, + FormulaValidationError,] def versio...
false
Other
Homebrew
brew
63629ab13bfe7e355eacf1235e52699f5cc3a581.json
Formula#system: simplify xcodebuild special case
Library/Homebrew/formula.rb
@@ -552,6 +552,8 @@ def test_defined? # Pretty titles the command and buffers stdout/stderr # Throws if there's an error def system cmd, *args + removed_ENV_variables = {} + # remove "boring" arguments so that the important ones are more likely to # be shown considering that we trim long ohai line...
false
Other
Homebrew
brew
dca786176e250843c3d27d562675e62c86d9d47a.json
Formula#system: remove unnecessary string casts
Library/Homebrew/formula.rb
@@ -569,7 +569,7 @@ def system cmd, *args @exec_count ||= 0 @exec_count += 1 logd = HOMEBREW_LOGS/name - logfn = "#{logd}/%02d.%s" % [@exec_count, File.basename(cmd.to_s).split(' ').first] + logfn = "#{logd}/%02d.%s" % [@exec_count, File.basename(cmd).split(' ').first] mkdir_p(logd) rd,...
false
Other
Homebrew
brew
457d409f8041564650d8fd90a252976f9cbd3257.json
GitDownloadStrategy: fix typo'd parameter name This should be "resource", not "resources", though it works anyway because there is a also "resource" reader method.
Library/Homebrew/download_strategy.rb
@@ -474,7 +474,7 @@ class GitDownloadStrategy < VCSDownloadStrategy %r{http://llvm\.org}, ] - def initialize name, resources + def initialize name, resource super @shallow = resource.specs.fetch(:shallow) { true } end
false
Other
Homebrew
brew
7eec2d8b5a06ce40a079e2edf1d68ca1df75b70a.json
GitDownloadStrategy: allow disabling of shallow clone Closes Homebrew/homebrew#25751. Closes Homebrew/homebrew#26730.
Library/Homebrew/download_strategy.rb
@@ -474,6 +474,11 @@ class GitDownloadStrategy < VCSDownloadStrategy %r{http://llvm\.org}, ] + def initialize name, resources + super + @shallow = resource.specs.fetch(:shallow) { true } + end + def cache_tag; "git" end def fetch @@ -513,6 +518,10 @@ def stage private + def shallow_clo...
false
Other
Homebrew
brew
5ce4c2a3f889c331fb12483c7bd4fee3b5addf1f.json
VCSDownloadStrategy: use REF_TYPES when extracting ref to use
Library/Homebrew/download_strategy.rb
@@ -43,12 +43,13 @@ class VCSDownloadStrategy < AbstractDownloadStrategy def initialize name, resource super - @ref_type, @ref = destructure_spec_hash(resource.specs) + @ref_type, @ref = extract_ref(resource.specs) @clone = HOMEBREW_CACHE/cache_filename end - def destructure_spec_hash(spec) -...
false
Other
Homebrew
brew
a25152b5a17f17d717e1590436d4a61c6e1d1222.json
GitDownloadStrategy: inline simple method
Library/Homebrew/download_strategy.rb
@@ -510,6 +510,10 @@ def stage private + def support_depth? + @ref_type != :revision && SHALLOW_CLONE_WHITELIST.any? { |rx| rx === @url } + end + def git_dir @clone.join(".git") end @@ -518,14 +522,6 @@ def has_ref? quiet_system 'git', '--git-dir', git_dir, 'rev-parse', '-q', '--verify', @re...
false
Other
Homebrew
brew
f7ef4964a72d3dfb8c631cafe83ba1e2a8a5dacc.json
Offload more filtering to the search API
Library/Homebrew/utils.rb
@@ -320,16 +320,14 @@ def uri_escape(query) def issues_for_formula name # don't include issues that just refer to the tool in their body - issues_matching(name).select { |issue| issue["state"] == "open" } + issues_matching(name, :state => "open") end def find_pull_requests query return if E...
false
Other
Homebrew
brew
0b2c6e87f191b2ef5ad404c8d16f507becbd53cf.json
Implement equality for Dependencies collections
Library/Homebrew/dependencies.rb
@@ -46,4 +46,12 @@ def required def default build + required + recommended end + + attr_reader :deps + protected :deps + + def ==(other) + deps == other.deps + end + alias_method :eql?, :== end
true
Other
Homebrew
brew
0b2c6e87f191b2ef5ad404c8d16f507becbd53cf.json
Implement equality for Dependencies collections
Library/Homebrew/test/test_dependencies.rb
@@ -59,4 +59,22 @@ def test_type_helpers assert_equal [qux], @deps.recommended assert_equal [foo, baz, quux, qux].sort_by(&:name), @deps.default.sort_by(&:name) end + + def test_equality + a = Dependencies.new + b = Dependencies.new + + dep = Dependency.new("foo") + + a << dep + b << dep + ...
true
Other
Homebrew
brew
257a2206a41d0b75ea3e07067e12dec9d06c0e2d.json
Eliminate unnecessary arrays and call to flatten
Library/Homebrew/dependency.rb
@@ -76,19 +76,22 @@ class << self # The default filter, which is applied when a block is not given, omits # optionals and recommendeds based on what the dependent has asked for. def expand(dependent, deps=dependent.deps, &block) - expanded_deps = deps.map do |dep| + expanded_deps = [] + + ...
false
Other
Homebrew
brew
33f344bdd42eb22733645b5adc22a723045b0f75.json
Drop TODO that nobody has ever worked on
Library/Homebrew/utils.rb
@@ -304,10 +304,6 @@ def uri_escape(query) 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 - # really should search for aliases too. - # don't include issues that ...
false
Other
Homebrew
brew
1eddc73472c2d39f698da2089889b3b7325010a8.json
Fix ls-taps for v3 API This doesn't handle paginated results, but it fetches the 100 most starred results so that's probably good enough for now. Fixes Homebrew/homebrew#26566.
Library/Contributions/cmd/brew-ls-taps.rb
@@ -1,13 +1,11 @@ -require 'utils/json' +require "utils/json" -GitHub.open "https://api.github.com/legacy/repos/search/homebrew" do |f| - Utils::JSON.load(f.read)["repositories"].each do |repo| - if repo['name'] =~ /^homebrew-(\S+)$/ - puts tap = if repo['username'] == "Homebrew" - "homebrew/#{$1}" - ...
false
Other
Homebrew
brew
f16003f58c4cccd28f4d275ed32c52498257dc2f.json
X11Dependency: return nil instead of raising in #<=> Returning nil is in the contract of the Comparable module, and a future version of Ruby will no longer hide this error.
Library/Homebrew/requirements/x11_dependency.rb
@@ -27,9 +27,7 @@ def message; <<-EOS.undent end def <=> other - unless other.is_a? X11Dependency - raise TypeError, "expected X11Dependency" - end + return nil unless X11Dependency === other if min_version.nil? && other.min_version.nil? 0
false
Other
Homebrew
brew
25c4e336f48c4f9d549efc5511d87788a99d291c.json
Use GitHub wrapper for private tap check
Library/Homebrew/cmd/tap.rb
@@ -31,20 +31,14 @@ def install_tap user, repo link_tap_formula(files) puts "Tapped #{files.length} formula" - # Figure out if this repo is private - # curl will throw an exception if the repo is private (Github returns a 404) - begin - curl('-Ifso', '/dev/null', "https://api.github.com/repos/...
true
Other
Homebrew
brew
25c4e336f48c4f9d549efc5511d87788a99d291c.json
Use GitHub wrapper for private tap check
Library/Homebrew/utils.rb
@@ -253,6 +253,7 @@ module GitHub extend self Error = Class.new(StandardError) RateLimitExceededError = Class.new(Error) + HTTPNotFoundError = Class.new(Error) def open url, headers={}, &block # This is a no-op if the user is opting out of using the GitHub API. @@ -276,6 +277,8 @@ def open url, heade...
true
Other
Homebrew
brew
d01c671d74ddafcbc0c8dc8eaa805d971e7169fc.json
Drop unnecessary map + compact in search_tap
Library/Homebrew/cmd/search.rb
@@ -104,9 +104,13 @@ def search_tap user, repo, rx results = [] GitHub.open "https://api.github.com/repos/#{user}/homebrew-#{repo}/git/trees/HEAD?recursive=1" do |json| user = user.downcase if user == "Homebrew" # special handling for the Homebrew organization - json["tree"].map{ |hash| hash['path...
false
Other
Homebrew
brew
4d6df3e3bca5147f49deb530d930b2f40b032cd1.json
Parse JSON early in GitHub module
Library/Homebrew/cmd/search.rb
@@ -1,7 +1,6 @@ require 'formula' require 'blacklist' require 'utils' -require 'utils/json' module Homebrew extend self @@ -103,20 +102,18 @@ def search_tap user, repo, rx return [] if (HOMEBREW_LIBRARY/"Taps/#{user.downcase}-#{repo.downcase}").directory? results = [] - GitHub.open "https://api.g...
true
Other
Homebrew
brew
4d6df3e3bca5147f49deb530d930b2f40b032cd1.json
Parse JSON early in GitHub module
Library/Homebrew/utils.rb
@@ -261,7 +261,9 @@ def open url, headers={}, &block default_headers = {'User-Agent' => HOMEBREW_USER_AGENT} default_headers['Authorization'] = "token #{HOMEBREW_GITHUB_API_TOKEN}" if HOMEBREW_GITHUB_API_TOKEN - Kernel.open(url, default_headers.merge(headers), &block) + Kernel.open(url, default_header...
true
Other
Homebrew
brew
dae221bdb84cdc73170ed1395130595d9706b8fc.json
Move colormake to headonly Closes Homebrew/homebrew#25226.
Library/Homebrew/tap_migrations.rb
@@ -18,4 +18,5 @@ 'jsl' => 'homebrew/binary', 'nlopt' => 'homebrew/science', 'comparepdf' => 'homebrew/boneyard', + 'colormake' => 'homebrew/headonly', }
false
Other
Homebrew
brew
d83ed0d793210bd692fe72830b8f3c0b0f41f5ab.json
bottle: improve bottle commit writing.
Library/Homebrew/cmd/bottle.rb
@@ -207,19 +207,20 @@ def merge if ARGV.include? '--write' f = Formula.factory formula_name - has_bottle_block = f.class.bottle.checksums.any? + update_or_add = nil inreplace f.path do |s| - if has_bottle_block - s.sub!(/ bottle do.+?end\n/m, output) + ...
false
Other
Homebrew
brew
7ed97b14fd0ea9dd92e561c75dee43a9a6d5c571.json
brew-test-bot: strip more unicode crap from XML.
Library/Contributions/cmd/brew-test-bot.rb
@@ -487,7 +487,7 @@ def run failure = testcase.add_element 'failure' if step.failed? if step.has_output? # Remove invalid XML CData characters from step output. - output = REXML::CData.new step.output.delete("\000\f\e") + output = REXML::CData.new step.output.delete("\000\b\e\f") ...
false
Other
Homebrew
brew
d307e5db96a3dea97c198c298440fa3750b8207e.json
brew-test-bot: handle git repositories for upload.
Library/Contributions/cmd/brew-test-bot.rb
@@ -431,6 +431,12 @@ def run pr = ENV['UPSTREAM_PULL_REQUEST'] number = ENV['UPSTREAM_BUILD_NUMBER'] + system "git am --abort 2>/dev/null" + system "git rebase --abort 2>/dev/null" + safe_system "git reset --hard" + safe_system "git checkout -f master" + safe_system "brew update" + if ARGV.include? '--c...
false
Other
Homebrew
brew
2e7c4236090c06def65b9d6fc64409337dcb9f55.json
bottle: show diff before trying to commit.
Library/Homebrew/cmd/bottle.rb
@@ -219,6 +219,7 @@ def merge update_or_add = has_bottle_block ? 'update' : 'add' + system 'git', 'diff' safe_system 'git', 'commit', '--no-edit', '--verbose', "--message=#{f.name}: #{update_or_add} #{f.version} bottle.", '--', f.path
false
Other
Homebrew
brew
00cba6dc042d0fec7b0158ea3a16e357d32acf5d.json
Fix comment error in example formula Closes Homebrew/homebrew#26017. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Contributions/example-formula.rb
@@ -325,7 +325,7 @@ def install # Sometime you will see that instead of `+` we build up a path with `/` # because it looks nicer (but you can't nest more than two `/`): (var/'foo').mkpath - # Copy `./example_code/simple/ones` to share/demos/examples + # Copy `./example_code/simple/ones` to share/de...
false
Other
Homebrew
brew
ee76cf75aff0aa9f55927b60be1a3c7220332cf0.json
Add python superenv wrapper Closes Homebrew/homebrew#26140. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Library/ENV/4.3/python
@@ -0,0 +1,4 @@ +#!/bin/sh + +export PATH=$USER_PATH +exec $(basename $0) $@
true
Other
Homebrew
brew
ee76cf75aff0aa9f55927b60be1a3c7220332cf0.json
Add python superenv wrapper Closes Homebrew/homebrew#26140. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Library/ENV/4.3/python-config
@@ -0,0 +1 @@ +python \ No newline at end of file
true
Other
Homebrew
brew
ee76cf75aff0aa9f55927b60be1a3c7220332cf0.json
Add python superenv wrapper Closes Homebrew/homebrew#26140. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Library/ENV/4.3/python2.6-config
@@ -0,0 +1 @@ +python \ No newline at end of file
true
Other
Homebrew
brew
ee76cf75aff0aa9f55927b60be1a3c7220332cf0.json
Add python superenv wrapper Closes Homebrew/homebrew#26140. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Library/ENV/4.3/python2.7-config
@@ -0,0 +1 @@ +python \ No newline at end of file
true
Other
Homebrew
brew
ee76cf75aff0aa9f55927b60be1a3c7220332cf0.json
Add python superenv wrapper Closes Homebrew/homebrew#26140. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Library/ENV/4.3/python3
@@ -0,0 +1 @@ +python \ No newline at end of file
true
Other
Homebrew
brew
ee76cf75aff0aa9f55927b60be1a3c7220332cf0.json
Add python superenv wrapper Closes Homebrew/homebrew#26140. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Library/ENV/4.3/python3.3-config
@@ -0,0 +1 @@ +python \ No newline at end of file
true
Other
Homebrew
brew
ee76cf75aff0aa9f55927b60be1a3c7220332cf0.json
Add python superenv wrapper Closes Homebrew/homebrew#26140. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Library/Homebrew/extend/ENV/super.rb
@@ -67,6 +67,7 @@ def setup_build_environment(formula=nil) validate_cc!(formula) unless formula.nil? self['DEVELOPER_DIR'] = determine_developer_dir self['MAKEFLAGS'] ||= "-j#{determine_make_jobs}" + self['USER_PATH'] = self['PATH'] self['PATH'] = determine_path self['PKG_CONFIG_PATH'] = det...
true
Other
Homebrew
brew
5de3686cd2e041dae893f9e84d74c925cb6c85f5.json
upgrade: fix output when no packages to upgrade. When upgrading, if the only package to upgrade is a pinned package, the output looked like that: ==> Upgrading 0 packages, with result: ==> Not upgrading 1 pinned package: <<package_name & version>> The blank line is not beautiful. This commit fixes the output and ...
Library/Homebrew/cmd/upgrade.rb
@@ -34,8 +34,12 @@ def upgrade outdated -= pinned end - oh1 "Upgrading #{outdated.length} outdated package#{outdated.length.plural_s}, with result:" - puts outdated.map{ |f| "#{f.name} #{f.version}" } * ", " + unless outdated.empty? + oh1 "Upgrading #{outdated.length} outdated package#{outda...
false
Other
Homebrew
brew
8c6c644a6b1ae4d3ae377fbb4a869aaa1ce84095.json
brew-test-bot: install GCC if needed.
Library/Contributions/cmd/brew-test-bot.rb
@@ -268,6 +268,12 @@ def formula formula return end + begin + CompilerSelector.new(formula_object).compiler + rescue CompilerSelectionError + test "brew install apple-gcc42" + end + test "brew fetch #{dependencies}" unless dependencies.empty? formula_fetch_options = " " f...
false
Other
Homebrew
brew
a65f649cf54d90700d039854c1619027cda9e8f6.json
utils: improve issue searching. * issues_matching now returns an array * prints issues titles and URLs * find_pull_requests shows closed PRs if no matching PRs are open Closes Homebrew/homebrew#26032.
Library/Homebrew/exceptions.rb
@@ -211,7 +211,7 @@ def dump puts unless RUBY_VERSION < "1.8.6" || issues.empty? puts "These open issues may also help:" - puts issues.map{ |s| " #{s}" }.join("\n") + puts issues.map{ |i| "#{i['title']} (#{i['html_url']})" }.join("\n") end end end
true
Other
Homebrew
brew
a65f649cf54d90700d039854c1619027cda9e8f6.json
utils: improve issue searching. * issues_matching now returns an array * prints issues titles and URLs * find_pull_requests shows closed PRs if no matching PRs are open Closes Homebrew/homebrew#26032.
Library/Homebrew/utils.rb
@@ -276,9 +276,9 @@ def open url, headers={}, &block raise Error, "Failed to connect to: #{url}\n#{e.message}" end - def each_issue_matching(query, &block) + def issues_matching(query) uri = ISSUES_URI + uri_escape(query) - open(uri) { |f| Utils::JSON.load(f.read)['issues'].each(&block) } + open(...
true
Other
Homebrew
brew
d8d76da55fbd1d06efaead2f492bd0b70a122683.json
keg: add function to detect if .app(s) installed.
Library/Homebrew/keg.rb
@@ -96,6 +96,10 @@ def python_site_packages_installed? (self/'lib/python2.7/site-packages').directory? end + def app_installed? + not Dir.glob("#{self}/{,libexec/}*.app").empty? + end + def version require 'version' Version.new(basename.to_s)
false
Other
Homebrew
brew
c91d0a99e211229bfa6630e7b80895e27fbb2f24.json
CONTRIBUTING: shorten troubleshooting wording.
CONTRIBUTING.md
@@ -3,14 +3,9 @@ Contributing to Homebrew Reporting Bugs -------------- -Please run: +First, please run `brew update` and `brew doctor`. -* `brew update` -* `brew doctor` - -Please read: - -* [Troubleshooting Checklist](https://github.com/Homebrew/homebrew/wiki/troubleshooting) +Second, read the [Troubleshooting ...
false
Other
Homebrew
brew
91f7f68ec453208bb2d933cb8504441232725200.json
bottle: use new quoting style.
Library/Homebrew/cmd/bottle.rb
@@ -17,21 +17,21 @@ def self.reset_bottle; @bottle = Bottle.new; end BOTTLE_ERB = <<-EOS bottle do - <% if prefix.to_s != '/usr/local' %> - prefix '<%= prefix %>' + <% if prefix.to_s != "/usr/local" %> + prefix "<%= prefix %>" <% end %> <% if cellar.is_a? Symbol %> cellar :<%= cellar %>...
false