-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
101 lines (93 loc) · 4.93 KB
/
Rakefile
File metadata and controls
101 lines (93 loc) · 4.93 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# frozen_string_literal: true
# kettle-dev Rakefile v1.2.4 - 2025-11-28
# Ruby 2.3 (Safe Navigation) or higher required
#
# MIT License (see License.txt)
#
# Copyright (c) 2025 Peter H. Boling (galtzo.com)
#
# Expected to work in any project that uses Bundler.
#
# Sets up tasks for appraisal, floss_funding, rspec, minitest, rubocop, reek, yard, and stone_checksums.
#
# rake appraisal:install # Install Appraisal gemfiles (initial setup...
# rake appraisal:reset # Delete Appraisal lockfiles (gemfiles/*.gemfile.lock)
# rake appraisal:update # Update Appraisal gemfiles and run RuboCop...
# rake bench # Run all benchmarks (alias for bench:run)
# rake bench:list # List available benchmark scripts
# rake bench:run # Run all benchmark scripts (skips on CI)
# rake build:generate_checksums # Generate both SHA256 & SHA512 checksums i...
# rake bundle:audit:check # Checks the Gemfile.lock for insecure depe...
# rake bundle:audit:update # Updates the bundler-audit vulnerability d...
# rake ci:act[opt] # Run 'act' with a selected workflow
# rake coverage # Run specs w/ coverage and open results in...
# rake default # Default tasks aggregator
# rake install # Build and install kettle-dev-1.0.0.gem in...
# rake install:local # Build and install kettle-dev-1.0.0.gem in...
# rake kettle:dev:install # Install kettle-dev GitHub automation and ...
# rake kettle:dev:template # Template kettle-dev files into the curren...
# rake reek # Check for code smells
# rake reek:update # Run reek and store the output into the RE...
# rake release[remote] # Create tag v1.0.0 and build and push kett...
# rake rubocop_gradual # Run RuboCop Gradual
# rake rubocop_gradual:autocorrect # Run RuboCop Gradual with autocorrect (onl...
# rake rubocop_gradual:autocorrect_all # Run RuboCop Gradual with autocorrect (saf...
# rake rubocop_gradual:check # Run RuboCop Gradual to check the lock file
# rake rubocop_gradual:force_update # Run RuboCop Gradual to force update the l...
# rake rubocop_gradual_debug # Run RuboCop Gradual
# rake rubocop_gradual_debug:autocorrect # Run RuboCop Gradual with autocorrect (onl...
# rake rubocop_gradual_debug:autocorrect_all # Run RuboCop Gradual with autocorrect (saf...
# rake rubocop_gradual_debug:check # Run RuboCop Gradual to check the lock file
# rake rubocop_gradual_debug:force_update # Run RuboCop Gradual to force update the l...
# rake spec # Run RSpec code examples
# rake magic # Run tests
# rake yard # Generate YARD Documentation
#
require "bundler/gem_tasks" if !Dir[File.join(__dir__, "*.gemspec")].empty?
# Define a base default task early so other files can enhance it.
desc "Default tasks aggregator"
task :default do
puts "Default task complete."
end
# External gems that define tasks - add here!
require "kettle/dev"
begin
require "rspec/core/rake_task"
# All other specs run after FFI specs
# Excludes :ffi_backend tests (which already ran in ffi_specs)
desc("Run all specs")
RSpec::Core::RakeTask.new(:all_specs) do |t|
t.pattern = "./spec/**/*_spec.rb"
end
desc("Set SimpleCov command name for remaining specs")
task(:set_all_specs_command_name) do
ENV["MAX_ROWS"] = "3"
ENV["K_SOUP_COV_COMMAND_NAME"] = "All Specs"
end
Rake::Task[:all_specs].enhance([:set_all_specs_command_name])
# kettle-dev creates an RSpec::Core::RakeTask.new(:spec) which has both
# prerequisites and actions. We will leave that, and the default test task, alone,
# and use *magic* here. Add any other tasks that should run for the main CI task here.
Rake::Task[:magic].clear if Rake::Task.task_defined?(:magic)
desc("Run all specs")
task(magic: [:all_specs])
rescue LoadError
desc("(stub) spec is unavailable")
task(:spec) do # rubocop:disable Rake/DuplicateTask
warn("NOTE: rspec isn't installed, or is disabled for #{RUBY_VERSION} in the current environment")
end
desc("(stub) test is unavailable")
task(:test) do # rubocop:disable Rake/DuplicateTask
warn("NOTE: rspec isn't installed, or is disabled for #{RUBY_VERSION} in the current environment")
end
end
### RELEASE TASKS
# Setup stone_checksums
begin
require "stone_checksums"
rescue LoadError
desc("(stub) build:generate_checksums is unavailable")
task("build:generate_checksums") do
warn("NOTE: stone_checksums isn't installed, or is disabled for #{RUBY_VERSION} in the current environment")
end
end