Method: Beaker::Options::Presets#calculate_env_vars

Defined in:
lib/beaker/options/presets.rb

#calculate_env_varsOptionsHash

Generates an OptionsHash of the environment variables of interest to Beaker

Returns:

  • (OptionsHash)

    The supported environment variables in an OptionsHash, empty or nil environment variables are removed from the OptionsHash



102
103
104
105
106
107
108
109
# File 'lib/beaker/options/presets.rb', line 102

def calculate_env_vars
  found = Beaker::Options::OptionsHash.new
  found = found.merge(format_found_env_vars( collect_env_vars( ENVIRONMENT_SPEC )))
  found[:answers] = select_env_by_regex('\\Aq_')

  found.delete_if {|key, value| value.nil? or value.empty? }
  found
end