Comments (6)
Hi @markets ! Nice catch, thanks for reporting 🙏 I'm jumping in as I think this might be related to some of the updates I helped push out in #4544
I've checked the gems page and it looks like the latest invisible_captcha
version seems to be reported correctly there see https://rubygems.org/gems?letter=I&page=94
We use different queries to load the gems on the profile page and gems page
- For the gems page we use the
#latest_version
- For the profiles page we use the
#most_recent_version
andstrict_loading
I've pulled the gems locally and switched to using the #latest_version
and strict_loading
on the profiles page as well and we now seem to render the correct "latest" version. I'm not sure of any other side effects though 😀 The diff looks something like this:
diff --git a/app/controllers/profiles_controller.rb b/app/controllers/profiles_controller.rb
index 82a3c1a2d..1adbf2338 100644
--- a/app/controllers/profiles_controller.rb
+++ b/app/controllers/profiles_controller.rb
@@ -9,7 +9,7 @@ class ProfilesController < ApplicationController
def show
@user = User.find_by_slug!(params[:id])
- @rubygems = @user.rubygems_downloaded.includes(%i[most_recent_version gem_download]).strict_loading
+ @rubygems = @user.rubygems_downloaded.includes(%i[latest_version gem_download]).strict_loading
end
def me
diff --git a/app/views/profiles/_rubygem.html.erb b/app/views/profiles/_rubygem.html.erb
index c8fa121d2..3fa8e2582 100644
--- a/app/views/profiles/_rubygem.html.erb
+++ b/app/views/profiles/_rubygem.html.erb
@@ -3,7 +3,7 @@
<span class="gems__gem__info">
<a href="<%= rubygem_path(rubygem.slug) %>" class="gems__gem__name">
<%= rubygem.name %>
- <span class="gems__gem__version"><%= rubygem.most_recent_version %></span>
+ <span class="gems__gem__version"><%= rubygem.latest_version %></span>
</a>
</span>
<p class="gems__gem__downloads__count">
So this is what I see locally without the above diff applied
This is what the page looks like with the above diff applied
Prosopite
doesn't seem to report any n+1s ✅ I'm not sure why we're not using the #latest_version
there 🤔
from rubygems.org.
Definitely that's a bug, it's really strange to not display latest version in profile pages.
For example, visiting DHH profile, you can also see different versions for the different Rails core gems:
It would be really nice to fix this.
from rubygems.org.
It is most likely a bug. I think it used to always show the latest release of a given gem in the past; at the least I think it used to be that way.
Definitely that's a bug, it's really strange to not display latest version in profile pages.
+1
unfortunately I'm not familiar with this app, so I don't know if that is 100% correct or it has any side effect.
Same here, barely scratching the surface 😀 I'll draft a PR so we can see if the updates don't break anything else and hopefully we'll get the ball rolling with this one 😀
from rubygems.org.
Tracking down the code, I think the related line is the following:
So, apparently this most_recent_version
method doesn't work as expected?
rubygems.org/app/models/rubygem.rb
Lines 30 to 36 in 2a9ad86
from rubygems.org.
Thanks for looking into this @dancristianb! Yes, that seems a good fix, but unfortunately I'm not familiar with this app, so I don't know if that is 100% correct or it has any side effect.
from rubygems.org.
It is most likely a bug. I think it used to always show the latest release of a given gem in the past; at the least I think it used to be that way.
(Note that conceptually I am not sure what the difference should be between .most_recent_version and .latest_version; just the names itself may lead to confusion. IMO .most_recent_version seems more clear, or one could make it even more verbose, e. g. .most_recently_published_version - but I could not tell what the difference to .latest_version would be. It may be easier to use only one name here, in the event this could otherwise lead to confusion.)
from rubygems.org.
Related Issues (20)
- Error importing gems for local development HOT 2
- Has the sorting on rubygems.org profiles been changed recently? HOT 3
- Alternative to @rubygems_status on Twitter HOT 4
- Changing dependencies didn't change it on the gem page HOT 2
- Remove or replace Twitter/X from email footer HOT 1
- Dashboard Atom feed link broken HOT 2
- Versions published more than 30 days ago cannot be deleted. Please contact RubyGems support to request deletion of this version if it represents a legal or security risk. HOT 3
- Status page header displaying broken help.rubygems.org link
- Improve statistics for downloads HOT 8
- Improve "Access Denied" message by distinguishing "no key" vs "unknown key"
- Allow users to mark gems as no longer being maintained.
- Webauthn CLI login could be much easier
- Refactor permissions to use Pundit for all controlled actions
- Refactor tests to cleanup redefined `sign_in_as`
- Filter by trusted publisher
- Incorrect gem metadata HOT 1
- trusted publishing with gitlab CI HOT 1
- Search page // extra <em> in title HOT 1
- Dark mode (please)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rubygems.org.