lib/bundler.rb in bundler-1.13.0.pre.1 vs lib/bundler.rb in bundler-1.13.0.rc.1

- old
+ new

@@ -90,10 +90,12 @@ # Return if all groups are already loaded return @setup if defined?(@setup) definition.validate_ruby! + SharedHelpers.print_major_deprecations! + if groups.empty? # Load all groups, but only once @setup = load.setup else load.setup(*groups) @@ -207,10 +209,11 @@ end # @deprecated Use `original_env` instead # @return [Hash] Environment with all bundler-related variables removed def clean_env + Bundler::SharedHelpers.major_deprecation("`Bundler.clean_env` has weird edge cases, use `.original_env` instead") env = original_env if env.key?("BUNDLE_ORIG_MANPATH") env["MANPATH"] = env["BUNDLE_ORIG_MANPATH"] end @@ -409,20 +412,23 @@ raise GemspecError, msg end def configure_gem_home_and_path - blank_home = ENV["GEM_HOME"].nil? || ENV["GEM_HOME"].empty? + configure_gem_path + configure_gem_home + bundle_path + end + + def configure_gem_path(env = ENV, settings = self.settings) + blank_home = env["GEM_HOME"].nil? || env["GEM_HOME"].empty? if settings[:disable_shared_gems] - ENV["GEM_PATH"] = "" + env["GEM_PATH"] = nil elsif blank_home || Bundler.rubygems.gem_dir != bundle_path.to_s possibles = [Bundler.rubygems.gem_dir, Bundler.rubygems.gem_path] paths = possibles.flatten.compact.uniq.reject(&:empty?) - ENV["GEM_PATH"] = paths.join(File::PATH_SEPARATOR) + env["GEM_PATH"] = paths.join(File::PATH_SEPARATOR) end - - configure_gem_home - bundle_path end def configure_gem_home # TODO: This mkdir_p is only needed for JRuby <= 1.5 and should go away (GH #602) begin