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
brew tap homebrew/cask
brew update-reset Library/Taps/homebrew/homebrew-cask
# don't care about `brew cask style` here.
brew untap adoptopenjdk/openjdk
else
# Fix permissions for 'brew tests'
sudo chmod -R g-w,o-w /home/linuxbrew /home/runner /opt
@ -159,6 +162,10 @@ jobs:
- name: Run brew style on official taps
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
run: |
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
FormulaAudit:
@ -8,9 +16,108 @@ FormulaAudit:
FormulaAuditStrict:
Enabled: true
# enable all pending rubocops
AllCops:
NewCops: enable
# 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
# don't allow cops to be disabled in formulae
Style/DisableCopsWithinSourceCodeDirective:
@ -54,6 +161,7 @@ Lint/AmbiguousRegexpLiteral:
Lint/ParenthesesAsGroupedExpression:
Enabled: false
# most metrics don't make sense to apply for formulae/taps
Metrics/AbcSize:
Enabled: false
@ -72,7 +180,15 @@ Metrics/PerceivedComplexity:
Layout/LineLength:
Max: 118
# 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
Style/Documentation:
@ -82,26 +198,18 @@ Style/Documentation:
Style/FrozenStringLiteralComment:
Enabled: false
# TODO: remove this when possible.
Style/GlobalVars:
Exclude:
- '**/developer/bin/*'
# potential for errors in formulae too high with this
Style/GuardClause:
Enabled: false
# depends_on a: :b looks weird in formulae.
# avoid hash rockets where possible
Style/HashSyntax:
EnforcedStyle: hash_rockets
Exclude:
- '**/Guardfile'
- '**/cmd/**/*.rb'
- '**/lib/**/*.rb'
- '**/spec/**/*.rb'
# autocorrectable and more readable
Style/HashEachMethods:
Enabled: true
Style/HashTransformKeys:
Enabled: true
Style/HashTransformValues:
Enabled: true
EnforcedStyle: ruby19
# ruby style guide favorite
Style/StringLiterals:
@ -118,3 +226,11 @@ Style/TernaryParentheses:
# a bit confusing to non-Rubyists but useful for longer arrays
Style/WordArray:
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:
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
Exclude:
- '**/test/support/fixtures/cask/Casks/**/*.rb'
Cask/HomepageUrlTrailingSlash:
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'
Enabled: true
Layout/HashAlignment:
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.
# don't want this for casks but re-enabled for Library/Homebrew
Style/FrozenStringLiteralComment:
EnforcedStyle: never
# 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
Enabled: false

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'
Exclude:
- 'bin/*'
- '**/Casks/**/*'
- '**/vendor/**/*'
# messes up system formatting for formulae but good for Homebrew/brew
@ -35,10 +34,6 @@ Lint/NestedMethodDefinition:
Lint/ParenthesesAsGroupedExpression:
Enabled: true
# unused keyword arguments improve APIs
Lint/UnusedMethodArgument:
AllowUnusedKeywordArguments: true
# TODO: try to bring down all metrics maximums
Metrics/AbcSize:
Enabled: true
@ -113,10 +108,7 @@ Style/BlockDelimiters:
# don't group nicely documented or private attr_readers
Style/AccessorGrouping:
Enabled: true
Exclude:
- 'cask/cmd/internal_stanza.rb'
- 'cask/download.rb'
- 'formula.rb'
- 'formulary.rb'
- 'migrator.rb'
@ -124,11 +116,6 @@ Style/AccessorGrouping:
- 'system_command.rb'
- 'tap.rb'
# https://github.com/rubocop-hq/rubocop/issues/8257
Style/BisectedAttrAccessor:
Exclude:
- 'cask/url.rb'
# document our public APIs
Style/Documentation:
Enabled: true
@ -143,19 +130,9 @@ Style/DocumentationMethod:
Style/FrozenStringLiteralComment:
Enabled: true
EnforcedStyle: always
Exclude:
- '**/Casks/**/*.rb'
# so many of these in formulae but none in here
Style/GuardClause:
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 "--inspect", :inspect, false
attr_accessor :format
attr_accessor :format, :stanza
private :format, :format=
attr_accessor :stanza
private :stanza, :stanza=
def initialize(*)

View File

@ -19,7 +19,7 @@ module Homebrew
switch "--aliases",
description: "Verify any alias symlinks in each tap."
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 :debug
end
@ -28,7 +28,7 @@ module Homebrew
def readall
readall_args.parse
if args.syntax?
if args.syntax? && args.no_named?
scan_files = "#{HOMEBREW_LIBRARY_PATH}/**/*.rb"
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
# `# example.com was verified as official when first introduced to the cask`
# is present.
class HomepageMatchesUrl < Cop # rubocop:disable Metrics/ClassLength
class HomepageMatchesUrl < Cop
extend Forwardable
include CaskHelp
@ -134,7 +134,13 @@ module RuboCop
def url_match_homepage?(stanza)
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_uri.host}:#{host_uri.port}"
else

View File

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

View File

@ -15,14 +15,16 @@ describe Cask::Cmd::Style, :cask do
around do |example|
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_shared.yml", HOMEBREW_LIBRARY/".rubocop_shared.yml"
FileUtils.ln_s HOMEBREW_LIBRARY_PATH.parent/".rubocop_rspec.yml", HOMEBREW_LIBRARY/".rubocop_rspec.yml"
example.run
ensure
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_shared.yml"
FileUtils.rm_f HOMEBREW_LIBRARY/".rubocop_rspec.yml"
end
before do

View File

@ -6,7 +6,7 @@ describe "Homebrew.readall_args" do
it_behaves_like "parseable arguments"
end
describe "brew readall", :integration_test, timeout: 240 do
describe "brew readall", :integration_test do
it "imports all Formulae for a given Tap" do
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
expect { brew "readall", "--aliases", "--syntax" }
expect { brew "readall", "--aliases", "--syntax", CoreTap.instance.name }
.to be_a_success
.and not_to_output.to_stdout
.and not_to_output.to_stderr

View File

@ -7,41 +7,16 @@ describe FormulaInfo, :integration_test do
it "tests the FormulaInfo class" do
install_test_formula "testball"
expect(
described_class.lookup(Formula["testball"].path)
.revision,
).to eq(0)
info = described_class.lookup(Formula["testball"].path)
expect(info).not_to be_nil
expect(info.revision).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(
described_class.lookup(Formula["testball"].path)
.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))
version = info.version(:stable)
expect(info.pkg_version).to eq(PkgVersion.new(version, 0))
end
end

View File

@ -6,13 +6,11 @@ describe Homebrew::Style do
around do |example|
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_shared.yml", HOMEBREW_LIBRARY/".rubocop_shared.yml"
example.run
ensure
FileUtils.rm_f HOMEBREW_LIBRARY/"Homebrew"
FileUtils.rm_f HOMEBREW_LIBRARY/".rubocop.yml"
FileUtils.rm_f HOMEBREW_LIBRARY/".rubocop_shared.yml"
end
before do

View File

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

View File

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

View File

@ -1,9 +1,9 @@
cask 'appdir-interpolation' do
version '2.61'
sha256 'e44ffa103fbf83f55c8d0b1bea309a43b2880798dae8620b1ee8da5e1095ec68'
cask "appdir-interpolation" do
version "2.61"
sha256 "e44ffa103fbf83f55c8d0b1bea309a43b2880798dae8620b1ee8da5e1095ec68"
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"
end

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,11 +1,11 @@
cask 'with-depends-on-macos-string' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
cask "with-depends-on-macos-string" do
version "1.2.3"
sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94"
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
app 'Caffeine.app'
app "Caffeine.app"
end

View File

@ -1,11 +1,11 @@
cask 'container-7z' do
version '1.2.3'
sha256 '3f9542ace85ed5f88549e2d0ea82210f8ddc87e0defbb78469d3aed719b3c964'
cask "container-7z" do
version "1.2.3"
sha256 "3f9542ace85ed5f88549e2d0ea82210f8ddc87e0defbb78469d3aed719b3c964"
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

View File

@ -1,9 +1,9 @@
cask 'container-bzip2' do
version '1.2.3'
sha256 'eaf67b3a62cb9275f96e45d05c70b94bef9ef1dae344083e93eda6b0b388a61c'
cask "container-bzip2" do
version "1.2.3"
sha256 "eaf67b3a62cb9275f96e45d05c70b94bef9ef1dae344083e93eda6b0b388a61c"
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

View File

@ -1,11 +1,11 @@
cask 'container-cab' do
version '1.2.3'
sha256 'c267f5cebb14814c8e612a8b7d2bda02aec913f869509b6f1d3883427c0f552b'
cask "container-cab" do
version "1.2.3"
sha256 "c267f5cebb14814c8e612a8b7d2bda02aec913f869509b6f1d3883427c0f552b"
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

View File

@ -1,9 +1,9 @@
cask 'container-dmg' do
version '1.2.3'
sha256 '74d89d4fa5cef175cf43666ce11fefa3741aa1522114042ac75e656be37141a1'
cask "container-dmg" do
version "1.2.3"
sha256 "74d89d4fa5cef175cf43666ce11fefa3741aa1522114042ac75e656be37141a1"
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

View File

@ -1,9 +1,9 @@
cask 'container-gzip' do
version '1.2.3'
sha256 'fa4ebb5246583c4b6e62e1df4e3b71b4e38a1d7d91c025665827195d36214b20'
cask "container-gzip" do
version "1.2.3"
sha256 "fa4ebb5246583c4b6e62e1df4e3b71b4e38a1d7d91c025665827195d36214b20"
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

View File

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

View File

@ -1,9 +1,9 @@
cask 'container-tar-gz' do
version '1.2.3'
sha256 'fab685fabf73d5a9382581ce8698fce9408f5feaa49fa10d9bc6c510493300f5'
cask "container-tar-gz" do
version "1.2.3"
sha256 "fab685fabf73d5a9382581ce8698fce9408f5feaa49fa10d9bc6c510493300f5"
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

View File

@ -1,9 +1,9 @@
cask 'container-xar' do
version '1.2.3'
sha256 '5bb8e09a6fc630ebeaf266b1fd2d15e2ae7d32d7e4da6668a8093426fa1ba509'
cask "container-xar" do
version "1.2.3"
sha256 "5bb8e09a6fc630ebeaf266b1fd2d15e2ae7d32d7e4da6668a8093426fa1ba509"
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

View File

@ -1,12 +1,12 @@
cask 'devmate-with-appcast' do
version '1.0'
sha256 'a69e7357bea014f4c14ac9699274f559086844ffa46563c4619bf1addfd72ad9'
cask "devmate-with-appcast" do
version "1.0"
sha256 "a69e7357bea014f4c14ac9699274f559086844ffa46563c4619bf1addfd72ad9"
# 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"
appcast 'https://updates.devmate.com/com.my.fancyapp.app.xml'
name 'DevMate'
homepage 'https://www.brew.sh/'
appcast "https://updates.devmate.com/com.my.fancyapp.app.xml"
name "DevMate"
homepage "https://www.brew.sh/"
app 'DevMate.app'
app "DevMate.app"
end

View File

@ -1,11 +1,11 @@
cask 'devmate-without-appcast' do
version '1.0'
sha256 'a69e7357bea014f4c14ac9699274f559086844ffa46563c4619bf1addfd72ad9'
cask "devmate-without-appcast" do
version "1.0"
sha256 "a69e7357bea014f4c14ac9699274f559086844ffa46563c4619bf1addfd72ad9"
# 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"
name 'DevMate'
homepage 'https://www.brew.sh/'
name "DevMate"
homepage "https://www.brew.sh/"
app 'DevMate.app'
app "DevMate.app"
end

View File

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

View File

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

View File

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

View File

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

View File

@ -1,12 +1,12 @@
cask 'hockeyapp-with-appcast' do
version '1.0,123'
sha256 'a69e7357bea014f4c14ac9699274f559086844ffa46563c4619bf1addfd72ad9'
cask "hockeyapp-with-appcast" do
version "1.0,123"
sha256 "a69e7357bea014f4c14ac9699274f559086844ffa46563c4619bf1addfd72ad9"
# 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"
appcast 'https://rink.hockeyapp.net/api/2/apps/67503a7926431872c4b6c1549f5bd6b1'
name 'HockeyApp'
homepage 'https://www.brew.sh/'
appcast "https://rink.hockeyapp.net/api/2/apps/67503a7926431872c4b6c1549f5bd6b1"
name "HockeyApp"
homepage "https://www.brew.sh/"
app 'HockeyApp.app'
app "HockeyApp.app"
end

View File

@ -1,11 +1,11 @@
cask 'hockeyapp-without-appcast' do
version '1.0,123'
sha256 'a69e7357bea014f4c14ac9699274f559086844ffa46563c4619bf1addfd72ad9'
cask "hockeyapp-without-appcast" do
version "1.0,123"
sha256 "a69e7357bea014f4c14ac9699274f559086844ffa46563c4619bf1addfd72ad9"
# 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"
name 'HockeyApp'
homepage 'https://www.brew.sh/'
name "HockeyApp"
homepage "https://www.brew.sh/"
app 'HockeyApp.app'
app "HockeyApp.app"
end

View File

@ -1,11 +1,11 @@
cask 'installer-with-uninstall' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
cask "installer-with-uninstall" do
version "1.2.3"
sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94"
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

View File

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

View File

@ -1,11 +1,11 @@
cask 'invalid-appcast-multiple' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
cask "invalid-appcast-multiple" do
version "1.2.3"
sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94"
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
appcast 'https://brew.sh/appcast1.xml'
appcast 'https://brew.sh/appcast2.xml'
homepage 'https://brew.sh/invalid-appcast-multiple'
appcast "https://brew.sh/appcast1.xml"
appcast "https://brew.sh/appcast2.xml"
homepage "https://brew.sh/invalid-appcast-multiple"
app 'Caffeine.app'
app "Caffeine.app"
end

View File

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

View File

@ -1,11 +1,11 @@
cask 'invalid-conflicts-with-key' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
cask "invalid-conflicts-with-key" do
version "1.2.3"
sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94"
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

View File

@ -1,11 +1,11 @@
cask 'invalid-depends-on-arch-value' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
cask "invalid-depends-on-arch-value" do
version "1.2.3"
sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94"
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
app 'Caffeine.app'
app "Caffeine.app"
end

View File

@ -1,11 +1,11 @@
cask 'invalid-depends-on-key' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
cask "invalid-depends-on-key" do
version "1.2.3"
sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94"
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

View File

@ -1,11 +1,11 @@
cask 'invalid-depends-on-macos-bad-release' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
cask "invalid-depends-on-macos-bad-release" do
version "1.2.3"
sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94"
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
app 'Caffeine.app'
app "Caffeine.app"
end

View File

@ -1,11 +1,11 @@
cask 'invalid-depends-on-x11-value' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
cask "invalid-depends-on-x11-value" do
version "1.2.3"
sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94"
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
app 'Caffeine.app'
app "Caffeine.app"
end

View File

@ -1,9 +1,9 @@
cask 'invalid-generic-artifact-no-target' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
cask "invalid-generic-artifact-no-target" do
version "1.2.3"
sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94"
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

View File

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

View File

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

View File

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

View File

@ -1,9 +1,9 @@
cask 'invalid-manpage-no-section' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
cask "invalid-manpage-no-section" do
version "1.2.3"
sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94"
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

View File

@ -1,10 +1,10 @@
cask 'invalid-stage-only-conflict' do
version '2.61'
sha256 'e44ffa103fbf83f55c8d0b1bea309a43b2880798dae8620b1ee8da5e1095ec68'
cask "invalid-stage-only-conflict" do
version "2.61"
sha256 "e44ffa103fbf83f55c8d0b1bea309a43b2880798dae8620b1ee8da5e1095ec68"
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
end

View File

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

View File

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

View File

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

View File

@ -1,10 +1,10 @@
cask 'latest-with-appcast' do
cask "latest-with-appcast" do
version :latest
sha256 :no_check
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
appcast 'https://brew.sh/appcast.xml'
homepage 'https://brew.sh/with-appcast'
appcast "https://brew.sh/appcast.xml"
homepage "https://brew.sh/with-appcast"
app 'Caffeine.app'
app "Caffeine.app"
end

View File

@ -1,11 +1,11 @@
cask 'latest-with-auto-updates' do
cask "latest-with-auto-updates" do
version :latest
sha256 :no_check
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
app 'Caffeine.app'
app "Caffeine.app"
end

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,11 +1,11 @@
cask 'nested-app' do
version '1.2.3'
sha256 '1866dfa833b123bb8fe7fa7185ebf24d28d300d0643d75798bc23730af734216'
cask "nested-app" do
version "1.2.3"
sha256 "1866dfa833b123bb8fe7fa7185ebf24d28d300d0643d75798bc23730af734216"
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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,9 +1,9 @@
cask 'bad-checksum2' do
version '1.2.2'
sha256 'fab685fabf73d5a9382581ce8698fce9408f5feaa49fa10d9bc6c510493300f5'
cask "bad-checksum2" do
version "1.2.2"
sha256 "fab685fabf73d5a9382581ce8698fce9408f5feaa49fa10d9bc6c510493300f5"
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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,9 +1,9 @@
cask 'pkg-without-uninstall' do
version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
cask "pkg-without-uninstall" do
version "1.2.3"
sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b"
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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
cask 'sourceforge-incorrect-url-format' do
version '1.2.3'
cask "sourceforge-incorrect-url-format" do
version "1.2.3"
url 'https://sourceforge.net/projects/something/files/Something-1.2.3.dmg/download'
homepage 'https://sourceforge.net/projects/something/'
url "https://sourceforge.net/projects/something/files/Something-1.2.3.dmg/download"
homepage "https://sourceforge.net/projects/something/"
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
url 'https://sourceforge.net/projects/something/files/latest/download'
homepage 'https://sourceforge.net/projects/something/'
url "https://sourceforge.net/projects/something/files/latest/download"
homepage "https://sourceforge.net/projects/something/"
end

View File

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

View File

@ -1,9 +1,9 @@
cask 'stage-only' do
version '2.61'
sha256 'e44ffa103fbf83f55c8d0b1bea309a43b2880798dae8620b1ee8da5e1095ec68'
cask "stage-only" do
version "2.61"
sha256 "e44ffa103fbf83f55c8d0b1bea309a43b2880798dae8620b1ee8da5e1095ec68"
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
end

View File

@ -1,9 +1,9 @@
cask 'test-opera-mail' do
version '1.0'
sha256 'afd192e308f8ea8ddb3d426fd6663d97078570417ee78b8e1fa15f515ae3d677'
cask "test-opera-mail" do
version "1.0"
sha256 "afd192e308f8ea8ddb3d426fd6663d97078570417ee78b8e1fa15f515ae3d677"
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'
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"
app 'Opera Mail.app'
app "Opera Mail.app"
end

View File

@ -1,9 +1,9 @@
cask 'test-opera' do
version '19.0.1326.47'
sha256 '7b91f20ab754f7b3fef8dc346e0393917e11676b74c8f577408841619f76040a'
cask "test-opera" do
version "19.0.1326.47"
sha256 "7b91f20ab754f7b3fef8dc346e0393917e11676b74c8f577408841619f76040a"
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/'
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/"
app 'Opera.app'
app "Opera.app"
end

View File

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

View File

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

View File

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

View File

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

View File

@ -1,11 +1,11 @@
cask 'with-allow-untrusted' do
version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
cask "with-allow-untrusted" do
version "1.2.3"
sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b"
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

View File

@ -1,9 +1,9 @@
cask 'with-alt-target' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
cask "with-alt-target" do
version "1.2.3"
sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94"
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

View File

@ -1,10 +1,10 @@
cask 'with-appcast' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
cask "with-appcast" do
version "1.2.3"
sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94"
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
appcast 'https://brew.sh/appcast.xml'
homepage 'https://brew.sh/with-appcast'
appcast "https://brew.sh/appcast.xml"
homepage "https://brew.sh/with-appcast"
app 'Caffeine.app'
app "Caffeine.app"
end

View File

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

View File

@ -1,9 +1,9 @@
cask 'with-autodetected-manpage-section' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
cask "with-autodetected-manpage-section" do
version "1.2.3"
sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94"
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

View File

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

View File

@ -1,11 +1,11 @@
cask 'with-caveats' do
version '1.2.3'
sha256 '67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94'
cask "with-caveats" do
version "1.2.3"
sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94"
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
caveats <<~EOS
@ -17,7 +17,7 @@ cask 'with-caveats' do
end
# a do block may print and use a DSL
caveats do
puts 'Custom text via puts followed by DSL-generated text:'
path_environment_variable('/custom/path/bin')
puts "Custom text via puts followed by DSL-generated text:"
path_environment_variable("/custom/path/bin")
end
end

View File

@ -1,16 +1,16 @@
cask 'with-choices' do
version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
cask "with-choices" do
version "1.2.3"
sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b"
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: [
{
'choiceIdentifier' => 'choice1',
'choiceAttribute' => 'selected',
'attributeSetting' => 1,
},
]
{
"choiceIdentifier" => "choice1",
"choiceAttribute" => "selected",
"attributeSetting" => 1,
},
]
end

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