-
Notifications
You must be signed in to change notification settings - Fork 6
/
Rakefile
45 lines (34 loc) · 801 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
# frozen_string_literal: true
require 'rake/tasklib'
require 'byebug'
require_relative 'config/dependencies'
env = ENV.fetch('ENVIRONMENT', 'development')
if env == 'development'
begin
require 'dotenv'
Dotenv.load
rescue LoadError # rubocop:disable Lint/SuppressedException
end
end
Config.load_and_set_settings("config/settings/#{env}.yaml")
require_relative 'config/application'
Dir.glob('tasks/**/*.rake').each do |file|
load file
end
desc 'rubocop and rspec check'
task :check do
system 'rspec'
system 'rubocop'
end
# rubocop:disable Rake/Desc
desc 'console'
task c: :console
task :console do
sh 'bundle exec pry -I . -r ./config/config.rb'
end
desc 'start'
task :start do
sh 'rerun puma config.ru --no-notify'
end
# rubocop:enable Rake/Desc
task default: :check