diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5bde46ea0e6..abdaa81a63a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,7 +31,7 @@ Making a Cask is easy: a Cask is a small Ruby file. Here’s a Cask for `shuttle` as an example. Note that the `url` stanza uses `#{version}` ([string interpolation](https://en.wikipedia.org/wiki/String_interpolation#Ruby)) to create a Cask that only needs `version` and `sha256` changes when updated. ```ruby -cask :v1 => 'shuttle' do +cask 'shuttle' do version '1.2.5' sha256 '7df182f506b80011222c0cdd470be76e0376f38e331f3fafbb6af9add3578023' @@ -50,7 +50,7 @@ end Here is another Cask for `genymotion`. Note that you may repeat the `app` stanza as many times as you need, to define multiple apps: ```ruby -cask :v1 => 'genymotion' do +cask 'genymotion' do version '2.6.0' sha256 '9d12ae904761d76b15a556262d7eb32d1f5031fe60690224d7b0a70303cf8d39' @@ -74,7 +74,7 @@ end And here is one for `gateblu`. Note that it has an unversioned download (the download `url` does not contain the version number, unlike the example above). It also suppresses the checksum with `sha256 :no_check` (necessary since the checksum will change when a new distribution is made available). This combination of `version :latest` and `sha256 :no_check` is currently the preferred mechanism when a versioned download URL is not available. Also note the comment above `url`, which is needed when [the url and homepage hostnames differ](doc/CASK_LANGUAGE_REFERENCE.md#when-url-and-homepage-hostnames-differ-add-a-comment): ```ruby -cask :v1 => 'gateblu' do +cask 'gateblu' do version :latest sha256 :no_check @@ -120,7 +120,7 @@ $ brew cask create my-new-cask This will open `$EDITOR` with a template for your new Cask, to be stored in the file `my-new-cask.rb`. Running the `create` command above will get you a template that looks like this: ```ruby -cask :v1 => 'my-new-cask' do +cask 'my-new-cask' do version '' sha256 '' @@ -240,7 +240,7 @@ All Casks and code in the homebrew-cask project should be indented using two spa If relevant, you may also use string manipulations to improve the maintainability of your Cask. Here’s an example from `Lynkeos.app`: ```ruby -cask :v1 => 'lynkeos' do +cask 'lynkeos' do version '2.10' sha256 'bd27055c51575555a1c8fe546cf057c57c0e45ea5d252510847277734dc550a4' diff --git a/developer/bin/generate_cask_token b/developer/bin/generate_cask_token index c7c16b19d8c..acc2f84a8eb 100755 --- a/developer/bin/generate_cask_token +++ b/developer/bin/generate_cask_token @@ -382,7 +382,7 @@ def report puts "Proposed Simplified App name: #{simplified_app_name}" if $debug puts "Proposed token: #{cask_token}" puts "Proposed file name: #{cask_file_name}" - puts "Cask Header Line: cask :v1 => '#{cask_token}' do" + puts "Cask Header Line: cask '#{cask_token}' do" if warnings.length > 0 STDERR.puts "\n" STDERR.puts warnings diff --git a/doc/CASK_LANGUAGE_REFERENCE.md b/doc/CASK_LANGUAGE_REFERENCE.md index ee9a83219b9..371145969fc 100644 --- a/doc/CASK_LANGUAGE_REFERENCE.md +++ b/doc/CASK_LANGUAGE_REFERENCE.md @@ -34,7 +34,7 @@ This document acts as a complete specification, and covers aspects of the Cask D Each Cask is a Ruby block, beginning with a special header line. The Cask definition itself is always enclosed in a `do … end` block. Example: ```ruby -cask :v1 => 'alfred' do +cask 'alfred' do version '2.7.1_387' sha256 'a3738d0513d736918a6d71535ef3d85dd184af267c05698e49ac4c6b48f38e17' @@ -877,7 +877,7 @@ Example: [injection.rb](../Casks/injection.rb) In the exceptional case that the Cask DSL is insufficient, it is possible to define arbitrary Ruby variables and methods inside the Cask by creating a `Utils` namespace. Example: ```ruby -cask :v1 => 'myapp' do +cask 'myapp' do module Utils def self.arbitrary_method ... diff --git a/doc/cask_language_deltas.md b/doc/cask_language_deltas.md index 6e0a38cafe7..4aa09ab6740 100644 --- a/doc/cask_language_deltas.md +++ b/doc/cask_language_deltas.md @@ -28,7 +28,7 @@ class MyApp < Cask to ```ruby -cask :v1 => 'my-app' do +cask 'my-app' do ``` Legacy rules for mapping Cask filenames to header class names are no longer needed. The token `'my-app'` in the header corresponds directly to the filename `my-app.rb`. diff --git a/lib/hbc/cli/create.rb b/lib/hbc/cli/create.rb index 7a850490554..19b71a5c5f2 100644 --- a/lib/hbc/cli/create.rb +++ b/lib/hbc/cli/create.rb @@ -25,7 +25,7 @@ class Hbc::CLI::Create < Hbc::CLI::Base def self.template(cask_token) <<-EOS.undent - cask :v1 => '#{cask_token}' do + cask '#{cask_token}' do version '' sha256 '' diff --git a/lib/hbc/source/path_base.rb b/lib/hbc/source/path_base.rb index d8915114b0d..7ba75440eaf 100644 --- a/lib/hbc/source/path_base.rb +++ b/lib/hbc/source/path_base.rb @@ -24,7 +24,7 @@ class Hbc::Source::PathBase # transitional hack: convert first lines of the new form # - # cask :v1 => 'google-chrome' do + # cask 'google-chrome' do # # to the old form # diff --git a/test/cask/cli/create_test.rb b/test/cask/cli/create_test.rb index b963d769e68..d23a68870f6 100644 --- a/test/cask/cli/create_test.rb +++ b/test/cask/cli/create_test.rb @@ -36,7 +36,7 @@ describe Hbc::CLI::Create do Hbc::CLI::Create.run('new-cask') template = File.read(Hbc.path('new-cask')) template.must_equal <<-TEMPLATE.undent - cask :v1 => 'new-cask' do + cask 'new-cask' do version '' sha256 ''