Module: ContainerConfig::Provider
- Defined in:
- lib/container_config/provider.rb,
lib/container_config/provider/env.rb,
lib/container_config/provider/base.rb,
lib/container_config/provider/default.rb,
lib/container_config/provider/secret_volume.rb,
lib/container_config/provider/rails_credential.rb
Overview
Contains classes and methods for config value providers
Defined Under Namespace
Classes: Base, Default, Env, RailsCredential, SecretVolume
Class Method Summary collapse
-
.default_providers ⇒ Array<ContainerConfig::Provider::Base>
Array of default providers.
-
.load_value(key, *dig_keys, **options) ⇒ Object
Loads a value from the config value providers.
-
.rails_providers ⇒ Array<ContainerConfig::Provider::Base>
Array of Rails providers These are only included in the default providers when this gem is included as part of a rails application.
Class Method Details
.default_providers ⇒ Array<ContainerConfig::Provider::Base>
Array of default providers
43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/container_config/provider.rb', line 43 def self.default_providers defaults = [ ContainerConfig::Provider::Env.new, ContainerConfig::Provider::SecretVolume.new ] defaults |= rails_providers if ContainerConfig.rails_app? defaults << ContainerConfig::Provider::Default.new defaults end |
.load_value(key, *dig_keys, **options) ⇒ Object
Loads a value from the config value providers
28 29 30 31 32 33 34 35 36 |
# File 'lib/container_config/provider.rb', line 28 def self.load_value(key, *dig_keys, **) value = nil ContainerConfig.providers.each do |p| value = p.load(key, *dig_keys, **) break unless value.nil? end value end |
.rails_providers ⇒ Array<ContainerConfig::Provider::Base>
Array of Rails providers These are only included in the default providers when this gem is included as part of a rails application
62 63 64 |
# File 'lib/container_config/provider.rb', line 62 def self.rails_providers [ContainerConfig::Provider::RailsCredential.new] end |