Skip to content

jtwarren/slack-webhook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slack Webhook Gem

A simple ruby gem for getting functionality out of Slack's webhooks.

Installation

Add this line to your application's Gemfile:

gem 'slack-webhook'

And then execute:

$ bundle

Or install it yourself as:

$ gem install slack

Usage

Slack.configure do |config|
  config.channel = '#engineering' # or '@jeff'
  config.icon_emoji = ':ghost:'
  config.url = 'https://hooks.slack.com/services/id_1/id_2/token'
  config.username = 'deploybot'
end

Example usage in capistrano to notify deployments

task :notify_start do
  if ['production', 'staging'].include?(fetch(:rails_env))
    Slack.post("Starting deployment of `#{fetch(:branch)}` to `#{fetch(:rails_env)}`")
  end
end

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages