rubygems.org
rubygems.org copied to clipboard
Providing users with a copy-to-clipboard feature for the checksum
When viewing an individual Rubygem version, let's make it simple for users to copy/paste the SHA 256 Checksum quickly. This change uses the existing copy/clipboard functionality.
Currently, it looks like this:
Proposed change:
Thanks for your consideration!
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
866208a
) 96.98% compared to head (3e7bbef
) 96.98%. Report is 2 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #4353 +/- ##
=======================================
Coverage 96.98% 96.98%
=======================================
Files 336 336
Lines 7487 7487
=======================================
Hits 7261 7261
Misses 226 226
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hello @robbyrussell, it seems those I18n
keys are not present in the given scope. Instead of another copy, I did small refactoring at https://github.com/rubygems/rubygems.org/pull/4354 which makes them reusable. Once merged, you can change it to t("copied")
or similar to fix failing tests in here.
@robbyrussell https://github.com/rubygems/rubygems.org/pull/4354 got merged, can you update templates?
@simi sure thing, done!
@robbyrussell would you mind to fix the failing spec? https://github.com/rubygems/rubygems.org/blob/8c47cf5f7d29768d0da03210a0ed122e1e01ceab/test/functional/versions_controller_test.rb#L139 It expects sha to be printed in the page content, but since it is now part of input, it fails the test. Feel free to ping me if you need help, I can try to tackle this on my own.
I have fixed the test, merging. Thanks for the contribution @robbyrussell.