Class: KnifeSpork::Plugins::Campfire

Inherits:
Plugin
  • Object
show all
Defined in:
lib/knife-spork/plugins/campfire.rb

Instance Method Summary collapse

Methods inherited from Plugin

#enabled?, hook, hooks, #initialize, name

Constructor Details

This class inherits a constructor from KnifeSpork::Plugins::Plugin

Instance Method Details

#after_promote_remoteObject



19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/knife-spork/plugins/campfire.rb', line 19

def after_promote_remote
  campfire do |rooms|
    rooms.paste <<-EOH
#{organization}#{current_user} promoted cookbooks on Chef Server:

cookbooks:
#{cookbooks.collect{|c| "  #{c.name}@#{c.version}"}.join("\n")}

environments:
#{environments.collect{|e| "  #{e.name}"}.join("\n")}
EOH
  end
end

#after_uploadObject



10
11
12
13
14
15
16
17
# File 'lib/knife-spork/plugins/campfire.rb', line 10

def after_upload
  campfire do |rooms|
    rooms.paste <<-EOH
#{organization}#{current_user} froze the following cookbooks on Chef Server:
#{cookbooks.collect{|c| "  #{c.name}@#{c.version}"}.join("\n")}
EOH
  end
end

#performObject



8
# File 'lib/knife-spork/plugins/campfire.rb', line 8

def perform; end