lib/knife-spork/plugins/irccat.rb in knife-spork-1.0.13 vs lib/knife-spork/plugins/irccat.rb in knife-spork-1.0.14
- old
+ new
@@ -6,18 +6,18 @@
name :irccat
def perform; end
def after_upload
- irccat("#BOLD#PURPLECHEF:#NORMAL #{current_user} uploaded #TEAL#{cookbooks.collect{ |c| "#{c.name}@#{c.version}" }.join(", ")}#NORMAL")
+ irccat("#BOLD#PURPLECHEF:#NORMAL #{organization}#{current_user} uploaded #TEAL#{cookbooks.collect{ |c| "#{c.name}@#{c.version}" }.join(", ")}#NORMAL")
end
def after_promote_remote
environments.each do |environment|
diff = environment_diffs[environment.name]
env_gist = gist(environment, diff) if config.gist
- irccat("#BOLD#PURPLECHEF:#NORMAL #{current_user} promoted #TEAL#{cookbooks.collect{ |c| "#{c.name}@#{c.version}" }.join(", ")}#NORMAL to #{environment.name} #{env_gist}")
+ irccat("#BOLD#PURPLECHEF:#NORMAL #{organization}#{current_user} promoted #TEAL#{cookbooks.collect{ |c| "#{c.name}@#{c.version}" }.join(", ")}#NORMAL to #{environment.name} #{env_gist}")
end
end
private
def irccat(message)
@@ -37,10 +37,10 @@
def gist(environment, diff)
msg = "Environment #{environment} uploaded at #{Time.now.getutc} by #{current_user}\n\nConstraints updated on server in this version:\n\n#{diff.collect { |k, v| "#{k}: #{v}\n" }.join}"
%x[ echo "#{msg}" | #{config.gist}]
end
-
+
def channels
[ config.channel || config.channels ].flatten
end
end
end