気軽に Hipchat に通知する方法
デプロイ自動化とServerspec
notify() { local USER=$1 local MESSAGE=$2 JSON="{ \"message_format\": \"text\", \"message\": \"@${USER} ${MESSAGE}\", \"notify\": true }" curl -X POST \ -H "Content-Type: application/json" \ -d "${JSON}" \ https://api.hipchat.com/v2/room/... }
以下のように使う.
$ notify Taichi "Service out is done!"