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
8b9ac2b2e030a70bd6ee99ac8b0c9b9f92fd621b.json
x11_requirement: remove custom minimum version. This isn't desired or needed. Ensure older code still works, though.
Library/Homebrew/test/x11_requirement_spec.rb
@@ -19,11 +19,6 @@ other = described_class.new("foo") expect(subject).not_to eql(other) end - - it "returns false if the minimum version differs" do - other = described_class.new(default_name, ["2.5"]) - expect(subject).not_to eql(other) - end end describe "#modify_build_envir...
true
Other
Homebrew
brew
0db069602ec160736e150064894b5e33fefa2373.json
Refactor: Move FormulaAudit.check_http_content to utils/curl
Library/Homebrew/cask/lib/hbc/audit.rb
@@ -2,7 +2,7 @@ require "hbc/download" require "digest" require "utils/git" -require "dev-cmd/audit" +require "utils/curl" module Hbc class Audit @@ -284,7 +284,7 @@ def check_https_availability end def check_url_for_https_availability(url_to_check) - problem = FormulaAuditor.check_http_conten...
true
Other
Homebrew
brew
0db069602ec160736e150064894b5e33fefa2373.json
Refactor: Move FormulaAudit.check_http_content to utils/curl
Library/Homebrew/dev-cmd/audit.rb
@@ -40,6 +40,7 @@ require "formula" require "formula_versions" require "utils" +require "utils/curl" require "extend/ENV" require "formula_cellar_checks" require "official_taps" @@ -202,98 +203,6 @@ def initialize(formula, options = {}) @specs = %w[stable devel head].map { |s| formula.send(s) }.compact en...
true
Other
Homebrew
brew
0db069602ec160736e150064894b5e33fefa2373.json
Refactor: Move FormulaAudit.check_http_content to utils/curl
Library/Homebrew/utils/curl.rb
@@ -59,3 +59,95 @@ def curl_download(*args, to: nil, continue_at: "-", **options) def curl_output(*args, **options) Open3.capture3(*curl_args(*args, show_output: true, **options)) end + +def curl_check_http_content(url, user_agents: [:default], check_content: false, strict: false, require_http: false) + return un...
true
Other
Homebrew
brew
5ed5e500e5680bb2276320070ce685f04df33c55.json
Reuse FormulaAuditor to check Cask's URLs
Library/Homebrew/cask/lib/hbc/audit.rb
@@ -2,6 +2,7 @@ require "hbc/download" require "digest" require "utils/git" +require "dev-cmd/audit" module Hbc class Audit @@ -277,75 +278,14 @@ def core_formula_url end def check_https_availability - check_url_for_https_availability(cask.homepage) unless cask.url.to_s.empty? + check_url...
false
Other
Homebrew
brew
e363889d27bb7fddaea513fb733c3c050d3af144.json
Add audit check for URL schema
Library/Homebrew/cask/lib/hbc/audit.rb
@@ -30,6 +30,7 @@ def run! check_url check_generic_artifacts check_token_conflicts + check_https_availability check_download check_single_pre_postflight check_single_uninstall_zap @@ -275,6 +276,78 @@ def core_formula_url "#{core_tap.default_remote}/blob/master/Form...
false
Other
Homebrew
brew
9d1573c0405ead882a38d2bb70cfd66f76c06ccf.json
Fix unused variable.
Library/Homebrew/compat/hbc/cli.rb
@@ -11,7 +11,7 @@ class CLI EOS end) - option "--caskroom=PATH", (lambda do |value| + option "--caskroom=PATH", (lambda do |*| odisabled "`brew cask` with the `--caskroom` flag" end) end
false
Other
Homebrew
brew
cf892c432ef12bffd01518a4fa507ae277056c63.json
Revert extra deletion
Library/Homebrew/cmd/install.rb
@@ -328,6 +328,7 @@ def install_formula(f) fi = FormulaInstaller.new(f) fi.options = build_options.used_options fi.invalid_option_names = build_options.invalid_option_names + fi.ignore_deps = ARGV.ignore_deps? fi.only_deps = ARGV.only_deps? fi.build_bottle ...
false
Other
Homebrew
brew
06b9f1c50d62b8f60cf80e407492a3b202e67096.json
config: Print the linked_version [Linux] Otherwise when the keg was installed but out-of-date, it would display "N/A".
Library/Homebrew/extend/os/linux/system_config.rb
@@ -20,11 +20,9 @@ def host_gcc_version `#{gcc} --version 2>/dev/null`[/ (\d+\.\d+\.\d+)/, 1] end - def formula_version(formula) + def formula_linked_version(formula) return "N/A" unless CoreTap.instance.installed? - f = Formulary.factory formula - return "N/A" unless f.installed? -...
false
Other
Homebrew
brew
7c6d2c95f6055dce5a946d985cf4248166ec5513.json
Fix a test failure when svn is not installed
Library/Homebrew/test/utils/svn_spec.rb
@@ -7,7 +7,11 @@ end it "returns svn version if svn available" do - expect(described_class.svn_available?).to be_truthy + if File.executable? "/usr/bin/svn" + expect(described_class.svn_available?).to be_truthy + else + expect(described_class.svn_available?).to be_falsey + ...
false
Other
Homebrew
brew
fb85ed01bc170e389dd62a2a2872d962b7dad5a6.json
lines_cop: Convert ARGV audit to negative look ahead
Library/Homebrew/rubocops/extend/formula_cop.rb
@@ -127,6 +127,22 @@ def find_instance_method_call(node, instance, method_name) end end + # Matches receiver part of method, + # EX: to match `ARGV.<whatever>()` + # call `find_instance_call(node, "ARGV")` + # yields to a block with parent node of receiver + def find_instance_...
true
Other
Homebrew
brew
fb85ed01bc170e389dd62a2a2872d962b7dad5a6.json
lines_cop: Convert ARGV audit to negative look ahead
Library/Homebrew/rubocops/lines_cop.rb
@@ -162,10 +162,9 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node) end end - [:debug?, :verbose?, :value].each do |method_name| - find_instance_method_call(body_node, "ARGV", method_name) do - problem "Use build instead of ARGV to check o...
true
Other
Homebrew
brew
fb85ed01bc170e389dd62a2a2872d962b7dad5a6.json
lines_cop: Convert ARGV audit to negative look ahead
Library/Homebrew/test/rubocops/lines_cop_spec.rb
@@ -541,13 +541,12 @@ class Foo < Formula end it "Using ARGV to check options" do - expect_offense(<<~RUBY) + expect_no_offenses(<<~RUBY) class Foo < Formula desc "foo" url 'http://example.com/foo-1.0.tgz' def install verbose = ARGV.verbose? -...
true
Other
Homebrew
brew
0ce7a74c585eb01df60f1e9d353825d90bd3d969.json
Hardware::CPU: Implement OS-agnostic methods
Library/Homebrew/extend/os/linux/hardware/cpu.rb
@@ -1,26 +1,13 @@ module Hardware class CPU class << self - def universal_archs - [].extend ArchitectureListExtension - end - def cpuinfo @cpuinfo ||= File.read("/proc/cpuinfo") end - def type - @type ||= if cpuinfo =~ /Intel|AMD/ - :intel - ...
true
Other
Homebrew
brew
0ce7a74c585eb01df60f1e9d353825d90bd3d969.json
Hardware::CPU: Implement OS-agnostic methods
Library/Homebrew/extend/os/mac/hardware/cpu.rb
@@ -75,22 +75,6 @@ def extmodel sysctl_int("machdep.cpu.extmodel") end - def cores - sysctl_int("hw.ncpu") - end - - def bits - sysctl_bool("hw.cpu64bit_capable") ? 64 : 32 - end - - def arch_32_bit - intel? ? :i386 : :ppc - end - - def arch_64_b...
true
Other
Homebrew
brew
0ce7a74c585eb01df60f1e9d353825d90bd3d969.json
Hardware::CPU: Implement OS-agnostic methods
Library/Homebrew/hardware.rb
@@ -19,16 +19,48 @@ def optimization_flags end def arch_32_bit - :i386 + if arm? + :arm + elsif intel? + :i386 + elsif ppc? + :ppc32 + else + :dunno + end end def arch_64_bit - :x86_64 + if arm? +...
true
Other
Homebrew
brew
36c0dbfe13d6185d34a35a1a386d95a3a4046a30.json
Simplify `PATH` usage in `Formula`.
Library/Homebrew/formula.rb
@@ -1622,7 +1622,7 @@ def run_test TEMP: HOMEBREW_TEMP, TMP: HOMEBREW_TEMP, TERM: "dumb", - PATH: PATH.new(ENV["PATH"]).append(HOMEBREW_PREFIX/"bin"), + PATH: PATH.new(ENV["PATH"], HOMEBREW_PREFIX/"bin"), HOMEBREW_PATH: nil, _JAVA_OPTIONS: "#{ENV["_JAVA_OPTIONS"]} -Duser.hom...
false
Other
Homebrew
brew
8bbe9b744f627f1b3741b4b667e64ed797e6323a.json
hooks/bottles: remove bottle hooks. These were removed from Boxen in: https://github.com/boxen/puppet-homebrew/pull/108
Library/Homebrew/formula_installer.rb
@@ -9,7 +9,6 @@ require "formula_cellar_checks" require "install_renamed" require "cmd/postinstall" -require "hooks/bottles" require "debrew" require "sandbox" require "emoji" @@ -81,8 +80,6 @@ def build_bottle? end def pour_bottle?(install_bottle_options = { warn: false }) - return true if Homebrew::H...
true
Other
Homebrew
brew
8bbe9b744f627f1b3741b4b667e64ed797e6323a.json
hooks/bottles: remove bottle hooks. These were removed from Boxen in: https://github.com/boxen/puppet-homebrew/pull/108
Library/Homebrew/hooks/bottles.rb
@@ -1,35 +0,0 @@ -# Boxen (and perhaps others) want to override our bottling infrastructure so -# they can avoid declaring checksums in formulae files. -# Instead of periodically breaking their monkeypatches let's add some hooks that -# we can query to allow their own behaviour. - -# PLEASE DO NOT EVER RENAME THIS CLAS...
true
Other
Homebrew
brew
8bbe9b744f627f1b3741b4b667e64ed797e6323a.json
hooks/bottles: remove bottle hooks. These were removed from Boxen in: https://github.com/boxen/puppet-homebrew/pull/108
Library/Homebrew/test/bottle_hooks_spec.rb
@@ -1,51 +0,0 @@ -require "formula_installer" -require "hooks/bottles" - -describe Homebrew::Hooks::Bottles do - alias_matcher :pour_bottle, :be_pour_bottle - - subject { FormulaInstaller.new formula } - - let(:formula) do - double( - bottled?: false, - local_bottle_path: nil, - bottle_disabled?: f...
true
Other
Homebrew
brew
022303f96c6226001308b994ad68b460f5df579b.json
Unify proxy documentation. Specify under the list of environment variables how to set each of those that we passthrough and use.
Library/Homebrew/manpages/brew.1.md.erb
@@ -235,20 +235,26 @@ can take several different forms: * `HOMEBREW_VERBOSE`: If set, Homebrew always assumes `--verbose` when running commands. -## USING HOMEBREW BEHIND A PROXY + * `http_proxy`: + Sets the HTTP proxy to be used by `curl`, `git` and `svn` when downloading + through Homebrew. + + * `h...
true
Other
Homebrew
brew
022303f96c6226001308b994ad68b460f5df579b.json
Unify proxy documentation. Specify under the list of environment variables how to set each of those that we passthrough and use.
docs/Manpage.md
@@ -1077,20 +1077,26 @@ can take several different forms: * `HOMEBREW_VERBOSE`: If set, Homebrew always assumes `--verbose` when running commands. -## USING HOMEBREW BEHIND A PROXY + * `http_proxy`: + Sets the HTTP proxy to be used by `curl`, `git` and `svn` when downloading + through Homebrew. + + * ...
true
Other
Homebrew
brew
022303f96c6226001308b994ad68b460f5df579b.json
Unify proxy documentation. Specify under the list of environment variables how to set each of those that we passthrough and use.
docs/Tips-N'-Tricks.md
@@ -55,23 +55,6 @@ run `mv the_tarball $(brew --cache -s <formula>)`. You can also pre-cache the download by using the command `brew fetch formula` which also displays the SHA-256 hash. This can be useful for updating formulae to new versions. -## Using Homebrew behind a proxy -Behind the scenes, Homebrew uses sev...
true
Other
Homebrew
brew
022303f96c6226001308b994ad68b460f5df579b.json
Unify proxy documentation. Specify under the list of environment variables how to set each of those that we passthrough and use.
manpages/brew.1
@@ -1104,30 +1104,39 @@ This issue typically occurs when using FileVault or custom SSD configurations\. \fBHOMEBREW_VERBOSE\fR If set, Homebrew always assumes \fB\-\-verbose\fR when running commands\. . -.SH "USING HOMEBREW BEHIND A PROXY" -Homebrew uses several commands for downloading files (e\.g\. \fBcurl\fR, \fB...
true
Other
Homebrew
brew
74433968f61bd6098fed0ecd663bccbd0d69bd35.json
version/null: add to_i method. Fixes #3504.
Library/Homebrew/version/null.rb
@@ -30,6 +30,10 @@ def to_f Float::NAN end + def to_i + 0 + end + def to_s "" end
false
Other
Homebrew
brew
959f54d3ce3e3945cf8dca3b1c5ff7a23f310809.json
bin/brew: add lowercase variants.
bin/brew
@@ -88,8 +88,8 @@ then PATH="/usr/bin:/bin:/usr/sbin:/sbin" FILTERED_ENV=() - for VAR in HOME SHELL PATH TERM LOGNAME USER CI TRAVIS SUDO_ASKPASS - http_proxy HTTPS_PROXY FTP_PROXY \ + for VAR in HOME SHELL PATH TERM LOGNAME USER CI TRAVIS SUDO_ASKPASS \ + http_proxy https_proxy ftp_pr...
false
Other
Homebrew
brew
5d449cf34e659dfc21ef67fbc4a0dbc70718e904.json
Fix external Cask commands.
Library/Homebrew/cask/lib/hbc/cli.rb
@@ -113,9 +113,9 @@ def self.run_command(command, *args) # other Ruby libraries must do everything via "require" klass.run(*args) end - elsif which("brewcask-#{command}") + elsif external_command = which("brewcask-#{command}", ENV["HOMEBREW_PATH"]) # arbitrary external ...
false
Other
Homebrew
brew
9227c8fe3c09cecf551cca060ee45c37cfc30be6.json
Try #2 at handling backed up Casks Avoid using variables altogether; fork out the purge into two specialized + one common function
Library/Homebrew/cask/lib/hbc/installer.rb
@@ -29,7 +29,6 @@ def initialize(cask, command: SystemCommand, force: false, skip_cask_deps: false @require_sha = require_sha @reinstall = false @upgrade = upgrade - @backed_up = false end attr_predicate :binaries?, :force?, :skip_cask_deps?, :require_sha?, :upgrade?, :verbose?, :b...
false
Other
Homebrew
brew
2ff114bc32ce677ed133ea805e4686214aaf8153.json
Use the proper path when purging metadata
Library/Homebrew/cask/lib/hbc/installer.rb
@@ -452,7 +452,7 @@ def purge_versioned_files ohai "Purging files for version #{@cask.version} of Cask #{@cask}" # versioned staged distribution - if version_is_latest? + if upgrade? && version_is_latest? staged_path = backup_path(@cask.staged_path) else staged_path = ...
false
Other
Homebrew
brew
2dbc4ffaf3c4f0ade903a428e635d470000a0729.json
vendor-install: Add ARM bottle for portable-ruby
Library/Homebrew/cmd/vendor-install.sh
@@ -21,8 +21,16 @@ then fi elif [[ -n "$HOMEBREW_LINUX" ]] then - ruby_URL="https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.x86_64_linux.bottle.1.tar.gz" - ruby_SHA="33643b1ca6f860d6df01686636326785763e5e81cf0cef37d8a7ab96a6ca1fa1" + case "$HOMEBREW_PROCESSOR" in + armv7l) + ruby_URL="...
false
Other
Homebrew
brew
8abe60d2dc3f010112aa671a82e4dceb22c11e5b.json
Remove redundant --greedy
Library/Homebrew/test/cask/cli/upgrade_spec.rb
@@ -96,7 +96,7 @@ end describe "with --greedy it checks additional Casks" do - it 'includes the Casks with "auto_updates true" or "version latest" with --greedy' do + it 'includes the Casks with "auto_updates true" or "version latest"' do local_caffeine = Hbc::CaskLoader.load("local-caffe...
false
Other
Homebrew
brew
a2730c8618ebb512cf00318af6d4987dbee1efe5.json
Implement more of @reitermarkus's comments - Include tests in context - replace 'route' with 'path' - more assorted fixes
Library/Homebrew/test/cask/cli/upgrade_spec.rb
@@ -3,7 +3,7 @@ describe Hbc::CLI::Upgrade, :cask do it_behaves_like "a command that handles invalid options" - shared_context "Proper Casks" do + context "successful upgrade" do let(:installed) { [ "outdated/local-caffeine", @@ -17,164 +17,156 @@ allow_any_instance_of(described_cl...
false
Other
Homebrew
brew
baa3d187d63d5a9bb17fd4dbc052a899b597c2b8.json
Add CVSRequirement and SubversionRequirement Use these two requirements in DependencyCollector. Remove the unused function MacOS::Xcode.provides_cvs?
Library/Homebrew/dependency_collector.rb
@@ -159,7 +159,9 @@ def resource_dep(spec, tags) elsif strategy <= BazaarDownloadStrategy Dependency.new("bazaar", tags) elsif strategy <= CVSDownloadStrategy - Dependency.new("cvs", tags) if MacOS.version >= :mavericks || !MacOS::Xcode.provides_cvs? + CVSRequirement.new(tags) + elsif stra...
true
Other
Homebrew
brew
baa3d187d63d5a9bb17fd4dbc052a899b597c2b8.json
Add CVSRequirement and SubversionRequirement Use these two requirements in DependencyCollector. Remove the unused function MacOS::Xcode.provides_cvs?
Library/Homebrew/os/mac/xcode.rb
@@ -174,10 +174,6 @@ def provides_gcc? version < "4.3" end - def provides_cvs? - version < "5.0" - end - def default_prefix? if version < "4.3" prefix.to_s.start_with? "/Developer"
true
Other
Homebrew
brew
baa3d187d63d5a9bb17fd4dbc052a899b597c2b8.json
Add CVSRequirement and SubversionRequirement Use these two requirements in DependencyCollector. Remove the unused function MacOS::Xcode.provides_cvs?
Library/Homebrew/requirements.rb
@@ -114,10 +114,15 @@ def message end end +class CVSRequirement < Requirement + fatal true + default_formula "cvs" + satisfy { which "cvs" } +end + class MercurialRequirement < Requirement fatal true default_formula "mercurial" - satisfy { which("hg") } end @@ -126,3 +131,9 @@ class GitRequirement...
true
Other
Homebrew
brew
baa3d187d63d5a9bb17fd4dbc052a899b597c2b8.json
Add CVSRequirement and SubversionRequirement Use these two requirements in DependencyCollector. Remove the unused function MacOS::Xcode.provides_cvs?
Library/Homebrew/test/dependency_collector_spec.rb
@@ -84,6 +84,18 @@ def find_requirement(klass) expect(subject.add(resource)).to be_an_instance_of(GitRequirement) end + it "creates a resource dependency from a CVS URL" do + resource = Resource.new + resource.url(":pserver:anonymous:@example.com:/cvsroot/foo/bar", using: :cvs) + expect(...
true
Other
Homebrew
brew
9be85385b33491185fc0defdf0e7cec7639081f6.json
lines_cop: Add condition to prevent false positives
Library/Homebrew/rubocops/lines_cop.rb
@@ -331,6 +331,7 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node) end find_instance_method_call(body_node, "Dir", :[]) do |method| + next unless parameters(method).size == 1 path = parameters(method).first next unless path.str_type? ...
false
Other
Homebrew
brew
7ee98eb421380afd45144ef8df1656cb22d4bb66.json
Implement more of @reitermarkus's comments - Simplify outdated Casks checks - Make use of RSpec's let(:) and .and syntax
Library/Homebrew/cask/lib/hbc/cli/upgrade.rb
@@ -12,7 +12,8 @@ def initialize(*) end def run - outdated_casks = casks(alternative: -> { Hbc.installed }).select { |cask| cask.outdated?(greedy?) || (args.include?(cask.token) && cask.outdated?(true)) } + outdated_casks = casks(alternative: -> { Hbc.installed.select { |cask| + c...
true
Other
Homebrew
brew
7ee98eb421380afd45144ef8df1656cb22d4bb66.json
Implement more of @reitermarkus's comments - Simplify outdated Casks checks - Make use of RSpec's let(:) and .and syntax
Library/Homebrew/test/cask/cli/upgrade_spec.rb
@@ -4,28 +4,30 @@ it_behaves_like "a command that handles invalid options" shared_context "Proper Casks" do - before(:example) do - installed = - [ - "outdated/local-caffeine", - "outdated/local-transmission", - "outdated/auto-updates", - ] + let(:installed) {...
true
Other
Homebrew
brew
e32299e6527e51a06dbe3966dcaae0bca775808f.json
patch: Use patch found in the PATH
Library/Homebrew/patch.rb
@@ -64,10 +64,9 @@ def contents; end def apply data = contents.gsub("HOMEBREW_PREFIX", HOMEBREW_PREFIX) - cmd = "/usr/bin/patch" args = %W[-g 0 -f -#{strip}] - IO.popen("#{cmd} #{args.join(" ")}", "w") { |p| p.write(data) } - raise ErrorDuringExecution.new(cmd, args) unless $CHILD_STATUS.success...
false
Other
Homebrew
brew
28f4d68b31959483a2245a17e4b28fa5e440c8d5.json
bottle: use HOMEBREW_GIT_* vars. This allows them to be passed through from `brew test-bot`.
Library/Homebrew/dev-cmd/bottle.rb
@@ -469,6 +469,17 @@ def merge end unless ARGV.include? "--no-commit" + if ENV["HOMEBREW_GIT_NAME"] + ENV["GIT_AUTHOR_NAME"] = + ENV["GIT_COMMITTER_NAME"] = + ENV["HOMEBREW_GIT_NAME"] + end + if ENV["HOMEBREW_GIT_EMAIL"] + ...
false
Other
Homebrew
brew
9ebf3388040f696f61144c5baf50673fcadadff6.json
diagnostic: fix paths usage. - Don't allow taking an argument. This doesn't work and never has as it caches the result regardless of the argument. - Don't rely on the PATH to check for external commands.
Library/Homebrew/diagnostic.rb
@@ -434,7 +434,7 @@ def check_user_path_1 message = "" - paths(ENV["HOMEBREW_PATH"]).each do |p| + paths.each do |p| case p when "/usr/bin" unless @seen_prefix_bin @@ -577,7 +577,7 @@ def check_for_config_scripts /Applications/Server.app/Contents/...
true
Other
Homebrew
brew
9ebf3388040f696f61144c5baf50673fcadadff6.json
diagnostic: fix paths usage. - Don't allow taking an argument. This doesn't work and never has as it caches the result regardless of the argument. - Don't rely on the PATH to check for external commands.
Library/Homebrew/test/diagnostic_spec.rb
@@ -194,7 +194,7 @@ FileUtils.chmod 0755, cmd end - ENV["PATH"] = [path1, path2, ENV["PATH"]].join File::PATH_SEPARATOR + allow(Tap).to receive(:cmd_directories).and_return([path1, path2]) expect(subject.check_for_external_cmd_name_conflict) .to match("brew-foo"...
true
Other
Homebrew
brew
9ebf3388040f696f61144c5baf50673fcadadff6.json
diagnostic: fix paths usage. - Don't allow taking an argument. This doesn't work and never has as it caches the result regardless of the argument. - Don't rely on the PATH to check for external commands.
Library/Homebrew/utils.rb
@@ -420,8 +420,8 @@ def nostdout end end -def paths(env_path = ENV["PATH"]) - @paths ||= PATH.new(env_path).collect do |p| +def paths + @paths ||= PATH.new(ENV["HOMEBREW_PATH"]).collect do |p| begin File.expand_path(p).chomp("/") rescue ArgumentError
true
Other
Homebrew
brew
36fe355159385669fbd5c294b901ed1df5bc745f.json
Add tests for upgrade recovery
Library/Homebrew/cask/lib/hbc/cli/upgrade.rb
@@ -41,6 +41,9 @@ def run require_sha: require_sha?, upgrade: true) + started_upgrade = false + new_artifacts_installed = false + begin # Start new Cask's installation steps new_cask_ins...
true
Other
Homebrew
brew
36fe355159385669fbd5c294b901ed1df5bc745f.json
Add tests for upgrade recovery
Library/Homebrew/test/cask/cli/upgrade_spec.rb
@@ -3,21 +3,39 @@ describe Hbc::CLI::Upgrade, :cask do it_behaves_like "a command that handles invalid options" - before(:example) do - installed = - [ - "outdated/local-caffeine", - "outdated/local-transmission", - "outdated/auto-updates", - ] + shared_context "Proper Casks" d...
true
Other
Homebrew
brew
36fe355159385669fbd5c294b901ed1df5bc745f.json
Add tests for upgrade recovery
Library/Homebrew/test/support/fixtures/cask/Casks/outdated/bad-checksum.rb
@@ -0,0 +1,9 @@ +cask 'bad-checksum' do + version '1.2.2' + sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94' + + url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip" + homepage 'http://example.com/local-caffeine' + + app 'Caffeine.app' +end
true
Other
Homebrew
brew
36fe355159385669fbd5c294b901ed1df5bc745f.json
Add tests for upgrade recovery
Library/Homebrew/test/support/fixtures/cask/Casks/outdated/will-fail-if-upgraded.rb
@@ -0,0 +1,9 @@ +cask 'will-fail-if-upgraded' do + version '1.2.2' + sha256 'fab685fabf73d5a9382581ce8698fce9408f5feaa49fa10d9bc6c510493300f5' + + url "file://#{TEST_FIXTURE_DIR}/cask/container.tar.gz" + homepage 'https://example.com/container-tar-gz' + + app 'container' +end
true
Other
Homebrew
brew
36fe355159385669fbd5c294b901ed1df5bc745f.json
Add tests for upgrade recovery
Library/Homebrew/test/support/fixtures/cask/Casks/will-fail-if-upgraded.rb
@@ -0,0 +1,9 @@ +cask 'will-fail-if-upgraded' do + version '1.2.3' + sha256 'e44ffa103fbf83f55c8d0b1bea309a43b2880798dae8620b1ee8da5e1095ec68' + + url "file://#{TEST_FIXTURE_DIR}/cask/transmission-2.61.dmg" + homepage 'http://example.com/local-transmission' + + app 'container' +end
true
Other
Homebrew
brew
fea5350d52de54eca9d6f30c67bd2fa008ca8328.json
Add line break to string
Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb
@@ -46,8 +46,10 @@ def initialize(*) return if DSL::DSL_METHODS.include?(stanza) raise ArgumentError, - "Unknown/unsupported stanza: '#{stanza}' Check cask reference"\ - " for supported stanzas." + <<~EOS + Unknown/unsupported stanza: '#{stanza}' + Ch...
true
Other
Homebrew
brew
fea5350d52de54eca9d6f30c67bd2fa008ca8328.json
Add line break to string
Library/Homebrew/test/cask/cli/internal_stanza_spec.rb
@@ -9,7 +9,7 @@ it "raises an exception when stanza is unknown/unsupported" do expect { described_class.new("this_stanza_does_not_exist", "with-gpg") - }.to raise_error(/Unknown\/unsupported stanza/) + }.to raise_error(%r{Unknown/unsupported stanza}) end it "raises an exception when normal ...
true
Other
Homebrew
brew
5eab54f892cfac39c78a3d092f3084ce817fca04.json
Reduce verbosity of artifacts hash
Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb
@@ -66,7 +66,7 @@ def run end if stanza == :artifacts - value = Hash[value.map { |v| [v.class.dsl_key, v] }] + value = Hash[value.map { |v| [v.class.dsl_key, v.to_s] }] value = value[artifact_name] if artifact_name end
false
Other
Homebrew
brew
52343142a7d9cb871fc1f4affc3edb9caff69ab5.json
Remove unused variables. Refactor code
Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb
@@ -24,9 +24,6 @@ class InternalStanza < AbstractInternalCommand ARTIFACTS = DSL::ORDINARY_ARTIFACT_CLASSES.map(&:dsl_key) + DSL::ARTIFACT_BLOCK_CLASSES.map(&:dsl_key) - ARTIFACTS_CLASSES = - DSL::ORDINARY_ARTIFACT_CLASSES + - DSL::ARTIFACT_BLOCK_CLASSES option "--ta...
false
Other
Homebrew
brew
255e991cc32da3141afc1a50e1f643d8e028a9f6.json
Remove obsolete code to fix tests.
Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb
@@ -66,7 +66,6 @@ def run end if value.nil? || (value.respond_to?(:to_a) && value.to_a.empty?) || - (value.respond_to?(:to_h) && value.to_h.empty?) || (value.respond_to?(:to_s) && value.to_s == "{}") || (artifact_name && !value.key?(artifact_name))
false
Other
Homebrew
brew
7f70080c94b6ef9b772b3464a0c0bb9420a407e0.json
Add another test to increase coverage.
Library/Homebrew/test/cask/cli/internal_stanza_spec.rb
@@ -25,4 +25,11 @@ command.run end.to raise_error(/no such stanza/) end + + it "shows all artifact stanzas when using 'artifacts' keyword" do + command = described_class.new("artifacts", "with-gpg") + expect do + command.run + end.to output("{:app=>[[\"Caffeine.app\"]]}\n").to_stdout + en...
false
Other
Homebrew
brew
4d4722c97c2e92f1fd17ed056f5a700e881eab4d.json
Remove more uses of EOS.undent.
Library/Homebrew/test/dev-cmd/audit_spec.rb
@@ -221,7 +221,7 @@ class Foo < Formula describe "a dependency on a macOS-provided keg-only formula" do describe "which is whitelisted" do let(:fa) do - formula_auditor "foo", <<-EOS.undent, new_formula: true + formula_auditor "foo", <<~EOS, new_formula: true class Fo...
true
Other
Homebrew
brew
4d4722c97c2e92f1fd17ed056f5a700e881eab4d.json
Remove more uses of EOS.undent.
docs/Formula-Cookbook.md
@@ -553,7 +553,7 @@ Sometimes a package fails to build when using a certain compiler. Since recent [ ```ruby fails_with :llvm do build 2335 - cause <<-EOS.undent + cause <<~EOS The "cause" field should include a short summary of the error. Include the URLs of any relevant information, such as upstream ...
true
Other
Homebrew
brew
5f301755c0ee06689981197e7aa7d4c7d95434a2.json
Use HOMEBREW_AUTO_UPDATE_CHECKED variable. Rather than reusing `HOMEBREW_NO_AUTO_UPDATE` to indicate that we've already made a check. This allows `HOMEBREW_NO_AUTO_UPDATE` to be displayed properly by `brew config`.
Library/Homebrew/brew.sh
@@ -312,6 +312,7 @@ update-preinstall-timer() { update-preinstall() { [[ -z "$HOMEBREW_HELP" ]] || return [[ -z "$HOMEBREW_NO_AUTO_UPDATE" ]] || return + [[ -z "$HOMEBREW_AUTO_UPDATE_CHECKED" ]] || return [[ -z "$HOMEBREW_UPDATE_PREINSTALL" ]] || return if [[ "$HOMEBREW_COMMAND" = "install" || "$HOMEBRE...
true
Other
Homebrew
brew
5f301755c0ee06689981197e7aa7d4c7d95434a2.json
Use HOMEBREW_AUTO_UPDATE_CHECKED variable. Rather than reusing `HOMEBREW_NO_AUTO_UPDATE` to indicate that we've already made a check. This allows `HOMEBREW_NO_AUTO_UPDATE` to be displayed properly by `brew config`.
Library/Homebrew/system_config.rb
@@ -181,6 +181,7 @@ def dump_verbose_config(f = $stdout) HOMEBREW_ANALYTICS_ID HOMEBREW_ANALYTICS_USER_UUID + HOMEBREW_AUTO_UPDATE_CHECKED HOMEBREW_BREW_FILE HOMEBREW_COMMAND_DEPTH HOMEBREW_CURL
true
Other
Homebrew
brew
3f8f2c672632d74c188adab5d7fdc879ef0c008a.json
bump-formula-pr: use GitHub vars under env filter. Ensure that the various variables are passed through and reset correctly. If we end up doing this in a bunch of places we may add some helpers to simplify this.
Library/Homebrew/dev-cmd/bump-formula-pr.rb
@@ -117,6 +117,14 @@ def bump_formula_pr # user path, too. ENV["PATH"] = ENV["HOMEBREW_PATH"] + # Setup GitHub environment variables + %w[GITHUB_USER GITHUB_PASSWORD GITHUB_TOKEN].each do |env| + homebrew_env = ENV["HOMEBREW_#{env}"] + next unless homebrew_env + next if homebrew_env.emp...
true
Other
Homebrew
brew
3f8f2c672632d74c188adab5d7fdc879ef0c008a.json
bump-formula-pr: use GitHub vars under env filter. Ensure that the various variables are passed through and reset correctly. If we end up doing this in a bunch of places we may add some helpers to simplify this.
bin/brew
@@ -47,7 +47,8 @@ HOMEBREW_LIBRARY="$HOMEBREW_REPOSITORY/Library" # Whitelist and copy to HOMEBREW_* all variables previously mentioned in # manpage or used elsewhere by Homebrew. for VAR in AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY BINTRAY_USER BINTRAY_KEY \ - BROWSER EDITOR GIT PATH VISUAL + BROW...
true
Other
Homebrew
brew
ac799d9f2d8cff87d01b69174056f65552517721.json
brew list --pinned: pass explicit sort to handle APFS
Library/Homebrew/cmd/list.rb
@@ -108,7 +108,7 @@ def filtered_list end if ARGV.include? "--pinned" pinned_versions = {} - names.each do |d| + names.sort.each do |d| keg_pin = (HOMEBREW_PINNED_KEGS/d.basename.to_s) if keg_pin.exist? || keg_pin.symlink? pinned_versions[d] = keg_pin.readlink.bas...
false
Other
Homebrew
brew
ccecdab4cd069a82820e239c1821076396314826.json
brew list --versions: pass explicit sort to handle APFS
Library/Homebrew/cmd/list.rb
@@ -118,7 +118,7 @@ def filtered_list puts d.basename.to_s.concat(ARGV.include?("--versions") ? " #{version}" : "") end else # --versions without --pinned - names.each do |d| + names.sort.each do |d| versions = d.subdirs.map { |pn| pn.basename.to_s } next if ARGV.include...
false
Other
Homebrew
brew
e300713f253029ef91a86bc4006d316582fc6d13.json
xcode: check Xcode installed before using version. This avoids infinite recursion described in: https://github.com/Homebrew/brew/pull/3422#issuecomment-342001451
Library/Homebrew/os/mac/xcode.rb
@@ -272,7 +272,9 @@ def version def detect_version # CLT isn't a distinct entity pre-4.3, and pkgutil doesn't exist # at all on Tiger, so just count it as installed if Xcode is installed - return MacOS::Xcode.version if MacOS::Xcode.version < "3.0" + if MacOS::Xcode.installed? && ...
false
Other
Homebrew
brew
603d6fd1f56a6edb37cbbc70cf1cbfe892455082.json
ENV/super: simplify version checks.
Library/Homebrew/extend/os/mac/extend/ENV/super.rb
@@ -91,18 +91,18 @@ def setup_build_environment(formula = nil) generic_setup_build_environment(formula) self["HOMEBREW_SDKROOT"] = effective_sysroot - if MacOS::Xcode.without_clt? || (MacOS::Xcode.installed? && MacOS::Xcode.version.to_i >= 7) + if MacOS::Xcode.without_clt? || MacOS::Xcode.version.to_i...
false
Other
Homebrew
brew
8c6defd9cf58840bd08af30147a9f6305a219712.json
diagnostic: simplify version checks.
Library/Homebrew/extend/os/mac/diagnostic.rb
@@ -50,7 +50,6 @@ def check_for_unsupported_macos end def check_xcode_up_to_date - return unless MacOS::Xcode.installed? return unless MacOS::Xcode.outdated? # Travis CI images are going to end up outdated so don't complain when @@ -78,7 +77,6 @@ def check_xcode_up_to_date ...
false
Other
Homebrew
brew
b69d71edea36ed8845801c037a72e92dace248a8.json
system_config: handle new non-string Xcode version
Library/Homebrew/extend/os/mac/system_config.rb
@@ -4,7 +4,7 @@ def xcode if instance_variable_defined?(:@xcode) @xcode elsif MacOS::Xcode.installed? - @xcode = MacOS::Xcode.version + @xcode = MacOS::Xcode.version.to_s @xcode += " => #{MacOS::Xcode.prefix}" unless MacOS::Xcode.default_prefix? @xcode end
false
Other
Homebrew
brew
f0b25b5482ba43611c77d94c2326c35f14b6de3d.json
requirement: convert Cellar path to opt path.
Library/Homebrew/requirement.rb
@@ -77,7 +77,11 @@ def default_formula? def satisfied_result_parent return unless @satisfied_result.is_a?(Pathname) - @satisfied_result.resolved_path.parent + parent = @satisfied_result.resolved_path.parent + if parent.to_s =~ %r{^#{Regexp.escape(HOMEBREW_CELLAR)}/([\w+-.@]+)/[^/]+/(s?bin)/?$} + ...
false
Other
Homebrew
brew
04367c4dafdf85a47a7f9f5e8444b1ad1a5cd5af.json
bump-formula-pr: --message: add newlines before and after hr Without an empty line before the horizontal rule (---), "Created with `brew bump-formula-pr`." is treated as a setext header. The newline before the hr is not part of the heredoc because putting it in would trip up Rubocop.
Library/Homebrew/dev-cmd/bump-formula-pr.rb
@@ -335,8 +335,9 @@ def bump_formula_pr EOS user_message = ARGV.value("message") if user_message - pr_message += <<~EOS + pr_message += "\n" + <<~EOS --- + #{user_message} EOS end
false
Other
Homebrew
brew
a8788015b69c5525efe2cd47ba67c1e6950d1526.json
Cask doctor: add macOS & Java versions
Library/Homebrew/cask/lib/hbc/cli/doctor.rb
@@ -1,3 +1,5 @@ +require "system_config" + module Hbc class CLI class Doctor < AbstractCommand @@ -9,6 +11,8 @@ def initialize(*) def run ohai "Homebrew-Cask Version", Hbc.full_version + ohai "macOS", MacOS.full_version + ohai "Java", SystemConfig.describe_java ohai "Ho...
false
Other
Homebrew
brew
3769bcc52338a4381d19443c18386f8261297fd7.json
formula: fix safe navigation bug Safe navigation needs to be chained to preserve equivalence. Fixes a bug introduced by 01e9ec9a in #3183.
Library/Homebrew/formula.rb
@@ -1528,10 +1528,10 @@ def to_hash "oldname" => oldname, "aliases" => aliases, "versions" => { - "stable" => stable&.version.to_s, + "stable" => stable&.version&.to_s, "bottle" => bottle ? true : false, - "devel" => devel&.version.to_s, - "head" => head&.versio...
false
Other
Homebrew
brew
eaae7f3a5b7dcce0d6c4a3238547996e886b7144.json
Fix last remaining style issues
Library/Homebrew/cask/lib/hbc/audit.rb
@@ -57,9 +57,8 @@ def check_single_pre_postflight add_warning "only a single preflight stanza is allowed" end - if cask.artifacts.count { |k| k.is_a?(Hbc::Artifact::PostflightBlock) && k.directives.key?(:postflight) } > 1 - add_warning "only a single postflight stanza is allowed" - en...
false
Other
Homebrew
brew
50c09f8c5737336b124ac53d4996b4f61af1590f.json
xcode: expect Xcode 9.1 on Sierra & High Sierra
Library/Homebrew/os/mac/xcode.rb
@@ -17,13 +17,13 @@ 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 "9.0.1" - when "10.13" then "9.0.1" + when "10.12" then "9.1" + when "10.13" then "9.1" else raise "macOS '#{M...
false
Other
Homebrew
brew
7f2e4f583a5789a86712322818612c439307b90d.json
Finalize metadata handling and uninstall logic
Library/Homebrew/cask/lib/hbc/cli/upgrade.rb
@@ -34,25 +34,29 @@ def run old_cask_installer = Installer.new(old_cask, binaries: binaries?, verbose: verbose?, force: force?, upgrade: true) - old_cask_installer.uninstall - - begin - odebug "Installing new version of Cask #{old_cask}" - - new_cask = CaskLoader.l...
true
Other
Homebrew
brew
7f2e4f583a5789a86712322818612c439307b90d.json
Finalize metadata handling and uninstall logic
Library/Homebrew/cask/lib/hbc/installer.rb
@@ -83,8 +83,8 @@ def stage def install odebug "Hbc::Installer#install" - if @cask.installed? && !force? && !@reinstall && !@upgrade - raise CaskAlreadyInstalledError, @cask + if @cask.installed? && !force? && !@reinstall + raise CaskAlreadyInstalledError, @cask unless @upgrade ...
true
Other
Homebrew
brew
8fd18eab2133aeb33fc0f42f9707f69da64d0f8d.json
text_cop: drop go_resource recommendation
Library/Homebrew/rubocops/text_cop.rb
@@ -46,7 +46,7 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node) end find_method_with_args(body_node, :system, "go", "get") do - problem "Formulae should not use `go get`. If non-vendored resources are required use `go_resource`s." + problem "Do not us...
false
Other
Homebrew
brew
917c138eeb4af0cee212f94edc425512dfbade99.json
Add tests for uninstall_* and zap stanzas
Library/Homebrew/test/cask/audit_spec.rb
@@ -91,6 +91,120 @@ def include_msg?(messages, msg) end end + describe "preflight stanza checks" do + let(:error_msg) { "only a single preflight stanza is allowed" } + + context "when the cask has no preflight stanza" do + let(:cask_token) { "with-zap-rmdir" } + it { should_not ...
true
Other
Homebrew
brew
917c138eeb4af0cee212f94edc425512dfbade99.json
Add tests for uninstall_* and zap stanzas
Library/Homebrew/test/support/fixtures/cask/Casks/with-postflight-multi.rb
@@ -0,0 +1,13 @@ +cask 'with-postflight-multi' do + version '1.2.3' + sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' + + url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip" + homepage 'http://example.com/fancy-pkg' + + pkg 'MyFancyPkg/Fancy.pkg' + + postflight do end + + postflight do...
true
Other
Homebrew
brew
917c138eeb4af0cee212f94edc425512dfbade99.json
Add tests for uninstall_* and zap stanzas
Library/Homebrew/test/support/fixtures/cask/Casks/with-postflight.rb
@@ -0,0 +1,11 @@ +cask 'with-postflight' do + version '1.2.3' + sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' + + url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip" + homepage 'http://example.com/fancy-pkg' + + pkg 'MyFancyPkg/Fancy.pkg' + + postflight do end +end
true
Other
Homebrew
brew
917c138eeb4af0cee212f94edc425512dfbade99.json
Add tests for uninstall_* and zap stanzas
Library/Homebrew/test/support/fixtures/cask/Casks/with-preflight-multi.rb
@@ -0,0 +1,13 @@ +cask 'with-preflight-multi' do + version '1.2.3' + sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' + + url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip" + homepage 'http://example.com/fancy-pkg' + + pkg 'MyFancyPkg/Fancy.pkg' + + preflight do end + + preflight do en...
true
Other
Homebrew
brew
917c138eeb4af0cee212f94edc425512dfbade99.json
Add tests for uninstall_* and zap stanzas
Library/Homebrew/test/support/fixtures/cask/Casks/with-preflight.rb
@@ -0,0 +1,11 @@ +cask 'with-preflight' do + version '1.2.3' + sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' + + url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip" + homepage 'http://example.com/fancy-pkg' + + pkg 'MyFancyPkg/Fancy.pkg' + + preflight do end +end
true
Other
Homebrew
brew
917c138eeb4af0cee212f94edc425512dfbade99.json
Add tests for uninstall_* and zap stanzas
Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-multi.rb
@@ -0,0 +1,13 @@ +cask 'with-uninstall-multi' do + version '1.2.3' + sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' + + url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip" + homepage 'http://example.com/fancy-pkg' + + pkg 'MyFancyPkg/Fancy.pkg' + + uninstall rmdir: "#{TEST_TMPDIR}/empt...
true
Other
Homebrew
brew
917c138eeb4af0cee212f94edc425512dfbade99.json
Add tests for uninstall_* and zap stanzas
Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-postflight-multi.rb
@@ -0,0 +1,13 @@ +cask 'with-uninstall-postflight-multi' do + version '1.2.3' + sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' + + url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip" + homepage 'http://example.com/fancy-pkg' + + pkg 'MyFancyPkg/Fancy.pkg' + + uninstall_postflight do en...
true
Other
Homebrew
brew
917c138eeb4af0cee212f94edc425512dfbade99.json
Add tests for uninstall_* and zap stanzas
Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-postflight.rb
@@ -0,0 +1,11 @@ +cask 'with-uninstall-postflight' do + version '1.2.3' + sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' + + url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip" + homepage 'http://example.com/fancy-pkg' + + pkg 'MyFancyPkg/Fancy.pkg' + + uninstall_postflight do end +end
true
Other
Homebrew
brew
917c138eeb4af0cee212f94edc425512dfbade99.json
Add tests for uninstall_* and zap stanzas
Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-preflight-multi.rb
@@ -0,0 +1,13 @@ +cask 'with-uninstall-preflight-multi' do + version '1.2.3' + sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' + + url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip" + homepage 'http://example.com/fancy-pkg' + + pkg 'MyFancyPkg/Fancy.pkg' + + uninstall_preflight do end ...
true
Other
Homebrew
brew
917c138eeb4af0cee212f94edc425512dfbade99.json
Add tests for uninstall_* and zap stanzas
Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-preflight.rb
@@ -0,0 +1,11 @@ +cask 'with-uninstall-preflight' do + version '1.2.3' + sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' + + url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip" + homepage 'http://example.com/fancy-pkg' + + pkg 'MyFancyPkg/Fancy.pkg' + + uninstall_preflight do end +end
true
Other
Homebrew
brew
917c138eeb4af0cee212f94edc425512dfbade99.json
Add tests for uninstall_* and zap stanzas
Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-multi.rb
@@ -0,0 +1,13 @@ +cask 'with-zap-multi' do + version '1.2.3' + sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' + + url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip" + homepage 'http://example.com/fancy-pkg' + + pkg 'MyFancyPkg/Fancy.pkg' + + zap rmdir: "#{TEST_TMPDIR}/empty_directory_...
true
Other
Homebrew
brew
55727b789532fbfa7997929aa0506d7843eda3ce.json
Hack a first working version of upgrade
Library/Homebrew/cask/lib/hbc/cli.rb
@@ -21,6 +21,7 @@ require "hbc/cli/search" require "hbc/cli/style" require "hbc/cli/uninstall" +require "hbc/cli/upgrade" require "hbc/cli/--version" require "hbc/cli/zap"
true
Other
Homebrew
brew
55727b789532fbfa7997929aa0506d7843eda3ce.json
Hack a first working version of upgrade
Library/Homebrew/cask/lib/hbc/cli/upgrade.rb
@@ -0,0 +1,65 @@ +module Hbc + class CLI + class Upgrade < AbstractCommand + option "--greedy", :greedy, false + option "--quiet", :quiet, false + option "--force", :force, false + option "--force-update", :force_update, false + option "--skip-cask-deps", :skip_cask_deps, false + + de...
true
Other
Homebrew
brew
55727b789532fbfa7997929aa0506d7843eda3ce.json
Hack a first working version of upgrade
Library/Homebrew/cask/lib/hbc/installer.rb
@@ -19,7 +19,7 @@ class Installer PERSISTENT_METADATA_SUBDIRS = ["gpg"].freeze - def initialize(cask, command: SystemCommand, force: false, skip_cask_deps: false, binaries: true, verbose: false, require_sha: false) + def initialize(cask, command: SystemCommand, force: false, skip_cask_deps: false, binari...
true
Other
Homebrew
brew
55727b789532fbfa7997929aa0506d7843eda3ce.json
Hack a first working version of upgrade
Library/Homebrew/test/cask/cli/upgrade_spec.rb
@@ -0,0 +1,78 @@ +require_relative "shared_examples/invalid_option" + +describe Hbc::CLI::Upgrade, :cask do + let(:installed) do + [ + Hbc::CaskLoader.load(cask_path("outdated/local-caffeine")), + Hbc::CaskLoader.load(cask_path("outdated/local-transmission")), + Hbc::CaskLoader.load(cask_path("outdat...
true
Other
Homebrew
brew
35493774785fbe870881c9cf5f7e4d66ab4926d2.json
cmd/sh: set working PS1 for zsh. The `bash`, default one is broken on `zsh`.
Library/Homebrew/cmd/sh.rb
@@ -25,7 +25,11 @@ def sh # superenv stopped adding brew's bin but generally users will want it ENV["PATH"] = PATH.new(ENV["PATH"]).insert(1, HOMEBREW_PREFIX/"bin") end - ENV["PS1"] = 'brew \[\033[1;32m\]\w\[\033[0m\]$ ' + if ENV["SHELL"].include?("zsh") + ENV["PS1"] = "brew %B%F{green}~%f...
false
Other
Homebrew
brew
640b1e9dcb3fb96f6a54c0d63da4fb1985351a83.json
formula_desc_cop: ensure no full stops at the end of desc - This was a suggestion by Mike McQuaid in my `homebrew-core` audit description PR. Based on ilovezfs's incantation `grep -r -E 'desc ".*\."' *.rb`, some formulae descriptions do end in full stops. (My initial assessment of this failed to account for the ...
Library/Homebrew/rubocops/formula_desc_cop.rb
@@ -40,6 +40,7 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node) # - Checks for correct usage of `command-line` in `desc` # - Checks description starts with a capital letter # - Checks if `desc` contains the formula name + # - Checks if `desc` ends with a full stop ...
true
Other
Homebrew
brew
640b1e9dcb3fb96f6a54c0d63da4fb1985351a83.json
formula_desc_cop: ensure no full stops at the end of desc - This was a suggestion by Mike McQuaid in my `homebrew-core` audit description PR. Based on ilovezfs's incantation `grep -r -E 'desc ".*\."' *.rb`, some formulae descriptions do end in full stops. (My initial assessment of this failed to account for the ...
Library/Homebrew/test/rubocops/formula_desc_cop_spec.rb
@@ -91,6 +91,16 @@ class Foo < Formula RUBY end + it "When the description ends with a full stop" do + expect_offense(<<~RUBY, "/homebrew-core/Formula/foo.rb") + class Foo < Formula + url 'http://example.com/foo-1.0.tgz' + desc 'Description with a full stop at the end.' + ...
true
Other
Homebrew
brew
3448335a14612bc7d3d426f79e3705b2bdad26cd.json
system_config: get perl/ruby from HOMEBREW_PATH. This is the actual user path when env filtering is enabled.
Library/Homebrew/system_config.rb
@@ -73,7 +73,7 @@ def describe_path(path) end def describe_perl - describe_path(which("perl")) + describe_path(which("perl", ENV["HOMEBREW_PATH"])) end def describe_python @@ -96,7 +96,7 @@ def describe_python end def describe_ruby - ruby = which "ruby" + ruby = w...
false
Other
Homebrew
brew
526299913fe757af28de9bad868635124b26e071.json
Remove usless comments.
Library/Homebrew/diagnostic.rb
@@ -1097,7 +1097,7 @@ def check_for_tap_ruby_files_locations def all methods.map(&:to_s).grep(/^check_/) end - end # end class Checks + end end end
true
Other
Homebrew
brew
526299913fe757af28de9bad868635124b26e071.json
Remove usless comments.
Library/Homebrew/language/python.rb
@@ -245,7 +245,7 @@ def do_install(targets) "-v", "--no-deps", "--no-binary", ":all:", "--ignore-installed", *targets end - end # class Virtualenv - end # module Virtualenv - end # module Python -end # module Language + end + end + end +en...
true
Other
Homebrew
brew
d067b5f4344b31beef8cf0adb494c819a0e337bf.json
lines_cop: fix clang detection. We only care about e.g. `gcc`/`llvm-gcc`/`clang` being at the beginning of a `system` call and not anywhere within the string.
Library/Homebrew/rubocops/lines_cop.rb
@@ -176,7 +176,7 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node) # Avoid hard-coding compilers find_every_method_call_by_name(body_node, :system).each do |method| param = parameters(method).first - if match = regex_match_group(param, %r{(/usr/bin/)?(...
false
Other
Homebrew
brew
1937625d861ef1ef7bc0796477fdb81e7dbb9cf4.json
github: require formula name to be in issue title
Library/Homebrew/utils/github.rb
@@ -235,7 +235,7 @@ def search_code(**qualifiers) def issues_for_formula(name, options = {}) tap = options[:tap] || CoreTap.instance - search_issues(name, state: "open", repo: "#{tap.user}/homebrew-#{tap.repo}") + search_issues(name, state: "open", repo: "#{tap.user}/homebrew-#{tap.repo}", in: "title") ...
false
Other
Homebrew
brew
6554b2595bc4ea6427d3838f023fd52b238366e2.json
docs: fix poor visibility in syntax highlighting
docs/css/pygments.css
@@ -33,7 +33,7 @@ .ne { color: #990000; font-weight: bold } /* Name.Exception */ .nf { color: #999999; font-weight: bold } /* Name.Function */ .nn { color: #555555 } /* Name.Namespace */ -.nt { color: #000080 } /* Name.Tag */ +.nt { color: #008080 } /* Name.Tag */ .nv { color: #008080 } /* Name.Variable */ .ow { f...
false