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
9c8f7138f35625878e017559c896441fda6f357c.json
Add `casks` method to iterate through arguments.
Library/Homebrew/test/cask/cli/cat_spec.rb
@@ -34,9 +34,9 @@ end it "raises an exception when the Cask does not exist" do - expect { - Hbc::CLI::Cat.run("notacask") - }.to raise_error(Hbc::CaskUnavailableError) + expect { Hbc::CLI::Cat.run("notacask") } + .to output(/is unavailable/).to_stderr + .and raise_error(Hbc::CaskError, "Cat incomplete.") end describe "when no Cask is specified" do
true
Other
Homebrew
brew
9c8f7138f35625878e017559c896441fda6f357c.json
Add `casks` method to iterate through arguments.
Library/Homebrew/test/cask/cli/fetch_spec.rb
@@ -54,7 +54,7 @@ shutup do Hbc::CLI::Fetch.run("notacask") end - }.to raise_error(Hbc::CaskUnavailableError) + }.to raise_error(Hbc::CaskError, "Fetch incomplete.") end describe "when no Cask is specified" do
true
Other
Homebrew
brew
9c8f7138f35625878e017559c896441fda6f357c.json
Add `casks` method to iterate through arguments.
Library/Homebrew/test/cask/cli/install_spec.rb
@@ -70,7 +70,7 @@ shutup do Hbc::CLI::Install.run("notacask") end - }.to raise_error(Hbc::CaskError) + }.to raise_error(Hbc::CaskError, "Install incomplete.") end it "returns a suggestion for a misspelled Cask" do @@ -80,7 +80,7 @@ rescue Hbc::CaskError nil end - }.to output(/Cask 'localcaffeine' is unavailable\. Did you mean:\nlocal-caffeine/).to_stderr + }.to output(/Cask 'localcaffeine' is unavailable: No Cask with this name exists\. Did you mean:\nlocal-caffeine/).to_stderr end it "returns multiple suggestions for a Cask fragment" do @@ -90,7 +90,7 @@ rescue Hbc::CaskError nil end - }.to output(/Cask 'local-caf' is unavailable\. Did you mean one of:\nlocal-caffeine/).to_stderr + }.to output(/Cask 'local-caf' is unavailable: No Cask with this name exists\. Did you mean one of:\nlocal-caffeine/).to_stderr end describe "when no Cask is specified" do
true
Other
Homebrew
brew
9c8f7138f35625878e017559c896441fda6f357c.json
Add `casks` method to iterate through arguments.
Library/Homebrew/test/cask/cli/style_spec.rb
@@ -107,7 +107,7 @@ end it "tries to find paths for all tokens" do - expect(Hbc::CaskLoader).to receive(:path).twice + expect(Hbc::CaskLoader).to receive(:load).twice.and_return(double("cask", sourcefile_path: nil)) subject end end
true
Other
Homebrew
brew
9c8f7138f35625878e017559c896441fda6f357c.json
Add `casks` method to iterate through arguments.
Library/Homebrew/test/cask/cli/uninstall_spec.rb
@@ -17,15 +17,15 @@ end it "shows an error when a bad Cask is provided" do - expect { - Hbc::CLI::Uninstall.run("notacask") - }.to raise_error(Hbc::CaskUnavailableError) + expect { Hbc::CLI::Uninstall.run("notacask") } + .to output(/is unavailable/).to_stderr + .and raise_error(Hbc::CaskError, "Uninstall incomplete.") end it "shows an error when a Cask is provided that's not installed" do - expect { - Hbc::CLI::Uninstall.run("local-caffeine") - }.to raise_error(Hbc::CaskNotInstalledError) + expect { Hbc::CLI::Uninstall.run("local-caffeine") } + .to output(/is not installed/).to_stderr + .and raise_error(Hbc::CaskError, "Uninstall incomplete.") end it "tries anyway on a non-present Cask when --force is given" do @@ -89,11 +89,9 @@ Hbc.appdir.join("MyFancyApp.app").rmtree - expect { - shutup do - Hbc::CLI::Uninstall.run("with-uninstall-script-app") - end - }.to raise_error(Hbc::CaskError, /does not exist/) + expect { shutup { Hbc::CLI::Uninstall.run("with-uninstall-script-app") } } + .to output(/does not exist/).to_stderr + .and raise_error(Hbc::CaskError, "Uninstall incomplete.") expect(cask).to be_installed
true
Other
Homebrew
brew
9c8f7138f35625878e017559c896441fda6f357c.json
Add `casks` method to iterate through arguments.
Library/Homebrew/test/cask/cli/zap_spec.rb
@@ -1,8 +1,8 @@ describe Hbc::CLI::Zap, :cask do it "shows an error when a bad Cask is provided" do - expect { - Hbc::CLI::Zap.run("notacask") - }.to raise_error(Hbc::CaskUnavailableError) + expect { Hbc::CLI::Zap.run("notacask") } + .to output(/is unavailable/).to_stderr + .and raise_error(Hbc::CaskError, "Zap incomplete.") end it "can zap and unlink multiple Casks at once" do
true
Other
Homebrew
brew
4af1d2265b4ed8ca3bdd98c52ccdb17c4fa9eb7d.json
Add symlink for High Sierra test bottle.
Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.high_sierra.bottle.tar.gz
@@ -0,0 +1 @@ +testball_bottle-0.1.yosemite.bottle.tar.gz \ No newline at end of file
false
Other
Homebrew
brew
134da5b8c266d0e5f07a1f79bff233f372c7ef30.json
Add methods in FormulaCop to find block nodes
Library/Homebrew/rubocops/extend/formula_cop.rb
@@ -167,12 +167,18 @@ def find_block(node, block_name) nil end - # Returns an array of block nodes named block_name inside node + # Returns an array of block nodes of depth first order named block_name below node def find_blocks(node, block_name) return if node.nil? node.each_child_node(:block).select { |block_node| block_name == block_node.method_name } end + # Returns an array of block nodes of any depth below node in AST + def find_all_blocks(node, block_name) + return if node.nil? + node.each_descendant(:block).select { |block_node| block_name == block_node.method_name} + end + # Returns a method definition node with method_name def find_method_def(node, method_name) return if node.nil? @@ -250,7 +256,7 @@ def caveats_strings # Returns the array of arguments of the method_node def parameters(method_node) - return unless method_node.send_type? + return unless method_node.send_type? || method_node.block_type? method_node.method_args end
false
Other
Homebrew
brew
c572081f8b56f3be24f24e85497ae780a25cbcba.json
formula_desc_cop: tweak some rules. Allow some specific lowercase words and provide an autocorrect for some of these rules.
Library/Homebrew/rubocops/formula_desc_cop.rb
@@ -8,44 +8,88 @@ module FormulaAuditStrict # # - Checks for existence of `desc` # - Checks if size of `desc` > 80 - # - Checks if `desc` begins with an article - # - Checks for correct usage of `command-line` in `desc` - # - Checks if `desc` contains the formula name - class Desc < FormulaCop + class DescLength < FormulaCop def audit_formula(_node, _class_node, _parent_class_node, body) desc_call = find_node_method_by_name(body, :desc) + # Check if a formula's desc is present if desc_call.nil? problem "Formula should have a desc (Description)." return end + # Check if a formula's desc is too long desc = parameters(desc_call).first desc_length = "#{@formula_name}: #{string_content(desc)}".length max_desc_length = 80 - if desc_length > max_desc_length - problem <<-EOS.undent - Description is too long. "name: desc" should be less than #{max_desc_length} characters. - Length is calculated as #{@formula_name} + desc. (currently #{desc_length}) - EOS - end + return if desc_length <= max_desc_length + problem <<-EOS.undent + Description is too long. "name: desc" should be less than #{max_desc_length} characters. + Length is calculated as #{@formula_name} + desc. (currently #{desc_length}) + EOS + end + end + + # This cop audits `desc` in Formulae + # + # - Checks if `desc` begins with an article + # - Checks for correct usage of `command-line` in `desc` + # - Checks description starts with a capital letter + # - Checks if `desc` contains the formula name + class Desc < FormulaCop + VALID_LOWERCASE_WORDS = %w[ + iOS + macOS + xUnit + ].freeze + + def audit_formula(_node, _class_node, _parent_class_node, body) + desc_call = find_node_method_by_name(body, :desc) + return if desc_call.nil? + + desc = parameters(desc_call).first # Check if command-line is wrongly used in formula's desc if match = regex_match_group(desc, /(command ?line)/i) c = match.to_s.chars.first problem "Description should use \"#{c}ommand-line\" instead of \"#{match}\"" end + # Check if a/an are used in a formula's desc if match = regex_match_group(desc, /^(an?)\s/i) - problem "Description shouldn't start with an indefinite article (#{match})" + problem "Description shouldn't start with an indefinite article i.e. \"#{match.to_s.strip}\"" end - if regex_match_group(desc, /^[a-z]/) + # Check if invalid uppercase words are at the start of a + # formula's desc + if !VALID_LOWERCASE_WORDS.include?(string_content(desc).split.first) && + regex_match_group(desc, /^[a-z]/) problem "Description should start with a capital letter" end # Check if formula's name is used in formula's desc - problem "Description shouldn't include the formula name" if regex_match_group(desc, /^#{@formula_name}\b/i) + return unless regex_match_group(desc, /(^|[^a-z])#{@formula_name}([^a-z]|$)/i) + problem "Description shouldn't include the formula name" + end + + private + + def autocorrect(node) + lambda do |corrector| + correction = node.source + first_word = string_content(node).split.first + unless VALID_LOWERCASE_WORDS.include?(first_word) + first_char = first_word.to_s.chars.first + correction.sub!(/^(['"]?)([a-z])/, "\\1#{first_char.upcase}") + end + correction.sub!(/^(['"]?)an?\s/i, "\\1") + correction.gsub!(/(ommand ?line)/i, "ommand-line") + correction.gsub!(/(^|[^a-z])#{@formula_name}([^a-z]|$)/i, "\\1\\2") + correction.gsub!(/^(['"]?)\s+/, "\\1") + correction.gsub!(/\s+(['"]?)$/, "\\1") + corrector.insert_before(node.source_range, correction) + corrector.remove(node.source_range) + end end end end
true
Other
Homebrew
brew
c572081f8b56f3be24f24e85497ae780a25cbcba.json
formula_desc_cop: tweak some rules. Allow some specific lowercase words and provide an autocorrect for some of these rules.
Library/Homebrew/test/rubocops/formula_desc_cop_spec.rb
@@ -3,7 +3,7 @@ require_relative "../../extend/string" require_relative "../../rubocops/formula_desc_cop" -describe RuboCop::Cop::FormulaAuditStrict::Desc do +describe RuboCop::Cop::FormulaAuditStrict::DescLength do subject(:cop) { described_class.new } context "When auditing formula desc" do @@ -31,7 +31,7 @@ class Foo < Formula source = <<-EOS.undent class Foo < Formula url 'http://example.com/foo-1.0.tgz' - desc '#{"bar" * 30}' + desc 'Bar#{"bar" * 29}' end EOS @@ -55,7 +55,7 @@ class Foo < Formula source = <<-EOS.undent class Foo < Formula url 'http://example.com/foo-1.0.tgz' - desc '#{"bar" * 10}'\ + desc 'Bar#{"bar" * 9}'\ '#{"foo" * 21}' end EOS @@ -75,7 +75,13 @@ class Foo < Formula expect_offense(expected, actual) end end + end +end +describe RuboCop::Cop::FormulaAuditStrict::Desc do + subject(:cop) { described_class.new } + + context "When auditing formula desc" do it "When wrong \"command-line\" usage in desc" do source = <<-EOS.undent class Foo < Formula @@ -104,7 +110,27 @@ class Foo < Formula end EOS - expected_offenses = [{ message: "Description shouldn't start with an indefinite article (An )", + expected_offenses = [{ message: "Description shouldn't start with an indefinite article i.e. \"An\"", + severity: :convention, + line: 3, + column: 8, + source: source }] + + inspect_source(cop, source) + expected_offenses.zip(cop.offenses).each do |expected, actual| + expect_offense(expected, actual) + end + end + + it "When an lowercase letter starts a desc" do + source = <<-EOS.undent + class Foo < Formula + url 'http://example.com/foo-1.0.tgz' + desc 'bar' + end + EOS + + expected_offenses = [{ message: "Description should start with a capital letter", severity: :convention, line: 3, column: 8, @@ -136,11 +162,22 @@ class Foo < Formula end end - def expect_offense(expected, actual) - expect(actual.message).to eq(expected[:message]) - expect(actual.severity).to eq(expected[:severity]) - expect(actual.line).to eq(expected[:line]) - expect(actual.column).to eq(expected[:column]) + it "autocorrects all rules" do + source = <<-EOS.undent + class Foo < Formula + url 'http://example.com/foo-1.0.tgz' + desc ' an bar: commandline foo ' + end + EOS + correct_source = <<-EOS.undent + class Foo < Formula + url 'http://example.com/foo-1.0.tgz' + desc 'an bar: command-line' + end + EOS + + corrected_source = autocorrect_source(cop, source) + expect(corrected_source).to eq(correct_source) end end end
true
Other
Homebrew
brew
c572081f8b56f3be24f24e85497ae780a25cbcba.json
formula_desc_cop: tweak some rules. Allow some specific lowercase words and provide an autocorrect for some of these rules.
Library/Homebrew/test/spec_helper.rb
@@ -23,6 +23,7 @@ require "test/support/helper/fixtures" require "test/support/helper/formula" require "test/support/helper/mktmpdir" +require "test/support/helper/rubocop" require "test/support/helper/spec/shared_context/homebrew_cask" if OS.mac? require "test/support/helper/spec/shared_context/integration_test" @@ -44,6 +45,7 @@ config.include(Test::Helper::Fixtures) config.include(Test::Helper::Formula) config.include(Test::Helper::MkTmpDir) + config.include(Test::Helper::RuboCop) config.before(:each, :needs_compat) do skip "Requires compatibility layer." if ENV["HOMEBREW_NO_COMPAT"]
true
Other
Homebrew
brew
c572081f8b56f3be24f24e85497ae780a25cbcba.json
formula_desc_cop: tweak some rules. Allow some specific lowercase words and provide an autocorrect for some of these rules.
Library/Homebrew/test/support/helper/rubocop.rb
@@ -0,0 +1,13 @@ +module Test + module Helper + module RuboCop + def expect_offense(expected, actual) + expect(actual).to_not be_nil + expect(actual.message).to eq(expected[:message]) + expect(actual.severity).to eq(expected[:severity]) + expect(actual.line).to eq(expected[:line]) + expect(actual.column).to eq(expected[:column]) + end + end + end +end
true
Other
Homebrew
brew
5367f1b408bf3077044bd8f6aab5a8db7647c493.json
analytics: remove unused analytics. We didn't end up using the `screenview` and `exception` analytics as much as expected so let's remove them and focus on stuff that's formula-specific.
Library/Homebrew/brew.rb
@@ -134,25 +134,22 @@ def require?(path) $stderr.puts # seemingly a newline is typical exit 130 rescue BuildError => e - Utils::Analytics.report_exception(e) + Utils::Analytics.report_build_error(e) e.dump exit 1 rescue RuntimeError, SystemCallError => e - Utils::Analytics.report_exception(e) raise if e.message.empty? onoe e $stderr.puts e.backtrace if ARGV.debug? exit 1 rescue MethodDeprecatedError => e - Utils::Analytics.report_exception(e) onoe e if e.issues_url $stderr.puts "If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):" $stderr.puts " #{Formatter.url(e.issues_url)}" end exit 1 rescue Exception => e - Utils::Analytics.report_exception(e) onoe e if internal_cmd && defined?(OS::ISSUES_URL) $stderr.puts "#{Tty.bold}Please report this bug:#{Tty.reset}"
true
Other
Homebrew
brew
5367f1b408bf3077044bd8f6aab5a8db7647c493.json
analytics: remove unused analytics. We didn't end up using the `screenview` and `exception` analytics as much as expected so let's remove them and focus on stuff that's formula-specific.
Library/Homebrew/brew.sh
@@ -278,7 +278,6 @@ fi # shellcheck source=/dev/null source "$HOMEBREW_LIBRARY/Homebrew/utils/analytics.sh" setup-analytics -report-analytics-screenview-command # Let user know we're still updating Homebrew if brew update --preinstall # exceeds 3 seconds.
true
Other
Homebrew
brew
5367f1b408bf3077044bd8f6aab5a8db7647c493.json
analytics: remove unused analytics. We didn't end up using the `screenview` and `exception` analytics as much as expected so let's remove them and focus on stuff that's formula-specific.
Library/Homebrew/formula_installer.rb
@@ -271,14 +271,11 @@ def install oh1 "Installing #{Formatter.identifier(formula.full_name)} #{options.join " "}" if show_header? if formula.tap && !formula.tap.private? - category = "install" action = ([formula.full_name] + options).join(" ") - Utils::Analytics.report_event(category, action) + Utils::Analytics.report_event("install", action) if installed_on_request - category = "install_on_request" - action = ([formula.full_name] + options).join(" ") - Utils::Analytics.report_event(category, action) + Utils::Analytics.report_event("install_on_request", action) end end
true
Other
Homebrew
brew
5367f1b408bf3077044bd8f6aab5a8db7647c493.json
analytics: remove unused analytics. We didn't end up using the `screenview` and `exception` analytics as much as expected so let's remove them and focus on stuff that's formula-specific.
Library/Homebrew/utils/analytics.rb
@@ -61,22 +61,11 @@ def report_event(category, action, label = os_prefix_ci, value = nil) ev: value) end - def report_exception(exception, options = {}) - if exception.is_a?(BuildError) && - exception.formula.tap && - exception.formula.tap.installed? && - !exception.formula.tap.private? - report_event("BuildError", exception.formula.full_name) - end - - fatal = options.fetch(:fatal, true) ? "1" : "0" - report(:exception, - exd: exception.class.name, - exf: fatal) - end - - def report_screenview(screen_name) - report(:screenview, cd: screen_name) + def report_build_error(exception) + return unless exception.formula.tap + return unless exception.formula.tap.installed? + return if exception.formula.tap.private? + report_event("BuildError", exception.formula.full_name) end end end
true
Other
Homebrew
brew
5367f1b408bf3077044bd8f6aab5a8db7647c493.json
analytics: remove unused analytics. We didn't end up using the `screenview` and `exception` analytics as much as expected so let's remove them and focus on stuff that's formula-specific.
Library/Homebrew/utils/analytics.sh
@@ -66,56 +66,3 @@ setup-analytics() { export HOMEBREW_ANALYTICS_ID export HOMEBREW_ANALYTICS_USER_UUID } - -report-analytics-screenview-command() { - [[ -n "$HOMEBREW_NO_ANALYTICS" || -n "$HOMEBREW_NO_ANALYTICS_THIS_RUN" ]] && return - - # Don't report commands that are invoked as part of other commands. - [[ "$HOMEBREW_COMMAND_DEPTH" != 1 ]] && return - - # Don't report non-official commands. - if ! [[ "$HOMEBREW_COMMAND" = "bundle" || - "$HOMEBREW_COMMAND" = "services" || - -f "$HOMEBREW_LIBRARY/Homebrew/cmd/$HOMEBREW_COMMAND.rb" || - -f "$HOMEBREW_LIBRARY/Homebrew/cmd/$HOMEBREW_COMMAND.sh" || - -f "$HOMEBREW_LIBRARY/Homebrew/dev-cmd/$HOMEBREW_COMMAND.rb" || - -f "$HOMEBREW_LIBRARY/Homebrew/dev-cmd/$HOMEBREW_COMMAND.sh" ]] - then - return - fi - - # Don't report commands used mostly by our scripts and not users. - case "$HOMEBREW_COMMAND" in - --prefix|analytics|command|commands) - return - ;; - esac - - local args=( - --max-time 3 - --user-agent "$HOMEBREW_USER_AGENT_CURL" - --data v=1 - --data aip=1 - --data t=screenview - --data tid="$HOMEBREW_ANALYTICS_ID" - --data cid="$HOMEBREW_ANALYTICS_USER_UUID" - --data an="$HOMEBREW_PRODUCT" - --data av="$HOMEBREW_VERSION" - --data cd="$HOMEBREW_COMMAND" - ) - - # Send analytics. Don't send or store any personally identifiable information. - # http://docs.brew.sh/Analytics.html - # https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide#screenView - # https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters - if [[ -z "$HOMEBREW_ANALYTICS_DEBUG" ]] - then - "$HOMEBREW_CURL" https://www.google-analytics.com/collect \ - "${args[@]}" \ - --silent --output /dev/null &>/dev/null & disown - else - local url="https://www.google-analytics.com/debug/collect" - echo "$HOMEBREW_CURL $url ${args[*]}" - "$HOMEBREW_CURL" "$url" "${args[@]}" - fi -}
true
Other
Homebrew
brew
5367f1b408bf3077044bd8f6aab5a8db7647c493.json
analytics: remove unused analytics. We didn't end up using the `screenview` and `exception` analytics as much as expected so let's remove them and focus on stuff that's formula-specific.
docs/Analytics.md
@@ -18,14 +18,12 @@ Homebrew's analytics record some shared information for every event: - If the Google Analytics anonymous IP setting is enabled, i.e. `1` (https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#aip) - The Homebrew application name, e.g. `Homebrew` (https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#an) - The Homebrew application version, e.g. `0.9.9` (https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#av) -- The Homebrew analytics hit type, e.g. `screenview` (https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#t) +- The Homebrew analytics hit type, e.g. `event` (https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#t) Homebrew's analytics records the following different events: -- a `screenview` hit type with the official Homebrew command you have run (with arguments stripped), e.g. `brew list` (not `brew list foo` or any external commands except `bundle` and `services`) - an `event` hit type with the `install` event category and the Homebrew formula from a non-private GitHub tap you have requested to install plus any used options, e.g. `wget --with-pcre` as the action and an event label e.g. `macOS 10.12, non-/usr/local, CI` to indicate the OS version, non-standard installation location and invocation as part of CI. This allows us to identify the formulae that need fixing and where more easily. - an `event` hit type with the `BuildError` event category and the Homebrew formula that failed to install, e.g. `wget` as the action and an event label e.g. `macOS 10.12` -- an `exception` hit type with the `exception` event category and exception description of the exception name, e.g. `FormulaUnavailableError` and whether the exception was fatal e.g. `1` You can also view all the information that is sent by Homebrew's analytics by setting `HOMEBREW_ANALYTICS_DEBUG=1` in your environment. Please note this will also stop any analytics from being sent.
true
Other
Homebrew
brew
2cf2c020ba04f57ac9e77712df6a25525744715b.json
tty: handle non-tty stdin. When stdin is not a tty then the message `stty: stdin isn't a terminal` will be produced. Silence this message and fall back to `tput` when it fails and default to 80 if we get no results at all. Follow-up from #2714.
Library/Homebrew/utils/tty.rb
@@ -6,7 +6,10 @@ def strip_ansi(string) end def width - (`/bin/stty size`.split[1] || 80).to_i + width = `/bin/stty size 2>/dev/null`.split[1] + width ||= `/usr/bin/tput cols 2>/dev/null`.split[0] + width ||= 80 + width.to_i end def truncate(string)
false
Other
Homebrew
brew
bcdd919b84484b21d9608eba91844a1786533d2c.json
pkgconfig: add initial files for 10.13
Library/Homebrew/os/mac/pkgconfig/10.13/libcurl.pc
@@ -0,0 +1,39 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 2004 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at http://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### + +# This should most probably benefit from getting a "Requires:" field added +# dynamically by configure. +# +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include +supported_protocols="DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS LDAP LDAPS POP3 POP3S RTSP SMB SMBS SMTP SMTPS TELNET TFTP" +supported_features="AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz UnixSockets" + +Name: libcurl +URL: https://curl.haxx.se/ +Description: Library to transfer files with ftp, http, etc. +Version: 7.51.0 +Libs: -L${libdir} -lcurl +Libs.private: -lldap -lz +Cflags: -I${includedir}
true
Other
Homebrew
brew
bcdd919b84484b21d9608eba91844a1786533d2c.json
pkgconfig: add initial files for 10.13
Library/Homebrew/os/mac/pkgconfig/10.13/libexslt.pc
@@ -0,0 +1,12 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + + +Name: libexslt +Version: 0.8.17 +Description: EXSLT Extension library +Requires: libxml-2.0 +Libs: -L${libdir} -lexslt -lxslt -lxml2 -lz -lpthread -licucore -lm +Cflags: -I${includedir}
true
Other
Homebrew
brew
bcdd919b84484b21d9608eba91844a1786533d2c.json
pkgconfig: add initial files for 10.13
Library/Homebrew/os/mac/pkgconfig/10.13/libxml-2.0.pc
@@ -0,0 +1,13 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include +modules=1 + +Name: libXML +Version: 2.9.4 +Description: libXML library version2. +Requires: +Libs: -L${libdir} -lxml2 +Libs.private: -lz -lpthread -licucore -lm +Cflags: -I${includedir}/libxml2
true
Other
Homebrew
brew
bcdd919b84484b21d9608eba91844a1786533d2c.json
pkgconfig: add initial files for 10.13
Library/Homebrew/os/mac/pkgconfig/10.13/libxslt.pc
@@ -0,0 +1,12 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + + +Name: libxslt +Version: 1.1.29 +Description: XSLT library version 2. +Requires: libxml-2.0 +Libs: -L${libdir} -lxslt -lxml2 -lz -lpthread -licucore -lm +Cflags: -I${includedir}
true
Other
Homebrew
brew
bcdd919b84484b21d9608eba91844a1786533d2c.json
pkgconfig: add initial files for 10.13
Library/Homebrew/os/mac/pkgconfig/10.13/sqlite3.pc
@@ -0,0 +1,11 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: SQLite +Description: SQL database engine +Version: 3.18.0 +Libs: -L${libdir} -lsqlite3 +Libs.private: +Cflags: -I${includedir}
true
Other
Homebrew
brew
bcdd919b84484b21d9608eba91844a1786533d2c.json
pkgconfig: add initial files for 10.13
Library/Homebrew/os/mac/pkgconfig/10.13/zlib.pc
@@ -0,0 +1,13 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +sharedlibdir=${libdir} +includedir=${prefix}/include + +Name: zlib +Description: zlib compression library +Version: 1.2.8 + +Requires: +Libs: -L${libdir} -L${sharedlibdir} -lz +Cflags: -I${includedir}
true
Other
Homebrew
brew
08cee5a0d5dfb1bcdd71630a43b2218fc11142fe.json
os/mac/xcode: add CLT Clang for 10.13
Library/Homebrew/os/mac/xcode.rb
@@ -216,6 +216,7 @@ def latest_version # on the older supported platform for that Xcode release, i.e there's no # CLT package for 10.11 that contains the Clang version from Xcode 8. case MacOS.version + when "10.13" then "900.0.22.8" when "10.12" then "802.0.42" when "10.11" then "800.0.42.1" when "10.10" then "700.1.81"
false
Other
Homebrew
brew
b2995be4453e8d2d7367dac1d573258f2a59148f.json
README: add DigitalOcean logo.
README.md
@@ -67,6 +67,8 @@ Our Xserve ESXi boxes for CI are hosted by [MacStadium](https://www.macstadium.c Our Jenkins CI installation is hosted by [DigitalOcean](https://m.do.co/c/7e39c35d5581). +![DigitalOcean](https://cloud.githubusercontent.com/assets/125011/26827038/4b7b5ade-4ab3-11e7-811b-fed3ab0e934d.png) + Our bottles (binary packages) are hosted by [Bintray](https://bintray.com/homebrew). [![Downloads by Bintray](https://bintray.com/docs/images/downloads_by_bintray_96.png)](https://bintray.com/homebrew)
false
Other
Homebrew
brew
4f5643a67681f399dbabaeefb758a9c871ba513f.json
Fix undefined variable ruby_version
Library/Homebrew/extend/os/mac/diagnostic.rb
@@ -195,7 +195,8 @@ def check_for_other_package_managers end def check_ruby_version - return if RUBY_VERSION[/\d\.\d/] == "2.0" + ruby_version = "2.0" + return if RUBY_VERSION[/\d\.\d/] == ruby_version <<-EOS.undent Ruby version #{RUBY_VERSION} is unsupported on #{MacOS.version}. Homebrew
true
Other
Homebrew
brew
4f5643a67681f399dbabaeefb758a9c871ba513f.json
Fix undefined variable ruby_version
Library/Homebrew/test/os/mac/diagnostic_spec.rb
@@ -45,4 +45,18 @@ expect(subject.check_homebrew_prefix) .to match("Your Homebrew's prefix is not /usr/local.") end + + specify "#check_ruby_version" do + expected_string = <<-EXPECTED +Ruby version 2.3.3p222 is unsupported on 10.13. Homebrew +is developed and tested on Ruby 2.0, and may not work correctly +on other Rubies. Patches are accepted as long as they don't cause breakage +on supported Rubies. + EXPECTED + allow(MacOS).to receive(:version).and_return(OS::Mac::Version.new("10.13")) + stub_const("RUBY_VERSION", "2.3.3p222") + + expect(subject.check_ruby_version) + .to match(expected_string) + end end
true
Other
Homebrew
brew
a0ae0346547266a6c55bc470fb51840da9008fbc.json
os/mac: add Xcode 9.0 Beta recognition
Library/Homebrew/os/mac.rb
@@ -208,6 +208,7 @@ def preferred_arch "8.3.1" => { clang: "8.1", clang_build: 802 }, "8.3.2" => { clang: "8.1", clang_build: 802 }, "8.3.3" => { clang: "8.1", clang_build: 802 }, + "9.0" => { clang: "9.0", clang_build: 900 }, }.freeze def compilers_standard?
false
Other
Homebrew
brew
a88350425bbee7a610143911badaca933baad05e.json
os/mac/xcode: expect Xcode 8.3.3
Library/Homebrew/os/mac/xcode.rb
@@ -17,12 +17,12 @@ def latest_version when "10.9" then "6.2" when "10.10" then "7.2.1" when "10.11" then "8.2.1" - when "10.12" then "8.3.2" + when "10.12" then "8.3.3" else raise "macOS '#{MacOS.version}' is invalid" unless OS::Mac.prerelease? # Default to newest known version of Xcode for unreleased macOS versions. - "8.3.2" + "8.3.3" end end
false
Other
Homebrew
brew
251270e9a3311fccc1b6c56a74cb2cecdfffb4a2.json
Remove duplicates repo from Acceptable formula doc Duplicates repo is deprecated
docs/Acceptable-Formulae.md
@@ -40,9 +40,6 @@ There are exceptions: | openssl | macOS's openssl is deprecated & outdated | | libxml2 | Historically, macOS's libxml2 has been buggy | -We also maintain [a tap](https://github.com/Homebrew/homebrew-dupes) that -contains many duplicates not otherwise found in Homebrew. - ### We don’t like tools that upgrade themselves Software that can upgrade itself does not integrate well with Homebrew's own upgrade functionality.
false
Other
Homebrew
brew
5a9dad0bf0534ac4a9e16a57e6d2b17c96b2244a.json
mac/version: add High Sierra symbol
Library/Homebrew/os/mac/version.rb
@@ -4,6 +4,7 @@ module OS module Mac class Version < ::Version SYMBOLS = { + high_sierra: "10.13", sierra: "10.12", el_capitan: "10.11", yosemite: "10.10",
false
Other
Homebrew
brew
9e17e44b3e16c9eb8d3f9e6baf8a92353fc8bd67.json
Change manpage internal links in correct location.
Library/Homebrew/cmd/gist-logs.rb
@@ -2,7 +2,7 @@ #: 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 different ways. See [SPECIFYING FORMULAE][]. +#: in several different ways. See [SPECIFYING FORMULAE](#specifying-formulae). #: #: If `--new-issue` is passed, automatically create a new issue in the appropriate #: GitHub repository as well as creating the Gist.
true
Other
Homebrew
brew
9e17e44b3e16c9eb8d3f9e6baf8a92353fc8bd67.json
Change manpage internal links in correct location.
Library/Homebrew/cmd/install.rb
@@ -2,7 +2,7 @@ #: Install <formula>. #: #: <formula> is usually the name of the formula to install, but it can be specified -#: in several different ways. See [SPECIFYING FORMULAE][]. +#: in several different ways. See [SPECIFYING FORMULAE](#specifying-formulae). #: #: If `--debug` (or `-d`) is passed and brewing fails, open an interactive debugging #: session with access to IRB or a shell inside the temporary build directory.
true
Other
Homebrew
brew
9e17e44b3e16c9eb8d3f9e6baf8a92353fc8bd67.json
Change manpage internal links in correct location.
Library/Homebrew/manpages/brew.1.md.erb
@@ -24,7 +24,7 @@ didn't include with macOS. ## ESSENTIAL COMMANDS -For the full command list, see the [COMMANDS][] section. +For the full command list, see the [COMMANDS](#commands) section. With `--verbose` or `-v`, many commands print extra debugging information. Note that these flags should only appear after a command.
true
Other
Homebrew
brew
9e17e44b3e16c9eb8d3f9e6baf8a92353fc8bd67.json
Change manpage internal links in correct location.
manpages/brew-cask.1
@@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BREW\-CASK" "1" "May 2017" "Homebrew" "brew-cask" +.TH "BREW\-CASK" "1" "June 2017" "Homebrew" "brew-cask" . .SH "NAME" \fBbrew\-cask\fR \- a friendly binary installer for macOS
true
Other
Homebrew
brew
9e17e44b3e16c9eb8d3f9e6baf8a92353fc8bd67.json
Change manpage internal links in correct location.
manpages/brew.1
@@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BREW" "1" "May 2017" "Homebrew" "brew" +.TH "BREW" "1" "June 2017" "Homebrew" "brew" . .SH "NAME" \fBbrew\fR \- The missing package manager for macOS
true
Other
Homebrew
brew
3064b5b3c301897f8229ccc4f3b5922bcae64ddf.json
Add test for `brew style`.
Library/Homebrew/test/cmd/style_spec.rb
@@ -0,0 +1,34 @@ +require "cmd/style" + +describe "brew style" do + around(:each) do |example| + begin + FileUtils.ln_s HOMEBREW_LIBRARY_PATH, HOMEBREW_LIBRARY/"Homebrew" + FileUtils.ln_s HOMEBREW_LIBRARY_PATH.parent/".rubocop.yml", HOMEBREW_LIBRARY/".rubocop.yml" + + example.run + ensure + FileUtils.rm_f HOMEBREW_LIBRARY/"Homebrew" + FileUtils.rm_f HOMEBREW_LIBRARY/".rubocop.yml" + end + end + + describe "Homebrew::check_style_json" do + let(:dir) { mktmpdir } + + it "returns RubocopResults when RuboCop reports offenses" do + formula = dir/"my-formula.rb" + + formula.write <<-'EOS'.undent + class MyFormula < Formula + + end + EOS + + rubocop_result = Homebrew.check_style_json([formula]) + + expect(rubocop_result.file_offenses(formula.realpath.to_s).map(&:message)) + .to include("Extra empty line detected at class body beginning.") + end + end +end
false
Other
Homebrew
brew
087035868aece3e4836ec69a72a0e3fdf96c64c0.json
AbstractCommand: fix return type of .abstract?
Library/Homebrew/cask/lib/hbc/cli/abstract_command.rb
@@ -15,7 +15,7 @@ def self.command_name end def self.abstract? - name.split("::").last =~ /^Abstract[^a-z]/ + name.split("::").last.match?(/^Abstract[^a-z]/) end def self.visible
false
Other
Homebrew
brew
4ffca8faa2fb055ec5a8329496fe0bfe532f223a.json
cask_loader: fix return types for .can_load?
Library/Homebrew/cask/lib/hbc/cask_loader.rb
@@ -54,7 +54,7 @@ def cask(header_token, &block) class FromURILoader < FromPathLoader def self.can_load?(ref) - ref.to_s =~ ::URI.regexp + ref.to_s.match?(::URI.regexp) end def initialize(url) @@ -80,7 +80,7 @@ def load class FromTapLoader < FromPathLoader def self.can_load?(ref) - ref.to_s =~ HOMEBREW_TAP_CASK_REGEX + ref.to_s.match?(HOMEBREW_TAP_CASK_REGEX) end def initialize(tapped_name)
false
Other
Homebrew
brew
98959f1fb9c667abde593dcd92128aed5367d29a.json
release-notes: fix style complaint.
Library/Homebrew/dev-cmd/release-notes.rb
@@ -27,7 +27,7 @@ def release_notes .lines.grep(/Merge pull request/) output.map! do |s| - s.gsub(/.*Merge pull request #(\d+) from ([^\/]+)\/[^>]*(>>)*/, + s.gsub(%r{.*Merge pull request #(\d+) from ([^/]+)/[^>]*(>>)*}, "https://github.com/Homebrew/brew/pull/\\1 (@\\2)") end if ARGV.include?("--markdown")
false
Other
Homebrew
brew
cbfc83309fd69105fb522e4dd3477f333c89268e.json
audit: check pypi URLs #373 implemented as a strict check (thanks nijikon)
Library/Homebrew/dev-cmd/audit.rb
@@ -1496,6 +1496,14 @@ def audit_urls problem "#{u} should be `https://search.maven.org/remotecontent?filepath=#{$1}`" end + # Check pypi urls + if @strict + urls.each do |p| + next unless p =~ %r{^https?://pypi.python.org/(.*)} + problem "#{p} should be `https://files.pythonhosted.org/#{$2}`" + end + end + return unless @online urls.each do |url| next if !@strict && mirrors.include?(url)
false
Other
Homebrew
brew
6a0086a0a7242e214bfdf8a1e0a79dc057e75eb0.json
audit: fix false negative for formulae options. Handle the case where an if/unless is detected and then write off this line for option handling.
Library/Homebrew/dev-cmd/audit.rb
@@ -959,6 +959,7 @@ def line_problems(line, _lineno) if line =~ /depends_on\s+['"](.+)['"]\s+=>\s+(.*)/ dep = $1 $2.split(" ").map do |o| + break if ["if", "unless"].include?(o) next unless o =~ /^\[?['"](.*)['"]/ problem "Dependency #{dep} should not use option #{$1}" end
false
Other
Homebrew
brew
c309ed8d44f69ed211abd2a170f45935c3357f73.json
formula_installer: display full upgrade version. Previously this omitted the revision which meant the currently installed and upgrade version showed as the same.
Library/Homebrew/formula_installer.rb
@@ -222,12 +222,12 @@ def install EOS message += if formula.outdated? && !formula.head? <<-EOS.undent - To upgrade to #{formula.version}, run `brew upgrade #{formula.name}` + To upgrade to #{formula.pkg_version}, run `brew upgrade #{formula.name}` EOS else # some other version is already installed *and* linked <<-EOS.undent - To install #{formula.version}, first run `brew unlink #{formula.name}` + To install #{formula.pkg_version}, first run `brew unlink #{formula.name}` EOS end raise CannotInstallFormulaError, message
false
Other
Homebrew
brew
12e0a5ee7dc730c163655def44ae9e6dc316a44a.json
brew.rb: use HOMEBREW_PATH for external commands. They shouldn’t need to handle our environment filtering on the PATH as we’re essentially breaking an API for them otherwise.
Library/Homebrew/brew.rb
@@ -49,12 +49,16 @@ def require?(path) end path = PATH.new(ENV["PATH"]) + homebrew_path = PATH.new(ENV["HOMEBREW_PATH"]) # Add contributed commands to PATH before checking. - path.append(Pathname.glob(Tap::TAP_DIRECTORY/"*/*/cmd")) + tap_cmds = Pathname.glob(Tap::TAP_DIRECTORY/"*/*/cmd") + path.append(tap_cmds) + homebrew_path.append(tap_cmds) # Add SCM wrappers. path.append(HOMEBREW_SHIMS_PATH/"scm") + homebrew_path.append(HOMEBREW_SHIMS_PATH/"scm") ENV["PATH"] = path @@ -89,6 +93,9 @@ def require?(path) system(HOMEBREW_BREW_FILE, "uninstall", "--force", "brew-cask") end + # External commands expect a normal PATH + ENV["PATH"] = homebrew_path unless internal_cmd + if internal_cmd Homebrew.send cmd.to_s.tr("-", "_").downcase elsif which "brew-#{cmd}"
false
Other
Homebrew
brew
a9c83f14a749f6295daafc31440d0f74d1aa27e0.json
Use stty instead of tput to get terminal width Fixes https://github.com/Homebrew/brew/issues/2707
Library/Homebrew/utils/tty.rb
@@ -6,7 +6,7 @@ def strip_ansi(string) end def width - `/usr/bin/tput cols`.strip.to_i + (`/bin/stty size`.split[1] || 80).to_i end def truncate(string)
false
Other
Homebrew
brew
587f338daabfd7ee5f02bff8fc976a0d32e13c2b.json
vendor-install: use Ruby as a sha256 fallback But still prefer shasum/sha256sum where present.
Library/Homebrew/cmd/vendor-install.sh
@@ -82,6 +82,15 @@ fetch() { elif [[ -x "$(which sha256sum)" ]] then sha="$(sha256sum "$CACHED_LOCATION" | cut -d' ' -f1)" + elif [[ -x "$(which ruby)" ]] + then + sha="$(ruby <<EOSCRIPT + require 'digest/sha2' + digest = Digest::SHA256.new + File.open('$CACHED_LOCATION', 'rb') { |f| digest.update(f.read) } + puts digest.hexdigest +EOSCRIPT +)" else odie "Cannot verify the checksum ('shasum' or 'sha256sum' not found)!" fi
false
Other
Homebrew
brew
9032574038fdf322df8d2c527949c02c0d997400.json
Update jenkins.brew.sh links. These previously, incorrectly pointed to bot.brew.sh. Fixes #2703.
Library/Homebrew/dev-cmd/pull.rb
@@ -14,7 +14,7 @@ #: #: ~ The URL of a commit on GitHub #: -#: ~ A "https://bot.brew.sh/job/..." string specifying a testing job ID +#: ~ A "https://jenkins.brew.sh/job/..." string specifying a testing job ID #: #: If `--bottle` is passed, handle bottles, pulling the bottle-update #: commit and publishing files on Bintray.
true
Other
Homebrew
brew
9032574038fdf322df8d2c527949c02c0d997400.json
Update jenkins.brew.sh links. These previously, incorrectly pointed to bot.brew.sh. Fixes #2703.
Library/Homebrew/test/dev-cmd/pull_spec.rb
@@ -14,7 +14,7 @@ end end - expect { brew "pull", "https://bot.brew.sh/job/Homebrew\%20Testing/1028/" } + expect { brew "pull", "https://jenkins.brew.sh/job/Homebrew\%20Testing/1028/" } .to output(/Testing URLs require `\-\-bottle`!/).to_stderr .and not_to_output.to_stdout .and be_a_failure
true
Other
Homebrew
brew
9032574038fdf322df8d2c527949c02c0d997400.json
Update jenkins.brew.sh links. These previously, incorrectly pointed to bot.brew.sh. Fixes #2703.
docs/Brew-Test-Bot-For-Core-Contributors.md
@@ -4,10 +4,10 @@ If a build has run and passed on `brew test-bot` then it can be used to quickly There are two types of Jenkins jobs you will interact with: -## [Homebrew Core Pull Requests](https://bot.brew.sh/job/Homebrew%20Core/) +## [Homebrew Core Pull Requests](https://jenkins.brew.sh/job/Homebrew%20Core/) This job automatically builds any pull requests submitted to Homebrew/homebrew-core. On success or failure it updates the pull request status (see more details on the [main Brew Test Bot documentation page](Brew-Test-Bot.md)). On a successful build it automatically uploads bottles. -## [Homebrew Testing](https://bot.brew.sh/job/Homebrew%20Testing/) +## [Homebrew Testing](https://jenkins.brew.sh/job/Homebrew%20Testing/) This job is manually triggered to run [`brew test-bot`](https://github.com/Homebrew/homebrew-test-bot/blob/master/cmd/brew-test-bot.rb) with user-specified parameters. On a successful build it automatically uploads bottles. You can manually start this job with parameters to run [`brew test-bot`](https://github.com/Homebrew/homebrew-test-bot/blob/master/cmd/brew-test-bot.rb) with the same parameters. It's often useful to pass a pull request URL, a commit URL, a commit SHA-1 and/or formula names to have the Brew Test Bot test them, report the results and produce bottles. @@ -22,5 +22,5 @@ To pull and bottle a pull request with `brew pull`: To bottle a test build: 1. Ensure the job has already completed successfully. -2. Run `brew pull --bottle https://bot.brew.sh/job/Homebrew%20Testing/1234/` where `https://bot.brew.sh/job/Homebrew%20Testing/1234/` is the testing build URL in Jenkins. +2. Run `brew pull --bottle https://jenkins.brew.sh/job/Homebrew%20Testing/1234/` where `https://jenkins.brew.sh/job/Homebrew%20Testing/1234/` is the testing build URL in Jenkins. 3. Run `git push` to push the commits.
true
Other
Homebrew
brew
9032574038fdf322df8d2c527949c02c0d997400.json
Update jenkins.brew.sh links. These previously, incorrectly pointed to bot.brew.sh. Fixes #2703.
docs/Brew-Test-Bot.md
@@ -4,7 +4,7 @@ by [our Kickstarter in 2013](https://www.kickstarter.com/projects/homebrew/brew-test-bot). It comprises four Mac Minis running in a data centre in England which host -[a Jenkins instance at https://bot.brew.sh](https://bot.brew.sh) and run the +[a Jenkins instance at https://jenkins.brew.sh](https://jenkins.brew.sh) and run the [`brew-test-bot.rb`](https://github.com/Homebrew/homebrew-test-bot/blob/master/cmd/brew-test-bot.rb) Ruby script to perform automated testing of commits to the master branch, pull requests and custom builds requested by maintainers.
true
Other
Homebrew
brew
9032574038fdf322df8d2c527949c02c0d997400.json
Update jenkins.brew.sh links. These previously, incorrectly pointed to bot.brew.sh. Fixes #2703.
docs/Manpage.md
@@ -776,7 +776,7 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note ~ The URL of a commit on GitHub - ~ A "https://bot.brew.sh/job/..." string specifying a testing job ID + ~ A "https://jenkins.brew.sh/job/..." string specifying a testing job ID If `--bottle` is passed, handle bottles, pulling the bottle-update commit and publishing files on Bintray.
true
Other
Homebrew
brew
9032574038fdf322df8d2c527949c02c0d997400.json
Update jenkins.brew.sh links. These previously, incorrectly pointed to bot.brew.sh. Fixes #2703.
docs/New-Maintainer-Checklist.md
@@ -47,8 +47,8 @@ If they accept, follow a few steps to get them set up: - Invite them to the [**@Homebrew/maintainers** team](https://github.com/orgs/Homebrew/teams/maintainers) to give them write access to all repositories (but don't make them owners yet). They will need to enable [GitHub's Two Factor Authentication](https://help.github.com/articles/about-two-factor-authentication/). - Ask them to sign in to [Bintray](https://bintray.com) using their GitHub account and they should auto-sync to [Bintray's Homebrew organisation](https://bintray.com/homebrew/organization/edit/members) as a member so they can publish new bottles -- Add them to the [Jenkins' GitHub Authorization Settings admin user names](https://bot.brew.sh/configureSecurity/) so they can adjust settings and restart jobs -- Add them to the [Jenkins' GitHub Pull Request Builder admin list](https://bot.brew.sh/configure) to enable `@BrewTestBot test this please` for them +- Add them to the [Jenkins' GitHub Authorization Settings admin user names](https://jenkins.brew.sh/configureSecurity/) so they can adjust settings and restart jobs +- Add them to the [Jenkins' GitHub Pull Request Builder admin list](https://jenkins.brew.sh/configure) to enable `@BrewTestBot test this please` for them - Invite them to the [`homebrew-dev` private maintainers mailing list](https://groups.google.com/forum/#!managemembers/homebrew-dev/invite) - Invite them to the [`machomebrew` private maintainers Slack](https://machomebrew.slack.com/admin/invites) - Invite them to the [`homebrew` private maintainers 1Password](https://homebrew.1password.com/signin)
true
Other
Homebrew
brew
9032574038fdf322df8d2c527949c02c0d997400.json
Update jenkins.brew.sh links. These previously, incorrectly pointed to bot.brew.sh. Fixes #2703.
manpages/brew.1
@@ -806,7 +806,7 @@ Each \fIpatch\-source\fR may be one of: ~ The URL of a commit on GitHub . .IP -~ A "https://bot\.brew\.sh/job/\.\.\." string specifying a testing job ID +~ A "https://jenkins\.brew\.sh/job/\.\.\." string specifying a testing job ID . .IP If \fB\-\-bottle\fR is passed, handle bottles, pulling the bottle\-update commit and publishing files on Bintray\.
true
Other
Homebrew
brew
e2c707d8b12fcf8deed952de8b1a181df6652cca.json
Stdenv: Add ENV.libxml2 and ENV.x11 for Linux Add ENV.libxml2 primarily for the use of test do blocks. Add a dummy ENV.x11 function. See Linuxbrew/brew#356 and Linuxbrew/brew#382
Library/Homebrew/extend/ENV/std.rb
@@ -210,6 +210,8 @@ def set_cpu_flags(flags, default = DEFAULT_FLAGS, map = Hardware::CPU.optimizati end alias generic_set_cpu_flags set_cpu_flags + def x11; end + # @private def effective_arch if ARGV.build_bottle?
true
Other
Homebrew
brew
e2c707d8b12fcf8deed952de8b1a181df6652cca.json
Stdenv: Add ENV.libxml2 and ENV.x11 for Linux Add ENV.libxml2 primarily for the use of test do blocks. Add a dummy ENV.x11 function. See Linuxbrew/brew#356 and Linuxbrew/brew#382
Library/Homebrew/extend/os/extend/ENV/std.rb
@@ -1,2 +1,6 @@ require "extend/ENV/std" -require "extend/os/mac/extend/ENV/std" if OS.mac? +if OS.mac? + require "extend/os/mac/extend/ENV/std" +elsif OS.linux? + require "extend/os/linux/extend/ENV/std" +end
true
Other
Homebrew
brew
e2c707d8b12fcf8deed952de8b1a181df6652cca.json
Stdenv: Add ENV.libxml2 and ENV.x11 for Linux Add ENV.libxml2 primarily for the use of test do blocks. Add a dummy ENV.x11 function. See Linuxbrew/brew#356 and Linuxbrew/brew#382
Library/Homebrew/extend/os/linux/extend/ENV/std.rb
@@ -0,0 +1,7 @@ +module Stdenv + def libxml2 + append "CPPFLAGS", "-I#{Formula["libxml2"].include/"libxml2"}" + rescue FormulaUnavailableError + nil + end +end
true
Other
Homebrew
brew
2bca6fb3385a54b8bd91635f098210a295c7392d.json
check_non_libraries: fix false positive subdirectory reports
Library/Homebrew/formula_cellar_checks.rb
@@ -62,7 +62,7 @@ def check_non_libraries valid_extensions = %w[.a .dylib .framework .jnilib .la .o .so .jar .prl .pm .sh] non_libraries = formula.lib.children.reject do |g| - next if g.directory? + next true if g.directory? valid_extensions.include? g.extname end return if non_libraries.empty?
false
Other
Homebrew
brew
2cbbdb51bf3bbe1841a6a382b19932d838fc7d25.json
tests: install specific Bundler version. Otherwise `brew tests` fails with the latest. See the failing Homebrew/homebrew-test-bot `master` build as an example.
Library/Homebrew/dev-cmd/tests.rb
@@ -59,7 +59,10 @@ def tests ENV["GIT_#{role}_DATE"] = "Sun Jan 22 19:59:13 2017 +0000" end - Homebrew.install_gem_setup_path! "bundler" + # TODO: unpin this version when this error no longer shows: + # bundler-1.15.0/lib/bundler/shared_helpers.rb:25: + # stack level too deep (SystemStackError) + Homebrew.install_gem_setup_path! "bundler", "1.14.6" system "bundle", "install" unless quiet_system("bundle", "check") parallel = true
false
Other
Homebrew
brew
4356016b4a1c2eaba02680b4ad7f1747d2df53bf.json
Use parallel RuboCop This requires updating to Rubocop 0.49.0 which will require some fixes to rules, in Homebrew/brew and Homebrew/homebrew-core but opening this for now so I remember.
.travis.yml
@@ -2,9 +2,9 @@ language: ruby cache: directories: - $HOME/.gem/ruby + - $HOME/Library/Caches/Homebrew/style + - $HOME/Library/Caches/Homebrew/tests - Library/Homebrew/vendor/bundle - # For parallel_rspec - - Library/Homebrew/tmp matrix: include:
true
Other
Homebrew
brew
4356016b4a1c2eaba02680b4ad7f1747d2df53bf.json
Use parallel RuboCop This requires updating to Rubocop 0.49.0 which will require some fixes to rules, in Homebrew/brew and Homebrew/homebrew-core but opening this for now so I remember.
Library/.rubocop.yml
@@ -23,70 +23,94 @@ FormulaAuditStrict/ComponentsRedundancy: FormulaAudit/Homepage: Enabled: true -Metrics/AbcSize: - Enabled: false - -Metrics/BlockLength: - Enabled: false - -Metrics/ClassLength: +# `system` is a special case and aligns on second argument +Layout/AlignParameters: Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false +Layout/CaseIndentation: + EnforcedStyle: end -Metrics/LineLength: - Enabled: false +Layout/EmptyLineBetweenDefs: + AllowAdjacentOneLineDefs: true -Metrics/MethodLength: - Enabled: false +Layout/IndentArray: + EnforcedStyle: special_inside_parentheses -Metrics/ModuleLength: - CountComments: false - Exclude: - - '**/bin/**/*' - - '**/cmd/**/*' - - '**/lib/**/*' - - '**/spec/**/*' +Layout/IndentHeredoc: + EnforcedStyle: unindent -Metrics/PerceivedComplexity: +# conflicts with DSL-style path concatenation with `/` +Layout/SpaceAroundOperators: Enabled: false # favor parens-less DSL-style arguments Lint/AmbiguousOperator: Enabled: false +# so many of these in formulae and can't be autocorrected Lint/AmbiguousRegexpLiteral: Enabled: false +# favor parens-less DSL-style arguments +Lint/AmbiguousBlockAssociation: + Enabled: false + +# assignment in conditions are useful sometimes Lint/AssignmentInCondition: Enabled: false Lint/EndAlignment: EnforcedStyleAlignWith: variable +# so many of these in formulae and can't be autocorrected Lint/ParenthesesAsGroupedExpression: Enabled: false -Style/Alias: - EnforcedStyle: prefer_alias +# TODO: try to bring down all metrics maximums +Metrics/AbcSize: + Max: 250 -Style/AlignHash: - Enabled: false +Metrics/BlockLength: + Max: 1250 -# `system` is a special case and aligns on second argument -Style/AlignParameters: +Metrics/ClassLength: + Max: 1500 + +Metrics/CyclomaticComplexity: + Max: 75 + +Metrics/LineLength: + Max: 400 + +Metrics/MethodLength: + Max: 250 + +Metrics/ModuleLength: + CountComments: false + Exclude: + - '**/bin/**/*' + - '**/cmd/**/*' + - '**/lib/**/*' + +Metrics/PerceivedComplexity: + Max: 80 + +# makes code less readable for minor performance increases +Performance/Caller: Enabled: false +Style/Alias: + EnforcedStyle: prefer_alias + +Style/AutoResourceCleanup: + Enabled: true + Style/BarePercentLiterals: EnforcedStyle: percent_q Style/BlockDelimiters: EnforcedStyle: line_count_based -Style/CaseIndentation: - EnforcedStyle: end - Style/ClassAndModuleChildren: EnforcedStyle: nested @@ -99,16 +123,22 @@ Style/CommandLiteral: Style/ConditionalAssignment: Enabled: false +# most of our APIs are internal so don't require docs Style/Documentation: Enabled: false -Style/EmptyLineBetweenDefs: - AllowAdjacentOneLineDefs: true +Style/Encoding: + Enabled: true # dashes in filenames are typical Style/FileName: Regex: !ruby/regexp /^[\w\@\-\+\.]+(\.rb)?$/ +# falsely flags e.g. curl formatting arguments as format strings +Style/FormatStringToken: + Enabled: false + +# so many of these in formulae and can't be autocorrected Style/GuardClause: Enabled: false @@ -121,13 +151,6 @@ Style/HashSyntax: - '**/lib/**/*' - '**/spec/**/*' -# disabled until it respects line length -Style/IfUnlessModifier: - Enabled: false - -Style/IndentArray: - EnforcedStyle: special_inside_parentheses - # only for numbers >= 1_000_000 Style/NumericLiterals: MinDigits: 7 @@ -160,13 +183,6 @@ Style/RaiseArgs: Style/RegexpLiteral: EnforcedStyle: slashes -# conflicts with DSL-style path concatenation with `/` -Style/SpaceAroundOperators: - Enabled: false - -Style/SingleLineBlockParams: - Enabled: false - # not a problem for typical shell users Style/SpecialGlobalVars: Enabled: false @@ -179,17 +195,22 @@ Style/StringLiterals: Style/StringLiteralsInInterpolation: EnforcedStyle: double_quotes +Style/SymbolArray: + EnforcedStyle: brackets + Style/TernaryParentheses: - Enabled: false + EnforcedStyle: require_parentheses_when_complex # makes diffs nicer Style/TrailingCommaInLiteral: EnforcedStyleForMultiline: comma + Style/TrailingCommaInArguments: EnforcedStyleForMultiline: comma +# we have too many variables like sha256 where this harms readability Style/VariableNumber: Enabled: false Style/WordArray: - Enabled: false + MinSize: 4
true
Other
Homebrew
brew
4356016b4a1c2eaba02680b4ad7f1747d2df53bf.json
Use parallel RuboCop This requires updating to Rubocop 0.49.0 which will require some fixes to rules, in Homebrew/brew and Homebrew/homebrew-core but opening this for now so I remember.
Library/Homebrew/.rubocop.yml
@@ -9,9 +9,8 @@ AllCops: - '**/Casks/**/*' - '**/vendor/**/*' -Style/BlockDelimiters: +Layout/MultilineMethodCallIndentation: Exclude: - - '**/cask/spec/**/*' - '**/*_spec.rb' # so many of these in formulae but none in here @@ -27,16 +26,13 @@ Lint/NestedMethodDefinition: Lint/ParenthesesAsGroupedExpression: Enabled: true -Metrics/ModuleLength: - CountComments: false - Exclude: - - 'cask/lib/hbc/locations.rb' - - 'cask/lib/hbc/macos.rb' - - 'cask/lib/hbc/utils.rb' - Metrics/ParameterLists: CountKeywordArgs: false +Style/BlockDelimiters: + Exclude: + - '**/*_spec.rb' + # so many of these in formulae but none in here Style/GuardClause: Enabled: true
true
Other
Homebrew
brew
4356016b4a1c2eaba02680b4ad7f1747d2df53bf.json
Use parallel RuboCop This requires updating to Rubocop 0.49.0 which will require some fixes to rules, in Homebrew/brew and Homebrew/homebrew-core but opening this for now so I remember.
Library/Homebrew/cask/lib/hbc/cli/style.rb
@@ -11,7 +11,8 @@ def self.help def run install_rubocop - system({ "XDG_CACHE_HOME" => HOMEBREW_CACHE }, "rubocop", *rubocop_args, "--", *cask_paths) + cache_env = { "XDG_CACHE_HOME" => "#{HOMEBREW_CACHE}/style" } + system(cache_env, "rubocop", *rubocop_args, "--", *cask_paths) raise CaskError, "style check failed" unless $CHILD_STATUS.success? true end
true
Other
Homebrew
brew
4356016b4a1c2eaba02680b4ad7f1747d2df53bf.json
Use parallel RuboCop This requires updating to Rubocop 0.49.0 which will require some fixes to rules, in Homebrew/brew and Homebrew/homebrew-core but opening this for now so I remember.
Library/Homebrew/cmd/style.rb
@@ -73,7 +73,11 @@ def check_style_impl(files, output_type, options = {}) args = %w[ --force-exclusion ] - args << "--auto-correct" if fix + if fix + args << "--auto-correct" + else + args << "--parallel" + end if options[:except_cops] options[:except_cops].map! { |cop| RuboCop::Cop::Cop.registry.qualified_cop_name(cop.to_s, "") } @@ -101,14 +105,16 @@ def check_style_impl(files, output_type, options = {}) args += files end + cache_env = { "XDG_CACHE_HOME" => "#{HOMEBREW_CACHE}/style" } + case output_type when :print args << "--display-cop-names" if ARGV.include? "--display-cop-names" args << "--format" << "simple" if files - system({ "XDG_CACHE_HOME" => HOMEBREW_CACHE }, "rubocop", *args) + system(cache_env, "rubocop", *args) !$?.success? when :json - json, _, status = Open3.capture3({ "XDG_CACHE_HOME" => HOMEBREW_CACHE }, "rubocop", "--format", "json", *args) + json, _, status = Open3.capture3(cache_env, "rubocop", "--format", "json", *args) # exit status of 1 just means violations were found; other numbers mean # execution errors. # exitstatus can also be nil if RuboCop process crashes, e.g. due to
true
Other
Homebrew
brew
4356016b4a1c2eaba02680b4ad7f1747d2df53bf.json
Use parallel RuboCop This requires updating to Rubocop 0.49.0 which will require some fixes to rules, in Homebrew/brew and Homebrew/homebrew-core but opening this for now so I remember.
Library/Homebrew/constants.rb
@@ -1,3 +1,3 @@ # RuboCop version used for `brew style` and `brew cask style` -HOMEBREW_RUBOCOP_VERSION = "0.47.1".freeze -HOMEBREW_RUBOCOP_CASK_VERSION = "~> 0.12.0".freeze # has to be updated when RuboCop version changes +HOMEBREW_RUBOCOP_VERSION = "0.49.1".freeze +HOMEBREW_RUBOCOP_CASK_VERSION = "~> 0.13.0".freeze # has to be updated when RuboCop version changes
true
Other
Homebrew
brew
4356016b4a1c2eaba02680b4ad7f1747d2df53bf.json
Use parallel RuboCop This requires updating to Rubocop 0.49.0 which will require some fixes to rules, in Homebrew/brew and Homebrew/homebrew-core but opening this for now so I remember.
Library/Homebrew/dev-cmd/tests.rb
@@ -91,12 +91,12 @@ def tests end args = ["-I", HOMEBREW_LIBRARY_PATH/"test"] - args += %w[ + args += %W[ --color --require spec_helper --format progress --format ParallelTests::RSpec::RuntimeLogger - --out tmp/parallel_runtime_rspec.log + --out #{HOMEBREW_CACHE}/tests/parallel_runtime_rspec.log ] args << "--seed" << ARGV.next if ARGV.include? "--seed"
true
Other
Homebrew
brew
4356016b4a1c2eaba02680b4ad7f1747d2df53bf.json
Use parallel RuboCop This requires updating to Rubocop 0.49.0 which will require some fixes to rules, in Homebrew/brew and Homebrew/homebrew-core but opening this for now so I remember.
Library/Homebrew/extend/string.rb
@@ -2,6 +2,7 @@ class String def undent gsub(/^[ \t]{#{(slice(/^[ \t]+/) || '').length}}/, "") end + alias unindent undent # eg: # if foo then <<-EOS.undent_________________________________________________________72
true
Other
Homebrew
brew
4356016b4a1c2eaba02680b4ad7f1747d2df53bf.json
Use parallel RuboCop This requires updating to Rubocop 0.49.0 which will require some fixes to rules, in Homebrew/brew and Homebrew/homebrew-core but opening this for now so I remember.
Library/Homebrew/test/Gemfile.lock
@@ -36,7 +36,8 @@ GEM rspec-support (3.6.0) rspec-wait (0.0.9) rspec (>= 3, < 4) - rubocop (0.48.1) + rubocop (0.49.1) + parallel (~> 1.10) parser (>= 2.3.3.1, < 3.0) powerpack (~> 0.1) rainbow (>= 1.99.1, < 3.0)
true
Other
Homebrew
brew
224d2c21ca118cf91b21edc8fd19dacfeb2a3f3b.json
update-test: improve no tags found messaging. Currently you just get `Could not find start commit!` which is not as explicit as it could be.
Library/Homebrew/dev-cmd/update-test.rb
@@ -33,14 +33,16 @@ def update_test elsif date = ARGV.value("before") Utils.popen_read("git", "rev-list", "-n1", "--before=#{date}", "origin/master").chomp elsif ARGV.include?("--to-tag") - previous_tag = - Utils.popen_read("git", "tag", "--list", "--sort=-version:refname").lines[1] - unless previous_tag + tags = Utils.popen_read("git", "tag", "--list", "--sort=-version:refname") + previous_tag = tags.lines[1] + previous_tag ||= begin safe_system "git", "fetch", "--tags", "--depth=1" - previous_tag = - Utils.popen_read("git", "tag", "--list", "--sort=-version:refname").lines[1] + tags = Utils.popen_read("git", "tag", "--list", "--sort=-version:refname") + tags.lines[1] end - previous_tag.to_s.chomp + previous_tag = previous_tag.to_s.chomp + odie "Could not find previous tag in:\n#{tags}" if previous_tag.empty? + previous_tag else Utils.popen_read("git", "rev-parse", "origin/master").chomp end
false
Other
Homebrew
brew
b91d0254bbd07b7b0ddf3906cb6c08684ebc07ef.json
Add test for `--binaries` default value.
Library/Homebrew/test/cask/cli_spec.rb
@@ -13,6 +13,13 @@ ]) end + context "when no option is specified" do + it "--binaries is true by default" do + command = Hbc::CLI::Install.new("some-cask") + expect(command.binaries?).to be true + end + end + context "::run" do let(:noop_command) { double("CLI::Noop") }
false
Other
Homebrew
brew
67dc3323ed1368ffc6a49899c8b98732dc2eb181.json
lock: simplify ruby conditional
Library/Homebrew/utils/lock.sh
@@ -42,7 +42,7 @@ _create_lock() { [[ -x "$ruby" ]] || ruby="$(which ruby 2>/dev/null)" [[ -x "$python" ]] || python="$(which python 2>/dev/null)" - if [[ -x "$ruby" && $("$ruby" -e "puts RUBY_VERSION >= '1.8.7' ? 0 : 1") = 0 ]] + if [[ -x "$ruby" ]] && "$ruby" -e "exit(RUBY_VERSION >= '1.8.7')" then "$ruby" -e "File.new($lock_fd).flock(File::LOCK_EX | File::LOCK_NB) || exit(1)" elif [[ -x "$(which flock)" ]]
false
Other
Homebrew
brew
6453c81dacc66ed892168351335482f83b087c34.json
vendor-install: fix array syntax for old bash
Library/Homebrew/cmd/vendor-install.sh
@@ -39,10 +39,10 @@ fetch() { if [[ -n "$HOMEBREW_QUIET" ]] then - curl_args+=(--silent) + curl_args[${#curl_args[*]}]="--silent" elif [[ -z "$HOMEBREW_VERBOSE" ]] then - curl_args+=(--progress-bar) + curl_args[${#curl_args[*]}]="--progress-bar" fi temporary_path="$CACHED_LOCATION.incomplete"
false
Other
Homebrew
brew
a44d4ce88b6fb3deea8dc41be662583941d5c96d.json
Remove Cask’s `CLI#debug?`.
Library/Homebrew/cask/lib/hbc/cask.rb
@@ -74,8 +74,6 @@ def to_s end def dumpcask - return unless CLI.debug? - odebug "Cask instance dumps in YAML:" odebug "Cask instance toplevel:", to_yaml [
true
Other
Homebrew
brew
a44d4ce88b6fb3deea8dc41be662583941d5c96d.json
Remove Cask’s `CLI#debug?`.
Library/Homebrew/cask/lib/hbc/cli.rb
@@ -71,7 +71,6 @@ class CLI FLAGS = { ["--[no-]binaries", :binaries] => true, - ["--debug", :debug] => false, ["--verbose", :verbose] => false, ["--outdated", :outdated] => false, ["--help", :help] => false, @@ -158,7 +157,7 @@ def self.process(arguments) run_command(command, *rest) rescue CaskError, CaskSha256MismatchError, ArgumentError => e msg = e.message - msg << e.backtrace.join("\n") if debug? + msg << e.backtrace.join("\n") if ARGV.debug? onoe msg exit 1 rescue StandardError, ScriptError, NoMemoryError => e @@ -239,7 +238,6 @@ def self.process_options(args) # for compat with Homebrew, not certain if this is desirable self.verbose = true if ARGV.verbose? - self.debug = true if ARGV.debug? remaining end
true
Other
Homebrew
brew
a44d4ce88b6fb3deea8dc41be662583941d5c96d.json
Remove Cask’s `CLI#debug?`.
Library/Homebrew/cask/lib/hbc/cli/internal_dump.rb
@@ -12,7 +12,6 @@ def self.run(*arguments) end def self.dump_casks(*cask_tokens) - CLI.debug = true # Yuck. At the moment this is the only way to make dumps visible count = 0 cask_tokens.each do |cask_token| begin
true
Other
Homebrew
brew
a44d4ce88b6fb3deea8dc41be662583941d5c96d.json
Remove Cask’s `CLI#debug?`.
Library/Homebrew/cask/lib/hbc/system_command.rb
@@ -154,7 +154,7 @@ def self._warn_plist_garbage(command, garbage) def self._parse_plist(command, output) raise CaskError, "Empty plist input" unless output =~ /\S/ output.sub!(/\A(.*?)(<\?\s*xml)/m, '\2') - _warn_plist_garbage(command, Regexp.last_match[1]) if CLI.debug? + _warn_plist_garbage(command, Regexp.last_match[1]) if ARGV.debug? output.sub!(%r{(<\s*/\s*plist\s*>)(.*?)\Z}m, '\1') _warn_plist_garbage(command, Regexp.last_match[2]) xml = Plist.parse_xml(output)
true
Other
Homebrew
brew
a44d4ce88b6fb3deea8dc41be662583941d5c96d.json
Remove Cask’s `CLI#debug?`.
Library/Homebrew/cask/lib/hbc/utils.rb
@@ -29,7 +29,7 @@ def tty? # global methods def odebug(title, *sput) - return unless Hbc::CLI.debug? + return unless ARGV.debug? puts Formatter.headline(title, color: :magenta) puts sput unless sput.empty? end
true
Other
Homebrew
brew
a44d4ce88b6fb3deea8dc41be662583941d5c96d.json
Remove Cask’s `CLI#debug?`.
Library/Homebrew/test/cask/cli/options_spec.rb
@@ -120,17 +120,6 @@ end end - describe "--debug" do - it "sets the Cask debug method to true" do - begin - Hbc::CLI.process_options %w[help --debug] - expect(Hbc::CLI.debug?).to be true - ensure - Hbc::CLI.debug = false - end - end - end - describe "--help" do it "sets the Cask help method to true" do begin
true
Other
Homebrew
brew
473bdadbcd0f87fdeda98f73b25bb47a14221281.json
Change error messages.
Library/Homebrew/cask/lib/hbc/audit.rb
@@ -75,7 +75,7 @@ def check_version_and_checksum return unless previous_cask.version == cask.version return if previous_cask.sha256 == cask.sha256 - add_error "only sha256 changed; needs to be confirmed by the developer" + add_error "only sha256 changed (see: https://github.com/caskroom/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/sha256.md)" end def check_version
true
Other
Homebrew
brew
473bdadbcd0f87fdeda98f73b25bb47a14221281.json
Change error messages.
Library/Homebrew/dev-cmd/audit.rb
@@ -752,7 +752,7 @@ def audit_revision_and_version_scheme next unless spec = formula.send(spec_sym) next unless previous_version_and_checksum[spec_sym][:version] == spec.version next if previous_version_and_checksum[spec_sym][:checksum] == spec.checksum - problem "#{spec_sym}: only sha256 changed; needs to be confirmed by the developer" + problem "#{spec_sym}: sha256 changed without the version also changing; please create an issue upstream to rule out malicious circumstances and to find out why the file changed." end attributes = [:revision, :version_scheme]
true
Other
Homebrew
brew
ade62aa1b1c3c2eb68dc6f065687fe38a8846ab0.json
Add the same check for Formulae.
Library/Homebrew/dev-cmd/audit.rb
@@ -31,6 +31,9 @@ #: #: If `--except-cops` is passed, the given Rubocop cop(s)' checks would be skipped. #: +#: If `--commit-range` is is passed, the audited Formula will be compared to the +#: last revision before the `<commit_range>`. +#: #: `audit` exits with a non-zero status if any errors are found. This is useful, #: for instance, for implementing pre-commit hooks. @@ -648,9 +651,25 @@ def audit_specs problem "Devel-only (no stable download)" end + previous_formula_contents = unless formula.tap.nil? + commit_range = ARGV.value("commit-range") + Git.last_revision_of_file(formula.tap.path, formula.path, before_commit: commit_range) + end + previous_formula = unless (previous_formula_contents || "").empty? + Formulary.from_contents(formula.name, formula.path, previous_formula_contents) + end + %w[Stable Devel HEAD].each do |name| next unless spec = formula.send(name.downcase) + unless previous_formula.nil? + previous_spec = previous_formula.send(name.downcase) + + if previous_spec.version == spec.version && previous_spec.checksum != spec.checksum + problem "#{name}: only sha256 changed; needs to be confirmed by the developer" + end + end + ra = ResourceAuditor.new(spec, online: @online, strict: @strict).audit problems.concat ra.problems.map { |problem| "#{name}: #{problem}" }
true
Other
Homebrew
brew
ade62aa1b1c3c2eb68dc6f065687fe38a8846ab0.json
Add the same check for Formulae.
docs/Manpage.md
@@ -643,6 +643,9 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note If `--except-cops` is passed, the given Rubocop cop(s)' checks would be skipped. + If `--commit-range` is is passed, the audited Formula will be compared to the + last revision before the ``commit_range``. + `audit` exits with a non-zero status if any errors are found. This is useful, for instance, for implementing pre-commit hooks.
true
Other
Homebrew
brew
ade62aa1b1c3c2eb68dc6f065687fe38a8846ab0.json
Add the same check for Formulae.
manpages/brew.1
@@ -674,6 +674,9 @@ If \fB\-\-only\-cops\fR is passed, only the given Rubocop cop(s)\' violations wo If \fB\-\-except\-cops\fR is passed, the given Rubocop cop(s)\' checks would be skipped\. . .IP +If \fB\-\-commit\-range\fR is is passed, the audited Formula will be compared to the last revision before the \fB<commit_range>\fR\. +. +.IP \fBaudit\fR exits with a non\-zero status if any errors are found\. This is useful, for instance, for implementing pre\-commit hooks\. . .TP
true
Other
Homebrew
brew
d89c870621fb78f3b9be4e0758031bcd6bbc3c31.json
formula: ensure HOMEBREW_PREFIX/bin in test PATH. Only likely to kick in when environment filtering is enabled. Otherwise we need to tediously add a dramatic number of PATHs to tests or recurse through the runtime formulae dependencies and add all them. CC @ilovezfs
Library/Homebrew/formula.rb
@@ -1673,11 +1673,13 @@ def run_test old_temp = ENV["TEMP"] old_tmp = ENV["TMP"] old_term = ENV["TERM"] - old_path = ENV["HOMEBREW_PATH"] + old_path = ENV["PATH"] + old_homebrew_path = ENV["HOMEBREW_PATH"] ENV["CURL_HOME"] = old_curl_home || old_home ENV["TMPDIR"] = ENV["TEMP"] = ENV["TMP"] = HOMEBREW_TEMP ENV["TERM"] = "dumb" + ENV["PATH"] = PATH.new(old_path).append(HOMEBREW_PREFIX/"bin") ENV["HOMEBREW_PATH"] = nil ENV.clear_sensitive_environment! @@ -1704,7 +1706,8 @@ def run_test ENV["TEMP"] = old_temp ENV["TMP"] = old_tmp ENV["TERM"] = old_term - ENV["HOMEBREW_PATH"] = old_path + ENV["PATH"] = old_path + ENV["HOMEBREW_PATH"] = old_homebrew_path @prefix_returns_versioned_prefix = false end
false
Other
Homebrew
brew
4da2f24b0ee819475daae14a839d953777767e8c.json
Remove to_s method
Library/Homebrew/brew.rb
@@ -21,6 +21,7 @@ end def require?(path) + path ||= "" require path rescue LoadError => e # we should raise on syntax errors but not if the file doesn't exist.
true
Other
Homebrew
brew
4da2f24b0ee819475daae14a839d953777767e8c.json
Remove to_s method
Library/Homebrew/cask/lib/hbc/cli.rb
@@ -113,7 +113,7 @@ def self.run_command(command, *rest) if command.respond_to?(:run) # usual case: built-in command verb command.run(*rest) - elsif require?(which("brewcask-#{command}.rb").to_s) + elsif require?(which("brewcask-#{command}.rb")) # external command as Ruby library on PATH, Homebrew-style elsif command.to_s.include?("/") && require?(command.to_s) # external command as Ruby library with literal path, useful
true
Other
Homebrew
brew
37222c195364e3e1c04ee8675a5f0470c2284713.json
Fix implicit conversion of nil into string error
Library/Homebrew/cask/lib/hbc/cli.rb
@@ -113,7 +113,7 @@ def self.run_command(command, *rest) if command.respond_to?(:run) # usual case: built-in command verb command.run(*rest) - elsif require?(which("brewcask-#{command}.rb")) + elsif require?(which("brewcask-#{command}.rb").to_s) # external command as Ruby library on PATH, Homebrew-style elsif command.to_s.include?("/") && require?(command.to_s) # external command as Ruby library with literal path, useful
false
Other
Homebrew
brew
e02d5f7524eb6513abf7abaea9cd0c77365611e9.json
commit new manpages
manpages/brew-cask.1
@@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BREW\-CASK" "1" "April 2017" "Homebrew" "brew-cask" +.TH "BREW\-CASK" "1" "May 2017" "Homebrew" "brew-cask" . .SH "NAME" \fBbrew\-cask\fR \- a friendly binary installer for macOS
true
Other
Homebrew
brew
e02d5f7524eb6513abf7abaea9cd0c77365611e9.json
commit new manpages
manpages/brew.1
@@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BREW" "1" "April 2017" "Homebrew" "brew" +.TH "BREW" "1" "May 2017" "Homebrew" "brew" . .SH "NAME" \fBbrew\fR \- The missing package manager for macOS
true
Other
Homebrew
brew
33d4c95a287060d93200773a52443a1662846165.json
info: use more string interpolation
Library/Homebrew/cmd/info.rb
@@ -124,8 +124,8 @@ def info_formula(f) puts Formatter.url(f.homepage) if f.homepage conflicts = f.conflicts.map do |c| - c.name + - (c.reason ? " (because #{c.reason})" : "") + reason = " (because #{c.reason})" if c.reason + "#{c.name}#{reason}" end.sort! msg="Conflicts with: " puts msg+conflicts*(",\n"+" "*msg.length) unless conflicts.empty?
false
Other
Homebrew
brew
88cef8118e51b2b58eab9f5e8eaef6258b9d63ef.json
Fix another internal link
docs/Manpage.md
@@ -13,7 +13,7 @@ didn't include with macOS. ## ESSENTIAL COMMANDS -For the full command list, see the [COMMANDS][] section. +For the full command list, see the [COMMANDS](#commands) section. With `--verbose` or `-v`, many commands print extra debugging information. Note that these flags should only appear after a command.
false
Other
Homebrew
brew
8c214ed16ddb2ad70d697d6f116c36114e37fe3f.json
Fix the link code
docs/Manpage.md
@@ -167,7 +167,7 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note 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 different ways. See [SPECIFYING FORMULAE][#specifying-formulae]. + in several different ways. See [SPECIFYING FORMULAE](#specifying-formulae). If `--new-issue` is passed, automatically create a new issue in the appropriate GitHub repository as well as creating the Gist. @@ -202,7 +202,7 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note Install `formula`. `formula` is usually the name of the formula to install, but it can be specified - in several different ways. See [SPECIFYING FORMULAE][#specifying-formulae]. + in several different ways. See [SPECIFYING FORMULAE](#specifying-formulae). If `--debug` (or `-d`) is passed and brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory.
false
Other
Homebrew
brew
8f751aaf51781e42730e7f5b16e196710f987ecb.json
Fix internal links
docs/Manpage.md
@@ -167,7 +167,7 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note 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 different ways. See [SPECIFYING FORMULAE][]. + in several different ways. See [SPECIFYING FORMULAE][#specifying-formulae]. If `--new-issue` is passed, automatically create a new issue in the appropriate GitHub repository as well as creating the Gist. @@ -202,7 +202,7 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note Install `formula`. `formula` is usually the name of the formula to install, but it can be specified - in several different ways. See [SPECIFYING FORMULAE][]. + in several different ways. See [SPECIFYING FORMULAE][#specifying-formulae]. If `--debug` (or `-d`) is passed and brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory.
false
Other
Homebrew
brew
22d3a67b73214727bf2deed06f90799e688c6af0.json
Relocate virtualenv orig-prefix.txt Virtualenvs remember the path to the stdlib in a file named orig_prefix.txt. This file wasn't being relocated because Homebrew skips files that look like they're intended for human consumption by matching against the list of metafile extensions. This led to the bug described in https://github.com/Homebrew/homebrew-core/issues/12869. This fixes relocation by creating an exception for orig-prefix.txt.
Library/Homebrew/keg_relocate.rb
@@ -133,6 +133,7 @@ def text_files files = Set.new path.find.reject { |pn| next true if pn.symlink? next true if pn.directory? + next false if pn.basename.to_s == "orig-prefix.txt" # for python virtualenvs next true if Metafiles::EXTENSIONS.include?(pn.extname) if pn.text_executable? text_files << pn
false
Other
Homebrew
brew
c7c0ad6e612c03084ed367369a11e5322c1ae6ab.json
Add acme challenge.
docs/.well-known/acme-challenge/CgQNmjNTd6fUriinp4XpuRI5PBGp7zEXbEEsQceSD0k
@@ -0,0 +1 @@ +CgQNmjNTd6fUriinp4XpuRI5PBGp7zEXbEEsQceSD0k.unNjkXuFqjKx4BO8gem4nzeMm1tSZxPPeBjNqQhFCqQ
true
Other
Homebrew
brew
c7c0ad6e612c03084ed367369a11e5322c1ae6ab.json
Add acme challenge.
docs/_config.yml
@@ -1,3 +1,4 @@ +include: [.well-known] exclude: [bin, vendor, CNAME, Gemfile, Gemfile.lock] gems:
true
Other
Homebrew
brew
77728abbfc4c913ed91856e8c33d0911db0dc486.json
Remove unused command_args Extra command_args in gain_permissions_remove caused silent failure and path never gets deleted.
Library/Homebrew/cask/lib/hbc/utils.rb
@@ -43,7 +43,7 @@ def self.gain_permissions_remove(path, command: SystemCommand) p.rmtree else command.run("/bin/rm", - args: command_args + ["-r", "-f", "--", p], + args: ["-r", "-f", "--", p], sudo: true) end end
false
Other
Homebrew
brew
6a15cea0b447d8cdf5e8e9f5d99f5bdbcec405a6.json
style: fix audit --online This passed a symbol to `:except_cops` which caused a :boom:.
Library/Homebrew/cmd/style.rb
@@ -75,15 +75,15 @@ def check_style_impl(files, output_type, options = {}) args << "--auto-correct" if fix if options[:except_cops] - options[:except_cops].map! { |cop| RuboCop::Cop::Cop.registry.qualified_cop_name(cop, "") } + options[:except_cops].map! { |cop| RuboCop::Cop::Cop.registry.qualified_cop_name(cop.to_s, "") } cops_to_exclude = options[:except_cops].select do |cop| RuboCop::Cop::Cop.registry.names.include?(cop) || RuboCop::Cop::Cop.registry.departments.include?(cop.to_sym) end args << "--except" << cops_to_exclude.join(",") unless cops_to_exclude.empty? elsif options[:only_cops] - options[:only_cops].map! { |cop| RuboCop::Cop::Cop.registry.qualified_cop_name(cop, "") } + options[:only_cops].map! { |cop| RuboCop::Cop::Cop.registry.qualified_cop_name(cop.to_s, "") } cops_to_include = options[:only_cops].select do |cop| RuboCop::Cop::Cop.registry.names.include?(cop) || RuboCop::Cop::Cop.registry.departments.include?(cop.to_sym)
false
Other
Homebrew
brew
f951a22beacdae7dd95c94eba67236fe221a3ca0.json
Install etc/var files on postinstall. Also, don't delete them after that. This means that `brew postinstall` becomes a way to easily reinstall configuration files for any formula without needing any changes to any bottles or requiring a reinstall.
Library/Homebrew/cmd/postinstall.rb
@@ -7,7 +7,10 @@ module Homebrew module_function def postinstall - ARGV.resolved_formulae.each { |f| run_post_install(f) if f.post_install_defined? } + ARGV.resolved_formulae.each do |f| + ohai "Postinstalling #{f}" + run_post_install(f) + end end def run_post_install(formula)
true