Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Uses a maitre_d server to reserve time on deploy environments
Ruby
tag: v0.1.0

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
Gemfile
LICENSE
README.md
Rakefile
cap_reserve.gemspec

README.md

CapReserve

Uses a maitre_d server to reserve time on deploy environments.

Requirements

gem install cap_reserve

Setup

You must have a maitre_d server running first.

deploy.rb

require 'cap_reserve'

task :setup_reserve do
  ENV['RESERVE_ENV'] = 'staging'
  ENV['RESERVE_URL'] = 'http://localhost:3000'
  reserve
end

before "deploy", "setup_reserve"

Use It

Reserve your environment for 10 minutes:

cap deploy RESERVE=10

Force the deploy even if reserved:

cap deploy FORCE=1

How it Works

The reserve cap task looks for the following ENV variables:

ENV['FORCE']        # Force deploy
ENV['RESERVE']      # Minutes to reserve environment
ENV['RESERVE_ENV']  # Name of deploy environment
ENV['RESERVE_URL']  # URL to your maitre_d server
ENV['USER']         # Name of user

In the example above, we use the setup_reserve cap task to set up these variables.

Something went wrong with that request. Please try again.