Module: RSpec::PGPMatchers

Defined in:
lib/rspec/pgp_matchers.rb,
lib/rspec/pgp_matchers/version.rb,
lib/rspec/pgp_matchers/gpg_runner.rb,
lib/rspec/pgp_matchers/gpg_matcher_helper.rb

Defined Under Namespace

Modules: GPGMatcherHelper, GPGRunner

Constant Summary collapse

VERSION =
"0.2.0".freeze

Class Attribute Summary collapse

Class Attribute Details

.gpg_executableString

Name of the GnuPG executable or path to that executable. Defaults to gpg.

Absolute and relative paths are allowed, but usually setting $PATH environment variable is a better idea.

Returns:

  • (String)

    executable name or absolute or relative path to that executable



24
25
26
# File 'lib/rspec/pgp_matchers.rb', line 24

def gpg_executable
  @gpg_executable
end

.homedirString

Path to the OpenPGP home directory. Defaults to nil and must be set prior using the matchers.

Given directory may be initialized with other tool than GnuPG, e.g. RNP, but it must be in a format which is readable by GnuPG. Also, if specified directory is empty, then it will be initialized by GnuPG at first use, it must exist though. Nevertheless, the latter case is not very practical, as the OpenPGP home directory created this way contains no keys.

It is recommended to have a dedicated PGP home directory just for testing, so that test keys are separated from regular ones.

Returns:

  • (String)

    absolute or relative path to the OpenPGP home directory



40
41
42
# File 'lib/rspec/pgp_matchers.rb', line 40

def homedir
  @homedir
end