diff --git a/Library/Homebrew/cask/lib/hbc/audit.rb b/Library/Homebrew/cask/lib/hbc/audit.rb index cddfc5558e..1707598b1c 100644 --- a/Library/Homebrew/cask/lib/hbc/audit.rb +++ b/Library/Homebrew/cask/lib/hbc/audit.rb @@ -255,14 +255,14 @@ module Hbc def check_github_releases_appcast return unless cask.url.to_s =~ %r{github.com/([^/]+)/([^/]+)/releases/download/(\S+)} - add_warning "Cask uses GitHub releases, please add an appcast. See https://github.com/Homebrew/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/appcast.md" + add_warning "Download uses GitHub releases, please add an appcast. See https://github.com/Homebrew/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/appcast.md" end def check_sourceforge_appcast return if cask.version.latest? return unless cask.url.to_s =~ %r{sourceforge.net/(\S+)} - add_warning "Cask hosted on SourceForge, please add an appcast. See https://github.com/Homebrew/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/appcast.md" + add_warning "Download is hosted on SourceForge, please add an appcast. See https://github.com/Homebrew/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/appcast.md" end def check_url diff --git a/Library/Homebrew/test/cask/audit_spec.rb b/Library/Homebrew/test/cask/audit_spec.rb index 8ee7eb95e1..f287d399a7 100644 --- a/Library/Homebrew/test/cask/audit_spec.rb +++ b/Library/Homebrew/test/cask/audit_spec.rb @@ -439,46 +439,46 @@ describe Hbc::Audit, :cask do end describe "GitHub releases appcast check" do - let(:error_msg) { /Cask uses GitHub releases/ } + let(:appcast_warning) { /Download uses GitHub releases/ } - context "when the Cask does not use GitHub releases" do + context "when the download does not use GitHub releases" do let(:cask_token) { "basic-cask" } - it { is_expected.not_to warn_with(error_msg) } + it { is_expected.not_to warn_with(appcast_warning) } end - context "when the Cask uses GitHub releases and has an appcast" do + context "when the download uses GitHub releases and has an appcast" do let(:cask_token) { "github-with-appcast" } - it { is_expected.not_to warn_with(error_msg) } + it { is_expected.not_to warn_with(appcast_warning) } end - context "when the Cask uses GitHub releases and does not have an appcast" do + context "when the download uses GitHub releases and does not have an appcast" do let(:cask_token) { "github-without-appcast" } - it { is_expected.to warn_with(error_msg) } + it { is_expected.to warn_with(appcast_warning) } end end describe "SourceForge appcast check" do - let(:error_msg) { /Cask hosted on SourceForge/ } + let(:appcast_warning) { /Download is hosted on SourceForge/ } - context "when the Cask is not hosted on SourceForge" do + context "when the download is not hosted on SourceForge" do let(:cask_token) { "basic-cask" } - it { is_expected.not_to warn_with(error_msg) } + it { is_expected.not_to warn_with(appcast_warning) } end - context "when the Cask is hosted on SourceForge and has an appcast" do + context "when the download is hosted on SourceForge and has an appcast" do let(:cask_token) { "sourceforge-with-appcast" } - it { is_expected.not_to warn_with(error_msg) } + it { is_expected.not_to warn_with(appcast_warning) } end - context "when the Cask is hosted on SourceForge and does not have an appcast" do + context "when the download is hosted on SourceForge and does not have an appcast" do let(:cask_token) { "sourceforge-correct-url-format" } - it { is_expected.to warn_with(error_msg) } + it { is_expected.to warn_with(appcast_warning) } end end