Sha256: f97b5e2c60c6e5cc60acf05284c325e98398d71ce859d0fe6f6c0fb01cda618d
Contents?: true
Size: 452 Bytes
Versions: 1
Compression:
Stored size: 452 Bytes
Contents
#!/usr/bin/env ruby URL = ENV['SLACK_WEBHOOK_URL'] channel = ARGV.shift content = ARGV.empty? ? ARGF.read : StringIO.new(ARGV.join("\n")).read exit 0 if content.empty? username = ENV['SLACKBOT_USERNAME'] || 'slackbot' icon_emoji = ENV['SLACK_MSG_ICON_EMOJI'] || ':ghost:' begin PostSlackMessage.to(channel, content, username, icon_emoji, URL) rescue RestClient::Exceptions => e puts "Error posting to slack #{e.message}:\n#{e.backtrace}" end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sm-0.2.0 | exe/post-slack-msg |