Class: KnifeSpork::Plugins::HipChat
- Inherits:
-
Plugin
- Object
- Plugin
- KnifeSpork::Plugins::HipChat
show all
- Defined in:
- lib/knife-spork/plugins/hipchat.rb
Instance Method Summary
collapse
Methods inherited from Plugin
#enabled?, hook, hooks, #initialize, name
Instance Method Details
#after_databagcreate ⇒ Object
67
68
69
70
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 67
def after_databagcreate
databag_gist = object_gist("databag item", "#{object_name}:#{object_secondary_name}", object_difference) if config.gist and !object_difference.empty?
hipchat "#{organization}#{current_user} created data bag #{object_name} #{databag_gist}"
end
|
#after_databagdelete ⇒ Object
72
73
74
75
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 72
def after_databagdelete
databag_gist = object_gist("databag item", "#{object_name}:#{object_secondary_name}", object_difference) if config.gist and !object_difference.empty?
hipchat "#{organization}#{current_user} deleted data bag item #{object_name} #{databag_gist}"
end
|
#after_databagedit ⇒ Object
62
63
64
65
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 62
def after_databagedit
databag_gist = object_gist("databag item", "#{object_name}:#{object_secondary_name}", object_difference) if config.gist and !object_difference.empty?
hipchat "#{organization}#{current_user} edited data bag item #{object_name}:#{object_secondary_name} #{databag_gist}"
end
|
#after_databagfromfile ⇒ Object
82
83
84
85
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 82
def after_databagfromfile
databag_gist = object_gist("databag item", "#{object_name}:#{object_secondary_name}", object_difference) if config.gist and !object_difference.empty?
hipchat "#{organization}#{current_user} uploaded data bag item #{object_name}:#{object_secondary_name} #{databag_gist}"
end
|
#after_databagitemdelete ⇒ Object
77
78
79
80
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 77
def after_databagitemdelete
databag_gist = object_gist("databag item", "#{object_name}:#{object_secondary_name}", object_difference) if config.gist and !object_difference.empty?
hipchat "#{organization}#{current_user} deleted data bag item #{object_name}:#{object_secondary_name} #{databag_gist}"
end
|
#after_environmentcreate ⇒ Object
32
33
34
35
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 32
def after_environmentcreate
environment_gist = object_gist("environment", object_name, object_difference) if config.gist and !object_difference.empty?
hipchat "#{organization}#{current_user} created environment #{object_name} #{environment_gist}"
end
|
#after_environmentdelete ⇒ Object
37
38
39
40
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 37
def after_environmentdelete
environment_gist = object_gist("environment", object_name, object_difference) if config.gist and !object_difference.empty?
hipchat "#{organization}#{current_user} deleted environment #{object_name} #{environment_gist}"
end
|
#after_environmentedit ⇒ Object
27
28
29
30
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 27
def after_environmentedit
environment_gist = object_gist("environment", object_name, object_difference) if config.gist and !object_difference.empty?
hipchat "#{organization}#{current_user} edited environment #{object_name} #{environment_gist}"
end
|
#after_environmentfromfile ⇒ Object
22
23
24
25
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 22
def after_environmentfromfile
environment_gist = object_gist("environment", object_name, object_difference) if config.gist and !object_difference.empty?
hipchat "#{organization}#{current_user} uploaded environment #{object_name} #{environment_gist}"
end
|
#after_nodecreate ⇒ Object
97
98
99
100
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 97
def after_nodecreate
node_gist = object_gist("node", "#{object_name}", object_difference) if config.gist and !object_difference.empty?
hipchat "#{organization}#{current_user} created node #{object_name} #{node_gist}"
end
|
#after_nodedelete ⇒ Object
92
93
94
95
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 92
def after_nodedelete
node_gist = object_gist("node", "#{object_name}", object_difference) if config.gist and !object_difference.empty?
hipchat "#{organization}#{current_user} deleted node #{object_name} #{node_gist}"
end
|
#after_nodeedit ⇒ Object
87
88
89
90
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 87
def after_nodeedit
node_gist = object_gist("node", "#{object_name}", object_difference) if config.gist and !object_difference.empty?
hipchat "#{organization}#{current_user} edited node #{object_name} #{node_gist}"
end
|
#after_nodefromfile ⇒ Object
102
103
104
105
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 102
def after_nodefromfile
node_gist = object_gist("node", "#{object_name}", object_difference) if config.gist and !object_difference.empty?
hipchat "#{organization}#{current_user} uploaded node #{object_name} #{node_gist}"
end
|
#after_noderunlistadd ⇒ Object
107
108
109
110
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 107
def after_noderunlistadd
node_gist = object_gist("node", "#{object_name}", object_difference) if config.gist and !object_difference.empty?
hipchat "#{organization}#{current_user} added run_list items to #{object_name}: #{object_secondary_name} #{node_gist}"
end
|
#after_noderunlistremove ⇒ Object
112
113
114
115
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 112
def after_noderunlistremove
node_gist = object_gist("node", "#{object_name}", object_difference) if config.gist and !object_difference.empty?
hipchat "#{organization}#{current_user} removed run_list items from #{object_name}: #{object_secondary_name} #{node_gist}"
end
|
#after_noderunlistset ⇒ Object
117
118
119
120
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 117
def after_noderunlistset
node_gist = object_gist("node", "#{object_name}", object_difference) if config.gist and !object_difference.empty?
hipchat "#{organization}#{current_user} set the run_list for #{object_name} to #{object_secondary_name} #{node_gist}"
end
|
14
15
16
17
18
19
20
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 14
def after_promote_remote
environments.each do |environment|
diff = environment_diffs[environment.name]
env_gist = env_gist(environment, diff) if config.gist
hipchat "#{organization}#{current_user} promoted the following cookbooks:\n#{cookbooks.collect{ |c| " #{c.name}@#{c.version}" }.join("\n")} to #{environment} #{env_gist}"
end
end
|
#after_rolecreate ⇒ Object
52
53
54
55
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 52
def after_rolecreate
role_gist = object_gist("role", object_name, object_difference) if config.gist and !object_difference.empty?
hipchat "#{organization}#{current_user} created role #{object_name} #{role_gist}"
end
|
#after_roledelete ⇒ Object
57
58
59
60
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 57
def after_roledelete
role_gist = object_gist("role", object_name, object_difference) if config.gist and !object_difference.empty?
hipchat "#{organization}#{current_user} deleted role #{object_name} #{role_gist}"
end
|
#after_roleedit ⇒ Object
47
48
49
50
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 47
def after_roleedit
role_gist = object_gist("role", object_name, object_difference) if config.gist and !object_difference.empty?
hipchat "#{organization}#{current_user} edited role #{object_name} #{role_gist}"
end
|
#after_rolefromfile ⇒ Object
42
43
44
45
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 42
def after_rolefromfile
role_gist = object_gist("role", object_name, object_difference) if config.gist and !object_difference.empty?
hipchat "#{organization}#{current_user} uploaded role #{object_name} #{role_gist}"
end
|
#after_upload ⇒ Object
10
11
12
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 10
def after_upload
hipchat "#{organization}#{current_user} uploaded the following cookbooks:\n#{cookbooks.collect{ |c| " #{c.name}@#{c.version}" }.join("\n")}"
end
|
8
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 8
def perform; end
|