sosedoff/capistrano-unicorn — pull request #43 by BMorearty (2013-01-25 00:54:25+00:00)
Title: Ability to launch Unicorn as a different user than the deployer

With this change, capistrano-unicorn can run Unicorn master (and there Unicorn slaves) as a different user than the deployer.

Sometimes people prefer to use a privileged user for deploying apps and a less-privileged user for running apps. With this change, they can. Here's how:

```ruby
set :unicorn_runner, true # Run Unicorn as the :runner user ("app" by default)
set :use_sudo, true # So deployer can launch Unicorn as the :runner user
# set :runner, "web" # Optionally override Capistrano's :runner variable
```

This feature relies on Capistrano's existing `:runner` setting, which is the name of the user who will be running the web app. It defaults to `"app"` but can be overridden with `set :runner, "username"`.

Or you can use a string to choose which user rather than relying on Capistrano's `:runner`:

```ruby
set :unicorn_runner, "web" # Run Unicorn as the "web" user
set :use_sudo, true # So deployer can launch Unicorn as the :runner user
```

The new `unicorn_runner` setting defaults to `false`, keeping is the existing behavior of capistrano-unicorn.

Resolves issue sosedoff/capistrano-unicorn#22.