Skip to content

Commit

Permalink
Merge pull request #117 from ekohl/support-upper-case-vars
Browse files Browse the repository at this point in the history
Uppercase configuration environment variables
  • Loading branch information
bastelfreak authored Mar 24, 2023
2 parents 8532531 + 7b7edb5 commit 55bad9a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/beaker-rspec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
}
#read env vars
env_vars = {
:color => ENV['BEAKER_color'] || ENV['RS_COLOR'],
:nodeset => ENV['BEAKER_set'] || ENV['RS_SET'],
:nodesetdir => ENV['BEAKER_setdir'] || ENV['RS_SETDIR'],
:nodesetfile => ENV['BEAKER_setfile'] || ENV['RS_SETFILE'],
:provision => ENV['BEAKER_provision'] || ENV['RS_PROVISION'],
:keyfile => ENV['BEAKER_keyfile'] || ENV['RS_KEYFILE'],
:debug => ENV['BEAKER_debug'] || ENV['RS_DEBUG'],
:destroy => ENV['BEAKER_destroy'] || ENV['RS_DESTROY'],
:optionsfile => ENV['BEAKER_options_file'] || ENV['RS_OPTIONS_FILE'],
:color => ENV['BEAKER_COLOR'] || ENV['BEAKER_color'] || ENV['RS_COLOR'],
:nodeset => ENV['BEAKER_SET'] || ENV['BEAKER_set'] || ENV['RS_SET'],
:nodesetdir => ENV['BEAKER_SETDIR'] || ENV['BEAKER_setdir'] || ENV['RS_SETDIR'],
:nodesetfile => ENV['BEAKER_SETFILE'] || ENV['BEAKER_setfile'] || ENV['RS_SETFILE'],
:provision => ENV['BEAKER_PROVISION'] || ENV['BEAKER_provision'] || ENV['RS_PROVISION'],
:keyfile => ENV['BEAKER_KEYFILE'] || ENV['BEAKER_keyfile'] || ENV['RS_KEYFILE'],
:debug => ENV['BEAKER_DEBUG'] || ENV['BEAKER_debug'] || ENV['RS_DEBUG'],
:destroy => ENV['BEAKER_DESTROY'] || ENV['BEAKER_destroy'] || ENV['RS_DESTROY'],
:optionsfile => ENV['BEAKER_OPTIONS_FILE'] || ENV['BEAKER_options_file'] || ENV['RS_OPTIONS_FILE'],
}.delete_if {|_key, value| value.nil?}
#combine defaults and env_vars to determine overall options
options = defaults.merge(env_vars)
Expand Down

0 comments on commit 55bad9a

Please sign in to comment.