Merge pull request #5059 from commitay/remove-checkpoint
remove appcast checkpoint audit
This commit is contained in:
commit
5024efa506
@ -26,7 +26,6 @@ module Cask
|
|||||||
check_version_and_checksum
|
check_version_and_checksum
|
||||||
check_version
|
check_version
|
||||||
check_sha256
|
check_sha256
|
||||||
check_appcast_checkpoint
|
|
||||||
check_url
|
check_url
|
||||||
check_generic_artifacts
|
check_generic_artifacts
|
||||||
check_token_conflicts
|
check_token_conflicts
|
||||||
@ -214,13 +213,6 @@ module Cask
|
|||||||
add_error "cannot use the sha256 for an empty string in #{stanza}: #{empty_sha256}"
|
add_error "cannot use the sha256 for an empty string in #{stanza}: #{empty_sha256}"
|
||||||
end
|
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
|
def check_latest_with_appcast
|
||||||
return unless cask.version.latest?
|
return unless cask.version.latest?
|
||||||
return unless cask.appcast
|
return unless cask.appcast
|
||||||
|
|||||||
@ -1,12 +1,11 @@
|
|||||||
module Cask
|
module Cask
|
||||||
class DSL
|
class DSL
|
||||||
class Appcast
|
class Appcast
|
||||||
attr_reader :uri, :checkpoint, :parameters
|
attr_reader :uri, :parameters
|
||||||
|
|
||||||
def initialize(uri, **parameters)
|
def initialize(uri, **parameters)
|
||||||
@uri = URI(uri)
|
@uri = URI(uri)
|
||||||
@parameters = parameters
|
@parameters = parameters
|
||||||
@checkpoint = parameters[:checkpoint]
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_yaml
|
def to_yaml
|
||||||
|
|||||||
@ -317,22 +317,6 @@ describe Cask::Audit, :cask do
|
|||||||
end
|
end
|
||||||
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
|
describe "hosting with appcast checks" do
|
||||||
let(:appcast_warning) { /please add an appcast/ }
|
let(:appcast_warning) { /please add an appcast/ }
|
||||||
|
|
||||||
|
|||||||
@ -21,13 +21,5 @@ describe Cask::DSL::Appcast do
|
|||||||
expect(subject.to_yaml).to eq(yaml)
|
expect(subject.to_yaml).to eq(yaml)
|
||||||
end
|
end
|
||||||
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
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,4 +0,0 @@
|
|||||||
cask 'appcast-with-checkpoint' do
|
|
||||||
appcast 'https://localhost/appcast.xml',
|
|
||||||
checkpoint: 'd5b2dfbef7ea28c25f7a77cd7fa14d013d82b626db1d82e00e25822464ba19e2'
|
|
||||||
end
|
|
||||||
Loading…
x
Reference in New Issue
Block a user