method
clean_env
ruby latest stable - Class:
Bundler
Method not available on this version
This method is only available on newer versions. The first available version (v2_6_3) is shown here.
clean_env()public
@deprecated Use `original_env` instead @return [Hash] Environment with all bundler-related variables removed
# File lib/bundler.rb, line 285
def clean_env
Bundler::SharedHelpers.major_deprecation(2, "`Bundler.clean_env` has weird edge cases, use `.original_env` instead")
env = original_env
if env.key?("BUNDLER_ORIG_MANPATH")
env["MANPATH"] = env["BUNDLER_ORIG_MANPATH"]
end
env.delete_if {|k, _| k[0, 7] == "BUNDLE_" }
if env.key?("RUBYOPT")
env["RUBYOPT"] = env["RUBYOPT"].sub "-rbundler/setup", ""
end
if env.key?("RUBYLIB")
rubylib = env["RUBYLIB"].split(File::PATH_SEPARATOR)
rubylib.delete(File.expand_path("..", __FILE__))
env["RUBYLIB"] = rubylib.join(File::PATH_SEPARATOR)
end
env
end Related methods
- Class methods
- app_cache
- app_config_path
- bin_path
- bundle_path
- bundler_major_version
- clean_env
- clean_exec
- clean_system
- clear_gemspec_cache
- configure
- configured_bundle_path
- current_ruby
- default_bundle_dir
- default_gemfile
- default_lockfile
- definition
- environment
- feature_flag
- frozen_bundle?
- git_present?
- home
- install_path
- load
- load_gemspec
- load_gemspec_uncached
- load_marshal
- local_platform
- locked_gems
- mkdir_p
- original_env
- read_file
- require
- require_thor_actions
- requires_sudo?
- reset!
- reset_paths!
- reset_rubygems!
- rm_rf
- root
- ruby_scope
- rubygems
- settings
- setup
- specs_path
- sudo
- system_bindir
- tmp
- tmp_home_path
- ui
- ui=
- use_system_gems?
- user_bundle_path
- user_cache
- user_home
- which
- with_clean_env
- with_friendly_errors
- with_original_env
- Private methods
-
configure_gem_home -
configure_gem_home_and_path -
configure_gem_path -
eval_gemspec -
eval_yaml_gemspec -
overwrite_loaded_gem_version -
with_env