2023-05-02 04:57:39 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'bundler/gem_tasks'
|
|
|
|
|
2023-05-09 09:33:15 -04:00
|
|
|
desc 'Run default checks'
|
|
|
|
task default: %i[lint]
|
|
|
|
|
|
|
|
desc 'Run code analysis tools'
|
|
|
|
task lint: %i[rubocop]
|
|
|
|
|
|
|
|
desc 'Fix code style (rubocop --auto-correct)'
|
|
|
|
task fix: 'rubocop:auto_correct'
|
|
|
|
|
|
|
|
begin
|
|
|
|
require 'rubocop/rake_task'
|
|
|
|
RuboCop::RakeTask.new
|
|
|
|
rescue LoadError
|
|
|
|
nil
|
|
|
|
end
|
2023-05-02 04:57:39 -04:00
|
|
|
|
|
|
|
desc 'Open development console'
|
|
|
|
task :console do
|
2023-05-02 09:48:32 -04:00
|
|
|
exec 'bundle', 'exec', File.expand_path(File.join('bin', 'console'), __dir__)
|
2023-05-02 04:57:39 -04:00
|
|
|
end
|