An opinionated Rainbows for Vlad
This plugin assumes the following:
- You have existing rake tasks to start/stop Rainbows.
- Your target system(s) have a system wide install of RVM.
- Your application is Rack based, and makes use of the 'RACK_ENV' environment variable.
Description
A Vlad plugin for controlling Rainbows.
Installation
Bundler
Add the following to your Gemfile.
gem "vlad-rainbows", "~> 0.1.4"
Usage
In your rake file do the following:
begin
require "vlad"
Vlad.load :app => :rainbows
rescue LoadError
puts $!
end
This plugin assumes you have rake tasks to handle stopping/starting Rainbows. By default the tasks are named:
- app:start
- app:stop
The tasks can be overriden by updating deploy.rb with:
set :app_start_task, "task_name"
set :app_stop_task, "task_name"
The plugin provides a run_rake method for executing rake tasks remotely. If you wish to override the method's implementation, provide a block to :run_rake_proc in deploy.rb.
set :run_rake_proc, Proc.new {
run [
"cd #{current_path}",
"#{rake_cmd} RACK_ENV=#{rack_env} #{task}",
]
}
You can also override the following defaults in deploy.rb:
- :rvmrc
- :rack_env
- :rake_cmd
Credits
John Barnette's vlad-git, for which this was based on.
Copyright
Copyright 2010 Vlad contributors, John Dewey ([email protected])