Merge RubyGems-3.3.8 and Bundler-2.3.8

This commit is contained in:
Hiroshi SHIBATA 2022-03-01 12:11:15 +09:00 committed by nagachika
parent 1a6a608ae0
commit b5ef64a8a1
38 changed files with 118 additions and 39 deletions

View file

@ -782,6 +782,7 @@ module Bundler
else
{ :default => Source::RubygemsAggregate.new(sources, source_map) }.merge(source_map.direct_requirements)
end
source_requirements.merge!(source_map.locked_requirements) unless @remote
metadata_dependencies.each do |dep|
source_requirements[dep.name] = sources.metadata_source
end
@ -828,7 +829,7 @@ module Bundler
end
def source_map
@source_map ||= SourceMap.new(sources, dependencies)
@source_map ||= SourceMap.new(sources, dependencies, @locked_specs)
end
end
end

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-ADD" "1" "December 2021" "" ""
.TH "BUNDLE\-ADD" "1" "February 2022" "" ""
.
.SH "NAME"
\fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-BINSTUBS" "1" "December 2021" "" ""
.TH "BUNDLE\-BINSTUBS" "1" "February 2022" "" ""
.
.SH "NAME"
\fBbundle\-binstubs\fR \- Install the binstubs of the listed gems

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-CACHE" "1" "December 2021" "" ""
.TH "BUNDLE\-CACHE" "1" "February 2022" "" ""
.
.SH "NAME"
\fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-CHECK" "1" "December 2021" "" ""
.TH "BUNDLE\-CHECK" "1" "February 2022" "" ""
.
.SH "NAME"
\fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-CLEAN" "1" "December 2021" "" ""
.TH "BUNDLE\-CLEAN" "1" "February 2022" "" ""
.
.SH "NAME"
\fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-CONFIG" "1" "December 2021" "" ""
.TH "BUNDLE\-CONFIG" "1" "February 2022" "" ""
.
.SH "NAME"
\fBbundle\-config\fR \- Set bundler configuration options
@ -83,7 +83,7 @@ A space\-separated list of groups referencing gems to skip during installation\.
.
.TP
\fBwith\fR
A space\-separated list of groups referencing gems to include during installation\.
A space\-separated list of \fBoptional\fR groups referencing gems to include during installation\.
.
.SH "BUILD OPTIONS"
You can use \fBbundle config\fR to give Bundler the flags to pass to the gem installer every time bundler tries to install a particular gem\.

View file

@ -83,7 +83,7 @@ The options that can be configured are:
A space-separated list of groups referencing gems to skip during installation.
* `with`:
A space-separated list of groups referencing gems to include during installation.
A space-separated list of **optional** groups referencing gems to include during installation.
## BUILD OPTIONS

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-DOCTOR" "1" "December 2021" "" ""
.TH "BUNDLE\-DOCTOR" "1" "February 2022" "" ""
.
.SH "NAME"
\fBbundle\-doctor\fR \- Checks the bundle for common problems

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-EXEC" "1" "December 2021" "" ""
.TH "BUNDLE\-EXEC" "1" "February 2022" "" ""
.
.SH "NAME"
\fBbundle\-exec\fR \- Execute a command in the context of the bundle

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-GEM" "1" "December 2021" "" ""
.TH "BUNDLE\-GEM" "1" "February 2022" "" ""
.
.SH "NAME"
\fBbundle\-gem\fR \- Generate a project skeleton for creating a rubygem

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-INFO" "1" "December 2021" "" ""
.TH "BUNDLE\-INFO" "1" "February 2022" "" ""
.
.SH "NAME"
\fBbundle\-info\fR \- Show information for the given gem in your bundle

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-INIT" "1" "December 2021" "" ""
.TH "BUNDLE\-INIT" "1" "February 2022" "" ""
.
.SH "NAME"
\fBbundle\-init\fR \- Generates a Gemfile into the current working directory

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-INJECT" "1" "December 2021" "" ""
.TH "BUNDLE\-INJECT" "1" "February 2022" "" ""
.
.SH "NAME"
\fBbundle\-inject\fR \- Add named gem(s) with version requirements to Gemfile

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-INSTALL" "1" "December 2021" "" ""
.TH "BUNDLE\-INSTALL" "1" "February 2022" "" ""
.
.SH "NAME"
\fBbundle\-install\fR \- Install the dependencies specified in your Gemfile

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-LIST" "1" "December 2021" "" ""
.TH "BUNDLE\-LIST" "1" "February 2022" "" ""
.
.SH "NAME"
\fBbundle\-list\fR \- List all the gems in the bundle

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-LOCK" "1" "December 2021" "" ""
.TH "BUNDLE\-LOCK" "1" "February 2022" "" ""
.
.SH "NAME"
\fBbundle\-lock\fR \- Creates / Updates a lockfile without installing

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-OPEN" "1" "December 2021" "" ""
.TH "BUNDLE\-OPEN" "1" "February 2022" "" ""
.
.SH "NAME"
\fBbundle\-open\fR \- Opens the source directory for a gem in your bundle

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-OUTDATED" "1" "December 2021" "" ""
.TH "BUNDLE\-OUTDATED" "1" "February 2022" "" ""
.
.SH "NAME"
\fBbundle\-outdated\fR \- List installed gems with newer versions available

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-PLATFORM" "1" "December 2021" "" ""
.TH "BUNDLE\-PLATFORM" "1" "February 2022" "" ""
.
.SH "NAME"
\fBbundle\-platform\fR \- Displays platform compatibility information

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-PRISTINE" "1" "December 2021" "" ""
.TH "BUNDLE\-PRISTINE" "1" "February 2022" "" ""
.
.SH "NAME"
\fBbundle\-pristine\fR \- Restores installed gems to their pristine condition

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-REMOVE" "1" "December 2021" "" ""
.TH "BUNDLE\-REMOVE" "1" "February 2022" "" ""
.
.SH "NAME"
\fBbundle\-remove\fR \- Removes gems from the Gemfile

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-SHOW" "1" "December 2021" "" ""
.TH "BUNDLE\-SHOW" "1" "February 2022" "" ""
.
.SH "NAME"
\fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-UPDATE" "1" "December 2021" "" ""
.TH "BUNDLE\-UPDATE" "1" "February 2022" "" ""
.
.SH "NAME"
\fBbundle\-update\fR \- Update your gems to the latest available versions

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-VIZ" "1" "December 2021" "" ""
.TH "BUNDLE\-VIZ" "1" "February 2022" "" ""
.
.SH "NAME"
\fBbundle\-viz\fR \- Generates a visual dependency graph for your Gemfile

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE" "1" "December 2021" "" ""
.TH "BUNDLE" "1" "February 2022" "" ""
.
.SH "NAME"
\fBbundle\fR \- Ruby Dependency Management

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GEMFILE" "5" "December 2021" "" ""
.TH "GEMFILE" "5" "February 2022" "" ""
.
.SH "NAME"
\fBGemfile\fR \- A format for describing gem dependencies for Ruby programs

View file

@ -141,7 +141,7 @@ module Bundler
end
return unless multiple_gemfiles
message = "Multiple gemfiles (gems.rb and Gemfile) detected. " \
"Make sure you remove Gemfile and Gemfile.lock since bundler is ignoring them in favor of gems.rb and gems.rb.locked."
"Make sure you remove Gemfile and Gemfile.lock since bundler is ignoring them in favor of gems.rb and gems.locked."
Bundler.ui.warn message
end

View file

@ -2,11 +2,12 @@
module Bundler
class SourceMap
attr_reader :sources, :dependencies
attr_reader :sources, :dependencies, :locked_specs
def initialize(sources, dependencies)
def initialize(sources, dependencies, locked_specs)
@sources = sources
@dependencies = dependencies
@locked_specs = locked_specs
end
def pinned_spec_names(skip = nil)
@ -54,5 +55,17 @@ module Bundler
requirements
end
end
def locked_requirements
@locked_requirements ||= begin
requirements = {}
locked_specs.each do |locked_spec|
source = locked_spec.source
source.add_dependency_names(locked_spec.name)
requirements[locked_spec.name] = source
end
requirements
end
end
end
end

View file

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

View file

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

View file

@ -431,6 +431,69 @@ RSpec.describe "bundle check" do
end
end
context "with gemspec directive and scoped sources" do
before do
build_repo4 do
build_gem "awesome_print"
end
build_repo2 do
build_gem "dex-dispatch-engine"
end
build_lib("bundle-check-issue", :path => tmp.join("bundle-check-issue")) do |s|
s.write "Gemfile", <<-G
source "https://localgemserver.test"
gemspec
source "https://localgemserver.test/extra" do
gem "dex-dispatch-engine"
end
G
s.add_dependency "awesome_print"
end
bundle "install", :artifice => "compact_index_extra", :env => { "BUNDLER_SPEC_GEM_REPO" => gem_repo4.to_s }, :dir => tmp.join("bundle-check-issue")
end
it "does not corrupt lockfile when changing version" do
version_file = tmp.join("bundle-check-issue/bundle-check-issue.gemspec")
File.write(version_file, File.read(version_file).gsub(/s\.version = .+/, "s.version = '9999'"))
bundle "check --verbose", :dir => tmp.join("bundle-check-issue")
expect(File.read(tmp.join("bundle-check-issue/Gemfile.lock"))).to eq <<~L
PATH
remote: .
specs:
bundle-check-issue (9999)
awesome_print
GEM
remote: https://localgemserver.test/
specs:
awesome_print (1.0)
GEM
remote: https://localgemserver.test/extra/
specs:
dex-dispatch-engine (1.0)
PLATFORMS
#{lockfile_platforms}
DEPENDENCIES
bundle-check-issue!
dex-dispatch-engine!
BUNDLED WITH
#{Bundler::VERSION}
L
end
end
describe "BUNDLED WITH" do
def lock_with(bundler_version = nil)
lock = <<~L

View file

@ -352,7 +352,7 @@ RSpec.describe "major deprecations" do
G
expect(warnings).to include(
"Multiple gemfiles (gems.rb and Gemfile) detected. Make sure you remove Gemfile and Gemfile.lock since bundler is ignoring them in favor of gems.rb and gems.rb.locked."
"Multiple gemfiles (gems.rb and Gemfile) detected. Make sure you remove Gemfile and Gemfile.lock since bundler is ignoring them in favor of gems.rb and gems.locked."
)
expect(the_bundle).not_to include_gem "rack 1.0"
@ -512,7 +512,7 @@ RSpec.describe "major deprecations" do
it "should print a single deprecation warning" do
expect(warnings).to include(
"Multiple gemfiles (gems.rb and Gemfile) detected. Make sure you remove Gemfile and Gemfile.lock since bundler is ignoring them in favor of gems.rb and gems.rb.locked."
"Multiple gemfiles (gems.rb and Gemfile) detected. Make sure you remove Gemfile and Gemfile.lock since bundler is ignoring them in favor of gems.rb and gems.locked."
)
end
end

View file

@ -274,6 +274,8 @@ class TestGemCommandsSetupCommand < Gem::TestCase
spec.executables.each do |e|
assert_path_exist File.join destdir, @gemhome.gsub(/^[a-zA-Z]:/, ''), 'gems', spec.full_name, spec.bindir, e
end
ensure
FileUtils.chmod "+w", @gemhome
end
def test_install_default_bundler_gem_with_destdir_and_prefix_flags

View file

@ -72,4 +72,4 @@ DEPENDENCIES
webrick (~> 1.6)
BUNDLED WITH
2.3.7
2.3.8

View file

@ -61,4 +61,4 @@ DEPENDENCIES
test-unit
BUNDLED WITH
2.3.7
2.3.8

View file

@ -67,4 +67,4 @@ DEPENDENCIES
test-unit
BUNDLED WITH
2.3.7
2.3.8

View file

@ -41,4 +41,4 @@ DEPENDENCIES
webrick (= 1.7.0)
BUNDLED WITH
2.3.7
2.3.8