Skip to content
Snippets Groups Projects
Commit 889d6166 authored by JCount's avatar JCount
Browse files

gpg: add version method to retrieve current version in path

parent 14a7ef59
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@ class Gpg
gpg_short_version = Utils.popen_read(gpg, "--version")[/\d\.\d/, 0]
next unless gpg_short_version
gpg_version = Version.create(gpg_short_version.to_s)
@version = gpg_version
gpg_version == Version.create("2.0") ||
gpg_version == Version.create("2.1")
end
......@@ -25,6 +26,10 @@ class Gpg
File.executable?(GPG_EXECUTABLE.to_s)
end
def self.version
@version if available?
end
def self.create_test_key(path)
odie "No GPG present to test against!" unless available?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment