Skip to content

Commit c944d05

Browse files
Merge pull request #7293 from rubygems/release/bundler_2.5.1_rubygems_3.5.1
Prepare RubyGems 3.5.1 and Bundler 2.5.1
2 parents 58fdbff + edf04b5 commit c944d05

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+490
-434
lines changed

.github/workflows/ubuntu-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ concurrency:
1111
group: ci-${{ github.ref }}-${{ github.workflow }}
1212
cancel-in-progress: true
1313

14-
permissions: # added using https://github.com/step-security/secure-workflows
14+
permissions: # added using https://github.com/step-security/secure-workflows
1515
contents: read
1616

1717
jobs:
@@ -36,5 +36,5 @@ jobs:
3636
- name: Install & Check Dependencies
3737
run: bin/rake dev:frozen_deps
3838
- name: Misc checks
39-
run: bin/rake check_rvm_integration man:check check_rubygems_integration
39+
run: bin/rake check_rvm_integration man:check vendor:check check_rubygems_integration
4040
timeout-minutes: 15

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 3.5.1 / 2023-12-15
2+
3+
## Enhancements:
4+
5+
* Installs bundler 2.5.1 as a default gem.
6+
17
# 3.5.0 / 2023-12-15
28

39
## Security:

Manifest.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,18 +248,22 @@ bundler/lib/bundler/ui/silent.rb
248248
bundler/lib/bundler/uri_credentials_filter.rb
249249
bundler/lib/bundler/uri_normalizer.rb
250250
bundler/lib/bundler/vendor/.document
251+
bundler/lib/bundler/vendor/connection_pool/.document
251252
bundler/lib/bundler/vendor/connection_pool/LICENSE
252253
bundler/lib/bundler/vendor/connection_pool/lib/connection_pool.rb
253254
bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb
254255
bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb
255256
bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb
257+
bundler/lib/bundler/vendor/fileutils/.document
256258
bundler/lib/bundler/vendor/fileutils/LICENSE.txt
257259
bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb
260+
bundler/lib/bundler/vendor/net-http-persistent/.document
258261
bundler/lib/bundler/vendor/net-http-persistent/README.rdoc
259262
bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb
260263
bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb
261264
bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb
262265
bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb
266+
bundler/lib/bundler/vendor/pub_grub/.document
263267
bundler/lib/bundler/vendor/pub_grub/LICENSE.txt
264268
bundler/lib/bundler/vendor/pub_grub/lib/pub_grub.rb
265269
bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb
@@ -277,6 +281,7 @@ bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb
277281
bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb
278282
bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb
279283
bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb
284+
bundler/lib/bundler/vendor/thor/.document
280285
bundler/lib/bundler/vendor/thor/LICENSE.md
281286
bundler/lib/bundler/vendor/thor/lib/thor.rb
282287
bundler/lib/bundler/vendor/thor/lib/thor/actions.rb
@@ -314,8 +319,10 @@ bundler/lib/bundler/vendor/thor/lib/thor/shell/terminal.rb
314319
bundler/lib/bundler/vendor/thor/lib/thor/shell/wrapped_printer.rb
315320
bundler/lib/bundler/vendor/thor/lib/thor/util.rb
316321
bundler/lib/bundler/vendor/thor/lib/thor/version.rb
322+
bundler/lib/bundler/vendor/tsort/.document
317323
bundler/lib/bundler/vendor/tsort/LICENSE.txt
318324
bundler/lib/bundler/vendor/tsort/lib/tsort.rb
325+
bundler/lib/bundler/vendor/uri/.document
319326
bundler/lib/bundler/vendor/uri/LICENSE.txt
320327
bundler/lib/bundler/vendor/uri/lib/uri.rb
321328
bundler/lib/bundler/vendor/uri/lib/uri/common.rb
@@ -425,6 +432,7 @@ lib/rubygems/installer.rb
425432
lib/rubygems/installer_uninstaller_utils.rb
426433
lib/rubygems/local_remote_options.rb
427434
lib/rubygems/name_tuple.rb
435+
lib/rubygems/net-http/.document
428436
lib/rubygems/net-http/LICENSE.txt
429437
lib/rubygems/net-http/lib/net/http.rb
430438
lib/rubygems/net-http/lib/net/http/backward.rb
@@ -438,6 +446,7 @@ lib/rubygems/net-http/lib/net/http/response.rb
438446
lib/rubygems/net-http/lib/net/http/responses.rb
439447
lib/rubygems/net-http/lib/net/http/status.rb
440448
lib/rubygems/net-http/lib/net/https.rb
449+
lib/rubygems/net-protocol/.document
441450
lib/rubygems/net-protocol/LICENSE.txt
442451
lib/rubygems/net-protocol/lib/net/protocol.rb
443452
lib/rubygems/net/http.rb
@@ -481,6 +490,7 @@ lib/rubygems/request_set/lockfile.rb
481490
lib/rubygems/request_set/lockfile/parser.rb
482491
lib/rubygems/request_set/lockfile/tokenizer.rb
483492
lib/rubygems/requirement.rb
493+
lib/rubygems/resolv/.document
484494
lib/rubygems/resolv/LICENSE.txt
485495
lib/rubygems/resolv/lib/resolv.rb
486496
lib/rubygems/resolver.rb
@@ -503,6 +513,7 @@ lib/rubygems/resolver/local_specification.rb
503513
lib/rubygems/resolver/lock_set.rb
504514
lib/rubygems/resolver/lock_specification.rb
505515
lib/rubygems/resolver/molinillo.rb
516+
lib/rubygems/resolver/molinillo/.document
506517
lib/rubygems/resolver/molinillo/LICENSE
507518
lib/rubygems/resolver/molinillo/lib/molinillo.rb
508519
lib/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb
@@ -564,6 +575,7 @@ lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA_R3.pem
564575
lib/rubygems/stub_specification.rb
565576
lib/rubygems/text.rb
566577
lib/rubygems/timeout.rb
578+
lib/rubygems/timeout/.document
567579
lib/rubygems/timeout/LICENSE.txt
568580
lib/rubygems/timeout/lib/timeout.rb
569581
lib/rubygems/tsort.rb

Rakefile

Lines changed: 11 additions & 171 deletions
Original file line numberDiff line numberDiff line change
@@ -105,180 +105,20 @@ RDoc::Task.new rdoc: "docs", clobber_rdoc: "clobber_docs" do |doc|
105105
doc.rdoc_dir = "doc"
106106
end
107107

108-
# No big deal if Automatiek is not available. This might be just because
109-
# `rake` is executed from release tarball.
110-
if File.exist?("tool/automatiek.rake")
111-
load "tool/automatiek.rake"
112-
113-
# We currently ship Molinillo master branch as of
114-
# https://github.com/CocoaPods/Molinillo/commit/7cc27a355e861bdf593e2cde7bf1bca3daae4303
115-
desc "Vendor a specific version of molinillo to rubygems"
116-
Automatiek::RakeTask.new("molinillo") do |lib|
117-
lib.version = "master"
118-
lib.download = { github: "https://github.com/CocoaPods/Molinillo" }
119-
lib.namespace = "Molinillo"
120-
lib.prefix = "Gem::Resolver"
121-
lib.vendor_lib = "lib/rubygems/resolver/molinillo"
122-
lib.license_path = "LICENSE"
123-
124-
lib.dependency("tsort") do |sublib|
125-
sublib.version = "v0.2.0"
126-
sublib.download = { github: "https://github.com/ruby/tsort" }
127-
sublib.namespace = "TSort"
128-
sublib.prefix = "Gem"
129-
sublib.vendor_lib = "lib/rubygems/tsort"
130-
sublib.license_path = "LICENSE.txt"
131-
end
108+
namespace :vendor do
109+
task :bundle do
110+
sh({ "BUNDLE_PATH" => "../../tmp/vendor", "BUNDLER_GEM_DEFAULT_DIR" => "../../tmp/vendor" }, "ruby", "--disable-gems", "-r./bundler/spec/support/hax.rb", "-I", "lib", "bundler/spec/support/bundle.rb", "install", "--gemfile=tool/bundler/vendor_gems.rb")
132111
end
133112

134-
# We currently ship optparse 0.3.0 plus the following changes:
135-
# * Remove top aliasing the `::OptParse` constant to `OptionParser`, since we
136-
# don't need it and it triggers redefinition warnings since the default
137-
# optparse gem also does the aliasing.
138-
# * Add an empty .document file to the library's root path to hint RDoc that
139-
# this library should not be documented.
140-
desc "Vendor a specific version of optparse to rubygems"
141-
Automatiek::RakeTask.new("optparse") do |lib|
142-
lib.version = "v0.4.0"
143-
lib.download = { github: "https://github.com/ruby/optparse" }
144-
lib.namespace = "OptionParser"
145-
lib.prefix = "Gem"
146-
lib.vendor_lib = "lib/rubygems/optparse"
147-
lib.license_path = "COPYING"
148-
end
149-
150-
desc "Vendor a specific version of pub_grub to bundler"
151-
Automatiek::RakeTask.new("pub_grub") do |lib|
152-
lib.version = "main"
153-
lib.download = { github: "https://github.com/jhawthorn/pub_grub" }
154-
lib.namespace = "PubGrub"
155-
lib.prefix = "Bundler"
156-
lib.vendor_lib = "bundler/lib/bundler/vendor/pub_grub"
157-
lib.license_path = "LICENSE.txt"
158-
end
159-
160-
desc "Vendor a specific version of tsort to bundler"
161-
Automatiek::RakeTask.new("tsort") do |lib|
162-
lib.version = "v0.2.0"
163-
lib.download = { github: "https://github.com/ruby/tsort" }
164-
lib.namespace = "TSort"
165-
lib.prefix = "Bundler"
166-
lib.vendor_lib = "bundler/lib/bundler/vendor/tsort"
167-
lib.license_path = "LICENSE.txt"
168-
end
169-
170-
desc "Vendor a specific version of thor to bundler"
171-
Automatiek::RakeTask.new("thor") do |lib|
172-
lib.version = "v1.3.0"
173-
lib.download = { github: "https://github.com/rails/thor" }
174-
lib.namespace = "Thor"
175-
lib.prefix = "Bundler"
176-
lib.vendor_lib = "bundler/lib/bundler/vendor/thor"
177-
lib.license_path = "LICENSE.md"
178-
end
179-
180-
desc "Vendor a specific version of fileutils to bundler"
181-
Automatiek::RakeTask.new("fileutils") do |lib|
182-
lib.version = "v1.7.2"
183-
lib.download = { github: "https://github.com/ruby/fileutils" }
184-
lib.namespace = "FileUtils"
185-
lib.prefix = "Bundler"
186-
lib.vendor_lib = "bundler/lib/bundler/vendor/fileutils"
187-
lib.license_path = "LICENSE.txt"
188-
end
189-
190-
# We currently include the following changes over the official version:
191-
# * Avoid requiring the optional `net-http-pipeline` dependency, so that its version can be selected by end users.
192-
# * Require vendored net/http version RubyGems if available, otherwise the stdlib version.
193-
desc "Vendor a specific version of net-http-persistent to bundler"
194-
Automatiek::RakeTask.new("net-http-persistent") do |lib|
195-
lib.version = "v4.0.2"
196-
lib.download = { github: "https://github.com/drbrain/net-http-persistent" }
197-
lib.namespace = "Net::HTTP::Persistent"
198-
lib.prefix = "Gem"
199-
lib.vendor_lib = "bundler/lib/bundler/vendor/net-http-persistent"
200-
lib.license_path = "README.rdoc"
201-
202-
lib.dependency("connection_pool") do |sublib|
203-
sublib.version = "v2.4.1"
204-
sublib.download = { github: "https://github.com/mperham/connection_pool" }
205-
sublib.namespace = "ConnectionPool"
206-
sublib.prefix = "Bundler"
207-
sublib.vendor_lib = "bundler/lib/bundler/vendor/connection_pool"
208-
sublib.license_path = "LICENSE"
209-
210-
sublib.dependency("timeout") do |subsublib|
211-
subsublib.version = "v0.4.1"
212-
subsublib.download = { github: "https://github.com/ruby/timeout" }
213-
subsublib.namespace = "Timeout"
214-
subsublib.prefix = "Gem"
215-
subsublib.vendor_lib = "lib/rubygems/timeout"
216-
subsublib.license_path = "LICENSE.txt"
217-
end
218-
end
219-
220-
lib.dependency("uri") do |sublib|
221-
sublib.version = "v0.13.0"
222-
sublib.download = { github: "https://github.com/ruby/uri" }
223-
sublib.namespace = "URI"
224-
sublib.prefix = "Bundler"
225-
sublib.vendor_lib = "bundler/lib/bundler/vendor/uri"
226-
sublib.license_path = "LICENSE.txt"
227-
end
228-
229-
lib.dependency("net-http") do |sublib|
230-
sublib.version = "v0.4.0"
231-
sublib.download = { github: "https://github.com/ruby/net-http" }
232-
sublib.namespace = "Net"
233-
sublib.prefix = "Gem"
234-
sublib.vendor_lib = "lib/rubygems/net-http"
235-
sublib.license_path = "LICENSE.txt"
236-
237-
sublib.dependency("net-protocol") do |subsublib|
238-
subsublib.version = "v0.2.2"
239-
subsublib.download = { github: "https://github.com/ruby/net-protocol" }
240-
subsublib.namespace = "Net"
241-
subsublib.prefix = "Gem"
242-
subsublib.vendor_lib = "lib/rubygems/net-protocol"
243-
subsublib.license_path = "LICENSE.txt"
244-
245-
subsublib.dependency("timeout") do |ssslib|
246-
ssslib.version = "v0.4.1"
247-
ssslib.download = { github: "https://github.com/ruby/timeout" }
248-
ssslib.namespace = "Timeout"
249-
ssslib.prefix = "Gem"
250-
ssslib.vendor_lib = "lib/rubygems/timeout"
251-
ssslib.license_path = "LICENSE.txt"
252-
end
253-
end
254-
255-
sublib.dependency("timeout") do |subsublib|
256-
subsublib.version = "v0.4.1"
257-
subsublib.download = { github: "https://github.com/ruby/timeout" }
258-
subsublib.namespace = "Timeout"
259-
subsublib.prefix = "Gem"
260-
subsublib.vendor_lib = "lib/rubygems/timeout"
261-
subsublib.license_path = "LICENSE.txt"
262-
end
113+
task install: :bundle do
114+
sh({ "BUNDLE_GEMFILE" => "tool/bundler/vendor_gems.rb", "BUNDLE_PATH" => "../../tmp/vendor", "BUNDLER_GEM_DEFAULT_DIR" => "../../tmp/vendor" }, "ruby", "-rpathname", "-r./bundler/spec/support/hax.rb", "-I", "lib", "bundler/spec/support/bundle.rb", "exec", "tool/automatiek/vendor.rb")
115+
end
263116

264-
sublib.dependency("resolv") do |subsublib|
265-
subsublib.version = "v0.3.0"
266-
subsublib.download = { github: "https://github.com/ruby/resolv" }
267-
subsublib.namespace = "Resolv"
268-
subsublib.prefix = "Gem"
269-
subsublib.vendor_lib = "lib/rubygems/resolv"
270-
subsublib.license_path = "LICENSE.txt"
271-
272-
subsublib.dependency("timeout") do |ssslib|
273-
ssslib.version = "v0.4.1"
274-
ssslib.download = { github: "https://github.com/ruby/timeout" }
275-
ssslib.namespace = "Timeout"
276-
ssslib.prefix = "Gem"
277-
ssslib.vendor_lib = "lib/rubygems/timeout"
278-
ssslib.license_path = "LICENSE.txt"
279-
end
280-
end
281-
end
117+
task check: :install do
118+
Spec::Rubygems.check_source_control_changes(
119+
success_message: "Vendored gems are in sync",
120+
error_message: "Vendored gems are out of sync. Please update the vendored lib patches."
121+
)
282122
end
283123
end
284124

bundler/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# 2.5.1 (December 15, 2023)
2+
3+
## Bug fixes:
4+
5+
- Fix `ruby` Gemfile DSL with `file:` parameter no longer working [#7288](https://github.com/rubygems/rubygems/pull/7288)
6+
7+
## Performance:
8+
9+
- Save array allocation for every dependency in Gemfile [#7270](https://github.com/rubygems/rubygems/pull/7270)
10+
111
# 2.5.0 (December 15, 2023)
212

313
## Breaking changes:

bundler/lib/bundler.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,7 @@ def bundle_path
100100
end
101101

102102
def create_bundle_path
103-
SharedHelpers.filesystem_access(bundle_path.to_s) do |p|
104-
mkdir_p(p)
105-
end unless bundle_path.exist?
103+
mkdir_p(bundle_path) unless bundle_path.exist?
106104

107105
@bundle_path = bundle_path.realpath
108106
rescue Errno::EEXIST
@@ -119,7 +117,7 @@ def bin_path
119117
@bin_path ||= begin
120118
path = settings[:bin] || "bin"
121119
path = Pathname.new(path).expand_path(root).expand_path
122-
SharedHelpers.filesystem_access(path) {|p| FileUtils.mkdir_p(p) }
120+
mkdir_p(path)
123121
path
124122
end
125123
end
@@ -483,7 +481,7 @@ def use_system_gems?
483481
configured_bundle_path.use_system_gems?
484482
end
485483

486-
def mkdir_p(path, options = {})
484+
def mkdir_p(path)
487485
SharedHelpers.filesystem_access(path, :write) do |p|
488486
FileUtils.mkdir_p(p)
489487
end

0 commit comments

Comments
 (0)