-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
30 lines (22 loc) · 835 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
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
ENV["RAILS_ENV"] ||= "test"
require_relative "config/application"
Rails.application.load_tasks
Rake::Task[:default].prerequisites.clear if Rake::Task.task_defined?(:default)
require "rspec/core/rake_task"
desc "Run all examples"
RSpec::Core::RakeTask.new(:spec) do |t|
t.ruby_opts = [
"-w", # turn warnings on for your script
"--yjit" # enable in-process JIT compiler
]
end
desc "Run all checks"
task default: %w[spec rubocop erblint] do
Thor::Base.shell.new.say_status :OK, "All checks passed!"
end
desc "Apply auto-corrections"
task fix: %w[rubocop:autocorrect_all erblint:autocorrect] do
Thor::Base.shell.new.say_status :OK, "All fixes applied!"
end