Github Packages: Ruby Gem Version
- Dominant language
- JavaScript
- Stars
- 27.2k
- Forks
- 5.6k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 46
Description
### 📋 Description
This badge would display the latest version of a Ruby gem published to GitHub Packages.
**Which service is this badge for:** GitHub Packages (Ruby gems registry)
**What sort of information should this badge show:** The latest version number of a Ruby gem from GitHub Packages, similar to existing badges for other package managers.
**Proposed URL format:**
`https://img.shields.io/github/ruby-package/v/{owner}/{package}`
**Example:**
- `https://img.shields.io/github/ruby-package/v/twilightcoders/gemplate` → displays "v0.0.1"
- `https://img.shields.io/github/ruby-package/v/twilightcoders/sudo` → displays "v0.4.0"
**Related:**
- https://github.com/badges/shields/issues/6789
### 🔗 Data
**Data source:** GitHub Packages API endpoint for Ruby gems:
`https://api.github.com/orgs/{owner}/packages?package_type=rubygems`
**Is there a public API:** Yes, GitHub's REST API provides package information including versions. The endpoint returns package metadata including all published versions, allowing retrieval of the latest version.
This would complement the existing GitHub Packages badges for other package types (npm, Docker, etc.) and provide consistency across the GitHub Packages ecosystem.
GitHub Packages API endpoint:
https://api.github.com/orgs/{owner}/packages?package_type=rubygems
The API returns package metadata including version information. The latest version can be extracted from the package versions array.
### 🎤 Motivation
Many organizations and developers are migrating from public package registries to GitHub Packages for better security, access control, and integration with their existing GitHub workflows. However, there's currently no way to display version badges for Ruby gems hosted on GitHub Packages, creating an inconsistency in documentation and project visibility.
**Specific use cases:**
- **Private/internal gems:** Organizations publishing internal Ruby gems to GitHub Packages need version badges for their internal documentation and README files
- **Security-conscious projects:** Teams using GitHub Packages for enhanced security and access control still want to display current version information publicly
- **Consistency across package types:** GitHub Packages already supports npm, Docker, and other package types in shields.io - Ruby gems are a notable gap
- **Migration from public registries:** Projects moving from RubyGems.org to GitHub Packages lose the ability to display version badges, hindering adoption
- **Enterprise workflows:** Companies using GitHub Enterprise with GitHub Packages need version badges for their internal project dashboards and documentation
This feature would provide parity with other GitHub Packages badge types and support the growing ecosystem of Ruby projects using GitHub's package registry.
Contributor guide
Research direction
Locate the existing GitHub Packages badges for npm or Docker and follow their entry points, API calls, and tests. Check how the Ruby-gem packages endpoint exposes versions and define the latest-version behavior for the proposed URL. Done means the badge returns the expected version for the provided examples and has coverage matching the existing package badges.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, javascript, ruby
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100