Module: Aruba::Api::Bundler

Includes:
Environment
Included in:
Aruba::Api
Defined in:
lib/aruba/api/bundler.rb

Instance Method Summary collapse

Methods included from Environment

#append_environment_variable, #delete_environment_variable, #prepend_environment_variable, #set_environment_variable

Instance Method Details

#unset_bundler_env_varsObject

Unset variables used by bundler



10
11
12
13
14
15
16
17
18
19
# File 'lib/aruba/api/bundler.rb', line 10

def unset_bundler_env_vars
  empty_env = with_environment { with_unbundled_env { ENV.to_h } }
  aruba_env = aruba.environment.to_h
  (aruba_env.keys - empty_env.keys).each do |key|
    delete_environment_variable key
  end
  empty_env.each do |k, v|
    set_environment_variable k, v
  end
end