Hide gpg signature on tags page from tag message

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2014-11-18 18:00:38 +02:00
parent 435128171d
commit f9aead9f6e
No known key found for this signature in database
GPG key ID: 161B5D6A44D3D88A
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
module GitHelper
def strip_gpg_signature(text)
text.gsub(/-----BEGIN PGP SIGNATURE-----(.*)-----END PGP SIGNATURE-----/m, "")
end
end

View file

@ -6,7 +6,7 @@
= tag.name
- if tag.message.present?
&nbsp;
= tag.message
= strip_gpg_signature(tag.message)
.pull-right
- if can? current_user, :download_code, @project
= render 'projects/repositories/download_archive', ref: tag.name, btn_class: 'btn-grouped btn-group-small'