feat(ruby): add created_at timestamps to ls-remote --json#7296
Conversation
Implement `_list_remote_versions_with_info()` for the Ruby backend to provide release timestamps for MRI Ruby versions when using `mise ls-remote ruby --json`. The implementation fetches release dates from the ruby/ruby GitHub repository and maps them to version strings. Non-MRI versions (jruby, mruby, truffleruby, etc.) will have no timestamp since they have different release sources. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR adds timestamp information to the Ruby backend's remote version listing by implementing _list_remote_versions_with_info(). The implementation fetches release dates from the ruby/ruby GitHub repository and maps them to version strings using a custom tag-to-version converter. Only MRI Ruby versions receive timestamps, as other implementations (jruby, mruby, truffleruby) have different release sources.
Key Changes
- Added
tag_to_version()helper to convert Ruby GitHub tags (e.g.,v3_3_0) to version strings (e.g.,3.3.0) - Implemented
_list_remote_versions_with_info()to fetch and attach release timestamps from GitHub - Refactored
_list_remote_versions()to delegate to the new info-based implementation
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
|
|
||
| /// Fetch created_at timestamps for Ruby versions from GitHub releases | ||
| async fn fetch_ruby_release_dates(&self) -> HashMap<String, String> { |
There was a problem hiding this comment.
The method name fetch_ruby_release_dates suggests it returns dates, but it actually returns a HashMap mapping versions to ISO timestamps. Consider renaming to fetch_ruby_release_timestamps to more accurately reflect the return type and avoid confusion between dates and full timestamps.
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.12.6 x -- echo |
16.8 ± 0.5 | 15.9 | 22.3 | 1.00 |
mise x -- echo |
17.7 ± 0.7 | 16.7 | 27.8 | 1.05 ± 0.05 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.12.6 env |
17.0 ± 0.8 | 16.0 | 25.8 | 1.00 |
mise env |
17.7 ± 0.6 | 16.5 | 24.5 | 1.04 ± 0.06 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.12.6 hook-env |
17.2 ± 0.4 | 16.4 | 19.7 | 1.00 |
mise hook-env |
17.6 ± 0.4 | 16.6 | 18.7 | 1.02 ± 0.03 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.12.6 ls |
14.9 ± 0.4 | 13.9 | 17.2 | 1.00 |
mise ls |
15.0 ± 0.4 | 14.1 | 16.1 | 1.00 ± 0.04 |
xtasks/test/perf
| Command | mise-2025.12.6 | mise | Variance |
|---|---|---|---|
| install (cached) | 84ms | 84ms | +0% |
| ls (cached) | 55ms | 55ms | +0% |
| bin-paths (cached) | 58ms | 58ms | +0% |
| task-ls (cached) | 358ms | 360ms | +0% |
### 🚀 Features - **(java)** add created_at support to ls-remote --json by @jdx in [#7297](#7297) - **(ls-remote)** add created_at timestamps to ls-remote --json for more backends by @jdx in [#7295](#7295) - **(ls-remote)** add created_at timestamps to ls-remote --json for core plugins by @jdx in [#7294](#7294) - **(registry)** add --json flag to registry command by @jdx in [#7290](#7290) - **(ruby)** add created_at timestamps to ls-remote --json by @jdx in [#7296](#7296) ### 🐛 Bug Fixes - **(spm)** recursively update submodules after checkout by @JFej in [#7292](#7292) - prioritize raw task output over task_output setting by @skorfmann in [#7286](#7286) ### New Contributors - @skorfmann made their first contribution in [#7286](#7286) - @JFej made their first contribution in [#7292](#7292)
Summary
_list_remote_versions_with_info()for the Ruby backend to provide release timestampsExample Output
Test plan
tag_to_version()helper functionmise ls-remote ruby --jsonshowscreated_atfor recent MRI Ruby versions🤖 Generated with Claude Code
Note
Enriches Ruby ls-remote JSON by returning VersionInfo with created_at from ruby/ruby GitHub releases, using a tag-to-version mapper and updated listing flow.
_list_remote_versions_with_info()to returnVec<VersionInfo { version, created_at }>and update_list_remote_versions()to map from it.github::list_releases("ruby/ruby")and map tags to versions using newtag_to_version()helper.tag_to_version().Written by Cursor Bugbot for commit 246cfc0. This will update automatically on new commits. Configure here.