Merge pull request #7867 from MikeMcQuaid/cask-style

Unify (mostly) Homebrew code style
This commit is contained in:
Mike McQuaid 2020-07-27 14:26:36 +01:00 committed by GitHub
commit 5ca6a59f27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
164 changed files with 1018 additions and 1091 deletions

View File

@ -103,6 +103,9 @@ jobs:
if [ "$RUNNER_OS" = "macOS" ]; then if [ "$RUNNER_OS" = "macOS" ]; then
brew tap homebrew/cask brew tap homebrew/cask
brew update-reset Library/Taps/homebrew/homebrew-cask brew update-reset Library/Taps/homebrew/homebrew-cask
# don't care about `brew cask style` here.
brew untap adoptopenjdk/openjdk
else else
# Fix permissions for 'brew tests' # Fix permissions for 'brew tests'
sudo chmod -R g-w,o-w /home/linuxbrew /home/runner /opt sudo chmod -R g-w,o-w /home/linuxbrew /home/runner /opt
@ -159,6 +162,10 @@ jobs:
- name: Run brew style on official taps - name: Run brew style on official taps
run: brew style --display-cop-names homebrew/bundle homebrew/services homebrew/test-bot run: brew style --display-cop-names homebrew/bundle homebrew/services homebrew/test-bot
- name: Run brew cask style
if: matrix.os == 'macOS-latest'
run: brew cask style
- name: Run vale for docs linting - name: Run vale for docs linting
run: | run: |
brew install vale brew install vale

View File

@ -1,4 +1,12 @@
inherit_from: ./.rubocop_shared.yml # TODO: Try getting more rules in sync.
require: ./Homebrew/rubocops.rb
AllCops:
TargetRubyVersion: 2.6
DisplayCopNames: false
# enable all pending rubocops
NewCops: enable
# enable all formulae audits # enable all formulae audits
FormulaAudit: FormulaAudit:
@ -8,9 +16,108 @@ FormulaAudit:
FormulaAuditStrict: FormulaAuditStrict:
Enabled: true Enabled: true
# enable all pending rubocops # Use `<<~` for heredocs.
AllCops: Layout/HeredocIndentation:
NewCops: enable Enabled: true
# Not useful in casks and formulae.
Metrics/BlockLength:
Enabled: false
# Keyword arguments don't have the same readability
# problems as normal parameters.
Metrics/ParameterLists:
CountKeywordArgs: false
# Implicitly allow EOS as we use it everywhere.
Naming/HeredocDelimiterNaming:
ForbiddenDelimiters:
- END, EOD, EOF
# Allow dashes in filenames.
Naming/FileName:
Regex: !ruby/regexp /^[\w\@\-\+\.]+(\.rb)?$/
# Both styles are used depending on context,
# e.g. `sha256` and `something_countable_1`.
Naming/VariableNumber:
Enabled: false
# Avoid leaking resources.
Style/AutoResourceCleanup:
Enabled: true
# This makes these a little more obvious.
Style/BarePercentLiterals:
EnforcedStyle: percent_q
# Use consistent style for better readability.
Style/CollectionMethods:
Enabled: true
# Prefer tokens with type annotations for consistency
# between formatting numbers and strings.
Style/FormatStringToken:
EnforcedStyle: annotated
# autocorrectable and more readable
Style/HashEachMethods:
Enabled: true
Style/HashTransformKeys:
Enabled: true
Style/HashTransformValues:
Enabled: true
# Enabled now LineLength is lowish.
Style/IfUnlessModifier:
Enabled: true
# Only use this for numbers >= `1_000_000`.
Style/NumericLiterals:
MinDigits: 7
Strict: true
# Zero-prefixed octal literals are widely used and understood.
Style/NumericLiteralPrefix:
EnforcedOctalStyle: zero_only
# Rescuing `StandardError` is an understood default.
Style/RescueStandardError:
EnforcedStyle: implicit
# Returning `nil` is unnecessary.
Style/ReturnNil:
Enabled: true
# We have no use for using `warn` because we
# are calling Ruby with warnings disabled.
Style/StderrPuts:
Enabled: false
# Use consistent method names.
Style/StringMethods:
Enabled: true
# An array of symbols is more readable than a symbol array
# and also allows for easier grepping.
Style/SymbolArray:
EnforcedStyle: brackets
# Trailing commas make diffs nicer.
Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: comma
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: comma
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: comma
# Does not hinder readability, so might as well enable it.
Performance/CaseWhenSplat:
Enabled: true
# Makes code less readable for minor performance increases.
Performance/Caller:
Enabled: false
# don't allow cops to be disabled in formulae # don't allow cops to be disabled in formulae
Style/DisableCopsWithinSourceCodeDirective: Style/DisableCopsWithinSourceCodeDirective:
@ -54,6 +161,7 @@ Lint/AmbiguousRegexpLiteral:
Lint/ParenthesesAsGroupedExpression: Lint/ParenthesesAsGroupedExpression:
Enabled: false Enabled: false
# most metrics don't make sense to apply for formulae/taps # most metrics don't make sense to apply for formulae/taps
Metrics/AbcSize: Metrics/AbcSize:
Enabled: false Enabled: false
@ -72,7 +180,15 @@ Metrics/PerceivedComplexity:
Layout/LineLength: Layout/LineLength:
Max: 118 Max: 118
# ignore manpage comments and long single-line strings # ignore manpage comments and long single-line strings
IgnoredPatterns: ['#: ', ' url "', ' mirror "', ' plist_options :'] IgnoredPatterns: ['#: ', ' url "', ' mirror "', ' plist_options ',
' appcast "', ' executable: "', '#{version.',
' "~/Library/Application Support/', '"~/Library/Caches/', '"~/Application Support',
' was verified as official when first introduced to the cask']
# TODO: remove this when possible.
Style/ClassVars:
Exclude:
- '**/developer/bin/*'
# most of our APIs are internal so don't require docs # most of our APIs are internal so don't require docs
Style/Documentation: Style/Documentation:
@ -82,26 +198,18 @@ Style/Documentation:
Style/FrozenStringLiteralComment: Style/FrozenStringLiteralComment:
Enabled: false Enabled: false
# TODO: remove this when possible.
Style/GlobalVars:
Exclude:
- '**/developer/bin/*'
# potential for errors in formulae too high with this # potential for errors in formulae too high with this
Style/GuardClause: Style/GuardClause:
Enabled: false Enabled: false
# depends_on a: :b looks weird in formulae. # avoid hash rockets where possible
Style/HashSyntax: Style/HashSyntax:
EnforcedStyle: hash_rockets EnforcedStyle: ruby19
Exclude:
- '**/Guardfile'
- '**/cmd/**/*.rb'
- '**/lib/**/*.rb'
- '**/spec/**/*.rb'
# autocorrectable and more readable
Style/HashEachMethods:
Enabled: true
Style/HashTransformKeys:
Enabled: true
Style/HashTransformValues:
Enabled: true
# ruby style guide favorite # ruby style guide favorite
Style/StringLiterals: Style/StringLiterals:
@ -118,3 +226,11 @@ Style/TernaryParentheses:
# a bit confusing to non-Rubyists but useful for longer arrays # a bit confusing to non-Rubyists but useful for longer arrays
Style/WordArray: Style/WordArray:
MinSize: 4 MinSize: 4
# would rather freeze too much than too little
Style/MutableConstant:
EnforcedStyle: strict
# unused keyword arguments improve APIs
Lint/UnusedMethodArgument:
AllowUnusedKeywordArguments: true

View File

@ -1,10 +1,8 @@
inherit_from: ./.rubocop_shared.yml inherit_from: ./Homebrew/.rubocop.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/HEAD/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/HEAD/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.'
@ -22,44 +20,6 @@ Cask/StanzaOrder:
Description: 'Ensure that cask stanzas are sorted correctly. More info at https://github.com/Homebrew/homebrew-cask/blob/HEAD/CONTRIBUTING.md#stanza-order' Description: 'Ensure that cask stanzas are sorted correctly. More info at https://github.com/Homebrew/homebrew-cask/blob/HEAD/CONTRIBUTING.md#stanza-order'
Enabled: true Enabled: true
Layout/HashAlignment: # don't want this for casks but re-enabled for Library/Homebrew
EnforcedHashRocketStyle: table
EnforcedColonStyle: table
Layout/FirstArrayElementIndentation:
EnforcedStyle: align_brackets
Layout/FirstHashElementIndentation:
EnforcedStyle: align_braces
# Casks often contain long URLs and file paths.
Layout/LineLength:
Enabled: false
# Casks don't need documentation.
Style/Documentation:
Enabled: false
# These would only be distracting in casks.
Style/FrozenStringLiteralComment: Style/FrozenStringLiteralComment:
EnforcedStyle: never Enabled: false
# Don't use hash rockets.
Style/HashSyntax:
EnforcedStyle: ruby19_no_mixed_keys
# This is more readable when the regex contains slashes.
Style/RegexpLiteral:
EnforcedStyle: percent_r
# Use consistent style for all arrays.
Style/WordArray:
EnforcedStyle: brackets
# This makes multi-line arrays more readable and alignable.
Layout/FirstArrayElementLineBreak:
Enabled: true
# This makes multi-line hashes more readable and alignable.
Layout/FirstHashElementLineBreak:
Enabled: true

View File

@ -1,110 +0,0 @@
# TODO: Try getting more rules in sync.
require: ./Homebrew/rubocops.rb
AllCops:
TargetRubyVersion: 2.6
DisplayCopNames: false
# Use `<<~` for heredocs.
Layout/HeredocIndentation:
Enabled: true
# Not useful in casks and formulae.
Metrics/BlockLength:
Enabled: false
# Keyword arguments don't have the same readability
# problems as normal parameters.
Metrics/ParameterLists:
CountKeywordArgs: false
# Implicitly allow EOS as we use it everywhere.
Naming/HeredocDelimiterNaming:
ForbiddenDelimiters:
- END, EOD, EOF
# Allow dashes in filenames.
Naming/FileName:
Regex: !ruby/regexp /^[\w\@\-\+\.]+(\.rb)?$/
# Both styles are used depending on context,
# e.g. `sha256` and `something_countable_1`.
Naming/VariableNumber:
Enabled: false
# Avoid leaking resources.
Style/AutoResourceCleanup:
Enabled: true
# This makes these a little more obvious.
Style/BarePercentLiterals:
EnforcedStyle: percent_q
# Use consistent style for better readability.
Style/CollectionMethods:
Enabled: true
# Prefer tokens with type annotations for consistency
# between formatting numbers and strings.
Style/FormatStringToken:
EnforcedStyle: annotated
# autocorrectable and more readable
Style/HashEachMethods:
Enabled: true
Style/HashTransformKeys:
Enabled: true
Style/HashTransformValues:
Enabled: true
# Enabled now LineLength is lowish.
Style/IfUnlessModifier:
Enabled: true
# Only use this for numbers >= `1_000_000`.
Style/NumericLiterals:
MinDigits: 7
Strict: true
# Zero-prefixed octal literals are widely used and understood.
Style/NumericLiteralPrefix:
EnforcedOctalStyle: zero_only
# Rescuing `StandardError` is an understood default.
Style/RescueStandardError:
EnforcedStyle: implicit
# Returning `nil` is unnecessary.
Style/ReturnNil:
Enabled: true
# We have no use for using `warn` because we
# are calling Ruby with warnings disabled.
Style/StderrPuts:
Enabled: false
# Use consistent method names.
Style/StringMethods:
Enabled: true
# An array of symbols is more readable than a symbol array
# and also allows for easier grepping.
Style/SymbolArray:
EnforcedStyle: brackets
# Trailing commas make diffs nicer.
Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: comma
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: comma
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: comma
# Does not hinder readability, so might as well enable it.
Performance/CaseWhenSplat:
Enabled: true
# Makes code less readable for minor performance increases.
Performance/Caller:
Enabled: false

View File

@ -6,7 +6,6 @@ AllCops:
- 'Library/Homebrew/.simplecov' - 'Library/Homebrew/.simplecov'
Exclude: Exclude:
- 'bin/*' - 'bin/*'
- '**/Casks/**/*'
- '**/vendor/**/*' - '**/vendor/**/*'
# messes up system formatting for formulae but good for Homebrew/brew # messes up system formatting for formulae but good for Homebrew/brew
@ -35,10 +34,6 @@ Lint/NestedMethodDefinition:
Lint/ParenthesesAsGroupedExpression: Lint/ParenthesesAsGroupedExpression:
Enabled: true Enabled: true
# unused keyword arguments improve APIs
Lint/UnusedMethodArgument:
AllowUnusedKeywordArguments: true
# TODO: try to bring down all metrics maximums # TODO: try to bring down all metrics maximums
Metrics/AbcSize: Metrics/AbcSize:
Enabled: true Enabled: true
@ -113,10 +108,7 @@ Style/BlockDelimiters:
# don't group nicely documented or private attr_readers # don't group nicely documented or private attr_readers
Style/AccessorGrouping: Style/AccessorGrouping:
Enabled: true
Exclude: Exclude:
- 'cask/cmd/internal_stanza.rb'
- 'cask/download.rb'
- 'formula.rb' - 'formula.rb'
- 'formulary.rb' - 'formulary.rb'
- 'migrator.rb' - 'migrator.rb'
@ -124,11 +116,6 @@ Style/AccessorGrouping:
- 'system_command.rb' - 'system_command.rb'
- 'tap.rb' - 'tap.rb'
# https://github.com/rubocop-hq/rubocop/issues/8257
Style/BisectedAttrAccessor:
Exclude:
- 'cask/url.rb'
# document our public APIs # document our public APIs
Style/Documentation: Style/Documentation:
Enabled: true Enabled: true
@ -143,19 +130,9 @@ Style/DocumentationMethod:
Style/FrozenStringLiteralComment: Style/FrozenStringLiteralComment:
Enabled: true Enabled: true
EnforcedStyle: always EnforcedStyle: always
Exclude:
- '**/Casks/**/*.rb'
# so many of these in formulae but none in here # so many of these in formulae but none in here
Style/GuardClause: Style/GuardClause:
Enabled: true Enabled: true
# hash-rockets preferred for formulae, a: 1 preferred here
Style/HashSyntax:
EnforcedStyle: ruby19_no_mixed_keys
# would rather freeze too much than too little
Style/MutableConstant:
EnforcedStyle: strict
# LineLength is low enough here to re-enable it.
Style/IfUnlessModifier:
Enabled: true

View File

@ -32,12 +32,8 @@ module Cask
option "--yaml", :yaml, false option "--yaml", :yaml, false
option "--inspect", :inspect, false option "--inspect", :inspect, false
attr_accessor :format attr_accessor :format, :stanza
private :format, :format= private :format, :format=
attr_accessor :stanza
private :stanza, :stanza= private :stanza, :stanza=
def initialize(*) def initialize(*)

View File

@ -19,7 +19,7 @@ module Homebrew
switch "--aliases", switch "--aliases",
description: "Verify any alias symlinks in each tap." description: "Verify any alias symlinks in each tap."
switch "--syntax", switch "--syntax",
description: "Syntax-check all of Homebrew's Ruby files." description: "Syntax-check all of Homebrew's Ruby files (if no `<tap>` is passed)."
switch :verbose switch :verbose
switch :debug switch :debug
end end
@ -28,7 +28,7 @@ module Homebrew
def readall def readall
readall_args.parse readall_args.parse
if args.syntax? if args.syntax? && args.no_named?
scan_files = "#{HOMEBREW_LIBRARY_PATH}/**/*.rb" scan_files = "#{HOMEBREW_LIBRARY_PATH}/**/*.rb"
ruby_files = Dir.glob(scan_files).reject { |file| file =~ %r{/(vendor)/} } ruby_files = Dir.glob(scan_files).reject { |file| file =~ %r{/(vendor)/} }

View File

@ -9,7 +9,7 @@ module RuboCop
# or if it doesn't, checks if a comment in the form # or if it doesn't, checks if a comment in the form
# `# example.com was verified as official when first introduced to the cask` # `# example.com was verified as official when first introduced to the cask`
# is present. # is present.
class HomepageMatchesUrl < Cop # rubocop:disable Metrics/ClassLength class HomepageMatchesUrl < Cop
extend Forwardable extend Forwardable
include CaskHelp include CaskHelp
@ -134,7 +134,13 @@ module RuboCop
def url_match_homepage?(stanza) def url_match_homepage?(stanza)
host = extract_url(stanza).downcase host = extract_url(stanza).downcase
host_uri = URI(remove_non_ascii(host)) host_uri = begin
URI(remove_non_ascii(host))
rescue URI::InvalidURIError
# Can't check if we can't parse.
return true
end
host = if host.match?(/:\d/) && host_uri.port != 80 host = if host.match?(/:\d/) && host_uri.port != 80
"#{host_uri.host}:#{host_uri.port}" "#{host_uri.host}:#{host_uri.port}"
else else

View File

@ -10,14 +10,14 @@ describe Cask::Cmd::Cat, :cask do
describe "given a basic Cask" do describe "given a basic Cask" do
let(:basic_cask_content) { let(:basic_cask_content) {
<<~RUBY <<~RUBY
cask 'basic-cask' do cask "basic-cask" do
version '1.2.3' version "1.2.3"
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b"
url 'https://brew.sh/TestCask.dmg' url "https://brew.sh/TestCask.dmg"
homepage 'https://brew.sh/' homepage "https://brew.sh/"
app 'TestCask.app' app "TestCask.app"
end end
RUBY RUBY
} }

View File

@ -15,14 +15,16 @@ describe Cask::Cmd::Style, :cask do
around do |example| around do |example|
FileUtils.ln_s HOMEBREW_LIBRARY_PATH, HOMEBREW_LIBRARY/"Homebrew" FileUtils.ln_s HOMEBREW_LIBRARY_PATH, HOMEBREW_LIBRARY/"Homebrew"
FileUtils.ln_s HOMEBREW_LIBRARY_PATH.parent/".rubocop.yml", HOMEBREW_LIBRARY/".rubocop.yml"
FileUtils.ln_s HOMEBREW_LIBRARY_PATH.parent/".rubocop_cask.yml", HOMEBREW_LIBRARY/".rubocop_cask.yml" FileUtils.ln_s HOMEBREW_LIBRARY_PATH.parent/".rubocop_cask.yml", HOMEBREW_LIBRARY/".rubocop_cask.yml"
FileUtils.ln_s HOMEBREW_LIBRARY_PATH.parent/".rubocop_shared.yml", HOMEBREW_LIBRARY/".rubocop_shared.yml" FileUtils.ln_s HOMEBREW_LIBRARY_PATH.parent/".rubocop_rspec.yml", HOMEBREW_LIBRARY/".rubocop_rspec.yml"
example.run example.run
ensure ensure
FileUtils.rm_f HOMEBREW_LIBRARY/"Homebrew" FileUtils.rm_f HOMEBREW_LIBRARY/"Homebrew"
FileUtils.rm_f HOMEBREW_LIBRARY/".rubocop.yml"
FileUtils.rm_f HOMEBREW_LIBRARY/".rubocop_cask.yml" FileUtils.rm_f HOMEBREW_LIBRARY/".rubocop_cask.yml"
FileUtils.rm_f HOMEBREW_LIBRARY/".rubocop_shared.yml" FileUtils.rm_f HOMEBREW_LIBRARY/".rubocop_rspec.yml"
end end
before do before do

View File

@ -6,7 +6,7 @@ describe "Homebrew.readall_args" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
end end
describe "brew readall", :integration_test, timeout: 240 do describe "brew readall", :integration_test do
it "imports all Formulae for a given Tap" do it "imports all Formulae for a given Tap" do
formula_file = setup_test_formula "testball" formula_file = setup_test_formula "testball"
@ -15,7 +15,7 @@ describe "brew readall", :integration_test, timeout: 240 do
FileUtils.ln_s formula_file, alias_file FileUtils.ln_s formula_file, alias_file
expect { brew "readall", "--aliases", "--syntax" } expect { brew "readall", "--aliases", "--syntax", CoreTap.instance.name }
.to be_a_success .to be_a_success
.and not_to_output.to_stdout .and not_to_output.to_stdout
.and not_to_output.to_stderr .and not_to_output.to_stderr

View File

@ -7,41 +7,16 @@ describe FormulaInfo, :integration_test do
it "tests the FormulaInfo class" do it "tests the FormulaInfo class" do
install_test_formula "testball" install_test_formula "testball"
expect( info = described_class.lookup(Formula["testball"].path)
described_class.lookup(Formula["testball"].path) expect(info).not_to be_nil
.revision, expect(info.revision).to eq(0)
).to eq(0) expect(info.bottle_tags).to eq([])
expect(info.bottle_info).to be_nil
expect(info.bottle_info_any).to be_nil
expect(info.any_bottle_tag).to be_nil
expect(info.version(:stable).to_s).to eq("0.1")
expect( version = info.version(:stable)
described_class.lookup(Formula["testball"].path) expect(info.pkg_version).to eq(PkgVersion.new(version, 0))
.bottle_tags,
).to eq([])
expect(
described_class.lookup(Formula["testball"].path)
.bottle_info,
).to eq(nil)
expect(
described_class.lookup(Formula["testball"].path)
.bottle_info_any,
).to eq(nil)
expect(
described_class.lookup(Formula["testball"].path)
.any_bottle_tag,
).to eq(nil)
expect(
described_class.lookup(Formula["testball"].path)
.version(:stable).to_s,
).to eq("0.1")
version = described_class.lookup(Formula["testball"].path)
.version(:stable)
expect(
described_class.lookup(Formula["testball"].path)
.pkg_version,
).to eq(PkgVersion.new(version, 0))
end end
end end

View File

@ -6,13 +6,11 @@ describe Homebrew::Style do
around do |example| around do |example|
FileUtils.ln_s HOMEBREW_LIBRARY_PATH, HOMEBREW_LIBRARY/"Homebrew" FileUtils.ln_s HOMEBREW_LIBRARY_PATH, HOMEBREW_LIBRARY/"Homebrew"
FileUtils.ln_s HOMEBREW_LIBRARY_PATH.parent/".rubocop.yml", HOMEBREW_LIBRARY/".rubocop.yml" FileUtils.ln_s HOMEBREW_LIBRARY_PATH.parent/".rubocop.yml", HOMEBREW_LIBRARY/".rubocop.yml"
FileUtils.ln_s HOMEBREW_LIBRARY_PATH.parent/".rubocop_shared.yml", HOMEBREW_LIBRARY/".rubocop_shared.yml"
example.run example.run
ensure ensure
FileUtils.rm_f HOMEBREW_LIBRARY/"Homebrew" FileUtils.rm_f HOMEBREW_LIBRARY/"Homebrew"
FileUtils.rm_f HOMEBREW_LIBRARY/".rubocop.yml" FileUtils.rm_f HOMEBREW_LIBRARY/".rubocop.yml"
FileUtils.rm_f HOMEBREW_LIBRARY/".rubocop_shared.yml"
end end
before do before do

View File

@ -1,10 +1,10 @@
cask 'adobe-air' do cask "adobe-air" do
version '1.2.3' version "1.2.3"
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b"
url 'https://brew.sh/TestCask.dmg' url "https://brew.sh/TestCask.dmg"
name 'Adobe Air' name "Adobe Air"
homepage 'https://brew.sh/' homepage "https://brew.sh/"
app 'TestCask.app' app "TestCask.app"
end end

View File

@ -1,10 +1,10 @@
cask 'adobe-illustrator' do cask "adobe-illustrator" do
version '1.2.3' version "1.2.3"
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b"
url 'https://brew.sh/TestCask.dmg' url "https://brew.sh/TestCask.dmg"
name 'Adobe Illustrator' name "Adobe Illustrator"
homepage 'https://brew.sh/' homepage "https://brew.sh/"
app 'TestCask.app' app "TestCask.app"
end end

View File

@ -1,9 +1,9 @@
cask 'appdir-interpolation' do cask "appdir-interpolation" do
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/appdir-interpolation' homepage "https://brew.sh/appdir-interpolation"
binary "#{appdir}/some/path" binary "#{appdir}/some/path"
end end

View File

@ -1,11 +1,11 @@
cask 'auto-updates' do cask "auto-updates" do
version '2.61' version "2.61"
sha256 '5633c3a0f2e572cbf021507dec78c50998b398c343232bdfc7e26221d0a5db4d' sha256 "5633c3a0f2e572cbf021507dec78c50998b398c343232bdfc7e26221d0a5db4d"
url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyApp.zip" url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyApp.zip"
homepage 'https://brew.sh/MyFancyApp' homepage "https://brew.sh/MyFancyApp"
auto_updates true auto_updates true
app 'MyFancyApp/MyFancyApp.app' app "MyFancyApp/MyFancyApp.app"
end end

View File

@ -1,9 +1,9 @@
cask 'bad-checksum' do cask "bad-checksum" do
version '1.2.3' version "1.2.3"
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

@ -1,9 +1,9 @@
cask 'bad-checksum2' do cask "bad-checksum2" do
version '1.2.3' version "1.2.3"
sha256 'badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb' sha256 "badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
url "file://#{TEST_FIXTURE_DIR}/cask/container.tar.gz" url "file://#{TEST_FIXTURE_DIR}/cask/container.tar.gz"
homepage 'https://brew.sh/container-tar-gz' homepage "https://brew.sh/container-tar-gz"
app 'container' app "container"
end end

View File

@ -1,9 +1,9 @@
cask 'basic-cask' do cask "basic-cask" do
version '1.2.3' version "1.2.3"
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b"
url 'https://brew.sh/TestCask.dmg' url "https://brew.sh/TestCask.dmg"
homepage 'https://brew.sh/' homepage "https://brew.sh/"
app 'TestCask.app' app "TestCask.app"
end end

View File

@ -1,8 +1,8 @@
cask 'booby-trap' do cask "booby-trap" do
version '0.0.7' version "0.0.7"
url do url do
# to be lazily evaluated # to be lazily evaluated
raise 'Boom' raise "Boom"
end end
end end

View File

@ -1,11 +1,11 @@
cask 'with-depends-on-macos-string' do cask "with-depends-on-macos-string" 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/with-depends-on-macos-string' homepage "https://brew.sh/with-depends-on-macos-string"
depends_on macos: MacOS.version.to_s depends_on macos: MacOS.version.to_s
app 'Caffeine.app' app "Caffeine.app"
end end

View File

@ -1,11 +1,11 @@
cask 'container-7z' do cask "container-7z" do
version '1.2.3' version "1.2.3"
sha256 '3f9542ace85ed5f88549e2d0ea82210f8ddc87e0defbb78469d3aed719b3c964' sha256 "3f9542ace85ed5f88549e2d0ea82210f8ddc87e0defbb78469d3aed719b3c964"
url "file://#{TEST_FIXTURE_DIR}/cask/container.7z" url "file://#{TEST_FIXTURE_DIR}/cask/container.7z"
homepage 'https://brew.sh/container-7z' homepage "https://brew.sh/container-7z"
depends_on formula: 'unar' depends_on formula: "unar"
app 'container' app "container"
end end

View File

@ -1,9 +1,9 @@
cask 'container-bzip2' do cask "container-bzip2" do
version '1.2.3' version "1.2.3"
sha256 'eaf67b3a62cb9275f96e45d05c70b94bef9ef1dae344083e93eda6b0b388a61c' sha256 "eaf67b3a62cb9275f96e45d05c70b94bef9ef1dae344083e93eda6b0b388a61c"
url "file://#{TEST_FIXTURE_DIR}/cask/container.bz2" url "file://#{TEST_FIXTURE_DIR}/cask/container.bz2"
homepage 'https://brew.sh/container-bzip2' homepage "https://brew.sh/container-bzip2"
app 'container' app "container"
end end

View File

@ -1,11 +1,11 @@
cask 'container-cab' do cask "container-cab" do
version '1.2.3' version "1.2.3"
sha256 'c267f5cebb14814c8e612a8b7d2bda02aec913f869509b6f1d3883427c0f552b' sha256 "c267f5cebb14814c8e612a8b7d2bda02aec913f869509b6f1d3883427c0f552b"
url "file://#{TEST_FIXTURE_DIR}/cask/container.cab" url "file://#{TEST_FIXTURE_DIR}/cask/container.cab"
homepage 'https://brew.sh/container-cab' homepage "https://brew.sh/container-cab"
depends_on formula: 'cabextract' depends_on formula: "cabextract"
app 'container' app "container"
end end

View File

@ -1,9 +1,9 @@
cask 'container-dmg' do cask "container-dmg" do
version '1.2.3' version "1.2.3"
sha256 '74d89d4fa5cef175cf43666ce11fefa3741aa1522114042ac75e656be37141a1' sha256 "74d89d4fa5cef175cf43666ce11fefa3741aa1522114042ac75e656be37141a1"
url "file://#{TEST_FIXTURE_DIR}/cask/container.dmg" url "file://#{TEST_FIXTURE_DIR}/cask/container.dmg"
homepage 'https://brew.sh/container-dmg' homepage "https://brew.sh/container-dmg"
app 'container' app "container"
end end

View File

@ -1,9 +1,9 @@
cask 'container-gzip' do cask "container-gzip" do
version '1.2.3' version "1.2.3"
sha256 'fa4ebb5246583c4b6e62e1df4e3b71b4e38a1d7d91c025665827195d36214b20' sha256 "fa4ebb5246583c4b6e62e1df4e3b71b4e38a1d7d91c025665827195d36214b20"
url "file://#{TEST_FIXTURE_DIR}/cask/container.gz" url "file://#{TEST_FIXTURE_DIR}/cask/container.gz"
homepage 'https://brew.sh/container-gzip' homepage "https://brew.sh/container-gzip"
app 'container' app "container"
end end

View File

@ -1,7 +1,7 @@
cask 'container-pkg' do cask "container-pkg" do
version '1.2.3' version "1.2.3"
sha256 '611c50c8a2a2098951d2cd0fd54787ed81b92cd97b4b08bd7cba17f1e1d8e40b' sha256 "611c50c8a2a2098951d2cd0fd54787ed81b92cd97b4b08bd7cba17f1e1d8e40b"
url "file://#{TEST_FIXTURE_DIR}/cask/container.pkg" url "file://#{TEST_FIXTURE_DIR}/cask/container.pkg"
homepage 'https://brew.sh/container-pkg' homepage "https://brew.sh/container-pkg"
end end

View File

@ -1,9 +1,9 @@
cask 'container-tar-gz' do cask "container-tar-gz" do
version '1.2.3' version "1.2.3"
sha256 'fab685fabf73d5a9382581ce8698fce9408f5feaa49fa10d9bc6c510493300f5' sha256 "fab685fabf73d5a9382581ce8698fce9408f5feaa49fa10d9bc6c510493300f5"
url "file://#{TEST_FIXTURE_DIR}/cask/container.tar.gz" url "file://#{TEST_FIXTURE_DIR}/cask/container.tar.gz"
homepage 'https://brew.sh/container-tar-gz' homepage "https://brew.sh/container-tar-gz"
app 'container' app "container"
end end

View File

@ -1,9 +1,9 @@
cask 'container-xar' do cask "container-xar" do
version '1.2.3' version "1.2.3"
sha256 '5bb8e09a6fc630ebeaf266b1fd2d15e2ae7d32d7e4da6668a8093426fa1ba509' sha256 "5bb8e09a6fc630ebeaf266b1fd2d15e2ae7d32d7e4da6668a8093426fa1ba509"
url "file://#{TEST_FIXTURE_DIR}/cask/container.xar" url "file://#{TEST_FIXTURE_DIR}/cask/container.xar"
homepage 'https://brew.sh/container-xar' homepage "https://brew.sh/container-xar"
app 'container' app "container"
end end

View File

@ -1,12 +1,12 @@
cask 'devmate-with-appcast' do cask "devmate-with-appcast" do
version '1.0' version "1.0"
sha256 'a69e7357bea014f4c14ac9699274f559086844ffa46563c4619bf1addfd72ad9' sha256 "a69e7357bea014f4c14ac9699274f559086844ffa46563c4619bf1addfd72ad9"
# dl.devmate.com/com.my.fancyapp was verified as official when first introduced to the cask # dl.devmate.com/com.my.fancyapp was verified as official when first introduced to the cask
url "https://dl.devmate.com/com.my.fancyapp/app_#{version}.zip" url "https://dl.devmate.com/com.my.fancyapp/app_#{version}.zip"
appcast 'https://updates.devmate.com/com.my.fancyapp.app.xml' appcast "https://updates.devmate.com/com.my.fancyapp.app.xml"
name 'DevMate' name "DevMate"
homepage 'https://www.brew.sh/' homepage "https://www.brew.sh/"
app 'DevMate.app' app "DevMate.app"
end end

View File

@ -1,11 +1,11 @@
cask 'devmate-without-appcast' do cask "devmate-without-appcast" do
version '1.0' version "1.0"
sha256 'a69e7357bea014f4c14ac9699274f559086844ffa46563c4619bf1addfd72ad9' sha256 "a69e7357bea014f4c14ac9699274f559086844ffa46563c4619bf1addfd72ad9"
# dl.devmate.com/com.my.fancyapp was verified as official when first introduced to the cask # dl.devmate.com/com.my.fancyapp was verified as official when first introduced to the cask
url "https://dl.devmate.com/com.my.fancyapp/app_#{version}.zip" url "https://dl.devmate.com/com.my.fancyapp/app_#{version}.zip"
name 'DevMate' name "DevMate"
homepage 'https://www.brew.sh/' homepage "https://www.brew.sh/"
app 'DevMate.app' app "DevMate.app"
end end

View File

@ -1,3 +1,3 @@
cask 'generic-artifact-absolute-target' do cask "generic-artifact-absolute-target" do
artifact 'Caffeine.app', target: "#{appdir}/Caffeine.app" artifact "Caffeine.app", target: "#{appdir}/Caffeine.app"
end end

View File

@ -1,3 +1,3 @@
cask 'generic-artifact-relative-target' do cask "generic-artifact-relative-target" do
artifact 'Caffeine.app', target: 'Caffeine.app' artifact "Caffeine.app", target: "Caffeine.app"
end end

View File

@ -1,13 +1,13 @@
cask 'github-with-appcast' do cask "github-with-appcast" do
version '1.0' version "1.0"
sha256 'a69e7357bea014f4c14ac9699274f559086844ffa46563c4619bf1addfd72ad9' sha256 "a69e7357bea014f4c14ac9699274f559086844ffa46563c4619bf1addfd72ad9"
url "https://github.com/user/project/releases/download/#{version}/github.pkg" url "https://github.com/user/project/releases/download/#{version}/github.pkg"
appcast 'https://github.com/user/project/releases.atom' appcast "https://github.com/user/project/releases.atom"
name 'github' name "github"
homepage 'https://github.com/user/project' homepage "https://github.com/user/project"
pkg 'github.pkg' pkg "github.pkg"
uninstall pkgutil: 'com.github' uninstall pkgutil: "com.github"
end end

View File

@ -1,12 +1,12 @@
cask 'github-without-appcast' do cask "github-without-appcast" do
version '1.0' version "1.0"
sha256 'a69e7357bea014f4c14ac9699274f559086844ffa46563c4619bf1addfd72ad9' sha256 "a69e7357bea014f4c14ac9699274f559086844ffa46563c4619bf1addfd72ad9"
url "https://github.com/user/project/releases/download/#{version}/github.pkg" url "https://github.com/user/project/releases/download/#{version}/github.pkg"
name 'github' name "github"
homepage 'https://github.com/user/project' homepage "https://github.com/user/project"
pkg 'github.pkg' pkg "github.pkg"
uninstall pkgutil: 'com.github' uninstall pkgutil: "com.github"
end end

View File

@ -1,12 +1,12 @@
cask 'hockeyapp-with-appcast' do cask "hockeyapp-with-appcast" do
version '1.0,123' version "1.0,123"
sha256 'a69e7357bea014f4c14ac9699274f559086844ffa46563c4619bf1addfd72ad9' sha256 "a69e7357bea014f4c14ac9699274f559086844ffa46563c4619bf1addfd72ad9"
# rink.hockeyapp.net/api/2/apps/67503a7926431872c4b6c1549f5bd6b1 was verified as official when first introduced to the cask # rink.hockeyapp.net/api/2/apps/67503a7926431872c4b6c1549f5bd6b1 was verified as official when first introduced to the cask
url "https://rink.hockeyapp.net/api/2/apps/67503a7926431872c4b6c1549f5bd6b1/app_versions/#{version.after_comma}?format=zip" url "https://rink.hockeyapp.net/api/2/apps/67503a7926431872c4b6c1549f5bd6b1/app_versions/#{version.after_comma}?format=zip"
appcast 'https://rink.hockeyapp.net/api/2/apps/67503a7926431872c4b6c1549f5bd6b1' appcast "https://rink.hockeyapp.net/api/2/apps/67503a7926431872c4b6c1549f5bd6b1"
name 'HockeyApp' name "HockeyApp"
homepage 'https://www.brew.sh/' homepage "https://www.brew.sh/"
app 'HockeyApp.app' app "HockeyApp.app"
end end

View File

@ -1,11 +1,11 @@
cask 'hockeyapp-without-appcast' do cask "hockeyapp-without-appcast" do
version '1.0,123' version "1.0,123"
sha256 'a69e7357bea014f4c14ac9699274f559086844ffa46563c4619bf1addfd72ad9' sha256 "a69e7357bea014f4c14ac9699274f559086844ffa46563c4619bf1addfd72ad9"
# rink.hockeyapp.net/api/2/apps/67503a7926431872c4b6c1549f5bd6b1 was verified as official when first introduced to the cask # rink.hockeyapp.net/api/2/apps/67503a7926431872c4b6c1549f5bd6b1 was verified as official when first introduced to the cask
url "https://rink.hockeyapp.net/api/2/apps/67503a7926431872c4b6c1549f5bd6b1/app_versions/#{version.after_comma}?format=zip" url "https://rink.hockeyapp.net/api/2/apps/67503a7926431872c4b6c1549f5bd6b1/app_versions/#{version.after_comma}?format=zip"
name 'HockeyApp' name "HockeyApp"
homepage 'https://www.brew.sh/' homepage "https://www.brew.sh/"
app 'HockeyApp.app' app "HockeyApp.app"
end end

View File

@ -1,11 +1,11 @@
cask 'installer-with-uninstall' do cask "installer-with-uninstall" 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/"
installer manual: 'Caffeine.app' installer manual: "Caffeine.app"
uninstall delete: '/Applications/Caffeine.app' uninstall delete: "/Applications/Caffeine.app"
end end

View File

@ -1,4 +1,4 @@
cask 'invalid-sha256' do cask "invalid-sha256" do
version '1.2.3' version "1.2.3"
sha256 'not a valid shasum' sha256 "not a valid shasum"
end end

View File

@ -1,11 +1,11 @@
cask 'invalid-appcast-multiple' do cask "invalid-appcast-multiple" 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"
appcast 'https://brew.sh/appcast1.xml' appcast "https://brew.sh/appcast1.xml"
appcast 'https://brew.sh/appcast2.xml' appcast "https://brew.sh/appcast2.xml"
homepage 'https://brew.sh/invalid-appcast-multiple' homepage "https://brew.sh/invalid-appcast-multiple"
app 'Caffeine.app' app "Caffeine.app"
end end

View File

@ -1,10 +1,10 @@
cask 'invalid-appcast-url' do cask "invalid-appcast-url" 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"
appcast 1 appcast 1
homepage 'https://brew.sh/invalid-appcast-url' homepage "https://brew.sh/invalid-appcast-url"
app 'Caffeine.app' app "Caffeine.app"
end end

View File

@ -1,11 +1,11 @@
cask 'invalid-conflicts-with-key' do cask "invalid-conflicts-with-key" 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/invalid-conflicts-with-key' homepage "https://brew.sh/invalid-conflicts-with-key"
conflicts_with no_such_key: 'unar' conflicts_with no_such_key: "unar"
app 'Caffeine.app' app "Caffeine.app"
end end

View File

@ -1,11 +1,11 @@
cask 'invalid-depends-on-arch-value' do cask "invalid-depends-on-arch-value" 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/invalid-depends-on-arch-value' homepage "https://brew.sh/invalid-depends-on-arch-value"
depends_on arch: :no_such_arch depends_on arch: :no_such_arch
app 'Caffeine.app' app "Caffeine.app"
end end

View File

@ -1,11 +1,11 @@
cask 'invalid-depends-on-key' do cask "invalid-depends-on-key" 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/invalid-depends-on-key' homepage "https://brew.sh/invalid-depends-on-key"
depends_on no_such_key: 'unar' depends_on no_such_key: "unar"
app 'Caffeine.app' app "Caffeine.app"
end end

View File

@ -1,11 +1,11 @@
cask 'invalid-depends-on-macos-bad-release' do cask "invalid-depends-on-macos-bad-release" 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/invalid-depends-on-macos-bad-release' homepage "https://brew.sh/invalid-depends-on-macos-bad-release"
depends_on macos: :no_such_release depends_on macos: :no_such_release
app 'Caffeine.app' app "Caffeine.app"
end end

View File

@ -1,11 +1,11 @@
cask 'invalid-depends-on-x11-value' do cask "invalid-depends-on-x11-value" 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/invalid-depends-on-x11-value' homepage "https://brew.sh/invalid-depends-on-x11-value"
depends_on x11: :no_such_value depends_on x11: :no_such_value
app 'Caffeine.app' app "Caffeine.app"
end end

View File

@ -1,9 +1,9 @@
cask 'invalid-generic-artifact-no-target' do cask "invalid-generic-artifact-no-target" 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/with-generic-artifact' homepage "https://brew.sh/with-generic-artifact"
artifact 'Caffeine.app' artifact "Caffeine.app"
end end

View File

@ -1,9 +1,9 @@
cask 'invalid-header-format', :invalid 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

@ -1,9 +1,9 @@
cask 'invalid-header-token-mismatch-this-text-does-not-belong' do cask "invalid-header-token-mismatch-this-text-does-not-belong" 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

@ -1,9 +1,9 @@
cask 'invalid-header-version' do cask "invalid-header-version" 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

@ -1,9 +1,9 @@
cask 'invalid-manpage-no-section' do cask "invalid-manpage-no-section" do
version '1.2.3' version "1.2.3"
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94' sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94"
url "file://#{TEST_FIXTURE_DIR}/cask/AppWithManpage.zip" url "file://#{TEST_FIXTURE_DIR}/cask/AppWithManpage.zip"
homepage 'https://brew.sh/with-generic-artifact' homepage "https://brew.sh/with-generic-artifact"
manpage 'manpage' manpage "manpage"
end end

View File

@ -1,10 +1,10 @@
cask 'invalid-stage-only-conflict' do cask "invalid-stage-only-conflict" do
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/invalid-stage-only-conflict' homepage "https://brew.sh/invalid-stage-only-conflict"
app 'Transmission.app' app "Transmission.app"
stage_only true stage_only true
end end

View File

@ -1,10 +1,10 @@
cask 'invalid-two-homepage' do cask "invalid-two-homepage" 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/"
homepage 'https://www.brew.sh/local-caffeine' homepage "https://www.brew.sh/local-caffeine"
app 'Caffeine.app' app "Caffeine.app"
end end

View File

@ -1,10 +1,10 @@
cask 'invalid-two-url' do cask "invalid-two-url" 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"
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

@ -1,10 +1,10 @@
cask 'invalid-two-version' do cask "invalid-two-version" do
version '1.2.3' version "1.2.3"
version '2.0' version "2.0"
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 'latest-with-appcast' do cask "latest-with-appcast" do
version :latest version :latest
sha256 :no_check sha256 :no_check
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip" url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
appcast 'https://brew.sh/appcast.xml' appcast "https://brew.sh/appcast.xml"
homepage 'https://brew.sh/with-appcast' homepage "https://brew.sh/with-appcast"
app 'Caffeine.app' app "Caffeine.app"
end end

View File

@ -1,11 +1,11 @@
cask 'latest-with-auto-updates' do cask "latest-with-auto-updates" do
version :latest version :latest
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/latest-with-auto-updates' homepage "https://brew.sh/latest-with-auto-updates"
auto_updates true auto_updates true
app 'Caffeine.app' app "Caffeine.app"
end end

View File

@ -1,9 +1,9 @@
cask 'local-caffeine' do cask "local-caffeine" 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

@ -1,10 +1,10 @@
cask 'local-transmission' do cask "local-transmission" do
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"
name 'Transmission' name "Transmission"
homepage 'https://brew.sh/' homepage "https://brew.sh/"
app 'Transmission.app' app "Transmission.app"
end end

View File

@ -1,8 +1,8 @@
cask 'missing-checksum' do 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-homepage' do cask "missing-homepage" do
version '1.2.3' version "1.2.3"
url 'https://localhost/something.dmg' url "https://localhost/something.dmg"
end end

View File

@ -1,5 +1,5 @@
cask 'missing-name' do cask "missing-name" do
version '1.2.3' version "1.2.3"
url 'https://localhost/something.dmg' url "https://localhost/something.dmg"
end end

View File

@ -1,5 +1,5 @@
cask 'missing-sha256' do cask "missing-sha256" do
version '1.2.3' version "1.2.3"
url 'https://localhost/something.dmg' url "https://localhost/something.dmg"
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://brew.sh/TestCask.dmg' url "https://brew.sh/TestCask.dmg"
homepage 'https://brew.sh/' homepage "https://brew.sh/"
end end

View File

@ -1,9 +1,9 @@
cask 'naked-executable' do cask "naked-executable" do
version '1.2.3' version "1.2.3"
sha256 '306c6ca7407560340797866e077e053627ad409277d1b9da58106fce4cf717cb' sha256 "306c6ca7407560340797866e077e053627ad409277d1b9da58106fce4cf717cb"
url "file://#{TEST_FIXTURE_DIR}/cask/naked_executable" url "file://#{TEST_FIXTURE_DIR}/cask/naked_executable"
homepage 'https://brew.sh/naked-executable' homepage "https://brew.sh/naked-executable"
container type: :naked container type: :naked
end end

View File

@ -1,11 +1,11 @@
cask 'nested-app' do cask "nested-app" do
version '1.2.3' version "1.2.3"
sha256 '1866dfa833b123bb8fe7fa7185ebf24d28d300d0643d75798bc23730af734216' sha256 "1866dfa833b123bb8fe7fa7185ebf24d28d300d0643d75798bc23730af734216"
url "file://#{TEST_FIXTURE_DIR}/cask/NestedApp.dmg.zip" url "file://#{TEST_FIXTURE_DIR}/cask/NestedApp.dmg.zip"
homepage 'https://brew.sh/nested-app' homepage "https://brew.sh/nested-app"
container nested: 'NestedApp.dmg' container nested: "NestedApp.dmg"
app 'MyNestedApp.app' app "MyNestedApp.app"
end end

View File

@ -1,9 +1,9 @@
cask 'no-checksum' do cask "no-checksum" do
version '1.2.3' version "1.2.3"
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

@ -1,9 +1,9 @@
cask 'no-dsl-version' do cask "no-dsl-version" do
version '1.2.3' version "1.2.3"
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b"
url 'https://brew.sh/TestCask.dmg' url "https://brew.sh/TestCask.dmg"
homepage 'https://brew.sh/' homepage "https://brew.sh/"
app 'TestCask.app' app "TestCask.app"
end end

View File

@ -1,6 +1,6 @@
cask 'osdn-correct-url-format' do cask "osdn-correct-url-format" do
version '1.2.3' version "1.2.3"
url 'https://user.dl.osdn.jp/something/id/Something-1.2.3.dmg' url "https://user.dl.osdn.jp/something/id/Something-1.2.3.dmg"
homepage 'https://osdn.jp/projects/something/' homepage "https://osdn.jp/projects/something/"
end end

View File

@ -1,6 +1,6 @@
cask 'osdn-incorrect-url-format' do cask "osdn-incorrect-url-format" do
version '1.2.3' version "1.2.3"
url 'https://osdn.jp/projects/something/files/Something-1.2.3.dmg/download' url "https://osdn.jp/projects/something/files/Something-1.2.3.dmg/download"
homepage 'https://osdn.jp/projects/something/' homepage "https://osdn.jp/projects/something/"
end end

View File

@ -1,11 +1,11 @@
cask 'auto-updates' do cask "auto-updates" do
version '2.57' version "2.57"
sha256 '5633c3a0f2e572cbf021507dec78c50998b398c343232bdfc7e26221d0a5db4d' sha256 "5633c3a0f2e572cbf021507dec78c50998b398c343232bdfc7e26221d0a5db4d"
url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyApp.zip" url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyApp.zip"
homepage 'https://brew.sh/MyFancyApp' homepage "https://brew.sh/MyFancyApp"
auto_updates true auto_updates true
app 'MyFancyApp/MyFancyApp.app' app "MyFancyApp/MyFancyApp.app"
end end

View File

@ -1,9 +1,9 @@
cask 'bad-checksum' do cask "bad-checksum" do
version '1.2.2' version "1.2.2"
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,9 +1,9 @@
cask 'bad-checksum2' do cask "bad-checksum2" do
version '1.2.2' version "1.2.2"
sha256 'fab685fabf73d5a9382581ce8698fce9408f5feaa49fa10d9bc6c510493300f5' sha256 "fab685fabf73d5a9382581ce8698fce9408f5feaa49fa10d9bc6c510493300f5"
url "file://#{TEST_FIXTURE_DIR}/cask/container.tar.gz" url "file://#{TEST_FIXTURE_DIR}/cask/container.tar.gz"
homepage 'https://brew.sh/container-tar-gz' homepage "https://brew.sh/container-tar-gz"
app 'container' app "container"
end end

View File

@ -1,9 +1,9 @@
cask 'local-caffeine' do cask "local-caffeine" do
version '1.2.2' version "1.2.2"
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,9 +1,9 @@
cask 'local-transmission' do cask "local-transmission" do
version '2.60' version "2.60"
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

@ -1,10 +1,10 @@
cask 'version-latest' do cask "version-latest" do
version :latest version :latest
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"
end end

View File

@ -1,9 +1,9 @@
cask 'will-fail-if-upgraded' do cask "will-fail-if-upgraded" do
version '1.2.2' version "1.2.2"
sha256 'fab685fabf73d5a9382581ce8698fce9408f5feaa49fa10d9bc6c510493300f5' sha256 "fab685fabf73d5a9382581ce8698fce9408f5feaa49fa10d9bc6c510493300f5"
url "file://#{TEST_FIXTURE_DIR}/cask/container.tar.gz" url "file://#{TEST_FIXTURE_DIR}/cask/container.tar.gz"
homepage 'https://brew.sh/container-tar-gz' homepage "https://brew.sh/container-tar-gz"
app 'container' app "container"
end end

View File

@ -1,9 +1,9 @@
cask 'pkg-without-uninstall' do cask "pkg-without-uninstall" do
version '1.2.3' version "1.2.3"
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b"
url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip" url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage 'https://brew.sh/fancy-pkg' homepage "https://brew.sh/fancy-pkg"
pkg 'Fancy.pkg' pkg "Fancy.pkg"
end end

View File

@ -1,4 +1,4 @@
cask 'sha256-for-empty-string' do cask "sha256-for-empty-string" do
version '1.2.3' version "1.2.3"
sha256 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
end end

View File

@ -1,6 +1,6 @@
cask 'sourceforge-correct-url-format' do cask "sourceforge-correct-url-format" do
version '1.2.3' version "1.2.3"
url 'https://downloads.sourceforge.net/something/Something-1.2.3.dmg' url "https://downloads.sourceforge.net/something/Something-1.2.3.dmg"
homepage 'https://sourceforge.net/projects/something/' homepage "https://sourceforge.net/projects/something/"
end end

View File

@ -1,6 +1,6 @@
cask 'sourceforge-incorrect-url-format' do cask "sourceforge-incorrect-url-format" do
version '1.2.3' version "1.2.3"
url 'https://sourceforge.net/projects/something/files/Something-1.2.3.dmg/download' url "https://sourceforge.net/projects/something/files/Something-1.2.3.dmg/download"
homepage 'https://sourceforge.net/projects/something/' homepage "https://sourceforge.net/projects/something/"
end end

View File

@ -1,6 +1,6 @@
cask 'sourceforge-version-latest-correct-url-format' do cask "sourceforge-version-latest-correct-url-format" do
version :latest version :latest
url 'https://sourceforge.net/projects/something/files/latest/download' url "https://sourceforge.net/projects/something/files/latest/download"
homepage 'https://sourceforge.net/projects/something/' homepage "https://sourceforge.net/projects/something/"
end end

View File

@ -1,7 +1,7 @@
cask 'sourceforge-with-appcast' do cask "sourceforge-with-appcast" do
version '1.2.3' version "1.2.3"
url 'https://downloads.sourceforge.net/something/Something-1.2.3.dmg' url "https://downloads.sourceforge.net/something/Something-1.2.3.dmg"
appcast 'https://sourceforge.net/projects/something/rss' appcast "https://sourceforge.net/projects/something/rss"
homepage 'https://sourceforge.net/projects/something/' homepage "https://sourceforge.net/projects/something/"
end end

View File

@ -1,9 +1,9 @@
cask 'stage-only' do cask "stage-only" do
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/stage-only' homepage "https://brew.sh/stage-only"
stage_only true stage_only true
end end

View File

@ -1,9 +1,9 @@
cask 'test-opera-mail' do cask "test-opera-mail" do
version '1.0' version "1.0"
sha256 'afd192e308f8ea8ddb3d426fd6663d97078570417ee78b8e1fa15f515ae3d677' sha256 "afd192e308f8ea8ddb3d426fd6663d97078570417ee78b8e1fa15f515ae3d677"
url 'https://get-ash-1.opera.com/pub/opera/mail/1.0/mac/Opera-Mail-1.0-1040.i386.dmg' url "https://get-ash-1.opera.com/pub/opera/mail/1.0/mac/Opera-Mail-1.0-1040.i386.dmg"
homepage 'https://www.opera.com/computer/mail' homepage "https://www.opera.com/computer/mail"
app 'Opera Mail.app' app "Opera Mail.app"
end end

View File

@ -1,9 +1,9 @@
cask 'test-opera' do cask "test-opera" do
version '19.0.1326.47' version "19.0.1326.47"
sha256 '7b91f20ab754f7b3fef8dc346e0393917e11676b74c8f577408841619f76040a' sha256 "7b91f20ab754f7b3fef8dc346e0393917e11676b74c8f577408841619f76040a"
url 'https://get.geo.opera.com/pub/opera/desktop/19.0.1326.47/mac/Opera_19.0.1326.47_Setup.dmg' url "https://get.geo.opera.com/pub/opera/desktop/19.0.1326.47/mac/Opera_19.0.1326.47_Setup.dmg"
homepage 'https://www.opera.com/' homepage "https://www.opera.com/"
app 'Opera.app' app "Opera.app"
end end

View File

@ -1,4 +1,4 @@
cask 'version-latest-string' do cask "version-latest-string" do
version 'latest' version "latest"
sha256 :no_check sha256 :no_check
end end

View File

@ -1,4 +1,4 @@
cask 'version-latest-with-checksum' do cask "version-latest-with-checksum" do
version :latest version :latest
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94' sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94"
end end

View File

@ -1,10 +1,10 @@
cask 'version-latest' do cask "version-latest" do
version :latest version :latest
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"
end end

View File

@ -1,9 +1,9 @@
cask 'will-fail-if-upgraded' do cask "will-fail-if-upgraded" do
version '1.2.3' version "1.2.3"
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

@ -1,11 +1,11 @@
cask 'with-allow-untrusted' do cask "with-allow-untrusted" do
version '1.2.3' version "1.2.3"
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b"
url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip" url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage 'https://brew.sh/fancy-pkg' homepage "https://brew.sh/fancy-pkg"
pkg 'Fancy.pkg', allow_untrusted: true pkg "Fancy.pkg", allow_untrusted: true
uninstall pkgutil: 'my.fancy.package.*' uninstall pkgutil: "my.fancy.package.*"
end end

View File

@ -1,9 +1,9 @@
cask 'with-alt-target' do cask "with-alt-target" 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', target: 'AnotherName.app' app "Caffeine.app", target: "AnotherName.app"
end end

View File

@ -1,10 +1,10 @@
cask 'with-appcast' do cask "with-appcast" 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"
appcast 'https://brew.sh/appcast.xml' appcast "https://brew.sh/appcast.xml"
homepage 'https://brew.sh/with-appcast' homepage "https://brew.sh/with-appcast"
app 'Caffeine.app' app "Caffeine.app"
end end

View File

@ -1,12 +1,12 @@
cask 'with-auto-updates' do cask "with-auto-updates" do
version '1.0' version "1.0"
sha256 'e5be907a51cd0d5b128532284afe1c913608c584936a5e55d94c75a9f48c4322' sha256 "e5be907a51cd0d5b128532284afe1c913608c584936a5e55d94c75a9f48c4322"
url "https://brew.sh/autoupdates_#{version}.zip" url "https://brew.sh/autoupdates_#{version}.zip"
name 'AutoUpdates' name "AutoUpdates"
homepage 'https://brew.sh/autoupdates' homepage "https://brew.sh/autoupdates"
auto_updates true auto_updates true
app 'AutoUpdates.app' app "AutoUpdates.app"
end end

View File

@ -1,9 +1,9 @@
cask 'with-autodetected-manpage-section' do cask "with-autodetected-manpage-section" do
version '1.2.3' version "1.2.3"
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94' sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94"
url "file://#{TEST_FIXTURE_DIR}/cask/AppWithManpage.zip" url "file://#{TEST_FIXTURE_DIR}/cask/AppWithManpage.zip"
homepage 'https://brew.sh/with-autodetected-manpage-section' homepage "https://brew.sh/with-autodetected-manpage-section"
manpage 'manpage.1' manpage "manpage.1"
end end

View File

@ -1,10 +1,10 @@
cask 'with-binary' do cask "with-binary" do
version '1.2.3' version "1.2.3"
sha256 'd5b2dfbef7ea28c25f7a77cd7fa14d013d82b626db1d82e00e25822464ba19e2' sha256 "d5b2dfbef7ea28c25f7a77cd7fa14d013d82b626db1d82e00e25822464ba19e2"
url "file://#{TEST_FIXTURE_DIR}/cask/AppWithBinary.zip" url "file://#{TEST_FIXTURE_DIR}/cask/AppWithBinary.zip"
homepage 'https://brew.sh/with-binary' homepage "https://brew.sh/with-binary"
app 'App.app' app "App.app"
binary 'binary' binary "binary"
end end

View File

@ -1,11 +1,11 @@
cask 'with-caveats' do cask "with-caveats" 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"
# simple string is evaluated at compile-time # simple string is evaluated at compile-time
caveats <<~EOS caveats <<~EOS
@ -17,7 +17,7 @@ cask 'with-caveats' do
end end
# a do block may print and use a DSL # a do block may print and use a DSL
caveats do caveats do
puts 'Custom text via puts followed by DSL-generated text:' puts "Custom text via puts followed by DSL-generated text:"
path_environment_variable('/custom/path/bin') path_environment_variable("/custom/path/bin")
end end
end end

View File

@ -1,16 +1,16 @@
cask 'with-choices' do cask "with-choices" do
version '1.2.3' version "1.2.3"
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b"
url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip" url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage 'https://brew.sh/fancy-pkg' homepage "https://brew.sh/fancy-pkg"
pkg 'MyFancyPkg/Fancy.pkg', pkg "MyFancyPkg/Fancy.pkg",
choices: [ choices: [
{ {
'choiceIdentifier' => 'choice1', "choiceIdentifier" => "choice1",
'choiceAttribute' => 'selected', "choiceAttribute" => "selected",
'attributeSetting' => 1, "attributeSetting" => 1,
}, },
] ]
end end

Some files were not shown because too many files have changed in this diff Show More