Sha256: fcf199f8585adb1580ec83dd7f16616061be7752bbc73c1d3118d14af0e0b765
Contents?: true
Size: 767 Bytes
Versions: 8
Compression:
Stored size: 767 Bytes
Contents
require "aruba/api/environment" require "bundler" module Aruba module Api module Bundler include Environment # Unset variables used by bundler 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 private def with_unbundled_env(&block) if ::Bundler.respond_to?(:with_unbundled_env) ::Bundler.with_unbundled_env(&block) else ::Bundler.with_clean_env(&block) end end end end end
Version data entries
8 entries across 8 versions & 3 rubygems