projectatomic / adb-atomic-developer-bundle

a prepackaged development environment filled with production-grade pre-configured tools that makes container development easier
GNU General Public License v2.0
83 stars 51 forks source link

Consistent format for setting Vagrantfile configurations #570

Closed coolbrg closed 8 years ago

coolbrg commented 8 years ago

Currently, we are using two formats in Vagrantfile for setting configurations

if ENV.has_key?('SUB_USERNAME') && ENV.has_key?('SUB_PASSWORD')
    config.registration.username = ENV['SUB_USERNAME']
    config.registration.password = ENV['SUB_PASSWORD']
end
ENV['PROXY'] ? (config.registration.proxy = PROXY = ENV['PROXY']) : PROXY = ''

First one gives more readability while second option allow to achieve minimal Vagrantfile goal.

Any thoughts which should be used?

NOTE: ENV['PROXY'] should be ENV.key?('PROXY') (Should be fix as part of this issue fix)

praveenkumar commented 8 years ago

@budhrg Let's go with readability, one liner approach looks bit more crypt. @LalatenduMohanty @hferentschik WDYT?

LalatenduMohanty commented 8 years ago

+1 For readability.

hferentschik commented 8 years ago

+1 For readability