Skip to content

Commit

Permalink
Add tip on string manipulation when writing a Cask
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaudcolas committed Apr 28, 2015
1 parent ab5bad4 commit 4d10d41
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,26 @@ Example:
app 'TexmakerMacosxLion/texmaker.app'
```

### Indenting
### Style guide

All Casks and code in the homebrew-cask project should be indented using two
spaces (never tabs).

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
version '2.10'
sha256 'bd27055c51575555a1c8fe546cf057c57c0e45ea5d252510847277734dc550a4'

url "http://downloads.sourceforge.net/project/lynkeos/lynkeos/#{version}/Lynkeos-App-#{version.gsub('.', '-')}.zip"
name 'Lynkeos'
homepage 'http://lynkeos.sourceforge.net/'
license :gpl

app "Lynkeos-App-#{version.gsub('.', '-')}/Lynkeos.app"
end
```

## Testing Your New Cask

Expand Down

0 comments on commit 4d10d41

Please sign in to comment.