Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Reigel <mail@koffeinfrei.org>2017-02-24 22:16:04 +0300
committerAlexis Reigel <mail@koffeinfrei.org>2017-07-27 16:40:41 +0300
commit0668521b2b8ed32f4a3f192a8ad04c64f6c1c0cd (patch)
tree6c3a1266ae720bb04bde8d67afe26a6ade3c061d /lib/gitlab
parent0e3d3d60bae48f3698f9e7b0e060edb67170b11e (diff)
move current keychain methods to namespace
Diffstat (limited to 'lib/gitlab')
-rw-r--r--lib/gitlab/gpg.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/gitlab/gpg.rb b/lib/gitlab/gpg.rb
index 73a4b691cff..f478f1ae5d8 100644
--- a/lib/gitlab/gpg.rb
+++ b/lib/gitlab/gpg.rb
@@ -5,6 +5,14 @@ module Gitlab
module CurrentKeyChain
extend self
+ def add(key)
+ GPGME::Key.import(key)
+ end
+
+ def remove(fingerprint)
+ GPGME::Key.get(fingerprint).delete!
+ end
+
def emails(fingerprint)
GPGME::Key.find(:public, fingerprint).flat_map { |raw_key| raw_key.uids.map(&:email) }
end
@@ -32,14 +40,6 @@ module Gitlab
end
end
- def add_to_keychain(key)
- GPGME::Key.import(key)
- end
-
- def remove_from_keychain(fingerprint)
- GPGME::Key.get(fingerprint).delete!
- end
-
def using_tmp_keychain
Dir.mktmpdir do |dir|
@original_dirs ||= [GPGME::Engine.dirinfo('homedir')]