Skip to content

feat(ruby): add created_at timestamps to ls-remote --json#7296

Merged
jdx merged 1 commit intomainfrom
feat/ruby-created-at
Dec 14, 2025
Merged

feat(ruby): add created_at timestamps to ls-remote --json#7296
jdx merged 1 commit intomainfrom
feat/ruby-created-at

Conversation

@jdx
Copy link
Copy Markdown
Owner

@jdx jdx commented Dec 14, 2025

Summary

  • Implement _list_remote_versions_with_info() for the Ruby backend to provide release timestamps
  • Fetch release dates from the ruby/ruby GitHub repository and map them to version strings
  • Non-MRI versions (jruby, mruby, truffleruby, etc.) will have no timestamp since they have different release sources

Example Output

$ mise ls-remote ruby --json | jq '[.[] | select(.created_at)] | .[0:5]'
[
  {"version": "3.1.6", "created_at": "2024-05-29T03:54:36Z"},
  {"version": "3.1.7", "created_at": "2025-03-26T04:20:36Z"},
  {"version": "3.2.5", "created_at": "2024-07-26T11:54:27Z"},
  {"version": "3.2.6", "created_at": "2024-10-30T09:47:11Z"},
  {"version": "3.2.7", "created_at": "2025-02-04T11:33:29Z"}
]

Test plan

  • Added unit tests for tag_to_version() helper function
  • Verified mise ls-remote ruby --json shows created_at for recent MRI Ruby versions
  • Verified non-MRI versions (jruby, mruby, etc.) have no timestamp (expected behavior)
  • All existing tests pass

🤖 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.

  • Backend (Ruby):
    • Implement _list_remote_versions_with_info() to return Vec<VersionInfo { version, created_at }> and update _list_remote_versions() to map from it.
    • Add GitHub release date fetching via github::list_releases("ruby/ruby") and map tags to versions using new tag_to_version() helper.
    • Include unit tests for tag_to_version().

Written by Cursor Bugbot for commit 246cfc0. This will update automatically on new commits. Configure here.

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>
Copilot AI review requested due to automatic review settings December 14, 2025 20:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/plugins/core/ruby.rs
}

/// Fetch created_at timestamps for Ruby versions from GitHub releases
async fn fetch_ruby_release_dates(&self) -> HashMap<String, String> {
Copy link

Copilot AI Dec 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@jdx jdx enabled auto-merge (squash) December 14, 2025 20:43
@jdx jdx merged commit 5c2ebad into main Dec 14, 2025
30 checks passed
@jdx jdx deleted the feat/ruby-created-at branch December 14, 2025 20:46
@github-actions
Copy link
Copy Markdown

Hyperfine Performance

mise x -- echo

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%

jdx pushed a commit that referenced this pull request Dec 14, 2025
### 🚀 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants