Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Capistrano tasks to work with production data and assets
Ruby
tree: 22c4c511d6

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib/capistrano
.gitignore
MIT-LICENSE
README.rdoc
Rakefile
capistrano_transmit.gemspec

README.rdoc

Capistrano Transmit

Rails tasks to work with production data and assets.

This Ruby on Rails plugin allows you to fetch the production database and assets and store them in your local development environment. For reasonably sized projects, you should do this regularly since you will notice typical production-related slowdowns such as missing indexes. The task to fetch assets helps keep your images un-broken, which is always nice.

The only thing this plugin does, is extend Capistrano. No Rails code is loaded. Capistrano loads the scripts in the recipes directory, and that's just what we need.

The plugin uses rsync to transfer the files, which means any existing files are skipped and/or appended based on their checksum. The transfers are compressed as well so we don't need to gzip the contents first. All this assumes both your production and development environment are Unix. Tested on Linux production and Mac OS X development.

Installation

ruby script/plugin install git://github.com/tilsammans/capistrano_transmit.git

or in your Gemfile:

gem 'capistrano_transmit'

Then add to your deploy.rb:

require 'capistrano/transmit'

Examples

cap transmit:get:mysql		# Fetch the remote production MySQL database

# and overwrite your local development database with it

cap transmit:get:assets		# Fetch the remote assets into your local development environment

cap transmit:put:mysql		# Overwrite the production MySQL database with your development data

Prerequisites

This Capistrano extension assumes some variables are present in your deploy.rb:

user						          # the SSH user for connecting to the deploy host
deploy_host					      # the host on which to run the db dump

Copyright © 2010-2011 Joost Baaij, released under the MIT license.

Something went wrong with that request. Please try again.