-
Notifications
You must be signed in to change notification settings - Fork 8
/
Rakefile
45 lines (36 loc) · 1022 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
require 'rubygems'
require 'bundler/setup'
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
task :default => :spec
desc "Run specs"
RSpec::Core::RakeTask.new do |task|
task.rspec_opts = ["-c", "-f progress"]
end
task :c => :console
desc "start up a irb console"
task :console do
system 'bundle exec pry'
end
desc "start percival, connect to all channels in the CHANNELS env var"
task :start do
system 'mkdir -p data/timesheets/'
system 'mkdir -p data/quotelists/'
channels = ENV["CHANNELS"] && ENV["CHANNELS"].split(/,\s*/) || ["#lpmc-bot"]
nick = ENV["NICK"] || "percival"
server = 'irc.freenode.com'
require 'percival'
bot = Cinch::Bot.new do
configure do |c|
c.server = server
c.channels = channels
c.nick = nick
c.plugins.plugins = [ClockPlugin,
LoggerPlugin,
ChannelChangerPlugin,
NameChangerPlugin,
QuotePlugin]
end
end
bot.start
end