rubygems-update 3.5.10 → 3.5.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +60 -1
  3. data/CODE_OF_CONDUCT.md +79 -28
  4. data/CONTRIBUTING.md +2 -2
  5. data/Manifest.txt +2 -0
  6. data/bundler/CHANGELOG.md +48 -0
  7. data/bundler/lib/bundler/build_metadata.rb +2 -2
  8. data/bundler/lib/bundler/cli/install.rb +1 -1
  9. data/bundler/lib/bundler/cli.rb +5 -8
  10. data/bundler/lib/bundler/compact_index_client/cache.rb +47 -72
  11. data/bundler/lib/bundler/compact_index_client/parser.rb +84 -0
  12. data/bundler/lib/bundler/compact_index_client.rb +51 -80
  13. data/bundler/lib/bundler/constants.rb +8 -1
  14. data/bundler/lib/bundler/definition.rb +21 -27
  15. data/bundler/lib/bundler/errors.rb +14 -0
  16. data/bundler/lib/bundler/fetcher/compact_index.rb +15 -24
  17. data/bundler/lib/bundler/gem_helper.rb +1 -1
  18. data/bundler/lib/bundler/installer/gem_installer.rb +0 -1
  19. data/bundler/lib/bundler/installer.rb +8 -8
  20. data/bundler/lib/bundler/man/bundle-add.1 +1 -1
  21. data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
  22. data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
  23. data/bundler/lib/bundler/man/bundle-check.1 +1 -1
  24. data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
  25. data/bundler/lib/bundler/man/bundle-config.1 +2 -2
  26. data/bundler/lib/bundler/man/bundle-config.1.ronn +1 -1
  27. data/bundler/lib/bundler/man/bundle-console.1 +1 -1
  28. data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
  29. data/bundler/lib/bundler/man/bundle-exec.1 +1 -1
  30. data/bundler/lib/bundler/man/bundle-gem.1 +1 -1
  31. data/bundler/lib/bundler/man/bundle-help.1 +1 -1
  32. data/bundler/lib/bundler/man/bundle-info.1 +1 -1
  33. data/bundler/lib/bundler/man/bundle-init.1 +1 -1
  34. data/bundler/lib/bundler/man/bundle-inject.1 +1 -1
  35. data/bundler/lib/bundler/man/bundle-install.1 +1 -1
  36. data/bundler/lib/bundler/man/bundle-list.1 +1 -1
  37. data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
  38. data/bundler/lib/bundler/man/bundle-open.1 +1 -1
  39. data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
  40. data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
  41. data/bundler/lib/bundler/man/bundle-plugin.1 +1 -1
  42. data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
  43. data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
  44. data/bundler/lib/bundler/man/bundle-show.1 +1 -1
  45. data/bundler/lib/bundler/man/bundle-update.1 +1 -1
  46. data/bundler/lib/bundler/man/bundle-version.1 +1 -1
  47. data/bundler/lib/bundler/man/bundle-viz.1 +1 -1
  48. data/bundler/lib/bundler/man/bundle.1 +1 -1
  49. data/bundler/lib/bundler/man/gemfile.5 +1 -1
  50. data/bundler/lib/bundler/rubygems_ext.rb +20 -12
  51. data/bundler/lib/bundler/rubygems_integration.rb +14 -0
  52. data/bundler/lib/bundler/self_manager.rb +6 -1
  53. data/bundler/lib/bundler/settings.rb +12 -8
  54. data/bundler/lib/bundler/setup.rb +3 -0
  55. data/bundler/lib/bundler/shared_helpers.rb +6 -4
  56. data/bundler/lib/bundler/source/git/git_proxy.rb +8 -0
  57. data/bundler/lib/bundler/source/git.rb +14 -0
  58. data/bundler/lib/bundler/source/metadata.rb +2 -0
  59. data/bundler/lib/bundler/source/path.rb +0 -13
  60. data/bundler/lib/bundler/source/rubygems.rb +32 -15
  61. data/bundler/lib/bundler/source_list.rb +13 -2
  62. data/bundler/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +77 -29
  63. data/bundler/lib/bundler/version.rb +1 -1
  64. data/bundler/lib/bundler/yaml_serializer.rb +1 -8
  65. data/bundler/lib/bundler.rb +6 -1
  66. data/exe/update_rubygems +1 -1
  67. data/lib/rubygems/basic_specification.rb +27 -0
  68. data/lib/rubygems/commands/pristine_command.rb +12 -9
  69. data/lib/rubygems/commands/setup_command.rb +2 -0
  70. data/lib/rubygems/commands/uninstall_command.rb +1 -1
  71. data/lib/rubygems/dependency.rb +1 -13
  72. data/lib/rubygems/ext/cargo_builder.rb +1 -16
  73. data/lib/rubygems/installer.rb +1 -1
  74. data/lib/rubygems/package/tar_header.rb +20 -4
  75. data/lib/rubygems/package.rb +0 -1
  76. data/lib/rubygems/platform.rb +1 -0
  77. data/lib/rubygems/specification.rb +45 -118
  78. data/lib/rubygems/specification_policy.rb +3 -1
  79. data/lib/rubygems/specification_record.rb +212 -0
  80. data/lib/rubygems/stub_specification.rb +21 -0
  81. data/lib/rubygems/uninstaller.rb +26 -19
  82. data/lib/rubygems/util/licenses.rb +25 -0
  83. data/lib/rubygems/yaml_serializer.rb +1 -8
  84. data/lib/rubygems.rb +8 -1
  85. data/rubygems-update.gemspec +1 -1
  86. metadata +5 -3
@@ -32,7 +32,7 @@ class Gem::Uninstaller
32
32
  attr_reader :bin_dir
33
33
 
34
34
  ##
35
- # The gem repository the gem will be installed into
35
+ # The gem repository the gem will be uninstalled from
36
36
 
37
37
  attr_reader :gem_home
38
38
 
@@ -49,8 +49,9 @@ class Gem::Uninstaller
49
49
  # TODO: document the valid options
50
50
  @gem = gem
51
51
  @version = options[:version] || Gem::Requirement.default
52
- @gem_home = File.realpath(options[:install_dir] || Gem.dir)
53
- @plugins_dir = Gem.plugindir(@gem_home)
52
+ @install_dir = options[:install_dir]
53
+ @gem_home = File.realpath(@install_dir || Gem.dir)
54
+ @user_dir = File.exist?(Gem.user_dir) ? File.realpath(Gem.user_dir) : Gem.user_dir
54
55
  @force_executables = options[:executables]
55
56
  @force_all = options[:all]
56
57
  @force_ignore = options[:ignore]
@@ -70,7 +71,7 @@ class Gem::Uninstaller
70
71
 
71
72
  # only add user directory if install_dir is not set
72
73
  @user_install = false
73
- @user_install = options[:user_install] unless options[:install_dir]
74
+ @user_install = options[:user_install] unless @install_dir
74
75
 
75
76
  # Optimization: populated during #uninstall
76
77
  @default_specs_matching_uninstall_params = []
@@ -85,11 +86,7 @@ class Gem::Uninstaller
85
86
 
86
87
  list = []
87
88
 
88
- dirs =
89
- Gem::Specification.dirs +
90
- [Gem.default_specifications_dir]
91
-
92
- Gem::Specification.each_spec dirs do |spec|
89
+ specification_record.stubs.each do |spec|
93
90
  next unless dependency.matches_spec? spec
94
91
 
95
92
  list << spec
@@ -101,11 +98,11 @@ class Gem::Uninstaller
101
98
 
102
99
  default_specs, list = list.partition(&:default_gem?)
103
100
  warn_cannot_uninstall_default_gems(default_specs - list)
104
- @default_specs_matching_uninstall_params = default_specs
101
+ @default_specs_matching_uninstall_params = default_specs.map(&:to_spec)
105
102
 
106
103
  list, other_repo_specs = list.partition do |spec|
107
104
  @gem_home == spec.base_dir ||
108
- (@user_install && spec.base_dir == Gem.user_dir)
105
+ (@user_install && spec.base_dir == @user_dir)
109
106
  end
110
107
 
111
108
  list.sort!
@@ -125,7 +122,7 @@ class Gem::Uninstaller
125
122
  remove_all list
126
123
 
127
124
  elsif list.size > 1
128
- gem_names = list.map(&:full_name)
125
+ gem_names = list.map(&:full_name_with_location)
129
126
  gem_names << "All versions"
130
127
 
131
128
  say
@@ -146,7 +143,9 @@ class Gem::Uninstaller
146
143
  ##
147
144
  # Uninstalls gem +spec+
148
145
 
149
- def uninstall_gem(spec)
146
+ def uninstall_gem(stub)
147
+ spec = stub.to_spec
148
+
150
149
  @spec = spec
151
150
 
152
151
  unless dependencies_ok? spec
@@ -164,6 +163,8 @@ class Gem::Uninstaller
164
163
  remove_plugins @spec
165
164
  remove @spec
166
165
 
166
+ specification_record.remove_spec(stub)
167
+
167
168
  regenerate_plugins
168
169
 
169
170
  Gem.post_uninstall_hooks.each do |hook|
@@ -239,7 +240,7 @@ class Gem::Uninstaller
239
240
 
240
241
  def remove(spec)
241
242
  unless path_ok?(@gem_home, spec) ||
242
- (@user_install && path_ok?(Gem.user_dir, spec))
243
+ (@user_install && path_ok?(@user_dir, spec))
243
244
  e = Gem::GemNotInHomeException.new \
244
245
  "Gem '#{spec.full_name}' is not installed in directory #{@gem_home}"
245
246
  e.spec = spec
@@ -274,8 +275,6 @@ class Gem::Uninstaller
274
275
 
275
276
  safe_delete { FileUtils.rm_r gemspec }
276
277
  announce_deletion_of(spec)
277
-
278
- Gem::Specification.reset
279
278
  end
280
279
 
281
280
  ##
@@ -284,17 +283,17 @@ class Gem::Uninstaller
284
283
  def remove_plugins(spec) # :nodoc:
285
284
  return if spec.plugins.empty?
286
285
 
287
- remove_plugins_for(spec, @plugins_dir)
286
+ remove_plugins_for(spec, plugin_dir_for(spec))
288
287
  end
289
288
 
290
289
  ##
291
290
  # Regenerates plugin wrappers after removal.
292
291
 
293
292
  def regenerate_plugins
294
- latest = Gem::Specification.latest_spec_for(@spec.name)
293
+ latest = specification_record.latest_spec_for(@spec.name)
295
294
  return if latest.nil?
296
295
 
297
- regenerate_plugins_for(latest, @plugins_dir)
296
+ regenerate_plugins_for(latest, plugin_dir_for(@spec))
298
297
  end
299
298
 
300
299
  ##
@@ -379,6 +378,10 @@ class Gem::Uninstaller
379
378
 
380
379
  private
381
380
 
381
+ def specification_record
382
+ @specification_record ||= @install_dir ? Gem::SpecificationRecord.from_path(@install_dir) : Gem::Specification.specification_record
383
+ end
384
+
382
385
  def announce_deletion_of(spec)
383
386
  name = spec.full_name
384
387
  say "Successfully uninstalled #{name}"
@@ -406,4 +409,8 @@ class Gem::Uninstaller
406
409
  say "Gem #{spec.full_name} cannot be uninstalled because it is a default gem"
407
410
  end
408
411
  end
412
+
413
+ def plugin_dir_for(spec)
414
+ Gem.plugindir(spec.base_dir)
415
+ end
409
416
  end
@@ -15,6 +15,7 @@ class Gem::Licenses
15
15
  # license identifiers
16
16
  LICENSE_IDENTIFIERS = %w[
17
17
  0BSD
18
+ 3D-Slicer-1.0
18
19
  AAL
19
20
  ADSL
20
21
  AFL-1.1
@@ -26,6 +27,7 @@ class Gem::Licenses
26
27
  AGPL-1.0-or-later
27
28
  AGPL-3.0-only
28
29
  AGPL-3.0-or-later
30
+ AMD-newlib
29
31
  AMDPLPA
30
32
  AML
31
33
  AML-glslang
@@ -62,6 +64,7 @@ class Gem::Licenses
62
64
  BSD-2-Clause-Darwin
63
65
  BSD-2-Clause-Patent
64
66
  BSD-2-Clause-Views
67
+ BSD-2-Clause-first-lines
65
68
  BSD-3-Clause
66
69
  BSD-3-Clause-Attribution
67
70
  BSD-3-Clause-Clear
@@ -191,6 +194,7 @@ class Gem::Licenses
191
194
  CUA-OPL-1.0
192
195
  Caldera
193
196
  Caldera-no-preamble
197
+ Catharon
194
198
  ClArtistic
195
199
  Clips
196
200
  Community-Spec-1.0
@@ -270,25 +274,32 @@ class Gem::Licenses
270
274
  Glide
271
275
  Glulxe
272
276
  Graphics-Gems
277
+ Gutmann
273
278
  HP-1986
274
279
  HP-1989
275
280
  HPND
276
281
  HPND-DEC
277
282
  HPND-Fenneberg-Livingston
278
283
  HPND-INRIA-IMAG
284
+ HPND-Intel
279
285
  HPND-Kevlin-Henney
280
286
  HPND-MIT-disclaimer
281
287
  HPND-Markus-Kuhn
282
288
  HPND-Pbmplus
283
289
  HPND-UC
290
+ HPND-UC-export-US
284
291
  HPND-doc
285
292
  HPND-doc-sell
286
293
  HPND-export-US
294
+ HPND-export-US-acknowledgement
287
295
  HPND-export-US-modify
296
+ HPND-export2-US
297
+ HPND-merchantability-variant
288
298
  HPND-sell-MIT-disclaimer-xserver
289
299
  HPND-sell-regexpr
290
300
  HPND-sell-variant
291
301
  HPND-sell-variant-MIT-disclaimer
302
+ HPND-sell-variant-MIT-disclaimer-rev
292
303
  HTMLTIDY
293
304
  HaskellReport
294
305
  Hippocratic-2.1
@@ -353,6 +364,7 @@ class Gem::Licenses
353
364
  MIT-0
354
365
  MIT-CMU
355
366
  MIT-Festival
367
+ MIT-Khronos-old
356
368
  MIT-Modern-Variant
357
369
  MIT-Wu
358
370
  MIT-advertising
@@ -386,7 +398,9 @@ class Gem::Licenses
386
398
  NAIST-2003
387
399
  NASA-1.3
388
400
  NBPL-1.0
401
+ NCBI-PD
389
402
  NCGL-UK-2.0
403
+ NCL
390
404
  NCSA
391
405
  NGPL
392
406
  NICTA-1.0
@@ -410,6 +424,7 @@ class Gem::Licenses
410
424
  Nokia
411
425
  Noweb
412
426
  O-UDA-1.0
427
+ OAR
413
428
  OCCT-PL
414
429
  OCLC-2.0
415
430
  ODC-By-1.0
@@ -463,6 +478,7 @@ class Gem::Licenses
463
478
  PDDL-1.0
464
479
  PHP-3.0
465
480
  PHP-3.01
481
+ PPL
466
482
  PSF-2.0
467
483
  Parity-6.0.0
468
484
  Parity-7.0.0
@@ -518,6 +534,7 @@ class Gem::Licenses
518
534
  Spencer-99
519
535
  SugarCRM-1.1.3
520
536
  Sun-PPP
537
+ Sun-PPP-2000
521
538
  SunPro
522
539
  Symlinks
523
540
  TAPR-OHL-1.0
@@ -574,6 +591,7 @@ class Gem::Licenses
574
591
  Zimbra-1.3
575
592
  Zimbra-1.4
576
593
  Zlib
594
+ any-OSI
577
595
  bcrypt-Solar-Designer
578
596
  blessing
579
597
  bzip2-1.0.6
@@ -582,6 +600,7 @@ class Gem::Licenses
582
600
  copyleft-next-0.3.0
583
601
  copyleft-next-0.3.1
584
602
  curl
603
+ cve-tou
585
604
  diffmark
586
605
  dtoa
587
606
  dvipdfm
@@ -604,6 +623,7 @@ class Gem::Licenses
604
623
  mpi-permissive
605
624
  mpich2
606
625
  mplus
626
+ pkgconf
607
627
  pnmstitch
608
628
  psfrag
609
629
  psutils
@@ -613,12 +633,14 @@ class Gem::Licenses
613
633
  softSurfer
614
634
  ssh-keyscan
615
635
  swrule
636
+ threeparttable
616
637
  ulem
617
638
  w3m
618
639
  xinetd
619
640
  xkeyboard-config-Zinoviev
620
641
  xlock
621
642
  xpp
643
+ xzoom
622
644
  zlib-acknowledgement
623
645
  ].freeze
624
646
 
@@ -660,6 +682,7 @@ class Gem::Licenses
660
682
  EXCEPTION_IDENTIFIERS = %w[
661
683
  389-exception
662
684
  Asterisk-exception
685
+ Asterisk-linking-protocols-exception
663
686
  Autoconf-exception-2.0
664
687
  Autoconf-exception-3.0
665
688
  Autoconf-exception-generic
@@ -697,11 +720,13 @@ class Gem::Licenses
697
720
  OCCT-exception-1.0
698
721
  OCaml-LGPL-linking-exception
699
722
  OpenJDK-assembly-exception-1.0
723
+ PCRE2-exception
700
724
  PS-or-PDF-font-exception-20170817
701
725
  QPL-1.0-INRIA-2004-exception
702
726
  Qt-GPL-exception-1.0
703
727
  Qt-LGPL-exception-1.1
704
728
  Qwt-exception-1.0
729
+ RRDtool-FLOSS-exception-2.0
705
730
  SANE-exception
706
731
  SHL-2.0
707
732
  SHL-2.1
@@ -60,7 +60,6 @@ module Gem
60
60
  indent, key, quote, val = match.captures
61
61
  val = strip_comment(val)
62
62
 
63
- convert_to_backward_compatible_key!(key)
64
63
  depth = indent.size / 2
65
64
  if quote.empty? && val.empty?
66
65
  new_hash = {}
@@ -92,14 +91,8 @@ module Gem
92
91
  end
93
92
  end
94
93
 
95
- # for settings' keys
96
- def convert_to_backward_compatible_key!(key)
97
- key << "/" if /https?:/i.match?(key) && !%r{/\Z}.match?(key)
98
- key.gsub!(".", "__")
99
- end
100
-
101
94
  class << self
102
- private :dump_hash, :convert_to_backward_compatible_key!
95
+ private :dump_hash
103
96
  end
104
97
  end
105
98
  end
data/lib/rubygems.rb CHANGED
@@ -9,7 +9,7 @@
9
9
  require "rbconfig"
10
10
 
11
11
  module Gem
12
- VERSION = "3.5.10"
12
+ VERSION = "3.5.12"
13
13
  end
14
14
 
15
15
  # Must be first since it unloads the prelude from 1.9.2
@@ -1012,6 +1012,13 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
1012
1012
  RUBY_PLATFORM.include?("solaris")
1013
1013
  end
1014
1014
 
1015
+ ##
1016
+ # Is this platform FreeBSD
1017
+
1018
+ def self.freebsd_platform?
1019
+ RbConfig::CONFIG["host_os"].to_s.include?("bsd")
1020
+ end
1021
+
1015
1022
  ##
1016
1023
  # Load +plugins+ as Ruby files
1017
1024
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "rubygems-update"
5
- s.version = "3.5.10"
5
+ s.version = "3.5.12"
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.10
4
+ version: 3.5.12
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-05-03 00:00:00.000000000 Z
19
+ date: 2024-06-13 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
@@ -136,6 +136,7 @@ files:
136
136
  - bundler/lib/bundler/compact_index_client/cache.rb
137
137
  - bundler/lib/bundler/compact_index_client/cache_file.rb
138
138
  - bundler/lib/bundler/compact_index_client/gem_parser.rb
139
+ - bundler/lib/bundler/compact_index_client/parser.rb
139
140
  - bundler/lib/bundler/compact_index_client/updater.rb
140
141
  - bundler/lib/bundler/constants.rb
141
142
  - bundler/lib/bundler/current_ruby.rb
@@ -597,6 +598,7 @@ files:
597
598
  - lib/rubygems/spec_fetcher.rb
598
599
  - lib/rubygems/specification.rb
599
600
  - lib/rubygems/specification_policy.rb
601
+ - lib/rubygems/specification_record.rb
600
602
  - lib/rubygems/ssl_certs/.document
601
603
  - lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA.pem
602
604
  - lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA_R3.pem
@@ -725,7 +727,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
725
727
  - !ruby/object:Gem::Version
726
728
  version: '0'
727
729
  requirements: []
728
- rubygems_version: 3.5.10
730
+ rubygems_version: 3.5.12
729
731
  signing_key:
730
732
  specification_version: 4
731
733
  summary: RubyGems is a package management framework for Ruby. This gem is downloaded