rubygems-update 3.5.16 → 3.5.17

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 97995bf356031d7683c1336089b3520a4604416619ce917d5efb42f628c8abc2
4
- data.tar.gz: 3f66e1705ddc62583b44bebedd33089c7edbb6ba27f4ecfee984069a53f97548
3
+ metadata.gz: 4de10b4ef4790d15ab080c077f5373aa81c8173d79c92b7114abb206892bac14
4
+ data.tar.gz: a4f077e4f6133d34807d56da7441a6913a431842d0a25df6a1fc675885d7ae6d
5
5
  SHA512:
6
- metadata.gz: e92f698093d5c671bb617ecb0d5b25e3803b55f182e3cf523e4a2490278ece4a9ed0aa4d984d54ae2f0703847d2b63c50557d1fc05d84b2cd40b6d87c85fe105
7
- data.tar.gz: 520eead8b68e27c40f18e54976aac985e1d52baed43b080bbb54a7ab43d6c3f936f8a0d57a0c1fe797e17bdf0a189f4d920e0876b2f938f6ebd571e391c74a28
6
+ metadata.gz: e5a60f2a2906d32a151b741a5a0b7a10f3ce771e67c442f4a2c1d6bd32aaecfc5df0f4df01e1daa388e2eedcb523bebbd6a1eac96d5d9b96badc0e2feb2980a3
7
+ data.tar.gz: 4b70512b9ea90529d0493fc06e52d905ad4bd52379584828045604c4113f11f3a9728362d86f182f7b69487651b2cdcfaa303134dfc68204a0254ebf75c9e63e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,22 @@
1
+ # 3.5.17 / 2024-08-01
2
+
3
+ ## Enhancements:
4
+
5
+ * Explicitly encode `Gem::Dependency` to yaml. Pull request
6
+ [#7867](https://github.com/rubygems/rubygems/pull/7867) by segiddins
7
+ * Installs bundler 2.5.17 as a default gem.
8
+
9
+ ## Bug fixes:
10
+
11
+ * Fix `gem list` regression when a regular gem shadows a default one. Pull
12
+ request [#7892](https://github.com/rubygems/rubygems/pull/7892) by
13
+ deivid-rodriguez
14
+ * Always leave default gem executables around. Pull request
15
+ [#7879](https://github.com/rubygems/rubygems/pull/7879) by
16
+ deivid-rodriguez
17
+ * Fix line comment issue for hash when loading gemrc. Pull request
18
+ [#7857](https://github.com/rubygems/rubygems/pull/7857) by leetking
19
+
1
20
  # 3.5.16 / 2024-07-18
2
21
 
3
22
  ## Enhancements:
data/bundler/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ # 2.5.17 (August 1, 2024)
2
+
3
+ ## Enhancements:
4
+
5
+ - Print better log message when current platform is not present in the lockfile [#7891](https://github.com/rubygems/rubygems/pull/7891)
6
+ - Explicitly encode `Gem::Dependency` to yaml [#7867](https://github.com/rubygems/rubygems/pull/7867)
7
+ - Enable lockfile checksums on future Bundler 3 when there's no previous lockfile [#7805](https://github.com/rubygems/rubygems/pull/7805)
8
+
9
+ ## Bug fixes:
10
+
11
+ - Fix truffleruby removing gems from lockfile [#7795](https://github.com/rubygems/rubygems/pull/7795)
12
+ - Fix `bundle check` exit code when gem git source is not checked out [#7894](https://github.com/rubygems/rubygems/pull/7894)
13
+ - Generate gems.rb from Gemfile.tt template for `bundle-gem` [#7853](https://github.com/rubygems/rubygems/pull/7853)
14
+ - Fix git source cache being used as the install location [#4469](https://github.com/rubygems/rubygems/pull/4469)
15
+ - Fix `bundle exec gem uninstall` [#7886](https://github.com/rubygems/rubygems/pull/7886)
16
+
1
17
  # 2.5.16 (July 18, 2024)
2
18
 
3
19
  ## Bug fixes:
@@ -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 = "2024-07-18".freeze
8
- @git_commit_sha = "f49d3d48c9".freeze
7
+ @built_at = "2024-08-01".freeze
8
+ @git_commit_sha = "74d92b2502".freeze
9
9
  @release = true
10
10
  # end ivars
11
11
 
@@ -17,7 +17,7 @@ module Bundler
17
17
  begin
18
18
  definition.resolve_only_locally!
19
19
  not_installed = definition.missing_specs
20
- rescue GemNotFound, SolveFailure
20
+ rescue GemNotFound, GitError, SolveFailure
21
21
  Bundler.ui.error "Bundler can't satisfy your Gemfile's dependencies."
22
22
  Bundler.ui.warn "Install missing gems with `bundle install`."
23
23
  exit 1
@@ -79,7 +79,7 @@ module Bundler
79
79
  ensure_safe_gem_name(name, constant_array)
80
80
 
81
81
  templates = {
82
- "#{Bundler.preferred_gemfile_name}.tt" => Bundler.preferred_gemfile_name,
82
+ "Gemfile.tt" => Bundler.preferred_gemfile_name,
83
83
  "lib/newgem.rb.tt" => "lib/#{namespaced_path}.rb",
84
84
  "lib/newgem/version.rb.tt" => "lib/#{namespaced_path}/version.rb",
85
85
  "sig/newgem.rbs.tt" => "sig/#{namespaced_path}.rbs",
@@ -110,8 +110,8 @@ module Bundler
110
110
  default_task(Bundler.feature_flag.default_cli_command)
111
111
 
112
112
  class_option "no-color", type: :boolean, desc: "Disable colorization in output"
113
- class_option "retry", type: :numeric, aliases: "-r", banner: "NUM",
114
- desc: "Specify the number of times you wish to attempt network commands"
113
+ class_option "retry", type: :numeric, aliases: "-r", banner: "NUM",
114
+ desc: "Specify the number of times you wish to attempt network commands"
115
115
  class_option "verbose", type: :boolean, desc: "Enable verbose output mode", aliases: "-V"
116
116
 
117
117
  def help(cli = nil)
@@ -260,15 +260,15 @@ module Bundler
260
260
  method_option "gemfile", type: :string, banner: "Use the specified gemfile instead of Gemfile"
261
261
  method_option "group", aliases: "-g", type: :array, banner: "Update a specific group"
262
262
  method_option "jobs", aliases: "-j", type: :numeric, banner: "Specify the number of jobs to run in parallel"
263
- method_option "local", type: :boolean, banner: "Do not attempt to fetch gems remotely and use the gem cache instead"
264
- method_option "quiet", type: :boolean, banner: "Only output warnings and errors."
263
+ method_option "local", type: :boolean, banner: "Do not attempt to fetch gems remotely and use the gem cache instead"
264
+ method_option "quiet", type: :boolean, banner: "Only output warnings and errors."
265
265
  method_option "source", type: :array, banner: "Update a specific source (and all gems associated with it)"
266
266
  method_option "redownload", type: :boolean, aliases: "--force", banner: "Force downloading every gem."
267
267
  method_option "ruby", type: :boolean, banner: "Update ruby specified in Gemfile.lock"
268
268
  method_option "bundler", type: :string, lazy_default: "> 0.a", banner: "Update the locked version of bundler"
269
- method_option "patch", type: :boolean, banner: "Prefer updating only to next patch version"
270
- method_option "minor", type: :boolean, banner: "Prefer updating only to next minor version"
271
- method_option "major", type: :boolean, banner: "Prefer updating to next major version (default)"
269
+ method_option "patch", type: :boolean, banner: "Prefer updating only to next patch version"
270
+ method_option "minor", type: :boolean, banner: "Prefer updating only to next minor version"
271
+ method_option "major", type: :boolean, banner: "Prefer updating to next major version (default)"
272
272
  method_option "pre", type: :boolean, banner: "Always choose the highest allowed version when updating gems, regardless of prerelease status"
273
273
  method_option "strict", type: :boolean, banner: "Do not allow any gem to be updated past latest --patch | --minor | --major"
274
274
  method_option "conservative", type: :boolean, banner: "Use bundle install conservative update behavior and do not allow shared dependencies to be updated."
@@ -397,11 +397,11 @@ module Bundler
397
397
  end
398
398
 
399
399
  desc "cache [OPTIONS]", "Locks and then caches all of the gems into vendor/cache"
400
- method_option "all", type: :boolean,
401
- default: Bundler.feature_flag.cache_all?,
402
- banner: "Include all sources (including path and git)."
400
+ method_option "all", type: :boolean,
401
+ default: Bundler.feature_flag.cache_all?,
402
+ banner: "Include all sources (including path and git)."
403
403
  method_option "all-platforms", type: :boolean, banner: "Include gems for all platforms present in the lockfile, not only the current one"
404
- method_option "cache-path", type: :string, banner: "Specify a different cache path than the default (vendor/cache)."
404
+ method_option "cache-path", type: :string, banner: "Specify a different cache path than the default (vendor/cache)."
405
405
  method_option "gemfile", type: :string, banner: "Use the specified gemfile instead of Gemfile"
406
406
  method_option "no-install", type: :boolean, banner: "Don't install the gems, only update the cache."
407
407
  method_option "no-prune", type: :boolean, banner: "Don't remove stale gems from the cache."
@@ -605,7 +605,7 @@ module Bundler
605
605
  end
606
606
 
607
607
  desc "inject GEM VERSION", "Add the named gem, with version requirements, to the resolved Gemfile", hide: true
608
- method_option "source", type: :string, banner: "Install gem from the given source"
608
+ method_option "source", type: :string, banner: "Install gem from the given source"
609
609
  method_option "group", type: :string, banner: "Install gem into a bundler group"
610
610
  def inject(name, version)
611
611
  SharedHelpers.major_deprecation 2, "The `inject` command has been replaced by the `add` command"
@@ -615,16 +615,16 @@ module Bundler
615
615
 
616
616
  desc "lock", "Creates a lockfile without installing"
617
617
  method_option "update", type: :array, lazy_default: true, banner: "ignore the existing lockfile, update all gems by default, or update list of given gems"
618
- method_option "local", type: :boolean, default: false, banner: "do not attempt to fetch remote gemspecs and use the local gem cache only"
619
- method_option "print", type: :boolean, default: false, banner: "print the lockfile to STDOUT instead of writing to the file system"
618
+ method_option "local", type: :boolean, default: false, banner: "do not attempt to fetch remote gemspecs and use the local gem cache only"
619
+ method_option "print", type: :boolean, default: false, banner: "print the lockfile to STDOUT instead of writing to the file system"
620
620
  method_option "gemfile", type: :string, banner: "Use the specified gemfile instead of Gemfile"
621
621
  method_option "lockfile", type: :string, default: nil, banner: "the path the lockfile should be written to"
622
622
  method_option "full-index", type: :boolean, default: false, banner: "Fall back to using the single-file index of all gems"
623
623
  method_option "add-platform", type: :array, default: [], banner: "Add a new platform to the lockfile"
624
- method_option "remove-platform", type: :array, default: [], banner: "Remove a platform from the lockfile"
625
- method_option "patch", type: :boolean, banner: "If updating, prefer updating only to next patch version"
626
- method_option "minor", type: :boolean, banner: "If updating, prefer updating only to next minor version"
627
- method_option "major", type: :boolean, banner: "If updating, prefer updating to next major version (default)"
624
+ method_option "remove-platform", type: :array, default: [], banner: "Remove a platform from the lockfile"
625
+ method_option "patch", type: :boolean, banner: "If updating, prefer updating only to next patch version"
626
+ method_option "minor", type: :boolean, banner: "If updating, prefer updating only to next minor version"
627
+ method_option "major", type: :boolean, banner: "If updating, prefer updating to next major version (default)"
628
628
  method_option "pre", type: :boolean, banner: "If updating, always choose the highest allowed version, regardless of prerelease status"
629
629
  method_option "strict", type: :boolean, banner: "If updating, do not allow any gem to be updated past latest --patch | --minor | --major"
630
630
  method_option "conservative", type: :boolean, banner: "If updating, use bundle install conservative update behavior and do not allow shared dependencies to be updated"
@@ -115,7 +115,7 @@ module Bundler
115
115
  @originally_locked_specs = @locked_specs
116
116
  @locked_sources = []
117
117
  @locked_platforms = []
118
- @locked_checksums = nil
118
+ @locked_checksums = Bundler.feature_flag.bundler_3_mode?
119
119
  end
120
120
 
121
121
  locked_gem_sources = @locked_sources.select {|s| s.is_a?(Source::Rubygems) }
@@ -137,7 +137,7 @@ module Bundler
137
137
  end
138
138
  @unlocking ||= @unlock[:ruby] ||= (!@locked_ruby_version ^ !@ruby_version)
139
139
 
140
- add_current_platform unless Bundler.frozen_bundle?
140
+ @current_platform_missing = add_current_platform unless Bundler.frozen_bundle?
141
141
 
142
142
  converge_path_sources_to_gemspec_sources
143
143
  @path_changes = converge_paths
@@ -484,6 +484,7 @@ module Bundler
484
484
 
485
485
  !@source_changes &&
486
486
  !@dependency_changes &&
487
+ !@current_platform_missing &&
487
488
  @new_platforms.empty? &&
488
489
  !@path_changes &&
489
490
  !@local_changes &&
@@ -629,6 +630,7 @@ module Bundler
629
630
  def start_resolution
630
631
  local_platform_needed_for_resolvability = @most_specific_non_local_locked_ruby_platform && !@platforms.include?(local_platform)
631
632
  @platforms << local_platform if local_platform_needed_for_resolvability
633
+ add_platform(Gem::Platform::RUBY) if RUBY_ENGINE == "truffleruby"
632
634
 
633
635
  result = SpecSet.new(resolver.start)
634
636
 
@@ -671,19 +673,19 @@ module Bundler
671
673
  end
672
674
 
673
675
  def add_current_platform
674
- @most_specific_non_local_locked_ruby_platform = find_most_specific_non_local_locked_ruby_platform
676
+ return if @platforms.include?(local_platform)
677
+
678
+ @most_specific_non_local_locked_ruby_platform = find_most_specific_locked_ruby_platform
675
679
  return if @most_specific_non_local_locked_ruby_platform
676
680
 
677
- add_platform(local_platform)
681
+ @platforms << local_platform
682
+ true
678
683
  end
679
684
 
680
- def find_most_specific_non_local_locked_ruby_platform
685
+ def find_most_specific_locked_ruby_platform
681
686
  return unless generic_local_platform_is_ruby? && current_platform_locked?
682
687
 
683
- most_specific_locked_ruby_platform = most_specific_locked_platform
684
- return unless most_specific_locked_ruby_platform != local_platform
685
-
686
- most_specific_locked_ruby_platform
688
+ most_specific_locked_platform
687
689
  end
688
690
 
689
691
  def change_reason
@@ -705,6 +707,7 @@ module Bundler
705
707
  [
706
708
  [@source_changes, "the list of sources changed"],
707
709
  [@dependency_changes, "the dependencies in your gemfile changed"],
710
+ [@current_platform_missing, "your lockfile does not include the current platform"],
708
711
  [@new_platforms.any?, "you added a new platform to your gemfile"],
709
712
  [@path_changes, "the gemspecs for path gems changed"],
710
713
  [@local_changes, "the gemspecs for git local gems changed"],
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Bundler
4
4
  module ForcePlatform
5
- private
6
-
7
5
  # The `:force_ruby_platform` value used by dependencies for resolution, and
8
6
  # by locked specifications for materialization is `false` by default, except
9
7
  # for TruffleRuby. TruffleRuby generally needs to force the RUBY platform
@@ -196,6 +196,7 @@ module Bundler
196
196
 
197
197
  FileUtils.rm_rf(new_cache_path)
198
198
  FileUtils.cp_r(install_path, new_cache_path)
199
+ FileUtils.rm_rf(app_cache_path.join(".git"))
199
200
  FileUtils.touch(app_cache_path.join(".bundlecache"))
200
201
  end
201
202
 
@@ -237,26 +237,20 @@ module Gem
237
237
 
238
238
  include ::Bundler::ForcePlatform
239
239
 
240
+ attr_reader :force_ruby_platform
241
+
240
242
  attr_accessor :source, :groups
241
243
 
242
244
  alias_method :eql?, :==
243
245
 
244
- def force_ruby_platform
245
- return @force_ruby_platform if defined?(@force_ruby_platform) && !@force_ruby_platform.nil?
246
-
247
- @force_ruby_platform = default_force_ruby_platform
248
- end
249
-
250
- def encode_with(coder)
251
- to_yaml_properties.each do |ivar|
252
- coder[ivar.to_s.sub(/^@/, "")] = instance_variable_get(ivar)
246
+ unless method_defined?(:encode_with, false)
247
+ def encode_with(coder)
248
+ [:@name, :@requirement, :@type, :@prerelease, :@version_requirements].each do |ivar|
249
+ coder[ivar.to_s.sub(/^@/, "")] = instance_variable_get(ivar)
250
+ end
253
251
  end
254
252
  end
255
253
 
256
- def to_yaml_properties
257
- instance_variables.reject {|p| ["@source", "@groups"].include?(p.to_s) }
258
- end
259
-
260
254
  def to_lock
261
255
  out = String.new(" #{name}")
262
256
  unless requirement.none?
@@ -128,11 +128,6 @@ module Bundler
128
128
  spec.source.cache(spec, custom_path) if spec.source.respond_to?(:cache)
129
129
  end
130
130
 
131
- Dir[cache_path.join("*/.git")].each do |git_dir|
132
- FileUtils.rm_rf(git_dir)
133
- FileUtils.touch(File.expand_path("../.bundlecache", git_dir))
134
- end
135
-
136
131
  prune_cache(cache_path) unless Bundler.settings[:no_prune]
137
132
  end
138
133
 
@@ -164,7 +164,8 @@ module Bundler
164
164
  "does not exist. Run `bundle config unset local.#{override_for(original_path)}` to remove the local override"
165
165
  end
166
166
 
167
- set_local!(path)
167
+ @local = true
168
+ set_paths!(path)
168
169
 
169
170
  # Create a new git proxy without the cached revision
170
171
  # so the Gemfile.lock always picks up the new revision.
@@ -187,13 +188,11 @@ module Bundler
187
188
  end
188
189
 
189
190
  def specs(*)
190
- set_local!(app_cache_path) if has_app_cache? && !local?
191
+ set_cache_path!(app_cache_path) if has_app_cache? && !local?
191
192
 
192
193
  if requires_checkout? && !@copied
193
194
  fetch
194
- git_proxy.copy_to(install_path, submodules)
195
- serialize_gemspecs_in(install_path)
196
- @copied = true
195
+ checkout
197
196
  end
198
197
 
199
198
  local_specs
@@ -206,10 +205,7 @@ module Bundler
206
205
  print_using_message "Using #{version_message(spec, options[:previous_spec])} from #{self}"
207
206
 
208
207
  if (requires_checkout? && !@copied) || force
209
- Bundler.ui.debug " * Checking out revision: #{ref}"
210
- git_proxy.copy_to(install_path, submodules)
211
- serialize_gemspecs_in(install_path)
212
- @copied = true
208
+ checkout
213
209
  end
214
210
 
215
211
  generate_bin_options = { disable_extensions: !Bundler.rubygems.spec_missing_extensions?(spec), build_args: options[:build_args] }
@@ -221,12 +217,13 @@ module Bundler
221
217
  def cache(spec, custom_path = nil)
222
218
  app_cache_path = app_cache_path(custom_path)
223
219
  return unless Bundler.feature_flag.cache_all?
224
- return if path == app_cache_path
220
+ return if install_path == app_cache_path
221
+ return if cache_path == app_cache_path
225
222
  cached!
226
223
  FileUtils.rm_rf(app_cache_path)
227
224
  git_proxy.checkout if requires_checkout?
228
- git_proxy.copy_to(app_cache_path, @submodules)
229
- serialize_gemspecs_in(app_cache_path)
225
+ FileUtils.cp_r("#{cache_path}/.", app_cache_path)
226
+ FileUtils.touch(app_cache_path.join(".bundlecache"))
230
227
  end
231
228
 
232
229
  def load_spec_files
@@ -270,6 +267,13 @@ module Bundler
270
267
 
271
268
  private
272
269
 
270
+ def checkout
271
+ Bundler.ui.debug " * Checking out revision: #{ref}"
272
+ git_proxy.copy_to(install_path, submodules)
273
+ serialize_gemspecs_in(install_path)
274
+ @copied = true
275
+ end
276
+
273
277
  def humanized_ref
274
278
  if local?
275
279
  path
@@ -298,10 +302,19 @@ module Bundler
298
302
  end
299
303
  end
300
304
 
301
- def set_local!(path)
302
- @local = true
303
- @local_specs = @git_proxy = nil
304
- @cache_path = @install_path = path
305
+ def set_paths!(path)
306
+ set_cache_path!(path)
307
+ set_install_path!(path)
308
+ end
309
+
310
+ def set_cache_path!(path)
311
+ @git_proxy = nil
312
+ @cache_path = path
313
+ end
314
+
315
+ def set_install_path!(path)
316
+ @local_specs = nil
317
+ @install_path = path
305
318
  end
306
319
 
307
320
  def has_app_cache?
@@ -94,7 +94,7 @@ module Bundler
94
94
  end
95
95
 
96
96
  def delete(specs)
97
- specs.each {|spec| @specs.delete(spec) }
97
+ Array(specs).each {|spec| @specs.delete(spec) }
98
98
 
99
99
  reset!
100
100
  end
@@ -280,7 +280,7 @@ module Bundler
280
280
  if platform
281
281
  GemHelpers.select_best_platform_match(specs_for_name, platform, force_ruby: dep.force_ruby_platform)
282
282
  else
283
- GemHelpers.select_best_local_platform_match(specs_for_name, force_ruby: dep.force_ruby_platform)
283
+ GemHelpers.select_best_local_platform_match(specs_for_name, force_ruby: dep.force_ruby_platform || dep.default_force_ruby_platform)
284
284
  end
285
285
  end
286
286
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Bundler
4
- VERSION = "2.5.16".freeze
4
+ VERSION = "2.5.17".freeze
5
5
 
6
6
  def self.bundler_major_version
7
7
  @bundler_major_version ||= VERSION.split(".").first.to_i
@@ -41,7 +41,7 @@ module Bundler
41
41
  HASH_REGEX = /
42
42
  ^
43
43
  ([ ]*) # indentations
44
- (.+) # key
44
+ ([^#]+) # key excludes comment char '#'
45
45
  (?::(?=(?:\s|$))) # : (without the lookahead the #key includes this when : is present in value)
46
46
  [ ]?
47
47
  (['"]?) # optional opening quote
@@ -337,4 +337,12 @@ class Gem::Dependency
337
337
  :released
338
338
  end
339
339
  end
340
+
341
+ def encode_with(coder) # :nodoc:
342
+ coder.add "name", @name
343
+ coder.add "requirement", @requirement
344
+ coder.add "type", @type
345
+ coder.add "prerelease", @prerelease
346
+ coder.add "version_requirements", @version_requirements
347
+ end
340
348
  end
@@ -132,7 +132,7 @@ module Gem::QueryUtils
132
132
  version_matches = show_prereleases? || !s.version.prerelease?
133
133
 
134
134
  name_matches && version_matches
135
- end
135
+ end.uniq(&:full_name)
136
136
 
137
137
  spec_tuples = specs.map do |spec|
138
138
  [spec.name_tuple, spec]
@@ -251,7 +251,15 @@ class Gem::Uninstaller
251
251
  raise Gem::FilePermissionError, spec.base_dir unless
252
252
  File.writable?(spec.base_dir)
253
253
 
254
- safe_delete { FileUtils.rm_r spec.full_gem_path }
254
+ full_gem_path = spec.full_gem_path
255
+ exclusions = []
256
+
257
+ if default_spec_matches?(spec) && spec.executables.any?
258
+ exclusions = spec.executables.map {|exe| File.join(spec.bin_dir, exe) }
259
+ exclusions << File.dirname(exclusions.last) until exclusions.last == full_gem_path
260
+ end
261
+
262
+ safe_delete { rm_r full_gem_path, exclusions: exclusions }
255
263
  safe_delete { FileUtils.rm_r spec.extension_dir }
256
264
 
257
265
  old_platform_name = spec.original_name
@@ -378,6 +386,12 @@ class Gem::Uninstaller
378
386
 
379
387
  private
380
388
 
389
+ def rm_r(path, exclusions:)
390
+ FileUtils::Entry_.new(path).postorder_traverse do |ent|
391
+ ent.remove unless exclusions.include?(ent.path)
392
+ end
393
+ end
394
+
381
395
  def specification_record
382
396
  @specification_record ||= @install_dir ? Gem::SpecificationRecord.from_path(@install_dir) : Gem::Specification.specification_record
383
397
  end
@@ -41,7 +41,7 @@ module Gem
41
41
  HASH_REGEX = /
42
42
  ^
43
43
  ([ ]*) # indentations
44
- (.+) # key
44
+ ([^#]+) # key excludes comment char '#'
45
45
  (?::(?=(?:\s|$))) # : (without the lookahead the #key includes this when : is present in value)
46
46
  [ ]?
47
47
  (['"]?) # optional opening quote
data/lib/rubygems.rb CHANGED
@@ -9,7 +9,7 @@
9
9
  require "rbconfig"
10
10
 
11
11
  module Gem
12
- VERSION = "3.5.16"
12
+ VERSION = "3.5.17"
13
13
  end
14
14
 
15
15
  # Must be first since it unloads the prelude from 1.9.2
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "rubygems-update"
5
- s.version = "3.5.16"
5
+ s.version = "3.5.17"
6
6
  s.authors = ["Jim Weirich", "Chad Fowler", "Eric Hodel", "Luis Lavena", "Aaron Patterson", "Samuel Giddins", "André Arko", "Evan Phoenix", "Hiroshi SHIBATA"]
7
7
  s.email = ["", "", "drbrain@segment7.net", "luislavena@gmail.com", "aaron@tenderlovemaking.com", "segiddins@segiddins.me", "andre@arko.net", "evan@phx.io", "hsbt@ruby-lang.org"]
8
8
 
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: 3.5.16
4
+ version: 3.5.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Weirich
@@ -16,7 +16,7 @@ authors:
16
16
  autorequire:
17
17
  bindir: exe
18
18
  cert_chain: []
19
- date: 2024-07-18 00:00:00.000000000 Z
19
+ date: 2024-08-01 00:00:00.000000000 Z
20
20
  dependencies: []
21
21
  description: |-
22
22
  A package (also known as a library) contains a set of functionality
@@ -727,7 +727,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
727
727
  - !ruby/object:Gem::Version
728
728
  version: '0'
729
729
  requirements: []
730
- rubygems_version: 3.5.16
730
+ rubygems_version: 3.5.17
731
731
  signing_key:
732
732
  specification_version: 4
733
733
  summary: RubyGems is a package management framework for Ruby. This gem is downloaded