Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 README.markdown
Octocat-spinner-32 Rakefile
Octocat-spinner-32 restart_butler.gemspec
README.markdown

Restart Butler

Use restart butler to DRY down your script/restart code

Usage

# Gemfile
gem 'restart_butler', :git => "git://github.com/michalbugno/restart_butler.git", :branch => "master"
# script/restart
root_dir   = File.expand_path(File.join(File.dirname(__FILE__), '..'))
rails_env  = ENV['RAILS_ENV'] || 'development'

require "rubygems"
require "bundler/setup"
require "restart_butler"

butler = RestartButler::Base.new(root_dir, oldrev, newrev, {"RAILS_ENV" => rails_env})
# add steps, i.e.
butler.steps << :bundle
butler.steps << [:asset, {:destination => "user@host:/some/path"}]
butler.steps << :migrate
butler.steps << [:god, {:god_path => "config/quotebase.god"}]
butler.steps << :cron if ENV["CRON"] == "true"
butler.steps << :delayed
butler.restart!
Something went wrong with that request. Please try again.