Created
June 19, 2014 11:00
-
-
Save francois-blanchard/7d9ec46f42c6d6193006 to your computer and use it in GitHub Desktop.
Notification backup (gem) on Slack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/Backup/models/production.rb | |
Backup::Model.new(:production, 'Descritpion') do | |
require 'json' | |
notify_by HttpPost do |post| | |
post.on_success = true | |
post.on_warning = true | |
post.on_failure = true | |
post.uri = 'https://yourname.slack.com/services/hooks/incoming-webhook' | |
post.params = { 'token' => 'your_token', 'payload' => { 'text' => "[Backup] Save", "channel" => "dev", "username" => "sshbot", "icon_emoji" => ":computer:" }.to_json } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment