rubygems-update 3.6.9 → 3.7.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 +4 -4
- data/CHANGELOG.md +873 -790
- data/CODE_OF_CONDUCT.md +1 -1
- data/CONTRIBUTING.md +9 -0
- data/Manifest.txt +4 -21
- data/README.md +1 -1
- data/SECURITY.md +7 -0
- data/bundler/CHANGELOG.md +1110 -1033
- data/bundler/README.md +7 -7
- data/bundler/bundler.gemspec +2 -2
- data/bundler/lib/bundler/build_metadata.rb +10 -11
- data/bundler/lib/bundler/cli/common.rb +1 -1
- data/bundler/lib/bundler/cli/config.rb +2 -2
- data/bundler/lib/bundler/cli/gem.rb +62 -30
- data/bundler/lib/bundler/cli/install.rb +5 -5
- data/bundler/lib/bundler/cli/outdated.rb +1 -1
- data/bundler/lib/bundler/cli/update.rb +3 -3
- data/bundler/lib/bundler/cli.rb +24 -38
- data/bundler/lib/bundler/compact_index_client.rb +1 -5
- data/bundler/lib/bundler/current_ruby.rb +27 -3
- data/bundler/lib/bundler/definition.rb +21 -22
- data/bundler/lib/bundler/dependency.rb +1 -1
- data/bundler/lib/bundler/dsl.rb +33 -23
- data/bundler/lib/bundler/feature_flag.rb +15 -12
- data/bundler/lib/bundler/fetcher/dependency.rb +2 -1
- data/bundler/lib/bundler/fetcher/downloader.rb +33 -7
- data/bundler/lib/bundler/fetcher.rb +49 -19
- data/bundler/lib/bundler/friendly_errors.rb +2 -1
- data/bundler/lib/bundler/index.rb +7 -2
- data/bundler/lib/bundler/installer.rb +5 -4
- data/bundler/lib/bundler/lazy_specification.rb +9 -7
- data/bundler/lib/bundler/lockfile_parser.rb +21 -5
- data/bundler/lib/bundler/man/bundle-add.1 +1 -1
- data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
- data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
- data/bundler/lib/bundler/man/bundle-check.1 +1 -1
- data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
- data/bundler/lib/bundler/man/bundle-config.1 +172 -126
- data/bundler/lib/bundler/man/bundle-config.1.ronn +91 -91
- data/bundler/lib/bundler/man/bundle-console.1 +1 -1
- data/bundler/lib/bundler/man/bundle-doctor.1 +43 -4
- data/bundler/lib/bundler/man/bundle-doctor.1.ronn +48 -4
- data/bundler/lib/bundler/man/bundle-env.1 +1 -1
- data/bundler/lib/bundler/man/bundle-exec.1 +1 -1
- data/bundler/lib/bundler/man/bundle-fund.1 +1 -1
- data/bundler/lib/bundler/man/bundle-gem.1 +67 -44
- data/bundler/lib/bundler/man/bundle-gem.1.ronn +8 -4
- data/bundler/lib/bundler/man/bundle-help.1 +1 -1
- data/bundler/lib/bundler/man/bundle-info.1 +1 -1
- data/bundler/lib/bundler/man/bundle-init.1 +1 -1
- data/bundler/lib/bundler/man/bundle-inject.1 +2 -2
- data/bundler/lib/bundler/man/bundle-inject.1.ronn +1 -1
- data/bundler/lib/bundler/man/bundle-install.1 +4 -4
- data/bundler/lib/bundler/man/bundle-install.1.ronn +3 -4
- data/bundler/lib/bundler/man/bundle-issue.1 +1 -1
- data/bundler/lib/bundler/man/bundle-licenses.1 +1 -1
- data/bundler/lib/bundler/man/bundle-list.1 +1 -1
- data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
- data/bundler/lib/bundler/man/bundle-open.1 +1 -1
- data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
- data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
- data/bundler/lib/bundler/man/bundle-plugin.1 +1 -1
- data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
- data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
- data/bundler/lib/bundler/man/bundle-show.1 +1 -1
- data/bundler/lib/bundler/man/bundle-update.1 +5 -5
- data/bundler/lib/bundler/man/bundle-update.1.ronn +4 -4
- data/bundler/lib/bundler/man/bundle-version.1 +1 -1
- data/bundler/lib/bundler/man/bundle-viz.1 +1 -1
- data/bundler/lib/bundler/man/bundle.1 +1 -1
- data/bundler/lib/bundler/man/gemfile.5 +1 -1
- data/bundler/lib/bundler/match_platform.rb +31 -12
- data/bundler/lib/bundler/materialization.rb +2 -2
- data/bundler/lib/bundler/resolver/package.rb +1 -1
- data/bundler/lib/bundler/resolver.rb +1 -3
- data/bundler/lib/bundler/rubygems_ext.rb +116 -120
- data/bundler/lib/bundler/rubygems_integration.rb +11 -6
- data/bundler/lib/bundler/runtime.rb +1 -1
- data/bundler/lib/bundler/self_manager.rb +32 -42
- data/bundler/lib/bundler/settings/validator.rb +0 -23
- data/bundler/lib/bundler/settings.rb +4 -6
- data/bundler/lib/bundler/shared_helpers.rb +6 -4
- data/bundler/lib/bundler/source/git/git_proxy.rb +3 -3
- data/bundler/lib/bundler/source/path.rb +7 -0
- data/bundler/lib/bundler/source_list.rb +1 -5
- data/bundler/lib/bundler/source_map.rb +1 -1
- data/bundler/lib/bundler/spec_set.rb +7 -3
- data/bundler/lib/bundler/templates/Executable +0 -11
- data/bundler/lib/bundler/templates/newgem/github/workflows/main.yml.tt +2 -0
- data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +6 -5
- data/bundler/lib/bundler/ui/shell.rb +2 -2
- data/bundler/lib/bundler/vendor/net-http-persistent/README.rdoc +1 -1
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb +2 -1
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +81 -42
- data/bundler/lib/bundler/version.rb +10 -2
- data/bundler/lib/bundler/worker.rb +1 -1
- data/bundler/lib/bundler.rb +14 -12
- data/doc/bundler/UPGRADING.md +132 -127
- data/doc/rubygems/CONTRIBUTING.md +1 -1
- data/lib/rubygems/basic_specification.rb +7 -0
- data/lib/rubygems/commands/pristine_command.rb +9 -12
- data/lib/rubygems/commands/setup_command.rb +2 -2
- data/lib/rubygems/core_ext/kernel_require.rb +5 -2
- data/lib/rubygems/ext/cargo_builder.rb +4 -0
- data/lib/rubygems/gemcutter_utilities/webauthn_listener.rb +10 -3
- data/lib/rubygems/gemcutter_utilities.rb +1 -1
- data/lib/rubygems/installer.rb +45 -50
- data/lib/rubygems/platform.rb +142 -39
- data/lib/rubygems/remote_fetcher.rb +3 -3
- data/lib/rubygems/request_set.rb +3 -6
- data/lib/rubygems/resolver/best_set.rb +1 -1
- data/lib/rubygems/resolver/source_set.rb +1 -1
- data/lib/rubygems/resolver.rb +1 -1
- data/lib/rubygems/s3_uri_signer.rb +5 -3
- data/lib/rubygems/source.rb +28 -22
- data/lib/rubygems/specification.rb +2 -2
- data/lib/rubygems/uri_formatter.rb +2 -1
- data/lib/rubygems/util/licenses.rb +21 -0
- data/lib/rubygems/vendor/net-http/lib/net/http.rb +14 -19
- data/lib/rubygems/vendor/resolv/lib/resolv.rb +50 -22
- data/lib/rubygems.rb +72 -7
- data/rubygems-update.gemspec +2 -2
- data/setup.rb +1 -1
- metadata +7 -24
- data/bundler/lib/bundler/gem_helpers.rb +0 -144
- data/bundler/lib/bundler/templates/Executable.bundler +0 -109
- data/bundler/lib/bundler/vendor/fileutils/.document +0 -1
- data/bundler/lib/bundler/vendor/net-http-persistent/.document +0 -1
- data/bundler/lib/bundler/vendor/pub_grub/.document +0 -1
- data/bundler/lib/bundler/vendor/securerandom/.document +0 -1
- data/bundler/lib/bundler/vendor/thor/.document +0 -1
- data/bundler/lib/bundler/vendor/tsort/.document +0 -1
- data/bundler/lib/bundler/vendor/uri/.document +0 -1
- data/lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA.pem +0 -21
- data/lib/rubygems/vendor/molinillo/.document +0 -1
- data/lib/rubygems/vendor/net-http/.document +0 -1
- data/lib/rubygems/vendor/net-protocol/.document +0 -1
- data/lib/rubygems/vendor/optparse/.document +0 -1
- data/lib/rubygems/vendor/resolv/.document +0 -1
- data/lib/rubygems/vendor/securerandom/.document +0 -1
- data/lib/rubygems/vendor/timeout/.document +0 -1
- data/lib/rubygems/vendor/tsort/.document +0 -1
- data/lib/rubygems/vendor/uri/.document +0 -1
- /data/lib/rubygems/ssl_certs/rubygems.org/{GlobalSignRootCA_R3.pem → GlobalSign.pem} +0 -0
- /data/{bundler/lib/bundler/vendor/connection_pool → lib/rubygems/vendor}/.document +0 -0
@@ -33,7 +33,7 @@ require_relative '../../../vendored_securerandom'
|
|
33
33
|
|
34
34
|
class Gem::Resolv
|
35
35
|
|
36
|
-
VERSION = "0.6.
|
36
|
+
VERSION = "0.6.2"
|
37
37
|
|
38
38
|
##
|
39
39
|
# Looks up the first IP address for +name+.
|
@@ -173,13 +173,16 @@ class Gem::Resolv
|
|
173
173
|
|
174
174
|
class ResolvTimeout < Gem::Timeout::Error; end
|
175
175
|
|
176
|
+
WINDOWS = /mswin|cygwin|mingw|bccwin/ =~ RUBY_PLATFORM || ::RbConfig::CONFIG['host_os'] =~ /mswin/
|
177
|
+
private_constant :WINDOWS
|
178
|
+
|
176
179
|
##
|
177
180
|
# Gem::Resolv::Hosts is a hostname resolver that uses the system hosts file.
|
178
181
|
|
179
182
|
class Hosts
|
180
|
-
if
|
183
|
+
if WINDOWS
|
181
184
|
begin
|
182
|
-
require 'win32/resolv'
|
185
|
+
require 'win32/resolv' unless defined?(Win32::Resolv)
|
183
186
|
DefaultFileName = Win32::Resolv.get_hosts_path || IO::NULL
|
184
187
|
rescue LoadError
|
185
188
|
end
|
@@ -659,8 +662,20 @@ class Gem::Resolv
|
|
659
662
|
}
|
660
663
|
end
|
661
664
|
|
662
|
-
|
663
|
-
|
665
|
+
case RUBY_PLATFORM
|
666
|
+
when *[
|
667
|
+
# https://www.rfc-editor.org/rfc/rfc6056.txt
|
668
|
+
# Appendix A. Survey of the Algorithms in Use by Some Popular Implementations
|
669
|
+
/freebsd/, /linux/, /netbsd/, /openbsd/, /solaris/,
|
670
|
+
/darwin/, # the same as FreeBSD
|
671
|
+
] then
|
672
|
+
def self.bind_random_port(udpsock, bind_host="0.0.0.0") # :nodoc:
|
673
|
+
udpsock.bind(bind_host, 0)
|
674
|
+
end
|
675
|
+
else
|
676
|
+
# Sequential port assignment
|
677
|
+
def self.bind_random_port(udpsock, bind_host="0.0.0.0") # :nodoc:
|
678
|
+
# Ephemeral port number range recommended by RFC 6056
|
664
679
|
port = random(1024..65535)
|
665
680
|
udpsock.bind(bind_host, port)
|
666
681
|
rescue Errno::EADDRINUSE, # POSIX
|
@@ -983,13 +998,13 @@ class Gem::Resolv
|
|
983
998
|
next unless keyword
|
984
999
|
case keyword
|
985
1000
|
when 'nameserver'
|
986
|
-
nameserver.concat(args)
|
1001
|
+
nameserver.concat(args.each(&:freeze))
|
987
1002
|
when 'domain'
|
988
1003
|
next if args.empty?
|
989
|
-
search = [args[0]]
|
1004
|
+
search = [args[0].freeze]
|
990
1005
|
when 'search'
|
991
1006
|
next if args.empty?
|
992
|
-
search = args
|
1007
|
+
search = args.each(&:freeze)
|
993
1008
|
when 'options'
|
994
1009
|
args.each {|arg|
|
995
1010
|
case arg
|
@@ -1000,22 +1015,22 @@ class Gem::Resolv
|
|
1000
1015
|
end
|
1001
1016
|
}
|
1002
1017
|
}
|
1003
|
-
return { :nameserver => nameserver, :search => search, :ndots => ndots }
|
1018
|
+
return { :nameserver => nameserver.freeze, :search => search.freeze, :ndots => ndots.freeze }.freeze
|
1004
1019
|
end
|
1005
1020
|
|
1006
1021
|
def Config.default_config_hash(filename="/etc/resolv.conf")
|
1007
1022
|
if File.exist? filename
|
1008
|
-
|
1023
|
+
Config.parse_resolv_conf(filename)
|
1024
|
+
elsif WINDOWS
|
1025
|
+
require 'win32/resolv' unless defined?(Win32::Resolv)
|
1026
|
+
search, nameserver = Win32::Resolv.get_resolv_info
|
1027
|
+
config_hash = {}
|
1028
|
+
config_hash[:nameserver] = nameserver if nameserver
|
1029
|
+
config_hash[:search] = [search].flatten if search
|
1030
|
+
config_hash
|
1009
1031
|
else
|
1010
|
-
|
1011
|
-
require 'win32/resolv'
|
1012
|
-
search, nameserver = Win32::Resolv.get_resolv_info
|
1013
|
-
config_hash = {}
|
1014
|
-
config_hash[:nameserver] = nameserver if nameserver
|
1015
|
-
config_hash[:search] = [search].flatten if search
|
1016
|
-
end
|
1032
|
+
{}
|
1017
1033
|
end
|
1018
|
-
config_hash || {}
|
1019
1034
|
end
|
1020
1035
|
|
1021
1036
|
def lazy_initialize
|
@@ -1664,6 +1679,7 @@ class Gem::Resolv
|
|
1664
1679
|
prev_index = @index
|
1665
1680
|
save_index = nil
|
1666
1681
|
d = []
|
1682
|
+
size = -1
|
1667
1683
|
while true
|
1668
1684
|
raise DecodeError.new("limit exceeded") if @limit <= @index
|
1669
1685
|
case @data.getbyte(@index)
|
@@ -1684,7 +1700,10 @@ class Gem::Resolv
|
|
1684
1700
|
end
|
1685
1701
|
@index = idx
|
1686
1702
|
else
|
1687
|
-
|
1703
|
+
l = self.get_label
|
1704
|
+
d << l
|
1705
|
+
size += 1 + l.string.bytesize
|
1706
|
+
raise DecodeError.new("name label data exceed 255 octets") if size > 255
|
1688
1707
|
end
|
1689
1708
|
end
|
1690
1709
|
end
|
@@ -2110,7 +2129,14 @@ class Gem::Resolv
|
|
2110
2129
|
|
2111
2130
|
attr_reader :ttl
|
2112
2131
|
|
2113
|
-
ClassHash =
|
2132
|
+
ClassHash = Module.new do
|
2133
|
+
module_function
|
2134
|
+
|
2135
|
+
def []=(type_class_value, klass)
|
2136
|
+
type_value, class_value = type_class_value
|
2137
|
+
Resource.const_set(:"Type#{type_value}_Class#{class_value}", klass)
|
2138
|
+
end
|
2139
|
+
end
|
2114
2140
|
|
2115
2141
|
def encode_rdata(msg) # :nodoc:
|
2116
2142
|
raise NotImplementedError.new
|
@@ -2148,7 +2174,9 @@ class Gem::Resolv
|
|
2148
2174
|
end
|
2149
2175
|
|
2150
2176
|
def self.get_class(type_value, class_value) # :nodoc:
|
2151
|
-
|
2177
|
+
cache = :"Type#{type_value}_Class#{class_value}"
|
2178
|
+
|
2179
|
+
return (const_defined?(cache) && const_get(cache)) ||
|
2152
2180
|
Generic.create(type_value, class_value)
|
2153
2181
|
end
|
2154
2182
|
|
@@ -2577,7 +2605,7 @@ class Gem::Resolv
|
|
2577
2605
|
end
|
2578
2606
|
|
2579
2607
|
##
|
2580
|
-
# Flags for this
|
2608
|
+
# Flags for this property:
|
2581
2609
|
# - Bit 0 : 0 = not critical, 1 = critical
|
2582
2610
|
|
2583
2611
|
attr_reader :flags
|
data/lib/rubygems.rb
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
require "rbconfig"
|
10
10
|
|
11
11
|
module Gem
|
12
|
-
VERSION = "3.
|
12
|
+
VERSION = "3.7.1"
|
13
13
|
end
|
14
14
|
|
15
15
|
# Must be first since it unloads the prelude from 1.9.2
|
@@ -249,6 +249,16 @@ module Gem
|
|
249
249
|
find_spec_for_exe(name, exec_name, requirements).bin_file exec_name
|
250
250
|
end
|
251
251
|
|
252
|
+
def self.find_and_activate_spec_for_exe(name, exec_name, requirements)
|
253
|
+
spec = find_spec_for_exe name, exec_name, requirements
|
254
|
+
Gem::LOADED_SPECS_MUTEX.synchronize do
|
255
|
+
spec.activate
|
256
|
+
finish_resolve
|
257
|
+
end
|
258
|
+
spec
|
259
|
+
end
|
260
|
+
private_class_method :find_and_activate_spec_for_exe
|
261
|
+
|
252
262
|
def self.find_spec_for_exe(name, exec_name, requirements)
|
253
263
|
raise ArgumentError, "you must supply exec_name" unless exec_name
|
254
264
|
|
@@ -273,6 +283,42 @@ module Gem
|
|
273
283
|
end
|
274
284
|
private_class_method :find_spec_for_exe
|
275
285
|
|
286
|
+
##
|
287
|
+
# Find and load the full path to the executable for gem +name+. If the
|
288
|
+
# +exec_name+ is not given, an exception will be raised, otherwise the
|
289
|
+
# specified executable's path is returned. +requirements+ allows
|
290
|
+
# you to specify specific gem versions.
|
291
|
+
#
|
292
|
+
# A side effect of this method is that it will activate the gem that
|
293
|
+
# contains the executable.
|
294
|
+
#
|
295
|
+
# This method should *only* be used in bin stub files.
|
296
|
+
|
297
|
+
def self.activate_and_load_bin_path(name, exec_name = nil, *requirements)
|
298
|
+
spec = find_and_activate_spec_for_exe name, exec_name, requirements
|
299
|
+
|
300
|
+
if spec.name == "bundler"
|
301
|
+
# Old versions of Bundler need a workaround to support nested `bundle
|
302
|
+
# exec` invocations by overriding `Gem.activate_bin_path`. However,
|
303
|
+
# RubyGems now uses this new `Gem.activate_and_load_bin_path` helper in
|
304
|
+
# binstubs, which is of course not overridden in Bundler since it didn't
|
305
|
+
# exist at the time. So, include the override here to workaround that.
|
306
|
+
load ENV["BUNDLE_BIN_PATH"] if ENV["BUNDLE_BIN_PATH"] && spec.version <= "2.5.22"
|
307
|
+
|
308
|
+
# Make sure there's no version of Bundler in `$LOAD_PATH` that's different
|
309
|
+
# from the version we just activated. If that was the case (it happens
|
310
|
+
# when testing Bundler from ruby/ruby), we would load Bundler extensions
|
311
|
+
# to RubyGems from the copy in `$LOAD_PATH` but then load the binstub from
|
312
|
+
# an installed copy, causing those copies to be mixed and yet more
|
313
|
+
# redefinition warnings.
|
314
|
+
#
|
315
|
+
require_path = $LOAD_PATH.resolve_feature_path("bundler").last.delete_suffix("/bundler.rb")
|
316
|
+
Gem.load_bundler_extensions(spec.version) if spec.full_require_paths.include?(require_path)
|
317
|
+
end
|
318
|
+
|
319
|
+
load spec.bin_file(exec_name)
|
320
|
+
end
|
321
|
+
|
276
322
|
##
|
277
323
|
# Find the full path to the executable for gem +name+. If the +exec_name+
|
278
324
|
# is not given, an exception will be raised, otherwise the
|
@@ -285,12 +331,7 @@ module Gem
|
|
285
331
|
# This method should *only* be used in bin stub files.
|
286
332
|
|
287
333
|
def self.activate_bin_path(name, exec_name = nil, *requirements) # :nodoc:
|
288
|
-
|
289
|
-
Gem::LOADED_SPECS_MUTEX.synchronize do
|
290
|
-
spec.activate
|
291
|
-
finish_resolve
|
292
|
-
end
|
293
|
-
spec.bin_file exec_name
|
334
|
+
find_and_activate_spec_for_exe(name, exec_name, requirements).bin_file exec_name
|
294
335
|
end
|
295
336
|
|
296
337
|
##
|
@@ -636,6 +677,30 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
636
677
|
@safe_marshal_loaded = true
|
637
678
|
end
|
638
679
|
|
680
|
+
##
|
681
|
+
# Load Bundler extensions to RubyGems, making sure to avoid redefinition
|
682
|
+
# warnings in platform constants
|
683
|
+
|
684
|
+
def self.load_bundler_extensions(version)
|
685
|
+
return unless version <= "2.6.9"
|
686
|
+
|
687
|
+
previous_platforms = {}
|
688
|
+
|
689
|
+
platform_const_list = ["JAVA", "MSWIN", "MSWIN64", "MINGW", "X64_MINGW_LEGACY", "X64_MINGW", "UNIVERSAL_MINGW", "WINDOWS", "X64_LINUX", "X64_LINUX_MUSL"]
|
690
|
+
|
691
|
+
platform_const_list.each do |platform|
|
692
|
+
previous_platforms[platform] = Gem::Platform.const_get(platform)
|
693
|
+
Gem::Platform.send(:remove_const, platform)
|
694
|
+
end
|
695
|
+
|
696
|
+
require "bundler/rubygems_ext"
|
697
|
+
|
698
|
+
platform_const_list.each do |platform|
|
699
|
+
Gem::Platform.send(:remove_const, platform) if Gem::Platform.const_defined?(platform)
|
700
|
+
Gem::Platform.const_set(platform, previous_platforms[platform])
|
701
|
+
end
|
702
|
+
end
|
703
|
+
|
639
704
|
##
|
640
705
|
# The file name and line number of the caller of the caller of this method.
|
641
706
|
#
|
data/rubygems-update.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "rubygems-update"
|
5
|
-
s.version = "3.
|
5
|
+
s.version = "3.7.1"
|
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
|
|
@@ -36,7 +36,7 @@ Gem::Specification.new do |s|
|
|
36
36
|
"hide_lib_for_update/note.txt", *Dir["bundler/lib/bundler/man/*.1", base: __dir__]
|
37
37
|
]
|
38
38
|
|
39
|
-
s.required_ruby_version = Gem::Requirement.new(">= 3.
|
39
|
+
s.required_ruby_version = Gem::Requirement.new(">= 3.2.0")
|
40
40
|
s.required_rubygems_version = Gem::Requirement.new(">= 0")
|
41
41
|
|
42
42
|
s.specification_version = 4
|
data/setup.rb
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
# See LICENSE.txt for permissions.
|
8
8
|
#++
|
9
9
|
|
10
|
-
abort "RubyGems only supports Ruby 3.
|
10
|
+
abort "RubyGems only supports Ruby 3.2 or higher" if RUBY_VERSION < "3.2.0"
|
11
11
|
|
12
12
|
# Make sure rubygems isn't already loaded.
|
13
13
|
if ENV["RUBYOPT"] || defined? Gem
|
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.
|
4
|
+
version: 3.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Weirich
|
@@ -85,10 +85,12 @@ extra_rdoc_files:
|
|
85
85
|
files:
|
86
86
|
- CHANGELOG.md
|
87
87
|
- CODE_OF_CONDUCT.md
|
88
|
+
- CONTRIBUTING.md
|
88
89
|
- LICENSE.txt
|
89
90
|
- MIT.txt
|
90
91
|
- Manifest.txt
|
91
92
|
- README.md
|
93
|
+
- SECURITY.md
|
92
94
|
- bundler/CHANGELOG.md
|
93
95
|
- bundler/LICENSE.md
|
94
96
|
- bundler/README.md
|
@@ -160,7 +162,6 @@ files:
|
|
160
162
|
- bundler/lib/bundler/force_platform.rb
|
161
163
|
- bundler/lib/bundler/friendly_errors.rb
|
162
164
|
- bundler/lib/bundler/gem_helper.rb
|
163
|
-
- bundler/lib/bundler/gem_helpers.rb
|
164
165
|
- bundler/lib/bundler/gem_tasks.rb
|
165
166
|
- bundler/lib/bundler/gem_version_promoter.rb
|
166
167
|
- bundler/lib/bundler/graph.rb
|
@@ -298,7 +299,6 @@ files:
|
|
298
299
|
- bundler/lib/bundler/stub_specification.rb
|
299
300
|
- bundler/lib/bundler/templates/.document
|
300
301
|
- bundler/lib/bundler/templates/Executable
|
301
|
-
- bundler/lib/bundler/templates/Executable.bundler
|
302
302
|
- bundler/lib/bundler/templates/Executable.standalone
|
303
303
|
- bundler/lib/bundler/templates/Gemfile
|
304
304
|
- bundler/lib/bundler/templates/newgem/CHANGELOG.md.tt
|
@@ -341,22 +341,18 @@ files:
|
|
341
341
|
- bundler/lib/bundler/uri_credentials_filter.rb
|
342
342
|
- bundler/lib/bundler/uri_normalizer.rb
|
343
343
|
- bundler/lib/bundler/vendor/.document
|
344
|
-
- bundler/lib/bundler/vendor/connection_pool/.document
|
345
344
|
- bundler/lib/bundler/vendor/connection_pool/LICENSE
|
346
345
|
- bundler/lib/bundler/vendor/connection_pool/lib/connection_pool.rb
|
347
346
|
- bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb
|
348
347
|
- bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb
|
349
348
|
- bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb
|
350
|
-
- bundler/lib/bundler/vendor/fileutils/.document
|
351
349
|
- bundler/lib/bundler/vendor/fileutils/COPYING
|
352
350
|
- bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb
|
353
|
-
- bundler/lib/bundler/vendor/net-http-persistent/.document
|
354
351
|
- bundler/lib/bundler/vendor/net-http-persistent/README.rdoc
|
355
352
|
- bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb
|
356
353
|
- bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb
|
357
354
|
- bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb
|
358
355
|
- bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb
|
359
|
-
- bundler/lib/bundler/vendor/pub_grub/.document
|
360
356
|
- bundler/lib/bundler/vendor/pub_grub/LICENSE.txt
|
361
357
|
- bundler/lib/bundler/vendor/pub_grub/lib/pub_grub.rb
|
362
358
|
- bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb
|
@@ -375,10 +371,8 @@ files:
|
|
375
371
|
- bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb
|
376
372
|
- bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb
|
377
373
|
- bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb
|
378
|
-
- bundler/lib/bundler/vendor/securerandom/.document
|
379
374
|
- bundler/lib/bundler/vendor/securerandom/COPYING
|
380
375
|
- bundler/lib/bundler/vendor/securerandom/lib/securerandom.rb
|
381
|
-
- bundler/lib/bundler/vendor/thor/.document
|
382
376
|
- bundler/lib/bundler/vendor/thor/LICENSE.md
|
383
377
|
- bundler/lib/bundler/vendor/thor/lib/thor.rb
|
384
378
|
- bundler/lib/bundler/vendor/thor/lib/thor/actions.rb
|
@@ -415,10 +409,8 @@ files:
|
|
415
409
|
- bundler/lib/bundler/vendor/thor/lib/thor/shell/wrapped_printer.rb
|
416
410
|
- bundler/lib/bundler/vendor/thor/lib/thor/util.rb
|
417
411
|
- bundler/lib/bundler/vendor/thor/lib/thor/version.rb
|
418
|
-
- bundler/lib/bundler/vendor/tsort/.document
|
419
412
|
- bundler/lib/bundler/vendor/tsort/LICENSE.txt
|
420
413
|
- bundler/lib/bundler/vendor/tsort/lib/tsort.rb
|
421
|
-
- bundler/lib/bundler/vendor/uri/.document
|
422
414
|
- bundler/lib/bundler/vendor/uri/COPYING
|
423
415
|
- bundler/lib/bundler/vendor/uri/lib/uri.rb
|
424
416
|
- bundler/lib/bundler/vendor/uri/lib/uri/common.rb
|
@@ -618,8 +610,7 @@ files:
|
|
618
610
|
- lib/rubygems/specification_policy.rb
|
619
611
|
- lib/rubygems/specification_record.rb
|
620
612
|
- lib/rubygems/ssl_certs/.document
|
621
|
-
- lib/rubygems/ssl_certs/rubygems.org/
|
622
|
-
- lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA_R3.pem
|
613
|
+
- lib/rubygems/ssl_certs/rubygems.org/GlobalSign.pem
|
623
614
|
- lib/rubygems/stub_specification.rb
|
624
615
|
- lib/rubygems/target_rbconfig.rb
|
625
616
|
- lib/rubygems/text.rb
|
@@ -633,7 +624,7 @@ files:
|
|
633
624
|
- lib/rubygems/util/licenses.rb
|
634
625
|
- lib/rubygems/util/list.rb
|
635
626
|
- lib/rubygems/validator.rb
|
636
|
-
- lib/rubygems/vendor
|
627
|
+
- lib/rubygems/vendor/.document
|
637
628
|
- lib/rubygems/vendor/molinillo/LICENSE
|
638
629
|
- lib/rubygems/vendor/molinillo/lib/molinillo.rb
|
639
630
|
- lib/rubygems/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb
|
@@ -655,7 +646,6 @@ files:
|
|
655
646
|
- lib/rubygems/vendor/molinillo/lib/molinillo/resolution.rb
|
656
647
|
- lib/rubygems/vendor/molinillo/lib/molinillo/resolver.rb
|
657
648
|
- lib/rubygems/vendor/molinillo/lib/molinillo/state.rb
|
658
|
-
- lib/rubygems/vendor/net-http/.document
|
659
649
|
- lib/rubygems/vendor/net-http/COPYING
|
660
650
|
- lib/rubygems/vendor/net-http/lib/net/http.rb
|
661
651
|
- lib/rubygems/vendor/net-http/lib/net/http/exceptions.rb
|
@@ -668,10 +658,8 @@ files:
|
|
668
658
|
- lib/rubygems/vendor/net-http/lib/net/http/responses.rb
|
669
659
|
- lib/rubygems/vendor/net-http/lib/net/http/status.rb
|
670
660
|
- lib/rubygems/vendor/net-http/lib/net/https.rb
|
671
|
-
- lib/rubygems/vendor/net-protocol/.document
|
672
661
|
- lib/rubygems/vendor/net-protocol/LICENSE.txt
|
673
662
|
- lib/rubygems/vendor/net-protocol/lib/net/protocol.rb
|
674
|
-
- lib/rubygems/vendor/optparse/.document
|
675
663
|
- lib/rubygems/vendor/optparse/COPYING
|
676
664
|
- lib/rubygems/vendor/optparse/lib/optionparser.rb
|
677
665
|
- lib/rubygems/vendor/optparse/lib/optparse.rb
|
@@ -682,19 +670,14 @@ files:
|
|
682
670
|
- lib/rubygems/vendor/optparse/lib/optparse/time.rb
|
683
671
|
- lib/rubygems/vendor/optparse/lib/optparse/uri.rb
|
684
672
|
- lib/rubygems/vendor/optparse/lib/optparse/version.rb
|
685
|
-
- lib/rubygems/vendor/resolv/.document
|
686
673
|
- lib/rubygems/vendor/resolv/COPYING
|
687
674
|
- lib/rubygems/vendor/resolv/lib/resolv.rb
|
688
|
-
- lib/rubygems/vendor/securerandom/.document
|
689
675
|
- lib/rubygems/vendor/securerandom/COPYING
|
690
676
|
- lib/rubygems/vendor/securerandom/lib/securerandom.rb
|
691
|
-
- lib/rubygems/vendor/timeout/.document
|
692
677
|
- lib/rubygems/vendor/timeout/COPYING
|
693
678
|
- lib/rubygems/vendor/timeout/lib/timeout.rb
|
694
|
-
- lib/rubygems/vendor/tsort/.document
|
695
679
|
- lib/rubygems/vendor/tsort/LICENSE.txt
|
696
680
|
- lib/rubygems/vendor/tsort/lib/tsort.rb
|
697
|
-
- lib/rubygems/vendor/uri/.document
|
698
681
|
- lib/rubygems/vendor/uri/COPYING
|
699
682
|
- lib/rubygems/vendor/uri/lib/uri.rb
|
700
683
|
- lib/rubygems/vendor/uri/lib/uri/common.rb
|
@@ -741,14 +724,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
741
724
|
requirements:
|
742
725
|
- - ">="
|
743
726
|
- !ruby/object:Gem::Version
|
744
|
-
version: 3.
|
727
|
+
version: 3.2.0
|
745
728
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
746
729
|
requirements:
|
747
730
|
- - ">="
|
748
731
|
- !ruby/object:Gem::Version
|
749
732
|
version: '0'
|
750
733
|
requirements: []
|
751
|
-
rubygems_version: 3.
|
734
|
+
rubygems_version: 3.7.1
|
752
735
|
specification_version: 4
|
753
736
|
summary: RubyGems is a package management framework for Ruby. This gem is downloaded
|
754
737
|
and installed by `gem update --system`, so that the `gem` CLI can update itself.
|
@@ -1,144 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Bundler
|
4
|
-
module GemHelpers
|
5
|
-
GENERIC_CACHE = { Gem::Platform::RUBY => Gem::Platform::RUBY } # rubocop:disable Style/MutableConstant
|
6
|
-
GENERICS = [
|
7
|
-
Gem::Platform::JAVA,
|
8
|
-
*Gem::Platform::WINDOWS,
|
9
|
-
].freeze
|
10
|
-
|
11
|
-
def generic(p)
|
12
|
-
GENERIC_CACHE[p] ||= begin
|
13
|
-
found = GENERICS.find do |match|
|
14
|
-
p === match
|
15
|
-
end
|
16
|
-
found || Gem::Platform::RUBY
|
17
|
-
end
|
18
|
-
end
|
19
|
-
module_function :generic
|
20
|
-
|
21
|
-
def generic_local_platform
|
22
|
-
generic(local_platform)
|
23
|
-
end
|
24
|
-
module_function :generic_local_platform
|
25
|
-
|
26
|
-
def local_platform
|
27
|
-
Bundler.local_platform
|
28
|
-
end
|
29
|
-
module_function :local_platform
|
30
|
-
|
31
|
-
def generic_local_platform_is_ruby?
|
32
|
-
generic_local_platform == Gem::Platform::RUBY
|
33
|
-
end
|
34
|
-
module_function :generic_local_platform_is_ruby?
|
35
|
-
|
36
|
-
def platform_specificity_match(spec_platform, user_platform)
|
37
|
-
spec_platform = Gem::Platform.new(spec_platform)
|
38
|
-
|
39
|
-
PlatformMatch.specificity_score(spec_platform, user_platform)
|
40
|
-
end
|
41
|
-
module_function :platform_specificity_match
|
42
|
-
|
43
|
-
def select_all_platform_match(specs, platform, force_ruby: false, prefer_locked: false)
|
44
|
-
matching = if force_ruby
|
45
|
-
specs.select {|spec| spec.match_platform(Gem::Platform::RUBY) && spec.force_ruby_platform! }
|
46
|
-
else
|
47
|
-
specs.select {|spec| spec.match_platform(platform) }
|
48
|
-
end
|
49
|
-
|
50
|
-
if prefer_locked
|
51
|
-
locked_originally = matching.select {|spec| spec.is_a?(LazySpecification) }
|
52
|
-
return locked_originally if locked_originally.any?
|
53
|
-
end
|
54
|
-
|
55
|
-
matching
|
56
|
-
end
|
57
|
-
module_function :select_all_platform_match
|
58
|
-
|
59
|
-
def select_best_platform_match(specs, platform, force_ruby: false, prefer_locked: false)
|
60
|
-
matching = select_all_platform_match(specs, platform, force_ruby: force_ruby, prefer_locked: prefer_locked)
|
61
|
-
|
62
|
-
sort_and_filter_best_platform_match(matching, platform)
|
63
|
-
end
|
64
|
-
module_function :select_best_platform_match
|
65
|
-
|
66
|
-
def select_best_local_platform_match(specs, force_ruby: false)
|
67
|
-
matching = select_all_platform_match(specs, local_platform, force_ruby: force_ruby).filter_map(&:materialized_for_installation)
|
68
|
-
|
69
|
-
sort_best_platform_match(matching, local_platform)
|
70
|
-
end
|
71
|
-
module_function :select_best_local_platform_match
|
72
|
-
|
73
|
-
def sort_and_filter_best_platform_match(matching, platform)
|
74
|
-
return matching if matching.one?
|
75
|
-
|
76
|
-
exact = matching.select {|spec| spec.platform == platform }
|
77
|
-
return exact if exact.any?
|
78
|
-
|
79
|
-
sorted_matching = sort_best_platform_match(matching, platform)
|
80
|
-
exemplary_spec = sorted_matching.first
|
81
|
-
|
82
|
-
sorted_matching.take_while {|spec| same_specificity(platform, spec, exemplary_spec) && same_deps(spec, exemplary_spec) }
|
83
|
-
end
|
84
|
-
module_function :sort_and_filter_best_platform_match
|
85
|
-
|
86
|
-
def sort_best_platform_match(matching, platform)
|
87
|
-
matching.sort_by {|spec| platform_specificity_match(spec.platform, platform) }
|
88
|
-
end
|
89
|
-
module_function :sort_best_platform_match
|
90
|
-
|
91
|
-
class PlatformMatch
|
92
|
-
def self.specificity_score(spec_platform, user_platform)
|
93
|
-
return -1 if spec_platform == user_platform
|
94
|
-
return 1_000_000 if spec_platform.nil? || spec_platform == Gem::Platform::RUBY || user_platform == Gem::Platform::RUBY
|
95
|
-
|
96
|
-
os_match(spec_platform, user_platform) +
|
97
|
-
cpu_match(spec_platform, user_platform) * 10 +
|
98
|
-
platform_version_match(spec_platform, user_platform) * 100
|
99
|
-
end
|
100
|
-
|
101
|
-
def self.os_match(spec_platform, user_platform)
|
102
|
-
if spec_platform.os == user_platform.os
|
103
|
-
0
|
104
|
-
else
|
105
|
-
1
|
106
|
-
end
|
107
|
-
end
|
108
|
-
|
109
|
-
def self.cpu_match(spec_platform, user_platform)
|
110
|
-
if spec_platform.cpu == user_platform.cpu
|
111
|
-
0
|
112
|
-
elsif spec_platform.cpu == "arm" && user_platform.cpu.to_s.start_with?("arm")
|
113
|
-
0
|
114
|
-
elsif spec_platform.cpu.nil? || spec_platform.cpu == "universal"
|
115
|
-
1
|
116
|
-
else
|
117
|
-
2
|
118
|
-
end
|
119
|
-
end
|
120
|
-
|
121
|
-
def self.platform_version_match(spec_platform, user_platform)
|
122
|
-
if spec_platform.version == user_platform.version
|
123
|
-
0
|
124
|
-
elsif spec_platform.version.nil?
|
125
|
-
1
|
126
|
-
else
|
127
|
-
2
|
128
|
-
end
|
129
|
-
end
|
130
|
-
end
|
131
|
-
|
132
|
-
def same_specificity(platform, spec, exemplary_spec)
|
133
|
-
platform_specificity_match(spec.platform, platform) == platform_specificity_match(exemplary_spec.platform, platform)
|
134
|
-
end
|
135
|
-
module_function :same_specificity
|
136
|
-
|
137
|
-
def same_deps(spec, exemplary_spec)
|
138
|
-
same_runtime_deps = spec.dependencies.sort == exemplary_spec.dependencies.sort
|
139
|
-
same_metadata_deps = spec.required_ruby_version == exemplary_spec.required_ruby_version && spec.required_rubygems_version == exemplary_spec.required_rubygems_version
|
140
|
-
same_runtime_deps && same_metadata_deps
|
141
|
-
end
|
142
|
-
module_function :same_deps
|
143
|
-
end
|
144
|
-
end
|