-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathRakefile
More file actions
36 lines (29 loc) · 698 Bytes
/
Rakefile
File metadata and controls
36 lines (29 loc) · 698 Bytes
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
ENV["RUBY_ENV"] ||= "development"
require "bundler/setup"
require "dotenv/load" if ENV["RUBY_ENV"] != "production"
Bundler.require(:default, ENV["RUBY_ENV"])
loader = Zeitwerk::Loader.for_gem
loader.push_dir("#{File.dirname(__FILE__)}/src")
loader.setup
if Gem.loaded_specs.key?("rubocop")
require "rubocop/rake_task"
namespace :lint do
RuboCop::RakeTask.new(:ruby)
end
desc "Run all linters"
task lint: %i[lint:ruby]
end
task :bot do
DiscordBot.run
end
task :web do
Rack::Server.start(
Port: ENV["PORT"] || 4567,
app: Webserver.new,
)
end
task :all do
Process.fork { Rake::Task["bot"].invoke }
Process.fork { Rake::Task["web"].invoke }
Process.waitall
end