forked from github/janky
-
Notifications
You must be signed in to change notification settings - Fork 0
janky_with_irc_chat_service
Junichi TANAKA edited this page Sep 20, 2013
·
1 revision
setup janky with campfire or hitchat
$ git clone git://gist.github.com/1497335 janky
.
.
edit Gemfile
$ cat Gemfile
source "http://rubygems.org"
gem "janky", :git => "git://github.com/junichi-tanaka/janky.git",
:branch => "irc_support"
gem "pg"
gem "thin"
gem "cinch", "~> 2.0.9"
edit config/environment.rb
$ cat config/environment.rb
require "janky"
require "janky/chat_service/irc"
Janky.setup(ENV)
irc setting in heroku
$ heroku config --shell
.
.
JANKY_CHAT=irc
JANKY_CHAT_DEFAULT_ROOM=#room
JANKY_CHAT_IRC_CHANNELS=#room
JANKY_CHAT_IRC_NICK=janky_ircbot_janky
JANKY_CHAT_IRC_PASSWORD=Xxxx
JANKY_CHAT_IRC_PORT=6667
JANKY_CHAT_IRC_SERVER=irc.foo.bar
.
.
edit package.json
$ cat package.json
.
.
"dependencies": {
"hubot": ">= 2.6.0 < 3.0.0",
"hubot-scripts": ">= 2.5.0 < 3.0.0",
"hubot-irc": "0.1.19"
},
.
.
edit Procfile. replace adapter to irc
$ cat Procfile
web: bin/hubot -a irc -n "janky hubot"
edit janky.coffee. if you like to replace hubot.respond to hubot.hear (recommend)
$ vi janky.coffee
:%s/respond/hear/
irc setting in heroku
$ heroku config --shell
.
.
HUBOT_IRC_NICK=janky_ircbot_hubot
HUBOT_IRC_PASSWORD=Xxx
HUBOT_IRC_PORT=6667
HUBOT_IRC_ROOMS=#hoge
HUBOT_IRC_SERVER=irc.foo.bar
.
.
Please note: Need two irc session on irc server.