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

Fix display of previous gem version when previously downloaded already #6110

Merged

Conversation

zarqman
Copy link
Contributor

@zarqman zarqman commented Dec 11, 2022

What was the end-user or developer problem that led to this PR?

bundle update is no longer showing the green (was: x.y.z) suffix for updated gems that were already installed (eg: by another app).

This displayed in bundler <= 2.3.13 and went missing in 2.3.14.

What is your fix for the problem, implemented in this PR?

This PR reenables the "was..." suffix, which matches what was displayed both in bundler <= 2.3.13 and as still displayed in the current version for newly downloaded gems and for sources other than Rubygems.

In <= 2.3.13 and again with this PR:

Using rails 7.0.4 (was 7.0.3)

In 2.3.14+:

Using rails 7.0.4

Background

A number of changes surrounding tracking of the previous gem version were made in #5530, which was part of bundler 2.3.14. It appears those changes simply missed passing the previous spec info to the newly enhanced version_message method in the described case.

Make sure the following tasks are checked

@welcome
Copy link

welcome bot commented Dec 11, 2022

Thanks for opening a pull request and helping make RubyGems and Bundler better! Someone from the RubyGems team will take a look at your pull request shortly and leave any feedback. Please make sure that your pull request has tests for any changes or added functionality.

We use GitHub Actions to test and make sure your change works functionally and uses acceptable conventions, you can review the current progress of GitHub Actions in the PR status window below.

If you have any questions or concerns that you wish to ask, feel free to leave a comment in this PR or join our #rubygems or #bundler channel on Slack.

For more information about contributing to the RubyGems project feel free to review our CONTRIBUTING guide

@deivid-rodriguez deivid-rodriguez changed the title Fix display of previous gem version Fix display of previous gem version when previously downloaded already Dec 11, 2022
Copy link
Member

@deivid-rodriguez deivid-rodriguez left a comment

Choose a reason for hiding this comment

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

Nice catch @zarqman, thanks for fixing this!

I added a regression spec to make sure I don't introduce the same mistake again in the future.

@deivid-rodriguez deivid-rodriguez merged commit 88a3a37 into rubygems:master Dec 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants