Added blacklisted gem page#1433
Conversation
559ad06 to
5194493
Compare
| @@ -1,18 +1,24 @@ | |||
| <% @title = @rubygem.name %> | |||
| <% @subtitle = @latest_version.try(:slug) %> | |||
| <% if !@blacklisted_name %> | |||
There was a problem hiding this comment.
I think it will be better to use separate template instead of this branching.
| @latest_version = @rubygem.versions.most_recent | ||
| @versions = @rubygem.public_versions(5) | ||
| else | ||
| @blacklisted_name = params[:id] |
| <%= auto_discovery_link_tag(:atom, rubygem_versions_path(@rubygem, format: "atom"), {title: "#{@rubygem.name} Version Feed"}) %> | ||
| <% if @rubygem.versions.present? && @latest_version.indexed %> | ||
| <link rel="canonical" href="<%= rubygem_version_url(@rubygem, @latest_version.slug) %>" /> | ||
| <link rel="canonical" href="<%= rubygem_version_url(@rubygem, @latest_version.slug) %>" /> |
There was a problem hiding this comment.
I think this change can be roll-backed.
5c13315 to
bd688ca
Compare
|
Can we please add a test that |
|
I have added the tests. Do let me know when its ready to be merged and I'll squash the commits into one. |
| def show | ||
| @latest_version = @rubygem.versions.most_recent | ||
| @versions = @rubygem.public_versions(5) | ||
| if @rubygem |
There was a problem hiding this comment.
This conditional is not obvious (without reading the rest of the code) that if @rubygem is nil, then the gem is blacklisted. Maybe a new before_action to check for blacklisted gems?
There was a problem hiding this comment.
I have added a new before_action to set blacklisted gem here and this line has been changed into if @blacklisted_gem
|
@dwradcliffe Please let me know if any changes are pending yet :) |
|
Thanks! |
Resolves #1401
This is the gem show page rendered for gems which are blaclisted
