Module: Brightbox::Config::GpgEncryptedPasswords
- Included in:
- BBConfig
- Defined in:
- lib/brightbox-cli/config/gpg_encrypted_passwords.rb
Instance Attribute Summary collapse
-
#gpg_password ⇒ Object
Return the password from gpg if it's possible.
Instance Method Summary collapse
Instance Attribute Details
#gpg_password ⇒ Object
Return the password from gpg if it's possible
12 13 14 15 16 17 18 19 20 |
# File 'lib/brightbox-cli/config/gpg_encrypted_passwords.rb', line 12 def gpg_password if defined?(@gpg_password) && !@gpg_password.nil? return @gpg_password end @gpg_password = if File.exist?(gpg_encrypted_password_filename) gpg_decrypt_password end end |
Instance Method Details
#gpg_encrypted_password_filename ⇒ Object
6 7 8 9 |
# File 'lib/brightbox-cli/config/gpg_encrypted_passwords.rb', line 6 def gpg_encrypted_password_filename file_name = "#{client_name}.password.gpg" @gpg_encrypted_password_filename ||= File.join(config_directory, file_name) end |