aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore8
-rw-r--r--Library/Homebrew/brew.sh4
-rw-r--r--Library/Homebrew/cask/Gemfile9
-rw-r--r--Library/Homebrew/cask/Gemfile.lock46
-rwxr-xr-xLibrary/Homebrew/cask/cmd/brew-cask-tests.rb7
-rw-r--r--Library/Homebrew/cask/lib/hbc/auditor.rb67
-rw-r--r--Library/Homebrew/cask/lib/hbc/caskroom.rb27
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli.rb1
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/reinstall.rb49
-rw-r--r--Library/Homebrew/cask/lib/hbc/download_strategy.rb2
-rw-r--r--Library/Homebrew/cask/lib/hbc/dsl/depends_on.rb21
-rw-r--r--Library/Homebrew/cask/lib/hbc/qualified_token.rb34
-rw-r--r--Library/Homebrew/cask/lib/hbc/url_checker.rb1
-rw-r--r--Library/Homebrew/cask/spec/support/Casks/with-binary.rb2
-rw-r--r--Library/Homebrew/cask/spec/support/Casks/with-embedded-binary.rb2
-rw-r--r--Library/Homebrew/cask/spec/support/file_helper.rb16
-rw-r--r--Library/Homebrew/cask/test/cask/accessibility_test.rb98
-rw-r--r--Library/Homebrew/cask/test/cask/artifact/alt_target_test.rb2
-rw-r--r--Library/Homebrew/cask/test/cask/artifact/app_test.rb2
-rw-r--r--Library/Homebrew/cask/test/cask/artifact/uninstall_test.rb2
-rw-r--r--Library/Homebrew/cask/test/cask/artifact/zap_test.rb2
-rw-r--r--Library/Homebrew/cask/test/cask/cli/audit_test.rb39
-rw-r--r--Library/Homebrew/cask/test/cask/cli/reinstall_test.rb27
-rw-r--r--Library/Homebrew/cask/test/cask/dsl_test.rb64
-rw-r--r--Library/Homebrew/cask/test/cask/installer_test.rb52
-rw-r--r--Library/Homebrew/cask/test/cask/url_checker_test.rb64
-rw-r--r--Library/Homebrew/cask/test/support/Casks/appdir-interpolation.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/auto-updates.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/bad-checksum.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/container-7z.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/container-air.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/container-bzip2.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/container-cab.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/container-dmg.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/container-gzip.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/container-lzma.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/container-pkg.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/container-rar.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/container-sit.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/container-tar-gz.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/container-xar.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/container-xz.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/invalid/invalid-appcast-multiple.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/invalid/invalid-appcast-url.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/invalid/invalid-conflicts-with-key.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-arch-value.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-key.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-macos-bad-release.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-macos-conflicting-forms.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-x11-value.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-conflicting-keys.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-key-id.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-key-url.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-missing-key.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-multiple-stanzas.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-parameter.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-signature-url.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-type.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/invalid/invalid-header-format.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/invalid/invalid-header-token-mismatch.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/invalid/invalid-header-version.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/invalid/invalid-stage-only-conflict.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/invalid/invalid-two-homepage.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/invalid/invalid-two-url.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/invalid/invalid-two-version.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/local-caffeine.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/local-transmission.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/missing-checksum.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/naked-executable.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/nested-app.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/no-checksum.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/stage-only.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-alt-target.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-appcast.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-caveats.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-conditional-caveats.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-conflicts-with.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-depends-on-arch-failure.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-depends-on-arch.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-depends-on-cask-cyclic-helper.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-depends-on-cask-cyclic.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-depends-on-cask-multiple.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-depends-on-cask.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-depends-on-formula-multiple.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-depends-on-formula.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-array.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-comparison.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-failure.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-string.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-symbol.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-depends-on-x11-false.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-depends-on-x11.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-generic-artifact-no-target.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-generic-artifact.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-gpg-key-url.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-gpg.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-installable.rb4
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-installer-manual.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-installer-script.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-macosx-dir.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-pkgutil-zap.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-suite.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-two-apps-correct.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-two-apps-incorrect.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-two-apps-subdir.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-uninstall-delete.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-uninstall-early-script.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-uninstall-kext.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-uninstall-launchctl.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-uninstall-login-item.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-uninstall-pkgutil.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-uninstall-quit.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-uninstall-rmdir.rb4
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-uninstall-script.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-uninstall-signal.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-uninstall-trash.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-zap-delete.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-zap-early-script.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-zap-kext.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-zap-launchctl.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-zap-login-item.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-zap-pkgutil.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-zap-quit.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-zap-rmdir.rb4
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-zap-script.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-zap-signal.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-zap-trash.rb2
-rw-r--r--Library/Homebrew/cask/test/support/Casks/with-zap.rb2
-rw-r--r--Library/Homebrew/cask/test/support/fake_fetcher.rb39
-rw-r--r--Library/Homebrew/cask/test/test_helper.rb1
-rw-r--r--Library/Homebrew/cmd/gist-logs.rb21
-rw-r--r--Library/Homebrew/cmd/install.rb2
-rw-r--r--Library/Homebrew/dev-cmd/audit.rb41
-rw-r--r--Library/Homebrew/dev-cmd/boneyard-formula-pr.rb16
-rw-r--r--Library/Homebrew/dev-cmd/bottle.rb18
-rw-r--r--Library/Homebrew/dev-cmd/tests.rb5
-rw-r--r--Library/Homebrew/dev-cmd/update-test.rb2
-rw-r--r--Library/Homebrew/extend/ARGV.rb2
-rw-r--r--Library/Homebrew/extend/os/mac/extend/ENV/super.rb2
-rw-r--r--Library/Homebrew/extend/os/mac/keg_relocate.rb12
-rw-r--r--Library/Homebrew/formula.rb2
-rw-r--r--Library/Homebrew/formula_installer.rb14
-rw-r--r--Library/Homebrew/keg_relocate.rb65
-rw-r--r--Library/Homebrew/manpages/brew-cask.1.md3
-rw-r--r--Library/Homebrew/metafiles.rb14
-rw-r--r--Library/Homebrew/os/mac/xcode.rb10
-rwxr-xr-xLibrary/Homebrew/shims/super/cc2
-rw-r--r--Library/Homebrew/tab.rb1
-rw-r--r--Library/Homebrew/tap_constants.rb4
-rw-r--r--Library/Homebrew/test/Gemfile3
-rw-r--r--Library/Homebrew/test/Gemfile.lock13
-rw-r--r--Library/Homebrew/test/fixtures/cask/AppWithBinary.zip (renamed from Library/Homebrew/cask/spec/support/binaries/AppWithBinary.zip)bin306 -> 306 bytes
-rw-r--r--Library/Homebrew/test/fixtures/cask/AppWithEmbeddedBinary.zip (renamed from Library/Homebrew/cask/spec/support/binaries/AppWithEmbeddedBinary.zip)bin618 -> 618 bytes
-rw-r--r--Library/Homebrew/test/fixtures/cask/MyFancyApp.zip (renamed from Library/Homebrew/cask/test/support/binaries/MyFancyApp.zip)bin304 -> 304 bytes
-rw-r--r--Library/Homebrew/test/fixtures/cask/MyFancyPkg.zip (renamed from Library/Homebrew/cask/test/support/binaries/MyFancyPkg.zip)bin532 -> 532 bytes
-rw-r--r--Library/Homebrew/test/fixtures/cask/NestedApp.dmg.zip (renamed from Library/Homebrew/cask/test/support/binaries/NestedApp.dmg.zip)bin2494 -> 2494 bytes
-rw-r--r--Library/Homebrew/test/fixtures/cask/caffeine-suite.zip (renamed from Library/Homebrew/cask/test/support/binaries/caffeine-suite.zip)bin3170 -> 3170 bytes
-rw-r--r--Library/Homebrew/test/fixtures/cask/caffeine.zip (renamed from Library/Homebrew/cask/test/support/binaries/caffeine.zip)bin1328 -> 1328 bytes
-rw-r--r--Library/Homebrew/test/fixtures/cask/caffeines-subdir.zip (renamed from Library/Homebrew/cask/test/support/binaries/caffeines-subdir.zip)bin3240 -> 3240 bytes
-rw-r--r--Library/Homebrew/test/fixtures/cask/caffeines.zip (renamed from Library/Homebrew/cask/test/support/binaries/caffeines.zip)bin2796 -> 2796 bytes
-rw-r--r--Library/Homebrew/test/fixtures/cask/container.7z (renamed from Library/Homebrew/cask/test/support/binaries/container.7z)bin143 -> 143 bytes
-rw-r--r--Library/Homebrew/test/fixtures/cask/container.air (renamed from Library/Homebrew/cask/test/support/binaries/container.air)bin5934 -> 5934 bytes
-rwxr-xr-xLibrary/Homebrew/test/fixtures/cask/container.bz2 (renamed from Library/Homebrew/cask/test/support/binaries/container.bz2)bin59 -> 59 bytes
-rw-r--r--Library/Homebrew/test/fixtures/cask/container.cab (renamed from Library/Homebrew/cask/test/support/binaries/container.cab)bin95 -> 95 bytes
-rw-r--r--Library/Homebrew/test/fixtures/cask/container.dmg (renamed from Library/Homebrew/cask/test/support/binaries/container.dmg)bin25337 -> 25337 bytes
-rwxr-xr-xLibrary/Homebrew/test/fixtures/cask/container.gz (renamed from Library/Homebrew/cask/test/support/binaries/container.gz)bin47 -> 47 bytes
-rwxr-xr-xLibrary/Homebrew/test/fixtures/cask/container.lzma (renamed from Library/Homebrew/cask/test/support/binaries/container.lzma)bin41 -> 41 bytes
-rw-r--r--Library/Homebrew/test/fixtures/cask/container.pkg (renamed from Library/Homebrew/cask/test/support/binaries/container.pkg)bin516 -> 516 bytes
-rw-r--r--Library/Homebrew/test/fixtures/cask/container.rar (renamed from Library/Homebrew/cask/test/support/binaries/container.rar)bin87 -> 87 bytes
-rwxr-xr-xLibrary/Homebrew/test/fixtures/cask/container.sit (renamed from Library/Homebrew/cask/test/support/binaries/container.sit)bin236 -> 236 bytes
-rw-r--r--Library/Homebrew/test/fixtures/cask/container.tar.gz (renamed from Library/Homebrew/cask/test/support/binaries/container.tar.gz)bin154 -> 154 bytes
-rw-r--r--Library/Homebrew/test/fixtures/cask/container.xar (renamed from Library/Homebrew/cask/test/support/binaries/container.xar)bin4679 -> 4679 bytes
-rwxr-xr-xLibrary/Homebrew/test/fixtures/cask/container.xz (renamed from Library/Homebrew/cask/test/support/binaries/container.xz)bin76 -> 76 bytes
-rw-r--r--Library/Homebrew/test/fixtures/cask/empty_directory/.gitignore (renamed from Library/Homebrew/cask/test/support/binaries/empty_directory/.gitignore)0
-rwxr-xr-xLibrary/Homebrew/test/fixtures/cask/naked_executable (renamed from Library/Homebrew/cask/test/support/binaries/naked_executable)0
-rw-r--r--Library/Homebrew/test/fixtures/cask/transmission-2.61.dmg (renamed from Library/Homebrew/cask/test/support/binaries/transmission-2.61.dmg)bin28490 -> 28490 bytes
-rw-r--r--Library/Homebrew/test/fixtures/receipt.json4
-rw-r--r--Library/Homebrew/test/lib/config.rb2
-rw-r--r--Library/Homebrew/test/test_diagnostic.rb2
-rw-r--r--Library/Homebrew/test/test_exceptions.rb2
-rw-r--r--Library/Homebrew/test/test_formula.rb2
-rw-r--r--Library/Homebrew/test/test_patch.rb2
-rw-r--r--Library/Homebrew/test/test_string.rb2
-rw-r--r--Library/Homebrew/test/test_tab.rb9
-rw-r--r--Library/Homebrew/test/test_update_report.rb2
-rw-r--r--Library/Homebrew/utils/analytics.sh10
-rw-r--r--Library/Homebrew/utils/github.rb29
-rw-r--r--README.md2
-rw-r--r--docs/brew.1.html2
-rw-r--r--manpages/brew-cask.185
-rw-r--r--manpages/brew.12
191 files changed, 734 insertions, 573 deletions
diff --git a/.gitignore b/.gitignore
index 118a02ff8..201be91d8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,15 +8,13 @@
!/Library/
# Ignore generated files within `Library` (again).
+/Library/Homebrew/**/.bundle
+/Library/Homebrew/**/vendor/bundle
/Library/Homebrew/doc
-/Library/Homebrew/cask/.bundle
/Library/Homebrew/cask/bin
-/Library/Homebrew/cask/vendor
/Library/Homebrew/cask/coverage
/Library/Homebrew/cask/tmp
-/Library/Homebrew/test/.bundle
/Library/Homebrew/test/bin
-/Library/Homebrew/test/vendor
/Library/Homebrew/test/coverage
/Library/Homebrew/test/fs_leak_log
/Library/Homebrew/tmp
@@ -26,7 +24,7 @@
/Library/PinnedTaps
/Library/Taps
-# Ignore vendored files within `Library`
+# Ignore vendored files within `Library`.
/Library/Homebrew/vendor/portable-ruby
# Ignore `bin` contents (again).
diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh
index 6189fac84..f3bb605bb 100644
--- a/Library/Homebrew/brew.sh
+++ b/Library/Homebrew/brew.sh
@@ -217,7 +217,7 @@ esac
if [[ -z "$HOMEBREW_DEVELOPER" ]]
then
export HOMEBREW_GIT_CONFIG_FILE="$HOMEBREW_REPOSITORY/.git/config"
- HOMEBREW_GIT_CONFIG_DEVELOPERMODE="$(git config --file="$HOMEBREW_GIT_CONFIG_FILE" --get homebrew.devcmdrun)"
+ HOMEBREW_GIT_CONFIG_DEVELOPERMODE="$(git config --file="$HOMEBREW_GIT_CONFIG_FILE" --get homebrew.devcmdrun 2>/dev/null)"
if [[ "$HOMEBREW_GIT_CONFIG_DEVELOPERMODE" = "true" ]]
then
export HOMEBREW_DEV_CMD_RUN="1"
@@ -231,7 +231,7 @@ elif [[ -f "$HOMEBREW_LIBRARY/Homebrew/dev-cmd/$HOMEBREW_COMMAND.sh" ]]
then
if [[ -z "$HOMEBREW_DEVELOPER" ]]
then
- git config --file="$HOMEBREW_GIT_CONFIG_FILE" --replace-all homebrew.devcmdrun true
+ git config --file="$HOMEBREW_GIT_CONFIG_FILE" --replace-all homebrew.devcmdrun true 2>/dev/null
export HOMEBREW_DEV_CMD_RUN="1"
fi
HOMEBREW_BASH_COMMAND="$HOMEBREW_LIBRARY/Homebrew/dev-cmd/$HOMEBREW_COMMAND.sh"
diff --git a/Library/Homebrew/cask/Gemfile b/Library/Homebrew/cask/Gemfile
index df06bd5d4..5c99338b8 100644
--- a/Library/Homebrew/cask/Gemfile
+++ b/Library/Homebrew/cask/Gemfile
@@ -15,14 +15,15 @@ group :test do
# - https://github.com/colszowka/simplecov/pull/520
gem "simplecov", "0.12.0",
git: "https://github.com/colszowka/simplecov.git",
- branch: "master", # commit 83d8031ddde0927f87ef9327200a98583ca18d77
+ branch: "master",
+ ref: "83d8031ddde0927f87ef9327200a98583ca18d77",
require: false
gem "codecov", require: false
- gem "minitest", "5.4.1"
+ gem "minitest", "~> 5.9"
gem "minitest-reporters"
- gem "mocha", "1.1.0", require: false
+ gem "mocha", "~> 1.1", require: false
gem "parallel_tests"
- gem "rspec", "~> 3.0.0"
+ gem "rspec", "~> 3.5"
gem "rspec-its", require: false
gem "rspec-wait", require: false
end
diff --git a/Library/Homebrew/cask/Gemfile.lock b/Library/Homebrew/cask/Gemfile.lock
index 93dd59712..4bdf2d0f6 100644
--- a/Library/Homebrew/cask/Gemfile.lock
+++ b/Library/Homebrew/cask/Gemfile.lock
@@ -1,6 +1,7 @@
GIT
remote: https://github.com/colszowka/simplecov.git
revision: 83d8031ddde0927f87ef9327200a98583ca18d77
+ ref: 83d8031ddde0927f87ef9327200a98583ca18d77
branch: master
specs:
simplecov (0.12.0)
@@ -13,8 +14,8 @@ GEM
specs:
ansi (1.5.0)
builder (3.2.2)
- byebug (9.0.5)
- codecov (0.1.5)
+ byebug (9.0.6)
+ codecov (0.1.6)
json
simplecov
url
@@ -24,16 +25,16 @@ GEM
json (2.0.2)
metaclass (0.0.4)
method_source (0.8.2)
- minitest (5.4.1)
- minitest-reporters (1.1.11)
+ minitest (5.9.1)
+ minitest-reporters (1.1.12)
ansi
builder
minitest (>= 5.0)
ruby-progressbar
- mocha (1.1.0)
+ mocha (1.2.1)
metaclass (~> 0.0.1)
parallel (1.9.0)
- parallel_tests (2.9.0)
+ parallel_tests (2.10.0)
parallel
pry (0.10.4)
coderay (~> 1.1.0)
@@ -42,22 +43,23 @@ GEM
pry-byebug (3.4.0)
byebug (~> 9.0)
pry (~> 0.10)
- rake (10.4.2)
- rspec (3.0.0)
- rspec-core (~> 3.0.0)
- rspec-expectations (~> 3.0.0)
- rspec-mocks (~> 3.0.0)
- rspec-core (3.0.4)
- rspec-support (~> 3.0.0)
- rspec-expectations (3.0.4)
+ rake (11.3.0)
+ rspec (3.5.0)
+ rspec-core (~> 3.5.0)
+ rspec-expectations (~> 3.5.0)
+ rspec-mocks (~> 3.5.0)
+ rspec-core (3.5.4)
+ rspec-support (~> 3.5.0)
+ rspec-expectations (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
- rspec-support (~> 3.0.0)
+ rspec-support (~> 3.5.0)
rspec-its (1.2.0)
rspec-core (>= 3.0.0)
rspec-expectations (>= 3.0.0)
- rspec-mocks (3.0.4)
- rspec-support (~> 3.0.0)
- rspec-support (3.0.4)
+ rspec-mocks (3.5.0)
+ diff-lcs (>= 1.2.0, < 2.0)
+ rspec-support (~> 3.5.0)
+ rspec-support (3.5.0)
rspec-wait (0.0.9)
rspec (>= 3, < 4)
ruby-progressbar (1.8.1)
@@ -70,17 +72,17 @@ PLATFORMS
DEPENDENCIES
codecov
- minitest (= 5.4.1)
+ minitest (~> 5.9)
minitest-reporters
- mocha (= 1.1.0)
+ mocha (~> 1.1)
parallel_tests
pry
pry-byebug
rake
- rspec (~> 3.0.0)
+ rspec (~> 3.5)
rspec-its
rspec-wait
simplecov (= 0.12.0)!
BUNDLED WITH
- 1.13.1
+ 1.13.6
diff --git a/Library/Homebrew/cask/cmd/brew-cask-tests.rb b/Library/Homebrew/cask/cmd/brew-cask-tests.rb
index 4840ab451..3126490e3 100755
--- a/Library/Homebrew/cask/cmd/brew-cask-tests.rb
+++ b/Library/Homebrew/cask/cmd/brew-cask-tests.rb
@@ -1,5 +1,8 @@
require "English"
+ENV["BUNDLE_GEMFILE"] = "#{HOMEBREW_LIBRARY_PATH}/cask/Gemfile"
+ENV["BUNDLE_PATH"] = "#{HOMEBREW_LIBRARY_PATH}/vendor/bundle"
+
def run_tests(executable, files, args = [])
opts = []
opts << "--serialize-stdout" if ENV["CI"]
@@ -7,7 +10,7 @@ def run_tests(executable, files, args = [])
system "bundle", "exec", executable, *opts, "--", *args, "--", *files
end
-repo_root = Pathname(__FILE__).realpath.parent.parent
+repo_root = Pathname.new(__FILE__).realpath.parent.parent
repo_root.cd do
ENV["HOMEBREW_NO_ANALYTICS_THIS_RUN"] = "1"
ENV["HOMEBREW_NO_EMOJI"] = "1"
@@ -15,7 +18,7 @@ repo_root.cd do
Homebrew.install_gem_setup_path! "bundler"
unless quiet_system("bundle", "check")
- system "bundle", "install", "--path", "vendor/bundle"
+ system "bundle", "install"
end
rspec = ARGV.flag?("--rspec") || !ARGV.flag?("--minitest")
diff --git a/Library/Homebrew/cask/lib/hbc/auditor.rb b/Library/Homebrew/cask/lib/hbc/auditor.rb
index e2d5dea0e..c2ffbebda 100644
--- a/Library/Homebrew/cask/lib/hbc/auditor.rb
+++ b/Library/Homebrew/cask/lib/hbc/auditor.rb
@@ -1,32 +1,63 @@
module Hbc
class Auditor
def self.audit(cask, audit_download: false, check_token_conflicts: false)
- if !ARGV.value("language") &&
- languages_blocks = cask.instance_variable_get(:@dsl).instance_variable_get(:@language_blocks)
- begin
- saved_languages = MacOS.instance_variable_get(:@languages)
-
- languages_blocks.keys.map do |languages|
- ohai "Auditing language: #{languages.map { |lang| "'#{lang}'" }.join(", ")}"
- MacOS.instance_variable_set(:@languages, languages)
- audit_cask_instance(Hbc.load(cask.sourcefile_path), audit_download, check_token_conflicts)
- CLI::Cleanup.run(cask.token) if audit_download
- end.all?
- ensure
- MacOS.instance_variable_set(:@languages, saved_languages)
- end
+ new(cask, audit_download, check_token_conflicts).audit
+ end
+
+ attr_reader :cask
+
+ def initialize(cask, audit_download, check_token_conflicts)
+ @cask = cask
+ @audit_download = audit_download
+ @check_token_conflicts = check_token_conflicts
+ end
+
+ def audit_download?
+ @audit_download
+ end
+
+ def check_token_conflicts?
+ @check_token_conflicts
+ end
+
+ def audit
+ if !ARGV.value("language") && language_blocks
+ audit_all_languages
else
- audit_cask_instance(cask, audit_download, check_token_conflicts)
+ audit_cask_instance(cask)
end
end
- def self.audit_cask_instance(cask, audit_download, check_token_conflicts)
- download = audit_download && Download.new(cask)
+ private
+
+ def audit_all_languages
+ saved_languages = MacOS.instance_variable_get(:@languages)
+ begin
+ language_blocks.keys.all?(&method(:audit_languages))
+ ensure
+ MacOS.instance_variable_set(:@languages, saved_languages)
+ end
+ end
+
+ def audit_languages(languages)
+ ohai "Auditing language: #{languages.map { |lang| "'#{lang}'" }.join(", ")}"
+ MacOS.instance_variable_set(:@languages, languages)
+ audit_cask_instance(Hbc.load(cask.sourcefile_path))
+ ensure
+ CLI::Cleanup.run(cask.token) if audit_download?
+ end
+
+ def audit_cask_instance(cask)
+ download = audit_download? && Download.new(cask)
audit = Audit.new(cask, download: download,
- check_token_conflicts: check_token_conflicts)
+ check_token_conflicts: check_token_conflicts?)
audit.run!
puts audit.summary
audit.success?
end
+
+ def language_blocks
+ cask.instance_variable_get(:@dsl).instance_variable_get(:@language_blocks)
+ end
end
end
diff --git a/Library/Homebrew/cask/lib/hbc/caskroom.rb b/Library/Homebrew/cask/lib/hbc/caskroom.rb
index 583cac34a..7bc8294e1 100644
--- a/Library/Homebrew/cask/lib/hbc/caskroom.rb
+++ b/Library/Homebrew/cask/lib/hbc/caskroom.rb
@@ -13,7 +13,7 @@ module Hbc
FileUtils.mv repo_caskroom, Hbc.caskroom
else
opoo "#{Hbc.caskroom.parent} is not writable, sudo is needed to move the Caskroom."
- system "/usr/bin/sudo", "--", "/bin/mv", "--", repo_caskroom.to_s, Hbc.caskroom.parent.to_s
+ SystemCommand.run("/bin/mv", args: [repo_caskroom, Hbc.caskroom.parent], sudo: true)
end
end
@@ -21,24 +21,13 @@ module Hbc
return if Hbc.caskroom.exist?
ohai "Creating Caskroom at #{Hbc.caskroom}"
- if Hbc.caskroom.parent.writable?
- Hbc.caskroom.mkpath
- else
- ohai "We'll set permissions properly so we won't need sudo in the future"
- toplevel_dir = Hbc.caskroom
- toplevel_dir = toplevel_dir.parent until toplevel_dir.parent.root?
- unless toplevel_dir.directory?
- # If a toplevel dir such as '/opt' must be created, enforce standard permissions.
- # sudo in system is rude.
- system "/usr/bin/sudo", "--", "/bin/mkdir", "--", toplevel_dir
- system "/usr/bin/sudo", "--", "/bin/chmod", "--", "0775", toplevel_dir
- end
- # sudo in system is rude.
- system "/usr/bin/sudo", "--", "/bin/mkdir", "-p", "--", Hbc.caskroom
- unless Hbc.caskroom.parent == toplevel_dir
- system "/usr/bin/sudo", "--", "/usr/sbin/chown", "-R", "--", "#{Utils.current_user}:staff", Hbc.caskroom.parent.to_s
- end
- end
+ ohai "We'll set permissions properly so we won't need sudo in the future"
+ sudo = !Hbc.caskroom.parent.writable?
+
+ SystemCommand.run("/bin/mkdir", args: ["-p", Hbc.caskroom], sudo: sudo)
+ SystemCommand.run("/bin/chmod", args: ["g+rwx", Hbc.caskroom], sudo: sudo)
+ SystemCommand.run("/usr/sbin/chown", args: [Utils.current_user, Hbc.caskroom], sudo: sudo)
+ SystemCommand.run("/usr/bin/chgrp", args: ["admin", Hbc.caskroom], sudo: sudo)
end
end
end
diff --git a/Library/Homebrew/cask/lib/hbc/cli.rb b/Library/Homebrew/cask/lib/hbc/cli.rb
index d062c6a7d..c9625c7e2 100644
--- a/Library/Homebrew/cask/lib/hbc/cli.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli.rb
@@ -15,6 +15,7 @@ require "hbc/cli/home"
require "hbc/cli/info"
require "hbc/cli/install"
require "hbc/cli/list"
+require "hbc/cli/reinstall"
require "hbc/cli/search"
require "hbc/cli/style"
require "hbc/cli/uninstall"
diff --git a/Library/Homebrew/cask/lib/hbc/cli/reinstall.rb b/Library/Homebrew/cask/lib/hbc/cli/reinstall.rb
new file mode 100644
index 000000000..ac514bd50
--- /dev/null
+++ b/Library/Homebrew/cask/lib/hbc/cli/reinstall.rb
@@ -0,0 +1,49 @@
+module Hbc
+ class CLI
+ class Reinstall < Install
+ def self.install_casks(cask_tokens, force, skip_cask_deps, require_sha)
+ count = 0
+ cask_tokens.each do |cask_token|
+ begin
+ cask = Hbc.load(cask_token)
+
+ if cask.installed?
+ # use copy of cask for uninstallation to avoid 'No such file or directory' bug
+ installed_cask = cask
+ latest_installed_version = installed_cask.timestamped_versions.last
+
+ unless latest_installed_version.nil?
+ latest_installed_cask_file = installed_cask.metadata_master_container_path
+ .join(latest_installed_version
+ .join(File::Separator),
+ "Casks", "#{cask_token}.rb")
+
+ # use the same cask file that was used for installation, if possible
+ installed_cask = Hbc.load(latest_installed_cask_file) if latest_installed_cask_file.exist?
+ end
+
+ # Always force uninstallation, ignore method parameter
+ Installer.new(installed_cask, force: true).uninstall
+ end
+
+ Installer.new(cask,
+ force: force,
+ skip_cask_deps: skip_cask_deps,
+ require_sha: require_sha).install
+ count += 1
+ rescue CaskUnavailableError => e
+ warn_unavailable_with_suggestion cask_token, e
+ rescue CaskNoShasumError => e
+ opoo e.message
+ count += 1
+ end
+ end
+ count.zero? ? nil : count == cask_tokens.length
+ end
+
+ def self.help
+ "reinstalls the given Cask"
+ end
+ end
+ end
+end
diff --git a/Library/Homebrew/cask/lib/hbc/download_strategy.rb b/Library/Homebrew/cask/lib/hbc/download_strategy.rb
index 4a601af2b..137af319a 100644
--- a/Library/Homebrew/cask/lib/hbc/download_strategy.rb
+++ b/Library/Homebrew/cask/lib/hbc/download_strategy.rb
@@ -105,7 +105,7 @@ module Hbc
else
had_incomplete_download = temporary_path.exist?
begin
- File.open(temporary_path, "w+") do |f|
+ File.open(temporary_path, "a+") do |f|
f.flock(File::LOCK_EX)
_fetch
f.flock(File::LOCK_UN)
diff --git a/Library/Homebrew/cask/lib/hbc/dsl/depends_on.rb b/Library/Homebrew/cask/lib/hbc/dsl/depends_on.rb
index 8e120d8a8..2168b7090 100644
--- a/Library/Homebrew/cask/lib/hbc/dsl/depends_on.rb
+++ b/Library/Homebrew/cask/lib/hbc/dsl/depends_on.rb
@@ -50,8 +50,7 @@ module Hbc
def load(pairs = {})
pairs.each do |key, value|
raise "invalid depends_on key: '#{key.inspect}'" unless VALID_KEYS.include?(key)
- writer_method = "#{key}=".to_sym
- @pairs[key] = send(writer_method, value)
+ @pairs[key] = send(:"#{key}=", *value)
end
end
@@ -74,33 +73,33 @@ module Hbc
end
end
- def formula=(*arg)
+ def formula=(*args)
@formula ||= []
- @formula.concat(Array(*arg))
+ @formula.concat(args)
end
- def cask=(*arg)
+ def cask=(*args)
@cask ||= []
- @cask.concat(Array(*arg))
+ @cask.concat(args)
end
- def macos=(*arg)
+ def macos=(*args)
@macos ||= []
- macos = if arg.count == 1 && arg.first =~ /^\s*(<|>|[=<>]=)\s*(\S+)\s*$/
+ macos = if args.count == 1 && args.first =~ /^\s*(<|>|[=<>]=)\s*(\S+)\s*$/
raise "'depends_on macos' comparison expressions cannot be combined" unless @macos.empty?
operator = Regexp.last_match[1].to_sym
release = self.class.coerce_os_release(Regexp.last_match[2])
[[operator, release]]
else
raise "'depends_on macos' comparison expressions cannot be combined" if @macos.first.is_a?(Symbol)
- [*arg].map(&self.class.method(:coerce_os_release)).sort
+ args.map(&self.class.method(:coerce_os_release)).sort
end
@macos.concat(macos)
end
- def arch=(*arg)
+ def arch=(*args)
@arch ||= []
- arches = Array(*arg).map do |elt|
+ arches = args.map do |elt|
elt = elt.to_s.downcase.sub(/^:/, "").tr("-", "_").to_sym
ARCH_SYNONYMS.key?(elt) ? ARCH_SYNONYMS[elt] : elt
end
diff --git a/Library/Homebrew/cask/lib/hbc/qualified_token.rb b/Library/Homebrew/cask/lib/hbc/qualified_token.rb
index 8868bd65d..09eedef1b 100644
--- a/Library/Homebrew/cask/lib/hbc/qualified_token.rb
+++ b/Library/Homebrew/cask/lib/hbc/qualified_token.rb
@@ -1,37 +1,9 @@
module Hbc
module QualifiedToken
- REPO_PREFIX = "homebrew-".freeze
-
- # per https://github.com/Homebrew/homebrew/blob/4c7bc9ec3bca729c898ee347b6135ba692ee0274/Library/Homebrew/cmd/tap.rb#L121
- USER_REGEX = /[a-z0-9_\-]+/
-
- # per https://github.com/Homebrew/homebrew/blob/4c7bc9ec3bca729c898ee347b6135ba692ee0274/Library/Homebrew/cmd/tap.rb#L121
- REPO_REGEX = /(?:#{REPO_PREFIX})?\w+/
-
- # per https://github.com/caskroom/homebrew-cask/blob/master/CONTRIBUTING.md#generating-a-token-for-the-cask
- TOKEN_REGEX = /[a-z0-9\-]+/
-
- TAP_REGEX = %r{#{USER_REGEX}[/\-]#{REPO_REGEX}}
-
- QUALIFIED_TOKEN_REGEX = %r{#{TAP_REGEX}/#{TOKEN_REGEX}}
-
def self.parse(arg)
- return nil unless arg.is_a?(String) && arg.downcase =~ /^#{QUALIFIED_TOKEN_REGEX}$/
- path_elements = arg.downcase.split("/")
- if path_elements.count == 2
- # eg phinze-cask/google-chrome.
- # Not certain this form is needed, but it was supported in the past.
- token = path_elements[1]
- dash_elements = path_elements[0].split("-")
- repo = dash_elements.pop
- dash_elements.pop if dash_elements.count > 1 && dash_elements[-1] + "-" == REPO_PREFIX
- user = dash_elements.join("-")
- else
- # eg caskroom/cask/google-chrome
- # per https://github.com/Homebrew/brew/blob/master/docs/brew-tap.md
- user, repo, token = path_elements
- end
- repo.sub!(/^#{REPO_PREFIX}/, "")
+ return nil unless arg.is_a?(String)
+ return nil unless match = arg.downcase.match(HOMEBREW_TAP_CASK_REGEX)
+ user, repo, token = match.captures
odebug "[user, repo, token] might be [#{user}, #{repo}, #{token}]"
[user, repo, token]
end
diff --git a/Library/Homebrew/cask/lib/hbc/url_checker.rb b/Library/Homebrew/cask/lib/hbc/url_checker.rb
index 299684b13..60a15ca2f 100644
--- a/Library/Homebrew/cask/lib/hbc/url_checker.rb
+++ b/Library/Homebrew/cask/lib/hbc/url_checker.rb
@@ -1,4 +1,5 @@
require "hbc/checkable"
+require "hbc/fetcher"
module Hbc
class UrlChecker
diff --git a/Library/Homebrew/cask/spec/support/Casks/with-binary.rb b/Library/Homebrew/cask/spec/support/Casks/with-binary.rb
index a06787125..d8cede7aa 100644
--- a/Library/Homebrew/cask/spec/support/Casks/with-binary.rb
+++ b/Library/Homebrew/cask/spec/support/Casks/with-binary.rb
@@ -2,7 +2,7 @@ test_cask 'with-binary' do
version '1.2.3'
sha256 'd5b2dfbef7ea28c25f7a77cd7fa14d013d82b626db1d82e00e25822464ba19e2'
- url FileHelper.local_binary_url('AppWithBinary.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/AppWithBinary.zip"
homepage 'http://example.com/with-binary'
app 'App.app'
diff --git a/Library/Homebrew/cask/spec/support/Casks/with-embedded-binary.rb b/Library/Homebrew/cask/spec/support/Casks/with-embedded-binary.rb
index 796f28c78..107c6cbe2 100644
--- a/Library/Homebrew/cask/spec/support/Casks/with-embedded-binary.rb
+++ b/Library/Homebrew/cask/spec/support/Casks/with-embedded-binary.rb
@@ -2,7 +2,7 @@ test_cask 'with-embedded-binary' do
version '1.2.3'
sha256 'fe052d3e77d92676775fd916ddb8942e72a565b844ea7f6d055474c99bb4e47b'
- url FileHelper.local_binary_url('AppWithEmbeddedBinary.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/AppWithEmbeddedBinary.zip"
homepage 'http://example.com/with-binary'
app 'App.app'
diff --git a/Library/Homebrew/cask/spec/support/file_helper.rb b/Library/Homebrew/cask/spec/support/file_helper.rb
index 8eb78f759..abe7b2618 100644
--- a/Library/Homebrew/cask/spec/support/file_helper.rb
+++ b/Library/Homebrew/cask/spec/support/file_helper.rb
@@ -1,16 +1,8 @@
module FileHelper
- class << self
- def local_binary_path(name)
- File.expand_path(File.join(File.dirname(__FILE__), "binaries", name))
- end
+ module_function
- def local_binary_url(name)
- "file://" + local_binary_path(name)
- end
-
- def valid_alias?(candidate)
- return false unless candidate.symlink?
- candidate.readlink.exist?
- end
+ def valid_alias?(candidate)
+ return false unless candidate.symlink?
+ candidate.readlink.exist?
end
end
diff --git a/Library/Homebrew/cask/test/cask/accessibility_test.rb b/Library/Homebrew/cask/test/cask/accessibility_test.rb
index 8da8937fe..7c6484dd4 100644
--- a/Library/Homebrew/cask/test/cask/accessibility_test.rb
+++ b/Library/Homebrew/cask/test/cask/accessibility_test.rb
@@ -3,73 +3,75 @@ require "test_helper"
# TODO: this test should be named after the corresponding class, once
# that class is abstracted from installer.rb.
describe "Accessibility Access" do
- before do
- cask = Hbc.load("with-accessibility-access")
- with_fake_command = { command: Hbc::FakeSystemCommand }
- @installer = Hbc::Installer.new(cask, with_fake_command)
- end
+ let(:cask) { Hbc.load("with-accessibility-access") }
+ let(:with_fake_command) { { command: Hbc::FakeSystemCommand } }
+ let(:installer) { Hbc::Installer.new(cask, with_fake_command) }
describe "install" do
it "can enable accessibility access" do
- MacOS.stubs(version: MacOS::Version.new("10.9"))
-
- @installer.stubs(bundle_identifier: "com.example.BasicCask")
-
- Hbc::FakeSystemCommand.expects_command(
- ["/usr/bin/sudo", "-E", "--", "/usr/bin/sqlite3", Hbc.tcc_db, "INSERT OR REPLACE INTO access VALUES('kTCCServiceAccessibility','com.example.BasicCask',0,1,1,NULL);"]
- )
- shutup do
- @installer.enable_accessibility_access
+ MacOS.stub :version, MacOS::Version.new("10.9") do
+ installer.stub :bundle_identifier, "com.example.BasicCask" do
+ Hbc::FakeSystemCommand.expects_command(
+ ["/usr/bin/sudo", "-E", "--", "/usr/bin/sqlite3", Hbc.tcc_db, "INSERT OR REPLACE INTO access VALUES('kTCCServiceAccessibility','com.example.BasicCask',0,1,1,NULL);"]
+ )
+ shutup do
+ installer.enable_accessibility_access
+ end
+ end
end
end
- it "can enable accessibility access in macOS releases prior to Mavericks" do
- MacOS.stubs(version: MacOS::Version.new("10.8"))
- Hbc::FakeSystemCommand.expects_command(
- ["/usr/bin/sudo", "-E", "--", "/usr/bin/touch", Hbc.pre_mavericks_accessibility_dotfile]
- )
- shutup do
- @installer.enable_accessibility_access
+ it "can enable accessibility access in macOS releases prior to Mavericks" do
+ MacOS.stub :version, MacOS::Version.new("10.8") do
+ Hbc::FakeSystemCommand.expects_command(
+ ["/usr/bin/sudo", "-E", "--", "/usr/bin/touch", Hbc.pre_mavericks_accessibility_dotfile]
+ )
+ shutup do
+ installer.enable_accessibility_access
+ end
end
end
- it "warns about enabling accessibility access on new macOS releases" do
- MacOS.stubs(version: MacOS::Version.new("10.12"))
-
- @installer.stubs(bundle_identifier: "com.example.BasicCask")
- capture_io { @installer.enable_accessibility_access }[1]
- .must_match("Warning: Accessibility access cannot be enabled automatically on this version of macOS.")
+ it "warns about enabling accessibility access on new macOS releases" do
+ MacOS.stub :version, MacOS::Version.new("10.12") do
+ installer.stub :bundle_identifier, "com.example.BasicCask" do
+ capture_io { installer.enable_accessibility_access }[1]
+ .must_match("Warning: Accessibility access cannot be enabled automatically on this version of macOS.")
+ end
+ end
end
end
describe "uninstall" do
it "can disable accessibility access" do
- MacOS.stubs(version: MacOS::Version.new("10.9"))
-
- @installer.stubs(bundle_identifier: "com.example.BasicCask")
-
- Hbc::FakeSystemCommand.expects_command(
- ["/usr/bin/sudo", "-E", "--", "/usr/bin/sqlite3", Hbc.tcc_db, "DELETE FROM access WHERE client='com.example.BasicCask';"]
- )
- shutup do
- @installer.disable_accessibility_access
+ MacOS.stub :version, MacOS::Version.new("10.9") do
+ installer.stub :bundle_identifier, "com.example.BasicCask" do
+ Hbc::FakeSystemCommand.expects_command(
+ ["/usr/bin/sudo", "-E", "--", "/usr/bin/sqlite3", Hbc.tcc_db, "DELETE FROM access WHERE client='com.example.BasicCask';"]
+ )
+ shutup do
+ installer.disable_accessibility_access
+ end
+ end
end
end
- it "warns about disabling accessibility access on old macOS releases" do
- MacOS.stubs(version: MacOS::Version.new("10.8"))
-
- @installer.stubs(bundle_identifier: "com.example.BasicCask")
- capture_io { @installer.disable_accessibility_access }[1]
- .must_match("Warning: Accessibility access cannot be disabled automatically on this version of macOS.")
+ it "warns about disabling accessibility access on old macOS releases" do
+ MacOS.stub :version, MacOS::Version.new("10.8") do
+ installer.stub :bundle_identifier, "com.example.BasicCask" do
+ capture_io { installer.disable_accessibility_access }[1]
+ .must_match("Warning: Accessibility access cannot be disabled automatically on this version of macOS.")
+ end
+ end
end
- it "warns about disabling accessibility access on new macOS releases" do
- MacOS.stubs(version: MacOS::Version.new("10.12"))
-
- @installer.stubs(bundle_identifier: "com.example.BasicCask")
- capture_io { @installer.disable_accessibility_access }[1]
- .must_match("Warning: Accessibility access cannot be disabled automatically on this version of macOS.")
+ it "warns about disabling accessibility access on new macOS releases" do
+ MacOS.stub :version, MacOS::Version.new("10.12") do
+ installer.stub :bundle_identifier, "com.example.BasicCask" do
+ capture_io { installer.disable_accessibility_access }[1]
+ .must_match("Warning: Accessibility access cannot be disabled automatically on this version of macOS.")
+ end
+ end
end
end
end
diff --git a/Library/Homebrew/cask/test/cask/artifact/alt_target_test.rb b/Library/Homebrew/cask/test/cask/artifact/alt_target_test.rb
index da273a6ca..d5702d4af 100644
--- a/Library/Homebrew/cask/test/cask/artifact/alt_target_test.rb
+++ b/Library/Homebrew/cask/test/cask/artifact/alt_target_test.rb
@@ -30,7 +30,7 @@ describe Hbc::Artifact::App do
describe "when app is in a subdirectory" do
let(:cask) {
Hbc::Cask.new("subdir") do
- url TestHelper.local_binary_url("caffeine.zip")
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage "http://example.com/local-caffeine"
version "1.2.3"
sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94"
diff --git a/Library/Homebrew/cask/test/cask/artifact/app_test.rb b/Library/Homebrew/cask/test/cask/artifact/app_test.rb
index ea8fe1668..795e732ba 100644
--- a/Library/Homebrew/cask/test/cask/artifact/app_test.rb
+++ b/Library/Homebrew/cask/test/cask/artifact/app_test.rb
@@ -29,7 +29,7 @@ describe Hbc::Artifact::App do
describe "when app is in a subdirectory" do
let(:cask) {
Hbc::Cask.new("subdir") do
- url TestHelper.local_binary_url("caffeine.zip")
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage "http://example.com/local-caffeine"
version "1.2.3"
sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94"
diff --git a/Library/Homebrew/cask/test/cask/artifact/uninstall_test.rb b/Library/Homebrew/cask/test/cask/artifact/uninstall_test.rb
index 08c179a53..10c51420a 100644
--- a/Library/Homebrew/cask/test/cask/artifact/uninstall_test.rb
+++ b/Library/Homebrew/cask/test/cask/artifact/uninstall_test.rb
@@ -273,7 +273,7 @@ describe Hbc::Artifact::Uninstall do
describe "when using rmdir" do
let(:cask) { Hbc.load("with-uninstall-rmdir") }
- let(:dir_pathname) { Pathname(TestHelper.local_binary_path("empty_directory")) }
+ let(:dir_pathname) { Pathname.new("#{TEST_FIXTURE_DIR}/cask/empty_directory") }
it "can uninstall" do
Hbc::FakeSystemCommand.expects_command(
diff --git a/Library/Homebrew/cask/test/cask/artifact/zap_test.rb b/Library/Homebrew/cask/test/cask/artifact/zap_test.rb
index da80f7bde..3291afbca 100644
--- a/Library/Homebrew/cask/test/cask/artifact/zap_test.rb
+++ b/Library/Homebrew/cask/test/cask/artifact/zap_test.rb
@@ -274,7 +274,7 @@ describe Hbc::Artifact::Zap do
describe "when using rmdir" do
let(:cask) { Hbc.load("with-zap-rmdir") }
- let(:dir_pathname) { Pathname(TestHelper.local_binary_path("empty_directory")) }
+ let(:dir_pathname) { Pathname.new("#{TEST_FIXTURE_DIR}/cask/empty_directory") }
it "can zap" do
Hbc::FakeSystemCommand.expects_command(
diff --git a/Library/Homebrew/cask/test/cask/cli/audit_test.rb b/Library/Homebrew/cask/test/cask/cli/audit_test.rb
index b55c4ea30..89a7d140a 100644
--- a/Library/Homebrew/cask/test/cask/cli/audit_test.rb
+++ b/Library/Homebrew/cask/test/cask/cli/audit_test.rb
@@ -6,10 +6,11 @@ describe Hbc::CLI::Audit do
describe "selection of Casks to audit" do
it "audits all Casks if no tokens are given" do
- Hbc.stubs(all: [cask, cask])
- auditor.expects(:audit).times(2)
+ Hbc.stub :all, [cask, cask] do
+ auditor.expects(:audit).times(2)
- run_audit([], auditor)
+ run_audit([], auditor)
+ end
end
it "audits specified Casks if tokens are given" do
@@ -23,37 +24,37 @@ describe Hbc::CLI::Audit do
describe "rules for downloading a Cask" do
it "does not download the Cask per default" do
- Hbc.stubs(load: cask)
+ Hbc.stub :load, cask do
+ auditor.expects(:audit).with(cask, audit_download: false, check_token_conflicts: false)
- auditor.expects(:audit).with(cask, audit_download: false, check_token_conflicts: false)
-
- run_audit(["casktoken"], auditor)
+ run_audit(["casktoken"], auditor)
+ end
end
it "download a Cask if --download flag is set" do
- Hbc.stubs(load: cask)
-
- auditor.expects(:audit).with(cask, audit_download: true, check_token_conflicts: false)
+ Hbc.stub :load, cask do
+ auditor.expects(:audit).with(cask, audit_download: true, check_token_conflicts: false)
- run_audit(["casktoken", "--download"], auditor)
+ run_audit(["casktoken", "--download"], auditor)
+ end
end
end
describe "rules for checking token conflicts" do
it "does not check for token conflicts per default" do
- Hbc.stubs(load: cask)
+ Hbc.stub :load, cask do
+ auditor.expects(:audit).with(cask, audit_download: false, check_token_conflicts: false)
- auditor.expects(:audit).with(cask, audit_download: false, check_token_conflicts: false)
-
- run_audit(["casktoken"], auditor)
+ run_audit(["casktoken"], auditor)
+ end
end
it "checks for token conflicts if --token-conflicts flag is set" do
- Hbc.stubs(load: cask)
-
- auditor.expects(:audit).with(cask, audit_download: false, check_token_conflicts: true)
+ Hbc.stub :load, cask do
+ auditor.expects(:audit).with(cask, audit_download: false, check_token_conflicts: true)
- run_audit(["casktoken", "--token-conflicts"], auditor)
+ run_audit(["casktoken", "--token-conflicts"], auditor)
+ end
end
end
diff --git a/Library/Homebrew/cask/test/cask/cli/reinstall_test.rb b/Library/Homebrew/cask/test/cask/cli/reinstall_test.rb
new file mode 100644
index 000000000..22f0d23fd
--- /dev/null
+++ b/Library/Homebrew/cask/test/cask/cli/reinstall_test.rb
@@ -0,0 +1,27 @@
+require "test_helper"
+
+describe Hbc::CLI::Reinstall do
+ it "allows reinstalling a Cask" do
+ shutup do
+ Hbc::CLI::Install.run("local-transmission")
+ end
+ Hbc.load("local-transmission").must_be :installed?
+
+ shutup do
+ Hbc::CLI::Reinstall.run("local-transmission")
+ end
+ Hbc.load("local-transmission").must_be :installed?
+ end
+
+ it "allows reinstalling a non installed Cask" do
+ shutup do
+ Hbc::CLI::Uninstall.run("local-transmission")
+ end
+ Hbc.load("local-transmission").wont_be :installed?
+
+ shutup do
+ Hbc::CLI::Reinstall.run("local-transmission")
+ end
+ Hbc.load("local-transmission").must_be :installed?
+ end
+end
diff --git a/Library/Homebrew/cask/test/cask/dsl_test.rb b/Library/Homebrew/cask/test/cask/dsl_test.rb
index adcdc4665..96d24a1a1 100644
--- a/Library/Homebrew/cask/test/cask/dsl_test.rb
+++ b/Library/Homebrew/cask/test/cask/dsl_test.rb
@@ -144,35 +144,41 @@ describe Hbc::DSL do
end
end
- MacOS.stubs(languages: ["zh"])
- cask.call.language.must_equal "zh-CN"
- cask.call.sha256.must_equal "abc123"
- cask.call.url.to_s.must_equal "https://example.org/zh-CN.zip"
-
- MacOS.stubs(languages: ["zh-XX"])
- cask.call.language.must_equal "zh-CN"
- cask.call.sha256.must_equal "abc123"
- cask.call.url.to_s.must_equal "https://example.org/zh-CN.zip"
-
- MacOS.stubs(languages: ["en"])
- cask.call.language.must_equal "en-US"
- cask.call.sha256.must_equal "xyz789"
- cask.call.url.to_s.must_equal "https://example.org/en-US.zip"
-
- MacOS.stubs(languages: ["xx-XX"])
- cask.call.language.must_equal "en-US"
- cask.call.sha256.must_equal "xyz789"
- cask.call.url.to_s.must_equal "https://example.org/en-US.zip"
-
- MacOS.stubs(languages: ["xx-XX", "zh", "en"])
- cask.call.language.must_equal "zh-CN"
- cask.call.sha256.must_equal "abc123"
- cask.call.url.to_s.must_equal "https://example.org/zh-CN.zip"
-
- MacOS.stubs(languages: ["xx-XX", "en-US", "zh"])
- cask.call.language.must_equal "en-US"
- cask.call.sha256.must_equal "xyz789"
- cask.call.url.to_s.must_equal "https://example.org/en-US.zip"
+ MacOS.stub :languages, ["zh"] do
+ cask.call.language.must_equal "zh-CN"
+ cask.call.sha256.must_equal "abc123"
+ cask.call.url.to_s.must_equal "https://example.org/zh-CN.zip"
+ end
+
+ MacOS.stub :languages, ["zh-XX"] do
+ cask.call.language.must_equal "zh-CN"
+ cask.call.sha256.must_equal "abc123"
+ cask.call.url.to_s.must_equal "https://example.org/zh-CN.zip"
+ end
+
+ MacOS.stub :languages, ["en"] do
+ cask.call.language.must_equal "en-US"
+ cask.call.sha256.must_equal "xyz789"
+ cask.call.url.to_s.must_equal "https://example.org/en-US.zip"
+ end
+
+ MacOS.stub :languages, ["xx-XX"] do
+ cask.call.language.must_equal "en-US"
+ cask.call.sha256.must_equal "xyz789"
+ cask.call.url.to_s.must_equal "https://example.org/en-US.zip"
+ end
+
+ MacOS.stub :languages, ["xx-XX", "zh", "en"] do
+ cask.call.language.must_equal "zh-CN"
+ cask.call.sha256.must_equal "abc123"
+ cask.call.url.to_s.must_equal "https://example.org/zh-CN.zip"
+ end
+
+ MacOS.stub :languages, ["xx-XX", "en-US", "zh"] do
+ cask.call.language.must_equal "en-US"
+ cask.call.sha256.must_equal "xyz789"
+ cask.call.url.to_s.must_equal "https://example.org/en-US.zip"
+ end
end
end
diff --git a/Library/Homebrew/cask/test/cask/installer_test.rb b/Library/Homebrew/cask/test/cask/installer_test.rb
index f64ed8c17..d76411ae6 100644
--- a/Library/Homebrew/cask/test/cask/installer_test.rb
+++ b/Library/Homebrew/cask/test/cask/installer_test.rb
@@ -2,6 +2,10 @@ require "test_helper"
describe Hbc::Installer do
describe "install" do
+ let(:empty_depends_on_stub) {
+ stub(formula: [], cask: [], macos: nil, arch: nil, x11: nil)
+ }
+
it "downloads and installs a nice fresh Cask" do
caffeine = Hbc.load("local-caffeine")
@@ -44,11 +48,11 @@ describe Hbc::Installer do
it "works with cab-based Casks" do
skip("cabextract not installed") if which("cabextract").nil?
asset = Hbc.load("container-cab")
- empty = stub(formula: [], cask: [], macos: nil, arch: nil, x11: nil)
- asset.stubs(:depends_on).returns(empty)
- shutup do
- Hbc::Installer.new(asset).install
+ asset.stub :depends_on, empty_depends_on_stub do
+ shutup do
+ Hbc::Installer.new(asset).install
+ end
end
dest_path = Hbc.caskroom.join("container-cab", asset.version)
@@ -74,11 +78,11 @@ describe Hbc::Installer do
it "works with 7z-based Casks" do
skip("unar not installed") if which("unar").nil?
asset = Hbc.load("container-7z")
- empty = stub(formula: [], cask: [], macos: nil, arch: nil, x11: nil)
- asset.stubs(:depends_on).returns(empty)
- shutup do
- Hbc::Installer.new(asset).install
+ asset.stub :depends_on, empty_depends_on_stub do
+ shutup do
+ Hbc::Installer.new(asset).install
+ end
end
dest_path = Hbc.caskroom.join("container-7z", asset.version)
@@ -103,11 +107,11 @@ describe Hbc::Installer do
it "works with Stuffit-based Casks" do
skip("unar not installed") if which("unar").nil?
asset = Hbc.load("container-sit")
- empty = stub(formula: [], cask: [], macos: nil, arch: nil, x11: nil)
- asset.stubs(:depends_on).returns(empty)
- shutup do
- Hbc::Installer.new(asset).install
+ asset.stub :depends_on, empty_depends_on_stub do
+ shutup do
+ Hbc::Installer.new(asset).install
+ end
end
dest_path = Hbc.caskroom.join("container-sit", asset.version)
@@ -119,11 +123,11 @@ describe Hbc::Installer do
it "works with RAR-based Casks" do
skip("unar not installed") if which("unar").nil?
asset = Hbc.load("container-rar")
- empty = stub(formula: [], cask: [], macos: nil, arch: nil, x11: nil)
- asset.stubs(:depends_on).returns(empty)
- shutup do
- Hbc::Installer.new(asset).install
+ asset.stub :depends_on, empty_depends_on_stub do
+ shutup do
+ Hbc::Installer.new(asset).install
+ end
end
dest_path = Hbc.caskroom.join("container-rar", asset.version)
@@ -161,11 +165,11 @@ describe Hbc::Installer do
it "works with pure xz-based Casks" do
skip("unxz not installed") if which("unxz").nil?
asset = Hbc.load("container-xz")
- empty = stub(formula: [], cask: [], macos: nil, arch: nil, x11: nil)
- asset.stubs(:depends_on).returns(empty)
- shutup do
- Hbc::Installer.new(asset).install
+ asset.stub :depends_on, empty_depends_on_stub do
+ shutup do
+ Hbc::Installer.new(asset).install
+ end
end
dest_path = Hbc.caskroom.join("container-xz", asset.version)
@@ -177,11 +181,11 @@ describe Hbc::Installer do
it "works with lzma-based Casks" do
skip("unlzma not installed") if which("unlzma").nil?
asset = Hbc.load("container-lzma")
- empty = stub(formula: [], cask: [], macos: nil, arch: nil, x11: nil)
- asset.stubs(:depends_on).returns(empty)
- shutup do
- Hbc::Installer.new(asset).install
+ asset.stub :depends_on, empty_depends_on_stub do
+ shutup do
+ Hbc::Installer.new(asset).install
+ end
end
dest_path = Hbc.caskroom.join("container-lzma", asset.version)
diff --git a/Library/Homebrew/cask/test/cask/url_checker_test.rb b/Library/Homebrew/cask/test/cask/url_checker_test.rb
index 6871b4215..199182bf2 100644
--- a/Library/Homebrew/cask/test/cask/url_checker_test.rb
+++ b/Library/Homebrew/cask/test/cask/url_checker_test.rb
@@ -2,32 +2,50 @@ require "test_helper"
describe Hbc::UrlChecker do
describe "request processing" do
- it "adds an error if response is empty" do
- cask = Hbc.load("basic-cask")
- Hbc::FakeFetcher.fake_response_for(cask.url, "")
- checker = Hbc::UrlChecker.new(cask, Hbc::FakeFetcher)
- checker.run
- checker.errors.must_include "timeout while requesting #{cask.url}"
- end
+ let(:cask) { Hbc.load("basic-cask") }
+ let(:checker) { Hbc::UrlChecker.new(cask) }
+ let(:with_stubbed_fetcher) {
+ lambda { |&block|
+ Hbc::Fetcher.stub(:head, response) do
+ checker.run
+ instance_eval(&block)
+ end
+ }
+ }
+
+ describe "with an empty response" do
+ let(:response) { "" }
- it "properly populates the response code and headers from an http response" do
- cask = Hbc.load("basic-cask")
+ it "adds an error" do
+ with_stubbed_fetcher.call do
+ expect(checker.errors).must_include("timeout while requesting #{cask.url}")
+ end
+ end
+ end
- Hbc::FakeFetcher.fake_response_for(cask.url, <<-EOS.undent)
- HTTP/1.1 200 OK
- Content-Type: application/x-apple-diskimage
- ETag: "b4208f3e84967be4b078ecaa03fba941"
- Content-Length: 23726161
- Last-Modified: Sun, 12 Aug 2012 21:17:21 GMT
- EOS
+ describe "with a valid http response" do
+ let(:response) {
+ <<-EOS.undent
+ HTTP/1.1 200 OK
+ Content-Type: application/x-apple-diskimage
+ ETag: "b4208f3e84967be4b078ecaa03fba941"
+ Content-Length: 23726161
+ Last-Modified: Sun, 12 Aug 2012 21:17:21 GMT
+ EOS
+ }
- checker = Hbc::UrlChecker.new(cask, Hbc::FakeFetcher)
- checker.run
- checker.response_status.must_equal "HTTP/1.1 200 OK"
- checker.headers.must_equal("Content-Type" => "application/x-apple-diskimage",
- "ETag" => '"b4208f3e84967be4b078ecaa03fba941"',
- "Content-Length" => "23726161",
- "Last-Modified" => "Sun, 12 Aug 2012 21:17:21 GMT")
+ it "properly populates the response code and headers" do
+ with_stubbed_fetcher.call do
+ expect(checker.errors).must_be_empty
+ expect(checker.response_status).must_equal("HTTP/1.1 200 OK")
+ expect(checker.headers).must_equal(
+ "Content-Type" => "application/x-apple-diskimage",
+ "ETag" => '"b4208f3e84967be4b078ecaa03fba941"',
+ "Content-Length" => "23726161",
+ "Last-Modified" => "Sun, 12 Aug 2012 21:17:21 GMT"
+ )
+ end
+ end
end
end
end
diff --git a/Library/Homebrew/cask/test/support/Casks/appdir-interpolation.rb b/Library/Homebrew/cask/test/support/Casks/appdir-interpolation.rb
index f1d6190bc..fdc09ef5a 100644
--- a/Library/Homebrew/cask/test/support/Casks/appdir-interpolation.rb
+++ b/Library/Homebrew/cask/test/support/Casks/appdir-interpolation.rb
@@ -2,7 +2,7 @@ test_cask 'appdir-interpolation' do
version '2.61'
sha256 'e44ffa103fbf83f55c8d0b1bea309a43b2880798dae8620b1ee8da5e1095ec68'
- url TestHelper.local_binary_url('transmission-2.61.dmg')
+ url "file://#{TEST_FIXTURE_DIR}/cask/transmission-2.61.dmg"
homepage 'http://example.com/appdir-interpolation'
binary "#{appdir}/some/path"
diff --git a/Library/Homebrew/cask/test/support/Casks/auto-updates.rb b/Library/Homebrew/cask/test/support/Casks/auto-updates.rb
index ac3e00865..0fcdb991a 100644
--- a/Library/Homebrew/cask/test/support/Casks/auto-updates.rb
+++ b/Library/Homebrew/cask/test/support/Casks/auto-updates.rb
@@ -2,7 +2,7 @@ test_cask 'auto-updates' do
version '2.61'
sha256 'e44ffa103fbf83f55c8d0b1bea309a43b2880798dae8620b1ee8da5e1095ec68'
- url TestHelper.local_binary_url('transmission-2.61.dmg')
+ url "file://#{TEST_FIXTURE_DIR}/cask/transmission-2.61.dmg"
homepage 'http://example.com/auto-updates'
auto_updates true
diff --git a/Library/Homebrew/cask/test/support/Casks/bad-checksum.rb b/Library/Homebrew/cask/test/support/Casks/bad-checksum.rb
index 074dae01f..79e5f24c9 100644
--- a/Library/Homebrew/cask/test/support/Casks/bad-checksum.rb
+++ b/Library/Homebrew/cask/test/support/Casks/bad-checksum.rb
@@ -2,7 +2,7 @@ test_cask 'bad-checksum' do
version '1.2.3'
sha256 'badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/local-caffeine'
app 'Caffeine.app'
diff --git a/Library/Homebrew/cask/test/support/Casks/container-7z.rb b/Library/Homebrew/cask/test/support/Casks/container-7z.rb
index 0526bf7fe..7dd01eee4 100644
--- a/Library/Homebrew/cask/test/support/Casks/container-7z.rb
+++ b/Library/Homebrew/cask/test/support/Casks/container-7z.rb
@@ -2,7 +2,7 @@ test_cask 'container-7z' do
version '1.2.3'
sha256 '3f9542ace85ed5f88549e2d0ea82210f8ddc87e0defbb78469d3aed719b3c964'
- url TestHelper.local_binary_url('container.7z')
+ url "file://#{TEST_FIXTURE_DIR}/cask/container.7z"
homepage 'https://example.com/container-7z'
depends_on formula: 'unar'
diff --git a/Library/Homebrew/cask/test/support/Casks/container-air.rb b/Library/Homebrew/cask/test/support/Casks/container-air.rb
index 949b0f7a7..c310e0a6f 100644
--- a/Library/Homebrew/cask/test/support/Casks/container-air.rb
+++ b/Library/Homebrew/cask/test/support/Casks/container-air.rb
@@ -2,7 +2,7 @@ test_cask 'container-air' do
version '0.1'
sha256 '554472e163f8a028629b12b468e29acda9f16b223dff74fcd218bba73cc2365a'
- url TestHelper.local_binary_url('container.air')
+ url "file://#{TEST_FIXTURE_DIR}/cask/container.air"
homepage 'https://example.com/container-air'
app 'container.app'
diff --git a/Library/Homebrew/cask/test/support/Casks/container-bzip2.rb b/Library/Homebrew/cask/test/support/Casks/container-bzip2.rb
index b11b032f3..9d9bdff98 100644
--- a/Library/Homebrew/cask/test/support/Casks/container-bzip2.rb
+++ b/Library/Homebrew/cask/test/support/Casks/container-bzip2.rb
@@ -2,7 +2,7 @@ test_cask 'container-bzip2' do
version '1.2.3'
sha256 'eaf67b3a62cb9275f96e45d05c70b94bef9ef1dae344083e93eda6b0b388a61c'
- url TestHelper.local_binary_url('container.bz2')
+ url "file://#{TEST_FIXTURE_DIR}/cask/container.bz2"
homepage 'https://example.com/container-bzip2'
app 'container-bzip2--1.2.3'
diff --git a/Library/Homebrew/cask/test/support/Casks/container-cab.rb b/Library/Homebrew/cask/test/support/Casks/container-cab.rb
index bdd1b7256..ebc7a544e 100644
--- a/Library/Homebrew/cask/test/support/Casks/container-cab.rb
+++ b/Library/Homebrew/cask/test/support/Casks/container-cab.rb
@@ -2,7 +2,7 @@ test_cask 'container-cab' do
version '1.2.3'
sha256 'c267f5cebb14814c8e612a8b7d2bda02aec913f869509b6f1d3883427c0f552b'
- url TestHelper.local_binary_url('container.cab')
+ url "file://#{TEST_FIXTURE_DIR}/cask/container.cab"
homepage 'https://example.com/container-cab'
depends_on formula: 'cabextract'
diff --git a/Library/Homebrew/cask/test/support/Casks/container-dmg.rb b/Library/Homebrew/cask/test/support/Casks/container-dmg.rb
index 6eb8ac013..d63596f42 100644
--- a/Library/Homebrew/cask/test/support/Casks/container-dmg.rb
+++ b/Library/Homebrew/cask/test/support/Casks/container-dmg.rb
@@ -2,7 +2,7 @@ test_cask 'container-dmg' do
version '1.2.3'
sha256 '74d89d4fa5cef175cf43666ce11fefa3741aa1522114042ac75e656be37141a1'
- url TestHelper.local_binary_url('container.dmg')
+ url "file://#{TEST_FIXTURE_DIR}/cask/container.dmg"
homepage 'https://example.com/container-dmg'
app 'container'
diff --git a/Library/Homebrew/cask/test/support/Casks/container-gzip.rb b/Library/Homebrew/cask/test/support/Casks/container-gzip.rb
index eac74a04c..c2ab00384 100644
--- a/Library/Homebrew/cask/test/support/Casks/container-gzip.rb
+++ b/Library/Homebrew/cask/test/support/Casks/container-gzip.rb
@@ -2,7 +2,7 @@ test_cask 'container-gzip' do
version '1.2.3'
sha256 'fa4ebb5246583c4b6e62e1df4e3b71b4e38a1d7d91c025665827195d36214b20'
- url TestHelper.local_binary_url('container.gz')
+ url "file://#{TEST_FIXTURE_DIR}/cask/container.gz"
homepage 'https://example.com/container-gzip'
app 'container'
diff --git a/Library/Homebrew/cask/test/support/Casks/container-lzma.rb b/Library/Homebrew/cask/test/support/Casks/container-lzma.rb
index faa37c3ba..d5f708523 100644
--- a/Library/Homebrew/cask/test/support/Casks/container-lzma.rb
+++ b/Library/Homebrew/cask/test/support/Casks/container-lzma.rb
@@ -2,7 +2,7 @@ test_cask 'container-lzma' do
version '1.2.3'
sha256 '9d7edb32d02ab9bd9749a5bde8756595ea4cfcb1da02ca11c30fb591d4c1ed85'
- url TestHelper.local_binary_url('container.lzma')
+ url "file://#{TEST_FIXTURE_DIR}/cask/container.lzma"
homepage 'https://example.com/container-lzma'
depends_on formula: 'lzma'
diff --git a/Library/Homebrew/cask/test/support/Casks/container-pkg.rb b/Library/Homebrew/cask/test/support/Casks/container-pkg.rb
index 4f4cd99fa..959caaa08 100644
--- a/Library/Homebrew/cask/test/support/Casks/container-pkg.rb
+++ b/Library/Homebrew/cask/test/support/Casks/container-pkg.rb
@@ -2,6 +2,6 @@ test_cask 'container-pkg' do
version '1.2.3'
sha256 '611c50c8a2a2098951d2cd0fd54787ed81b92cd97b4b08bd7cba17f1e1d8e40b'
- url TestHelper.local_binary_url('container.pkg')
+ url "file://#{TEST_FIXTURE_DIR}/cask/container.pkg"
homepage 'https://example.com/container-pkg'
end
diff --git a/Library/Homebrew/cask/test/support/Casks/container-rar.rb b/Library/Homebrew/cask/test/support/Casks/container-rar.rb
index 2105b738d..7186577a2 100644
--- a/Library/Homebrew/cask/test/support/Casks/container-rar.rb
+++ b/Library/Homebrew/cask/test/support/Casks/container-rar.rb
@@ -2,7 +2,7 @@ test_cask 'container-rar' do
version '1.2.3'
sha256 '419af7864c0e1f125515c49b08bd22e0f7de39f5285897c440fe03c714871763'
- url TestHelper.local_binary_url('container.rar')
+ url "file://#{TEST_FIXTURE_DIR}/cask/container.rar"
homepage 'https://example.com/container-rar'
depends_on formula: 'unar'
diff --git a/Library/Homebrew/cask/test/support/Casks/container-sit.rb b/Library/Homebrew/cask/test/support/Casks/container-sit.rb
index 282e22940..3a0faad97 100644
--- a/Library/Homebrew/cask/test/support/Casks/container-sit.rb
+++ b/Library/Homebrew/cask/test/support/Casks/container-sit.rb
@@ -2,7 +2,7 @@ test_cask 'container-sit' do
version '1.2.3'
sha256 '0d21a64dce625044345c8ecca888e5439feaf254dac7f884917028a744f93cf3'
- url TestHelper.local_binary_url('container.sit')
+ url "file://#{TEST_FIXTURE_DIR}/cask/container.sit"
homepage 'https://example.com/container-sit'
depends_on formula: 'unar'
diff --git a/Library/Homebrew/cask/test/support/Casks/container-tar-gz.rb b/Library/Homebrew/cask/test/support/Casks/container-tar-gz.rb
index 1e6c12959..58e1d82fd 100644
--- a/Library/Homebrew/cask/test/support/Casks/container-tar-gz.rb
+++ b/Library/Homebrew/cask/test/support/Casks/container-tar-gz.rb
@@ -2,7 +2,7 @@ test_cask 'container-tar-gz' do
version '1.2.3'
sha256 'fab685fabf73d5a9382581ce8698fce9408f5feaa49fa10d9bc6c510493300f5'
- url TestHelper.local_binary_url('container.tar.gz')
+ url "file://#{TEST_FIXTURE_DIR}/cask/container.tar.gz"
homepage 'https://example.com/container-tar-gz'
app 'container'
diff --git a/Library/Homebrew/cask/test/support/Casks/container-xar.rb b/Library/Homebrew/cask/test/support/Casks/container-xar.rb
index 96a81dc64..35e01d0a8 100644
--- a/Library/Homebrew/cask/test/support/Casks/container-xar.rb
+++ b/Library/Homebrew/cask/test/support/Casks/container-xar.rb
@@ -2,7 +2,7 @@ test_cask 'container-xar' do
version '1.2.3'
sha256 '5bb8e09a6fc630ebeaf266b1fd2d15e2ae7d32d7e4da6668a8093426fa1ba509'
- url TestHelper.local_binary_url('container.xar')
+ url "file://#{TEST_FIXTURE_DIR}/cask/container.xar"
homepage 'https://example.com/container-xar'
app 'container'
diff --git a/Library/Homebrew/cask/test/support/Casks/container-xz.rb b/Library/Homebrew/cask/test/support/Casks/container-xz.rb
index 8fd42c73f..b27e908ae 100644
--- a/Library/Homebrew/cask/test/support/Casks/container-xz.rb
+++ b/Library/Homebrew/cask/test/support/Casks/container-xz.rb
@@ -2,7 +2,7 @@ test_cask 'container-xz' do
version '1.2.3'
sha256 '839263f474edde1d54a9101606e6f0dc9d963acc93f6dcc5af8d10ebc3187c02'
- url TestHelper.local_binary_url('container.xz')
+ url "file://#{TEST_FIXTURE_DIR}/cask/container.xz"
homepage 'https://example.com/container-xz'
depends_on formula: 'xz'
diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-appcast-multiple.rb b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-appcast-multiple.rb
index 0cb56c283..db2621074 100644
--- a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-appcast-multiple.rb
+++ b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-appcast-multiple.rb
@@ -2,7 +2,7 @@ test_cask 'invalid-appcast-multiple' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
appcast 'http://example.com/appcast1.xml',
checkpoint: '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
appcast 'http://example.com/appcast2.xml',
diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-appcast-url.rb b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-appcast-url.rb
index c57d23539..b4c11b1be 100644
--- a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-appcast-url.rb
+++ b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-appcast-url.rb
@@ -2,7 +2,7 @@ test_cask 'invalid-appcast-url' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
appcast 1,
checkpoint: '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
homepage 'http://example.com/invalid-appcast-url'
diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-conflicts-with-key.rb b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-conflicts-with-key.rb
index c37a796ea..d39d124b0 100644
--- a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-conflicts-with-key.rb
+++ b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-conflicts-with-key.rb
@@ -2,7 +2,7 @@ test_cask 'invalid-conflicts-with-key' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/invalid-conflicts-with-key'
conflicts_with no_such_key: 'unar'
diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-arch-value.rb b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-arch-value.rb
index 2582213ca..b0c919a9b 100644
--- a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-arch-value.rb
+++ b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-arch-value.rb
@@ -2,7 +2,7 @@ test_cask 'invalid-depends-on-arch-value' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/invalid-depends-on-arch-value'
depends_on arch: :no_such_arch
diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-key.rb b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-key.rb
index 0ede1144f..05304e806 100644
--- a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-key.rb
+++ b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-key.rb
@@ -2,7 +2,7 @@ test_cask 'invalid-depends-on-key' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/invalid-depends-on-key'
depends_on no_such_key: 'unar'
diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-macos-bad-release.rb b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-macos-bad-release.rb
index 8ff76ef23..183dd5d91 100644
--- a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-macos-bad-release.rb
+++ b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-macos-bad-release.rb
@@ -2,7 +2,7 @@ test_cask 'invalid-depends-on-macos-bad-release' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/invalid-depends-on-macos-bad-release'
depends_on macos: :no_such_release
diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-macos-conflicting-forms.rb b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-macos-conflicting-forms.rb
index a5c6edc9c..b1f763d76 100644
--- a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-macos-conflicting-forms.rb
+++ b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-macos-conflicting-forms.rb
@@ -2,7 +2,7 @@ test_cask 'invalid-depends-on-macos-conflicting-forms' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/invalid-depends-on-macos-conflicting-forms'
depends_on macos: :yosemite
diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-x11-value.rb b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-x11-value.rb
index 306db3e76..eefd3ac40 100644
--- a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-x11-value.rb
+++ b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-x11-value.rb
@@ -2,7 +2,7 @@ test_cask 'invalid-depends-on-x11-value' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/invalid-depends-on-x11-value'
depends_on x11: :no_such_value
diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-conflicting-keys.rb b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-conflicting-keys.rb
index 7d30a337a..bf14d372b 100644
--- a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-conflicting-keys.rb
+++ b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-conflicting-keys.rb
@@ -2,7 +2,7 @@ test_cask 'invalid-gpg-conflicting-keys' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/invalid-gpg-conflicting-keys'
gpg 'http://example.com/gpg-signature.asc',
key_id: '01234567',
diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-key-id.rb b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-key-id.rb
index 44831de37..626e02a47 100644
--- a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-key-id.rb
+++ b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-key-id.rb
@@ -2,7 +2,7 @@ test_cask 'invalid-gpg-key-id' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/invalid-gpg-key-id'
gpg 'http://example.com/gpg-signature.asc',
key_id: '012'
diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-key-url.rb b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-key-url.rb
index 217d1af51..77d41ed6b 100644
--- a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-key-url.rb
+++ b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-key-url.rb
@@ -2,7 +2,7 @@ test_cask 'invalid-gpg-key-url' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/invalid-gpg-key-url'
gpg 'http://example.com/gpg-signature.asc',
key_url: 1
diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-missing-key.rb b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-missing-key.rb
index 8818d4129..460bcd532 100644
--- a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-missing-key.rb
+++ b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-missing-key.rb
@@ -2,7 +2,7 @@ test_cask 'invalid-gpg-missing-key' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/invalid-gpg-missing-keys'
gpg 'http://example.com/gpg-signature.asc'
diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-multiple-stanzas.rb b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-multiple-stanzas.rb
index 4bf13712f..8abc89486 100644
--- a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-multiple-stanzas.rb
+++ b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-multiple-stanzas.rb
@@ -2,7 +2,7 @@ test_cask 'invalid-gpg-multiple-stanzas' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/invalid-gpg-multiple-stanzas'
gpg 'http://example.com/gpg-signature.asc',
key_id: '01234567'
diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-parameter.rb b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-parameter.rb
index ad8caec73..f1abc9225 100644
--- a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-parameter.rb
+++ b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-parameter.rb
@@ -2,7 +2,7 @@ test_cask 'invalid-gpg-parameter' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/invalid-gpg-type'
gpg 'http://example.com/gpg-signature.asc',
no_such_parameter: :value
diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-signature-url.rb b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-signature-url.rb
index 010255475..1b9e7362f 100644
--- a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-signature-url.rb
+++ b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-signature-url.rb
@@ -2,7 +2,7 @@ test_cask 'invalid-gpg-signature-url' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/invalid-gpg-signature-url'
gpg 1,
key_id: '01234567'
diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-type.rb b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-type.rb
index 386273269..266047617 100644
--- a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-type.rb
+++ b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-type.rb
@@ -2,7 +2,7 @@ test_cask 'invalid-gpg-type' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/invalid-gpg-type'
gpg 'http://example.com/gpg-signature.asc',
no_such_parameter: :value
diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-header-format.rb b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-header-format.rb
index 6ab549b11..a8159c979 100644
--- a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-header-format.rb
+++ b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-header-format.rb
@@ -2,7 +2,7 @@ test_cask => 'invalid-header-format' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/local-caffeine'
app 'Caffeine.app'
diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-header-token-mismatch.rb b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-header-token-mismatch.rb
index 4c51019f4..2b8ad5619 100644
--- a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-header-token-mismatch.rb
+++ b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-header-token-mismatch.rb
@@ -2,7 +2,7 @@ test_cask 'invalid-header-token-mismatch-this-text-does-not-belong' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/local-caffeine'
app 'Caffeine.app'
diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-header-version.rb b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-header-version.rb
index d07c0f43b..47851c0e0 100644
--- a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-header-version.rb
+++ b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-header-version.rb
@@ -2,7 +2,7 @@ test_cask 'invalid-header-version' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/local-caffeine'
app 'Caffeine.app'
diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-stage-only-conflict.rb b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-stage-only-conflict.rb
index 1dc875739..84510ac24 100644
--- a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-stage-only-conflict.rb
+++ b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-stage-only-conflict.rb
@@ -2,7 +2,7 @@ test_cask 'invalid-stage-only-conflict' do
version '2.61'
sha256 'e44ffa103fbf83f55c8d0b1bea309a43b2880798dae8620b1ee8da5e1095ec68'
- url TestHelper.local_binary_url('transmission-2.61.dmg')
+ url "file://#{TEST_FIXTURE_DIR}/cask/transmission-2.61.dmg"
homepage 'http://example.com/invalid-stage-only-conflict'
app 'Transmission.app'
diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-two-homepage.rb b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-two-homepage.rb
index 0f562f13f..d4e5ff4a9 100644
--- a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-two-homepage.rb
+++ b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-two-homepage.rb
@@ -2,7 +2,7 @@ test_cask 'invalid-two-homepage' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/local-caffeine'
homepage 'http://www.example.com/local-caffeine'
diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-two-url.rb b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-two-url.rb
index 8b2d435cc..49e470788 100644
--- a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-two-url.rb
+++ b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-two-url.rb
@@ -2,7 +2,7 @@ test_cask 'invalid-two-url' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
url 'http://example.com/caffeine.zip'
homepage 'http://example.com/local-caffeine'
diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-two-version.rb b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-two-version.rb
index 78ec5f367..c9fe37772 100644
--- a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-two-version.rb
+++ b/Library/Homebrew/cask/test/support/Casks/invalid/invalid-two-version.rb
@@ -3,7 +3,7 @@ test_cask 'invalid-two-version' do
version '2.0'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/local-caffeine'
app 'Caffeine.app'
diff --git a/Library/Homebrew/cask/test/support/Casks/local-caffeine.rb b/Library/Homebrew/cask/test/support/Casks/local-caffeine.rb
index 93a7624a5..2be9b4397 100644
--- a/Library/Homebrew/cask/test/support/Casks/local-caffeine.rb
+++ b/Library/Homebrew/cask/test/support/Casks/local-caffeine.rb
@@ -2,7 +2,7 @@ test_cask 'local-caffeine' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/local-caffeine'
app 'Caffeine.app'
diff --git a/Library/Homebrew/cask/test/support/Casks/local-transmission.rb b/Library/Homebrew/cask/test/support/Casks/local-transmission.rb
index 365ef02f7..f5244d0a5 100644
--- a/Library/Homebrew/cask/test/support/Casks/local-transmission.rb
+++ b/Library/Homebrew/cask/test/support/Casks/local-transmission.rb
@@ -2,7 +2,7 @@ test_cask 'local-transmission' do
version '2.61'
sha256 'e44ffa103fbf83f55c8d0b1bea309a43b2880798dae8620b1ee8da5e1095ec68'
- url TestHelper.local_binary_url('transmission-2.61.dmg')
+ url "file://#{TEST_FIXTURE_DIR}/cask/transmission-2.61.dmg"
homepage 'http://example.com/local-transmission'
app 'Transmission.app'
diff --git a/Library/Homebrew/cask/test/support/Casks/missing-checksum.rb b/Library/Homebrew/cask/test/support/Casks/missing-checksum.rb
index 3187f6fd2..5e1886a57 100644
--- a/Library/Homebrew/cask/test/support/Casks/missing-checksum.rb
+++ b/Library/Homebrew/cask/test/support/Casks/missing-checksum.rb
@@ -1,7 +1,7 @@
test_cask 'missing-checksum' do
version '1.2.3'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/local-caffeine'
app 'Caffeine.app'
diff --git a/Library/Homebrew/cask/test/support/Casks/naked-executable.rb b/Library/Homebrew/cask/test/support/Casks/naked-executable.rb
index 03e89e97b..619c7a5fb 100644
--- a/Library/Homebrew/cask/test/support/Casks/naked-executable.rb
+++ b/Library/Homebrew/cask/test/support/Casks/naked-executable.rb
@@ -2,7 +2,7 @@ test_cask 'naked-executable' do
version '1.2.3'
sha256 '306c6ca7407560340797866e077e053627ad409277d1b9da58106fce4cf717cb'
- url TestHelper.local_binary_url('naked_executable')
+ url "file://#{TEST_FIXTURE_DIR}/cask/naked_executable"
homepage 'http://example.com/naked-executable'
container type: :naked
diff --git a/Library/Homebrew/cask/test/support/Casks/nested-app.rb b/Library/Homebrew/cask/test/support/Casks/nested-app.rb
index 77bd04127..526c7414a 100644
--- a/Library/Homebrew/cask/test/support/Casks/nested-app.rb
+++ b/Library/Homebrew/cask/test/support/Casks/nested-app.rb
@@ -2,7 +2,7 @@ test_cask 'nested-app' do
version '1.2.3'
sha256 '1866dfa833b123bb8fe7fa7185ebf24d28d300d0643d75798bc23730af734216'
- url TestHelper.local_binary_url('NestedApp.dmg.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/NestedApp.dmg.zip"
homepage 'http://example.com/nested-app'
container nested: 'NestedApp.dmg'
diff --git a/Library/Homebrew/cask/test/support/Casks/no-checksum.rb b/Library/Homebrew/cask/test/support/Casks/no-checksum.rb
index dbe62b02b..d9ba354f5 100644
--- a/Library/Homebrew/cask/test/support/Casks/no-checksum.rb
+++ b/Library/Homebrew/cask/test/support/Casks/no-checksum.rb
@@ -2,7 +2,7 @@ test_cask 'no-checksum' do
version '1.2.3'
sha256 :no_check
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/local-caffeine'
app 'Caffeine.app'
diff --git a/Library/Homebrew/cask/test/support/Casks/stage-only.rb b/Library/Homebrew/cask/test/support/Casks/stage-only.rb
index d7fae47d6..b52b5d3d2 100644
--- a/Library/Homebrew/cask/test/support/Casks/stage-only.rb
+++ b/Library/Homebrew/cask/test/support/Casks/stage-only.rb
@@ -2,7 +2,7 @@ test_cask 'stage-only' do
version '2.61'
sha256 'e44ffa103fbf83f55c8d0b1bea309a43b2880798dae8620b1ee8da5e1095ec68'
- url TestHelper.local_binary_url('transmission-2.61.dmg')
+ url "file://#{TEST_FIXTURE_DIR}/cask/transmission-2.61.dmg"
homepage 'http://example.com/stage-only'
stage_only true
diff --git a/Library/Homebrew/cask/test/support/Casks/with-alt-target.rb b/Library/Homebrew/cask/test/support/Casks/with-alt-target.rb
index 9a3196ce1..b75ff320c 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-alt-target.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-alt-target.rb
@@ -2,7 +2,7 @@ test_cask 'with-alt-target' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/local-caffeine'
app 'Caffeine.app', target: 'AnotherName.app'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-appcast.rb b/Library/Homebrew/cask/test/support/Casks/with-appcast.rb
index fb4ad9249..f99f7a93c 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-appcast.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-appcast.rb
@@ -2,7 +2,7 @@ test_cask 'with-appcast' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
appcast 'http://example.com/appcast.xml',
checkpoint: '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
homepage 'http://example.com/with-appcast'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-caveats.rb b/Library/Homebrew/cask/test/support/Casks/with-caveats.rb
index 38ae23b44..30d3a49b3 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-caveats.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-caveats.rb
@@ -2,7 +2,7 @@ test_cask 'with-caveats' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/local-caffeine'
app 'Caffeine.app'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-conditional-caveats.rb b/Library/Homebrew/cask/test/support/Casks/with-conditional-caveats.rb
index db55930a2..d8a3836b8 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-conditional-caveats.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-conditional-caveats.rb
@@ -2,7 +2,7 @@ test_cask 'with-conditional-caveats' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/local-caffeine'
app 'Caffeine.app'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-conflicts-with.rb b/Library/Homebrew/cask/test/support/Casks/with-conflicts-with.rb
index 540f14164..a20d932ba 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-conflicts-with.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-conflicts-with.rb
@@ -2,7 +2,7 @@ test_cask 'with-conflicts-with' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/with-conflicts-with'
conflicts_with formula: 'unar'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-depends-on-arch-failure.rb b/Library/Homebrew/cask/test/support/Casks/with-depends-on-arch-failure.rb
index 5f9016be9..14c916573 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-depends-on-arch-failure.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-depends-on-arch-failure.rb
@@ -2,7 +2,7 @@ test_cask 'with-depends-on-arch-failure' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/with-depends-on-arch-failure'
# guarantee mismatched hardware
diff --git a/Library/Homebrew/cask/test/support/Casks/with-depends-on-arch.rb b/Library/Homebrew/cask/test/support/Casks/with-depends-on-arch.rb
index 0746c3874..fe5e4ba03 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-depends-on-arch.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-depends-on-arch.rb
@@ -2,7 +2,7 @@ test_cask 'with-depends-on-arch' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/with-depends-on-arch'
# covers all known hardware; always succeeds
diff --git a/Library/Homebrew/cask/test/support/Casks/with-depends-on-cask-cyclic-helper.rb b/Library/Homebrew/cask/test/support/Casks/with-depends-on-cask-cyclic-helper.rb
index 4a11a163b..327fc4000 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-depends-on-cask-cyclic-helper.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-depends-on-cask-cyclic-helper.rb
@@ -2,7 +2,7 @@ test_cask 'with-depends-on-cask-cyclic-helper' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/with-depends-on-cask-cyclic-helper'
depends_on cask: 'with-depends-on-cask-cyclic'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-depends-on-cask-cyclic.rb b/Library/Homebrew/cask/test/support/Casks/with-depends-on-cask-cyclic.rb
index bb782ae19..f74d860bf 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-depends-on-cask-cyclic.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-depends-on-cask-cyclic.rb
@@ -2,7 +2,7 @@ test_cask 'with-depends-on-cask-cyclic' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/with-depends-on-cask-cyclic'
depends_on cask: 'local-caffeine'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-depends-on-cask-multiple.rb b/Library/Homebrew/cask/test/support/Casks/with-depends-on-cask-multiple.rb
index 1dc939350..bb69b7506 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-depends-on-cask-multiple.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-depends-on-cask-multiple.rb
@@ -2,7 +2,7 @@ test_cask 'with-depends-on-cask-multiple' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/with-depends-on-cask-multiple'
depends_on cask: 'local-caffeine'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-depends-on-cask.rb b/Library/Homebrew/cask/test/support/Casks/with-depends-on-cask.rb
index 62f32c32b..05a180560 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-depends-on-cask.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-depends-on-cask.rb
@@ -2,7 +2,7 @@ test_cask 'with-depends-on-cask' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/with-depends-on-cask'
depends_on cask: 'local-transmission'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-depends-on-formula-multiple.rb b/Library/Homebrew/cask/test/support/Casks/with-depends-on-formula-multiple.rb
index 1d02add39..c99d2dee1 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-depends-on-formula-multiple.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-depends-on-formula-multiple.rb
@@ -2,7 +2,7 @@ test_cask 'with-depends-on-formula-multiple' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/with-depends-on-formula-multiple'
depends_on formula: 'unar'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-depends-on-formula.rb b/Library/Homebrew/cask/test/support/Casks/with-depends-on-formula.rb
index 3dd542893..b0339e68c 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-depends-on-formula.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-depends-on-formula.rb
@@ -2,7 +2,7 @@ test_cask 'with-depends-on-formula' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/with-depends-on-formula'
depends_on formula: 'unar'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-array.rb b/Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-array.rb
index 946782536..cae16704c 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-array.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-array.rb
@@ -2,7 +2,7 @@ test_cask 'with-depends-on-macos-array' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/with-depends-on-macos-array'
# since all OS releases are included, this should always pass
diff --git a/Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-comparison.rb b/Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-comparison.rb
index 2780b94b7..7f14dd84f 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-comparison.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-comparison.rb
@@ -2,7 +2,7 @@ test_cask 'with-depends-on-macos-comparison' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/with-depends-on-macos-comparison'
depends_on macos: '>= 10.4'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-failure.rb b/Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-failure.rb
index 4e3c777ec..ecefff362 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-failure.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-failure.rb
@@ -2,7 +2,7 @@ test_cask 'with-depends-on-macos-failure' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/with-depends-on-macos-failure'
# guarantee a mismatched release
diff --git a/Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-string.rb b/Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-string.rb
index 7c15e6308..6e370d46a 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-string.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-string.rb
@@ -2,7 +2,7 @@ test_cask 'with-depends-on-macos-string' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/with-depends-on-macos-string'
depends_on macos: MacOS.version.to_s
diff --git a/Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-symbol.rb b/Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-symbol.rb
index 10b1de754..7f11b6e64 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-symbol.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-symbol.rb
@@ -2,7 +2,7 @@ test_cask 'with-depends-on-macos-symbol' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/with-depends-on-macos-symbol'
depends_on macos: MacOS.version.to_sym
diff --git a/Library/Homebrew/cask/test/support/Casks/with-depends-on-x11-false.rb b/Library/Homebrew/cask/test/support/Casks/with-depends-on-x11-false.rb
index d52a0e8df..fc84f2daa 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-depends-on-x11-false.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-depends-on-x11-false.rb
@@ -2,7 +2,7 @@ test_cask 'with-depends-on-x11-false' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/with-depends-on-x11-false'
depends_on x11: false
diff --git a/Library/Homebrew/cask/test/support/Casks/with-depends-on-x11.rb b/Library/Homebrew/cask/test/support/Casks/with-depends-on-x11.rb
index c7384cf3a..b1a7bad2b 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-depends-on-x11.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-depends-on-x11.rb
@@ -2,7 +2,7 @@ test_cask 'with-depends-on-x11' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/with-depends-on-x11'
depends_on x11: true
diff --git a/Library/Homebrew/cask/test/support/Casks/with-generic-artifact-no-target.rb b/Library/Homebrew/cask/test/support/Casks/with-generic-artifact-no-target.rb
index 3d8d80445..a7d347fb5 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-generic-artifact-no-target.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-generic-artifact-no-target.rb
@@ -2,7 +2,7 @@ test_cask 'with-generic-artifact-no-target' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/with-generic-artifact'
artifact 'Caffeine.app'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-generic-artifact.rb b/Library/Homebrew/cask/test/support/Casks/with-generic-artifact.rb
index 9e379c543..e718b994b 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-generic-artifact.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-generic-artifact.rb
@@ -2,7 +2,7 @@ test_cask 'with-generic-artifact' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/with-generic-artifact'
artifact 'Caffeine.app', target: "#{Hbc.appdir}/Caffeine.app"
diff --git a/Library/Homebrew/cask/test/support/Casks/with-gpg-key-url.rb b/Library/Homebrew/cask/test/support/Casks/with-gpg-key-url.rb
index 943421b82..6aa735e1f 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-gpg-key-url.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-gpg-key-url.rb
@@ -2,7 +2,7 @@ test_cask 'with-gpg-key-url' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/with-gpg-key-url'
gpg 'http://example.com/gpg-signature.asc',
key_url: 'http://example.com/gpg-key-url'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-gpg.rb b/Library/Homebrew/cask/test/support/Casks/with-gpg.rb
index dcdd8f593..1f7042515 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-gpg.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-gpg.rb
@@ -2,7 +2,7 @@ test_cask 'with-gpg' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/with-gpg'
gpg 'http://example.com/gpg-signature.asc',
key_id: '01234567'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-installable.rb b/Library/Homebrew/cask/test/support/Casks/with-installable.rb
index b32273a6c..d1105b50e 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-installable.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-installable.rb
@@ -2,7 +2,7 @@ test_cask 'with-installable' do
version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
- url TestHelper.local_binary_url('MyFancyPkg.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage 'http://example.com/fancy-pkg'
pkg 'MyFancyPkg/Fancy.pkg'
@@ -16,5 +16,5 @@ test_cask 'with-installable' do
'impermissible/relative/path',
'/another/impermissible/../relative/path',
],
- rmdir: TestHelper.local_binary_path('empty_directory')
+ rmdir: "#{TEST_FIXTURE_DIR}/cask/empty_directory"
end
diff --git a/Library/Homebrew/cask/test/support/Casks/with-installer-manual.rb b/Library/Homebrew/cask/test/support/Casks/with-installer-manual.rb
index 7e9a8eac7..92e2e09df 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-installer-manual.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-installer-manual.rb
@@ -2,7 +2,7 @@ test_cask 'with-installer-manual' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/local-caffeine'
installer manual: 'Caffeine.app'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-installer-script.rb b/Library/Homebrew/cask/test/support/Casks/with-installer-script.rb
index c4b18417a..5e98eab48 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-installer-script.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-installer-script.rb
@@ -2,7 +2,7 @@ test_cask 'with-installer-script' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/with-install-script'
installer script: '/usr/bin/true',
diff --git a/Library/Homebrew/cask/test/support/Casks/with-macosx-dir.rb b/Library/Homebrew/cask/test/support/Casks/with-macosx-dir.rb
index 24c4ec4dd..837627119 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-macosx-dir.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-macosx-dir.rb
@@ -2,7 +2,7 @@ test_cask 'with-macosx-dir' do
version '1.2.3'
sha256 '5633c3a0f2e572cbf021507dec78c50998b398c343232bdfc7e26221d0a5db4d'
- url TestHelper.local_binary_url('MyFancyApp.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyApp.zip"
homepage 'http://example.com/MyFancyApp'
app 'MyFancyApp/MyFancyApp.app'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-pkgutil-zap.rb b/Library/Homebrew/cask/test/support/Casks/with-pkgutil-zap.rb
index 6440285a0..8bb42c447 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-pkgutil-zap.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-pkgutil-zap.rb
@@ -2,7 +2,7 @@ test_cask 'with-pkgutil-zap' do
version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
- url TestHelper.local_binary_url('MyFancyPkg.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage 'http://example.com/fancy-pkg'
pkg 'Fancy.pkg'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-suite.rb b/Library/Homebrew/cask/test/support/Casks/with-suite.rb
index e92b22425..c36151d52 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-suite.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-suite.rb
@@ -2,7 +2,7 @@ test_cask 'with-suite' do
version '1.2.3'
sha256 'd95dcc12d4e5be0bc3cb9793c4b7e7f69a25f0b3c7418494b0c883957e6eeae4'
- url TestHelper.local_binary_url('caffeine-suite.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine-suite.zip"
name 'Caffeine'
homepage 'http://example.com/with-suite'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-two-apps-correct.rb b/Library/Homebrew/cask/test/support/Casks/with-two-apps-correct.rb
index 069eb9fed..8eb68d88a 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-two-apps-correct.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-two-apps-correct.rb
@@ -2,7 +2,7 @@ test_cask 'with-two-apps-correct' do
version '1.2.3'
sha256 '3178fbfd1ea5d87a2a0662a4eb599ebc9a03888e73f37538d9f3f6ee69d2368e'
- url TestHelper.local_binary_url('caffeines.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeines.zip"
homepage 'http://example.com/local-caffeine'
app 'Caffeine Mini.app'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-two-apps-incorrect.rb b/Library/Homebrew/cask/test/support/Casks/with-two-apps-incorrect.rb
index baf6e52f0..6bd316dfe 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-two-apps-incorrect.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-two-apps-incorrect.rb
@@ -2,7 +2,7 @@ test_cask 'with-two-apps-incorrect' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
- url TestHelper.local_binary_url('caffeine.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'http://example.com/local-caffeine'
app 'Caffeine.app', 'Caffeine.app/Contents/MacOS/Caffeine'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-two-apps-subdir.rb b/Library/Homebrew/cask/test/support/Casks/with-two-apps-subdir.rb
index d4783e6a6..202423691 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-two-apps-subdir.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-two-apps-subdir.rb
@@ -2,7 +2,7 @@ test_cask 'with-two-apps-subdir' do
version '1.2.3'
sha256 'd687c22a21c02bd8f07da9302c8292b93a04df9a929e3f04d09aea6c76f75c65'
- url TestHelper.local_binary_url('caffeines-subdir.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/caffeines-subdir.zip"
homepage 'http://example.com/local-caffeine'
app 'Caffeines/Caffeine Mini.app'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-uninstall-delete.rb b/Library/Homebrew/cask/test/support/Casks/with-uninstall-delete.rb
index c85b3bd0f..203f18405 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-uninstall-delete.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-uninstall-delete.rb
@@ -2,7 +2,7 @@ test_cask 'with-uninstall-delete' do
version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
- url TestHelper.local_binary_url('MyFancyPkg.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage 'http://example.com/fancy-pkg'
pkg 'Fancy.pkg'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-uninstall-early-script.rb b/Library/Homebrew/cask/test/support/Casks/with-uninstall-early-script.rb
index 6fe3842e2..a26abab1c 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-uninstall-early-script.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-uninstall-early-script.rb
@@ -2,7 +2,7 @@ test_cask 'with-uninstall-early-script' do
version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
- url TestHelper.local_binary_url('MyFancyPkg.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage 'http://example.com/fancy-pkg'
pkg 'MyFancyPkg/Fancy.pkg'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-uninstall-kext.rb b/Library/Homebrew/cask/test/support/Casks/with-uninstall-kext.rb
index 682ce689e..fa54c7e1f 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-uninstall-kext.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-uninstall-kext.rb
@@ -2,7 +2,7 @@ test_cask 'with-uninstall-kext' do
version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
- url TestHelper.local_binary_url('MyFancyPkg.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage 'http://example.com/fancy-pkg'
pkg 'Fancy.pkg'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-uninstall-launchctl.rb b/Library/Homebrew/cask/test/support/Casks/with-uninstall-launchctl.rb
index 0e601b41e..51ad45a09 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-uninstall-launchctl.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-uninstall-launchctl.rb
@@ -2,7 +2,7 @@ test_cask 'with-uninstall-launchctl' do
version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
- url TestHelper.local_binary_url('MyFancyApp.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyApp.zip"
homepage 'http://example.com/fancy'
app 'Fancy.app'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-uninstall-login-item.rb b/Library/Homebrew/cask/test/support/Casks/with-uninstall-login-item.rb
index d977b31e3..26dca6f1a 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-uninstall-login-item.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-uninstall-login-item.rb
@@ -2,7 +2,7 @@ test_cask 'with-uninstall-login-item' do
version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
- url TestHelper.local_binary_url('MyFancyPkg.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage 'http://example.com/fancy-pkg'
pkg 'MyFancyPkg/Fancy.pkg'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-uninstall-pkgutil.rb b/Library/Homebrew/cask/test/support/Casks/with-uninstall-pkgutil.rb
index 773e1e43b..db77a460b 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-uninstall-pkgutil.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-uninstall-pkgutil.rb
@@ -2,7 +2,7 @@ test_cask 'with-uninstall-pkgutil' do
version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
- url TestHelper.local_binary_url('MyFancyPkg.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage 'http://example.com/fancy-pkg'
pkg 'Fancy.pkg'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-uninstall-quit.rb b/Library/Homebrew/cask/test/support/Casks/with-uninstall-quit.rb
index 88e063c62..19337b18a 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-uninstall-quit.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-uninstall-quit.rb
@@ -2,7 +2,7 @@ test_cask 'with-uninstall-quit' do
version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
- url TestHelper.local_binary_url('MyFancyPkg.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage 'http://example.com/fancy-pkg'
pkg 'MyFancyPkg/Fancy.pkg'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-uninstall-rmdir.rb b/Library/Homebrew/cask/test/support/Casks/with-uninstall-rmdir.rb
index ce1c66518..88142ea71 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-uninstall-rmdir.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-uninstall-rmdir.rb
@@ -2,10 +2,10 @@ test_cask 'with-uninstall-rmdir' do
version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
- url TestHelper.local_binary_url('MyFancyPkg.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage 'http://example.com/fancy-pkg'
pkg 'MyFancyPkg/Fancy.pkg'
- uninstall rmdir: TestHelper.local_binary_path('empty_directory')
+ uninstall rmdir: "#{TEST_FIXTURE_DIR}/cask/empty_directory"
end
diff --git a/Library/Homebrew/cask/test/support/Casks/with-uninstall-script.rb b/Library/Homebrew/cask/test/support/Casks/with-uninstall-script.rb
index 975a14442..d2e0d6167 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-uninstall-script.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-uninstall-script.rb
@@ -2,7 +2,7 @@ test_cask 'with-uninstall-script' do
version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
- url TestHelper.local_binary_url('MyFancyPkg.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage 'http://example.com/fancy-pkg'
pkg 'MyFancyPkg/Fancy.pkg'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-uninstall-signal.rb b/Library/Homebrew/cask/test/support/Casks/with-uninstall-signal.rb
index 808768173..cc32b888a 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-uninstall-signal.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-uninstall-signal.rb
@@ -2,7 +2,7 @@ test_cask 'with-uninstall-signal' do
version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
- url TestHelper.local_binary_url('MyFancyPkg.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage 'http://example.com/fancy-pkg'
pkg 'MyFancyPkg/Fancy.pkg'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-uninstall-trash.rb b/Library/Homebrew/cask/test/support/Casks/with-uninstall-trash.rb
index 16f174c2d..4fe58a19a 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-uninstall-trash.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-uninstall-trash.rb
@@ -2,7 +2,7 @@ test_cask 'with-uninstall-trash' do
version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
- url TestHelper.local_binary_url('MyFancyPkg.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage 'http://example.com/fancy-pkg'
pkg 'Fancy.pkg'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-zap-delete.rb b/Library/Homebrew/cask/test/support/Casks/with-zap-delete.rb
index 77d50ffba..c76a9acb0 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-zap-delete.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-zap-delete.rb
@@ -2,7 +2,7 @@ test_cask 'with-zap-delete' do
version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
- url TestHelper.local_binary_url('MyFancyPkg.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage 'http://example.com/fancy-pkg'
pkg 'Fancy.pkg'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-zap-early-script.rb b/Library/Homebrew/cask/test/support/Casks/with-zap-early-script.rb
index 299c4d135..d35c1809e 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-zap-early-script.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-zap-early-script.rb
@@ -2,7 +2,7 @@ test_cask 'with-zap-early-script' do
version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
- url TestHelper.local_binary_url('MyFancyPkg.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage 'http://example.com/fancy-pkg'
pkg 'MyFancyPkg/Fancy.pkg'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-zap-kext.rb b/Library/Homebrew/cask/test/support/Casks/with-zap-kext.rb
index d8809b409..463fe8133 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-zap-kext.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-zap-kext.rb
@@ -2,7 +2,7 @@ test_cask 'with-zap-kext' do
version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
- url TestHelper.local_binary_url('MyFancyPkg.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage 'http://example.com/fancy-pkg'
pkg 'Fancy.pkg'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-zap-launchctl.rb b/Library/Homebrew/cask/test/support/Casks/with-zap-launchctl.rb
index 321e17a78..aab285672 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-zap-launchctl.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-zap-launchctl.rb
@@ -2,7 +2,7 @@ test_cask 'with-zap-launchctl' do
version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
- url TestHelper.local_binary_url('MyFancyApp.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyApp.zip"
homepage 'http://example.com/fancy'
app 'Fancy.app'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-zap-login-item.rb b/Library/Homebrew/cask/test/support/Casks/with-zap-login-item.rb
index a7af6ce63..d7ba9a65b 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-zap-login-item.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-zap-login-item.rb
@@ -2,7 +2,7 @@ test_cask 'with-zap-login-item' do
version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
- url TestHelper.local_binary_url('MyFancyPkg.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage 'http://example.com/fancy-pkg'
pkg 'MyFancyPkg/Fancy.pkg'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-zap-pkgutil.rb b/Library/Homebrew/cask/test/support/Casks/with-zap-pkgutil.rb
index ded6508cd..17a667000 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-zap-pkgutil.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-zap-pkgutil.rb
@@ -2,7 +2,7 @@ test_cask 'with-zap-pkgutil' do
version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
- url TestHelper.local_binary_url('MyFancyPkg.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage 'http://example.com/fancy-pkg'
pkg 'Fancy.pkg'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-zap-quit.rb b/Library/Homebrew/cask/test/support/Casks/with-zap-quit.rb
index 0b21221c8..21f824ae9 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-zap-quit.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-zap-quit.rb
@@ -2,7 +2,7 @@ test_cask 'with-zap-quit' do
version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
- url TestHelper.local_binary_url('MyFancyPkg.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage 'http://example.com/fancy-pkg'
pkg 'MyFancyPkg/Fancy.pkg'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-zap-rmdir.rb b/Library/Homebrew/cask/test/support/Casks/with-zap-rmdir.rb
index f3f799919..eac02ad0e 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-zap-rmdir.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-zap-rmdir.rb
@@ -2,10 +2,10 @@ test_cask 'with-zap-rmdir' do
version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
- url TestHelper.local_binary_url('MyFancyPkg.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage 'http://example.com/fancy-pkg'
pkg 'MyFancyPkg/Fancy.pkg'
- zap rmdir: TestHelper.local_binary_path('empty_directory')
+ zap rmdir: "#{TEST_FIXTURE_DIR}/cask/empty_directory"
end
diff --git a/Library/Homebrew/cask/test/support/Casks/with-zap-script.rb b/Library/Homebrew/cask/test/support/Casks/with-zap-script.rb
index 9e8ae0d12..f8646a267 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-zap-script.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-zap-script.rb
@@ -2,7 +2,7 @@ test_cask 'with-zap-script' do
version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
- url TestHelper.local_binary_url('MyFancyPkg.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage 'http://example.com/fancy-pkg'
pkg 'MyFancyPkg/Fancy.pkg'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-zap-signal.rb b/Library/Homebrew/cask/test/support/Casks/with-zap-signal.rb
index 7338b67b0..5accd8337 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-zap-signal.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-zap-signal.rb
@@ -2,7 +2,7 @@ test_cask 'with-zap-signal' do
version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
- url TestHelper.local_binary_url('MyFancyPkg.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage 'http://example.com/fancy-pkg'
pkg 'MyFancyPkg/Fancy.pkg'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-zap-trash.rb b/Library/Homebrew/cask/test/support/Casks/with-zap-trash.rb
index 7295b7a23..aef4e0eab 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-zap-trash.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-zap-trash.rb
@@ -2,7 +2,7 @@ test_cask 'with-zap-trash' do
version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
- url TestHelper.local_binary_url('MyFancyPkg.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage 'http://example.com/fancy-pkg'
pkg 'Fancy.pkg'
diff --git a/Library/Homebrew/cask/test/support/Casks/with-zap.rb b/Library/Homebrew/cask/test/support/Casks/with-zap.rb
index 752aca019..056c90671 100644
--- a/Library/Homebrew/cask/test/support/Casks/with-zap.rb
+++ b/Library/Homebrew/cask/test/support/Casks/with-zap.rb
@@ -2,7 +2,7 @@ test_cask 'with-zap' do
version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
- url TestHelper.local_binary_url('MyFancyPkg.zip')
+ url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage 'http://example.com/fancy-pkg'
pkg 'MyFancyPkg/Fancy.pkg'
diff --git a/Library/Homebrew/cask/test/support/fake_fetcher.rb b/Library/Homebrew/cask/test/support/fake_fetcher.rb
deleted file mode 100644
index 43483751f..000000000
--- a/Library/Homebrew/cask/test/support/fake_fetcher.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-module Hbc
- class FakeFetcher
- def self.fake_response_for(url, response)
- @responses[url] = response
- end
-
- def self.head(url)
- @responses ||= {}
- raise("no response faked for #{url.inspect}") unless @responses.key?(url)
- @responses[url]
- end
-
- def self.init
- @responses = {}
- end
-
- def self.clear
- @responses = {}
- end
- end
-end
-
-module FakeFetcherHooks
- def before_setup
- super
- Hbc::FakeFetcher.init
- end
-
- def after_teardown
- super
- Hbc::FakeFetcher.clear
- end
-end
-
-module MiniTest
- class Spec
- include FakeFetcherHooks
- end
-end
diff --git a/Library/Homebrew/cask/test/test_helper.rb b/Library/Homebrew/cask/test/test_helper.rb
index 6b66c1138..85024aae8 100644
--- a/Library/Homebrew/cask/test/test_helper.rb
+++ b/Library/Homebrew/cask/test/test_helper.rb
@@ -100,7 +100,6 @@ require "support/shared_examples"
require "support/shared_examples/dsl_base.rb"
require "support/shared_examples/staged.rb"
-require "support/fake_fetcher"
require "support/fake_dirs"
require "support/fake_system_command"
require "support/cleanup"
diff --git a/Library/Homebrew/cmd/gist-logs.rb b/Library/Homebrew/cmd/gist-logs.rb
index e55eefc17..5cacd50b6 100644
--- a/Library/Homebrew/cmd/gist-logs.rb
+++ b/Library/Homebrew/cmd/gist-logs.rb
@@ -47,13 +47,16 @@ module Homebrew
if ARGV.include?("--new-issue") || ARGV.switch?("n")
if GitHub.api_credentials_type == :none
- puts "You can create a personal access token: https://github.com/settings/tokens"
- puts "and then set HOMEBREW_GITHUB_API_TOKEN as authentication method."
- puts
+ puts <<-EOS.undent
+ You can create a new personal access token:
+ #{GitHub::ALL_SCOPES_URL}
+ and then set the new HOMEBREW_GITHUB_API_TOKEN as the authentication method.
+
+ EOS
login!
end
- url = new_issue(f.tap, "#{f.name} failed to build on #{MacOS.full_version}", url)
+ url = create_issue(f.tap, "#{f.name} failed to build on #{MacOS.full_version}", url)
end
puts url if url
@@ -103,13 +106,17 @@ module Homebrew
end
def create_gist(files, description)
+ url = "https://api.github.com/gists"
data = { "public" => true, "files" => files, "description" => description }
- GitHub.open("https://api.github.com/gists", data)["html_url"]
+ scopes = GitHub::CREATE_GIST_SCOPES
+ GitHub.open(url, data: data, scopes: scopes)["html_url"]
end
- def new_issue(repo, title, body)
+ def create_issue(repo, title, body)
+ url = "https://api.github.com/repos/#{repo}/issues"
data = { "title" => title, "body" => body }
- GitHub.open("https://api.github.com/repos/#{repo}/issues", data)["html_url"]
+ scopes = GitHub::CREATE_ISSUE_SCOPES
+ GitHub.open(url, data: data, scopes: scopes)["html_url"]
end
def gist_logs
diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb
index 2c027a52e..0867e893a 100644
--- a/Library/Homebrew/cmd/install.rb
+++ b/Library/Homebrew/cmd/install.rb
@@ -76,7 +76,7 @@ module Homebrew
unless ARGV.force?
ARGV.named.each do |name|
next if File.exist?(name)
- if name !~ HOMEBREW_TAP_FORMULA_REGEX && name !~ HOMEBREW_CASK_TAP_FORMULA_REGEX
+ if name !~ HOMEBREW_TAP_FORMULA_REGEX && name !~ HOMEBREW_CASK_TAP_CASK_REGEX
next
end
tap = Tap.fetch($1, $2)
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb
index 12eaf9167..e83cf1b8c 100644
--- a/Library/Homebrew/dev-cmd/audit.rb
+++ b/Library/Homebrew/dev-cmd/audit.rb
@@ -637,6 +637,8 @@ class FormulaAuditor
stable = formula.stable
case stable && stable.url
+ when /[\d\._-](alpha|beta|rc\d)/
+ problem "Stable version URLs should not contain #{$1}"
when %r{download\.gnome\.org/sources}, %r{ftp\.gnome\.org/pub/GNOME/sources}i
version = Version.parse(stable.url)
if version >= Version.create("1.0")
@@ -651,12 +653,14 @@ class FormulaAuditor
def audit_revision_and_version_scheme
return unless formula.tap # skip formula not from core or any taps
return unless formula.tap.git? # git log is required
+ return if @new_formula
fv = FormulaVersions.new(formula, max_depth: 10)
- attributes = [:revision, :version_scheme]
+ no_decrease_attributes = [:revision, :version_scheme]
+ attributes = no_decrease_attributes + [:version]
attributes_map = fv.version_attributes_map(attributes, "origin/master")
- attributes.each do |attribute|
+ no_decrease_attributes.each do |attribute|
attributes_for_version = attributes_map[attribute][formula.version]
next if attributes_for_version.empty?
if formula.send(attribute) < attributes_for_version.max
@@ -664,11 +668,14 @@ class FormulaAuditor
end
end
- revision_map = attributes_map[:revision]
+ versions = attributes_map[:version].values.flatten
+ if !versions.empty? && formula.version < versions.max
+ problem "version should not decrease"
+ end
return if formula.revision.zero?
-
if formula.stable
+ revision_map = attributes_map[:revision]
if revision_map[formula.stable.version].empty? # check stable spec
problem "'revision #{formula.revision}' should be removed"
end
@@ -716,11 +723,24 @@ class FormulaAuditor
end
if text =~ /system\s+['"]xcodebuild/
- problem %(use "xcodebuild *args" instead of "system 'xcodebuild', *args")
+ problem %q(use "xcodebuild *args" instead of "system 'xcodebuild', *args")
+ end
+
+ bin_names = Set.new
+ bin_names << formula.name
+ bin_names += formula.aliases
+ [formula.bin, formula.sbin].each do |dir|
+ next unless dir.exist?
+ bin_names += dir.children.map(&:basename).map(&:to_s)
+ end
+ bin_names.each do |name|
+ if text =~ /test do.*system\s+['"]#{name}/m
+ problem %(fully scope test system calls e.g. system "\#{bin}/#{name}")
+ end
end
if text =~ /xcodebuild[ (]["'*]/ && !text.include?("SYMROOT=")
- problem %(xcodebuild should be passed an explicit "SYMROOT")
+ problem 'xcodebuild should be passed an explicit "SYMROOT"'
end
if text.include? "Formula.factory("
@@ -1002,9 +1022,9 @@ class FormulaAuditor
case condition
when /if build\.include\? ['"]with-#{dep}['"]$/, /if build\.with\? ['"]#{dep}['"]$/
- problem %(Replace #{line.inspect} with "depends_on #{quoted_dep} => :optional")
+ problem %Q(Replace #{line.inspect} with "depends_on #{quoted_dep} => :optional")
when /unless build\.include\? ['"]without-#{dep}['"]$/, /unless build\.without\? ['"]#{dep}['"]$/
- problem %(Replace #{line.inspect} with "depends_on #{quoted_dep} => :recommended")
+ problem %Q(Replace #{line.inspect} with "depends_on #{quoted_dep} => :recommended")
end
end
@@ -1288,6 +1308,11 @@ class ResourceAuditor
problem "Please use https:// for #{u}"
end
+ # Check for master branch GitHub archives.
+ urls.grep(%r{^https://github\.com/.*archive/master\.(tar\.gz|zip)$}) do
+ problem "Use versioned rather than branch tarballs for stable checksums."
+ end
+
# Use new-style archive downloads
urls.each do |u|
next unless u =~ %r{https://.*github.*/(?:tar|zip)ball/} && u !~ /\.git$/
diff --git a/Library/Homebrew/dev-cmd/boneyard-formula-pr.rb b/Library/Homebrew/dev-cmd/boneyard-formula-pr.rb
index a0739dbe9..487f0c9db 100644
--- a/Library/Homebrew/dev-cmd/boneyard-formula-pr.rb
+++ b/Library/Homebrew/dev-cmd/boneyard-formula-pr.rb
@@ -1,10 +1,12 @@
#: @hide_from_man_page
-#: * `boneyard-formula-pr` [`--dry-run`] [`--local`] <formula-name>:
+#: * `boneyard-formula-pr` [`--dry-run`] [`--local`] [`--reason=<reason>`] <formula-name> :
#: Creates a pull request to boneyard a formula.
#:
#: If `--dry-run` is passed, print what would be done rather than doing it.
#:
#: If `--local` is passed, perform only local operations (i.e. don't push or create PR).
+#:
+#: If `--reason=<reason>` is passed, append this to the commit/PR message.
require "formula"
require "utils/json"
@@ -24,6 +26,7 @@ module Homebrew
def boneyard_formula_pr
local_only = ARGV.include?("--local")
formula = ARGV.formulae.first
+ reason = ARGV.value("reason")
odie "No formula found!" unless formula
formula_relpath = formula.path.relative_path_from(formula.tap.path)
@@ -70,6 +73,9 @@ module Homebrew
end
end
branch = "#{formula.name}-boneyard"
+
+ reason = " because #{reason}" if reason
+
if ARGV.dry_run?
puts "cd #{formula.tap.path}"
puts "git checkout --no-track -b #{branch} origin/master"
@@ -80,7 +86,7 @@ module Homebrew
puts "hub fork"
puts "hub fork (to read $HUB_REMOTE)"
puts "git push $HUB_REMOTE #{branch}:#{branch}"
- puts "hub pull-request -m $'#{formula.name}: migrate to boneyard\\n\\nCreated with `brew boneyard-formula-pr`.'"
+ puts "hub pull-request -m $'#{formula.name}: migrate to boneyard\\n\\nCreated with `brew boneyard-formula-pr`#{reason}.'"
end
else
cd formula.tap.path
@@ -98,7 +104,7 @@ module Homebrew
pr_message = <<-EOS.undent
#{formula.name}: migrate to boneyard
- Created with `brew boneyard-formula-pr`.
+ Created with `brew boneyard-formula-pr`#{reason}.
EOS
pr_url = Utils.popen_read("hub", "pull-request", "-m", pr_message).chomp
end
@@ -120,7 +126,7 @@ module Homebrew
puts "hub fork"
puts "hub fork (to read $HUB_REMOTE)"
puts "git push $HUB_REMOTE #{branch}:#{branch}"
- puts "hub pull-request --browse -m $'#{formula.name}: migrate from #{formula.tap.repo}\\n\\nGoes together with $PR_URL\\n\\nCreated with `brew boneyard-formula-pr`.'"
+ puts "hub pull-request --browse -m $'#{formula.name}: migrate from #{formula.tap.repo}\\n\\nGoes together with $PR_URL\\n\\nCreated with `brew boneyard-formula-pr`#{reason}.'"
end
else
cd boneyard_tap.formula_dir
@@ -144,7 +150,7 @@ module Homebrew
Goes together with #{pr_url}.
- Created with `brew boneyard-formula-pr`.
+ Created with `brew boneyard-formula-pr`#{reason}.
EOS
end
end
diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb
index c6a8503b7..b1a3ebb43 100644
--- a/Library/Homebrew/dev-cmd/bottle.rb
+++ b/Library/Homebrew/dev-cmd/bottle.rb
@@ -187,24 +187,22 @@ module Homebrew
keg.lock do
original_tab = nil
+ changed_files = nil
begin
+ keg.delete_pyc_files!
+
unless ARGV.include? "--skip-relocation"
- keg.relocate_dynamic_linkage prefix, Keg::PREFIX_PLACEHOLDER,
- cellar, Keg::CELLAR_PLACEHOLDER
- keg.relocate_text_files prefix, Keg::PREFIX_PLACEHOLDER,
- cellar, Keg::CELLAR_PLACEHOLDER,
- repository, Keg::REPOSITORY_PLACEHOLDER
+ changed_files = keg.replace_locations_with_placeholders
end
- keg.delete_pyc_files!
-
Tab.clear_cache
tab = Tab.for_keg(keg)
original_tab = tab.dup
tab.poured_from_bottle = false
tab.HEAD = nil
tab.time = nil
+ tab.changed_files = changed_files
tab.write
keg.find do |file|
@@ -264,11 +262,7 @@ module Homebrew
ignore_interrupts do
original_tab.write if original_tab
unless ARGV.include? "--skip-relocation"
- keg.relocate_dynamic_linkage Keg::PREFIX_PLACEHOLDER, prefix,
- Keg::CELLAR_PLACEHOLDER, cellar
- keg.relocate_text_files Keg::PREFIX_PLACEHOLDER, prefix,
- Keg::CELLAR_PLACEHOLDER, cellar,
- Keg::REPOSITORY_PLACEHOLDER, repository
+ keg.replace_placeholders_with_locations changed_files
end
end
end
diff --git a/Library/Homebrew/dev-cmd/tests.rb b/Library/Homebrew/dev-cmd/tests.rb
index 72f8e0375..ee7fa9275 100644
--- a/Library/Homebrew/dev-cmd/tests.rb
+++ b/Library/Homebrew/dev-cmd/tests.rb
@@ -26,7 +26,8 @@ module Homebrew
FileUtils.rm_f "test/coverage/.resultset.json"
end
- ENV["BUNDLE_GEMFILE"] = "#{Dir.pwd}/test/Gemfile"
+ ENV["BUNDLE_GEMFILE"] = "#{HOMEBREW_LIBRARY_PATH}/test/Gemfile"
+ ENV["BUNDLE_PATH"] = "#{HOMEBREW_LIBRARY_PATH}/vendor/bundle"
# Override author/committer as global settings might be invalid and thus
# will cause silent failure during the setup of dummy Git repositories.
@@ -37,7 +38,7 @@ module Homebrew
Homebrew.install_gem_setup_path! "bundler"
unless quiet_system("bundle", "check")
- system "bundle", "install", "--path", "vendor/bundle"
+ system "bundle", "install"
end
# Make it easier to reproduce test runs.
diff --git a/Library/Homebrew/dev-cmd/update-test.rb b/Library/Homebrew/dev-cmd/update-test.rb
index 8bb0fa057..3b8dc11f9 100644
--- a/Library/Homebrew/dev-cmd/update-test.rb
+++ b/Library/Homebrew/dev-cmd/update-test.rb
@@ -32,6 +32,8 @@ module Homebrew
commit
elsif date = ARGV.value("before")
Utils.popen_read("git", "rev-list", "-n1", "--before=#{date}", "origin/master").chomp
+ elsif ARGV.include?("--to-tag")
+ Utils.popen_read("git", "tag", "--list", "--sort=-version:refname").lines[1].chomp
else
Utils.popen_read("git", "rev-parse", "origin/master").chomp
end
diff --git a/Library/Homebrew/extend/ARGV.rb b/Library/Homebrew/extend/ARGV.rb
index f2f959f22..0adf8d548 100644
--- a/Library/Homebrew/extend/ARGV.rb
+++ b/Library/Homebrew/extend/ARGV.rb
@@ -58,7 +58,7 @@ module HomebrewArgvExtension
end
def casks
- @casks ||= downcased_unique_named.grep HOMEBREW_CASK_TAP_FORMULA_REGEX
+ @casks ||= downcased_unique_named.grep HOMEBREW_CASK_TAP_CASK_REGEX
end
def kegs
diff --git a/Library/Homebrew/extend/os/mac/extend/ENV/super.rb b/Library/Homebrew/extend/os/mac/extend/ENV/super.rb
index 88e2b0a29..5f4a3e4aa 100644
--- a/Library/Homebrew/extend/os/mac/extend/ENV/super.rb
+++ b/Library/Homebrew/extend/os/mac/extend/ENV/super.rb
@@ -98,7 +98,7 @@ module Superenv
# can't reliably figure this out with Xcode 8 on its own yet.
if MacOS.version == "10.11" && MacOS::Xcode.installed? && MacOS::Xcode.version >= "8.0"
%w[basename_r clock_getres clock_gettime clock_settime dirname_r
- getentropy mkostemp mkostemps].each do |s|
+ getentropy mkostemp mkostemps timingsafe_bcmp].each do |s|
ENV["ac_cv_func_#{s}"] = "no"
end
diff --git a/Library/Homebrew/extend/os/mac/keg_relocate.rb b/Library/Homebrew/extend/os/mac/keg_relocate.rb
index 33ee149ce..8f73daba5 100644
--- a/Library/Homebrew/extend/os/mac/keg_relocate.rb
+++ b/Library/Homebrew/extend/os/mac/keg_relocate.rb
@@ -17,19 +17,19 @@ class Keg
generic_fix_dynamic_linkage
end
- def relocate_dynamic_linkage(old_prefix, new_prefix, old_cellar, new_cellar)
+ def relocate_dynamic_linkage(relocation)
mach_o_files.each do |file|
file.ensure_writable do
if file.dylib?
- id = dylib_id_for(file).sub(old_prefix, new_prefix)
+ id = dylib_id_for(file).sub(relocation.old_prefix, relocation.new_prefix)
change_dylib_id(id, file)
end
each_install_name_for(file) do |old_name|
- if old_name.start_with? old_cellar
- new_name = old_name.sub(old_cellar, new_cellar)
- elsif old_name.start_with? old_prefix
- new_name = old_name.sub(old_prefix, new_prefix)
+ if old_name.start_with? relocation.old_cellar
+ new_name = old_name.sub(relocation.old_cellar, relocation.new_cellar)
+ elsif old_name.start_with? relocation.old_prefix
+ new_name = old_name.sub(relocation.old_prefix, relocation.new_prefix)
end
change_install_name(old_name, new_name, file) if new_name
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 69cab88c4..f1d907b7a 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -1596,7 +1596,7 @@ class Formula
# @private
def test_fixtures(file)
- HOMEBREW_LIBRARY.join("Homebrew", "test", "fixtures", file)
+ HOMEBREW_LIBRARY_PATH.join("test", "fixtures", file)
end
# This method is overriden in {Formula} subclasses to provide the installation instructions.
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index a47ceffe7..c25702059 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -762,13 +762,11 @@ class FormulaInstaller
end
keg = Keg.new(formula.prefix)
- unless formula.bottle_specification.skip_relocation?
- keg.relocate_dynamic_linkage Keg::PREFIX_PLACEHOLDER, HOMEBREW_PREFIX.to_s,
- Keg::CELLAR_PLACEHOLDER, HOMEBREW_CELLAR.to_s
- end
- keg.relocate_text_files Keg::PREFIX_PLACEHOLDER, HOMEBREW_PREFIX.to_s,
- Keg::CELLAR_PLACEHOLDER, HOMEBREW_CELLAR.to_s,
- Keg::REPOSITORY_PLACEHOLDER, HOMEBREW_REPOSITORY.to_s
+ tab = Tab.for_keg(keg)
+ Tab.clear_cache
+
+ skip_linkage = formula.bottle_specification.skip_relocation?
+ keg.replace_placeholders_with_locations tab.changed_files, skip_linkage: skip_linkage
Pathname.glob("#{formula.bottle_prefix}/{etc,var}/**/*") do |path|
path.extend(InstallRenamed)
@@ -776,7 +774,7 @@ class FormulaInstaller
end
FileUtils.rm_rf formula.bottle_prefix
- tab = Tab.for_keg(formula.prefix)
+ tab = Tab.for_keg(keg)
CxxStdlib.check_compatibility(
formula, formula.recursive_dependencies,
diff --git a/Library/Homebrew/keg_relocate.rb b/Library/Homebrew/keg_relocate.rb
index 17911b90b..0ab4b9731 100644
--- a/Library/Homebrew/keg_relocate.rb
+++ b/Library/Homebrew/keg_relocate.rb
@@ -3,6 +3,14 @@ class Keg
CELLAR_PLACEHOLDER = "@@HOMEBREW_CELLAR@@".freeze
REPOSITORY_PLACEHOLDER = "@@HOMEBREW_REPOSITORY@@".freeze
+ Relocation = Struct.new(:old_prefix, :old_cellar, :old_repository,
+ :new_prefix, :new_cellar, :new_repository) do
+ # Use keyword args instead of positional args for initialization
+ def initialize(**kwargs)
+ super(*members.map { |k| kwargs[k] })
+ end
+ end
+
def fix_dynamic_linkage
symlink_files.each do |file|
link = file.readlink
@@ -15,21 +23,61 @@ class Keg
end
alias generic_fix_dynamic_linkage fix_dynamic_linkage
- def relocate_dynamic_linkage(_old_prefix, _new_prefix, _old_cellar, _new_cellar)
+ def relocate_dynamic_linkage(_relocation)
[]
end
- def relocate_text_files(old_prefix, new_prefix, old_cellar, new_cellar,
- old_repository, new_repository)
- files = text_files | libtool_files
+ def replace_locations_with_placeholders
+ relocation = Relocation.new(
+ old_prefix: HOMEBREW_PREFIX.to_s,
+ old_cellar: HOMEBREW_CELLAR.to_s,
+ old_repository: HOMEBREW_REPOSITORY.to_s,
+ new_prefix: PREFIX_PLACEHOLDER,
+ new_cellar: CELLAR_PLACEHOLDER,
+ new_repository: REPOSITORY_PLACEHOLDER
+ )
+ relocate_dynamic_linkage(relocation)
+ replace_text_in_files(relocation)
+ end
+
+ def replace_placeholders_with_locations(files, skip_linkage: false)
+ relocation = Relocation.new(
+ old_prefix: PREFIX_PLACEHOLDER,
+ old_cellar: CELLAR_PLACEHOLDER,
+ old_repository: REPOSITORY_PLACEHOLDER,
+ new_prefix: HOMEBREW_PREFIX.to_s,
+ new_cellar: HOMEBREW_CELLAR.to_s,
+ new_repository: HOMEBREW_REPOSITORY.to_s
+ )
+ relocate_dynamic_linkage(relocation) unless skip_linkage
+ replace_text_in_files(relocation, files: files)
+ end
- files.group_by { |f| f.stat.ino }.each_value do |first, *rest|
+ def replace_text_in_files(relocation, files: nil)
+ files ||= text_files | libtool_files
+
+ changed_files = []
+ files.map(&path.method(:join)).group_by { |f| f.stat.ino }.each_value do |first, *rest|
s = first.open("rb", &:read)
- changed = s.gsub!(old_cellar, new_cellar)
- changed = s.gsub!(old_prefix, new_prefix) || changed
- changed = s.gsub!(old_repository, new_repository) || changed
+
+ replacements = {
+ relocation.old_prefix => relocation.new_prefix,
+ relocation.old_cellar => relocation.new_cellar,
+ relocation.old_repository => relocation.new_repository,
+ }
+
+ # Order matters here since `HOMEBREW_CELLAR` and `HOMEBREW_REPOSITORY` are
+ # children of `HOMEBREW_PREFIX` by default.
+ regexp = Regexp.union(
+ relocation.old_cellar,
+ relocation.old_repository,
+ relocation.old_prefix
+ )
+
+ changed = s.gsub!(regexp, replacements)
next unless changed
+ changed_files += [first, *rest].map { |file| file.relative_path_from(path) }
begin
first.atomic_write(s)
@@ -41,6 +89,7 @@ class Keg
rest.each { |file| FileUtils.ln(first, file, force: true) }
end
end
+ changed_files
end
def detect_cxx_stdlibs(_options = {})
diff --git a/Library/Homebrew/manpages/brew-cask.1.md b/Library/Homebrew/manpages/brew-cask.1.md
index 92c58ba29..feab9f76e 100644
--- a/Library/Homebrew/manpages/brew-cask.1.md
+++ b/Library/Homebrew/manpages/brew-cask.1.md
@@ -86,6 +86,9 @@ names, and other aspects of this manual are still subject to change.
If <token> is given, summarize the staged files associated with the
given Cask.
+ * `reinstall` <token> [ <token> ...]
+ Reinstall the given Cask.
+
* `search` or `-S` [<text> | /<regexp>/]:
Without argument, display all Casks available for install, otherwise
perform a substring search of known Cask tokens for <text> or, if the
diff --git a/Library/Homebrew/metafiles.rb b/Library/Homebrew/metafiles.rb
index bef48f3cf..96fa086f4 100644
--- a/Library/Homebrew/metafiles.rb
+++ b/Library/Homebrew/metafiles.rb
@@ -1,20 +1,24 @@
-class Metafiles
+require "set"
+
+module Metafiles
# https://github.com/github/markup#markups
- EXTENSIONS = %w[
+ EXTENSIONS = Set.new %w[
.adoc .asc .asciidoc .creole .html .markdown .md .mdown .mediawiki .mkdn
.org .pod .rdoc .rst .rtf .textile .txt .wiki
].freeze
- BASENAMES = %w[
+ BASENAMES = Set.new %w[
about authors changelog changes copying copyright history license licence
news notes notice readme todo
].freeze
- def self.list?(file)
+ module_function
+
+ def list?(file)
return false if %w[.DS_Store INSTALL_RECEIPT.json].include?(file)
!copy?(file)
end
- def self.copy?(file)
+ def copy?(file)
file = file.downcase
ext = File.extname(file)
file = File.basename(file, ext) if EXTENSIONS.include?(ext)
diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb
index 8ec0b91de..9f49162d5 100644
--- a/Library/Homebrew/os/mac/xcode.rb
+++ b/Library/Homebrew/os/mac/xcode.rb
@@ -15,19 +15,19 @@ module OS
when "10.8" then "5.1.1"
when "10.9" then "6.2"
when "10.10" then "7.2.1"
- when "10.11" then "8.0"
- when "10.12" then "8.0"
+ when "10.11" then "8.1"
+ when "10.12" then "8.1"
else
raise "macOS '#{MacOS.version}' is invalid" unless OS::Mac.prerelease?
# Default to newest known version of Xcode for unreleased macOS versions.
- "8.0"
+ "8.1"
end
end
def prerelease?
- # TODO: bump to version >= "8.2" after Xcode 8.1 is stable.
- version >= "8.1"
+ # TODO: bump to version >= "8.3" after Xcode 8.2 is stable.
+ version >= "8.2"
end
def outdated?
diff --git a/Library/Homebrew/shims/super/cc b/Library/Homebrew/shims/super/cc
index 1da8ff173..db6361f04 100755
--- a/Library/Homebrew/shims/super/cc
+++ b/Library/Homebrew/shims/super/cc
@@ -169,6 +169,8 @@ class Cmd
when "-Wno-deprecated-register"
# older gccs don't support these flags
args << arg unless tool =~ /^g..-4.[02]/
+ when /^-Wl,-z,defs/
+ # -Wl,-undefined,error is already the default
when /^-W[alp],/, /^-Wno-/
args << arg
when /^-W.*/
diff --git a/Library/Homebrew/tab.rb b/Library/Homebrew/tab.rb
index 06ee1693f..1cabacefd 100644
--- a/Library/Homebrew/tab.rb
+++ b/Library/Homebrew/tab.rb
@@ -303,6 +303,7 @@ class Tab < OpenStruct
"unused_options" => unused_options.as_flags,
"built_as_bottle" => built_as_bottle,
"poured_from_bottle" => poured_from_bottle,
+ "changed_files" => changed_files && changed_files.map(&:to_s),
"time" => time,
"source_modified_time" => source_modified_time.to_i,
"HEAD" => self.HEAD,
diff --git a/Library/Homebrew/tap_constants.rb b/Library/Homebrew/tap_constants.rb
index 12de02f49..4ef8015c2 100644
--- a/Library/Homebrew/tap_constants.rb
+++ b/Library/Homebrew/tap_constants.rb
@@ -1,8 +1,10 @@
# match taps' formulae, e.g. someuser/sometap/someformula
HOMEBREW_TAP_FORMULA_REGEX = %r{^([\w-]+)/([\w-]+)/([\w+-.@]+)$}
+# match taps' casks, e.g. someuser/sometap/somecask
+HOMEBREW_TAP_CASK_REGEX = %r{^([\w-]+)/([\w-]+)/([a-z0-9\-]+)$}
# match taps' directory paths, e.g. HOMEBREW_LIBRARY/Taps/someuser/sometap
HOMEBREW_TAP_DIR_REGEX = %r{#{Regexp.escape(HOMEBREW_LIBRARY.to_s)}/Taps/([\w-]+)/([\w-]+)}
# match taps' formula paths, e.g. HOMEBREW_LIBRARY/Taps/someuser/sometap/someformula
HOMEBREW_TAP_PATH_REGEX = Regexp.new(HOMEBREW_TAP_DIR_REGEX.source + %r{/(.*)}.source)
# match the default and the versions brew-cask tap e.g. Caskroom/cask or Caskroom/versions
-HOMEBREW_CASK_TAP_FORMULA_REGEX = %r{^([Cc]askroom)/(cask|versions)/([\w+-.]+)$}
+HOMEBREW_CASK_TAP_CASK_REGEX = %r{^([Cc]askroom)/(cask|versions)/([\w+-.]+)$}
diff --git a/Library/Homebrew/test/Gemfile b/Library/Homebrew/test/Gemfile
index 0a84f8dc2..a7e9eb834 100644
--- a/Library/Homebrew/test/Gemfile
+++ b/Library/Homebrew/test/Gemfile
@@ -13,7 +13,8 @@ group :coverage do
# - https://github.com/colszowka/simplecov/pull/520
gem "simplecov", "0.12.0",
git: "https://github.com/colszowka/simplecov.git",
- branch: "master", # commit 83d8031ddde0927f87ef9327200a98583ca18d77
+ branch: "master",
+ ref: "83d8031ddde0927f87ef9327200a98583ca18d77",
require: false
gem "codecov", require: false
end
diff --git a/Library/Homebrew/test/Gemfile.lock b/Library/Homebrew/test/Gemfile.lock
index ba639d70f..aa4800f34 100644
--- a/Library/Homebrew/test/Gemfile.lock
+++ b/Library/Homebrew/test/Gemfile.lock
@@ -1,6 +1,7 @@
GIT
remote: https://github.com/colszowka/simplecov.git
revision: 83d8031ddde0927f87ef9327200a98583ca18d77
+ ref: 83d8031ddde0927f87ef9327200a98583ca18d77
branch: master
specs:
simplecov (0.12.0)
@@ -11,18 +12,18 @@ GIT
GEM
remote: https://rubygems.org/
specs:
- codecov (0.1.5)
+ codecov (0.1.6)
json
simplecov
url
docile (1.1.5)
- json (1.8.3)
+ json (2.0.2)
metaclass (0.0.4)
- minitest (5.9.0)
- mocha (1.1.0)
+ minitest (5.9.1)
+ mocha (1.2.1)
metaclass (~> 0.0.1)
parallel (1.9.0)
- parallel_tests (2.9.0)
+ parallel_tests (2.10.0)
parallel
rake (10.5.0)
simplecov-html (0.10.0)
@@ -40,4 +41,4 @@ DEPENDENCIES
simplecov (= 0.12.0)!
BUNDLED WITH
- 1.13.1
+ 1.13.6
diff --git a/Library/Homebrew/cask/spec/support/binaries/AppWithBinary.zip b/Library/Homebrew/test/fixtures/cask/AppWithBinary.zip
index 4a5b318ba..4a5b318ba 100644
--- a/Library/Homebrew/cask/spec/support/binaries/AppWithBinary.zip
+++ b/Library/Homebrew/test/fixtures/cask/AppWithBinary.zip
Binary files differ
diff --git a/Library/Homebrew/cask/spec/support/binaries/AppWithEmbeddedBinary.zip b/Library/Homebrew/test/fixtures/cask/AppWithEmbeddedBinary.zip
index 7c708038c..7c708038c 100644
--- a/Library/Homebrew/cask/spec/support/binaries/AppWithEmbeddedBinary.zip
+++ b/Library/Homebrew/test/fixtures/cask/AppWithEmbeddedBinary.zip
Binary files differ
diff --git a/Library/Homebrew/cask/test/support/binaries/MyFancyApp.zip b/Library/Homebrew/test/fixtures/cask/MyFancyApp.zip
index ba09ee681..ba09ee681 100644
--- a/Library/Homebrew/cask/test/support/binaries/MyFancyApp.zip
+++ b/Library/Homebrew/test/fixtures/cask/MyFancyApp.zip
Binary files differ
diff --git a/Library/Homebrew/cask/test/support/binaries/MyFancyPkg.zip b/Library/Homebrew/test/fixtures/cask/MyFancyPkg.zip
index ec4f97f07..ec4f97f07 100644
--- a/Library/Homebrew/cask/test/support/binaries/MyFancyPkg.zip
+++ b/Library/Homebrew/test/fixtures/cask/MyFancyPkg.zip
Binary files differ
diff --git a/Library/Homebrew/cask/test/support/binaries/NestedApp.dmg.zip b/Library/Homebrew/test/fixtures/cask/NestedApp.dmg.zip
index ae6686c7e..ae6686c7e 100644
--- a/Library/Homebrew/cask/test/support/binaries/NestedApp.dmg.zip
+++ b/Library/Homebrew/test/fixtures/cask/NestedApp.dmg.zip
Binary files differ
diff --git a/Library/Homebrew/cask/test/support/binaries/caffeine-suite.zip b/Library/Homebrew/test/fixtures/cask/caffeine-suite.zip
index c38f771ae..c38f771ae 100644
--- a/Library/Homebrew/cask/test/support/binaries/caffeine-suite.zip
+++ b/Library/Homebrew/test/fixtures/cask/caffeine-suite.zip
Binary files differ
diff --git a/Library/Homebrew/cask/test/support/binaries/caffeine.zip b/Library/Homebrew/test/fixtures/cask/caffeine.zip
index 99d61bbfb..99d61bbfb 100644
--- a/Library/Homebrew/cask/test/support/binaries/caffeine.zip
+++ b/Library/Homebrew/test/fixtures/cask/caffeine.zip
Binary files differ
diff --git a/Library/Homebrew/cask/test/support/binaries/caffeines-subdir.zip b/Library/Homebrew/test/fixtures/cask/caffeines-subdir.zip
index ce5064d09..ce5064d09 100644
--- a/Library/Homebrew/cask/test/support/binaries/caffeines-subdir.zip
+++ b/Library/Homebrew/test/fixtures/cask/caffeines-subdir.zip
Binary files differ
diff --git a/Library/Homebrew/cask/test/support/binaries/caffeines.zip b/Library/Homebrew/test/fixtures/cask/caffeines.zip
index 372fcc522..372fcc522 100644
--- a/Library/Homebrew/cask/test/support/binaries/caffeines.zip
+++ b/Library/Homebrew/test/fixtures/cask/caffeines.zip
Binary files differ
diff --git a/Library/Homebrew/cask/test/support/binaries/container.7z b/Library/Homebrew/test/fixtures/cask/container.7z
index 30dbe24f7..30dbe24f7 100644
--- a/Library/Homebrew/cask/test/support/binaries/container.7z
+++ b/Library/Homebrew/test/fixtures/cask/container.7z
Binary files differ
diff --git a/Library/Homebrew/cask/test/support/binaries/container.air b/Library/Homebrew/test/fixtures/cask/container.air
index 64005aea3..64005aea3 100644
--- a/Library/Homebrew/cask/test/support/binaries/container.air
+++ b/Library/Homebrew/test/fixtures/cask/container.air
Binary files differ
diff --git a/Library/Homebrew/cask/test/support/binaries/container.bz2 b/Library/Homebrew/test/fixtures/cask/container.bz2
index 6ec60f31f..6ec60f31f 100755
--- a/Library/Homebrew/cask/test/support/binaries/container.bz2
+++ b/Library/Homebrew/test/fixtures/cask/container.bz2
Binary files differ
diff --git a/Library/Homebrew/cask/test/support/binaries/container.cab b/Library/Homebrew/test/fixtures/cask/container.cab
index edc741aa1..edc741aa1 100644
--- a/Library/Homebrew/cask/test/support/binaries/container.cab
+++ b/Library/Homebrew/test/fixtures/cask/container.cab
Binary files differ
diff --git a/Library/Homebrew/cask/test/support/binaries/container.dmg b/Library/Homebrew/test/fixtures/cask/container.dmg
index 3b3cbf51c..3b3cbf51c 100644
--- a/Library/Homebrew/cask/test/support/binaries/container.dmg
+++ b/Library/Homebrew/test/fixtures/cask/container.dmg
Binary files differ
diff --git a/Library/Homebrew/cask/test/support/binaries/container.gz b/Library/Homebrew/test/fixtures/cask/container.gz
index 67ede6b96..67ede6b96 100755
--- a/Library/Homebrew/cask/test/support/binaries/container.gz
+++ b/Library/Homebrew/test/fixtures/cask/container.gz
Binary files differ
diff --git a/Library/Homebrew/cask/test/support/binaries/container.lzma b/Library/Homebrew/test/fixtures/cask/container.lzma
index 2ff7ccee7..2ff7ccee7 100755
--- a/Library/Homebrew/cask/test/support/binaries/container.lzma
+++ b/Library/Homebrew/test/fixtures/cask/container.lzma
Binary files differ
diff --git a/Library/Homebrew/cask/test/support/binaries/container.pkg b/Library/Homebrew/test/fixtures/cask/container.pkg
index 274f27e7a..274f27e7a 100644
--- a/Library/Homebrew/cask/test/support/binaries/container.pkg
+++ b/Library/Homebrew/test/fixtures/cask/container.pkg
Binary files differ
diff --git a/Library/Homebrew/cask/test/support/binaries/container.rar b/Library/Homebrew/test/fixtures/cask/container.rar
index 7477c3bb4..7477c3bb4 100644
--- a/Library/Homebrew/cask/test/support/binaries/container.rar
+++ b/Library/Homebrew/test/fixtures/cask/container.rar
Binary files differ
diff --git a/Library/Homebrew/cask/test/support/binaries/container.sit b/Library/Homebrew/test/fixtures/cask/container.sit
index 3e29d21dc..3e29d21dc 100755
--- a/Library/Homebrew/cask/test/support/binaries/container.sit
+++ b/Library/Homebrew/test/fixtures/cask/container.sit
Binary files differ
diff --git a/Library/Homebrew/cask/test/support/binaries/container.tar.gz b/Library/Homebrew/test/fixtures/cask/container.tar.gz
index c464fb413..c464fb413 100644
--- a/Library/Homebrew/cask/test/support/binaries/container.tar.gz
+++ b/Library/Homebrew/test/fixtures/cask/container.tar.gz
Binary files differ
diff --git a/Library/Homebrew/cask/test/support/binaries/container.xar b/Library/Homebrew/test/fixtures/cask/container.xar
index 563a5ba1e..563a5ba1e 100644
--- a/Library/Homebrew/cask/test/support/binaries/container.xar
+++ b/Library/Homebrew/test/fixtures/cask/container.xar
Binary files differ
diff --git a/Library/Homebrew/cask/test/support/binaries/container.xz b/Library/Homebrew/test/fixtures/cask/container.xz
index 74db22090..74db22090 100755
--- a/Library/Homebrew/cask/test/support/binaries/container.xz
+++ b/Library/Homebrew/test/fixtures/cask/container.xz
Binary files differ
diff --git a/Library/Homebrew/cask/test/support/binaries/empty_directory/.gitignore b/Library/Homebrew/test/fixtures/cask/empty_directory/.gitignore
index e69de29bb..e69de29bb 100644
--- a/Library/Homebrew/cask/test/support/binaries/empty_directory/.gitignore
+++ b/Library/Homebrew/test/fixtures/cask/empty_directory/.gitignore
diff --git a/Library/Homebrew/cask/test/support/binaries/naked_executable b/Library/Homebrew/test/fixtures/cask/naked_executable
index 039e4d006..039e4d006 100755
--- a/Library/Homebrew/cask/test/support/binaries/naked_executable
+++ b/Library/Homebrew/test/fixtures/cask/naked_executable
diff --git a/Library/Homebrew/cask/test/support/binaries/transmission-2.61.dmg b/Library/Homebrew/test/fixtures/cask/transmission-2.61.dmg
index e72afe027..e72afe027 100644
--- a/Library/Homebrew/cask/test/support/binaries/transmission-2.61.dmg
+++ b/Library/Homebrew/test/fixtures/cask/transmission-2.61.dmg
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/receipt.json b/Library/Homebrew/test/fixtures/receipt.json
index 62672bfa9..404251026 100644
--- a/Library/Homebrew/test/fixtures/receipt.json
+++ b/Library/Homebrew/test/fixtures/receipt.json
@@ -9,6 +9,10 @@
],
"built_as_bottle": false,
"poured_from_bottle": true,
+ "changed_files": [
+ "INSTALL_RECEIPT.json",
+ "bin/foo"
+ ],
"time": 1403827774,
"HEAD": "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
"alias_path": "/usr/local/Library/Taps/homebrew/homebrew-core/Aliases/test-formula",
diff --git a/Library/Homebrew/test/lib/config.rb b/Library/Homebrew/test/lib/config.rb
index 98144d71e..4fe62d409 100644
--- a/Library/Homebrew/test/lib/config.rb
+++ b/Library/Homebrew/test/lib/config.rb
@@ -31,6 +31,8 @@ HOMEBREW_CELLAR = HOMEBREW_PREFIX.parent+"cellar"
HOMEBREW_LOGS = HOMEBREW_PREFIX.parent+"logs"
HOMEBREW_TEMP = HOMEBREW_PREFIX.parent+"temp"
+TEST_FIXTURE_DIR = HOMEBREW_LIBRARY_PATH.join("test", "fixtures")
+
TESTBALL_SHA1 = "be478fd8a80fe7f29196d6400326ac91dad68c37".freeze
TESTBALL_SHA256 = "91e3f7930c98d7ccfb288e115ed52d06b0e5bc16fec7dce8bdda86530027067b".freeze
TESTBALL_PATCHES_SHA256 = "799c2d551ac5c3a5759bea7796631a7906a6a24435b52261a317133a0bfb34d9".freeze
diff --git a/Library/Homebrew/test/test_diagnostic.rb b/Library/Homebrew/test/test_diagnostic.rb
index 33cf27b74..aa2e44cfc 100644
--- a/Library/Homebrew/test/test_diagnostic.rb
+++ b/Library/Homebrew/test/test_diagnostic.rb
@@ -146,7 +146,7 @@ class DiagnosticChecksTest < Homebrew::TestCase
FileUtils.chmod 0755, file
ENV["PATH"] = "#{path}#{File::PATH_SEPARATOR}#{ENV["PATH"]}"
- assert_match %("config" scripts exist),
+ assert_match '"config" scripts exist',
@checks.check_for_config_scripts
end
end
diff --git a/Library/Homebrew/test/test_exceptions.rb b/Library/Homebrew/test/test_exceptions.rb
index 671b433e4..689531c6e 100644
--- a/Library/Homebrew/test/test_exceptions.rb
+++ b/Library/Homebrew/test/test_exceptions.rb
@@ -13,7 +13,7 @@ class ExceptionsTest < Homebrew::TestCase
end
def test_formula_validation_error
- assert_equal %(invalid attribute for formula 'foo': sha257 ("magic")),
+ assert_equal %q(invalid attribute for formula 'foo': sha257 ("magic")),
FormulaValidationError.new("foo", "sha257", "magic").to_s
end
diff --git a/Library/Homebrew/test/test_formula.rb b/Library/Homebrew/test/test_formula.rb
index a12983e4c..4aa835590 100644
--- a/Library/Homebrew/test/test_formula.rb
+++ b/Library/Homebrew/test/test_formula.rb
@@ -634,7 +634,7 @@ class FormulaTests < Homebrew::TestCase
url "foo-1.0"
end
- assert_equal Pathname.new("#{HOMEBREW_LIBRARY}/Homebrew/test/fixtures/foo"),
+ assert_equal Pathname.new("#{HOMEBREW_LIBRARY_PATH}/test/fixtures/foo"),
f1.test_fixtures("foo")
end
diff --git a/Library/Homebrew/test/test_patch.rb b/Library/Homebrew/test/test_patch.rb
index 120f0a3a5..62624720e 100644
--- a/Library/Homebrew/test/test_patch.rb
+++ b/Library/Homebrew/test/test_patch.rb
@@ -119,7 +119,7 @@ class ExternalPatchTests < Homebrew::TestCase
end
def test_inspect
- assert_equal %(#<ExternalPatch: :p1 "file:///my.patch">), @p.inspect
+ assert_equal '#<ExternalPatch: :p1 "file:///my.patch">', @p.inspect
end
def test_cached_download
diff --git a/Library/Homebrew/test/test_string.rb b/Library/Homebrew/test/test_string.rb
index d3f2bc268..497c4badb 100644
--- a/Library/Homebrew/test/test_string.rb
+++ b/Library/Homebrew/test/test_string.rb
@@ -35,6 +35,6 @@ I'm not indented
def test_inreplace_sub_failure
s = "foobar".extend StringInreplaceExtension
s.sub! "not here", "test"
- assert_equal [%(expected replacement of "not here" with "test")], s.errors
+ assert_equal ['expected replacement of "not here" with "test"'], s.errors
end
end
diff --git a/Library/Homebrew/test/test_tab.rb b/Library/Homebrew/test/test_tab.rb
index e41f76e27..2c756cf68 100644
--- a/Library/Homebrew/test/test_tab.rb
+++ b/Library/Homebrew/test/test_tab.rb
@@ -11,6 +11,7 @@ class TabTests < Homebrew::TestCase
"unused_options" => @unused.as_flags,
"built_as_bottle" => false,
"poured_from_bottle" => true,
+ "changed_files" => [],
"time" => nil,
"source_modified_time" => 0,
"HEAD" => TEST_SHA1,
@@ -33,6 +34,7 @@ class TabTests < Homebrew::TestCase
tab = Tab.empty
assert_empty tab.unused_options
assert_empty tab.used_options
+ assert_nil tab.changed_files
refute_predicate tab, :built_as_bottle
refute_predicate tab, :poured_from_bottle
assert_predicate tab, :stable?
@@ -81,7 +83,7 @@ class TabTests < Homebrew::TestCase
end
def test_from_old_version_file
- path = Pathname.new(TEST_DIRECTORY).join("fixtures", "receipt_old.json")
+ path = Pathname.new("#{TEST_FIXTURE_DIR}/receipt_old.json")
tab = Tab.from_file(path)
assert_equal @used.sort, tab.used_options.sort
@@ -101,13 +103,15 @@ class TabTests < Homebrew::TestCase
end
def test_from_file
- path = Pathname.new(TEST_DIRECTORY).join("fixtures", "receipt.json")
+ path = Pathname.new("#{TEST_FIXTURE_DIR}/receipt.json")
tab = Tab.from_file(path)
source_path = "/usr/local/Library/Taps/hombrew/homebrew-core/Formula/foo.rb"
runtime_dependencies = [{ "full_name" => "foo", "version" => "1.0" }]
+ changed_files = %w[INSTALL_RECEIPT.json bin/foo]
assert_equal @used.sort, tab.used_options.sort
assert_equal @unused.sort, tab.unused_options.sort
+ assert_equal changed_files, tab.changed_files
refute_predicate tab, :built_as_bottle
assert_predicate tab, :poured_from_bottle
assert_predicate tab, :stable?
@@ -187,6 +191,7 @@ class TabTests < Homebrew::TestCase
assert_equal @tab.unused_options.sort, tab.unused_options.sort
assert_equal @tab.built_as_bottle, tab.built_as_bottle
assert_equal @tab.poured_from_bottle, tab.poured_from_bottle
+ assert_equal @tab.changed_files, tab.changed_files
assert_equal @tab.tap, tab.tap
assert_equal @tab.spec, tab.spec
assert_equal @tab.time, tab.time
diff --git a/Library/Homebrew/test/test_update_report.rb b/Library/Homebrew/test/test_update_report.rb
index b3ae865a5..6b6cec6ce 100644
--- a/Library/Homebrew/test/test_update_report.rb
+++ b/Library/Homebrew/test/test_update_report.rb
@@ -20,7 +20,7 @@ class ReportTests < Homebrew::TestCase
end
def self.fixture_data
- @fixture_data ||= YAML.load_file("#{TEST_DIRECTORY}/fixtures/updater_fixture.yaml")
+ @fixture_data ||= YAML.load_file("#{TEST_FIXTURE_DIR}/updater_fixture.yaml")
end
def setup
diff --git a/Library/Homebrew/utils/analytics.sh b/Library/Homebrew/utils/analytics.sh
index 19b341fdc..0f188fe9b 100644
--- a/Library/Homebrew/utils/analytics.sh
+++ b/Library/Homebrew/utils/analytics.sh
@@ -7,7 +7,7 @@ migrate-legacy-uuid-file() {
local analytics_uuid="$(<"$legacy_uuid_file")"
if [[ -n "$analytics_uuid" ]]
then
- git config --file="$HOMEBREW_REPOSITORY/.git/config" --replace-all homebrew.analyticsuuid "$analytics_uuid"
+ git config --file="$HOMEBREW_REPOSITORY/.git/config" --replace-all homebrew.analyticsuuid "$analytics_uuid" 2>/dev/null
fi
rm -f "$legacy_uuid_file"
fi
@@ -23,8 +23,8 @@ setup-analytics() {
return
fi
- local message_seen="$(git config --file="$git_config_file" --get homebrew.analyticsmessage)"
- local analytics_disabled="$(git config --file="$git_config_file" --get homebrew.analyticsdisabled)"
+ local message_seen="$(git config --file="$git_config_file" --get homebrew.analyticsmessage 2>/dev/null)"
+ local analytics_disabled="$(git config --file="$git_config_file" --get homebrew.analyticsdisabled 2>/dev/null)"
if [[ "$message_seen" != "true" || "$analytics_disabled" = "true" ]]
then
# Internal variable for brew's use, to differentiate from user-supplied setting
@@ -32,7 +32,7 @@ setup-analytics() {
return
fi
- HOMEBREW_ANALYTICS_USER_UUID="$(git config --file="$git_config_file" --get homebrew.analyticsuuid)"
+ HOMEBREW_ANALYTICS_USER_UUID="$(git config --file="$git_config_file" --get homebrew.analyticsuuid 2>/dev/null)"
if [[ -z "$HOMEBREW_ANALYTICS_USER_UUID" ]]
then
if [[ -n "$HOMEBREW_LINUX" ]]
@@ -51,7 +51,7 @@ setup-analytics() {
export HOMEBREW_NO_ANALYTICS_THIS_RUN="1"
return
fi
- git config --file="$git_config_file" --replace-all homebrew.analyticsuuid "$HOMEBREW_ANALYTICS_USER_UUID"
+ git config --file="$git_config_file" --replace-all homebrew.analyticsuuid "$HOMEBREW_ANALYTICS_USER_UUID" 2>/dev/null
fi
if [[ -n "$HOMEBREW_LINUX" ]]
diff --git a/Library/Homebrew/utils/github.rb b/Library/Homebrew/utils/github.rb
index 5611f9aad..43a0e88a8 100644
--- a/Library/Homebrew/utils/github.rb
+++ b/Library/Homebrew/utils/github.rb
@@ -6,6 +6,11 @@ module GitHub
ISSUES_URI = URI.parse("https://api.github.com/search/issues")
+ CREATE_GIST_SCOPES = ["gist"].freeze
+ CREATE_ISSUE_SCOPES = ["public_repo"].freeze
+ ALL_SCOPES = (CREATE_GIST_SCOPES + CREATE_ISSUE_SCOPES).freeze
+ ALL_SCOPES_URL = Formatter.url("https://github.com/settings/tokens/new?scopes=#{ALL_SCOPES.join(",")}&description=Homebrew").freeze
+
Error = Class.new(RuntimeError)
HTTPNotFoundError = Class.new(Error)
@@ -14,7 +19,7 @@ module GitHub
super <<-EOS.undent
GitHub API Error: #{error}
Try again in #{pretty_ratelimit_reset(reset)}, or create a personal access token:
- #{Formatter.url("https://github.com/settings/tokens/new?scopes=&description=Homebrew")}
+ #{ALL_SCOPES_URL}
and then set the token as: export HOMEBREW_GITHUB_API_TOKEN="your_new_token"
EOS
end
@@ -38,7 +43,7 @@ module GitHub
Clear them with:
printf "protocol=https\\nhost=github.com\\n" | git credential-osxkeychain erase
Or create a personal access token:
- #{Formatter.url("https://github.com/settings/tokens/new?scopes=&description=Homebrew")}
+ #{ALL_SCOPES_URL}
and then set the token as: export HOMEBREW_GITHUB_API_TOKEN="your_new_token"
EOS
end
@@ -92,28 +97,32 @@ module GitHub
end
end
- def api_credentials_error_message(response_headers)
+ def api_credentials_error_message(response_headers, needed_scopes)
return if response_headers.empty?
@api_credentials_error_message_printed ||= begin
unauthorized = (response_headers["http/1.1"] == "401 Unauthorized")
scopes = response_headers["x-accepted-oauth-scopes"].to_s.split(", ")
+ needed_human_scopes = needed_scopes.join(", ")
+ needed_human_scopes = "none" if needed_human_scopes.empty?
if !unauthorized && scopes.empty?
- credentials_scopes = response_headers["x-oauth-scopes"].to_s.split(", ")
+ credentials_scopes = response_headers["x-oauth-scopes"]
case GitHub.api_credentials_type
when :keychain
onoe <<-EOS.undent
Your macOS keychain GitHub credentials do not have sufficient scope!
+ Scopes they need: #{needed_human_scopes}
Scopes they have: #{credentials_scopes}
- Create a personal access token: #{Formatter.url("https://github.com/settings/tokens")}
+ Create a personal access token: #{ALL_SCOPES_URL}
and then set HOMEBREW_GITHUB_API_TOKEN as the authentication method instead.
EOS
when :environment
onoe <<-EOS.undent
Your HOMEBREW_GITHUB_API_TOKEN does not have sufficient scope!
+ Scopes they need: #{needed_human_scopes}
Scopes it has: #{credentials_scopes}
- Create a new personal access token: #{Formatter.url("https://github.com/settings/tokens")}
+ Create a new personal access token: #{ALL_SCOPES_URL}
and then set the new HOMEBREW_GITHUB_API_TOKEN as the authentication method instead.
EOS
end
@@ -122,7 +131,7 @@ module GitHub
end
end
- def open(url, data = nil)
+ def open(url, data: nil, scopes: [].freeze)
# This is a no-op if the user is opting out of using the GitHub API.
return if ENV["HOMEBREW_NO_GITHUB_API"]
@@ -172,7 +181,7 @@ module GitHub
begin
if !http_code.start_with?("2") && !status.success?
- raise_api_error(output, errors, http_code, headers)
+ raise_api_error(output, errors, http_code, headers, scopes)
end
json = Utils::JSON.load output
if block_given?
@@ -185,7 +194,7 @@ module GitHub
end
end
- def raise_api_error(output, errors, http_code, headers)
+ def raise_api_error(output, errors, http_code, headers, scopes)
meta = {}
headers.lines.each do |l|
key, _, value = l.delete(":").partition(" ")
@@ -200,7 +209,7 @@ module GitHub
raise RateLimitExceededError.new(reset, error)
end
- GitHub.api_credentials_error_message(meta)
+ GitHub.api_credentials_error_message(meta, scopes)
case http_code
when "401", "403"
diff --git a/README.md b/README.md
index d5d867222..89cb99b55 100644
--- a/README.md
+++ b/README.md
@@ -40,7 +40,7 @@ This is our PGP key which is valid until May 24, 2017.
## Who Are You?
Homebrew's lead maintainer is [Mike McQuaid](https://github.com/mikemcquaid).
-Homebrew's current maintainers are [Misty De Meo](https://github.com/mistydemeo), [Andrew Janke](https://github.com/apjanke), [Xu Cheng](https://github.com/xu-cheng), [Tomasz Pajor](https://github.com/nijikon), [Josh Hagins](https://github.com/jawshooah), [Baptiste Fontaine](https://github.com/bfontaine), [Zhiming Wang](https://github.com/zmwangx), [Markus Reiter](https://github.com/reitermarkus), [ilovezfs](https://github.com/ilovezfs), [Martin Afanasjew](https://github.com/UniqMartin), [Tom Schoonjans](https://github.com/tschoonj), [Uladzislau Shablinski](https://github.com/vladshablinsky), [Tim Smith](https://github.com/tdsmith) and [Alex Dunn](https://github.com/dunn).
+Homebrew's current maintainers are [Misty De Meo](https://github.com/mistydemeo), [Andrew Janke](https://github.com/apjanke), [Xu Cheng](https://github.com/xu-cheng), [Tomasz Pajor](https://github.com/nijikon), [Josh Hagins](https://github.com/jawshooah), [Baptiste Fontaine](https://github.com/bfontaine), [Markus Reiter](https://github.com/reitermarkus), [ilovezfs](https://github.com/ilovezfs), [Martin Afanasjew](https://github.com/UniqMartin), [Tom Schoonjans](https://github.com/tschoonj), [Uladzislau Shablinski](https://github.com/vladshablinsky), [Tim Smith](https://github.com/tdsmith) and [Alex Dunn](https://github.com/dunn).
Former maintainers with significant contributions include [Dominyk Tiller](https://github.com/DomT4), [Brett Koonce](https://github.com/asparagui), [Jack Nagel](https://github.com/jacknagel), [Adam Vandenberg](https://github.com/adamv) and Homebrew's creator: [Max Howell](https://github.com/mxcl).
diff --git a/docs/brew.1.html b/docs/brew.1.html
index bb8775ceb..931daf936 100644
--- a/docs/brew.1.html
+++ b/docs/brew.1.html
@@ -765,7 +765,7 @@ your shell profile, or you can use it before a brew command:</p>
<p>Homebrew's lead maintainer is Mike McQuaid.</p>
-<p>Homebrew's current maintainers are Misty De Meo, Andrew Janke, Xu Cheng, Tomasz Pajor, Josh Hagins, Baptiste Fontaine, Zhiming Wang, Markus Reiter, ilovezfs, Martin Afanasjew, Tom Schoonjans, Uladzislau Shablinski, Tim Smith and Alex Dunn.</p>
+<p>Homebrew's current maintainers are Misty De Meo, Andrew Janke, Xu Cheng, Tomasz Pajor, Josh Hagins, Baptiste Fontaine, Markus Reiter, ilovezfs, Martin Afanasjew, Tom Schoonjans, Uladzislau Shablinski, Tim Smith and Alex Dunn.</p>
<p>Former maintainers with significant contributions include Dominyk Tiller, Brett Koonce, Jack Nagel, Adam Vandenberg and Homebrew's creator: Max Howell.</p>
diff --git a/manpages/brew-cask.1 b/manpages/brew-cask.1
index 961b19007..0b0776595 100644
--- a/manpages/brew-cask.1
+++ b/manpages/brew-cask.1
@@ -34,78 +34,65 @@ The tokens returned by \fBsearch\fR are suitable as arguments for most other com
.
.SH "COMMANDS"
.
-.TP
-\fBaudit\fR [ \fItoken\fR \.\.\. ]
-Check the given Casks for installability\. If no tokens are given on the command line, all Casks are audited\.
+.IP "\(bu" 4
+\fBaudit\fR [ \fItoken\fR \.\.\. ]: Check the given Casks for installability\. If no tokens are given on the command line, all Casks are audited\.
.
-.TP
-\fBcat\fR \fItoken\fR [ \fItoken\fR \.\.\. ]
-Dump the given Cask definition file to the standard output\.
+.IP "\(bu" 4
+\fBcat\fR \fItoken\fR [ \fItoken\fR \.\.\. ]: Dump the given Cask definition file to the standard output\.
.
-.TP
-\fBcleanup\fR [\-\-outdated]
-Clean up cached downloads and tracker symlinks\. With \fB\-\-outdated\fR, only clean up cached downloads older than 10 days old\.
+.IP "\(bu" 4
+\fBcleanup\fR [\-\-outdated]: Clean up cached downloads and tracker symlinks\. With \fB\-\-outdated\fR, only clean up cached downloads older than 10 days old\.
.
-.TP
-\fBcreate\fR \fItoken\fR
-Generate a Cask definition file for the Cask identified by \fItoken\fR and open a template for it in your favorite editor\.
+.IP "\(bu" 4
+\fBcreate\fR \fItoken\fR: Generate a Cask definition file for the Cask identified by \fItoken\fR and open a template for it in your favorite editor\.
.
-.TP
-\fBdoctor\fR or \fBdr\fR
-Check for configuration issues\. Can be useful to upload as a gist for developers along with a bug report\.
+.IP "\(bu" 4
+\fBdoctor\fR or \fBdr\fR: Check for configuration issues\. Can be useful to upload as a gist for developers along with a bug report\.
.
-.TP
-\fBedit\fR \fItoken\fR
-Open the given Cask definition file for editing\.
+.IP "\(bu" 4
+\fBedit\fR \fItoken\fR: Open the given Cask definition file for editing\.
.
-.TP
-\fBfetch\fR [\-\-force] \fItoken\fR [ \fItoken\fR \.\.\. ]
-Download remote application files for the given Cask to the local cache\. With \fB\-\-force\fR, force re\-download even if the files are already cached\.
+.IP "\(bu" 4
+\fBfetch\fR [\-\-force] \fItoken\fR [ \fItoken\fR \.\.\. ]: Download remote application files for the given Cask to the local cache\. With \fB\-\-force\fR, force re\-download even if the files are already cached\.
.
-.TP
-\fBhome\fR or \fBhomepage\fR [ \fItoken\fR \.\.\. ]
-Display the homepage associated with a given Cask in a browser\.
+.IP "\(bu" 4
+\fBhome\fR or \fBhomepage\fR [ \fItoken\fR \.\.\. ]: Display the homepage associated with a given Cask in a browser\.
.
.IP
With no arguments, display the project page \fIhttp://caskroom\.io\fR\.
.
-.TP
-\fBinfo\fR or \fBabv\fR \fItoken\fR [ \fItoken\fR \.\.\. ]
-Display information about the given Cask\.
+.IP "\(bu" 4
+\fBinfo\fR or \fBabv\fR \fItoken\fR [ \fItoken\fR \.\.\. ]: Display information about the given Cask\.
.
-.TP
-\fBinstall\fR [\-\-force] [\-\-skip\-cask\-deps] [\-\-require\-sha] \fItoken\fR [ \fItoken\fR \.\.\. ]
-Install the given Cask\. With \fB\-\-force\fR, re\-install even if the Cask appears to be already present\. With \fB\-\-skip\-cask\-deps\fR, skip any Cask dependencies\. \fB\-\-require\-sha\fR will abort installation if the Cask does not have a checksum defined\.
+.IP "\(bu" 4
+\fBinstall\fR [\-\-force] [\-\-skip\-cask\-deps] [\-\-require\-sha] \fItoken\fR [ \fItoken\fR \.\.\. ]: Install the given Cask\. With \fB\-\-force\fR, re\-install even if the Cask appears to be already present\. With \fB\-\-skip\-cask\-deps\fR, skip any Cask dependencies\. \fB\-\-require\-sha\fR will abort installation if the Cask does not have a checksum defined\.
.
.IP
\fItoken\fR is usually the ID of a Cask as returned by \fBbrew cask search\fR, but see \fIOTHER WAYS TO SPECIFY A CASK\fR for variations\.
.
-.TP
-\fBlist\fR or \fBls\fR [\-1] [\-\-versions] [ \fItoken\fR \.\.\. ]
-Without any arguments, list all installed Casks\. With \fB\-1\fR, always format the output in a single column\. With \fB\-\-versions\fR, show all installed versions\.
+.IP "\(bu" 4
+\fBlist\fR or \fBls\fR [\-1] [\-\-versions] [ \fItoken\fR \.\.\. ]: Without any arguments, list all installed Casks\. With \fB\-1\fR, always format the output in a single column\. With \fB\-\-versions\fR, show all installed versions\.
.
.IP
If \fItoken\fR is given, summarize the staged files associated with the given Cask\.
.
-.TP
-\fBsearch\fR or \fB\-S\fR [\fItext\fR | /\fIregexp\fR/]
-Without argument, display all Casks available for install, otherwise perform a substring search of known Cask tokens for \fItext\fR or, if the text is delimited by slashes (/\fIregexp\fR/), it is interpreted as a Ruby regular expression\.
+.IP "\(bu" 4
+\fBreinstall\fR \fItoken\fR [ \fItoken\fR \.\.\.] Reinstall the given Cask\.
.
-.TP
-\fBstyle\fR [\-\-fix] [ \fItoken\fR \.\.\. ]
-Check the given Casks for correct style using RuboCop Cask \fIhttps://github\.com/caskroom/rubocop\-cask\fR\. If no tokens are given on the command line, all Casks are checked\. With \fB\-\-fix\fR, auto\-correct any style errors if possible\.
+.IP "\(bu" 4
+\fBsearch\fR or \fB\-S\fR [\fItext\fR | /\fIregexp\fR/]: Without argument, display all Casks available for install, otherwise perform a substring search of known Cask tokens for \fItext\fR or, if the text is delimited by slashes (/\fIregexp\fR/), it is interpreted as a Ruby regular expression\.
.
-.TP
-\fBuninstall\fR or \fBrm\fR or \fBremove\fR [\-\-force] \fItoken\fR [ \fItoken\fR \.\.\. ]
-Uninstall the given Cask\. With \fB\-\-force\fR, uninstall even if the Cask does not appear to be present\.
+.IP "\(bu" 4
+\fBstyle\fR [\-\-fix] [ \fItoken\fR \.\.\. ]: Check the given Casks for correct style using RuboCop Cask \fIhttps://github\.com/caskroom/rubocop\-cask\fR\. If no tokens are given on the command line, all Casks are checked\. With \fB\-\-fix\fR, auto\-correct any style errors if possible\.
.
-.TP
-\fBupdate\fR
-For convenience\. \fBbrew cask update\fR is a synonym for \fBbrew update\fR\.
+.IP "\(bu" 4
+\fBuninstall\fR or \fBrm\fR or \fBremove\fR [\-\-force] \fItoken\fR [ \fItoken\fR \.\.\. ]: Uninstall the given Cask\. With \fB\-\-force\fR, uninstall even if the Cask does not appear to be present\.
.
-.TP
-\fBzap\fR \fItoken\fR [ \fItoken\fR \.\.\. ]
-Unconditionally remove \fIall\fR files associated with the given Cask\.
+.IP "\(bu" 4
+\fBupdate\fR: For convenience\. \fBbrew cask update\fR is a synonym for \fBbrew update\fR\.
+.
+.IP "\(bu" 4
+\fBzap\fR \fItoken\fR [ \fItoken\fR \.\.\. ]: Unconditionally remove \fIall\fR files associated with the given Cask\.
.
.IP
Implicitly performs all actions associated with \fBuninstall\fR, even if the Cask does not appear to be currently installed\.
@@ -119,6 +106,8 @@ If the Cask definition contains a \fBzap\fR stanza, performs additional \fBzap\f
.IP
\fB\fBzap\fR may remove files which are shared between applications\.\fR
.
+.IP "" 0
+.
.SH "OPTIONS"
To make these options persistent, see the ENVIRONMENT section, below\.
.
diff --git a/manpages/brew.1 b/manpages/brew.1
index c74969aee..1205c888f 100644
--- a/manpages/brew.1
+++ b/manpages/brew.1
@@ -1034,7 +1034,7 @@ Homebrew Documentation: \fIhttps://github\.com/Homebrew/brew/blob/master/docs/\f
Homebrew\'s lead maintainer is Mike McQuaid\.
.
.P
-Homebrew\'s current maintainers are Misty De Meo, Andrew Janke, Xu Cheng, Tomasz Pajor, Josh Hagins, Baptiste Fontaine, Zhiming Wang, Markus Reiter, ilovezfs, Martin Afanasjew, Tom Schoonjans, Uladzislau Shablinski, Tim Smith and Alex Dunn\.
+Homebrew\'s current maintainers are Misty De Meo, Andrew Janke, Xu Cheng, Tomasz Pajor, Josh Hagins, Baptiste Fontaine, Markus Reiter, ilovezfs, Martin Afanasjew, Tom Schoonjans, Uladzislau Shablinski, Tim Smith and Alex Dunn\.
.
.P
Former maintainers with significant contributions include Dominyk Tiller, Brett Koonce, Jack Nagel, Adam Vandenberg and Homebrew\'s creator: Max Howell\.