Skip to content

capistrano-unicorn with capistrano 3.x #82

Description

@sepastian

Hi, I have rewritten capistrano-unicorn to work with capistrano 3.x, check out sepastian-capistrano-unicorn.

This is still in an early stage and not at all tested; but I can use it to deploy my projects with capistrano 3.x. Some changes I made:

  • The run command is no longer available; instead, execute (SSHKit) must be used.

    One issue with that was multiline (here-doc) scripts, as used in capistrano-unicorn. Commands will be sanitized by SSHKit before execution. During sanitization, all line breaks will be replaced with semicolons. This, in turn, renders some shell scripts invalid. To overcome this, I did script.split.join(' ').

  • Capistrano 3.x defines a special tasks for loading default settings, namely load:defaults. See also Add a task to load defaults capistrano/capistrano#605. So the contents of config.rb is now in capistrano/tasks/unicorn.cap, inside the load:defaults task.

  • In Capistrano 3.x, set does no longer accept a block. Instead, a Proc must be specified. So set :abc { ... } becomes set :abc, Proc.new{ ... }.

  • defer no longer exists in Capistrano 3.x.

Could you please have a look at this? What are you plans for supporting capistrano 3.x? Thoughts? How about creating a new branch for capistrano 3.x support?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions