Class: Kamal::Secrets::Adapters::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/kamal/secrets/adapters/base.rb

Instance Method Summary collapse

Instance Method Details

#fetch(secrets, account: nil, from: nil) ⇒ Object

Raises:

  • (RuntimeError)


4
5
6
7
8
9
10
11
12
# File 'lib/kamal/secrets/adapters/base.rb', line 4

def fetch(secrets, account: nil, from: nil)
  raise RuntimeError, "Missing required option '--account'" if requires_account? && .blank?

  check_dependencies!

  session = ()
  full_secrets = secrets.map { |secret| [ from, secret ].compact.join("/") }
  fetch_secrets(full_secrets, account: , session: session)
end

#requires_account?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/kamal/secrets/adapters/base.rb', line 14

def requires_account?
  true
end