gpg: simplify available check

which_all already runs some checks to see if the file is a file & is executable.
Our usage here inside `self.available?` is mostly a smoke test.

Closes #676.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
This commit is contained in:
Dominyk Tiller 2016-08-10 17:28:24 +01:00
parent 3005582f15
commit 2776f08fa0
No known key found for this signature in database
GPG Key ID: FE19AEFCF658C6F6

View File

@ -20,7 +20,7 @@ class Gpg
GPG_EXECUTABLE = gpg2 || gpg GPG_EXECUTABLE = gpg2 || gpg
def self.available? def self.available?
File.exist?(GPG_EXECUTABLE.to_s) && File.executable?(GPG_EXECUTABLE.to_s) File.executable?(GPG_EXECUTABLE.to_s)
end end
def self.create_test_key(path) def self.create_test_key(path)