diff options
author | Alexis Reigel <mail@koffeinfrei.org> | 2017-02-22 17:37:49 +0300 |
---|---|---|
committer | Alexis Reigel <mail@koffeinfrei.org> | 2017-07-27 16:40:40 +0300 |
commit | 7b7cd6f69d59092a55fc8b293edf09638fba20d9 (patch) | |
tree | 301427683e57800aeda05affc1057df192638437 /app/models/gpg_key.rb | |
parent | fbf1fd1a204a24aef2b80473ec64a520ed2a2dfc (diff) |
add emails method to GgpKey
Diffstat (limited to 'app/models/gpg_key.rb')
-rw-r--r-- | app/models/gpg_key.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/gpg_key.rb b/app/models/gpg_key.rb index 16de0b542d7..d77051850f3 100644 --- a/app/models/gpg_key.rb +++ b/app/models/gpg_key.rb @@ -21,6 +21,11 @@ class GpgKey < ActiveRecord::Base write_attribute(:key, value) end + def emails + raw_key = GPGME::Key.get(fingerprint) + raw_key.uids.map(&:email) + end + private def extract_fingerprint |