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
71
72
73
74
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 71
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
76
77
78
79
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 76
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
66
67
68
69
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 66
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
86
87
88
89
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 86
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
81
82
83
84
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 81
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_delete ⇒ Object
14
15
16
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 14
def after_delete
hipchat "#{organization}#{current_user} deleted the following cookbooks: #{misc_output}"
end
|
#after_environmentcreate ⇒ Object
36
37
38
39
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 36
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
41
42
43
44
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 41
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
31
32
33
34
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 31
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
26
27
28
29
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 26
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
101
102
103
104
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 101
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
96
97
98
99
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 96
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
91
92
93
94
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 91
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
106
107
108
109
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 106
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
111
112
113
114
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 111
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
116
117
118
119
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 116
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
121
122
123
124
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 121
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
|
18
19
20
21
22
23
24
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 18
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
56
57
58
59
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 56
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
61
62
63
64
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 61
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
51
52
53
54
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 51
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
46
47
48
49
|
# File 'lib/knife-spork/plugins/hipchat.rb', line 46
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
|