Skip to content

Instantly share code, notes, and snippets.

@cwsaylor
Created April 6, 2009 22:07
Show Gist options
  • Save cwsaylor/90971 to your computer and use it in GitHub Desktop.
Save cwsaylor/90971 to your computer and use it in GitHub Desktop.
Capistrano deployment campfire notifier
# Requires config file config/campfire.yml with the following settings:
# account: "foo"
# email: "bar@baz.com"
# password: "changeme"
# ssl: false
# room: "foobar"
require 'tinder'
namespace :deploy do
task :campfire do
config = YAML.load_file("config/campfire.yml")
campfire = Tinder::Campfire.new config['account'], :ssl => config['ssl']
campfire.login config['email'], config['password']
ROOM = campfire.find_room_by_name config['room']
end
task :pre_announce do
deploy.campfire
ROOM.paste "#{ENV['USER']} is preparing to deploy #{application} to #{stage}"
end
task :post_announce do
ROOM.paste "#{ENV['USER']} finished deploying #{application} to #{stage}"
end
before "deploy", "deploy:pre_announce"
after "deploy", "deploy:post_announce"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment