Include test casks in the cask style check.

Currently the tests casks found in "/Homebrew/test/support/fixtures/cask/Casks" and "/Homebrew/test/support/fixtures/third-party/Casks" aren't included in the paths checked when running "brew cask style".

This change includes these test cask paths in the checked paths, and also includes the auto style fixes made by running `brew cask style --fix`.
This commit is contained in:
Alec Clarke 2019-09-22 11:41:46 -04:00
parent 1544988201
commit 45806f6a97
49 changed files with 74 additions and 67 deletions

View File

@ -3,6 +3,8 @@ inherit_from: ./.rubocop_shared.yml
Cask/HomepageMatchesUrl: Cask/HomepageMatchesUrl:
Description: 'Ensure that the homepage and url match, otherwise add a comment. More info at https://github.com/Homebrew/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment' Description: 'Ensure that the homepage and url match, otherwise add a comment. More info at https://github.com/Homebrew/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment'
Enabled: true Enabled: true
Exclude:
- '**/test/support/fixtures/cask/Casks/**/*.rb'
Cask/HomepageUrlTrailingSlash: Cask/HomepageUrlTrailingSlash:
Description: 'Ensure that the homepage url has a slash after the domain name.' Description: 'Ensure that the homepage url has a slash after the domain name.'

View File

@ -31,7 +31,7 @@ module Cask
def cask_paths def cask_paths
@cask_paths ||= if args.empty? @cask_paths ||= if args.empty?
Tap.map(&:cask_dir).select(&:directory?) Tap.map(&:cask_dir).select(&:directory?).concat(test_cask_paths)
elsif args.any? { |file| File.exist?(file) } elsif args.any? { |file| File.exist?(file) }
args.map { |path| Pathname(path).expand_path } args.map { |path| Pathname(path).expand_path }
else else
@ -51,6 +51,13 @@ module Cask
] ]
end end
def test_cask_paths
[
Pathname.new("#{HOMEBREW_LIBRARY}/Homebrew/test/support/fixtures/cask/Casks"),
Pathname.new("#{HOMEBREW_LIBRARY}/Homebrew/test/support/fixtures/third-party/Casks"),
]
end
def normal_args def normal_args
default_args + ["--parallel"] default_args + ["--parallel"]
end end

View File

@ -10,13 +10,13 @@ describe Cask::Cmd::Home, :cask do
it_behaves_like "a command that handles invalid options" it_behaves_like "a command that handles invalid options"
it "opens the homepage for the specified Cask" do it "opens the homepage for the specified Cask" do
expect(described_class).to receive(:open_url).with("https://brew.sh") expect(described_class).to receive(:open_url).with("https://brew.sh/")
described_class.run("local-caffeine") described_class.run("local-caffeine")
end end
it "works for multiple Casks" do it "works for multiple Casks" do
expect(described_class).to receive(:open_url).with("https://brew.sh") expect(described_class).to receive(:open_url).with("https://brew.sh/")
expect(described_class).to receive(:open_url).with("https://brew.sh") expect(described_class).to receive(:open_url).with("https://brew.sh/")
described_class.run("local-caffeine", "local-transmission") described_class.run("local-caffeine", "local-transmission")
end end

View File

@ -12,7 +12,7 @@ describe Cask::Cmd::Info, :cask do
described_class.run("local-caffeine") described_class.run("local-caffeine")
}.to output(<<~EOS).to_stdout }.to output(<<~EOS).to_stdout
local-caffeine: 1.2.3 local-caffeine: 1.2.3
https://brew.sh https://brew.sh/
Not installed Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/local-caffeine.rb From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/local-caffeine.rb
==> Name ==> Name
@ -41,7 +41,7 @@ describe Cask::Cmd::Info, :cask do
let(:expected_output) { let(:expected_output) {
<<~EOS <<~EOS
local-caffeine: 1.2.3 local-caffeine: 1.2.3
https://brew.sh https://brew.sh/
Not installed Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/local-caffeine.rb From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/local-caffeine.rb
==> Name ==> Name
@ -50,7 +50,7 @@ describe Cask::Cmd::Info, :cask do
Caffeine.app (App) Caffeine.app (App)
local-transmission: 2.61 local-transmission: 2.61
https://brew.sh https://brew.sh/
Not installed Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/local-transmission.rb From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/local-transmission.rb
==> Name ==> Name
@ -72,7 +72,7 @@ describe Cask::Cmd::Info, :cask do
described_class.run("with-caveats") described_class.run("with-caveats")
}.to output(<<~EOS).to_stdout }.to output(<<~EOS).to_stdout
with-caveats: 1.2.3 with-caveats: 1.2.3
https://brew.sh https://brew.sh/
Not installed Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/with-caveats.rb From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/with-caveats.rb
==> Name ==> Name
@ -97,7 +97,7 @@ describe Cask::Cmd::Info, :cask do
described_class.run("with-conditional-caveats") described_class.run("with-conditional-caveats")
}.to output(<<~EOS).to_stdout }.to output(<<~EOS).to_stdout
with-conditional-caveats: 1.2.3 with-conditional-caveats: 1.2.3
https://brew.sh https://brew.sh/
Not installed Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/with-conditional-caveats.rb From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/with-conditional-caveats.rb
==> Name ==> Name
@ -112,7 +112,7 @@ describe Cask::Cmd::Info, :cask do
described_class.run("with-languages") described_class.run("with-languages")
}.to output(<<~EOS).to_stdout }.to output(<<~EOS).to_stdout
with-languages: 1.2.3 with-languages: 1.2.3
https://brew.sh https://brew.sh/
Not installed Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/with-languages.rb From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/with-languages.rb
==> Name ==> Name
@ -129,7 +129,7 @@ describe Cask::Cmd::Info, :cask do
described_class.run("without-languages") described_class.run("without-languages")
}.to output(<<~EOS).to_stdout }.to output(<<~EOS).to_stdout
without-languages: 1.2.3 without-languages: 1.2.3
https://brew.sh https://brew.sh/
Not installed Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/without-languages.rb From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/without-languages.rb
==> Name ==> Name

View File

@ -5,7 +5,7 @@ describe Cask::Cmd::InternalStanza, :cask do
command = described_class.new("homepage", "local-caffeine") command = described_class.new("homepage", "local-caffeine")
expect { expect {
command.run command.run
}.to output("https://brew.sh\n").to_stdout }.to output("https://brew.sh/\n").to_stdout
end end
it "raises an exception when stanza is unknown/unsupported" do it "raises an exception when stanza is unknown/unsupported" do

View File

@ -80,8 +80,12 @@ describe Cask::Cmd::Style, :cask do
end end
it { it {
expect(subject).to contain_exactly(a_path_ending_with("/homebrew/homebrew-cask/Casks"), expect(subject).to contain_exactly(
a_path_ending_with("/third-party/homebrew-tap/Casks")) a_path_ending_with("/homebrew/homebrew-cask/Casks"),
a_path_ending_with("/third-party/homebrew-tap/Casks"),
a_path_ending_with("/Homebrew/test/support/fixtures/cask/Casks"),
a_path_ending_with("/Homebrew/test/support/fixtures/third-party/Casks"),
)
} }
end end

View File

@ -3,7 +3,7 @@ cask 'bad-checksum' do
sha256 'badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb' sha256 'badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb'
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip" url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'https://brew.sh' homepage 'https://brew.sh/'
app 'Caffeine.app' app 'Caffeine.app'
end end

View File

@ -3,6 +3,6 @@ cask 'booby-trap' do
url do url do
# to be lazily evaluated # to be lazily evaluated
fail 'Boom' raise 'Boom'
end end
end end

View File

@ -3,7 +3,7 @@ cask 'installer-with-uninstall' do
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94' sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip" url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'https://brew.sh' homepage 'https://brew.sh/'
installer manual: 'Caffeine.app' installer manual: 'Caffeine.app'

View File

@ -1,9 +1,9 @@
cask => 'invalid-header-format' do cask 'invalid-header-format', :invalid do
version '1.2.3' version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94' sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip" url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'https://brew.sh' homepage 'https://brew.sh/'
app 'Caffeine.app' app 'Caffeine.app'
end end

View File

@ -3,7 +3,7 @@ cask 'invalid-header-token-mismatch-this-text-does-not-belong' do
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94' sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip" url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'https://brew.sh' homepage 'https://brew.sh/'
app 'Caffeine.app' app 'Caffeine.app'
end end

View File

@ -3,7 +3,7 @@ cask 'invalid-header-version' do
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94' sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip" url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'https://brew.sh' homepage 'https://brew.sh/'
app 'Caffeine.app' app 'Caffeine.app'
end end

View File

@ -3,7 +3,7 @@ cask 'invalid-two-homepage' do
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94' sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip" url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'https://brew.sh' homepage 'https://brew.sh/'
homepage 'https://www.brew.sh/local-caffeine' homepage 'https://www.brew.sh/local-caffeine'
app 'Caffeine.app' app 'Caffeine.app'

View File

@ -4,7 +4,7 @@ cask 'invalid-two-url' do
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip" url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
url 'https://brew.sh/caffeine.zip' url 'https://brew.sh/caffeine.zip'
homepage 'https://brew.sh' homepage 'https://brew.sh/'
app 'Caffeine.app' app 'Caffeine.app'
end end

View File

@ -4,7 +4,7 @@ cask 'invalid-two-version' do
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94' sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip" url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'https://brew.sh' homepage 'https://brew.sh/'
app 'Caffeine.app' app 'Caffeine.app'
end end

View File

@ -3,7 +3,7 @@ cask 'local-caffeine' do
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94' sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip" url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'https://brew.sh' homepage 'https://brew.sh/'
app 'Caffeine.app' app 'Caffeine.app'
end end

View File

@ -1,10 +1,10 @@
cask 'local-transmission' do cask 'local-transmission' do
name 'Transmission'
version '2.61' version '2.61'
sha256 'e44ffa103fbf83f55c8d0b1bea309a43b2880798dae8620b1ee8da5e1095ec68' sha256 'e44ffa103fbf83f55c8d0b1bea309a43b2880798dae8620b1ee8da5e1095ec68'
url "file://#{TEST_FIXTURE_DIR}/cask/transmission-2.61.dmg" url "file://#{TEST_FIXTURE_DIR}/cask/transmission-2.61.dmg"
homepage 'https://brew.sh' name 'Transmission'
homepage 'https://brew.sh/'
app 'Transmission.app' app 'Transmission.app'
end end

View File

@ -2,7 +2,7 @@ cask 'missing-checksum' do
version '1.2.3' version '1.2.3'
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip" url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'https://brew.sh' homepage 'https://brew.sh/'
app 'Caffeine.app' app 'Caffeine.app'
end end

View File

@ -1,5 +1,5 @@
cask 'missing-url' do cask 'missing-url' do
version '1.2.3' version '1.2.3'
homepage 'https://brew.sh' homepage 'https://brew.sh/'
end end

View File

@ -1,4 +1,4 @@
cask 'missing-version' do cask 'missing-version' do
url 'https://localhost/something.dmg' url 'https://brew.sh/TestCask.dmg'
homepage 'https://brew.sh' homepage 'https://brew.sh/'
end end

View File

@ -3,7 +3,7 @@ cask 'no-checksum' do
sha256 :no_check sha256 :no_check
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip" url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'https://brew.sh' homepage 'https://brew.sh/'
app 'Caffeine.app' app 'Caffeine.app'
end end

View File

@ -3,7 +3,7 @@ cask 'bad-checksum' do
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94' sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip" url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'https://brew.sh' homepage 'https://brew.sh/'
app 'Caffeine.app' app 'Caffeine.app'
end end

View File

@ -3,7 +3,7 @@ cask 'local-caffeine' do
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94' sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip" url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'https://brew.sh' homepage 'https://brew.sh/'
app 'Caffeine.app' app 'Caffeine.app'
end end

View File

@ -3,7 +3,7 @@ cask 'local-transmission' do
sha256 'e44ffa103fbf83f55c8d0b1bea309a43b2880798dae8620b1ee8da5e1095ec68' sha256 'e44ffa103fbf83f55c8d0b1bea309a43b2880798dae8620b1ee8da5e1095ec68'
url "file://#{TEST_FIXTURE_DIR}/cask/transmission-2.61.dmg" url "file://#{TEST_FIXTURE_DIR}/cask/transmission-2.61.dmg"
homepage 'https://brew.sh' homepage 'https://brew.sh/'
app 'Transmission.app' app 'Transmission.app'
end end

View File

@ -3,7 +3,7 @@ cask 'version-latest' do
sha256 :no_check sha256 :no_check
url "file://#{TEST_FIXTURE_DIR}/cask/caffeines.zip" url "file://#{TEST_FIXTURE_DIR}/cask/caffeines.zip"
homepage 'https://brew.sh' homepage 'https://brew.sh/'
app 'Caffeine Mini.app' app 'Caffeine Mini.app'
app 'Caffeine Pro.app' app 'Caffeine Pro.app'

View File

@ -3,7 +3,7 @@ cask 'version-latest' do
sha256 :no_check sha256 :no_check
url "file://#{TEST_FIXTURE_DIR}/cask/caffeines.zip" url "file://#{TEST_FIXTURE_DIR}/cask/caffeines.zip"
homepage 'https://brew.sh' homepage 'https://brew.sh/'
app 'Caffeine Mini.app' app 'Caffeine Mini.app'
app 'Caffeine Pro.app' app 'Caffeine Pro.app'

View File

@ -3,7 +3,7 @@ cask 'will-fail-if-upgraded' do
sha256 'e44ffa103fbf83f55c8d0b1bea309a43b2880798dae8620b1ee8da5e1095ec68' sha256 'e44ffa103fbf83f55c8d0b1bea309a43b2880798dae8620b1ee8da5e1095ec68'
url "file://#{TEST_FIXTURE_DIR}/cask/transmission-2.61.dmg" url "file://#{TEST_FIXTURE_DIR}/cask/transmission-2.61.dmg"
homepage 'https://brew.sh' homepage 'https://brew.sh/'
app 'container' app 'container'
end end

View File

@ -3,7 +3,7 @@ cask 'with-alt-target' do
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94' sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip" url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'https://brew.sh' homepage 'https://brew.sh/'
app 'Caffeine.app', target: 'AnotherName.app' app 'Caffeine.app', target: 'AnotherName.app'
end end

View File

@ -3,7 +3,7 @@ cask 'with-caveats' do
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94' sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip" url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'https://brew.sh' homepage 'https://brew.sh/'
app 'Caffeine.app' app 'Caffeine.app'

View File

@ -3,12 +3,12 @@ cask 'with-conditional-caveats' do
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94' sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip" url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'https://brew.sh' homepage 'https://brew.sh/'
app 'Caffeine.app' app 'Caffeine.app'
# a do block may print and use a DSL # a do block may print and use a DSL
caveats do caveats do
puts 'This caveat is conditional' if false # rubocop:disable Lint/LiteralInCondition puts 'This caveat is conditional' if false # rubocop:disable Lint/LiteralAsCondition
end end
end end

View File

@ -7,7 +7,7 @@ cask 'with-installable' do
pkg 'MyFancyPkg/Fancy.pkg' pkg 'MyFancyPkg/Fancy.pkg'
uninstall script: { executable: 'MyFancyPkg/FancyUninstaller.tool', args: %w[--please] }, uninstall script: { executable: 'MyFancyPkg/FancyUninstaller.tool', args: ['--please'] },
quit: 'my.fancy.package.app', quit: 'my.fancy.package.app',
login_item: 'Fancy', login_item: 'Fancy',
delete: [ delete: [

View File

@ -3,7 +3,7 @@ cask 'with-installer-manual' do
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94' sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip" url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'https://brew.sh' homepage 'https://brew.sh/'
installer manual: 'Caffeine.app' installer manual: 'Caffeine.app'
end end

View File

@ -1,18 +1,18 @@
cask 'with-languages' do cask 'with-languages' do
version '1.2.3' version '1.2.3'
language "zh" do language 'zh' do
sha256 "abc123" sha256 'abc123'
"zh-CN" 'zh-CN'
end end
language "en-US", default: true do language 'en-US', default: true do
sha256 "xyz789" sha256 'xyz789'
"en-US" 'en-US'
end end
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip" url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'https://brew.sh' homepage 'https://brew.sh/'
app 'Caffeine.app' app 'Caffeine.app'
end end

View File

@ -5,5 +5,5 @@ cask 'with-non-executable-binary' do
url "file://#{TEST_FIXTURE_DIR}/cask/naked_non_executable" url "file://#{TEST_FIXTURE_DIR}/cask/naked_non_executable"
homepage 'https://brew.sh/with-binary' homepage 'https://brew.sh/with-binary'
binary "naked_non_executable" binary 'naked_non_executable'
end end

View File

@ -9,7 +9,6 @@ cask 'with-postflight-multi' do
postflight do postflight do
end end
postflight do postflight do
end end
end end

View File

@ -9,7 +9,6 @@ cask 'with-preflight-multi' do
preflight do preflight do
end end
preflight do preflight do
end end
end end

View File

@ -3,7 +3,7 @@ cask 'with-two-apps-correct' do
sha256 '3178fbfd1ea5d87a2a0662a4eb599ebc9a03888e73f37538d9f3f6ee69d2368e' sha256 '3178fbfd1ea5d87a2a0662a4eb599ebc9a03888e73f37538d9f3f6ee69d2368e'
url "file://#{TEST_FIXTURE_DIR}/cask/caffeines.zip" url "file://#{TEST_FIXTURE_DIR}/cask/caffeines.zip"
homepage 'https://brew.sh' homepage 'https://brew.sh/'
app 'Caffeine Mini.app' app 'Caffeine Mini.app'
app 'Caffeine Pro.app' app 'Caffeine Pro.app'

View File

@ -3,7 +3,7 @@ cask 'with-two-apps-subdir' do
sha256 'd687c22a21c02bd8f07da9302c8292b93a04df9a929e3f04d09aea6c76f75c65' sha256 'd687c22a21c02bd8f07da9302c8292b93a04df9a929e3f04d09aea6c76f75c65'
url "file://#{TEST_FIXTURE_DIR}/cask/caffeines-subdir.zip" url "file://#{TEST_FIXTURE_DIR}/cask/caffeines-subdir.zip"
homepage 'https://brew.sh' homepage 'https://brew.sh/'
app 'Caffeines/Caffeine Mini.app' app 'Caffeines/Caffeine Mini.app'
app 'Caffeines/Caffeine Pro.app' app 'Caffeines/Caffeine Pro.app'

View File

@ -7,5 +7,5 @@ cask 'with-uninstall-early-script' do
pkg 'MyFancyPkg/Fancy.pkg' pkg 'MyFancyPkg/Fancy.pkg'
uninstall early_script: { executable: 'MyFancyPkg/FancyUninstaller.tool', args: %w[--please] } uninstall early_script: { executable: 'MyFancyPkg/FancyUninstaller.tool', args: ['--please'] }
end end

View File

@ -8,6 +8,5 @@ cask 'with-uninstall-multi' do
pkg 'MyFancyPkg/Fancy.pkg' pkg 'MyFancyPkg/Fancy.pkg'
uninstall rmdir: "#{TEST_TMPDIR}/empty_directory_path" uninstall rmdir: "#{TEST_TMPDIR}/empty_directory_path"
uninstall delete: "#{TEST_TMPDIR}/empty_directory_path" uninstall delete: "#{TEST_TMPDIR}/empty_directory_path"
end end

View File

@ -9,7 +9,6 @@ cask 'with-uninstall-postflight-multi' do
uninstall_postflight do uninstall_postflight do
end end
uninstall_postflight do uninstall_postflight do
end end
end end

View File

@ -9,7 +9,6 @@ cask 'with-uninstall-preflight-multi' do
uninstall_preflight do uninstall_preflight do
end end
uninstall_preflight do uninstall_preflight do
end end
end end

View File

@ -16,6 +16,6 @@ cask 'with-uninstall-script-app' do
uninstall script: { uninstall script: {
executable: "#{appdir}/MyFancyApp.app/uninstall.sh", executable: "#{appdir}/MyFancyApp.app/uninstall.sh",
sudo: false sudo: false,
} }
end end

View File

@ -7,5 +7,5 @@ cask 'with-uninstall-script' do
pkg 'MyFancyPkg/Fancy.pkg' pkg 'MyFancyPkg/Fancy.pkg'
uninstall script: { executable: 'MyFancyPkg/FancyUninstaller.tool', args: %w[--please] } uninstall script: { executable: 'MyFancyPkg/FancyUninstaller.tool', args: ['--please'] }
end end

View File

@ -7,5 +7,5 @@ cask 'with-zap-early-script' do
pkg 'MyFancyPkg/Fancy.pkg' pkg 'MyFancyPkg/Fancy.pkg'
zap early_script: { executable: 'MyFancyPkg/FancyUninstaller.tool', args: %w[--please] } zap early_script: { executable: 'MyFancyPkg/FancyUninstaller.tool', args: ['--please'] }
end end

View File

@ -8,6 +8,5 @@ cask 'with-zap-multi' do
pkg 'MyFancyPkg/Fancy.pkg' pkg 'MyFancyPkg/Fancy.pkg'
zap rmdir: "#{TEST_TMPDIR}/empty_directory_path" zap rmdir: "#{TEST_TMPDIR}/empty_directory_path"
zap delete: "#{TEST_TMPDIR}/empty_directory_path" zap delete: "#{TEST_TMPDIR}/empty_directory_path"
end end

View File

@ -7,5 +7,5 @@ cask 'with-zap-script' do
pkg 'MyFancyPkg/Fancy.pkg' pkg 'MyFancyPkg/Fancy.pkg'
zap script: { executable: 'MyFancyPkg/FancyUninstaller.tool', args: %w[--please] } zap script: { executable: 'MyFancyPkg/FancyUninstaller.tool', args: ['--please'] }
end end

View File

@ -11,7 +11,7 @@ cask 'with-zap' do
zap script: { zap script: {
executable: 'MyFancyPkg/FancyUninstaller.tool', executable: 'MyFancyPkg/FancyUninstaller.tool',
args: %w[--please], args: ['--please'],
}, },
quit: 'my.fancy.package.app', quit: 'my.fancy.package.app',
login_item: 'Fancy', login_item: 'Fancy',

View File

@ -3,7 +3,7 @@ cask 'without-languages' do
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94' sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip" url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage 'https://brew.sh' homepage 'https://brew.sh/'
app 'Caffeine.app' app 'Caffeine.app'
end end