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
0ef3e1e0dcbcd5aa55408fe81d23613e1c2c5e79.json
Preserve alias when installing formulae Part of #567
Library/Homebrew/test/test_formula.rb
@@ -8,13 +8,30 @@ def test_formula_instantiation name = "formula_name" path = Formulary.core_path(name) spec = :stable + install_name = "formula_alias" - f = klass.new(name, path, spec) + f = klass.new(name, path, spec, install_name: install_name) assert_equal name, f.name assert_equ...
true
Other
Homebrew
brew
0ef3e1e0dcbcd5aa55408fe81d23613e1c2c5e79.json
Preserve alias when installing formulae Part of #567
Library/Homebrew/test/test_formulary.rb
@@ -86,7 +86,9 @@ def test_factory_from_alias alias_dir = CoreTap.instance.alias_dir alias_dir.mkpath FileUtils.ln_s @path, alias_dir/"foo" - assert_kind_of Formula, Formulary.factory("foo") + result = Formulary.factory("foo") + assert_kind_of Formula, result + assert_equal "foo", result.inst...
true
Other
Homebrew
brew
0ef3e1e0dcbcd5aa55408fe81d23613e1c2c5e79.json
Preserve alias when installing formulae Part of #567
Library/Homebrew/test/test_tab.rb
@@ -43,6 +43,7 @@ def test_defaults assert_nil tab.stable_version assert_nil tab.devel_version assert_nil tab.head_version + assert_nil tab.install_name assert_equal DevelopmentTools.default_compiler, tab.cxxstdlib.compiler assert_nil tab.cxxstdlib.type end @@ -116,6 +117,7 @@ def test_fr...
true
Other
Homebrew
brew
0ef3e1e0dcbcd5aa55408fe81d23613e1c2c5e79.json
Preserve alias when installing formulae Part of #567
Library/Homebrew/test/testball.rb
@@ -1,5 +1,5 @@ class Testball < Formula - def initialize(name = "testball", path = Pathname.new(__FILE__).expand_path, spec = :stable) + def initialize(name = "testball", path = Pathname.new(__FILE__).expand_path, spec = :stable, install_name: name) self.class.instance_eval do stable.url "file://#{File....
true
Other
Homebrew
brew
0ef3e1e0dcbcd5aa55408fe81d23613e1c2c5e79.json
Preserve alias when installing formulae Part of #567
Library/Homebrew/test/testball_bottle.rb
@@ -1,5 +1,5 @@ class TestballBottle < Formula - def initialize(name = "testball_bottle", path = Pathname.new(__FILE__).expand_path, spec = :stable) + def initialize(name = "testball_bottle", path = Pathname.new(__FILE__).expand_path, spec = :stable, install_name: name) self.class.instance_eval do stable...
true
Other
Homebrew
brew
2682b59b7f9bf668d73ee36e073f6e2a823f57ef.json
update-report: add newline if preinstall updated. Fixes #858.
Library/Homebrew/cmd/update-report.rb
@@ -76,13 +76,16 @@ def update_report if !ARGV.include?("--preinstall") && !ENV["HOMEBREW_UPDATE_FAILED"] puts "Already up-to-date." end - elsif hub.empty? - puts "No changes to formulae." else - hub.dump - hub.reporters.each(&:migrate_tap_migration) - hub.reporters.ea...
false
Other
Homebrew
brew
4422bd1f341e57038a8852ca9f8c46c31dbdbcad.json
audit: enforce https for Debian's anonscm
Library/Homebrew/cmd/audit.rb
@@ -1192,6 +1192,7 @@ def audit_urls %r{^http://tools\.ietf\.org/}, %r{^http://launchpad\.net/}, %r{^http://bitbucket\.org/}, + %r{^http://anonscm\.debian\.org/}, %r{^http://cpan\.metacpan\.org/}, %r{^http://hackage\.haskell\.org/}, %r{^h...
false
Other
Homebrew
brew
5f1abcf84210d20fe8276d0216a7c8e39f326398.json
docs: fix a typo in plist_options While using `"true"` instead of `true` wouldn't break anything, it doesn't seem to be expected, and using `"false"` instead of `false` _would_ break things.
Library/Homebrew/formula.rb
@@ -2062,7 +2062,7 @@ def patch(strip = :p1, src = nil, &block) # <pre>plist_options :manual => "foo"</pre> # # Or perhaps you'd like to give the user a choice? Ooh fancy. - # <pre>plist_options :startup => "true", :manual => "foo start"</pre> + # <pre>plist_options :startup => true, :manual => "fo...
false
Other
Homebrew
brew
5b593ebb8958cc57cfbbd7013ca3d275466d66bf.json
Allow deprecated hash syntax in Cask headers
Library/Homebrew/cask/lib/hbc/source/path_base.rb
@@ -55,6 +55,10 @@ def test_cask(header_token, &block) end def build_cask(cask_class, header_token, &block) + if header_token.is_a?(Hash) + # Cask file is using old `cask :v1 => 'token'` syntax + header_token = header_token.values.first + end raise Hbc::CaskTokenDoesNotMatchError.new(cask_t...
true
Other
Homebrew
brew
5b593ebb8958cc57cfbbd7013ca3d275466d66bf.json
Allow deprecated hash syntax in Cask headers
Library/Homebrew/cask/test/cask/dsl_test.rb
@@ -62,6 +62,15 @@ it "does not require a DSL version in the header" do test_cask = Hbc.load("no-dsl-version") + test_cask.token.must_equal "no-dsl-version" + test_cask.url.to_s.must_equal "http://example.com/TestCask.dmg" + test_cask.homepage.must_equal "http://example.com/" + test_ca...
true
Other
Homebrew
brew
5b593ebb8958cc57cfbbd7013ca3d275466d66bf.json
Allow deprecated hash syntax in Cask headers
Library/Homebrew/cask/test/support/Casks/with-dsl-version.rb
@@ -0,0 +1,9 @@ +test_cask :v1 => 'with-dsl-version' do + version '1.2.3' + sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' + + url 'http://example.com/TestCask.dmg' + homepage 'http://example.com/' + + app 'TestCask.app' +end
true
Other
Homebrew
brew
ab203a749f050486bd174fc7e29bd2a246333b80.json
search: handle name@v.v formulae. Before this change: ``` ~> brew search openssl@1.1 openssl@1.1 ✔ ==> Did you mean to perform a regular expression search? ==> Surround your query with /slashes/ to search by regex. ```
Library/Homebrew/cmd/search.rb
@@ -83,7 +83,7 @@ def search end if $stdout.tty? - metacharacters = %w[\\ | ( ) [ ] { } ^ $ * + ? .] + metacharacters = %w[\\ | ( ) [ ] { } ^ $ * + ?] bad_regex = metacharacters.any? do |char| ARGV.any? do |arg| arg.include?(char) && !arg.start_with?("/")
false
Other
Homebrew
brew
0b0893e26e801856fad96fda2a514c27f7140457.json
brew: execute update before tap This seems generally like a good idea given that we're making syntax changes to formulae & are going to keep doing so for a little while yet. Taps may have moved over to that syntax, which then causes tap failures if brew isn't up-to-date. Should fix situations like https://github.com/...
Library/Homebrew/brew.sh
@@ -247,7 +247,7 @@ update-preinstall() { [[ -z "$HOMEBREW_NO_AUTO_UPDATE" ]] || return [[ -z "$HOMEBREW_UPDATE_PREINSTALL" ]] || return - if [[ "$HOMEBREW_COMMAND" = "install" || "$HOMEBREW_COMMAND" = "upgrade" ]] + if [[ "$HOMEBREW_COMMAND" = "install" || "$HOMEBREW_COMMAND" = "upgrade" || "$HOMEBREW_COMMAN...
false
Other
Homebrew
brew
6d54a250472a5bb303f69adc4db8970bb8b9e3e0.json
Brew-Test-Bot-For-Core-Contributors: fix broken link
share/doc/homebrew/Brew-Test-Bot-For-Core-Contributors.md
@@ -9,7 +9,7 @@ This job automatically builds any pull requests submitted to Homebrew/homebrew-c ## [Homebrew Testing](https://bot.brew.sh/job/Homebrew%20Testing/) This job is manually triggered to run [`brew test-bot`](https://github.com/Homebrew/brew/blob/master/Library/Homebrew/dev-cmd/test-bot.rb) with user-speci...
false
Other
Homebrew
brew
db88ca1e1871df380a6408dadc2bdb81a4b25f3e.json
Fix missing `magenta` in Tty.
Library/Homebrew/cask/lib/hbc/utils.rb
@@ -37,7 +37,7 @@ def odebug(title, *sput) if $stdout.tty? && title.to_s.length > width title = title.to_s[0, width - 3] + "..." end - puts "#{Tty.magenta}==> #{title}#{Tty.reset}" + puts "#{Tty.magenta}==>#{Tty.reset} #{Tty.white}#{title}#{Tty.reset}" puts sput unless sput.empty? end en...
true
Other
Homebrew
brew
db88ca1e1871df380a6408dadc2bdb81a4b25f3e.json
Fix missing `magenta` in Tty.
Library/Homebrew/utils.rb
@@ -25,6 +25,10 @@ def white bold 39 end + def magenta + bold 35 + end + def red underline 31 end
true
Other
Homebrew
brew
50fee143583b129a86a56bdc21d1f4ff4b9f5812.json
Unify heredoc style.
Library/Homebrew/cask/lib/hbc/cli.rb
@@ -187,10 +187,10 @@ def self.parser end opts.on("--binarydir=PATH") do - opoo <<-EOF.undent + opoo <<-EOS.undent Option --binarydir is obsolete! Homebrew-Cask now uses the same location as your Homebrew installation for executable links. - EOF + EOS ...
true
Other
Homebrew
brew
50fee143583b129a86a56bdc21d1f4ff4b9f5812.json
Unify heredoc style.
Library/Homebrew/cask/lib/hbc/cli/uninstall.rb
@@ -27,10 +27,10 @@ def self.run(*args) single = versions.count == 1 - puts <<-EOF.undent + puts <<-EOS.undent #{cask_token} #{versions.join(', ')} #{single ? 'is' : 'are'} still installed. Remove #{single ? 'it' : 'them all'} with `brew cask uninstall --force #{cask_token}`. - ...
true
Other
Homebrew
brew
50fee143583b129a86a56bdc21d1f4ff4b9f5812.json
Unify heredoc style.
Library/Homebrew/cask/lib/hbc/container/air.rb
@@ -11,12 +11,12 @@ def self.me?(criteria) def self.installer_cmd return @installer_cmd ||= INSTALLER_PATHNAME if installer_exist? - raise Hbc::CaskError, <<-ERRMSG.undent + raise Hbc::CaskError, <<-EOS.undent Adobe AIR runtime not present, try installing it via brew cask install ado...
true
Other
Homebrew
brew
50fee143583b129a86a56bdc21d1f4ff4b9f5812.json
Unify heredoc style.
Library/Homebrew/cask/lib/hbc/system_command.rb
@@ -150,24 +150,24 @@ def self._parse_plist(command, output) _warn_plist_garbage(command, Regexp.last_match[2]) xml = Plist.parse_xml(output) unless xml.respond_to?(:keys) && !xml.keys.empty? - raise Hbc::CaskError, <<-ERRMSG + raise Hbc::CaskError, <<-EOS Empty result parsing plist output fro...
true
Other
Homebrew
brew
50fee143583b129a86a56bdc21d1f4ff4b9f5812.json
Unify heredoc style.
Library/Homebrew/cask/spec/cask/cli/cleanup_spec.rb
@@ -18,11 +18,11 @@ expect { subject.cleanup! - }.to output(<<-OUTPUT.undent).to_stdout + }.to output(<<-EOS.undent).to_stdout ==> Removing cached downloads #{cached_download} ==> This operation has freed approximately #{disk_usage_readable(cleanup_size)} of disk s...
true
Other
Homebrew
brew
50fee143583b129a86a56bdc21d1f4ff4b9f5812.json
Unify heredoc style.
Library/Homebrew/cask/test/cask/artifact/uninstall_test.rb
@@ -42,7 +42,7 @@ let(:launchctl_remove_cmd) { %w[/bin/launchctl remove my.fancy.package.service] } let(:unknown_response) { "launchctl list returned unknown response\n" } let(:service_info) { - <<-PLIST.undent + <<-EOS.undent { "LimitLoadToSessionType" =...
true
Other
Homebrew
brew
50fee143583b129a86a56bdc21d1f4ff4b9f5812.json
Unify heredoc style.
Library/Homebrew/cask/test/cask/artifact/zap_test.rb
@@ -43,7 +43,7 @@ let(:launchctl_remove_cmd) { %w[/bin/launchctl remove my.fancy.package.service] } let(:unknown_response) { "launchctl list returned unknown response\n" } let(:service_info) { - <<-PLIST.undent + <<-EOS.undent { "LimitLoadToSessionType" =...
true
Other
Homebrew
brew
50fee143583b129a86a56bdc21d1f4ff4b9f5812.json
Unify heredoc style.
Library/Homebrew/cask/test/cask/cli/cat_test.rb
@@ -3,7 +3,7 @@ describe Hbc::CLI::Cat do describe "given a basic Cask" do before do - @expected_output = <<-CLIOUTPUT.undent + @expected_output = <<-EOS.undent test_cask 'basic-cask' do version '1.2.3' sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f...
true
Other
Homebrew
brew
50fee143583b129a86a56bdc21d1f4ff4b9f5812.json
Unify heredoc style.
Library/Homebrew/cask/test/cask/cli/create_test.rb
@@ -37,7 +37,7 @@ def self.editor_commands it "drops a template down for the specified Cask" do Hbc::CLI::Create.run("new-cask") template = File.read(Hbc.path("new-cask")) - template.must_equal <<-TEMPLATE.undent + template.must_equal <<-EOS.undent cask 'new-cask' do version '' ...
true
Other
Homebrew
brew
50fee143583b129a86a56bdc21d1f4ff4b9f5812.json
Unify heredoc style.
Library/Homebrew/cask/test/cask/cli/search_test.rb
@@ -4,11 +4,11 @@ it "lists the available Casks that match the search term" do lambda { Hbc::CLI::Search.run("photoshop") - }.must_output <<-OUTPUT.gsub(%r{^ *}, "") + }.must_output <<-EOS.undent ==> Partial matches adobe-photoshop-cc adobe-photoshop-lightroom - OUTPUT + ...
true
Other
Homebrew
brew
50fee143583b129a86a56bdc21d1f4ff4b9f5812.json
Unify heredoc style.
Library/Homebrew/cask/test/cask/cli/uninstall_test.rb
@@ -57,11 +57,11 @@ timestamped_versions.each do |timestamped_version| caskroom_path.join(".metadata", *timestamped_version, "Casks").tap(&:mkpath) .join("#{token}.rb").open("w") do |caskfile| - caskfile.puts <<-EOF.undent + caskfile.puts...
true
Other
Homebrew
brew
50fee143583b129a86a56bdc21d1f4ff4b9f5812.json
Unify heredoc style.
Library/Homebrew/cask/test/cask/dsl_test.rb
@@ -20,7 +20,7 @@ end it "prints a warning that it has encountered an unexpected method" do - expected = Regexp.compile(<<-EOREGEX.undent.lines.map(&:chomp).join("")) + expected = Regexp.compile(<<-EOS.undent.lines.map(&:chomp).join("")) (?m) Warning: .* @@ -29,7 +29,7 @...
true
Other
Homebrew
brew
50fee143583b129a86a56bdc21d1f4ff4b9f5812.json
Unify heredoc style.
Library/Homebrew/cask/test/cask/url_checker_test.rb
@@ -11,13 +11,13 @@ end it "properly populates the response code and headers from an http response" do - TestHelper.fake_response_for(TestHelper.test_cask.url, <<-RESPONSE.gsub(%r{^ *}, "")) + TestHelper.fake_response_for(TestHelper.test_cask.url, <<-EOS.undent) HTTP/1.1 200 OK C...
true
Other
Homebrew
brew
03352805c66c8f545fad59f7007f615a55d3e37b.json
tap: use utils link_path_manpages.
Library/Homebrew/tap.rb
@@ -248,26 +248,7 @@ def install(options = {}) end def link_manpages - return unless (path/"man").exist? - conflicts = [] - (path/"man").find do |src| - next if src.directory? - dst = HOMEBREW_PREFIX/"share"/src.relative_path_from(path) - next if dst.symlink? && src == dst.resolved_path ...
false
Other
Homebrew
brew
8cc027a3cd24b95120932c581c8b9eebb8c710f3.json
utils: add link_path_manpages method.
Library/Homebrew/utils.rb
@@ -594,3 +594,26 @@ def truncate_text_to_approximate_size(s, max_bytes, options = {}) out.encode!("UTF-8") out end + +def link_path_manpages(path, command) + return unless (path/"man").exist? + conflicts = [] + (path/"man").find do |src| + next if src.directory? + dst = HOMEBREW_PREFIX/"share"/src.rela...
false
Other
Homebrew
brew
1e1a8bf626b044b5772635f9ac28ce89c0b431db.json
Use version 3.1.0 of vendored `plist`.
Library/Homebrew/cask/lib/hbc.rb
@@ -36,7 +36,7 @@ module Hbc; end require "hbc/verify" require "hbc/version" -require "vendor/plist" +require "vendor/plist/plist" module Hbc include Hbc::Locations
true
Other
Homebrew
brew
1e1a8bf626b044b5772635f9ac28ce89c0b431db.json
Use version 3.1.0 of vendored `plist`.
Library/Homebrew/vendor/plist.rb
@@ -1,234 +0,0 @@ -# -# = plist -# -# Copyright 2006-2010 Ben Bleything and Patrick May -# Distributed under the MIT License -# - -# Plist parses macOS xml property list files into ruby data structures. -# -# === Load a plist file -# This is the main point of the library: -# -# r = Plist::parse_xml( filename_or_xml )...
true
Other
Homebrew
brew
1e1a8bf626b044b5772635f9ac28ce89c0b431db.json
Use version 3.1.0 of vendored `plist`.
Library/Homebrew/vendor/plist/plist.rb
@@ -13,8 +13,8 @@ require 'cgi' require 'stringio' -require 'plist/generator' -require 'plist/parser' +require_relative 'plist/generator' +require_relative 'plist/parser' module Plist VERSION = '3.1.0'
true
Other
Homebrew
brew
65579f27dd905e4026bb514f60e875cfc41cc368.json
cask tty removed
Library/Homebrew/cask/lib/hbc.rb
@@ -35,6 +35,7 @@ module Hbc; end require "hbc/utils" require "hbc/verify" require "hbc/version" +require "utils" require "vendor/plist"
true
Other
Homebrew
brew
65579f27dd905e4026bb514f60e875cfc41cc368.json
cask tty removed
Library/Homebrew/cask/lib/hbc/artifact/moved.rb
@@ -80,7 +80,7 @@ def summarize_artifact(artifact_spec) target_abv = " (#{target.abv})" else warning = "Missing #{self.class.artifact_english_name}" - warning = "#{Hbc::Utils::Tty.red.underline}#{warning}#{Hbc::Utils::Tty.reset}: " + warning = "#{Tty.red}#{warning}#{Tty.reset}: " end ...
true
Other
Homebrew
brew
65579f27dd905e4026bb514f60e875cfc41cc368.json
cask tty removed
Library/Homebrew/cask/lib/hbc/artifact/symlinked.rb
@@ -57,7 +57,7 @@ def summarize_artifact(artifact_spec) return unless self.class.islink?(target) - link_description = "#{Hbc::Utils::Tty.red.underline}Broken Link#{Hbc::Utils::Tty.reset}: " unless target.exist? + link_description = "#{Tty.red}Broken Link#{Tty.reset}: " unless target.exist? target_re...
true
Other
Homebrew
brew
65579f27dd905e4026bb514f60e875cfc41cc368.json
cask tty removed
Library/Homebrew/cask/lib/hbc/checkable.rb
@@ -27,23 +27,23 @@ def warnings? def result if errors? - "#{Hbc::Utils::Tty.red.underline}failed#{Hbc::Utils::Tty.reset}" + "#{Tty.red}failed#{Tty.reset}" elsif warnings? - "#{Hbc::Utils::Tty.yellow.underline}warning#{Hbc::Utils::Tty.reset}" + "#{Tty.yellow}warning#{Tty.reset}" ...
true
Other
Homebrew
brew
65579f27dd905e4026bb514f60e875cfc41cc368.json
cask tty removed
Library/Homebrew/cask/lib/hbc/cli/doctor.rb
@@ -124,11 +124,11 @@ def self.legacy_tap_pattern end def self.notfound_string - "#{Hbc::Utils::Tty.red.underline}Not Found - Unknown Error#{Hbc::Utils::Tty.reset}" + "#{Tty.red}Not Found - Unknown Error#{Tty.reset}" end def self.error_string(string = "Error") - "#{Hbc::Utils::Tty.red.underline...
true
Other
Homebrew
brew
65579f27dd905e4026bb514f60e875cfc41cc368.json
cask tty removed
Library/Homebrew/cask/lib/hbc/cli/info.rb
@@ -25,7 +25,7 @@ def self.info(cask) end def self.formatted_url(url) - "#{Hbc::Utils::Tty.underline}#{url}#{Hbc::Utils::Tty.reset}" + "#{Tty.em}#{url}#{Tty.reset}" end def self.installation_info(cask) @@ -35,7 +35,7 @@ def self.installation_info(cask) puts versioned_staged_path.to_s ...
true
Other
Homebrew
brew
65579f27dd905e4026bb514f60e875cfc41cc368.json
cask tty removed
Library/Homebrew/cask/lib/hbc/cli/style.rb
@@ -28,7 +28,7 @@ def install_rubocop begin Homebrew.install_gem_setup_path! "rubocop-cask", RUBOCOP_CASK_VERSION, "rubocop" rescue SystemExit - raise Hbc::CaskError, $stderr.string.chomp.sub("#{::Tty.red}Error#{::Tty.reset}: ", "") + raise Hbc::CaskError, $stderr.string.chomp.sub("...
true
Other
Homebrew
brew
65579f27dd905e4026bb514f60e875cfc41cc368.json
cask tty removed
Library/Homebrew/cask/lib/hbc/installer.rb
@@ -87,7 +87,7 @@ def summary s = if MacOS.version >= :lion && !ENV["HOMEBREW_NO_EMOJI"] (ENV["HOMEBREW_INSTALL_BADGE"] || "\xf0\x9f\x8d\xba") + " " else - "#{Hbc::Utils::Tty.blue.bold}==>#{Hbc::Utils::Tty.reset.bold} Success!#{Hbc::Utils::Tty.reset} " + "#{Tty.blue}==>#{Tty....
true
Other
Homebrew
brew
65579f27dd905e4026bb514f60e875cfc41cc368.json
cask tty removed
Library/Homebrew/cask/lib/hbc/utils.rb
@@ -5,7 +5,6 @@ module Hbc::Utils; end require "stringio" require "hbc/utils/file" -require "hbc/utils/tty" UPDATE_CMD = "brew uninstall --force brew-cask; brew untap phinze/cask; brew untap caskroom/cask; brew update; brew cleanup; brew cask cleanup".freeze ISSUES_URL = "https://github.com/caskroom/homebrew-ca...
true
Other
Homebrew
brew
65579f27dd905e4026bb514f60e875cfc41cc368.json
cask tty removed
Library/Homebrew/cask/lib/hbc/utils/tty.rb
@@ -1,125 +0,0 @@ -# originally from Homebrew utils.rb - -class Hbc::Utils::Tty - COLORS = { - black: 0, - red: 1, - green: 2, - yellow: 3, - blue: 4, - magenta: 5, - cyan: 6, - white: 7, - defa...
true
Other
Homebrew
brew
911edb0ed77859445c3a48f6abe5b9be5807ebf7.json
Add test for per-cask `cleanup`.
Library/Homebrew/cask/spec/cask/cli/cleanup_spec.rb
@@ -10,6 +10,32 @@ cache_location.rmtree end + describe "cleanup" do + it "removes cached downloads of given casks" do + cleaned_up_cached_download = 'caffeine' + + cached_downloads = [ + cache_location.join("#{cleaned_up_cached_download}--latest.zip"), + ...
false
Other
Homebrew
brew
3c6529851991eed20c75ba4661a1734d8a889468.json
build: permit weak imports in Go reverse deps. Go makes extensive use of weak imports so we need to allow them when building Go-using software. Closes https://github.com/Homebrew/homebrew-core/issues/4047.
Library/Homebrew/build.rb
@@ -79,6 +79,11 @@ def install ENV.activate_extensions! + # Go makes extensive use of weak imports. + if formula_deps.any? { |f| f.name == "go" } + ENV.permit_weak_imports + end + if superenv? ENV.keg_only_deps = keg_only_deps ENV.deps = formula_deps
false
Other
Homebrew
brew
0dd320318706bed665038350f11a74a0fb8e7f34.json
Install Cask’s default tap if untapped.
Library/Homebrew/cask/lib/hbc/cli.rb
@@ -142,6 +142,7 @@ def self.process(arguments) command_string, *rest = *arguments rest = process_options(rest) command = Hbc.help ? "help" : lookup_command(command_string) + Hbc.default_tap.install unless Hbc.default_tap.installed? Hbc.init if should_init?(command) run_command(command, *res...
true
Other
Homebrew
brew
0dd320318706bed665038350f11a74a0fb8e7f34.json
Install Cask’s default tap if untapped.
Library/Homebrew/cask/lib/hbc/locations.rb
@@ -126,7 +126,7 @@ def screen_saverdir attr_writer :default_tap def default_tap - @default_tap ||= Tap.fetch("caskroom/homebrew-cask") + @default_tap ||= Tap.fetch("caskroom", "homebrew-cask") end def path(query)
true
Other
Homebrew
brew
0dd320318706bed665038350f11a74a0fb8e7f34.json
Install Cask’s default tap if untapped.
Library/Homebrew/official_taps.rb
@@ -17,7 +17,6 @@ ].freeze OFFICIAL_CMD_TAPS = { - "caskroom/cask" => ["cask"], "homebrew/bundle" => ["bundle"], "homebrew/services" => ["services"], }.freeze
true
Other
Homebrew
brew
0dd320318706bed665038350f11a74a0fb8e7f34.json
Install Cask’s default tap if untapped.
Library/Homebrew/tap.rb
@@ -307,7 +307,7 @@ def formula_dir @formula_dir ||= [path/"Formula", path/"HomebrewFormula", path].detect(&:directory?) end - # path to the directory of all casks for caskroom/cask {Tap}. + # path to the directory of all {Cask} files for this {Tap}. def cask_dir @cask_dir ||= path/"Casks" end
true
Other
Homebrew
brew
eea0da362bd01abc74e66e64909b0be11c01322e.json
audit: ensure correct version_scheme placement.
Library/Homebrew/cmd/audit.rb
@@ -209,6 +209,7 @@ def audit_file [/^ version ["'][\S\ ]+["']/, "version"], [/^ (sha1|sha256) ["'][\S\ ]+["']/, "checksum"], [/^ revision/, "revision"], + [/^ version_scheme/, "version_scheme"], [/^ head ["'][\S\ ]+["']/, "head"],...
false
Other
Homebrew
brew
cc2a90ec8d4dc8b26a7658f4424cf6949d0bf4cb.json
Formula-Cookbook: add version_scheme documentation.
share/doc/homebrew/Formula-Cookbook.md
@@ -193,6 +193,12 @@ Where a dependent of a formula fails against a new version of that dependency it [`revision`](http://www.rubydoc.info/github/Homebrew/brew/master/Formula#revision%3D-class_method)s are also used for formulae that move from the system OpenSSL to the Homebrew-shipped OpenSSL without any other chan...
false
Other
Homebrew
brew
a5a1b2969fa6a515495b11f746f43ec005ed671b.json
version: fix parsing of URLs ending with version https://github.com/lihaoyi/Ammonite/releases/download/0.7.4/0.7.4 was parsing as "0.7" not "0.7.4" since ".4" was being treated as a legitimate file extension. At minimum, let's insist that a valid file extension include at least one letter to avoid lopping off part of...
Library/Homebrew/test/test_versions.rb
@@ -438,8 +438,12 @@ def test_opam_version "https://opam.ocaml.org/archives/easy-format.1.0.2+opam.tar.gz" end - def test_waf_version + def test_no_extension_version assert_version_detected "1.8.12", "https://waf.io/waf-1.8.12" + assert_version_detected "0.7.1", "https://codeload.github.com/gsamok...
true
Other
Homebrew
brew
a5a1b2969fa6a515495b11f746f43ec005ed671b.json
version: fix parsing of URLs ending with version https://github.com/lihaoyi/Ammonite/releases/download/0.7.4/0.7.4 was parsing as "0.7" not "0.7.4" since ".4" was being treated as a legitimate file extension. At minimum, let's insist that a valid file extension include at least one letter to avoid lopping off part of...
Library/Homebrew/version.rb
@@ -294,6 +294,8 @@ def self._parse(spec) spec.basename.to_s elsif %r{((?:sourceforge\.net|sf\.net)/.*)/download$}.match(spec_s) Pathname.new(spec.dirname).stem + elsif %r{\.[^a-zA-Z]+$}.match(spec_s) + Pathname.new(spec_s).basename else spec.stem end
true
Other
Homebrew
brew
bf05651a0130c4df1f334a99f515708184e5a133.json
remove ruby 1.8 compatible codes (#742)
Library/Homebrew/brew.rb
@@ -1,5 +1,9 @@ std_trap = trap("INT") { exit! 130 } # no backtrace thanks +# check ruby version before requiring any modules. +RUBY_TWO = RUBY_VERSION.split(".").first.to_i >= 2 +raise "Homebrew must be run under Ruby 2!" unless RUBY_TWO + require "pathname" HOMEBREW_LIBRARY_PATH = Pathname.new(__FILE__).realpath...
true
Other
Homebrew
brew
bf05651a0130c4df1f334a99f515708184e5a133.json
remove ruby 1.8 compatible codes (#742)
Library/Homebrew/dev-cmd/test-bot.rb
@@ -49,22 +49,12 @@ module Homebrew HOMEBREW_TAP_REGEX = %r{^([\w-]+)/homebrew-([\w-]+)$} - if ruby_has_encoding? - def fix_encoding!(str) - # Assume we are starting from a "mostly" UTF-8 string - str.force_encoding(Encoding::UTF_8) - return str if str.valid_encoding? - str.encode!(Encodi...
true
Other
Homebrew
brew
bf05651a0130c4df1f334a99f515708184e5a133.json
remove ruby 1.8 compatible codes (#742)
Library/Homebrew/extend/fileutils.rb
@@ -65,8 +65,7 @@ def run Process.gid end begin - # group_id.to_s makes OS X 10.6.7 (ruby-1.8.7-p174) and earlier happy. - chown(nil, group_id.to_s, tmpdir) + chown(nil, group_id, tmpdir) rescue Errno::EPERM opoo "Failed setting group \"#...
true
Other
Homebrew
brew
bf05651a0130c4df1f334a99f515708184e5a133.json
remove ruby 1.8 compatible codes (#742)
Library/Homebrew/extend/pathname.rb
@@ -445,39 +445,7 @@ def install_metafiles(from = Pathname.pwd) end end - # We redefine these private methods in order to add the /o modifier to - # the Regexp literals, which forces string interpolation to happen only - # once instead of each time the method is called. This is fixed in 1.9+. - if RUBY_VE...
true
Other
Homebrew
brew
bf05651a0130c4df1f334a99f515708184e5a133.json
remove ruby 1.8 compatible codes (#742)
Library/Homebrew/global.rb
@@ -22,16 +22,8 @@ HOMEBREW_REPOSITORY.extend(GitRepositoryExtension) -if RbConfig.respond_to?(:ruby) - RUBY_PATH = Pathname.new(RbConfig.ruby) -else - RUBY_PATH = Pathname.new(RbConfig::CONFIG["bindir"]).join( - RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"] - ) -end +RUBY_PATH = Pathnam...
true
Other
Homebrew
brew
bf05651a0130c4df1f334a99f515708184e5a133.json
remove ruby 1.8 compatible codes (#742)
Library/Homebrew/utils.rb
@@ -561,11 +561,6 @@ def number_readable(number) numstr end -# True if this version of Ruby supports text encodings in its strings -def ruby_has_encoding? - String.method_defined?(:force_encoding) -end - # Truncates a text string to fit within a byte size constraint, # preserving character encoding validity. T...
true
Other
Homebrew
brew
6a684f41993f4820b48b7487c32096ea72d4de2f.json
test_formula: add epoch tests
Library/Homebrew/test/test_formula.rb
@@ -583,7 +583,6 @@ def setup_tab_for_prefix(prefix, options = {}) def reset_outdated_versions f.instance_variable_set(:@outdated_versions, nil) - f.instance_variable_set(:@outdated_versions_head_fetched, nil) end def test_greater_different_tap_installed @@ -732,4 +731,69 @@ def test_outdated_fetch...
false
Other
Homebrew
brew
f085597cbdabab1138c96b7d928b4ae451a50e5d.json
Use epochs in tabs
Library/Homebrew/formula.rb
@@ -436,6 +436,7 @@ def latest_head_prefix def head_version_outdated?(version, options={}) tab = Tab.for_keg(prefix(version)) + return true if tab.version_scheme < version_scheme return true if stable && tab.stable_version && tab.stable_version < stable.version return true if devel && tab.devel_v...
true
Other
Homebrew
brew
f085597cbdabab1138c96b7d928b4ae451a50e5d.json
Use epochs in tabs
Library/Homebrew/tab.rb
@@ -37,6 +37,7 @@ def self.create(formula, compiler, stdlib) "stable" => formula.stable ? formula.stable.version.to_s : nil, "devel" => formula.devel ? formula.devel.version.to_s : nil, "head" => formula.head ? formula.head.version.to_s : nil, + "version_scheme" => formula.vers...
true
Other
Homebrew
brew
e423617d771b934da4c82ab30683d0a05aa20b45.json
remove ruby 1.8 compatible codes
Library/Homebrew/brew.rb
@@ -1,5 +1,9 @@ std_trap = trap("INT") { exit! 130 } # no backtrace thanks +# check ruby version before requiring any modules. +RUBY_TWO = RUBY_VERSION.split(".").first.to_i >= 2 +raise "Homebrew must be run under Ruby 2!" unless RUBY_TWO + require "pathname" HOMEBREW_LIBRARY_PATH = Pathname.new(__FILE__).realpath...
true
Other
Homebrew
brew
e423617d771b934da4c82ab30683d0a05aa20b45.json
remove ruby 1.8 compatible codes
Library/Homebrew/dev-cmd/test-bot.rb
@@ -49,22 +49,12 @@ module Homebrew HOMEBREW_TAP_REGEX = %r{^([\w-]+)/homebrew-([\w-]+)$} - if ruby_has_encoding? - def fix_encoding!(str) - # Assume we are starting from a "mostly" UTF-8 string - str.force_encoding(Encoding::UTF_8) - return str if str.valid_encoding? - str.encode!(Encodi...
true
Other
Homebrew
brew
e423617d771b934da4c82ab30683d0a05aa20b45.json
remove ruby 1.8 compatible codes
Library/Homebrew/extend/fileutils.rb
@@ -65,8 +65,7 @@ def run Process.gid end begin - # group_id.to_s makes OS X 10.6.7 (ruby-1.8.7-p174) and earlier happy. - chown(nil, group_id.to_s, tmpdir) + chown(nil, group_id, tmpdir) rescue Errno::EPERM opoo "Failed setting group \"#...
true
Other
Homebrew
brew
e423617d771b934da4c82ab30683d0a05aa20b45.json
remove ruby 1.8 compatible codes
Library/Homebrew/extend/pathname.rb
@@ -445,39 +445,7 @@ def install_metafiles(from = Pathname.pwd) end end - # We redefine these private methods in order to add the /o modifier to - # the Regexp literals, which forces string interpolation to happen only - # once instead of each time the method is called. This is fixed in 1.9+. - if RUBY_VE...
true
Other
Homebrew
brew
e423617d771b934da4c82ab30683d0a05aa20b45.json
remove ruby 1.8 compatible codes
Library/Homebrew/global.rb
@@ -22,16 +22,8 @@ HOMEBREW_REPOSITORY.extend(GitRepositoryExtension) -if RbConfig.respond_to?(:ruby) - RUBY_PATH = Pathname.new(RbConfig.ruby) -else - RUBY_PATH = Pathname.new(RbConfig::CONFIG["bindir"]).join( - RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"] - ) -end +RUBY_PATH = Pathnam...
true
Other
Homebrew
brew
e423617d771b934da4c82ab30683d0a05aa20b45.json
remove ruby 1.8 compatible codes
Library/Homebrew/utils.rb
@@ -561,11 +561,6 @@ def number_readable(number) numstr end -# True if this version of Ruby supports text encodings in its strings -def ruby_has_encoding? - String.method_defined?(:force_encoding) -end - # Truncates a text string to fit within a byte size constraint, # preserving character encoding validity. T...
true
Other
Homebrew
brew
9c7f24b84aea4ae1b465afa41445385ada4f2ffb.json
Add permit_weak_imports directive Issue Homebrew/homebrew-core#3727 suggested we set -no_weak_imports for new versions of Xcode to ensure that e.g. building on 10.11 against the 10.12 SDK doesn't result in a situation where autotools thinks symbols exist that don't actually exist on the current platform. Further disc...
Library/Homebrew/extend/ENV/shared.rb
@@ -293,6 +293,8 @@ def warn_about_non_apple_gcc(name) def permit_arch_flags; end + def permit_weak_imports; end + private def cc=(val)
true
Other
Homebrew
brew
9c7f24b84aea4ae1b465afa41445385ada4f2ffb.json
Add permit_weak_imports directive Issue Homebrew/homebrew-core#3727 suggested we set -no_weak_imports for new versions of Xcode to ensure that e.g. building on 10.11 against the 10.12 SDK doesn't result in a situation where autotools thinks symbols exist that don't actually exist on the current platform. Further disc...
Library/Homebrew/extend/os/mac/extend/ENV/std.rb
@@ -146,4 +146,8 @@ def x11 append "CFLAGS", "-I#{MacOS::X11.include}" unless MacOS::CLT.installed? end + + def permit_weak_imports + remove "LDFLAGS", "-Wl,-no_weak_imports" + end end
true
Other
Homebrew
brew
9c7f24b84aea4ae1b465afa41445385ada4f2ffb.json
Add permit_weak_imports directive Issue Homebrew/homebrew-core#3727 suggested we set -no_weak_imports for new versions of Xcode to ensure that e.g. building on 10.11 against the 10.12 SDK doesn't result in a situation where autotools thinks symbols exist that don't actually exist on the current platform. Further disc...
Library/Homebrew/extend/os/mac/extend/ENV/super.rb
@@ -107,6 +107,10 @@ def set_x11_env_if_installed ENV.x11 = MacOS::X11.installed? end + def permit_weak_imports + remove "HOMEBREW_CCCFG", "w" + end + # These methods are no longer necessary under superenv, but are needed to # maintain an interface compatible with stdenv. alias_method :macosxsdk...
true
Other
Homebrew
brew
e7c44c90c3fc187e86c6f76296109ecab465bddf.json
Brew-Test-Bot.md: fix broken link
share/doc/homebrew/Brew-Test-Bot.md
@@ -4,7 +4,7 @@ by [our Kickstarter in 2013](https://www.kickstarter.com/projects/homebrew/brew- It comprises of four Mac Minis running in a data centre in England which host [a Jenkins instance at http://bot.brew.sh](http://bot.brew.sh) and run the -[`brew-test-bot.rb`](https://github.com/Homebrew/brew/blob/master...
false
Other
Homebrew
brew
3774b4641f4b001ae651c80e040b3b9959640b78.json
test/Gemfile.lock: remove json pin.
Library/Homebrew/test/Gemfile.lock
@@ -35,11 +35,10 @@ PLATFORMS DEPENDENCIES coveralls (= 0.8.14) - json (~> 1.8) minitest (~> 5.3) mocha (~> 1.1) rake (~> 10.3) simplecov (= 0.12.0)! BUNDLED WITH - 1.11.2 + 1.12.5
false
Other
Homebrew
brew
823505a0584f5b114ebb29b3d66c5a1ca5ed399b.json
Fix minor issues in command help text formatting - Inconsistent or unneeded indentation - Missing or superfluous empty lines - Missing or wrongly formatted arguments in command summary - Missing punctuation
Library/Homebrew/cmd/audit.rb
@@ -9,11 +9,11 @@ #: #: If `--online` is passed, additional slower checks that require a network #: connection are run. -# +#: #: If `--new-formula` is passed, various additional checks are run that check #: if a new formula is eligable for Homebrew. This should be used when creating #: new formula...
true
Other
Homebrew
brew
823505a0584f5b114ebb29b3d66c5a1ca5ed399b.json
Fix minor issues in command help text formatting - Inconsistent or unneeded indentation - Missing or superfluous empty lines - Missing or wrongly formatted arguments in command summary - Missing punctuation
Library/Homebrew/cmd/gist-logs.rb
@@ -1,13 +1,13 @@ #: * `gist-logs` [`--new-issue`|`-n`] <formula>: -#: Upload logs for a failed build of <formula> to a new Gist. +#: Upload logs for a failed build of <formula> to a new Gist. #: -#: <formula> is usually the name of the formula to install, but it can be specified -#: in several differ...
true
Other
Homebrew
brew
823505a0584f5b114ebb29b3d66c5a1ca5ed399b.json
Fix minor issues in command help text formatting - Inconsistent or unneeded indentation - Missing or superfluous empty lines - Missing or wrongly formatted arguments in command summary - Missing punctuation
Library/Homebrew/cmd/list.rb
@@ -1,8 +1,7 @@ #: * `list`, `ls` [`--full-name`]: -#: List all installed formulae. If `--full-name` is passed, print formulae with -#: fully-qualified names. -#: If `--full-name` is not passed any other options (e.g. `-t`) are passed to -#: `ls` which produces the actual output. +#: List all installed...
true
Other
Homebrew
brew
823505a0584f5b114ebb29b3d66c5a1ca5ed399b.json
Fix minor issues in command help text formatting - Inconsistent or unneeded indentation - Missing or superfluous empty lines - Missing or wrongly formatted arguments in command summary - Missing punctuation
Library/Homebrew/cmd/log.rb
@@ -1,4 +1,4 @@ -#: * `log` [`git-log-options`] <formula> ...: +#: * `log` [<git-log-options>] <formula> ...: #: Show the git log for the given formulae. Options that `git-log`(1) #: recognizes can be passed before the formula list.
true
Other
Homebrew
brew
823505a0584f5b114ebb29b3d66c5a1ca5ed399b.json
Fix minor issues in command help text formatting - Inconsistent or unneeded indentation - Missing or superfluous empty lines - Missing or wrongly formatted arguments in command summary - Missing punctuation
Library/Homebrew/cmd/missing.rb
@@ -1,7 +1,6 @@ #: * `missing` [<formulae>]: -#: Check the given <formulae> for missing dependencies. -#: -#: If no <formulae> are given, check all installed brews. +#: Check the given <formulae> for missing dependencies. If no <formulae> are +#: given, check all installed brews. require "formula" req...
true
Other
Homebrew
brew
823505a0584f5b114ebb29b3d66c5a1ca5ed399b.json
Fix minor issues in command help text formatting - Inconsistent or unneeded indentation - Missing or superfluous empty lines - Missing or wrongly formatted arguments in command summary - Missing punctuation
Library/Homebrew/cmd/reinstall.rb
@@ -1,5 +1,5 @@ #: * `reinstall` <formula>: -#: Uninstall then install <formula> +#: Uninstall and then install <formula>. require "formula_installer" require "development_tools"
true
Other
Homebrew
brew
823505a0584f5b114ebb29b3d66c5a1ca5ed399b.json
Fix minor issues in command help text formatting - Inconsistent or unneeded indentation - Missing or superfluous empty lines - Missing or wrongly formatted arguments in command summary - Missing punctuation
Library/Homebrew/cmd/update.sh
@@ -1,11 +1,12 @@ -#: * `update` [`--merge`]: +#: * `update` [`--merge`] [`--force`]: #: Fetch the newest version of Homebrew and all formulae from GitHub using -#: `git`(1). +#: `git`(1). #: #: If `--merge` is specified then `git merge` is used to include updates -#: (rather than `git rebase`). ...
true
Other
Homebrew
brew
823505a0584f5b114ebb29b3d66c5a1ca5ed399b.json
Fix minor issues in command help text formatting - Inconsistent or unneeded indentation - Missing or superfluous empty lines - Missing or wrongly formatted arguments in command summary - Missing punctuation
Library/Homebrew/dev-cmd/bump-formula-pr.rb
@@ -1,6 +1,5 @@ #: * `bump-formula-pr` [`--devel`] [`--dry-run`] `--url=`<url> `--sha256=`<sha-256> <formula>: #: * `bump-formula-pr` [`--devel`] [`--dry-run`] `--tag=`<tag> `--revision=`<revision> <formula>: -#: #: Creates a pull request to update the formula with a new url or a new tag. #: #: If a <url> ...
true
Other
Homebrew
brew
823505a0584f5b114ebb29b3d66c5a1ca5ed399b.json
Fix minor issues in command help text formatting - Inconsistent or unneeded indentation - Missing or superfluous empty lines - Missing or wrongly formatted arguments in command summary - Missing punctuation
share/doc/homebrew/brew.1.html
@@ -48,11 +48,13 @@ <h2 id="COMMANDS">COMMANDS</h2> style checks.</p> <p>If <code>--online</code> is passed, additional slower checks that require a network -connection are run. -If <code>--new-formula</code> is passed, various additional checks are run that check +connection are run.</p> + +<p>If <code>--new-formu...
true
Other
Homebrew
brew
823505a0584f5b114ebb29b3d66c5a1ca5ed399b.json
Fix minor issues in command help text formatting - Inconsistent or unneeded indentation - Missing or superfluous empty lines - Missing or wrongly formatted arguments in command summary - Missing punctuation
share/man/man1/brew.1
@@ -66,7 +66,13 @@ If no \fIformulae\fR are provided, all of them are checked\. If \fB\-\-strict\fR is passed, additional checks are run, including RuboCop style checks\. . .IP -If \fB\-\-online\fR is passed, additional slower checks that require a network connection are run\. If \fB\-\-new\-formula\fR is passed, va...
true
Other
Homebrew
brew
560918356738ee71aa7e7110d0e8aa6c8b3dbe4f.json
superenv: add LDFLAGS if disabling weak imports.
Library/Homebrew/extend/os/mac/extend/ENV/super.rb
@@ -81,6 +81,10 @@ def determine_cccfg s << "s" if MacOS.version >= :mountain_lion # Fix issue with >= 10.8 apr-1-config having broken paths s << "a" if MacOS.version >= :mountain_lion + # Xcode 8 should be told to fail to link against weak links + # Issue from Apple engineer: + # https://github...
true
Other
Homebrew
brew
560918356738ee71aa7e7110d0e8aa6c8b3dbe4f.json
superenv: add LDFLAGS if disabling weak imports.
Library/Homebrew/shims/super/cc
@@ -258,8 +258,10 @@ class Cmd case mode when :ld args << "-headerpad_max_install_names" + args << "-no_weak_imports" if no_weak_imports? when :ccld, :cxxld args << "-Wl,-headerpad_max_install_names" + args << "-Wl,-no_weak_imports" if no_weak_imports? end args end @@...
true
Other
Homebrew
brew
53d1000739bc29913ab956cff2748428b66f969d.json
ENV/std: add LDFLAGS if disabling weak imports.
Library/Homebrew/extend/os/mac/extend/ENV/std.rb
@@ -28,6 +28,11 @@ def setup_build_environment(formula = nil) # depend on it already being installed to build itself. ld64 if Formula["ld64"].installed? end + + # Xcode 8 should be told to fail to link against weak links + # Issue from Apple engineer: + # https://github.com/Homebrew/homebrew...
false
Other
Homebrew
brew
b33fe79478992da827317111370ab15d280e72c5.json
mac/ENV/shared: add check for disabling weak imports.
Library/Homebrew/extend/os/mac/extend/ENV/shared.rb
@@ -1,2 +1,6 @@ module SharedEnvExtension + def no_weak_imports? + return false unless compiler == :clang + MacOS::Xcode.version >= "8.0" || MacOS::CLT.version >= "8.0" + end end
false
Other
Homebrew
brew
74d4479246778ff73756fce2208ef04f2c45aafb.json
Add OS X-specific SharedEnvExtension.
Library/Homebrew/extend/ENV/shared.rb
@@ -329,3 +329,5 @@ def gcc_with_cxx11_support?(cc) version && Version.create(version) >= Version.create("4.8") end end + +require "extend/os/extend/ENV/shared"
true
Other
Homebrew
brew
74d4479246778ff73756fce2208ef04f2c45aafb.json
Add OS X-specific SharedEnvExtension.
Library/Homebrew/extend/os/extend/ENV/shared.rb
@@ -0,0 +1,5 @@ +require "extend/ENV/shared" + +if OS.mac? + require "extend/os/mac/extend/ENV/shared" +end
true
Other
Homebrew
brew
74d4479246778ff73756fce2208ef04f2c45aafb.json
Add OS X-specific SharedEnvExtension.
Library/Homebrew/extend/os/mac/extend/ENV/shared.rb
@@ -0,0 +1,2 @@ +module SharedEnvExtension +end
true
Other
Homebrew
brew
c6151951d6b685936adb8819db3957b12c95f5c9.json
cmd/postinstall: use Sandbox.formula? method.
Library/Homebrew/cmd/postinstall.rb
@@ -21,12 +21,10 @@ def run_post_install(formula) args << "--devel" end - if Sandbox.available? && ARGV.sandbox? - Sandbox.print_sandbox_message - end + Sandbox.print_sandbox_message if Sandbox.formula?(formula) Utils.safe_fork do - if Sandbox.available? && ARGV.sandbox? + i...
false
Other
Homebrew
brew
6375adc0ff00073740b49973aacfe81d4cd1099e.json
formula_installer: use Sandbox.formula? method.
Library/Homebrew/formula_installer.rb
@@ -588,15 +588,13 @@ def build #{formula.path} ].concat(build_argv) - if Sandbox.available? && ARGV.sandbox? - Sandbox.print_sandbox_message - end + Sandbox.print_sandbox_message if Sandbox.formula?(formula) Utils.safe_fork do # Invalidate the current sudo timestamp in case a ...
false
Other
Homebrew
brew
6e887fbf5ac5bc1fb551a3e4222ad1804b490def.json
sandbox: add formula? method and sandbox core. Add a new `Sandbox.formula?` method to see if a given formula should be sandboxed. Use the formula to check its tap against a list of pre-approved taps where we know every formula builds under the sandbox (currently just homebrew/core).
Library/Homebrew/sandbox.rb
@@ -3,11 +3,19 @@ class Sandbox SANDBOX_EXEC = "/usr/bin/sandbox-exec".freeze + SANDBOXED_TAPS = [ + "homebrew/core", + ].freeze def self.available? OS.mac? && File.executable?(SANDBOX_EXEC) end + def self.formula?(formula) + return false unless available? + ARGV.sandbox? || SANDBOXED_T...
true
Other
Homebrew
brew
6e887fbf5ac5bc1fb551a3e4222ad1804b490def.json
sandbox: add formula? method and sandbox core. Add a new `Sandbox.formula?` method to see if a given formula should be sandboxed. Use the formula to check its tap against a list of pre-approved taps where we know every formula builds under the sandbox (currently just homebrew/core).
Library/Homebrew/test/test_sandbox.rb
@@ -13,6 +13,22 @@ def teardown @dir.rmtree end + def test_formula? + f = formula { url "foo-1.0" } + f2 = formula { url "bar-1.0" } + f2.stubs(:tap).returns(Tap.fetch("test/tap")) + + ARGV.stubs(:sandbox?).returns true + assert Sandbox.formula?(f), + "Formulae should be sandboxed if --sa...
true
Other
Homebrew
brew
fed96385acc2ee10909870997950f2e48a86026f.json
sandbox: add test? method. Simplify checking if we’re going to sandbox a test with `Sandbox.test?`.
Library/Homebrew/sandbox.rb
@@ -8,6 +8,11 @@ def self.available? OS.mac? && File.executable?(SANDBOX_EXEC) end + def self.test? + return false unless available? + !ARGV.no_sandbox? + end + def self.print_sandbox_message unless @printed_sandbox_message ohai "Using the sandbox"
true
Other
Homebrew
brew
fed96385acc2ee10909870997950f2e48a86026f.json
sandbox: add test? method. Simplify checking if we’re going to sandbox a test with `Sandbox.test?`.
Library/Homebrew/test/test_sandbox.rb
@@ -13,6 +13,12 @@ def teardown @dir.rmtree end + def test_test? + ARGV.stubs(:no_sandbox?).returns false + assert Sandbox.test?, + "Tests should be sandboxed unless --no-sandbox was passed." + end + def test_allow_write @sandbox.allow_write @file @sandbox.exec "touch", @file
true
Other
Homebrew
brew
b40b072ed8486f91f3951bdd19bea3f04af3e75b.json
tab: fix Tab.for_formula versions (#687) versions should be initialized even if formula is not installed
Library/Homebrew/tab.rb
@@ -138,6 +138,11 @@ def self.for_formula(f) "path" => f.path.to_s, "tap" => f.tap ? f.tap.name : f.tap, "spec" => f.active_spec_sym.to_s, + "versions" => { + "stable" => f.stable ? f.stable.version.to_s : nil, + "devel" => f.devel ? f.devel.version.to_s : nil, + ...
false
Other
Homebrew
brew
13dcdb3098d6c1089db937d5c122cf06a0631ac4.json
test_gpg2_requirement: add satisfied test
Library/Homebrew/test/test_gpg2_requirement.rb
@@ -0,0 +1,24 @@ +require "testing_env" +require "requirements/gpg2_requirement" +require "fileutils" + +class GPG2RequirementTests < Homebrew::TestCase + def setup + @dir = Pathname.new(mktmpdir) + (@dir/"bin/gpg").write <<-EOS.undent + #!/bin/bash + echo 2.0.30 + EOS + FileUtils.chmod 0755, @di...
false
Other
Homebrew
brew
15916338888e48e70edc4ade7f0aff94e3607e76.json
gpg_requirement: add standalone requirement GPG 1.x has stopped receiving new features, some of which we may well want to take advantage of sooner or later in Homebrew. Upstream has also been attempting to work out for a while how well used it still is which suggests it may "go away" at some point in the future. Debi...
Library/Homebrew/requirements.rb
@@ -1,6 +1,7 @@ require "requirement" require "requirements/apr_requirement" require "requirements/fortran_requirement" +require "requirements/gpg_requirement" require "requirements/language_module_requirement" require "requirements/minimum_macos_requirement" require "requirements/maximum_macos_requirement"
true