Class: SecretsCli::Check::Vault
- Inherits:
-
Object
- Object
- SecretsCli::Check::Vault
- Includes:
- Helpers
- Defined in:
- lib/secrets_cli/check/vault.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(options) ⇒ Vault
constructor
A new instance of Vault.
Methods included from Helpers
#config, #error, #error!, #pastel, #pretty_diff, #print_verbose, #prompt
Constructor Details
#initialize(options) ⇒ Vault
Returns a new instance of Vault.
8 9 10 |
# File 'lib/secrets_cli/check/vault.rb', line 8 def initialize() @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
6 7 8 |
# File 'lib/secrets_cli/check/vault.rb', line 6 def @options end |
Instance Method Details
#call ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/secrets_cli/check/vault.rb', line 12 def call error! 'Missing vault_addr' if config.vault_addr.nil? error! 'Missing VAULT_AUTH_METHOD env' if missing_auth_method? case auth_method when 'app_id' error! 'Missing VAULT_AUTH_APP_ID' if missing_auth_app_id? error! 'Missing VAULT_AUTH_USER_ID' if missing_auth_user_id? when 'approle' error! 'Missing VAULT_AUTH_ROLE_ID' if missing_auth_role_id? else error! 'Missing VAULT_AUTH_TOKEN env' if missing_auth_token? end end |