rubygems-update 4.0.0 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e3a33e757835b567451e625eb60fd87dc9d40b5710c96f6a548cf493bb930f03
4
- data.tar.gz: 95b7748028d7563f74e22aac82e4eab9766ba4aca0b29596af58264ac42721e6
3
+ metadata.gz: 05d5301cfbc5a49e476ca099643c8958b5a62f3c89307a1b52348427d853fb28
4
+ data.tar.gz: aba1853ae1be6dd908d0335103497d6495c245ce0781427eed62d5b659b72b0e
5
5
  SHA512:
6
- metadata.gz: 86a9a29465975044bfc0ad313700a2037a3ef33182f905134df80ab09b43bb753ccd5512bc0cdcc4c8838648ed7e01cfa47d9348d3d482d43c6a045584119be4
7
- data.tar.gz: aaa0136052ccb1ca34cbedc2d45707f34b82820d1b72859c9de97f959b861bddae87e77801a47a50c79f5b5fb3fe2ce56d8fc46c47506646e554629c3bb41cf4
6
+ metadata.gz: db3a9dad410dc490762039bfdb7df7178f5e79e398c9e791eea90334acc5241b4349554cc5e1390d6e003f944e8016569c3d8345c40fe92dce37c508ac3f9d5b
7
+ data.tar.gz: c2e116316498b0c86db14e0d2cfd6f3d4e54ea183f6f8cd59904baede6f8d02a7299f9eebe7589886055b312562445fdfddc74f89e72466f65080a3f90c3024a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.0.1 / 2025-12-09
4
+
5
+ ### Enhancements:
6
+
7
+ * Installs bundler 4.0.1 as a default gem.
8
+
9
+ ### Bug fixes:
10
+
11
+ * Fixed unexpected default bundler installation. Pull request
12
+ [#9167](https://github.com/ruby/rubygems/pull/9167) by hsbt
13
+
14
+ ### Documentation:
15
+
16
+ * Update contributing docs with `RGV`. Pull request
17
+ [#9155](https://github.com/ruby/rubygems/pull/9155) by eileencodes
18
+
3
19
  ## 4.0.0 / 2025-12-03
4
20
 
5
21
  ### Features:
data/bundler/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.0.1 (2025-12-09)
4
+
5
+ ### Performance:
6
+
7
+ - Increase connection pool to allow for up to 70% speed increase on `bundle install` [#9087](https://github.com/ruby/rubygems/pull/9087)
8
+
9
+ ### Enhancements:
10
+
11
+ - Fix the config suggestion in the warning for `$ bundle` [#9164](https://github.com/ruby/rubygems/pull/9164)
12
+ - Fix native extension loading in newgem template for RHEL-based systems [#9156](https://github.com/ruby/rubygems/pull/9156)
13
+
14
+ ### Bug fixes:
15
+
16
+ - Fix Bundler removing executables after creating them [#9169](https://github.com/ruby/rubygems/pull/9169)
17
+
3
18
  ## 4.0.0 (2025-12-03)
4
19
 
5
20
  ### Features:
@@ -4,8 +4,8 @@ module Bundler
4
4
  # Represents metadata from when the Bundler gem was built.
5
5
  module BuildMetadata
6
6
  # begin ivars
7
- @built_at = "2025-12-03".freeze
8
- @git_commit_sha = "64d0dfe695".freeze
7
+ @built_at = "2025-12-09".freeze
8
+ @git_commit_sha = "f3e5ebf5af".freeze
9
9
  # end ivars
10
10
 
11
11
  # A hash representation of the build metadata.
@@ -120,28 +120,31 @@ module Bundler
120
120
  self.class.send(:class_options_help, shell)
121
121
  end
122
122
 
123
- desc "install_or_cli_help", "Tries to run bundle install but prints a summary of bundler commands if there is no Gemfile", hide: true
123
+ desc "install_or_cli_help", "Deprecated alias of install", hide: true
124
124
  def install_or_cli_help
125
+ Bundler.ui.warn <<~MSG
126
+ `bundle install_or_cli_help` is a deprecated alias of `bundle install`.
127
+ It might be called due to the 'default_cli_command' being set to 'install_or_cli_help',
128
+ if so fix that by running `bundle config set default_cli_command install --global`.
129
+ MSG
125
130
  invoke_other_command("install")
126
- rescue GemfileNotFound => error
127
- Bundler.ui.error error.message, wrap: true
128
- invoke_other_command("cli_help")
129
131
  end
130
132
 
131
133
  def self.default_command(meth = nil)
132
134
  return super if meth
133
135
 
134
136
  unless Bundler.settings[:default_cli_command]
135
- Bundler.ui.info <<-MSG
137
+ Bundler.ui.info <<~MSG
136
138
  In a future version of Bundler, running `bundle` without argument will no longer run `bundle install`.
137
139
  Instead, the `cli_help` command will be displayed. Please use `bundle install` explicitly for scripts like CI/CD.
138
140
  You can use the future behavior now with `bundle config set default_cli_command cli_help --global`,
139
- or you can continue to use the current behavior with `bundle config set default_cli_command install_or_cli_help --global`.
141
+ or you can continue to use the current behavior with `bundle config set default_cli_command install --global`.
140
142
  This message will be removed after a default_cli_command value is set.
143
+
141
144
  MSG
142
145
  end
143
146
 
144
- Bundler.settings[:default_cli_command] || "install_or_cli_help"
147
+ Bundler.settings[:default_cli_command] || "install"
145
148
  end
146
149
 
147
150
  class_option "no-color", type: :boolean, desc: "Disable colorization in output"
@@ -287,6 +290,9 @@ module Bundler
287
290
  Bundler.settings.temporary(no_install: false) do
288
291
  Install.new(options).run
289
292
  end
293
+ rescue GemfileNotFound => error
294
+ invoke_other_command("cli_help")
295
+ raise error # re-raise to show the error and get a failing exit status
290
296
  end
291
297
 
292
298
  map aliases_for("install")
@@ -60,6 +60,28 @@ module Bundler
60
60
  end
61
61
  end
62
62
 
63
+ # needed for binstubs
64
+ def executables
65
+ if @remote_specification
66
+ @remote_specification.executables
67
+ elsif _local_specification
68
+ _local_specification.executables
69
+ else
70
+ super
71
+ end
72
+ end
73
+
74
+ # needed for bundle clean
75
+ def bindir
76
+ if @remote_specification
77
+ @remote_specification.bindir
78
+ elsif _local_specification
79
+ _local_specification.bindir
80
+ else
81
+ super
82
+ end
83
+ end
84
+
63
85
  # needed for post_install_messages during install
64
86
  def post_install_message
65
87
  if @remote_specification
@@ -5,6 +5,12 @@ require "rubygems/remote_fetcher"
5
5
  module Bundler
6
6
  class Fetcher
7
7
  class GemRemoteFetcher < Gem::RemoteFetcher
8
+ def initialize(*)
9
+ super
10
+
11
+ @pool_size = 5
12
+ end
13
+
8
14
  def request(*args)
9
15
  super do |req|
10
16
  req.delete("User-Agent") if headers["User-Agent"]
@@ -2,7 +2,7 @@
2
2
 
3
3
  require_relative "<%= File.basename(config[:namespaced_path]) %>/version"
4
4
  <%- if config[:ext] -%>
5
- require_relative "<%= File.basename(config[:namespaced_path]) %>/<%= config[:underscored_name] %>"
5
+ require "<%= File.basename(config[:namespaced_path]) %>/<%= config[:underscored_name] %>"
6
6
  <%- end -%>
7
7
 
8
8
  <%- config[:constant_array].each_with_index do |c, i| -%>
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Bundler
4
- VERSION = "4.0.0".freeze
4
+ VERSION = "4.0.1".freeze
5
5
 
6
6
  def self.bundler_major_version
7
7
  @bundler_major_version ||= gem_version.segments.first
@@ -82,6 +82,10 @@ To run an individual test file location for example in `spec/install/gems/standa
82
82
 
83
83
  bin/rspec spec/install/gems/standalone_spec.rb
84
84
 
85
+ To test Rubygems changes in bundler, set the path to your local Rubygems copy using the `RGV` environment variable:
86
+
87
+ RGV=.. bin/rspec spec/install/gems/standalone_spec.rb
88
+
85
89
  ### Checking code style
86
90
 
87
91
  You can check compliance with our code style with
@@ -402,8 +402,10 @@ By default, this RubyGems will install gem as:
402
402
  install_dir: default_dir,
403
403
  wrappers: true
404
404
  )
405
- installer.install
406
- File.delete installer.spec_file
405
+ # We need to install only executable and default spec files.
406
+ # lib/bundler.rb and lib/bundler/* are available under the site_ruby directory.
407
+ installer.extract_bin
408
+ installer.generate_bin
407
409
  installer.write_default_spec
408
410
  ensure
409
411
  FileUtils.rm_f built_gem
@@ -82,6 +82,7 @@ class Gem::RemoteFetcher
82
82
  @proxy = proxy
83
83
  @pools = {}
84
84
  @pool_lock = Thread::Mutex.new
85
+ @pool_size = 1
85
86
  @cert_files = Gem::Request.get_cert_files
86
87
 
87
88
  @headers = headers
@@ -338,7 +339,7 @@ class Gem::RemoteFetcher
338
339
 
339
340
  def pools_for(proxy)
340
341
  @pool_lock.synchronize do
341
- @pools[proxy] ||= Gem::Request::ConnectionPools.new proxy, @cert_files
342
+ @pools[proxy] ||= Gem::Request::ConnectionPools.new proxy, @cert_files, @pool_size
342
343
  end
343
344
  end
344
345
  end
@@ -7,11 +7,12 @@ class Gem::Request::ConnectionPools # :nodoc:
7
7
  attr_accessor :client
8
8
  end
9
9
 
10
- def initialize(proxy_uri, cert_files)
10
+ def initialize(proxy_uri, cert_files, pool_size = 1)
11
11
  @proxy_uri = proxy_uri
12
12
  @cert_files = cert_files
13
13
  @pools = {}
14
14
  @pool_mutex = Thread::Mutex.new
15
+ @pool_size = pool_size
15
16
  end
16
17
 
17
18
  def pool_for(uri)
@@ -20,9 +21,9 @@ class Gem::Request::ConnectionPools # :nodoc:
20
21
  @pool_mutex.synchronize do
21
22
  @pools[key] ||=
22
23
  if https? uri
23
- Gem::Request::HTTPSPool.new(http_args, @cert_files, @proxy_uri)
24
+ Gem::Request::HTTPSPool.new(http_args, @cert_files, @proxy_uri, @pool_size)
24
25
  else
25
- Gem::Request::HTTPPool.new(http_args, @cert_files, @proxy_uri)
26
+ Gem::Request::HTTPPool.new(http_args, @cert_files, @proxy_uri, @pool_size)
26
27
  end
27
28
  end
28
29
  end
@@ -9,12 +9,14 @@
9
9
  class Gem::Request::HTTPPool # :nodoc:
10
10
  attr_reader :cert_files, :proxy_uri
11
11
 
12
- def initialize(http_args, cert_files, proxy_uri)
12
+ def initialize(http_args, cert_files, proxy_uri, pool_size)
13
13
  @http_args = http_args
14
14
  @cert_files = cert_files
15
15
  @proxy_uri = proxy_uri
16
- @queue = Thread::SizedQueue.new 1
17
- @queue << nil
16
+ @pool_size = pool_size
17
+
18
+ @queue = Thread::SizedQueue.new @pool_size
19
+ setup_queue
18
20
  end
19
21
 
20
22
  def checkout
@@ -31,7 +33,8 @@ class Gem::Request::HTTPPool # :nodoc:
31
33
  connection.finish
32
34
  end
33
35
  end
34
- @queue.push(nil)
36
+
37
+ setup_queue
35
38
  end
36
39
 
37
40
  private
@@ -44,4 +47,8 @@ class Gem::Request::HTTPPool # :nodoc:
44
47
  connection.start
45
48
  connection
46
49
  end
50
+
51
+ def setup_queue
52
+ @pool_size.times { @queue.push(nil) }
53
+ end
47
54
  end
data/lib/rubygems.rb CHANGED
@@ -9,7 +9,7 @@
9
9
  require "rbconfig"
10
10
 
11
11
  module Gem
12
- VERSION = "4.0.0"
12
+ VERSION = "4.0.1"
13
13
  end
14
14
 
15
15
  require_relative "rubygems/defaults"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubygems-update
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Weirich
@@ -722,7 +722,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
722
722
  - !ruby/object:Gem::Version
723
723
  version: '0'
724
724
  requirements: []
725
- rubygems_version: 3.6.9
725
+ rubygems_version: 4.0.0
726
726
  specification_version: 4
727
727
  summary: RubyGems is a package management framework for Ruby. This gem is downloaded
728
728
  and installed by `gem update --system`, so that the `gem` CLI can update itself.