kettle-dev 1.2.3 → 2.0.0

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 (133) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/CHANGELOG.md +176 -3
  4. data/CITATION.cff +2 -2
  5. data/CONTRIBUTING.md +11 -17
  6. data/README.md +390 -319
  7. data/exe/kettle-dev-setup +12 -63
  8. data/exe/kettle-gh-release +82 -0
  9. data/lib/kettle/dev/gem_spec_reader.rb +2 -2
  10. data/lib/kettle/dev/open_collective_config.rb +12 -0
  11. data/lib/kettle/dev/rakelib/yard.rake +15 -0
  12. data/lib/kettle/dev/tasks/ci_task.rb +4 -4
  13. data/lib/kettle/dev/version.rb +1 -1
  14. data/lib/kettle/dev.rb +4 -12
  15. data/sig/kettle/dev/source_merger.rbs +40 -56
  16. data.tar.gz.sig +0 -0
  17. metadata +15 -144
  18. metadata.gz.sig +0 -0
  19. data/.aiignore.example +0 -19
  20. data/.devcontainer/apt-install/devcontainer-feature.json +0 -9
  21. data/.devcontainer/apt-install/install.sh +0 -11
  22. data/.devcontainer/devcontainer.json +0 -28
  23. data/.env.local.example +0 -31
  24. data/.envrc +0 -47
  25. data/.envrc.example +0 -51
  26. data/.envrc.no-osc.example +0 -51
  27. data/.git-hooks/commit-msg +0 -54
  28. data/.git-hooks/commit-subjects-goalie.txt +0 -8
  29. data/.git-hooks/footer-template.erb.txt +0 -16
  30. data/.git-hooks/prepare-commit-msg +0 -8
  31. data/.github/.codecov.yml.example +0 -14
  32. data/.github/FUNDING.yml +0 -13
  33. data/.github/FUNDING.yml.no-osc.example +0 -13
  34. data/.github/dependabot.yml +0 -13
  35. data/.github/workflows/ancient.yml +0 -83
  36. data/.github/workflows/ancient.yml.example +0 -81
  37. data/.github/workflows/auto-assign.yml +0 -21
  38. data/.github/workflows/codeql-analysis.yml +0 -70
  39. data/.github/workflows/coverage.yml +0 -127
  40. data/.github/workflows/coverage.yml.example +0 -127
  41. data/.github/workflows/current.yml +0 -116
  42. data/.github/workflows/current.yml.example +0 -115
  43. data/.github/workflows/dep-heads.yml +0 -117
  44. data/.github/workflows/dependency-review.yml +0 -20
  45. data/.github/workflows/discord-notifier.yml.example +0 -39
  46. data/.github/workflows/heads.yml +0 -117
  47. data/.github/workflows/heads.yml.example +0 -116
  48. data/.github/workflows/jruby.yml +0 -82
  49. data/.github/workflows/jruby.yml.example +0 -72
  50. data/.github/workflows/legacy.yml +0 -76
  51. data/.github/workflows/license-eye.yml +0 -40
  52. data/.github/workflows/locked_deps.yml +0 -85
  53. data/.github/workflows/opencollective.yml +0 -40
  54. data/.github/workflows/style.yml +0 -67
  55. data/.github/workflows/supported.yml +0 -75
  56. data/.github/workflows/truffle.yml +0 -99
  57. data/.github/workflows/unlocked_deps.yml +0 -84
  58. data/.github/workflows/unsupported.yml +0 -76
  59. data/.gitignore +0 -50
  60. data/.gitlab-ci.yml.example +0 -134
  61. data/.idea/.gitignore +0 -45
  62. data/.junie/guidelines-rbs.md +0 -49
  63. data/.junie/guidelines.md +0 -141
  64. data/.junie/guidelines.md.example +0 -140
  65. data/.licenserc.yaml +0 -7
  66. data/.opencollective.yml +0 -3
  67. data/.opencollective.yml.example +0 -3
  68. data/.qlty/qlty.toml +0 -79
  69. data/.rspec +0 -9
  70. data/.rubocop.yml +0 -13
  71. data/.rubocop_rspec.yml +0 -33
  72. data/.simplecov +0 -16
  73. data/.simplecov.example +0 -11
  74. data/.tool-versions +0 -1
  75. data/.yardignore +0 -13
  76. data/.yardopts +0 -14
  77. data/Appraisal.root.gemfile +0 -10
  78. data/Appraisals +0 -151
  79. data/Appraisals.example +0 -102
  80. data/CHANGELOG.md.example +0 -47
  81. data/CONTRIBUTING.md.example +0 -227
  82. data/FUNDING.md.no-osc.example +0 -63
  83. data/Gemfile +0 -40
  84. data/Gemfile.example +0 -34
  85. data/README.md.example +0 -570
  86. data/README.md.no-osc.example +0 -536
  87. data/Rakefile.example +0 -68
  88. data/gemfiles/modular/coverage.gemfile +0 -6
  89. data/gemfiles/modular/debug.gemfile +0 -13
  90. data/gemfiles/modular/documentation.gemfile +0 -14
  91. data/gemfiles/modular/erb/r2/v3.0.gemfile +0 -1
  92. data/gemfiles/modular/erb/r2.3/default.gemfile +0 -6
  93. data/gemfiles/modular/erb/r2.6/v2.2.gemfile +0 -3
  94. data/gemfiles/modular/erb/r3/v5.0.gemfile +0 -1
  95. data/gemfiles/modular/erb/r3.1/v4.0.gemfile +0 -2
  96. data/gemfiles/modular/erb/vHEAD.gemfile +0 -2
  97. data/gemfiles/modular/injected.gemfile +0 -60
  98. data/gemfiles/modular/mutex_m/r2/v0.3.gemfile +0 -2
  99. data/gemfiles/modular/mutex_m/r2.4/v0.1.gemfile +0 -3
  100. data/gemfiles/modular/mutex_m/r3/v0.3.gemfile +0 -2
  101. data/gemfiles/modular/mutex_m/vHEAD.gemfile +0 -2
  102. data/gemfiles/modular/optional.gemfile +0 -8
  103. data/gemfiles/modular/optional.gemfile.example +0 -5
  104. data/gemfiles/modular/runtime_heads.gemfile +0 -10
  105. data/gemfiles/modular/runtime_heads.gemfile.example +0 -8
  106. data/gemfiles/modular/stringio/r2/v3.0.gemfile +0 -5
  107. data/gemfiles/modular/stringio/r2.4/v0.0.2.gemfile +0 -4
  108. data/gemfiles/modular/stringio/r3/v3.0.gemfile +0 -5
  109. data/gemfiles/modular/stringio/vHEAD.gemfile +0 -2
  110. data/gemfiles/modular/style.gemfile +0 -25
  111. data/gemfiles/modular/style.gemfile.example +0 -25
  112. data/gemfiles/modular/templating.gemfile +0 -3
  113. data/gemfiles/modular/x_std_libs/r2/libs.gemfile +0 -3
  114. data/gemfiles/modular/x_std_libs/r2.3/libs.gemfile +0 -3
  115. data/gemfiles/modular/x_std_libs/r2.4/libs.gemfile +0 -3
  116. data/gemfiles/modular/x_std_libs/r2.6/libs.gemfile +0 -3
  117. data/gemfiles/modular/x_std_libs/r3/libs.gemfile +0 -3
  118. data/gemfiles/modular/x_std_libs/r3.1/libs.gemfile +0 -3
  119. data/gemfiles/modular/x_std_libs/vHEAD.gemfile +0 -3
  120. data/gemfiles/modular/x_std_libs.gemfile +0 -2
  121. data/kettle-dev.gemspec.example +0 -154
  122. data/lib/kettle/dev/modular_gemfiles.rb +0 -119
  123. data/lib/kettle/dev/prism_appraisals.rb +0 -351
  124. data/lib/kettle/dev/prism_gemfile.rb +0 -177
  125. data/lib/kettle/dev/prism_gemspec.rb +0 -284
  126. data/lib/kettle/dev/prism_utils.rb +0 -201
  127. data/lib/kettle/dev/rakelib/install.rake +0 -10
  128. data/lib/kettle/dev/rakelib/template.rake +0 -10
  129. data/lib/kettle/dev/setup_cli.rb +0 -403
  130. data/lib/kettle/dev/source_merger.rb +0 -622
  131. data/lib/kettle/dev/tasks/install_task.rb +0 -553
  132. data/lib/kettle/dev/tasks/template_task.rb +0 -975
  133. data/lib/kettle/dev/template_helpers.rb +0 -685
@@ -1,76 +0,0 @@
1
- name: MRI 2.6 & 2.7 (EOL)
2
-
3
- permissions:
4
- contents: read
5
-
6
- env:
7
- K_SOUP_COV_DO: false
8
-
9
- on:
10
- push:
11
- branches:
12
- - 'main'
13
- - '*-stable'
14
- tags:
15
- - '!*' # Do not execute on tags
16
- pull_request:
17
- branches:
18
- - '*'
19
- # Allow manually triggering the workflow.
20
- workflow_dispatch:
21
-
22
- # Cancels all previous workflow runs for the same branch that have not yet completed.
23
- concurrency:
24
- # The concurrency group contains the workflow name and the branch name.
25
- group: "${{ github.workflow }}-${{ github.ref }}"
26
- cancel-in-progress: true
27
-
28
- jobs:
29
- test:
30
- if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
31
- name: Specs ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }}
32
- runs-on: ubuntu-22.04
33
- continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
34
- env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps
35
- BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile
36
- strategy:
37
- fail-fast: false
38
- matrix:
39
- include:
40
- # Ruby 2.6
41
- - ruby: "ruby-2.6"
42
- appraisal: "ruby-2-6"
43
- exec_cmd: "rake test"
44
- gemfile: "Appraisal.root"
45
- rubygems: '3.4.22'
46
- bundler: '2.4.22'
47
-
48
- # Ruby 2.7
49
- - ruby: "ruby-2.7"
50
- appraisal: "ruby-2-7"
51
- exec_cmd: "rake test"
52
- gemfile: "Appraisal.root"
53
- rubygems: '3.4.22'
54
- bundler: '2.4.22'
55
-
56
- steps:
57
- - name: Checkout
58
- uses: actions/checkout@v6
59
-
60
- - name: Setup Ruby & RubyGems
61
- uses: ruby/setup-ruby@v1
62
- with:
63
- ruby-version: ${{ matrix.ruby }}
64
- rubygems: ${{ matrix.rubygems }}
65
- bundler: ${{ matrix.bundler }}
66
- bundler-cache: false
67
-
68
- # Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root)
69
- # We need to do this first to get appraisal installed.
70
- # NOTE: This does not use the primary Gemfile at all.
71
- - name: Install Root Appraisal
72
- run: bundle
73
- - name: Appraisal for ${{ matrix.appraisal }}
74
- run: bundle exec appraisal ${{ matrix.appraisal }} bundle
75
- - name: Tests for ${{ matrix.ruby }} via ${{ matrix.exec_cmd }}
76
- run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }}
data/.gitignore DELETED
@@ -1,50 +0,0 @@
1
- # Build Artifacts
2
- /pkg/
3
- /tmp/
4
- *.gem
5
-
6
- # Bundler
7
- /vendor/bundle/
8
- /.bundle/
9
- /gemfiles/*.lock
10
- /gemfiles/.bundle/
11
- /gemfiles/.bundle/config
12
- /gemfiles/vendor/
13
- Appraisal.*.gemfile.lock
14
-
15
- # Specs
16
- .rspec_status
17
- /coverage/
18
- /spec/reports/
19
- /results/
20
- .output.txt
21
-
22
- # Documentation
23
- /.yardoc/
24
- /_yardoc/
25
- /rdoc/
26
- /doc/
27
-
28
- # Ruby Version Managers (RVM, rbenv, etc)
29
- # Ignored because we currently use .tool-versions
30
- .rvmrc
31
- .ruby-version
32
- .ruby-gemset
33
-
34
- # Benchmarking
35
- /measurement/
36
-
37
- # Debugger detritus
38
- .byebug_history
39
-
40
- # direnv - brew install direnv
41
- .env.local
42
-
43
- # OS Detritus
44
- .DS_Store
45
-
46
- # Editors
47
- *~
48
-
49
- # Sentinels
50
- .floss_funding.*.lock
@@ -1,134 +0,0 @@
1
- # You can override the included template(s) by including variable overrides
2
- # SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
3
- # Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings
4
- # Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings
5
- # Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings
6
- # Note that environment variables can be set in several places
7
- # See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
8
- #stages:
9
- # - test
10
- #sast:
11
- # stage: test
12
- #include:
13
- # - template: Security/SAST.gitlab-ci.yml
14
-
15
- default:
16
- image: "ruby:${RUBY_VERSION}"
17
-
18
- variables:
19
- BUNDLE_INSTALL_FLAGS: "--quiet --jobs=$(nproc) --retry=3"
20
- BUNDLE_FROZEN: "false" # No lockfile!
21
- BUNDLE_GEMFILE: Appraisal.root.gemfile
22
- K_SOUP_COV_DEBUG: true
23
- K_SOUP_COV_DO: true
24
- K_SOUP_COV_HARD: true
25
- K_SOUP_COV_MIN_BRANCH: 74
26
- K_SOUP_COV_MIN_LINE: 90
27
- K_SOUP_COV_VERBOSE: true
28
- K_SOUP_COV_FORMATTERS: "tty"
29
- K_SOUP_COV_MULTI_FORMATTERS: true
30
- K_SOUP_COV_COMMAND_NAME: "RSpec Coverage"
31
-
32
- workflow:
33
- rules:
34
- # For merge requests, create a pipeline.
35
- - if: '$CI_MERGE_REQUEST_IID'
36
- # For the ` main ` branch, create a pipeline (this includes on schedules, pushes, merges, etc.).
37
- - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
38
- # For tags, create a pipeline.
39
- - if: '$CI_COMMIT_TAG'
40
-
41
- .test_template-current: &test_definition-current
42
- stage: test
43
- script:
44
- # || true so we don't fail here, because it'll probably work even if the gem update fails
45
- - gem update --silent --system > /dev/null 2>&1 || true
46
- - mkdir -p vendor/bundle
47
- - bundle config set path 'vendor/bundle'
48
- - chmod +t -R vendor/bundle
49
- - chmod o-w -R vendor/bundle
50
- # Setup appraisal2
51
- - bundle install
52
- # Bundle a specific appraisal
53
- - bundle exec appraisal unlocked_deps bundle install
54
- # Light smoke test
55
- - bundle exec appraisal unlocked_deps bin/rake --tasks
56
- # Run tests, skipping those that won't work in CI
57
- - >
58
- bundle exec appraisal unlocked_deps \
59
- bin/rspec spec \
60
- --tag \~ci_skip \
61
- --format progress \
62
- --format RspecJunitFormatter
63
- cache:
64
- key: ${CI_JOB_IMAGE}
65
- paths:
66
- - vendor/ruby
67
-
68
- .test_template-legacy: &test_definition-legacy
69
- stage: test
70
- script:
71
- # RUBYGEMS_VERSION because we support EOL Ruby still...
72
- # || true so we don't fail here, because it'll probably work even if the gem update fails
73
- - gem install rubygems-update -v ${RUBYGEMS_VERSION} || true
74
- # Actually updates both RubyGems and Bundler!
75
- - update_rubygems
76
- - mkdir -p vendor/bundle
77
- - bundle config set path 'vendor/bundle'
78
- - chmod +t -R vendor/bundle
79
- - chmod o-w -R vendor/bundle
80
- # Setup appraisal2
81
- - bundle install
82
- # Bundle a specific appraisal
83
- - bundle exec appraisal ${APPRAISAL} bundle install
84
- # Light smoke test
85
- - bundle exec appraisal ${APPRAISAL} bin/rake --tasks
86
- # Run tests, skipping those that won't work in CI
87
- - >
88
- bundle exec appraisal ${APPRAISAL} \
89
- bin/rspec spec \
90
- --tag \~ci_skip \
91
- --format progress \
92
- --format RspecJunitFormatter
93
- cache:
94
- key: ${CI_JOB_IMAGE}
95
- paths:
96
- - vendor/ruby
97
-
98
- ruby-current:
99
- variables:
100
- K_SOUP_COV_DO: true
101
- <<: *test_definition-current
102
- parallel:
103
- matrix:
104
- - RUBY_VERSION: ["3.2", "3.3", "3.4"]
105
-
106
- ruby-ruby3_1:
107
- variables:
108
- RUBYGEMS_VERSION: "3.6.9"
109
- APPRAISAL: ruby-3-1
110
- K_SOUP_COV_DO: false
111
- <<: *test_definition-legacy
112
- parallel:
113
- matrix:
114
- - RUBY_VERSION: ["3.1"]
115
-
116
- ruby-ruby3_0:
117
- variables:
118
- RUBYGEMS_VERSION: "3.5.23"
119
- APPRAISAL: ruby-3-0
120
- K_SOUP_COV_DO: false
121
- <<: *test_definition-legacy
122
- parallel:
123
- matrix:
124
- - RUBY_VERSION: ["3.0"]
125
-
126
- ruby-ruby2_7:
127
- variables:
128
- RUBYGEMS_VERSION: "3.4.22"
129
- APPRAISAL: ruby-2-7
130
- K_SOUP_COV_DO: false
131
- <<: *test_definition-legacy
132
- parallel:
133
- matrix:
134
- - RUBY_VERSION: ["2.7"]
data/.idea/.gitignore DELETED
@@ -1,45 +0,0 @@
1
- # Default ignored files
2
- /shelf/
3
- /workspace.xml
4
- # Editor-based HTTP Client requests
5
- /httpRequests/
6
- # Datasource local storage ignored files
7
- /dataSources/
8
- /dataSources.local.xml
9
-
10
- # Zencoder local files
11
- /zencoder/chats
12
- /zencoder-chat-index.xml
13
- /zencoder-chats-dedicated.xml
14
- # Local project config
15
- *.iml
16
-
17
- # Added: Ignore plugin state artifacts (machine-specific)
18
- /copilot*.xml
19
- /GitLink.xml
20
-
21
- # Added: Ignore task & usage statistics (contain local timestamps / paths)
22
- /tasks.xml
23
- /usage.statistics.xml
24
-
25
- # Added: Local inspection profiles (developer-specific customizations)
26
- /inspectionProfiles/
27
-
28
- # Added: Library & index caches (regenerated per machine)
29
- /libraries/
30
- /indexLayout.xml
31
- /indexes/
32
-
33
- # Added: Terminal, SSH, and other per-user runtime config
34
- /terminal/
35
- /sshConfigs/
36
-
37
- # Added: RubyMine misc SDK version drift (optional). Comment to share SDK config.
38
- # /misc.xml
39
-
40
- # Commit: VCS local mappings can be regenerated (optional). Comment to share settings.
41
- # /vcs.xml
42
-
43
- # Commit: Dictionary files (local spellcheck customizations)
44
- # /dictionaries/
45
-
@@ -1,49 +0,0 @@
1
- # Junie Project Guidelines Addendum: RBS Documentation
2
-
3
- This repository ships RBS type signatures under `sig/` which are included in the published gem and referenced by documentation tooling.
4
-
5
- RBS files must contain only valid RBS syntax. Do not embed Ruby code or YARD-style Ruby documentation constructs in `.rbs` files.
6
-
7
- Requirements for RBS documentation and signatures:
8
-
9
- - Use RBS comment style (`# ...`) for notes and documentation inside `.rbs` files.
10
- - Do not use Ruby heredocs (`<<-DOC`, `<<~RUBY`, etc.) or any Ruby code constructs in `.rbs` files.
11
- - Do not use Ruby metaprogramming notation like `class << self` in `.rbs`. For singleton methods, use:
12
- - `def self.method_name: ...`
13
- - Do not use `extend self` or `module self` in `.rbs`. Declare singleton methods explicitly with `def self.method_name: ...`.
14
- - Keep type aliases, interfaces, and method signatures in proper RBS form only (e.g., `def foo: (String) -> Integer`).
15
- - If you need to document parameters or returns, place brief comments above the signature lines using `#` and keep them RBS-friendly (no `@param` / `@return` tags from YARD).
16
-
17
- Examples:
18
-
19
- Valid (RBS):
20
-
21
- ```
22
- module Foo
23
- # Runs tasks
24
- def self.run: () -> void
25
- end
26
- ```
27
-
28
- Invalid (not allowed in .rbs):
29
-
30
- ```
31
- # Ruby syntax – not RBS
32
- class << self
33
- def run: () -> void
34
- end
35
-
36
- # Not supported across RBS versions; avoid in this project
37
- module self
38
- def run: () -> void
39
- end
40
-
41
- # Heredocs or any Ruby bodies are not allowed in .rbs
42
- def self.run: () -> void
43
- <<~DOC
44
- DOC
45
- end
46
- ```
47
-
48
- Enforcement:
49
- - CI and local builds may parse `.rbs` files during gem install or doc generation. Any non-RBS syntax can cause installation to fail. Keep `.rbs` clean to avoid such failures.
data/.junie/guidelines.md DELETED
@@ -1,141 +0,0 @@
1
- Project: kettle-dev — Development Guidelines (for advanced contributors)
2
-
3
- This document captures project-specific knowledge to streamline setup, testing, and ongoing development.
4
-
5
- 1. Build and configuration
6
- - ENV is controlled by `direnv`.
7
- - Two files are loaded:
8
- - .envrc — environment variables for local development, committed to source control
9
- - .env.local — environment variables that are not committed to source control. These setting override .envrc.
10
- - Run `direnv allow` after making changes to .envrc or .env.local.
11
- - See .envrc for details.
12
- - See .env.local.example for an example of what to put in .env.local.
13
- - See CONTRIBUTING.md for details on how to set up your local environment.
14
- - Ruby and Bundler
15
- - Runtime supports Ruby >= 1.9.2.
16
- - Development tooling targets Ruby >= 2.3 (minimum supported by setup-ruby GHA).
17
- - Use a recent Ruby (>= 3.4 recommended) for fastest setup and to exercise modern coverage behavior.
18
- - Install dependencies via Bundler in project root:
19
- - bundle install
20
- - Rake tasks (preferred entry points)
21
- - The Rakefile wires common workflows. Useful targets:
22
- - rake spec — run RSpec suite (also aliased via rake test)
23
- - rake coverage — run specs with coverage locally and open a report (requires kettle-soup-cover)
24
- - rake rubocop_gradual:autocorrect — RuboCop-LTS Gradual, with autocorrect as default task
25
- - rake reek and rake reek:update — code smell checks and persisted snapshots in REEK
26
- - rake yard — generate YARD docs for lib and selected extra files
27
- - rake bundle:audit and rake bundle:audit:update — dependency vulnerability checks
28
- - rake build / rake release — gem build/release helper tasks (Bundler + stone_checksums)
29
- - The default rake target runs a curated set of tasks; this varies for CI vs local (see CI env var logic in Rakefile).
30
- - Always run the default rake task prior commits, and after making changes to lib/ code, or *.md files, to allow the linter to autocorrect, and to generate updated documentation.
31
- - Coverage orchestration
32
- - Coverage is controlled by kettle-soup-cover and .simplecov. Thresholds (line and branch) are enforced and can fail the process.
33
- - Thresholds are primarily controlled by environment variables (see .simplecov and comments therein) typically loaded via direnv (.envrc) and CI workflow (.github/workflows/coverage.yml). When running only a test subset, thresholds may fail; see Testing below.
34
- - Gem signing (for releases)
35
- - Signing is enabled unless SKIP_GEM_SIGNING is set. If enabled and certificates are present (certs/<USER>.pem), gem build will attempt to sign using ~/.ssh/gem-private_key.pem.
36
- - See CONTRIBUTING.md for releasing details; use SKIP_GEM_SIGNING when building in environments without the private key.
37
- - Important for local testing (to avoid hanging prompts): ALWAYS skip signing when building locally to test the packaging or install process. Without the private key password, the build will wait indefinitely at a signing prompt.
38
- - One-off commands (recommended):
39
- - SKIP_GEM_SIGNING=true gem build kettle-dev.gemspec
40
- - SKIP_GEM_SIGNING=true bundle exec rake build
41
- - SKIP_GEM_SIGNING=true bundle exec rake release # only to test workflow; do not actually push
42
- - direnv option (optional, not recommended globally): add `export SKIP_GEM_SIGNING=true` to your .env.local when you know you won’t be signing in this environment.
43
- - Remove or unset SKIP_GEM_SIGNING when performing a real, signed release in the environment that has the private key.
44
-
45
- 2. Testing
46
- - Framework and helpers
47
- - RSpec 3.13 with custom spec/spec_helper.rb configuration:
48
- - silent_stream: STDOUT is silenced by default for examples to keep logs clean.
49
- - To explicitly test console output, tag the example or group with :check_output.
50
- - DEBUG toggle: Set DEBUG=true to require 'debug' and avoid silencing output during your run.
51
- - ENV seeding: The suite sets ENV["FLOSS_FUNDING_FLOSS_FUNDING"] = "Free-as-in-beer" so that the library’s own namespace is considered activated (avoids noisy warnings).
52
- - Coverage: kettle-soup-cover integrates SimpleCov; .simplecov is invoked from spec_helper when enabled by Kettle::Soup::Cover::DO_COV, which is controlled by K_SOUP_COV_DO being set to true / false.
53
- - RSpec.describe usage:
54
- - Use `describe "#<method_name>"` to contain a block of specs that test instance method behavior.
55
- - Use `describe "::<method_name>"` to contain a block of specs that test class method behavior.
56
- - Do not use `describe ".<method_name>"` because the dot is ambiguous w.r.t instance vs. class methods.
57
- - When adding new code or modifying existing code always add tests to cover the updated behavior, including branches, and different types of expected and unexpected inputs.
58
- - Additional test utilities:
59
- - rspec-stubbed_env: Use stub_env to control ENV safely within examples.
60
- - timecop-rspec: Time manipulation is available, and is setup by kettle-test.
61
- - To freeze time use `freeze: Time.new(*args)` tag on an example or group
62
- - Running tests (verified)
63
- - Full suite (recommended to satisfy coverage thresholds):
64
- - bin/rspec
65
- - or: bundle exec rspec
66
- - or: bundle exec rake spec
67
- - Progress format (less verbose):
68
- - bundle exec rspec --format progress
69
- - Focused runs
70
- - You can run a single file or example, but note: coverage thresholds need to be disabled with K_SOUP_COV_MIN_HARD=false
71
- - Example: K_SOUP_COV_MIN_HARD=false bin/rspec spec/kettle-dev/class_spec.rb:42
72
- - Output visibility
73
- - To see STDOUT from the code under test, use the :check_output tag on the example or group.
74
- Example:
75
- RSpec.describe "with output", :check_output do
76
- it "has output" do
77
- output = capture(:stderr) {kernel.warn("This is a warning")}
78
- logs = [ "This is a warning\n" ]
79
- expect(output).to(include(*logs))
80
- end
81
- end
82
- - Alternatively, run with DEBUG=true to disable silencing for the entire run.
83
- - During a spec run, the presence of output about missing activation keys is often expected, since it is literally what this library is for. It only indicates a failure if the spec expected all activation keys to be present, and not all specs do.
84
- - Adding new tests (guidelines)
85
- - Organize specs by class/module. Do not create per-task umbrella spec files; add examples to the existing spec for the class/module under test, or create a new spec file for that class/module if one does not exist. Only create a standalone scenario spec when it intentionally spans multiple classes for an integration/benchmark scenario (e.g., bench_integration_spec), and name it accordingly.
86
- - Spec file names must map to a real class or module under lib/ (mirror the path). Do not introduce specs for non-existent classes or ad-hoc names (e.g., avoid template_helpers_replacements_spec.rb when testing Kettle::Dev::TemplateHelpers; add those examples to template_helpers_spec.rb).
87
- - REQUIRED: Provide unit tests for every class, module, constant, and public method. Place them in spec/ mirroring the path under lib/. When a file under lib/ is added or changed, ensure a corresponding spec file exists/updated for it.
88
- - Add tests for all public methods and add contexts for variations of their arguments, and arity.
89
- - This repository targets near-100% coverage of its public API; when you add new public methods, rake tasks to a rakelib, or config behavior, add or update specs accordingly.
90
- - Place new specs under spec/ mirroring lib/ structure where possible. Do not require "spec_helper" at the top of spec files, as it is automatically loaded by .rspec.
91
- - If your code relies on environment variables that drive activation (see "Activation env vars" below), prefer using rspec-stubbed_env:
92
- - it does not support stubbing with blocks, but it does automatically clean up after itself.
93
- - the below config is included in all spec scenarios by the kettle-test gem, so no need to do it again; it is here for reference:
94
- include_context 'with stubbed env'
95
- - in a before hook, or in an example:
96
- stub_env("FLOSS_FUNDING_MY_NS" => "Free-as-in-beer")
97
- # example code continues
98
- - If your spec needs to assert on console output, tag it with :check_output. By default, STDOUT is silenced.
99
- - Use Timecop for deterministic time-sensitive behavior as needed (require config/timecop is already done by spec_helper).
100
-
101
- - Types and documentation
102
- - REQUIRED: All public APIs must have RBS type signatures checked into sig/ under the corresponding path. When you add a new public method or change a signature, update the matching .rbs file.
103
- - REQUIRED: All public methods must include inline YARD docs with @param/@return (and @yield/@option where applicable). Generate docs with `bundle exec rake yard` to verify formatting.
104
-
105
- 3. Additional development information
106
- - Code style and static analysis
107
- - RuboCop-LTS (Gradual) is integrated. Use:
108
- - bundle exec rake rubocop_gradual:autocorrect
109
- - bundle exec rake rubocop_gradual:force_update # only run if there are still linting violations the default rake task, which includes autocorrect locally, or a standalone autocorrect task, has run, and failed, and the violations won't be fixed
110
- - Reek is configured to scan {lib,spec,tests}/**/*.rb. Use:
111
- - bundle exec rake reek
112
- - bundle exec rake reek:update # writes current output to REEK, fails on smells
113
- - Keep REEK file updated with intentional smells snapshot when appropriate (e.g., after refactors).
114
- - Locally, the default rake task includes reek:update.
115
- - Documentation
116
- - Generate YARD docs with: bundle exec rake yard. It includes lib/**/*.rb and extra docs like README.md, CHANGELOG.md, RUBOCOP.md, REEK, etc.
117
- - Appraisal and multi-gemfile testing
118
- - appraisal2 is present to manage multiple dependency sets; see Appraisals and gemfiles/modular/*.gemfile. If you need to verify against alternate dependency versions, use Appraisal to install and run rspec under those Gemfiles.
119
- - You can run a single github workflow by running `act -W /github/workflows/<workflow name>.yml`
120
- - CI/local differences and defaults
121
- - The Rakefile adjusts default tasks based on CI env var. Locally, rake default may include coverage, reek:update, yard, etc. On CI, it tends to just run spec.
122
-
123
- Quick start
124
- 1) bundle install
125
- 2) K_SOUP_COV_FORMATTERS="json" bin/rspec (generates a JSON coverage report with both line and branch data in coverage/. Use this single format.)
126
- 3) Static analysis: bundle exec rake rubocop_gradual:check && bundle exec rake reek
127
-
128
- Notes
129
- - ALWAYS Run bundle exec rake rubocop_gradual:autocorrect as the final step before completing a task, to lint and autocorrect any remaining issues. Then if there are new lint failures, attempt to correct them manually.
130
- - NEVER run vanilla rubocop, as it won't handle the linting config properly. Always run rubocop_gradual:autocorrect or rubocop_gradual.
131
- - Running only a subset of specs is supported but in order to bypass the hard failure due to coverage thresholds, you need to run with K_SOUP_COV_MIN_HARD=false.
132
- - When adding code that writes to STDOUT, remember most specs silence output unless tagged with :check_output or DEBUG=true.
133
- - Completion criteria after changes: Only consider your change “done” when the relevant examples pass, as verified by .rspec_status. Do not rely on STDOUT impressions; consult .rspec_status (and example IDs) to confirm green results for the affected files/examples. If you ran a subset, re-run the full suite before finalizing to restore coverage thresholds.
134
- - Coverage reports: NEVER review the HTML report. Use JSON (preferred), XML, LCOV, or RCOV. For this project, always run tests with K_SOUP_COV_FORMATTERS set to "json".
135
- - Do NOT modify .envrc in tasks; when running tests locally or in scripts, manually prefix each run, e.g.: K_SOUP_COV_FORMATTERS="json" bin/rspec
136
- - For all the kettle-soup-cover options, see .envrc and find the K_SOUP_COV_* env vars.
137
- - NEVER modify ENV variables in tests directly. Always use the stub_env macro from the rspec-stubbed_env gem (more details in the testing section above).
138
-
139
- Important documentation rules
140
- - Do NOT edit files under docs/ manually; they are generated by `bundle exec rake yard` as part of the default rake task.
141
- - Clarification: Executable scripts provided by this gem (exe/* and installed binstubs) work when the gem is installed as a system gem (gem install kettle-dev). However, the Rake tasks provided by this gem require kettle-dev to be declared as a development dependency in the host project's Gemfile and loaded in the project's Rakefile.
@@ -1,140 +0,0 @@
1
- Project: kettle-dev — Development Guidelines (for advanced contributors)
2
-
3
- This document captures project-specific knowledge to streamline setup, testing, and ongoing development.
4
-
5
- 1. Build and configuration
6
- - ENV is controlled by `direnv`.
7
- - Two files are loaded:
8
- - .envrc — environment variables for local development, committed to source control
9
- - .env.local — environment variables that are not committed to source control. These setting override .envrc.
10
- - Run `direnv allow` after making changes to .envrc or .env.local.
11
- - See .envrc for details.
12
- - See .env.local.example for an example of what to put in .env.local.
13
- - See CONTRIBUTING.md for details on how to set up your local environment.
14
- - Ruby and Bundler
15
- - Runtime supports Ruby >= {K_D_MIN_RUBY}
16
- - Development tooling targets Ruby >= {K_D_MIN_DEV_RUBY} (minimum supported by setup-ruby GHA).
17
- - Use a recent Ruby (>= 3.4 recommended) for fastest setup and to exercise modern coverage behavior.
18
- - Install dependencies via Bundler in project root:
19
- - bundle install
20
- - Rake tasks (preferred entry points)
21
- - The Rakefile wires common workflows. Useful targets:
22
- - rake spec — run RSpec suite (also aliased via rake test)
23
- - rake coverage — run specs with coverage locally and open a report (requires kettle-soup-cover)
24
- - rake rubocop_gradual:autocorrect — RuboCop-LTS Gradual, with autocorrect as default task
25
- - rake reek and rake reek:update — code smell checks and persisted snapshots in REEK
26
- - rake yard — generate YARD docs for lib and selected extra files
27
- - rake bundle:audit and rake bundle:audit:update — dependency vulnerability checks
28
- - rake build / rake release — gem build/release helper tasks (Bundler + stone_checksums)
29
- - The default rake target runs a curated set of tasks; this varies for CI vs local (see CI env var logic in Rakefile).
30
- - Always run the default rake task prior commits, and after making changes to lib/ code, or *.md files, to allow the linter to autocorrect, and to generate updated documentation.
31
- - Coverage orchestration
32
- - Coverage is controlled by kettle-soup-cover and .simplecov. Thresholds (line and branch) are enforced and can fail the process.
33
- - Thresholds are primarily controlled by environment variables (see .simplecov and comments therein) typically loaded via direnv (.envrc) and CI workflow (.github/workflows/coverage.yml). When running only a test subset, thresholds may fail; see Testing below.
34
- - Gem signing (for releases)
35
- - Signing is enabled unless SKIP_GEM_SIGNING is set. If enabled and certificates are present (certs/<USER>.pem), gem build will attempt to sign using ~/.ssh/gem-private_key.pem.
36
- - See CONTRIBUTING.md for releasing details; use SKIP_GEM_SIGNING when building in environments without the private key.
37
- - Important for local testing (to avoid hanging prompts): ALWAYS skip signing when building locally to test the packaging or install process. Without the private key password, the build will wait indefinitely at a signing prompt.
38
- - One-off commands (recommended):
39
- - SKIP_GEM_SIGNING=true gem build kettle-dev.gemspec
40
- - SKIP_GEM_SIGNING=true bundle exec rake build
41
- - SKIP_GEM_SIGNING=true bundle exec rake release # only to test workflow; do not actually push
42
- - direnv option (optional, not recommended globally): add `export SKIP_GEM_SIGNING=true` to your .env.local when you know you won’t be signing in this environment.
43
- - Remove or unset SKIP_GEM_SIGNING when performing a real, signed release in the environment that has the private key.
44
-
45
- 2. Testing
46
- - Framework and helpers
47
- - RSpec 3.13 with custom spec/spec_helper.rb configuration:
48
- - silent_stream: STDOUT is silenced by default for examples to keep logs clean.
49
- - To explicitly test console output, tag the example or group with :check_output.
50
- - DEBUG toggle: Set DEBUG=true to require 'debug' and avoid silencing output during your run.
51
- - Coverage: kettle-soup-cover integrates SimpleCov; .simplecov is invoked from spec_helper when enabled by Kettle::Soup::Cover::DO_COV, which is controlled by K_SOUP_COV_DO being set to true / false.
52
- - RSpec.describe usage:
53
- - Use `describe "#<method_name>"` to contain a block of specs that test instance method behavior.
54
- - Use `describe "::<method_name>"` to contain a block of specs that test class method behavior.
55
- - Do not use `describe ".<method_name>"` because the dot is ambiguous w.r.t instance vs. class methods.
56
- - When adding new code or modifying existing code always add tests to cover the updated behavior, including branches, and different types of expected and unexpected inputs.
57
- - Additional test utilities:
58
- - rspec-stubbed_env: Use stub_env to control ENV safely within examples.
59
- - timecop-rspec: Time manipulation is available, and is setup by kettle-test.
60
- - To freeze time use `freeze: Time.new(*args)` tag on an example or group
61
- - Running tests (verified)
62
- - Full suite (recommended to satisfy coverage thresholds):
63
- - bin/rspec
64
- - or: bundle exec rspec
65
- - or: bundle exec rake spec
66
- - Progress format (less verbose):
67
- - bundle exec rspec --format progress
68
- - Focused runs
69
- - You can run a single file or example, but note: coverage thresholds need to be disabled with K_SOUP_COV_MIN_HARD=false
70
- - Example: K_SOUP_COV_MIN_HARD=false bin/rspec spec/kettle-dev/class_spec.rb:42
71
- - Output visibility
72
- - To see STDOUT from the code under test, use the :check_output tag on the example or group.
73
- Example:
74
- RSpec.describe "with output", :check_output do
75
- it "has output" do
76
- output = capture(:stderr) {kernel.warn("This is a warning")}
77
- logs = [ "This is a warning\n" ]
78
- expect(output).to(include(*logs))
79
- end
80
- end
81
- - Alternatively, run with DEBUG=true to disable silencing for the entire run.
82
- - During a spec run, the presence of output about missing activation keys is often expected, since it is literally what this library is for. It only indicates a failure if the spec expected all activation keys to be present, and not all specs do.
83
- - Adding new tests (guidelines)
84
- - Organize specs by class/module. Do not create per-task umbrella spec files; add examples to the existing spec for the class/module under test, or create a new spec file for that class/module if one does not exist. Only create a standalone scenario spec when it intentionally spans multiple classes for an integration/benchmark scenario (e.g., bench_integration_spec), and name it accordingly.
85
- - Spec file names must map to a real class or module under lib/ (mirror the path). Do not introduce specs for non-existent classes or ad-hoc names (e.g., avoid template_helpers_replacements_spec.rb when testing Kettle::Dev::TemplateHelpers; add those examples to template_helpers_spec.rb).
86
- - REQUIRED: Provide unit tests for every class, module, constant, and public method. Place them in spec/ mirroring the path under lib/. When a file under lib/ is added or changed, ensure a corresponding spec file exists/updated for it.
87
- - Add tests for all public methods and add contexts for variations of their arguments, and arity.
88
- - This repository targets near-100% coverage of its public API; when you add new public methods, rake tasks to a rakelib, or config behavior, add or update specs accordingly.
89
- - Place new specs under spec/ mirroring lib/ structure where possible. Do not require "spec_helper" at the top of spec files, as it is automatically loaded by .rspec.
90
- - If your code relies on environment variables that drive activation (see "Activation env vars" below), prefer using rspec-stubbed_env:
91
- - it does not support stubbing with blocks, but it does automatically clean up after itself.
92
- - the below config is included in all spec scenarios by the kettle-test gem, so no need to do it again; it is here for reference:
93
- include_context 'with stubbed env'
94
- - in a before hook, or in an example:
95
- stub_env("FLOSS_FUNDING_MY_NS" => "Free-as-in-beer")
96
- # example code continues
97
- - If your spec needs to assert on console output, tag it with :check_output. By default, STDOUT is silenced.
98
- - Use Timecop for deterministic time-sensitive behavior as needed (require config/timecop is already done by spec_helper).
99
-
100
- - Types and documentation
101
- - REQUIRED: All public APIs must have RBS type signatures checked into sig/ under the corresponding path. When you add a new public method or change a signature, update the matching .rbs file.
102
- - REQUIRED: All public methods must include inline YARD docs with @param/@return (and @yield/@option where applicable). Generate docs with `bundle exec rake yard` to verify formatting.
103
-
104
- 3. Additional development information
105
- - Code style and static analysis
106
- - RuboCop-LTS (Gradual) is integrated. Use:
107
- - bundle exec rake rubocop_gradual:autocorrect
108
- - bundle exec rake rubocop_gradual:force_update # only run if there are still linting violations the default rake task, which includes autocorrect locally, or a standalone autocorrect task, has run, and failed, and the violations won't be fixed
109
- - Reek is configured to scan {lib,spec,tests}/**/*.rb. Use:
110
- - bundle exec rake reek
111
- - bundle exec rake reek:update # writes current output to REEK, fails on smells
112
- - Keep REEK file updated with intentional smells snapshot when appropriate (e.g., after refactors).
113
- - Locally, the default rake task includes reek:update.
114
- - Documentation
115
- - Generate YARD docs with: bundle exec rake yard. It includes lib/**/*.rb and extra docs like README.md, CHANGELOG.md, RUBOCOP.md, REEK, etc.
116
- - Appraisal and multi-gemfile testing
117
- - appraisal2 is present to manage multiple dependency sets; see Appraisals and gemfiles/modular/*.gemfile. If you need to verify against alternate dependency versions, use Appraisal to install and run rspec under those Gemfiles.
118
- - You can run a single github workflow by running `act -W /github/workflows/<workflow name>.yml`
119
- - CI/local differences and defaults
120
- - The Rakefile adjusts default tasks based on CI env var. Locally, rake default may include coverage, reek:update, yard, etc. On CI, it tends to just run spec.
121
-
122
- Quick start
123
- 1) bundle install
124
- 2) K_SOUP_COV_FORMATTERS="json" bin/rspec (generates a JSON coverage report with both line and branch data in coverage/. Use this single format.)
125
- 3) Static analysis: bundle exec rake rubocop_gradual:check && bundle exec rake reek
126
-
127
- Notes
128
- - ALWAYS Run bundle exec rake rubocop_gradual:autocorrect as the final step before completing a task, to lint and autocorrect any remaining issues. Then if there are new lint failures, attempt to correct them manually.
129
- - NEVER run vanilla rubocop, as it won't handle the linting config properly. Always run rubocop_gradual:autocorrect or rubocop_gradual.
130
- - Running only a subset of specs is supported but in order to bypass the hard failure due to coverage thresholds, you need to run with K_SOUP_COV_MIN_HARD=false.
131
- - When adding code that writes to STDOUT, remember most specs silence output unless tagged with :check_output or DEBUG=true.
132
- - Completion criteria after changes: Only consider your change “done” when the relevant examples pass, as verified by .rspec_status. Do not rely on STDOUT impressions; consult .rspec_status (and example IDs) to confirm green results for the affected files/examples. If you ran a subset, re-run the full suite before finalizing to restore coverage thresholds.
133
- - Coverage reports: NEVER review the HTML report. Use JSON (preferred), XML, LCOV, or RCOV. For this project, always run tests with K_SOUP_COV_FORMATTERS set to "json".
134
- - Do NOT modify .envrc in tasks; when running tests locally or in scripts, manually prefix each run, e.g.: K_SOUP_COV_FORMATTERS="json" bin/rspec
135
- - For all the kettle-soup-cover options, see .envrc and find the K_SOUP_COV_* env vars.
136
- - NEVER modify ENV variables in tests directly. Always use the stub_env macro from the rspec-stubbed_env gem (more details in the testing section above).
137
-
138
- Important documentation rules
139
- - Do NOT edit files under docs/ manually; they are generated by `bundle exec rake yard` as part of the default rake task.
140
- - Clarification: Executable scripts provided by this gem (exe/* and installed binstubs) work when the gem is installed as a system gem (gem install kettle-dev). However, the Rake tasks provided by this gem require kettle-dev to be declared as a development dependency in the host project's Gemfile and loaded in the project's Rakefile.
data/.licenserc.yaml DELETED
@@ -1,7 +0,0 @@
1
- header:
2
- license:
3
- spdx-id: MIT
4
-
5
- dependency:
6
- files:
7
- - Gemfile.lock
data/.opencollective.yml DELETED
@@ -1,3 +0,0 @@
1
- collective: "kettle-rb"
2
- readme-backers-commit-subject: "💸 Thanks 🙏 to our new backers 🎒 and subscribers 📜"
3
- readme-osc-tag: "OPENCOLLECTIVE"
@@ -1,3 +0,0 @@
1
- collective: "{OPENCOLLECTIVE|ORG_NAME}"
2
- readme-backers-commit-subject: "💸 Thanks 🙏 to our new backers 🎒 and subscribers 📜"
3
- readme-osc-tag: "OPENCOLLECTIVE"