diff --git a/doc/CASK_LANGUAGE_REFERENCE.md b/doc/CASK_LANGUAGE_REFERENCE.md index 5189e938c5de7..d73f48c3c29de 100644 --- a/doc/CASK_LANGUAGE_REFERENCE.md +++ b/doc/CASK_LANGUAGE_REFERENCE.md @@ -95,8 +95,7 @@ Each Cask must declare one or more *artifacts* (i.e. something to install) ## Legacy Stanzas -The following stanzas may be seen in current use but are deprecated -and slated for retirement. +The following stanzas are no longer in use. | name | multiple occurrences allowed? | meaning | | ------------------ |------------------------------ | ----------- | @@ -169,8 +168,8 @@ And the following methods may be useful for interpolation: ## Checksum Stanza Details -Older Casks may still use `no_checksum` stanzas. This is OK, but new -Casks and updates should adopt `sha256 :no_check`. +Casks should no longer use `no_checksum` stanzas. That form has +been superseded by `sha256 :no_check`. ## URL Stanza Details diff --git a/lib/cask/dsl.rb b/lib/cask/dsl.rb index 555e1577eb358..fd182333f3e7b 100644 --- a/lib/cask/dsl.rb +++ b/lib/cask/dsl.rb @@ -140,10 +140,6 @@ def hash_name(hash_type) end def sha256(sha2=nil) - # @@@ todo remove this after deleting support for legacy no_checksum stanza - if @sums == :no_check - raise CaskInvalidError.new(self.title, "'no_checksum' stanza conflicts with 'sha256'") - end if sha2 == :no_check @sums = sha2 else @@ -152,14 +148,6 @@ def sha256(sha2=nil) end end - # @@@ todo remove support for no_checksum stanza - def no_checksum - unless @sums.nil? or @sums.empty? - raise CaskInvalidError.new(self.title, "'no_checksum' stanza conflicts with '#{hash_name(@sums.first.hash_type)}'") - end - @sums = :no_check - end - def method_missing(method, *args) poo = <<-EOPOO.undent Unexpected method '#{method}' called on #{self}. diff --git a/test/cask/dsl_test.rb b/test/cask/dsl_test.rb index 438cb238c21f6..fb5ef69f42ffb 100644 --- a/test/cask/dsl_test.rb +++ b/test/cask/dsl_test.rb @@ -109,20 +109,4 @@ def caveats; <<-EOS.undent }.must_raise(CaskInvalidError) err.message.must_include "'version' stanza may only appear once" end - - # @@@ todo this test can be removed when support for no_checksum is dropped - it "prevents defining conflicting checksums (first order)" do - err = lambda { - invalid_cask = Cask.load('invalid/invalid-checksum-conflict1') - }.must_raise(CaskInvalidError) - err.message.must_include "'no_checksum' stanza conflicts with" - end - - # @@@ todo this test can be removed when support for no_checksum is dropped - it "prevents defining conflicting checksums (second order)" do - err = lambda { - invalid_cask = Cask.load('invalid/invalid-checksum-conflict2') - }.must_raise(CaskInvalidError) - err.message.must_include "'no_checksum' stanza conflicts with" - end end diff --git a/test/support/Casks/invalid/invalid-checksum-conflict1.rb b/test/support/Casks/invalid/invalid-checksum-conflict1.rb deleted file mode 100644 index 3187c434546a4..0000000000000 --- a/test/support/Casks/invalid/invalid-checksum-conflict1.rb +++ /dev/null @@ -1,9 +0,0 @@ -class InvalidChecksumConflict1 < TestCask - # @@@ todo this test cask can be removed when support for no_checksum is dropped - url TestHelper.local_binary('caffeine.zip') - homepage 'http://example.com/local-caffeine' - version '1.2.3' - sha256 '9203c30951f9aab41ac294bbeb1dcef7bed401ff0b353dcb34d68af32ea51853' - no_checksum - link 'Caffeine.app' -end diff --git a/test/support/Casks/invalid/invalid-checksum-conflict2.rb b/test/support/Casks/invalid/invalid-checksum-conflict2.rb deleted file mode 100644 index ee31f86190c7e..0000000000000 --- a/test/support/Casks/invalid/invalid-checksum-conflict2.rb +++ /dev/null @@ -1,9 +0,0 @@ -class InvalidChecksumConflict2 < TestCask - # @@@ todo this test cask can be removed when support for no_checksum is dropped - url TestHelper.local_binary('caffeine.zip') - homepage 'http://example.com/local-caffeine' - version '1.2.3' - no_checksum - sha256 '9203c30951f9aab41ac294bbeb1dcef7bed401ff0b353dcb34d68af32ea51853' - link 'Caffeine.app' -end