2015-05-22 11:09:26 +02:00
|
|
|
# Capistrano::Send
|
|
|
|
|
2015-05-26 15:12:39 +02:00
|
|
|
This gem provides some notifiers to send notifications after a deploy with Capistrano.
|
2015-05-22 11:09:26 +02:00
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
Add this line to your application's Gemfile:
|
|
|
|
|
|
|
|
```ruby
|
|
|
|
gem 'capistrano-send'
|
|
|
|
```
|
|
|
|
|
|
|
|
And then execute:
|
|
|
|
|
|
|
|
$ bundle
|
|
|
|
|
2015-05-26 15:12:39 +02:00
|
|
|
## Usage
|
|
|
|
|
|
|
|
Add this line to your `Capfile` to use all notifiers:
|
|
|
|
```ruby
|
|
|
|
require 'capistrano/send/all'
|
|
|
|
```
|
2015-05-22 11:09:26 +02:00
|
|
|
|
2015-05-26 15:12:39 +02:00
|
|
|
### Email
|
2015-05-22 11:09:26 +02:00
|
|
|
|
2015-05-26 15:12:39 +02:00
|
|
|
The `mail` notifier sends an email with some useful informations about the release.
|
|
|
|
|
|
|
|
Add this line to your `Capfile`:
|
|
|
|
```ruby
|
|
|
|
require 'capistrano/send/mail'
|
|
|
|
```
|
|
|
|
|
|
|
|
You must configure the `From` and `To` fields and can configure the delivery method in your `config/deploy.rb`:
|
|
|
|
```ruby
|
|
|
|
set :send_mail, to: 'to@example.org', from: 'from@example.org',
|
|
|
|
via: :smtp, via_options: {address: 'smtp.example.org'}
|
|
|
|
```
|
|
|
|
This notifier uses the [mail](https://github.com/mikel/mail) gem to send emails. Read its documentation for more delivery methods.
|
2015-05-22 11:09:26 +02:00
|
|
|
|
2015-05-26 15:12:39 +02:00
|
|
|
### Libnotify
|
2015-05-22 11:09:26 +02:00
|
|
|
|
2015-05-26 15:12:39 +02:00
|
|
|
The `libnotify` notifier uses `libnotify` to display a notification on your computer.
|
2015-05-22 11:09:26 +02:00
|
|
|
|
2015-05-26 15:12:39 +02:00
|
|
|
To use it, add the [libnotify](https://rubygems.org/gems/libnotify) gem to your Gemfile:
|
|
|
|
```ruby
|
|
|
|
gem 'libnotify'
|
|
|
|
```
|
|
|
|
|
|
|
|
Then add this line to your `Capfile`:
|
|
|
|
```ruby
|
|
|
|
require 'capistrano/send/libnotify'
|
|
|
|
```
|
|
|
|
|
|
|
|
### Notify-send
|
|
|
|
|
|
|
|
The `notify-send` notifier displays a notification on your computer like `libnotify`
|
|
|
|
but does not require the dependency and uses the `notify-send` binary.
|
|
|
|
|
|
|
|
Add this line to your `Capfile`:
|
|
|
|
```ruby
|
|
|
|
require 'capistrano/send/notify-send'
|
|
|
|
```
|