Class: KnifeSpork::Plugins::Grove

Inherits:
Plugin
  • Object
show all
Defined in:
lib/knife-spork/plugins/grove.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_databagcreateObject



70
71
72
73
74
# File 'lib/knife-spork/plugins/grove.rb', line 70

def after_databagcreate
  grove <<-EOH
#{current_user} created data bag #{object_name}
  EOH
end

#after_databagdeleteObject



88
89
90
91
92
# File 'lib/knife-spork/plugins/grove.rb', line 88

def after_databagdelete
  grove <<-EOH
#{current_user} edited data bag #{object_name}
  EOH
end

#after_databageditObject



76
77
78
79
80
# File 'lib/knife-spork/plugins/grove.rb', line 76

def after_databagedit
  grove <<-EOH
#{current_user} edited data bag item #{object_name}:#{object_secondary_name}
  EOH
end

#after_databagfromfileObject



94
95
96
97
98
# File 'lib/knife-spork/plugins/grove.rb', line 94

def after_databagfromfile
  grove <<-EOH
#{current_user} uploaded data bag item #{object_name}:#{object_secondary_name}
  EOH
end

#after_databagitemdeleteObject



82
83
84
85
86
# File 'lib/knife-spork/plugins/grove.rb', line 82

def after_databagitemdelete
  grove <<-EOH
#{current_user} edited data bag item #{object_name}:#{object_secondary_name}
  EOH
end

#after_environmentcreateObject



34
35
36
37
38
# File 'lib/knife-spork/plugins/grove.rb', line 34

def after_environmentcreate
  grove <<-EOH
#{current_user} created environment #{object_name}
  EOH
end

#after_environmentdeleteObject



40
41
42
43
44
# File 'lib/knife-spork/plugins/grove.rb', line 40

def after_environmentdelete
  grove <<-EOH
#{current_user} deleted environment #{object_name}
  EOH
end

#after_environmenteditObject



28
29
30
31
32
# File 'lib/knife-spork/plugins/grove.rb', line 28

def after_environmentedit
  grove <<-EOH
#{current_user} edited environment #{object_name}
  EOH
end

#after_environmentfromfileObject



22
23
24
25
26
# File 'lib/knife-spork/plugins/grove.rb', line 22

def after_environmentfromfile
  grove <<-EOH
#{current_user} uploaded environment #{object_name}
  EOH
end

#after_nodecreateObject



112
113
114
115
116
# File 'lib/knife-spork/plugins/grove.rb', line 112

def after_nodecreate
  grove <<-EOH
#{current_user} created node #{object_name}
  EOH
end

#after_nodedeleteObject



106
107
108
109
110
# File 'lib/knife-spork/plugins/grove.rb', line 106

def after_nodedelete
  grove <<-EOH
#{current_user} deleted node #{object_name}
  EOH
end

#after_nodeeditObject



100
101
102
103
104
# File 'lib/knife-spork/plugins/grove.rb', line 100

def after_nodeedit
  grove <<-EOH
#{current_user} edited node #{object_name}
  EOH
end

#after_nodefromfileObject



118
119
120
121
122
# File 'lib/knife-spork/plugins/grove.rb', line 118

def after_nodefromfile
  grove <<-EOH
#{current_user} uploaded node #{object_name}
  EOH
end

#after_noderunlistaddObject



124
125
126
127
128
# File 'lib/knife-spork/plugins/grove.rb', line 124

def after_noderunlistadd
  grove <<-EOH
#{current_user} added run_list items to #{object_name}: #{object_secondary_name}
  EOH
end

#after_noderunlistremoveObject



130
131
132
133
134
# File 'lib/knife-spork/plugins/grove.rb', line 130

def after_noderunlistremove
  grove <<-EOH
#{current_user} removed run_list items from #{object_name}: #{object_secondary_name}
  EOH
end

#after_noderunlistsetObject



136
137
138
139
140
# File 'lib/knife-spork/plugins/grove.rb', line 136

def after_noderunlistset
  grove <<-EOH
#{current_user} set the run_list for #{object_name} to #{object_secondary_name}
  EOH
end

#after_promote_remoteObject



16
17
18
19
20
# File 'lib/knife-spork/plugins/grove.rb', line 16

def after_promote_remote
  grove <<-EOH
#{current_user} promoted #{cookbooks.collect{|c| "#{c.name}@#{c.version}"}.join(', ')} on #{environments.collect{|e| "#{e.name}"}.join(', ')}
  EOH
end

#after_rolecreateObject



58
59
60
61
62
# File 'lib/knife-spork/plugins/grove.rb', line 58

def after_rolecreate
  grove <<-EOH
#{current_user} created role #{object_name}
  EOH
end

#after_roledeleteObject



64
65
66
67
68
# File 'lib/knife-spork/plugins/grove.rb', line 64

def after_roledelete
  grove <<-EOH
#{current_user} deleted role #{object_name}
  EOH
end

#after_roleeditObject



52
53
54
55
56
# File 'lib/knife-spork/plugins/grove.rb', line 52

def after_roleedit
  grove <<-EOH
#{current_user} edited role #{object_name}
  EOH
end

#after_rolefromfileObject



46
47
48
49
50
# File 'lib/knife-spork/plugins/grove.rb', line 46

def after_rolefromfile
  grove <<-EOH
#{current_user} uploaded role #{object_name}
  EOH
end

#after_uploadObject



10
11
12
13
14
# File 'lib/knife-spork/plugins/grove.rb', line 10

def after_upload
  grove <<-EOH
#{current_user} froze the following cookbooks on Chef Server: #{cookbooks.collect{|c| "#{c.name}@#{c.version}"}.join(', ')}
  EOH
end

#performObject



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

def perform; end