lib/configurator.rb
# Process the environment variable values and store the overrides
Process the environment variable values and store the overrides
Process the environment variable values and store the overrides
def scan
    @mapping.each do |key, values|
      @overrides[key] = values.pop if values.last.is_a? Proc
      env_name = values.find { |v| ENV[v] }
      @storage[key] = if env_name
                        ENV[env_name].empty? ? '' : YAML.parse(ENV[env_name]).to_ruby
                      end
    end
  end
def scan @mapping . each do | key , values | @overrides [ key ] = values . pop if values . last . is_a? Proc env_name = values . find { | v | ENV [ v ] } @storage [ key ] = if env_name ENV [ env_name ] . empty? ? '' : YAML . parse ( ENV [ env_name ] ) . to_ruby end end end
Process the environment variable values and store the overrides
Process the environment variable values and store the overrides