kettle-dev 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/.devcontainer/devcontainer.json +26 -0
  4. data/.envrc +42 -0
  5. data/.git-hooks/commit-msg +41 -0
  6. data/.git-hooks/commit-subjects-goalie.txt +8 -0
  7. data/.git-hooks/footer-template.erb.txt +16 -0
  8. data/.git-hooks/prepare-commit-msg +20 -0
  9. data/.github/FUNDING.yml +13 -0
  10. data/.github/dependabot.yml +11 -0
  11. data/.github/workflows/ancient.yml +80 -0
  12. data/.github/workflows/auto-assign.yml +21 -0
  13. data/.github/workflows/codeql-analysis.yml +70 -0
  14. data/.github/workflows/coverage.yml +130 -0
  15. data/.github/workflows/current.yml +88 -0
  16. data/.github/workflows/dependency-review.yml +20 -0
  17. data/.github/workflows/discord-notifier.yml +38 -0
  18. data/.github/workflows/heads.yml +87 -0
  19. data/.github/workflows/jruby.yml +79 -0
  20. data/.github/workflows/legacy.yml +70 -0
  21. data/.github/workflows/locked_deps.yml +88 -0
  22. data/.github/workflows/opencollective.yml +40 -0
  23. data/.github/workflows/style.yml +67 -0
  24. data/.github/workflows/supported.yml +85 -0
  25. data/.github/workflows/truffle.yml +78 -0
  26. data/.github/workflows/unlocked_deps.yml +87 -0
  27. data/.github/workflows/unsupported.yml +78 -0
  28. data/.gitignore +48 -0
  29. data/.gitlab-ci.yml +45 -0
  30. data/.junie/guidelines-rbs.md +49 -0
  31. data/.junie/guidelines.md +132 -0
  32. data/.opencollective.yml +3 -0
  33. data/.qlty/qlty.toml +79 -0
  34. data/.rspec +8 -0
  35. data/.rubocop.yml +13 -0
  36. data/.simplecov +7 -0
  37. data/.tool-versions +1 -0
  38. data/.yard_gfm_support.rb +22 -0
  39. data/.yardopts +11 -0
  40. data/Appraisal.root.gemfile +12 -0
  41. data/Appraisals +120 -0
  42. data/CHANGELOG.md +26 -1
  43. data/Gemfile +32 -0
  44. data/Rakefile +99 -0
  45. data/checksums/kettle-dev-1.0.2.gem.sha256 +1 -0
  46. data/checksums/kettle-dev-1.0.2.gem.sha512 +1 -0
  47. data/checksums/kettle-dev-1.0.3.gem.sha256 +1 -0
  48. data/checksums/kettle-dev-1.0.3.gem.sha512 +1 -0
  49. data/exe/kettle-release +2 -3
  50. data/gemfiles/modular/coverage.gemfile +6 -0
  51. data/gemfiles/modular/documentation.gemfile +11 -0
  52. data/gemfiles/modular/style.gemfile +16 -0
  53. data/lib/kettle/dev/rakelib/appraisal.rake +40 -0
  54. data/lib/kettle/dev/rakelib/bench.rake +58 -0
  55. data/lib/kettle/dev/rakelib/bundle_audit.rake +18 -0
  56. data/lib/kettle/dev/rakelib/ci.rake +348 -0
  57. data/lib/kettle/dev/rakelib/install.rake +304 -0
  58. data/lib/kettle/dev/rakelib/reek.rake +34 -0
  59. data/lib/kettle/dev/rakelib/require_bench.rake +7 -0
  60. data/lib/kettle/dev/rakelib/rubocop_gradual.rake +9 -0
  61. data/lib/kettle/dev/rakelib/spec_test.rake +42 -0
  62. data/lib/kettle/dev/rakelib/template.rake +461 -0
  63. data/lib/kettle/dev/rakelib/yard.rake +33 -0
  64. data/lib/kettle/dev/version.rb +1 -1
  65. data.tar.gz.sig +0 -0
  66. metadata +67 -4
  67. metadata.gz.sig +0 -0
data/CHANGELOG.md CHANGED
@@ -12,6 +12,27 @@ and this project adheres to [Semantic Versioning v2](https://semver.org/spec/v2.
12
12
  ### Fixed
13
13
  ### Security
14
14
 
15
+ ## [1.0.3] - 2025-08-24
16
+ - TAG: [v1.0.3][1.0.3t]
17
+ - COVERAGE: 100.00% -- 98/98 lines in 7 files
18
+ - BRANCH COVERAGE: 100.00% -- 30/30 branches in 7 files
19
+ - 94.59% documented
20
+ ### Added
21
+ - template task now copies .git-hooks files necessary for git hooks to work
22
+ ### Fixed
23
+ - kettle-release now uses the host project's root, instead of this gem's installed root.
24
+ - Added .git-hooks files necessary for git hooks to work
25
+
26
+
27
+ ## [1.0.2] - 2025-08-24
28
+ - TAG: [v1.0.2][1.0.2t]
29
+ - COVERAGE: 100.00% -- 98/98 lines in 7 files
30
+ - BRANCH COVERAGE: 100.00% -- 30/30 branches in 7 files
31
+ - 94.59% documented
32
+ ### Fixed
33
+ - Added files necessary for kettle:dev:template task to work
34
+ - .github/workflows/opencollective.yml working!
35
+
15
36
  ## [1.0.1] - 2025-08-24
16
37
  - TAG: [v1.0.1][1.0.1t]
17
38
  - COVERAGE: 100.00% -- 98/98 lines in 7 files
@@ -50,7 +71,11 @@ and this project adheres to [Semantic Versioning v2](https://semver.org/spec/v2.
50
71
  - Selecting will run the selected workflow via `act`
51
72
  - This may move to its own gem in the future.
52
73
 
53
- [Unreleased]: https://gitlab.com/kettle-rb/kettle-dev/-/compare/v1.0.1...HEAD
74
+ [Unreleased]: https://gitlab.com/kettle-rb/kettle-dev/-/compare/v1.0.3...HEAD
75
+ [1.0.3]: https://gitlab.com/kettle-rb/kettle-dev/-/compare/v1.0.2...v1.0.3
76
+ [1.0.3t]: https://gitlab.com/kettle-rb/kettle-dev/-/tags/v1.0.3
77
+ [1.0.2]: https://gitlab.com/kettle-rb/kettle-dev/-/compare/v1.0.1...v1.0.2
78
+ [1.0.2t]: https://gitlab.com/kettle-rb/kettle-dev/-/tags/v1.0.2
54
79
  [1.0.1]: https://gitlab.com/kettle-rb/kettle-dev/-/compare/v1.0.0...v1.0.1
55
80
  [1.0.1t]: https://gitlab.com/kettle-rb/kettle-dev/-/tags/v1.0.1
56
81
  [1.0.0]: https://gitlab.com/kettle-rb/kettle-dev/-/compare/a427c302df09cfe4253a7c8d400333f9a4c1a208...v1.0.0
data/Gemfile ADDED
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
+ git_source(:gitlab) { |repo_name| "https://gitlab.com/#{repo_name}" }
7
+
8
+ #### IMPORTANT #######################################################
9
+ # Gemfile is for local development ONLY; Gemfile is NOT loaded in CI #
10
+ ####################################################### IMPORTANT ####
11
+
12
+ # Include dependencies from <gem name>.gemspec
13
+ gemspec
14
+
15
+ platform :mri do
16
+ # Debugging - Ensure ENV["DEBUG"] == "true" to use debuggers within spec suite
17
+ # Use binding.break, binding.b, or debugger in code
18
+ gem "debug", ">= 1.0.0" # ruby >= 2.7
19
+ gem "gem_bench", "~> 2.0", ">= 2.0.5"
20
+
21
+ # Dev Console - Binding.pry - Irb replacement
22
+ gem "pry", "~> 0.14" # ruby >= 2.0
23
+ end
24
+
25
+ # Code Coverage
26
+ eval_gemfile "gemfiles/modular/coverage.gemfile"
27
+
28
+ # Linting
29
+ eval_gemfile "gemfiles/modular/style.gemfile"
30
+
31
+ # Documentation
32
+ eval_gemfile "gemfiles/modular/documentation.gemfile"
data/Rakefile ADDED
@@ -0,0 +1,99 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Galtzo FLOSS Rakefile v1.0.11 - 2025-08-19
4
+ # Ruby 2.3 (Safe Navigation) or higher required
5
+ #
6
+ # CHANGELOG
7
+ # v1.0.0 - initial release w/ support for rspec, minitest, rubocop, reek, yard, and stone_checksums
8
+ # v1.0.1 - fix test / spec tasks running 2x
9
+ # v1.0.2 - fix duplicate task warning from RuboCop
10
+ # v1.0.3 - add bench tasks to run mini benchmarks (add scripts to /benchmarks)
11
+ # v1.0.4 - add support for floss_funding:install
12
+ # v1.0.5 - add support for halting in Rake tasks with binding.b (from debug gem)
13
+ # v1.0.6 - add RBS files and checksums to YARD-generated docs site
14
+ # v1.0.7 - works with vanilla ruby, non-gem, bundler-managed, projects
15
+ # v1.0.8 - improved Dir globs, add back and document rbconfig dependency
16
+ # v1.0.9 - add appraisal:update task to update Appraisal gemfiles and autocorrect with RuboCop Gradual
17
+ # v1.0.10 - add ci:act to run GHA workflows locally, and get status of remote workflows
18
+ # v1.0.11 - ci:act workflows are populated entirely dynamically, based on existing files
19
+ #
20
+ # MIT License (see License.txt)
21
+ #
22
+ # Copyright (c) 2025 Peter H. Boling (galtzo.com)
23
+ #
24
+ # Expected to work in any project that uses Bundler.
25
+ #
26
+ # Sets up tasks for appraisal, floss_funding, rspec, minitest, rubocop, reek, yard, and stone_checksums.
27
+ #
28
+ # rake appraisal:update # Update Appraisal gemfiles and run RuboCop Gradual autocorrect
29
+ # rake bench # Run all benchmarks (alias for bench:run)
30
+ # rake bench:list # List available benchmark scripts
31
+ # rake bench:run # Run all benchmark scripts (skips on CI)
32
+ # rake build # Build gitmoji-regex-1.0.2.gem into the pkg directory
33
+ # rake build:checksum # Generate SHA512 checksum of gitmoji-regex-1.0.2.gem into the checksums directory
34
+ # rake build:generate_checksums # Generate both SHA256 & SHA512 checksums into the checksums directory, and git...
35
+ # rake bundle:audit:check # Checks the Gemfile.lock for insecure dependencies
36
+ # rake bundle:audit:update # Updates the bundler-audit vulnerability database
37
+ # rake ci:act[opt] # Run 'act' with a selected workflow
38
+ # rake clean # Remove any temporary products
39
+ # rake clobber # Remove any generated files
40
+ # rake coverage # Run specs w/ coverage and open results in browser
41
+ # rake floss_funding:install # (stub) floss_funding is unavailable
42
+ # rake install # Build and install gitmoji-regex-1.0.2.gem into system gems
43
+ # rake install:local # Build and install gitmoji-regex-1.0.2.gem into system gems without network ac...
44
+ # rake reek # Check for code smells
45
+ # rake reek:update # Run reek and store the output into the REEK file
46
+ # rake release[remote] # Create tag v1.0.2 and build and push gitmoji-regex-1.0.2.gem to rubygems.org
47
+ # rake rubocop # alias rubocop task to rubocop_gradual
48
+ # rake rubocop_gradual # Run RuboCop Gradual
49
+ # rake rubocop_gradual:autocorrect # Run RuboCop Gradual with autocorrect (only when it's safe)
50
+ # rake rubocop_gradual:autocorrect_all # Run RuboCop Gradual with autocorrect (safe and unsafe)
51
+ # rake rubocop_gradual:check # Run RuboCop Gradual to check the lock file
52
+ # rake rubocop_gradual:force_update # Run RuboCop Gradual to force update the lock file
53
+ # rake spec # Run RSpec code examples
54
+ # rake test # Run tests
55
+ # rake yard # Generate YARD Documentation
56
+
57
+ # External gems
58
+ require "bundler/gem_tasks" if !Dir[File.join(__dir__, "*.gemspec")].empty?
59
+
60
+ # Detect if the invoked task is spec/test to avoid eagerly requiring the library,
61
+ # which would load code before SimpleCov can start (when running `rake spec`).
62
+ invoked_tasks = Rake.application.top_level_tasks
63
+ running_specs = invoked_tasks.any? { |t| t == "spec" || t == "test" || t == "coverage" }
64
+
65
+ if running_specs
66
+ # Define minimal rspec tasks locally to keep coverage accurate
67
+ begin
68
+ require "rspec/core/rake_task"
69
+ desc("Run RSpec code examples")
70
+ RSpec::Core::RakeTask.new(:spec)
71
+ desc("Run tests")
72
+ task(test: :spec)
73
+ rescue LoadError
74
+ # If rspec isn't available, let it fail when the task is invoked
75
+ end
76
+ else
77
+ require "kettle/dev"
78
+
79
+ # Define a base default task early so other files can enhance it.
80
+ desc "Default tasks aggregator"
81
+ task :default do
82
+ puts "Default task complete."
83
+ end
84
+
85
+ Kettle::Dev.install_tasks
86
+
87
+ ### RELEASE TASKS
88
+ # Setup stone_checksums
89
+ begin
90
+ require "stone_checksums"
91
+
92
+ GemChecksums.install_tasks
93
+ rescue LoadError
94
+ desc("(stub) build:generate_checksums is unavailable")
95
+ task("build:generate_checksums") do
96
+ warn("NOTE: stone_checksums isn't installed, or is disabled for #{RUBY_VERSION} in the current environment")
97
+ end
98
+ end
99
+ end
@@ -0,0 +1 @@
1
+ 2338f9fc4e14a03c39c6509d11fdcfad85faaa7615d855703cb511bc9f95351c
@@ -0,0 +1 @@
1
+ ccc6a5c3cd36a8c40d78458166adfbd7ad452b62055579ee4333089a56313170bf97d0aca1f8c3d4f15287bb3d396cfbfcce2174665feb7a77f0b6b03ac8096c
@@ -0,0 +1 @@
1
+ 996386236fb02c4837bcab0d180f39604e8f0c93535531e6aded6cfbf804ad0a
@@ -0,0 +1 @@
1
+ 67fde9c262cbf74e7ea89e18ba3b7a737aad2cc7a596660931e2e42e73bbc8bfd9a778b6f54d79902ef6a48783fa0f90277b7dcb656a7e3c9d63c2192baaae85
data/exe/kettle-release CHANGED
@@ -12,8 +12,6 @@
12
12
  # - Runs bin/gem_checksums
13
13
  # - Runs `bundle exec rake release` (expects PEM password and RubyGems MFA OTP)
14
14
 
15
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
16
-
17
15
  require "rubygems"
18
16
  require "bundler/setup"
19
17
 
@@ -31,7 +29,8 @@ module Kettle
31
29
  module Dev
32
30
  class ReleaseCLI
33
31
  def initialize
34
- @root = File.expand_path("..", __dir__)
32
+ # Use the host project's root, not the installed gem's directory
33
+ @root = Kettle::Dev::CIHelpers.project_root
35
34
  end
36
35
 
37
36
  def run
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ # We run code coverage on the latest version of Ruby only.
4
+
5
+ # Coverage
6
+ gem "kettle-soup-cover", "~> 1.0", ">= 1.0.10", require: false
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Documentation
4
+ gem "kramdown", "~> 2.5", ">= 2.5.1" # Ruby >= 2.5
5
+ gem "kramdown-parser-gfm", "~> 1.1" # Ruby >= 2.3
6
+ gem "yard", "~> 0.9", ">= 0.9.37", require: false
7
+ gem "yard-junk", "~> 0.0", ">= 0.0.10", github: "pboling/yard-junk", branch: "next", require: false
8
+ gem "yard-relative_markdown_links", "~> 0.5.0"
9
+
10
+ # Std Lib extractions
11
+ gem "rdoc", "~> 6.11"
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ # We run rubocop on the latest version of Ruby,
4
+ # but in support of the oldest supported version of Ruby
5
+
6
+ gem "reek", "~> 6.5"
7
+ # gem "rubocop", "~> 1.73", ">= 1.73.2" # constrained by standard
8
+ gem "rubocop-lts", "~> 10.1", ">= 10.1.1" # Linting that targets compatibility with each specific minor version of Ruby
9
+ gem "rubocop-ruby2_3", "~> 2.0", ">= 2.0.5"
10
+ gem "rubocop-packaging", "~> 0.6", ">= 0.6.0"
11
+ gem "rubocop-rspec", "~> 3.6"
12
+ gem "standard", ">= 1.50"
13
+ gem "rubocop-on-rbs", "~> 1.8" # ruby >= 3.1.0
14
+
15
+ # Std Lib extractions
16
+ gem "benchmark", "~> 0.4", ">= 0.4.1" # Removed from Std Lib in Ruby 3.5
@@ -0,0 +1,40 @@
1
+ begin
2
+ require "bundler"
3
+ rescue LoadError
4
+ warn("[kettle-dev][appraisal.rake] failed to load bundler") if Kettle::Dev::DEBUGGING
5
+ # ok, might still work
6
+ end
7
+
8
+ # --- Appraisals (dev-only) ---
9
+ begin
10
+ require "appraisal/task"
11
+
12
+ desc("Update Appraisal gemfiles and run RuboCop Gradual autocorrect")
13
+ task("appraisal:update") do
14
+ bundle = Gem.bindir ? File.join(Gem.bindir, "bundle") : "bundle"
15
+
16
+ run_in_unbundled = proc do
17
+ env = {"BUNDLE_GEMFILE" => "Appraisal.root.gemfile"}
18
+
19
+ # 1) BUNDLE_GEMFILE=Appraisal.root.gemfile bundle
20
+ ok = system(env, bundle)
21
+ abort("appraisal:update failed: bundler install under Appraisal.root.gemfile") unless ok
22
+
23
+ # 2) BUNDLE_GEMFILE=Appraisal.root.gemfile bundle exec appraisal update
24
+ ok = system(env, bundle, "exec", "appraisal", "update")
25
+ abort("appraisal:update failed: bundle exec appraisal update") unless ok
26
+
27
+ # 3) bundle exec rake rubocop_gradual:autocorrect
28
+ ok = system(bundle, "exec", "rake", "rubocop_gradual:autocorrect")
29
+ abort("appraisal:update failed: rubocop_gradual:autocorrect") unless ok
30
+ end
31
+
32
+ if defined?(Bundler)
33
+ Bundler.with_unbundled_env(&run_in_unbundled)
34
+ else
35
+ run_in_unbundled.call
36
+ end
37
+ end
38
+ rescue LoadError
39
+ warn("[kettle-dev][appraisal.rake] failed to load appraisal/tasks") if Kettle::Dev::DEBUGGING
40
+ end
@@ -0,0 +1,58 @@
1
+ require "rbconfig" if !Dir[File.join(__dir__, "benchmarks")].empty? # Used by `rake bench:run`
2
+
3
+ begin
4
+ require "bundler"
5
+ rescue LoadError
6
+ warn("[kettle-dev][bench.rake] failed to load bundler") if Kettle::Dev::DEBUGGING
7
+ # ok, might still work
8
+ end
9
+
10
+ # --- Benchmarks (dev-only) ---
11
+ namespace :bench do
12
+ desc "List available benchmark scripts"
13
+ task :list do
14
+ bench_files = Dir[File.join(__dir__, "benchmarks", "*.rb")].sort
15
+ if bench_files.empty?
16
+ puts "No benchmark scripts found under benchmarks/."
17
+ else
18
+ bench_files.each { |f| puts File.basename(f) }
19
+ end
20
+ end
21
+
22
+ desc "Run all benchmark scripts (skips on CI)"
23
+ task :run do
24
+ if ENV.fetch("CI", "false").casecmp("true").zero?
25
+ puts "Benchmarks are disabled on CI. Skipping."
26
+ next
27
+ end
28
+
29
+ ruby = RbConfig.ruby
30
+ bundle = Gem.bindir ? File.join(Gem.bindir, "bundle") : "bundle"
31
+ bench_files = Dir[File.join(__dir__, "benchmarks", "*.rb")].sort
32
+ if bench_files.empty?
33
+ puts "No benchmark scripts found under benchmarks/."
34
+ next
35
+ end
36
+
37
+ use_bundler = ENV.fetch("BENCH_BUNDLER", "0") == "1"
38
+
39
+ bench_files.each do |script|
40
+ puts "\n=== Running: #{File.basename(script)} ==="
41
+ if use_bundler
42
+ cmd = [bundle, "exec", ruby, "-Ilib", script]
43
+ system(*cmd) || abort("Benchmark failed: #{script}")
44
+ elsif defined?(Bundler)
45
+ # Run benchmarks without Bundler to reduce overhead and better reflect plain ruby -Ilib
46
+ Bundler.with_unbundled_env do
47
+ system(ruby, "-Ilib", script) || abort("Benchmark failed: #{script}")
48
+ end
49
+ else
50
+ # If Bundler isn't available, just run directly
51
+ system(ruby, "-Ilib", script) || abort("Benchmark failed: #{script}")
52
+ end
53
+ end
54
+ end
55
+ end
56
+
57
+ desc "Run all benchmarks (alias for bench:run)"
58
+ task bench: "bench:run"
@@ -0,0 +1,18 @@
1
+ # Setup Bundle Audit
2
+ begin
3
+ require "bundler/audit/task"
4
+
5
+ Bundler::Audit::Task.new
6
+ Kettle::Dev.register_default("bundle:audit:update")
7
+ Kettle::Dev.register_default("bundle:audit")
8
+ rescue LoadError
9
+ warn("[kettle-dev][bundle_audit.rake] failed to load bundle/audit/task") if Kettle::Dev::DEBUGGING
10
+ desc("(stub) bundle:audit is unavailable")
11
+ task("bundle:audit") do
12
+ warn("NOTE: bundler-audit isn't installed, or is disabled for #{RUBY_VERSION} in the current environment")
13
+ end
14
+ desc("(stub) bundle:audit:update is unavailable")
15
+ task("bundle:audit:update") do
16
+ warn("NOTE: bundler-audit isn't installed, or is disabled for #{RUBY_VERSION} in the current environment")
17
+ end
18
+ end