atmos/heaven — pull request #39 by atmos (2014-05-21 23:24:56+00:00)
Title: Capistrano Provider

This supports basic capistrano stuff, I helped a friend setup and deploy a heaven today using it.

This relies on a few things.

* The payload config needs a provider set to `capistrano`
* Only works with capistrano 2.9.x atm
* Supports multiple capistrano deployment tasks via the task attribute on payload. `deploy:migrate` etc.
* Requires an ssh key in the environment `DEPLOYMENT_PRIVATE_KEY` that writes to disk and uses for authentication.
* Requires your `repository` attribute in your capfile to clone over https instead of git+ssh. We use the existing github token to clone over oauth.

An example deployments API payload looks like this.

```javascript
"payload": {
"name": "website",
"task": "deploy",
"hosts": "",
"notify": {
"room": "testing",
"user": "atmos",
"adapter": "slack"
},
"config": {
"provider": "capistrano",
"repository": "myorg/website",
"environments": [
"production"
]
}
}
```

There's a flakey test in here that I'll fix in subsequent PR. I think it was introduced with the octokit 3.1.0 upgrade.