-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
57 lines (47 loc) · 1.08 KB
/
Rakefile
File metadata and controls
57 lines (47 loc) · 1.08 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
# frozen_string_literal: true
require "bundler/gem_tasks"
require "rspec/core/rake_task"
require "rubocop/rake_task"
# Import custom tasks
Dir.glob("lib/tasks/**/*.rake").each { |r| import r }
# Test task
RSpec::Core::RakeTask.new(:spec)
# Style checking
RuboCop::RakeTask.new
# Security audit task
begin
require "bundler/audit/task"
Bundler::Audit::Task.new
rescue LoadError
namespace :bundle do
task :audit do
puts "⚠️ bundler-audit not available"
end
end
end
# Documentation task
begin
require "yard"
YARD::Rake::YardocTask.new(:doc) do |t|
t.files = ["lib/**/*.rb"]
t.options = ["--markup=markdown"]
end
rescue LoadError
task :doc do
puts "⚠️ yard not available"
end
end
# Quality tasks
namespace :quality do
desc "Run all quality checks"
task all: %i[spec rubocop bundle:audit]
desc "Run tests with coverage"
task :coverage do
ENV["COVERAGE"] = "true"
Rake::Task["spec"].invoke
end
end
# Default task - run core checks
task default: %i[spec rubocop]
# CI task - comprehensive checking
task ci: %i[quality:all doc]