Created
August 21, 2012 05:53
-
-
Save hrysd/3412377 to your computer and use it in GitHub Desktop.
deploy時にLingrに通知をおくる。
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
require 'open-uri' | |
require 'digest/sha1' | |
ROOM = '部屋の id' | |
ID = 'bot の id' | |
SECRET = 'bot の secret' | |
VERIFIER = Digest::SHA1.hexdigest(ID + SECRET) | |
TEXT = "deployしました" | |
namespace :notification do | |
task :lingr do | |
open("http://lingr.com/api/room/say?room=#{ROOM}&bot=#{ID}&text=#{URI.escape(TEXT)}&bot_verifier=#{VERIFIER}") { |io| io.read } | |
end | |
end | |
after :deploy, 'notification:lingr' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://d.hatena.ne.jp/hrysd/20120821/1345528550