-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
31 lines (22 loc) · 1021 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
# frozen_string_literal: true
# Load Bundler's gem tasks (e.g., `rake build`, `rake install`, etc.)
require 'bundler/gem_tasks'
# Load RSpec's rake task to run the test suite using `rake spec`
require 'rspec/core/rake_task'
# Define the `spec` task to run RSpec tests
RSpec::Core::RakeTask.new(:spec)
# Load RuboCop's rake task to check for style guide violations using `rake rubocop`
require 'rubocop/rake_task'
# Define the `rubocop` task to run RuboCop linter
RuboCop::RakeTask.new
# Load Yard's rake task for generating documentation using `rake yard`
require 'yard'
# Define the `yard` task to generate documentation
YARD::Rake::YardocTask.new
# By default, run both the `spec` (tests) and `rubocop` (linter) tasks
task default: %i[spec rubocop]
# Usage:
# 1. `rake spec` - Runs the RSpec tests
# 2. `rake rubocop` - Runs RuboCop linter for code quality checks
# 3. `rake yard` - Generates Yard documentation (output in the `doc/` folder)
# 4. `rake` - Runs both the tests and RuboCop checks (default task)