Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

caplets

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

caplets

  • 1.0.4
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Caplets

Capistrano is old and busted, right? Time to move on? WRONG! Caplets makes capistrano the new hotness once again. It bring capistrano into the future with all your favorite goodies: git, bundler, unicorn, and more.

WARNING: Caplets has evolved out of Mint Digital's real-world deployments of many large Rails/Rack applications. Although we have tried to keep it as generic and customizable as possible, it is still very opinionated. That is to say, it is largely tailored to how we like to deploy applications. If caplets is missing something important to you, submit an issue or fork away.

Quickstart

$ gem install caplets

# config/deploy.rb
require 'caplets'
load 'caplets/memcached'
load 'caplets/whenever'
# etc...

Roles

Caplets depends heavily on capistrano's concept of server roles to apply tasks only to the servers that require them. Most often, your sever definitions will look like this:

server 'app1.mintdigital.com',
  :app, :memcached, :sphinx, :assets,
  :primary => true

Modules

Caplets is a series of loadable capistrano extensions. This given you maximum flexibility in your deployments without having to remember to set/unset loads of capistrano variables. Only the tasks you need get run.

See the MODULES file for descriptions of all the available modules, along with what tasks they add and what variables they use.

caplets/deploy

The one module you will always get, even if you just require caplets/basic is caplets/deploy. This file is the heart of caplets; it sets up the essentials of what caplets considers a modern deployment.

The biggest change to the standard capistrano setup is that we use git to manage releases. Let me say that again as it's important:

** Instead of using subdirectories and symlinks to manage releases, caplets uses git.**

That means:

  • You will not have releases or shared directories.
  • Your code will be directly inside your :deploy_to directory.
  • :current_path, :current_release, :release_path, :latest_release, and :shared_path will all be the same.
  • Rollbacks still work, through the power of git reset
  • "shared" files are really just files written to your project root but not under git version control -- no symlinks needed.

Here are a few other changes that caplets/deploy makes:

  • :use_sudo is false by default
  • :rails_env is replaced with :environment, which caplets expects you to set in your deploy file.
  • :user and :group default to deploy
  • :shared_children is not used. Use :required_children instead.
  • The standard deploy task is disabled. Use deploy:quick to do an deploy:update + deploy:reload. Load caplets/db for caplets' replacement deploy:migrations task.
  • Capistrano's built-in deploy:web:enable and deploy:web:disable are disabled. Load caplets/web for caplets' replacements.

require 'caplets'

Requiring caplets gets you the most common modules in one go. If you don't want them all, you can always require caplets/basic instead.

# config/deploy.rb
require 'caplets'

# Equivalent to...
require 'caplets/basic'
load 'caplets/bundle'
load 'caplets/db'
load 'caplets/logs'
load 'caplets/web'
load 'caplets/yaml'

FAQs

Package last updated on 23 Mar 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc