0.04
No commit activity in last 3 years
No release in over 3 years
Run any rake task on a remote server using Capistrano
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.11
~> 10.0
~> 3.0

Runtime

 Project Readme

capistrano-rake

Invoke any rake task on a remote server using capistrano. Installing this gem adds a new capistrano task invoke:rake that will allow you to execute rake tasks remotely. Only supports Capistrano 3 and above.

Installation

Add the gem to your Gemfile after setting up Capistrano, preferably in the :development group:

group :development do
  gem 'capistrano',      require: false
  gem 'capistrano-rake', require: false
end

Then bundle and add it to your Capfile:

# Capfile

require 'capistrano/rake'

Usage

To execute a rake task on a remote server, you need to pass that task's name to the invoke:rake capistrano task like this:

$ cap stage invoke:rake TASK=some:rake_task

# Examples
$ cap staging    invoke:rake TASK=db:seed
$ cap production invoke:rake TASK=paperclip:refresh

Configuration

You can optionally specify the capistrano roles for the rake task (Defaults to :app):

# Defaults to [:app]
set :rake_roles, [:db, :app]

Contributing

  1. Fork it ( https://github.com/sheharyarn/capistrano-rake/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

License

The gem is available as open source under the terms of the MIT License.