Class: ContainerConfig::Provider::RailsCredential

Inherits:
Base
  • Object
show all
Defined in:
lib/container_config/provider/rails_credential.rb

Overview

Rails credential config value provider

Instance Method Summary collapse

Instance Method Details

#load(key, *dig_keys, **options) ⇒ Object

Loads a Rails credential configuration setting

Parameters:

  • key (String)

    Configuration key to load

  • dig_keys (Array)

    Variable keys to use to load from providers that accept a dig structure defaults to the lowercase key split by underscores “MY_PASSWORD” => [“my”, “password”]

  • options (Hash)

    Options Hash

Returns:

  • (Object)

    configuration setting value



25
26
27
28
# File 'lib/container_config/provider/rails_credential.rb', line 25

def load(key, *dig_keys, **options)
  super
  ::Rails.application&.credentials&.config&.dig(*dig_keys.map(&:to_sym))
end

#nameObject

See Also:



10
11
12
# File 'lib/container_config/provider/rails_credential.rb', line 10

def name
  "Rails Credential"
end