From 065d5b6da7998eb1e366a6e6af07614592e14ae3 Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Fri, 12 Jan 2024 17:20:43 -0800 Subject: [PATCH 1/3] Providing users with a copy-to-clipboard feature for the checksum. --- app/views/rubygems/_gem_members.html.erb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/views/rubygems/_gem_members.html.erb b/app/views/rubygems/_gem_members.html.erb index 90f823be220..3e6c0e5bc15 100644 --- a/app/views/rubygems/_gem_members.html.erb +++ b/app/views/rubygems/_gem_members.html.erb @@ -57,15 +57,18 @@ <% if latest_version.sha256.present? %>

<%= t '.sha_256_checksum' %>:

-
- <%= latest_version.sha256_hex %> +
+ + = + <%= t('.copy_to_clipboard') %> + <%= t('.copied') %>
<% end %> <% if latest_version.cert_chain.present? %>

<%= t '.signature_period' %>:

- <%= nice_date_for(latest_version.cert_chain_valid_not_before) %> - + <%= nice_date_for(latest_version.cert_chain_valid_not_before) %> - <%= nice_date_for(latest_version.cert_chain_valid_not_after) %> <% if latest_version.signature_expired? %> (<%= t '.expired' %>) From 6bd8ecc0316727e409fa27b85fdd937bf2e95111 Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Fri, 19 Jan 2024 11:06:34 -0800 Subject: [PATCH 2/3] Updating i18n keys for the reusable copy_to_clipboard/copied locales given changes in #4354. #4353 --- app/views/rubygems/_gem_members.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/rubygems/_gem_members.html.erb b/app/views/rubygems/_gem_members.html.erb index 3e6c0e5bc15..c7edc7497bc 100644 --- a/app/views/rubygems/_gem_members.html.erb +++ b/app/views/rubygems/_gem_members.html.erb @@ -60,8 +60,8 @@
= - <%= t('.copy_to_clipboard') %> - <%= t('.copied') %> + <%= t('copy_to_clipboard') %> + <%= t('copied') %>
<% end %> From e3c759b0b67900d348288307f2fe5ca62980e2f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20=C5=A0im=C3=A1nek?= Date: Fri, 14 Jun 2024 01:51:33 +0200 Subject: [PATCH 3/3] Update versions test. --- test/functional/versions_controller_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/versions_controller_test.rb b/test/functional/versions_controller_test.rb index b7308c1912b..fcdbca198a3 100644 --- a/test/functional/versions_controller_test.rb +++ b/test/functional/versions_controller_test.rb @@ -163,7 +163,7 @@ class VersionsControllerTest < ActionController::TestCase end should "render the checksum version" do - assert page.has_content?(@latest_version.sha256_hex) + assert page.has_field?("gem_sha_256_checksum", with: @latest_version.sha256_hex) end end