Class: GpgEncryptFolder
- Inherits:
-
Object
- Object
- GpgEncryptFolder
- Defined in:
- lib/gpg_encrypt_folder.rb
Overview
Shell out to gpg with a a command like this gpg –armor –no-default-keyring –keyring keyring.gpg
--trust-model always -r 'renalware_test'
--output output.xml.enc
--encrypt input.xml
Note if you want to see a more verbose output you can add -vv but don’t do this here as it outputs info to stderr and causes an error to be raised.
Some options may be omitted optional depending on how GPG is set up however as we may use more than 1 GPG key on thie server, we are explicitly setting the Recipient may be optional e.g. –recipient ‘patient view’
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
20 21 22 23 24 |
# File 'lib/gpg_encrypt_folder.rb', line 20 def call Dir.glob(folder.join("*.xml")) do |file| GpgEncryptFile.new(file: file, options: ).call end end |