Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option for unstable Ruby gem version #3222

Closed
AlexWayfer opened this issue Mar 19, 2019 · 9 comments · Fixed by #6451
Closed

Option for unstable Ruby gem version #3222

AlexWayfer opened this issue Mar 19, 2019 · 9 comments · Fixed by #6451
Labels
good first issue New contributors, join in! service-badge New or updated service badge

Comments

@AlexWayfer
Copy link

📋 Description

Hello!

I want an option for gem version badge about unstable versions.

Example: https://rubygems.org/gems/flame

The current badge has only 4.18.1 value.

I want to display 5.0.0.rc5 value for informing about preparing the new release.

Thanks.

@calebcartwright calebcartwright added the service-badge New or updated service badge label Mar 20, 2019
@calebcartwright
Copy link
Member

Do you know if unstable/rc versions are provided via an API response?

We're currently using https://guides.rubygems.org/rubygems-org-api/#gem-methods, and the API response for the aforementioned gem lists the version as 4.18.1:

{
  "name": "flame",
  "downloads": 61236,
  "version": "4.18.1",
  "version_downloads": 2563,
  "platform": "ruby",
  "authors": "Alexander Popov",
  "info": "Use controller's classes with instance methods as routing actions, mounting its in application 
  class.",
  "licenses": [
    "MIT"
  ],
  "metadata": {},
  "sha": "12533f702a8059a51d6d2ce2bea1858ec8ac2993e8549feedc300af64e310e88",
  "project_uri": "https://rubygems.org/gems/flame",
  "gem_uri": "https://rubygems.org/gems/flame-4.18.1.gem",
  "homepage_uri": "https://github.com/AlexWayfer/flame",
  "wiki_uri": null,
  "documentation_uri": "http://www.rubydoc.info/gems/flame/4.18.1",
  "mailing_list_uri": null,
  "source_code_uri": null,
  "bug_tracker_uri": null,
  "changelog_uri": null,
  "dependencies": {...}
}

@calebcartwright
Copy link
Member

Perhaps this could be used:
https://guides.rubygems.org/rubygems-org-api/#gem-version-methods

@calebcartwright calebcartwright added the good first issue New contributors, join in! label Mar 20, 2019
@AlexWayfer
Copy link
Author

Do you know if unstable/rc versions are provided via an API response?

I didn't, but now I know. 🙂

Perhaps this could be used: https://guides.rubygems.org/rubygems-org-api/#gem-version-methods

Yep, looks appropriate.

calebcartwright added the good first issue label

This is wrong if it about issue author, not like "good for the first PR". 😃

https://github.com/badges/shields/issues?utf8=%E2%9C%93&q=author%3AAlexWayfer

@calebcartwright
Copy link
Member

This is wrong if it about issue author, not like "good for the first PR".

The meaning of our labels is documented:
https://github.com/badges/shields/labels
https://github.com/badges/shields#contributing

good first issue is a label we use to flag an issue that we as maintainers believe anyone, even new users, could potentially tackle. It does not have anything to do with how many issues an author has opened

@AlexWayfer
Copy link
Author

good first issue is a label we use to flag an issue that we as maintainers believe anyone, even new users, could potentially tackle. It does not have anything to do with how many issues an author has opened

OK, something like PR welcome or Help wanted, I got it, thanks.

@calebcartwright
Copy link
Member

calebcartwright commented Mar 20, 2019

OK, something like PR welcome or Help wanted, I got it, thanks.

Exactly! And it also means that it's something new users to the Shields codebase could probably work on as well.

Here is our tutorial for anyone interested in working on this.

It's fairly common for our version badges to support both scenarios: the latest stable version, and the latest version, prereleases/unstable or stable. The latter is what needs to be added here, and there's other version badges that can serve as a reference.

@calebcartwright calebcartwright added the hacktoberfest Same as "good first issue" label Oct 2, 2019
@calebcartwright calebcartwright removed the hacktoberfest Same as "good first issue" label Nov 3, 2019
@profgrammer
Copy link
Contributor

Hi, I am trying to work on adding this service but I cannot validate the version 5.0.0.rc6 using the existing regex patterns in test-validators. Can anyone please point me to some resources for this? Thanks!

@PyvesB
Copy link
Member

PyvesB commented May 11, 2021

This has been deployed to production. 🍾

For example:
https://img.shields.io/gem/v/flame?include_prereleases

@AlexWayfer
Copy link
Author

Wow, thank you all, glad to see it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue New contributors, join in! service-badge New or updated service badge
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants