kettle-jem 7.1.42 → 7.1.43

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 (41) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/CHANGELOG.md +67 -7
  4. data/README.md +27 -0
  5. data/lib/kettle/jem/ci/harden_macos_ca_bundle.sh +75 -0
  6. data/lib/kettle/jem/tasks/install_task.rb +2 -2
  7. data/lib/kettle/jem/templates/.duel.rb.example +10 -0
  8. data/lib/kettle/jem/templates/.git-hooks/commit-msg.example +6 -6
  9. data/lib/kettle/jem/templates/.git-hooks/commit-subjects-goalie.txt.example +7 -1
  10. data/lib/kettle/jem/templates/.github/workflows/current.yml.example +1 -1
  11. data/lib/kettle/jem/templates/.github/workflows/dependency-review.yml.example +1 -1
  12. data/lib/kettle/jem/templates/.github/workflows/discord-notifier.yml.example +1 -1
  13. data/lib/kettle/jem/templates/.github/workflows/perf-comment.yml.example +92 -0
  14. data/lib/kettle/jem/templates/.github/workflows/perf.yml.example +152 -69
  15. data/lib/kettle/jem/templates/.structuredmerge/kettle-jem.yml.example +2 -2
  16. data/lib/kettle/jem/templates/Appraisals.example +12 -0
  17. data/lib/kettle/jem/templates/CONTRIBUTING.md.example +5 -1
  18. data/lib/kettle/jem/templates/Gemfile.example +3 -1
  19. data/lib/kettle/jem/templates/gem.gemspec.example +10 -6
  20. data/lib/kettle/jem/templates/gemfiles/modular/debug.gemfile.example +1 -1
  21. data/lib/kettle/jem/templates/gemfiles/modular/documentation.gemfile.example +5 -5
  22. data/lib/kettle/jem/templates/gemfiles/modular/duel.gemfile.example +1 -1
  23. data/lib/kettle/jem/templates/gemfiles/modular/optional.gemfile.example +1 -1
  24. data/lib/kettle/jem/templates/gemfiles/modular/ostruct/r4/v0.6.gemfile.example +1 -1
  25. data/lib/kettle/jem/templates/gemfiles/modular/rspec.gemfile.example +12 -4
  26. data/lib/kettle/jem/templates/gemfiles/modular/rspec_junit_formatter/r2/v0.6.gemfile.example +7 -0
  27. data/lib/kettle/jem/templates/gemfiles/modular/rspec_junit_formatter/r3/v0.8.gemfile.example +2 -0
  28. data/lib/kettle/jem/templates/gemfiles/modular/rspec_junit_formatter/r3.2/v0.6.gemfile.example +7 -0
  29. data/lib/kettle/jem/templates/gemfiles/modular/rspec_junit_formatter/r4/v0.8.gemfile.example +2 -0
  30. data/lib/kettle/jem/templates/gemfiles/modular/style_local.gemfile.example +1 -1
  31. data/lib/kettle/jem/templates/gemfiles/modular/templating.gemfile.example +2 -1
  32. data/lib/kettle/jem/templates/gemfiles/modular/templating_local.gemfile.example +34 -18
  33. data/lib/kettle/jem/templates/gemfiles/modular/x_std_libs.gemfile.example +10 -2
  34. data/lib/kettle/jem/templates/readme/partials/configuration.md.example +3 -0
  35. data/lib/kettle/jem/templates/shim/Gemfile.example +1 -1
  36. data/lib/kettle/jem/templates/shim/gem.gemspec.example +3 -3
  37. data/lib/kettle/jem/version.rb +1 -1
  38. data/lib/kettle/jem.rb +725 -100
  39. data.tar.gz.sig +3 -2
  40. metadata +1188 -1037
  41. metadata.gz.sig +0 -0
@@ -4,39 +4,43 @@ name: Perf
4
4
  # baseline and on this code side by side, and fails if this code is slower.
5
5
  # See .duel.rb and https://github.com/sferik/duel-ruby
6
6
 
7
- # The Duel job runs this branch's code, so it only reads. Commenting is a
8
- # job of its own, which runs none of it.
7
+ # The Duel job runs this branch's code, so it only reads. Marking a push
8
+ # passed is a job of its own, which runs none of it, and commenting on a
9
+ # pull request is the Perf comment workflow's.
9
10
  permissions:
10
11
  contents: read
12
+ pull-requests: read # for the pull request's labels (see c.accept_label)
11
13
 
12
14
  on:
13
15
  pull_request:
16
+ merge_group: # (a merge queue's)
14
17
  push:
15
18
  branches:
16
- - 'main'
19
+ - 'main' # (and any other branch to guard, a stable one, say)
17
20
  schedule:
18
21
  - cron: "0 4 * * *"
19
22
  # Allow manually triggering the workflow.
20
23
  workflow_dispatch:
21
24
 
22
- # Cancels a pull request's previous runs that have not yet completed. Every
23
- # other run is a group of its own, so none is cancelled: each push to main
24
- # is compared with the commit before it, and a cancelled run would skip
25
- # that comparison.
25
+ # A pull request's newer push cancels its run, if that's still going, as
26
+ # only its newest commit's result counts. Every other run (a push's, say)
27
+ # runs to the end, so that each push is compared.
26
28
  concurrency:
27
- group: "${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}"
28
- cancel-in-progress: true
29
+ group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.run_id }}
30
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
29
31
 
30
32
  jobs:
31
33
  duel:
32
34
  if: "github.event_name != 'push' || (!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]'))"
33
35
  name: Duel
34
36
  runs-on: ubuntu-latest
35
- # Whether the Comment job comments (post, change or none), and the
36
- # run's status (passed, failed or neutral), from Duel.
37
+ # Whether to comment (post, change or none), the run's status (passed,
38
+ # failed or neutral), and whether to mark a push passed (true, or
39
+ # nothing), from Duel.
37
40
  outputs:
38
41
  comment: ${{ steps.compare.outputs.comment }}
39
42
  status: ${{ steps.compare.outputs.status }}
43
+ passed: ${{ steps.compare.outputs.passed }}
40
44
  env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps
41
45
  # The perf appraisal: the gemspec's dependencies and Duel (Ruby 3.4 or later)
42
46
  BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/perf.gemfile
@@ -47,25 +51,73 @@ jobs:
47
51
  fetch-depth: 0 # the baseline comes from history, tags included
48
52
  persist-credentials: false
49
53
 
54
+ # The labels of the pull request (or for a push, of the one that
55
+ # merged it), for c.accept_label in .duel.rb, as a JSON array. They're
56
+ # read as the job runs, and adding the label (or taking it off) runs
57
+ # the job again: see the Perf comment workflow.
58
+ # On a schedule, the last commit since the last release that merged a
59
+ # pull request with the label (ACCEPT_LABEL, as .duel.rb names it):
60
+ # what that slowed down was accepted, so it's compared with instead.
61
+ - name: Find the pull request's labels
62
+ id: labels
63
+ if: github.event_name == 'pull_request' || github.event_name == 'merge_group' || github.event_name == 'push' || github.event_name == 'schedule'
64
+ continue-on-error: true # (without them, nothing's accepted)
65
+ env:
66
+ GH_TOKEN: ${{ github.token }}
67
+ PR: ${{ github.event.pull_request.number }}
68
+ QUEUED: ${{ github.event.merge_group.head_ref }}
69
+ ACCEPT_LABEL: 'duel: accept'
70
+ RELEASE_TAGS: "v*"
71
+ run: |
72
+ if [ "$GITHUB_EVENT_NAME" = schedule ]; then
73
+ tag=$(git describe --tags --abbrev=0 --match "$RELEASE_TAGS" HEAD^ 2>/dev/null) || exit 0
74
+ since=$(TZ=UTC git log -1 --date=format-local:%Y-%m-%dT%H:%M:%SZ --format=%cd "$tag")
75
+ merged=$(gh pr list --repo "$GITHUB_REPOSITORY" --state merged --label "$ACCEPT_LABEL" --search "merged:>=$since" --limit 1000 \
76
+ --json mergeCommit --jq '.[].mergeCommit.oid')
77
+ accepted=$(git rev-list "$tag..HEAD" | grep -Fx -m 1 -f <(echo "$merged")) || accepted=
78
+ echo "accepted=$accepted" >> "$GITHUB_OUTPUT"
79
+ exit 0
80
+ fi
81
+ # (In a merge queue, the last pull request queued, which the queue's
82
+ # branch names: gh-readonly-queue/main/pr-123-<sha>.)
83
+ if [ -n "$QUEUED" ]; then
84
+ PR=${QUEUED##*/pr-}
85
+ PR=${PR%%-*}
86
+ fi
87
+ if [ -n "$PR" ]; then
88
+ labels=$(gh api "repos/$GITHUB_REPOSITORY/issues/$PR/labels" --jq '[.[].name]')
89
+ else
90
+ labels=$(gh api "repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/pulls" --jq '[.[0].labels[]?.name]')
91
+ fi
92
+ echo "labels=$labels" >> "$GITHUB_OUTPUT"
93
+
50
94
  # .duel.rb sets c.ruby = :version_file, so each version runs on the Ruby
51
95
  # that its own version file names (.ruby-version, .tool-versions, or
52
96
  # mise.toml, the first that names one, as Duel reads them). When the
53
97
  # baseline's names another Ruby than this one's, install that Ruby too,
54
98
  # and link it where Duel finds it. The baseline is the one the Compare
55
- # step uses: the main branch for a pull request, the commit before a
56
- # push, the last release on a schedule (the newest v* tag before HEAD,
57
- # as Duel finds it), and where HEAD left the default branch when run by
58
- # hand.
99
+ # step uses: the branch it targets for a pull request, a merge queue's
100
+ # base, the commit before a push (or the last commit Duel passed, if
101
+ # there is one: see the Mark the commit passed job), the last release
102
+ # on a schedule (the newest v* tag before HEAD, as Duel finds it, or
103
+ # ACCEPTED, the last change accepted since then), and where HEAD left
104
+ # the default branch when run by hand.
59
105
  - name: Find the baseline's Ruby
60
106
  id: baseline
61
107
  env:
62
108
  BEFORE: ${{ github.event.before }}
109
+ QUEUE_BASE: ${{ github.event.merge_group.base_sha }}
110
+ PASSED: origin/duel/passed/${{ github.ref_name }}
63
111
  DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
112
+ ACCEPTED: ${{ steps.labels.outputs.accepted }}
64
113
  run: |
65
114
  case "$GITHUB_EVENT_NAME" in
66
115
  pull_request) base="origin/$GITHUB_BASE_REF" ;;
67
- push) base="$BEFORE" ;;
68
- schedule) base=$(git describe --tags --abbrev=0 --match 'v*' HEAD^ 2>/dev/null) || base= ;;
116
+ push)
117
+ base=$BEFORE
118
+ if git merge-base --is-ancestor "$PASSED" HEAD 2>/dev/null; then base=$PASSED; fi ;;
119
+ merge_group) base=$QUEUE_BASE ;;
120
+ schedule) base=${ACCEPTED:-$(git describe --tags --abbrev=0 --match 'v*' HEAD^ 2>/dev/null)} || base= ;;
69
121
  *) base=$(git merge-base HEAD "origin/$DEFAULT_BRANCH" 2>/dev/null) || base= ;;
70
122
  esac
71
123
  ruby_of() {
@@ -92,7 +144,7 @@ jobs:
92
144
  - name: Setup the baseline's Ruby
93
145
  id: baseline-ruby
94
146
  if: steps.baseline.outputs.ruby != ''
95
- uses: ruby/setup-ruby@de492cf36cbab201753d720ce4f4e336cd688c94 # v1.336.0
147
+ uses: ruby/setup-ruby@78c62f2208e480ce3d5ae4dfd9b9e181acf48b63 # v1.344.0
96
148
  with:
97
149
  ruby-version: ${{ steps.baseline.outputs.ruby }}
98
150
  # The bundle for this Ruby too, which the baseline's workers load.
@@ -109,78 +161,109 @@ jobs:
109
161
 
110
162
  # The candidate's Ruby, from its version file (the same one Duel reads)
111
163
  - name: Setup Ruby & RubyGems
112
- uses: ruby/setup-ruby@de492cf36cbab201753d720ce4f4e336cd688c94 # v1.336.0
164
+ uses: ruby/setup-ruby@78c62f2208e480ce3d5ae4dfd9b9e181acf48b63 # v1.344.0
113
165
  with:
114
166
  bundler-cache: true
115
167
 
116
- # Against the main branch for a pull request, what was there before
117
- # for a push, and the last release on a schedule (slow creep). Duel
118
- # adds its report to the job's summary, writes it to duel.md for the
119
- # comment, and sets the step's outputs to say whether to comment, as
120
- # c.comment in .duel.rb says, whatever the outcome.
168
+ # Against the branch it targets for a pull request, the queue's base
169
+ # for a merge queue, what was there before for a push (or as
170
+ # c.push_base in .duel.rb says, the last commit Duel passed), and the
171
+ # last release on a schedule (slow creep). Duel adds its report to
172
+ # the job's summary, writes it to duel.md for the comment, and sets
173
+ # the step's outputs to say whether to comment, as c.comment in
174
+ # .duel.rb says, whatever the outcome.
121
175
  - name: Compare
122
176
  id: compare
123
177
  env:
124
- DUEL_BASE: ${{ github.event_name == 'schedule' && 'last-release' || github.event_name == 'push' && github.event.before || '' }}
178
+ DUEL_BASE: ${{ github.event_name == 'schedule' && 'last-release' || github.event_name == 'push' && github.event.before || github.event_name == 'merge_group' && github.event.merge_group.base_sha || '' }}
125
179
  # (Run by hand, it compares anyway: with nothing changed, the code
126
180
  # with itself, which checks the setup.)
127
181
  DUEL_FORCE: ${{ github.event_name == 'workflow_dispatch' && '1' || '' }}
182
+ DUEL_LABELS: ${{ steps.labels.outputs.labels }}
183
+ DUEL_ACCEPTED: ${{ steps.labels.outputs.accepted }}
184
+ run: bundle exec duel --markdown "$RUNNER_TEMP/duel/duel.md"
185
+
186
+ # For a pull request, what Duel said, for the Perf comment workflow,
187
+ # which can't see this job's outputs.
188
+ - name: Say whether to comment
189
+ if: ${{ !cancelled() && github.event_name == 'pull_request' }}
190
+ env:
191
+ PR: ${{ github.event.pull_request.number }}
192
+ COMMENT: ${{ steps.compare.outputs.comment }}
193
+ STATUS: ${{ steps.compare.outputs.status }}
128
194
  run: |
129
- # (A branch's first push, or one that rewrote history, has no
130
- # commit before it here to compare against.)
131
- if [ "$GITHUB_EVENT_NAME" = push ] && ! git cat-file -e "$DUEL_BASE^{commit}" 2>/dev/null; then
132
- echo "::notice::No commit before this push to compare against"
133
- exit 0
134
- fi
135
- bundle exec duel --markdown "$RUNNER_TEMP/duel.md"
195
+ mkdir -p "$RUNNER_TEMP/duel"
196
+ printf 'pr=%s\ncomment=%s\nstatus=%s\n' "$PR" "$COMMENT" "$STATUS" > "$RUNNER_TEMP/duel/comment.env"
136
197
 
137
- # The report, for the Comment job
198
+ # The report, for the comments
138
199
  - name: Keep the report
139
- if: ${{ !cancelled() && github.event_name == 'pull_request' }}
200
+ if: ${{ !cancelled() && (github.event_name == 'pull_request' || github.event_name == 'push') }}
140
201
  uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
141
202
  with:
142
203
  name: duel-report
143
- path: ${{ runner.temp }}/duel.md
144
- if-no-files-found: ignore # none when the comparison didn't run
204
+ path: ${{ runner.temp }}/duel/
205
+ if-no-files-found: ignore # none when Duel didn't get to compare
145
206
  retention-days: 1
146
207
 
147
- # The report, as a new comment on the pull request, when Duel says to:
148
- # always (post), or only when its last comment's status differs from
149
- # this run's (change), so the latest comment is never stale. It never
150
- # edits or deletes a comment. This job checks nothing out and runs none
151
- # of the branch's code, so it alone can write. (A pull request from a
152
- # fork gets no comment, as its token can't write one: the Duel job's
153
- # summary has the report.)
154
- comment:
155
- name: Comment
208
+ # With c.push_base = :last_passed in .duel.rb, a push is compared with
209
+ # the last commit Duel passed, which a branch marks (each branch pushed
210
+ # has its own), so slowdowns too small for any one push to fail add up
211
+ # until they fail one. This job moves the branch to a push that passed
212
+ # (or makes it), but never back: where a newer push's run moved it
213
+ # first, it stays. It checks nothing out and runs none of the code. To
214
+ # accept a regression, move the branch yourself (for main, git push
215
+ # origin main:duel/passed/main).
216
+ passed:
217
+ name: Mark the commit passed
156
218
  needs: duel
157
- if: ${{ !cancelled() && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && (needs.duel.outputs.comment == 'post' || needs.duel.outputs.comment == 'change') }}
219
+ # One at a time for each branch, so that two runs can't both find no
220
+ # branch and race to make it (a push's run doesn't wait for the one
221
+ # before it). One that's running is never cancelled, and one that's
222
+ # waiting gives way to a newer push's, which moves it further anyway.
223
+ concurrency:
224
+ group: ${{ github.workflow }}-passed-${{ github.ref_name }}
225
+ cancel-in-progress: false
226
+ if: ${{ !cancelled() && github.event_name == 'push' && needs.duel.outputs.passed == 'true' }}
158
227
  runs-on: ubuntu-latest
159
228
  permissions:
160
- pull-requests: write # to comment on the pull request with the report
229
+ contents: write # to move the branch
161
230
  steps:
162
- - name: Get the report
163
- id: report
164
- continue-on-error: true # the Duel job keeps no report when it fails before comparing
165
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
166
- with:
167
- name: duel-report
168
- path: ${{ runner.temp }}/report
169
-
170
- - name: Comment on the pull request
171
- if: steps.report.outcome == 'success'
231
+ - name: Move the branch to the commit
172
232
  env:
173
233
  GH_TOKEN: ${{ github.token }}
174
- PR: ${{ github.event.pull_request.number }}
175
- COMMENT: ${{ needs.duel.outputs.comment }}
176
- STATUS: ${{ needs.duel.outputs.status }}
234
+ BRANCH: duel/passed/${{ github.ref_name }}
177
235
  run: |
178
- marker="<!-- duel"
179
- # The first line of the last comment Duel posted here: its marker,
180
- # with its status (none in Duel 0.1.0's, which counts as another).
181
- last=$(gh api --paginate "repos/$GITHUB_REPOSITORY/issues/$PR/comments" \
182
- --jq ".[] | select(.user.login == \"github-actions[bot]\") | .body | split(\"\n\")[0] | rtrimstr(\"\r\") | select(startswith(\"$marker status=\") or . == \"$marker -->\")" | tail -n 1)
183
- if [ "$COMMENT" = post ] || { [ -n "$last" ] && [ "$last" != "$marker status=$STATUS -->" ]; }; then
184
- { echo "$marker status=$STATUS -->"; cat "$RUNNER_TEMP/report/duel.md"; } > "$RUNNER_TEMP/comment.md"
185
- gh api --method POST "repos/$GITHUB_REPOSITORY/issues/$PR/comments" -F body=@"$RUNNER_TEMP/comment.md" > /dev/null
186
- fi
236
+ # (Git can't make a branch where another's name is a folder of its
237
+ # name: a branch named duel blocks duel/passed/main. If one does,
238
+ # this names it.)
239
+ blocked() {
240
+ prefix=$BRANCH
241
+ while [ "${prefix%/*}" != "$prefix" ]; do
242
+ prefix=${prefix%/*}
243
+ if gh api "repos/$GITHUB_REPOSITORY/git/ref/heads/$prefix" > /dev/null 2>&1; then
244
+ echo "::error::The branch $prefix keeps Duel from making $BRANCH, as Git can't have both. Delete it (git push origin --delete $prefix), or rename it."
245
+ fi
246
+ done
247
+ exit 1
248
+ }
249
+ # (Forward: GitHub moves it only where it's behind the push. Where
250
+ # there's no branch, and making it fails, it looks once more, as
251
+ # something else may have made it: a push of it, say.)
252
+ for _ in 1 2; do
253
+ gh api --method PATCH "repos/$GITHUB_REPOSITORY/git/refs/heads/$BRANCH" -f sha="$GITHUB_SHA" > /dev/null 2>&1 && exit 0
254
+ at=$(gh api "repos/$GITHUB_REPOSITORY/git/ref/heads/$BRANCH" --jq .object.sha 2>/dev/null) || at=
255
+ [ -n "$at" ] && break
256
+ gh api --method POST "repos/$GITHUB_REPOSITORY/git/refs" -f ref="refs/heads/$BRANCH" -f sha="$GITHUB_SHA" > /dev/null && exit 0
257
+ done
258
+ [ -n "$at" ] || blocked
259
+ compared=$(gh api "repos/$GITHUB_REPOSITORY/compare/$GITHUB_SHA...$at" --jq .status 2>&1) || case "$compared" in
260
+ # (GitHub can't compare commits with no history in common.)
261
+ *"No common ancestor"*) compared=unrelated ;;
262
+ esac
263
+ case "$compared" in
264
+ # (A newer push's run moved it, or this one's did, run again.)
265
+ ahead | identical) ;;
266
+ # (History rewritten, a force push's, say, or replaced: moved anyway.)
267
+ diverged | behind | unrelated) gh api --method PATCH "repos/$GITHUB_REPOSITORY/git/refs/heads/$BRANCH" -f sha="$GITHUB_SHA" -F force=true > /dev/null ;;
268
+ *) echo "::error::Couldn't compare $BRANCH with this push: $compared" && exit 1 ;;
269
+ esac
@@ -267,13 +267,13 @@ workflows:
267
267
  recording: false
268
268
  # Duel performance regression guards (https://github.com/sferik/duel-ruby).
269
269
  # Off by default. Set `duel: true` to generate the Perf workflow
270
- # (.github/workflows/perf.yml), gemfiles/modular/duel.gemfile (loaded by
270
+ # (.github/workflows/perf.yml and perf-comment.yml), gemfiles/modular/duel.gemfile (loaded by
271
271
  # the root Gemfile and a `perf` appraisal), the `rake duel` task, the
272
272
  # RuboCop include for .duel.rb, and the Duel README badge. .duel.rb is
273
273
  # created only when it is missing, and the benchmarks in duel/ are the
274
274
  # project's own to write. Duel requires Ruby 3.4 or later: on older
275
275
  # Rubies it is not installed, and `rake duel` only warns. While Duel is
276
- # off, kettle-jem neither writes nor removes .duel.rb, perf.yml, or
276
+ # off, kettle-jem neither writes nor removes .duel.rb, perf.yml, perf-comment.yml, or
277
277
  # duel.gemfile, so a project's own copies stay as they are.
278
278
  # duel: true
279
279
  # preset: framework
@@ -61,6 +61,7 @@ end
61
61
  appraise "head" do
62
62
  eval_gemfile "modular/recording/r4/recording.gemfile"
63
63
  eval_gemfile "modular/x_std_libs.gemfile"
64
+ eval_gemfile "modular/rspec.gemfile"
64
65
  end
65
66
 
66
67
  # Used for current releases of ruby, truffleruby, and jruby.
@@ -68,6 +69,7 @@ end
68
69
  appraise "current" do
69
70
  eval_gemfile "modular/recording/r4/recording.gemfile"
70
71
  eval_gemfile "modular/x_std_libs.gemfile"
72
+ eval_gemfile "modular/rspec.gemfile"
71
73
  end
72
74
 
73
75
  # Test current Rubies against head versions of runtime dependencies
@@ -79,53 +81,63 @@ end
79
81
  appraise "ruby-2-3" do
80
82
  eval_gemfile "modular/recording/r2.3/recording.gemfile"
81
83
  eval_gemfile "modular/x_std_libs/r2.3/libs.gemfile"
84
+ eval_gemfile "modular/rspec_junit_formatter/r2/v0.6.gemfile"
82
85
  end
83
86
 
84
87
  appraise "ruby-2-4" do
85
88
  eval_gemfile "modular/recording/r2.4/recording.gemfile"
86
89
  eval_gemfile "modular/x_std_libs/r2.4/libs.gemfile"
90
+ eval_gemfile "modular/rspec_junit_formatter/r2/v0.6.gemfile"
87
91
  end
88
92
 
89
93
  appraise "ruby-2-5" do
90
94
  eval_gemfile "modular/recording/r2.5/recording.gemfile"
91
95
  eval_gemfile "modular/x_std_libs/r2.6/libs.gemfile"
96
+ eval_gemfile "modular/rspec_junit_formatter/r2/v0.6.gemfile"
92
97
  end
93
98
 
94
99
  appraise "ruby-2-6" do
95
100
  eval_gemfile "modular/recording/r2.5/recording.gemfile"
96
101
  eval_gemfile "modular/x_std_libs/r2.6/libs.gemfile"
102
+ eval_gemfile "modular/rspec_junit_formatter/r2/v0.6.gemfile"
97
103
  end
98
104
 
99
105
  appraise "ruby-2-7" do
100
106
  eval_gemfile "modular/recording/r2.5/recording.gemfile"
101
107
  eval_gemfile "modular/x_std_libs/r2/libs.gemfile"
108
+ eval_gemfile "modular/rspec_junit_formatter/r2/v0.6.gemfile"
102
109
  end
103
110
 
104
111
  appraise "ruby-3-0" do
105
112
  eval_gemfile "modular/json/truffleruby_22_3.gemfile"
106
113
  eval_gemfile "modular/recording/r3/recording.gemfile"
107
114
  eval_gemfile "modular/x_std_libs/r3.1/libs.gemfile"
115
+ eval_gemfile "modular/rspec_junit_formatter/r3.2/v0.6.gemfile"
108
116
  end
109
117
 
110
118
  appraise "ruby-3-1" do
111
119
  eval_gemfile "modular/recording/r3/recording.gemfile"
112
120
  eval_gemfile "modular/x_std_libs/r3.1/libs.gemfile"
121
+ eval_gemfile "modular/rspec_junit_formatter/r3.2/v0.6.gemfile"
113
122
  end
114
123
 
115
124
  appraise "ruby-3-2" do
116
125
  eval_gemfile "modular/json/truffleruby_23_1.gemfile"
117
126
  eval_gemfile "modular/recording/r3/recording.gemfile"
118
127
  eval_gemfile "modular/x_std_libs/r3/libs.gemfile"
128
+ eval_gemfile "modular/rspec_junit_formatter/r3.2/v0.6.gemfile"
119
129
  end
120
130
 
121
131
  appraise "ruby-3-3" do
122
132
  eval_gemfile "modular/recording/r3/recording.gemfile"
123
133
  eval_gemfile "modular/x_std_libs/r3/libs.gemfile"
134
+ eval_gemfile "modular/rspec_junit_formatter/r3/v0.8.gemfile"
124
135
  end
125
136
 
126
137
  appraise "ruby-3-4" do
127
138
  eval_gemfile "modular/recording/r3/recording.gemfile"
128
139
  eval_gemfile "modular/x_std_libs/r3/libs.gemfile"
140
+ eval_gemfile "modular/rspec_junit_formatter/r3/v0.8.gemfile"
129
141
  end
130
142
 
131
143
  # Only run security audit on the latest version of Ruby
@@ -24,7 +24,7 @@ Follow these instructions:
24
24
  2. Fork the repository
25
25
  3. Create your feature branch (`git checkout -b my-new-feature`)
26
26
  4. Make some fixes.
27
- 5. Commit your changes (`git commit -am 'Added some feature'`)
27
+ 5. Commit your changes (`git commit -am 'feat(core): ✨ add feature'`)
28
28
  6. Push to the branch (`git push origin my-new-feature`)
29
29
  7. Make sure to add tests for it. This is important, so it doesn't break in a future release.
30
30
  8. Create new Pull Request.
@@ -112,6 +112,10 @@ Releasing and signing
112
112
  - Not needed on bundler >= 2.7.0, as reproducible builds have become the default.
113
113
 
114
114
  Git hooks and commit message helpers (exe/kettle-commit-msg)
115
+
116
+ Start commit subjects with a Conventional Commit prefix followed by a Gitmoji,
117
+ for example `feat(core): ✨ add feature`. Emoji-first subjects remain supported.
118
+
115
119
  - GIT_HOOK_BRANCH_VALIDATE: Branch name validation mode (e.g., `jira`) or `false` to disable
116
120
  - GIT_HOOK_FOOTER_APPEND: Append a footer to commit messages when goalie allows (true/false)
117
121
  - GIT_HOOK_FOOTER_SENTINEL: Required when footer append is enabled — a unique first-line sentinel to prevent duplicates
@@ -33,9 +33,11 @@ gemspec
33
33
  # wiring fails version solving for every command in the bundle.
34
34
  #
35
35
  # (env-switched: STRUCTUREDMERGE_DEV=/path/to/structuredmerge/ruby/gems for local paths)
36
+
36
37
  eval_gemfile "gemfiles/modular/templating.gemfile" if
37
38
  ENV.fetch("K_JEM_TEMPLATING", "false").casecmp("true").zero? ||
38
- ENV.fetch("STRUCTUREDMERGE_DEV", "false").casecmp("false") != 0
39
+ ENV.fetch("STRUCTUREDMERGE_DEV", "false").casecmp("false") != 0 ||
40
+ ENV.fetch("STRUCTUREDMERGE_CORE_DEV", "false").casecmp("false") != 0
39
41
 
40
42
  # Debugging
41
43
  eval_gemfile "gemfiles/modular/debug.gemfile"
@@ -89,6 +89,10 @@ Gem::Specification.new do |spec|
89
89
  # Executables and executable support scripts
90
90
  *enumerate_package_files.call("exe"){KJ|GEMSPEC:PACKAGE_FILE_INCLUDES}{KJ|RUBY_STYLE:TRAILING_ARRAY_COMMA}
91
91
  ]
92
+ # {KJ|FREEZE_TOKEN}:freeze
93
+ # Keep locally built native binaries out of release packages.
94
+ spec.files.reject! { |path| path.end_with?(".bundle", ".so", ".dylib", ".dll", ".o", ".a") }
95
+ # {KJ|FREEZE_TOKEN}:unfreeze
92
96
  spec.rdoc_options += [
93
97
  "--title",
94
98
  "#{spec.name} - #{spec.summary}",
@@ -122,7 +126,7 @@ Gem::Specification.new do |spec|
122
126
  # and preferably a modular one (see gemfiles/modular/*.gemfile).
123
127
 
124
128
  # Dev, Test, & Release Tasks
125
- spec.add_development_dependency("kettle-dev", "~> 3.1", ">= 3.1.26") # ruby >= {KJ|MIN_TEST_RUBY}
129
+ spec.add_development_dependency("kettle-dev", "~> 3.1", ">= 3.1.31") # ruby >= {KJ|MIN_TEST_RUBY}
126
130
 
127
131
  # Security
128
132
  spec.add_development_dependency("bundler-audit", "~> 0.9.3") # ruby >= 2.0.0
@@ -131,18 +135,18 @@ Gem::Specification.new do |spec|
131
135
  spec.add_development_dependency("rake", "~> 13.0") # ruby >= 2.2.0
132
136
 
133
137
  # Debugging
134
- spec.add_development_dependency("require_bench", "~> 1.0", ">= 1.0.4") # ruby >= 2.2.0
138
+ spec.add_development_dependency("require_bench", "~> 1.0", ">= 1.0.5") # ruby >= 2.2.0
135
139
 
136
140
  # Testing
137
141
  # Loads version files in anonymous namespaces for coverage without constant redefinition warnings.
138
142
  spec.add_development_dependency("anonymous_loader", "~> 0.1", ">= 0.1.5") # ruby >= 2.2.0
139
143
  spec.add_development_dependency("appraisal2", "~> 3.2", ">= 3.2.6") # ruby >= 1.8.7, for testing against multiple versions of dependencies
140
- spec.add_development_dependency("kettle-test", "~> 2.0", ">= 2.0.29") # ruby >= {KJ|MIN_TEST_RUBY}
141
- spec.add_development_dependency("turbo_tests2", "~> 4.0", ">= 4.0.0") # ruby >= 2.4.0, default kettle-test runner
144
+ spec.add_development_dependency("kettle-test", "~> 2.0", ">= 2.0.30") # ruby >= {KJ|MIN_TEST_RUBY}
145
+ spec.add_development_dependency("turbo_tests2", "~> 4.0", ">= 4.0.2") # ruby >= 2.4.0, default kettle-test runner
142
146
 
143
147
  # Releasing
144
148
  spec.add_development_dependency("ruby-progressbar", "~> 1.13") # ruby >= 0
145
- spec.add_development_dependency("stone_checksums", "~> 1.0", ">= 1.0.9") # ruby >= 2.2.0
149
+ spec.add_development_dependency("stone_checksums", "~> 1.0", ">= 1.0.11") # ruby >= 2.2.0
146
150
 
147
151
  # Git integration (optional)
148
152
  # The 'git' gem is optional; {KJ|GEM_NAME} falls back to shelling out to `git` if it is not present.
@@ -154,7 +158,7 @@ Gem::Specification.new do |spec|
154
158
  # This means we have no choice but to use the erb that shipped with Ruby 2.3
155
159
  # /opt/hostedtoolcache/Ruby/2.3.8/x64/lib/ruby/gems/2.3.0/gems/erb-2.2.2/lib/erb.rb:670:in `prepare_trim_mode': undefined method `match?' for "-":String (NoMethodError)
156
160
  # spec.add_development_dependency("erb", ">= 2.2") # ruby >= 2.3.0, not SemVer, old rubies get dropped in a patch.
157
- spec.add_development_dependency("gitmoji-regex", "~> 2.0", ">= 2.0.15") # ruby >= 2.4
161
+ spec.add_development_dependency("gitmoji-regex", "~> 2.0", ">= 2.0.17") # ruby >= 2.4
158
162
 
159
163
  # HTTP recording for deterministic specs
160
164
  # In Ruby 3.5 (HEAD) the CGI library has been pared down, so we also need to depend on gem "cgi" for ruby@head
@@ -19,4 +19,4 @@ platform :mri do
19
19
  # gem "pry", "~> 0.14" # ruby >= 2.0
20
20
  end
21
21
 
22
- gem "gem_bench", "~> 2.0", ">= 2.0.5"
22
+ gem "gem_bench", "~> 2.0", ">= 2.0.6"
@@ -7,17 +7,17 @@
7
7
  #
8
8
 
9
9
  # Documentation
10
- gem "kramdown", "~> 2.5", ">= 2.5.2", require: false # Ruby >= 2.5
10
+ gem "kramdown", "~> 2.6", ">= 2.6.1", require: false # Ruby >= 2.5
11
11
  gem "kramdown-parser-gfm", "~> 1.1", require: false # Ruby >= 2.3
12
- gem "yaml-converter", "~> 0.2", ">= 0.2.7", require: false # Ruby >= 3.2
12
+ gem "yaml-converter", "~> 0.2", ">= 0.2.8", require: false # Ruby >= 3.2
13
13
  gem "yard", "~> 0.9", ">= 0.9.45", require: false
14
14
  gem "yard-junk", "~> 0.1", ">= 0.1.0", require: false # Ruby >= 3.1
15
- gem "yard-lint", "~> 1.13", ">= 1.13.0", require: false # Ruby >= 3.3
15
+ gem "yard-lint", "~> 1.15", ">= 1.15.0", require: false # Ruby >= 3.3
16
16
  gem "yard-relative_markdown_links", "~> 0.6", require: false
17
17
 
18
18
  if ENV.fetch("GALTZO_FLOSS_DEV", "false").casecmp("false").zero?
19
- gem "yard-fence", "~> 0.9", ">= 0.9.10", require: false # Ruby >= 3.2
20
- gem "yard-timekeeper", "~> 0.2", ">= 0.2.9", require: false
19
+ gem "yard-fence", "~> 0.9", ">= 0.9.12", require: false # Ruby >= 3.2
20
+ gem "yard-timekeeper", "~> 0.2", ">= 0.2.11", require: false
21
21
  gem "yard-yaml", "~> 0.2", ">= 0.2.6", require: false
22
22
  else
23
23
  eval_gemfile "documentation_local.gemfile"
@@ -9,7 +9,7 @@
9
9
  # Performance regression guards (see .duel.rb and duel/)
10
10
  # Duel requires Ruby 3.4 or later, so older Rubies install neither gem.
11
11
  if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.4")
12
- gem "duel", "~> 0.1", ">= 0.1.1" # ruby >= 3.4
12
+ gem "duel", "~> 0.3", ">= 0.3.1" # ruby >= 3.4
13
13
 
14
14
  # For profiles of regressions (StackProf runs on CRuby only)
15
15
  platform :mri do
@@ -13,4 +13,4 @@ gem "rbs", ">= 4.2.0", require: false # ruby >= 3.1
13
13
 
14
14
  # Required for kettle-pre-release
15
15
  # URL parsing with Unicode support (falls back to URI if not available)
16
- gem "addressable", ">= 2.9.1", "< 3" # ruby >= 2.2
16
+ gem "addressable", ">= 2.10.0", "< 3" # ruby >= 2.2
@@ -1,2 +1,2 @@
1
1
  # Ruby >= 2.5
2
- gem "ostruct", "~> 0.6"
2
+ gem "ostruct", "~> 0.6", ">= 0.6.1"
@@ -1,4 +1,12 @@
1
- gem "rspec_junit_formatter",
2
- github: "pboling/rspec_junit_formatter",
3
- branch: "main",
4
- ref: "9e6bcaaedd49477b62878ed568dc4ada5cc7cb5e"
1
+ ### rspec_junit_formatter
2
+ # Bucket boundaries follow Kettle::Rb::RubySeriesBuckets: r3.2 ends at 3.2.
3
+ version = Gem::Version.new(RUBY_VERSION)
4
+ if version >= Gem::Version.new("4.0")
5
+ eval_gemfile "rspec_junit_formatter/r4/v0.8.gemfile"
6
+ elsif version >= Gem::Version.new("3.3")
7
+ eval_gemfile "rspec_junit_formatter/r3/v0.8.gemfile"
8
+ elsif version >= Gem::Version.new("3.0")
9
+ eval_gemfile "rspec_junit_formatter/r3.2/v0.6.gemfile"
10
+ else
11
+ eval_gemfile "rspec_junit_formatter/r2/v0.6.gemfile"
12
+ end
@@ -0,0 +1,7 @@
1
+ # Ruby < 3.3: upstream rspec_junit_formatter >= 0.7 requires Ruby >= 3.3, and the
2
+ # final legacy release (v0.6.2, Ruby >= 2.3) lacks the invalid-UTF-8 fix.
3
+ # This fork carries that fix on the v0.6 line.
4
+ gem "rspec_junit_formatter",
5
+ github: "pboling/rspec_junit_formatter",
6
+ branch: "main",
7
+ ref: "9e6bcaaedd49477b62878ed568dc4ada5cc7cb5e"
@@ -0,0 +1,2 @@
1
+ # Ruby >= 3.3: released upstream includes the invalid-UTF-8 fix (>= 0.7.1).
2
+ gem "rspec_junit_formatter", "~> 0.8"
@@ -0,0 +1,7 @@
1
+ # Ruby < 3.3: upstream rspec_junit_formatter >= 0.7 requires Ruby >= 3.3, and the
2
+ # final legacy release (v0.6.2, Ruby >= 2.3) lacks the invalid-UTF-8 fix.
3
+ # This fork carries that fix on the v0.6 line.
4
+ gem "rspec_junit_formatter",
5
+ github: "pboling/rspec_junit_formatter",
6
+ branch: "main",
7
+ ref: "9e6bcaaedd49477b62878ed568dc4ada5cc7cb5e"
@@ -0,0 +1,2 @@
1
+ # Ruby >= 3.3: released upstream includes the invalid-UTF-8 fix (>= 0.7.1).
2
+ gem "rspec_junit_formatter", "~> 0.8"
@@ -37,7 +37,7 @@ def local_gem_satisfies?(gem_name, requirements, dev_root)
37
37
 
38
38
  # Parse version from gemspec
39
39
  spec = Gem::Specification.load(gemspec_path)
40
- return false unless spec && spec.version
40
+ return false unless spec&.version
41
41
 
42
42
  # Check if version satisfies all requirements
43
43
  requirements.all? do |req|
@@ -2,6 +2,7 @@
2
2
 
3
3
  structuredmerge_remote = ENV.fetch("STRUCTUREDMERGE_DEV", "false").casecmp("false").zero?
4
4
  kettle_remote = ENV.fetch("KETTLE_DEV_DEV", "false").casecmp("false").zero?
5
+ structuredmerge_core_remote = ENV.fetch("STRUCTUREDMERGE_CORE_DEV", "false").casecmp("false").zero?
5
6
 
6
7
  tslp_dev = ENV.fetch("TSLP_DEV", nil).to_s
7
8
  tslp_dev = nil if tslp_dev.empty? || %w[false 0 no off].include?(tslp_dev.downcase)
@@ -33,4 +34,4 @@ end
33
34
  #
34
35
  # Set KETTLE_DEV_DEV=/path/to/my for local development with Kettle plugin gems.
35
36
  # When false (default / CI), released Kettle plugin gems are used.
36
- eval_gemfile "templating_local.gemfile" unless structuredmerge_remote && kettle_remote
37
+ eval_gemfile "templating_local.gemfile" unless structuredmerge_remote && kettle_remote && structuredmerge_core_remote