Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
98531fc2
Commit
98531fc2
authored
Jul 25, 2017
by
Alexis Reigel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upcase in the model instead of in the view
parent
f86580c0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
2 deletions
+14
-2
app/models/gpg_key.rb
app/models/gpg_key.rb
+8
-0
app/models/gpg_signature.rb
app/models/gpg_signature.rb
+4
-0
app/views/profiles/gpg_keys/_key.html.haml
app/views/profiles/gpg_keys/_key.html.haml
+1
-1
app/views/projects/commit/_signature_badge.html.haml
app/views/projects/commit/_signature_badge.html.haml
+1
-1
No files found.
app/models/gpg_key.rb
View file @
98531fc2
...
...
@@ -37,6 +37,14 @@ class GpgKey < ActiveRecord::Base
after_commit
:update_invalid_gpg_signatures
,
on: :create
after_commit
:notify_user
,
on: :create
def
primary_keyid
super
&
.
upcase
end
def
fingerprint
super
&
.
upcase
end
def
key
=
(
value
)
value
.
strip!
unless
value
.
blank?
write_attribute
(
:key
,
value
)
...
...
app/models/gpg_signature.rb
View file @
98531fc2
...
...
@@ -11,6 +11,10 @@ class GpgSignature < ActiveRecord::Base
validates
:project
,
presence:
true
validates
:gpg_key_primary_keyid
,
presence:
true
def
gpg_key_primary_keyid
super
&
.
upcase
end
def
commit
project
.
commit
(
commit_sha
)
end
...
...
app/views/profiles/gpg_keys/_key.html.haml
View file @
98531fc2
...
...
@@ -6,7 +6,7 @@
=
render
partial:
'email_with_badge'
,
locals:
{
email:
email
,
verified:
verified
}
.description
%code
=
key
.
fingerprint
.
upcase
%code
=
key
.
fingerprint
.pull-right
%span
.key-created-at
created
#{
time_ago_with_tooltip
(
key
.
created_at
)
}
...
...
app/views/projects/commit/_signature_badge.html.haml
View file @
98531fc2
...
...
@@ -9,7 +9,7 @@
=
content
GPG Key ID:
%span
.monospace
=
signature
.
gpg_key_primary_keyid
.
upcase
%span
.monospace
=
signature
.
gpg_key_primary_keyid
=
link_to
(
'Learn more about signing commits'
,
help_page_path
(
'workflow/gpg_signed_commits/index.md'
),
class:
'gpg-popover-help-link'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment