From de0c777d831ed83a8ac87dcb14a31e2ff240391e Mon Sep 17 00:00:00 2001 From: Annibelle Boling Date: Sun, 1 Mar 2026 01:31:32 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20=F0=9F=AA=84M=E2=9C=A8A=E2=9C=A8?= =?UTF-8?q?G=E2=9C=A8I=E2=9C=A8C=F0=9F=AA=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ancient.yml | 6 ++--- .github/workflows/caboose.yml | 12 ++++----- .github/workflows/coverage.yml | 2 +- .github/workflows/current.yml | 6 ++--- .github/workflows/dep-heads.yml | 6 ++--- .github/workflows/heads.yml | 6 ++--- .github/workflows/jruby.yml | 2 +- .github/workflows/legacy.yml | 4 +-- .github/workflows/macos.yml | 6 ++--- .github/workflows/supported.yml | 4 +-- .github/workflows/unsupported.yml | 4 +-- .github/workflows/windows.yml | 2 +- Rakefile | 42 ++++++++++++++++++++++++++++++- 13 files changed, 71 insertions(+), 31 deletions(-) diff --git a/.github/workflows/ancient.yml b/.github/workflows/ancient.yml index 547dcea3..09351600 100644 --- a/.github/workflows/ancient.yml +++ b/.github/workflows/ancient.yml @@ -38,7 +38,7 @@ jobs: # # Ruby 2.3 # - ruby: "ruby-2.3" # appraisal: "ruby-2-3" -# exec_cmd: "rake test" +# exec_cmd: "rake magic" # gemfile: "Appraisal.root" # rubygems: "3.3.27" # bundler: "2.3.27" @@ -46,7 +46,7 @@ jobs: # Ruby 2.4 - ruby: "ruby-2.4" appraisal: "ruby-2-4" - exec_cmd: "rake test" + exec_cmd: "rake magic" gemfile: "Appraisal.root" rubygems: "3.3.27" bundler: "2.3.27" @@ -54,7 +54,7 @@ jobs: # Ruby 2.5 - ruby: "ruby-2.5" appraisal: "ruby-2-5" - exec_cmd: "rake test" + exec_cmd: "rake magic" gemfile: "Appraisal.root" rubygems: "3.3.27" bundler: "2.3.27" diff --git a/.github/workflows/caboose.yml b/.github/workflows/caboose.yml index cd2eb67b..912cb220 100644 --- a/.github/workflows/caboose.yml +++ b/.github/workflows/caboose.yml @@ -38,7 +38,7 @@ jobs: # Ruby 2.3 - ruby: "ruby-2.3" appraisal: "ruby-2-3-hashie_v0" - exec_cmd: "rake test" + exec_cmd: "rake magic" gemfile: "Appraisal.root" rubygems: "3.3.27" bundler: "2.3.27" @@ -46,7 +46,7 @@ jobs: # Ruby 2.3 - ruby: "ruby-2.3" appraisal: "ruby-2-3-hashie_v1" - exec_cmd: "rake test" + exec_cmd: "rake magic" gemfile: "Appraisal.root" rubygems: "3.3.27" bundler: "2.3.27" @@ -54,7 +54,7 @@ jobs: # Ruby 2.3 - ruby: "ruby-2.3" appraisal: "ruby-2-3-hashie_v2" - exec_cmd: "rake test" + exec_cmd: "rake magic" gemfile: "Appraisal.root" rubygems: "3.3.27" bundler: "2.3.27" @@ -62,7 +62,7 @@ jobs: # Ruby 2.3 - ruby: "ruby-2.3" appraisal: "ruby-2-3-hashie_v3" - exec_cmd: "rake test" + exec_cmd: "rake magic" gemfile: "Appraisal.root" rubygems: "3.3.27" bundler: "2.3.27" @@ -70,7 +70,7 @@ jobs: # Ruby 2.3 - ruby: "ruby-2.3" appraisal: "ruby-2-3-hashie_v4" - exec_cmd: "rake test" + exec_cmd: "rake magic" gemfile: "Appraisal.root" rubygems: "3.3.27" bundler: "2.3.27" @@ -78,7 +78,7 @@ jobs: # Ruby 2.3 - ruby: "ruby-2.3" appraisal: "ruby-2-3-hashie_v5" - exec_cmd: "rake test" + exec_cmd: "rake magic" gemfile: "Appraisal.root" rubygems: "3.3.27" bundler: "2.3.27" diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 64891ed7..82a37d7c 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -48,7 +48,7 @@ jobs: # Coverage - ruby: "ruby" appraisal: "coverage" - exec_cmd: "rake test" + exec_cmd: "rake magic" gemfile: "Appraisal.root" rubygems: latest bundler: latest diff --git a/.github/workflows/current.yml b/.github/workflows/current.yml index e6933950..c1b2e1e1 100644 --- a/.github/workflows/current.yml +++ b/.github/workflows/current.yml @@ -40,7 +40,7 @@ jobs: # Ruby 3.4 - ruby: "ruby" appraisal: "current" - exec_cmd: "rake test" + exec_cmd: "rake magic" gemfile: "Appraisal.root" rubygems: latest bundler: latest @@ -48,7 +48,7 @@ jobs: # truffleruby-24.1 (targets Ruby 3.3 compatibility) - ruby: "truffleruby" appraisal: "current" - exec_cmd: "rake test" + exec_cmd: "rake magic" gemfile: "Appraisal.root" rubygems: default bundler: default @@ -56,7 +56,7 @@ jobs: # jruby-10.0 (targets Ruby 3.4 compatibility) - ruby: "jruby" appraisal: "current" - exec_cmd: "rake test" + exec_cmd: "rake magic" gemfile: "Appraisal.root" rubygems: default bundler: default diff --git a/.github/workflows/dep-heads.yml b/.github/workflows/dep-heads.yml index 2c534edc..700518c8 100644 --- a/.github/workflows/dep-heads.yml +++ b/.github/workflows/dep-heads.yml @@ -42,7 +42,7 @@ jobs: # Ruby 3.4 - ruby: "ruby" appraisal: "dep-heads" - exec_cmd: "rake test" + exec_cmd: "rake magic" gemfile: "Appraisal.root" rubygems: latest bundler: latest @@ -50,7 +50,7 @@ jobs: # truffleruby-24.1 (targets Ruby 3.3 compatibility) - ruby: "truffleruby" appraisal: "dep-heads" - exec_cmd: "rake test" + exec_cmd: "rake magic" gemfile: "Appraisal.root" rubygems: default bundler: default @@ -58,7 +58,7 @@ jobs: # jruby-10.0 (targets Ruby 3.4 compatibility) - ruby: "jruby" appraisal: "dep-heads" - exec_cmd: "rake test" + exec_cmd: "rake magic" gemfile: "Appraisal.root" rubygems: default bundler: default diff --git a/.github/workflows/heads.yml b/.github/workflows/heads.yml index bfb44e4e..88e29c65 100644 --- a/.github/workflows/heads.yml +++ b/.github/workflows/heads.yml @@ -41,7 +41,7 @@ jobs: # ruby-head - ruby: "ruby-head" appraisal: "head" - exec_cmd: "rake test" + exec_cmd: "rake magic" gemfile: "Appraisal.root" rubygems: default bundler: default @@ -49,7 +49,7 @@ jobs: # truffleruby-head - ruby: "truffleruby-head" appraisal: "head" - exec_cmd: "rake test" + exec_cmd: "rake magic" gemfile: "Appraisal.root" rubygems: default bundler: default @@ -57,7 +57,7 @@ jobs: # jruby-head - ruby: "jruby-head" appraisal: "head" - exec_cmd: "rake test" + exec_cmd: "rake magic" gemfile: "Appraisal.root" rubygems: default bundler: default diff --git a/.github/workflows/jruby.yml b/.github/workflows/jruby.yml index 38bc8e30..170fcb60 100644 --- a/.github/workflows/jruby.yml +++ b/.github/workflows/jruby.yml @@ -39,7 +39,7 @@ jobs: # jruby-9.4 (targets Ruby 3.1 compatibility) - ruby: "jruby-9.4" appraisal: "ruby-3-1" - exec_cmd: "rake test" + exec_cmd: "rake magic" gemfile: "Appraisal.root" rubygems: default bundler: default diff --git a/.github/workflows/legacy.yml b/.github/workflows/legacy.yml index 8d169d02..109a350b 100644 --- a/.github/workflows/legacy.yml +++ b/.github/workflows/legacy.yml @@ -40,7 +40,7 @@ jobs: # Ruby 3.0 - ruby: "ruby-3.0" appraisal: "ruby-3-0" - exec_cmd: "rake test" + exec_cmd: "rake magic" gemfile: "Appraisal.root" rubygems: '3.5.23' bundler: '2.5.23' @@ -48,7 +48,7 @@ jobs: # Ruby 3.1 - ruby: "ruby-3.1" appraisal: "ruby-3-1" - exec_cmd: "rake test" + exec_cmd: "rake magic" gemfile: "Appraisal.root" rubygems: '3.6.9' bundler: '2.6.9' diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 9939e5bd..4fa03bad 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -40,7 +40,7 @@ jobs: # Ruby 3.4 - ruby: "ruby" appraisal: "current" - exec_cmd: "rake test" + exec_cmd: "rake magic" gemfile: "Appraisal.root" rubygems: latest bundler: latest @@ -50,7 +50,7 @@ jobs: # (according to runtime: targets Ruby 3.2 compatibility) - ruby: "truffleruby" appraisal: "current" - exec_cmd: "rake test" + exec_cmd: "rake magic" gemfile: "Appraisal.root" rubygems: default bundler: default @@ -58,7 +58,7 @@ jobs: # jruby-10.0 (targets Ruby 3.4 compatibility) - ruby: "jruby" appraisal: "current" - exec_cmd: "rake test" + exec_cmd: "rake magic" gemfile: "Appraisal.root" rubygems: default bundler: default diff --git a/.github/workflows/supported.yml b/.github/workflows/supported.yml index de487760..a70555a0 100644 --- a/.github/workflows/supported.yml +++ b/.github/workflows/supported.yml @@ -39,7 +39,7 @@ jobs: # Ruby 3.2 - ruby: "ruby-3.2" appraisal: "ruby-3-2" - exec_cmd: "rake test" + exec_cmd: "rake magic" gemfile: "Appraisal.root" rubygems: latest bundler: latest @@ -47,7 +47,7 @@ jobs: # Ruby 3.3 - ruby: "ruby-3.3" appraisal: "ruby-3-3" - exec_cmd: "rake test" + exec_cmd: "rake magic" gemfile: "Appraisal.root" rubygems: latest bundler: latest diff --git a/.github/workflows/unsupported.yml b/.github/workflows/unsupported.yml index 35d3be73..2faca315 100644 --- a/.github/workflows/unsupported.yml +++ b/.github/workflows/unsupported.yml @@ -40,7 +40,7 @@ jobs: # Ruby 2.6 - ruby: "ruby-2.6" appraisal: "ruby-2-6" - exec_cmd: "rake test" + exec_cmd: "rake magic" gemfile: "Appraisal.root" rubygems: '3.4.22' bundler: '2.4.22' @@ -48,7 +48,7 @@ jobs: # Ruby 2.7 - ruby: "ruby-2.7" appraisal: "ruby-2-7" - exec_cmd: "rake test" + exec_cmd: "rake magic" gemfile: "Appraisal.root" rubygems: '3.4.22' bundler: '2.4.22' diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 67626112..62c7bd95 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -40,7 +40,7 @@ jobs: # Ruby 3.4 - ruby: "ruby" appraisal: "current" - exec_cmd: "rake test" + exec_cmd: "rake magic" gemfile: "Appraisal.root" rubygems: latest bundler: latest diff --git a/Rakefile b/Rakefile index 631e8b13..b79e8a2e 100644 --- a/Rakefile +++ b/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# kettle-dev Rakefile v1.1.51 - 2025-11-07 +# kettle-dev Rakefile v1.1.60 - 2025-11-23 # Ruby 2.3 (Safe Navigation) or higher required # # MIT License (see License.txt) @@ -11,6 +11,8 @@ # # 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 @@ -54,6 +56,44 @@ end # External gems that define tasks - add here! require "kettle/dev" +### SPEC TASKS +# For coverage aggregation with SimpleCov merging: +# - Each task uses a unique K_SOUP_COV_COMMAND_NAME so SimpleCov tracks them separately +# - K_SOUP_COV_USE_MERGING=true must be set in .envrc for results to merge +# - K_SOUP_COV_MERGE_TIMEOUT should be set long enough for all tasks to complete +begin + require "rspec/core/rake_task" + + # 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. + Rake::Task[:magic].clear if Rake::Task.task_defined?(:magic) + desc("Run specs") + RSpec::Core::RakeTask.new(:magic) do |t| + t.pattern = "./spec/**/*_spec.rb" + end + + desc("Set SimpleCov command name for remaining specs") + task(:set_coverage_command_name) do + ENV["K_SOUP_COV_COMMAND_NAME"] = "Test Coverage" + end + Rake::Task[:magic].enhance([:set_coverage_command_name]) + + Rake::Task[:coverage].clear if Rake::Task.task_defined?(:coverage) + desc("Slap magic onto the main coverage task") + task(coverage: [:magic]) +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