cwsaylor (owner)

Forks

Revisions

gist: 90971 Download_button fork
public
Description:
Capistrano deployment campfire notifier
Public Clone URL: git://gist.github.com/90971.git
Embed All Files: show embed
Text only #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# 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