Merge RubyGems-3.3.3 and Bundler-2.3.3

This commit is contained in:
Hiroshi SHIBATA 2021-12-25 06:27:56 +09:00
Родитель 2b2115318b
Коммит da6a5e3ed1
8 изменённых файлов: 29 добавлений и 8 удалений

Просмотреть файл

@ -165,9 +165,6 @@ module Bundler
def normalize_settings
Bundler.settings.set_command_option :path, nil if options[:system]
Bundler.settings.temporary(:path_relative_to_cwd => false) do
Bundler.settings.set_command_option :path, "vendor/bundle" if Bundler.settings[:deployment] && Bundler.settings[:path].nil?
end
Bundler.settings.set_command_option_if_given :path, options[:path]
Bundler.settings.temporary(:path_relative_to_cwd => false) do
Bundler.settings.set_command_option :path, "bundle" if options["standalone"] && Bundler.settings[:path].nil?

Просмотреть файл

@ -219,6 +219,7 @@ module Bundler
def path
configs.each do |_level, settings|
path = value_for("path", settings)
path = "vendor/bundle" if value_for("deployment", settings) && path.nil?
path_system = value_for("path.system", settings)
disabled_shared_gems = value_for("disable_shared_gems", settings)
next if path.nil? && path_system.nil? && disabled_shared_gems.nil?

Просмотреть файл

@ -1,7 +1,7 @@
# frozen_string_literal: false
module Bundler
VERSION = "2.3.2".freeze
VERSION = "2.3.3".freeze
def self.bundler_major_version
@bundler_major_version ||= VERSION.split(".").first.to_i

Просмотреть файл

@ -8,7 +8,7 @@
require 'rbconfig'
module Gem
VERSION = "3.3.2".freeze
VERSION = "3.3.3".freeze
end
# Must be first since it unloads the prelude from 1.9.2

Просмотреть файл

@ -45,6 +45,29 @@ RSpec.describe "Self management", :rubygems => ">= 3.3.0.dev" do
bundle "config set --local path vendor/bundle"
bundle "install", :env => { "BUNDLER_SPEC_GEM_SOURCES" => file_uri_for(gem_repo2).to_s }
expect(out).to include("Bundler #{Bundler::VERSION} is running, but your lockfile was generated with #{next_minor}. Installing Bundler #{next_minor} and restarting using that version.")
expect(vendored_gems("gems/bundler-#{next_minor}")).to exist
# It does not uninstall the locked bundler
bundle "clean"
expect(out).to be_empty
# App now uses locked version
bundle "-v"
expect(out).to end_with(next_minor[0] == "2" ? "Bundler version #{next_minor}" : next_minor)
# Subsequent installs use the locked version without reinstalling
bundle "install --verbose"
expect(out).to include("Using bundler #{next_minor}")
expect(out).not_to include("Bundler #{Bundler::VERSION} is running, but your lockfile was generated with #{next_minor}. Installing Bundler #{next_minor} and restarting using that version.")
end
it "installs locked version when using deployment option and uses it" do
lockfile_bundled_with(next_minor)
bundle "config set --local deployment true"
bundle "install", :env => { "BUNDLER_SPEC_GEM_SOURCES" => file_uri_for(gem_repo2).to_s }
expect(out).to include("Bundler #{Bundler::VERSION} is running, but your lockfile was generated with #{next_minor}. Installing Bundler #{next_minor} and restarting using that version.")
expect(vendored_gems("gems/bundler-#{next_minor}")).to exist
# It does not uninstall the locked bundler
bundle "clean"

Просмотреть файл

@ -60,4 +60,4 @@ DEPENDENCIES
test-unit
BUNDLED WITH
2.3.2
2.3.3

Просмотреть файл

@ -66,4 +66,4 @@ DEPENDENCIES
test-unit
BUNDLED WITH
2.3.2
2.3.3

Просмотреть файл

@ -41,4 +41,4 @@ DEPENDENCIES
webrick (= 1.7.0)
BUNDLED WITH
2.3.2
2.3.3