Merge pull request #5059 from commitay/remove-checkpoint

remove appcast checkpoint audit
This commit is contained in:
commitay 2018-10-09 15:21:24 +10:00 committed by GitHub
commit 5024efa506
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 1 additions and 38 deletions

View File

@ -26,7 +26,6 @@ module Cask
check_version_and_checksum
check_version
check_sha256
check_appcast_checkpoint
check_url
check_generic_artifacts
check_token_conflicts
@ -214,13 +213,6 @@ module Cask
add_error "cannot use the sha256 for an empty string in #{stanza}: #{empty_sha256}"
end
def check_appcast_checkpoint
return unless cask.appcast
return unless cask.appcast.checkpoint
add_error "Appcast checkpoints have been removed from Homebrew Cask"
end
def check_latest_with_appcast
return unless cask.version.latest?
return unless cask.appcast

View File

@ -1,12 +1,11 @@
module Cask
class DSL
class Appcast
attr_reader :uri, :checkpoint, :parameters
attr_reader :uri, :parameters
def initialize(uri, **parameters)
@uri = URI(uri)
@parameters = parameters
@checkpoint = parameters[:checkpoint]
end
def to_yaml

View File

@ -317,22 +317,6 @@ describe Cask::Audit, :cask do
end
end
describe "appcast checkpoint check" do
let(:error_msg) { "Appcast checkpoints have been removed from Homebrew Cask" }
context "when the Cask does not have a checkpoint" do
let(:cask_token) { "with-appcast" }
it { is_expected.not_to fail_with(error_msg) }
end
context "when the Cask has a checkpoint" do
let(:cask_token) { "appcast-with-checkpoint" }
it { is_expected.to fail_with(error_msg) }
end
end
describe "hosting with appcast checks" do
let(:appcast_warning) { /please add an appcast/ }

View File

@ -21,13 +21,5 @@ describe Cask::DSL::Appcast do
expect(subject.to_yaml).to eq(yaml)
end
end
context "with checkpoint in parameters" do
let(:params) { { checkpoint: "abc123" } }
it "returns an YAML serialized array composed of the URI and parameters" do
expect(subject.to_yaml).to eq(yaml)
end
end
end
end

View File

@ -1,4 +0,0 @@
cask 'appcast-with-checkpoint' do
appcast 'https://localhost/appcast.xml',
checkpoint: 'd5b2dfbef7ea28c25f7a77cd7fa14d013d82b626db1d82e00e25822464ba19e2'
end