Module: Kamal::Secrets::Adapters

Defined in:
lib/kamal/secrets/adapters.rb

Defined Under Namespace

Classes: Base, Bitwarden, LastPass, OnePassword, Test

Class Method Summary collapse

Class Method Details

.adapter_class(name) ⇒ Object



9
10
11
12
13
# File 'lib/kamal/secrets/adapters.rb', line 9

def self.adapter_class(name)
  Object.const_get("Kamal::Secrets::Adapters::#{name.camelize}").new
rescue NameError => e
  raise RuntimeError, "Unknown secrets adapter: #{name}"
end

.lookup(name) ⇒ Object



3
4
5
6
7
# File 'lib/kamal/secrets/adapters.rb', line 3

def self.lookup(name)
  name = "one_password" if name.downcase == "1password"
  name = "last_pass" if name.downcase == "lastpass"
  adapter_class(name)
end