diff options
author | Alexis Reigel <mail@koffeinfrei.org> | 2017-06-16 14:37:28 +0200 |
---|---|---|
committer | Alexis Reigel <mail@koffeinfrei.org> | 2017-07-27 15:42:53 +0200 |
commit | d7f42643681ad1cc634a502ef25acab6b111c6e5 (patch) | |
tree | e0868abd8cc5cdb07bec34ee48de8e10414707dd /lib | |
parent | e75ab064302bcec45a5953a636cc9f3295f2690c (diff) | |
download | gitlab-ce-d7f42643681ad1cc634a502ef25acab6b111c6e5.tar.gz |
no need for passing parameter
we introduced memoizing, so it's safe to call the method multiple times.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/gpg/commit.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/gpg/commit.rb b/lib/gitlab/gpg/commit.rb index 6e3f7c28eba..437f13ef311 100644 --- a/lib/gitlab/gpg/commit.rb +++ b/lib/gitlab/gpg/commit.rb @@ -32,7 +32,7 @@ module Gitlab def update_signature!(cached_signature) using_keychain do |gpg_key| cached_signature.update_attributes!( - valid_signature: self.class.gpg_signature_valid_signature_value(gpg_key, verified_signature) + valid_signature: gpg_signature_valid_signature_value(gpg_key) ) end end @@ -67,12 +67,12 @@ module Gitlab project: commit.project, gpg_key: gpg_key, gpg_key_primary_keyid: gpg_key&.primary_keyid || verified_signature.fingerprint, - valid_signature: self.class.gpg_signature_valid_signature_value(gpg_key, verified_signature) + valid_signature: gpg_signature_valid_signature_value(gpg_key) ) end - def self.gpg_signature_valid_signature_value(gpg_key, verified_signature_) - !!(gpg_key && gpg_key.verified? && verified_signature_.valid?) + def gpg_signature_valid_signature_value(gpg_key) + !!(gpg_key && gpg_key.verified? && verified_signature.valid?) end end end |