Commit b31b2ea
feat: add utilities to generate rv_checksums and excluded_gems (#283)
* feat: add utilities to generate rv_checksums and excluded_gems
Add two Bazel-compatible utilities to automate maintenance of
rv-ruby checksums and excluded gems:
1. generate_rv_checksums: Fetches SHA256 checksums from rv-ruby
GitHub releases and updates ruby.toolchain() in MODULE.bazel
2. generate_excluded_gems: Queries stdgems.org for native gems
and updates ruby.bundle_fetch() excluded_gems in MODULE.bazel
Both utilities:
- Support --dry-run mode for previewing changes
- Use buildozer for automatic MODULE.bazel updates
- Include comprehensive test coverage
- Use cgrindel_bazel_starlib for consistent error handling
Dependencies added:
- rules_shell for sh_binary and sh_test support
- cgrindel_bazel_starlib for fail/warn/assertions utilities
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
* feat: add generate_rv_checksums
* feat: add integration tests and fix buildozer commands for excluded_gems
- Add integration test for generate_excluded_gems.sh to verify buildozer
updates work correctly
- Refactor buildozer command to use array structure and proper list
operations ('remove' + 'add' instead of 'set')
- Use -types flag with name-based targeting instead of extension syntax
- Fix tab indentation in error messages
- Add test for name filtering to ensure only target bundle is updated
The buildozer command now matches the pattern used in
generate_rv_checksums.sh for consistency.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
* fix: use BUILD_WORKSPACE_DIRECTORY for default MODULE.bazel path
- Update both generate_rv_checksums.sh and generate_excluded_gems.sh to
use BUILD_WORKSPACE_DIRECTORY when available for the default
MODULE.bazel path
- This fixes the issue where running via `bazel run` couldn't find
MODULE.bazel because it was looking in the execution directory
instead of the workspace root
- When BUILD_WORKSPACE_DIRECTORY is not set (direct script execution),
it falls back to ./MODULE.bazel as before
- Move buildifier_prebuilt from dev_dependency to regular dependency
since it's required by the generator tools at runtime
- Fix line wrapping in integration test comments
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
* docs: update rv-ruby section with utility documentation
- Remove WORKSPACE examples from rv-ruby section (focus on Bzlmod)
- Add "Configure rv-ruby Downloads" section documenting
generate_rv_checksums utility
- Add "Configure Excluded Gems" section documenting
generate_excluded_gems utility
- Fix rb_bundle_fetch to ruby.bundle_fetch for Bzlmod syntax
- Add utility options documentation (--name, --module-bazel, --dry-run)
- Improve formatting and organization of rv-ruby configuration steps
- Add note about compilation errors when excluded_gems is not set
The documentation now provides clear, step-by-step instructions for
using the automated utilities instead of manually configuring checksums
and excluded gems.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
* refactor: improve shell script formatting and remove debug code
- Remove redundant set -o errexit declarations (handled by runfiles.bash)
- Add shellcheck disable directives for dynamic sourcing in test files
- Remove debug echo statements from integration tests
- Wrap long lines to improve readability
- Fix line continuation for better formatting consistency
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
* feat: add curl timeouts and improve documentation
- Add --max-time 30 to curl commands to prevent indefinite hangs
- Enhance get_minor_version comment to explain Ruby versioning structure
and why stdgems data is organized by minor version
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
* chore: add verbose failures and detailed test output on error
* fix: try escaping the curly bracket
* refactor: remove unnecessary echo output from tests
Remove all echo statements to STDOUT from test files to keep test
output clean. Tests should only output on failure.
Changes:
- Remove DEBUG echo statements from integration tests
- Remove TEST/PASS progress messages from all tests
- Remove summary "All tests passed!" messages
- Keep echo statements redirected to stderr or files
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
---------
Co-authored-by: Claude Sonnet 4.5 <[email protected]>1 parent 3e6a87e commit b31b2ea
File tree
16 files changed
+1336
-29
lines changed- .github/workflows
- tools
- generate_excluded_gems
- testdata
- generate_rv_checksums
- testdata
16 files changed
+1336
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
| 20 | + | |
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
22 | | - | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
134 | 134 | | |
135 | | - | |
136 | | - | |
| 135 | + | |
| 136 | + | |
137 | 137 | | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
148 | 146 | | |
149 | 147 | | |
150 | | - | |
| 148 | + | |
| 149 | + | |
151 | 150 | | |
152 | 151 | | |
153 | 152 | | |
| |||
156 | 155 | | |
157 | 156 | | |
158 | 157 | | |
159 | | - | |
160 | 158 | | |
161 | | - | |
| 159 | + | |
162 | 160 | | |
| 161 | + | |
163 | 162 | | |
164 | 163 | | |
165 | 164 | | |
166 | 165 | | |
167 | | - | |
168 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
169 | 184 | | |
170 | 185 | | |
171 | | - | |
| 186 | + | |
172 | 187 | | |
173 | 188 | | |
174 | 189 | | |
175 | 190 | | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | 191 | | |
180 | 192 | | |
181 | 193 | | |
| |||
184 | 196 | | |
185 | 197 | | |
186 | 198 | | |
187 | | - | |
188 | | - | |
189 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
190 | 203 | | |
191 | 204 | | |
192 | 205 | | |
193 | | - | |
| 206 | + | |
194 | 207 | | |
195 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
196 | 213 | | |
197 | 214 | | |
198 | 215 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
0 commit comments