Clone or download
Latest commit dac2327 Mar 29, 2018
Failed to load latest commit information.
lib bump version to 0.5.0 Mar 28, 2018
spec allow Json 2.x Mar 28, 2018
.gitignore Fix directory and file structure Oct 30, 2013
.rspec Add rspec Oct 31, 2013
.travis.yml update tested ruby versions Mar 28, 2018
Gemfile Initial commit Oct 30, 2013
LICENSE.txt Update years Feb 25, 2015 Update years Feb 25, 2015
Rakefile Fix rspec pattern in rakefile Sep 17, 2014
slack-notify.gemspec allow Json 2.x Mar 28, 2018


Send notifications to Slack via webhooks.

Build Status Code Climate Gem Version


Add this line to your application's Gemfile:

gem "slack-notify"

And then execute:

$ bundle

Or install it yourself as:

$ gem install slack-notify



require "slack-notify"

Initialize client:

client = "slack webhook url")

Initialize with options:

client =
  webhook_url: "slack webhook url",
  channel: "#development",
  username: "mybot",
  icon_url: "",
  icon_emoji: ":shipit:",
  link_names: 1

Initialize via shorthand method:

client =

Send test request:


Send message:

client.notify("Hello There!")
client.notify("Another message", "#channel2")
client.notify("Message", ["#channel1", "#channel2"])

Send direct message:

client.notify("Hello There!", "@username")

You can also test gem via rake console:

rake console


Copyright (c) 2013-2015 Dan Sosedoff,

MIT License