rubygems-update 3.6.8 → 3.7.0
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 +874 -787
- data/CONTRIBUTING.md +9 -0
- data/Manifest.txt +6 -22
- data/README.md +1 -1
- data/SECURITY.md +7 -0
- data/bundler/CHANGELOG.md +1103 -1030
- 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/doctor/diagnose.rb +167 -0
- data/bundler/lib/bundler/cli/doctor/ssl.rb +249 -0
- data/bundler/lib/bundler/cli/doctor.rb +27 -155
- data/bundler/lib/bundler/cli/gem.rb +62 -30
- data/bundler/lib/bundler/cli/install.rb +4 -4
- data/bundler/lib/bundler/cli/issue.rb +2 -2
- data/bundler/lib/bundler/cli/outdated.rb +1 -1
- data/bundler/lib/bundler/cli/update.rb +2 -2
- data/bundler/lib/bundler/cli.rb +12 -25
- 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 +55 -58
- 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 +29 -18
- 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 +1 -1
- 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 +1 -1
- 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 +11 -9
- 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 +28 -6
- 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 +137 -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/push_command.rb +2 -1
- data/lib/rubygems/commands/setup_command.rb +2 -2
- data/lib/rubygems/core_ext/kernel_require.rb +5 -2
- data/lib/rubygems/ext/builder.rb +15 -4
- data/lib/rubygems/ext/cargo_builder.rb +7 -5
- data/lib/rubygems/ext/rake_builder.rb +1 -3
- data/lib/rubygems/gemcutter_utilities/webauthn_listener.rb +10 -3
- data/lib/rubygems/gemcutter_utilities.rb +5 -2
- data/lib/rubygems/installer.rb +45 -50
- data/lib/rubygems/package/tar_writer.rb +5 -4
- 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 +65 -7
- data/rubygems-update.gemspec +2 -2
- data/setup.rb +1 -1
- metadata +9 -25
- 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/shellwords.rb +0 -3
- 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
data/lib/rubygems/request_set.rb
CHANGED
@@ -181,13 +181,10 @@ class Gem::RequestSet
|
|
181
181
|
|
182
182
|
# Install requested gems after they have been downloaded
|
183
183
|
sorted_requests.each do |req|
|
184
|
-
if req.installed?
|
184
|
+
if req.installed? && @always_install.none? {|spec| spec == req.spec.spec }
|
185
185
|
req.spec.spec.build_extensions
|
186
|
-
|
187
|
-
|
188
|
-
yield req, nil if block_given?
|
189
|
-
next
|
190
|
-
end
|
186
|
+
yield req, nil if block_given?
|
187
|
+
next
|
191
188
|
end
|
192
189
|
|
193
190
|
spec =
|
@@ -42,6 +42,6 @@ class Gem::Resolver::SourceSet < Gem::Resolver::Set
|
|
42
42
|
|
43
43
|
def get_set(name)
|
44
44
|
link = @links[name]
|
45
|
-
@sets[link] ||= Gem::Source.new(link).dependency_resolver_set if link
|
45
|
+
@sets[link] ||= Gem::Source.new(link).dependency_resolver_set(@prerelease) if link
|
46
46
|
end
|
47
47
|
end
|
data/lib/rubygems/resolver.rb
CHANGED
@@ -241,7 +241,7 @@ class Gem::Resolver
|
|
241
241
|
|
242
242
|
sources.each do |source|
|
243
243
|
groups[source].
|
244
|
-
sort_by {|spec| [spec.version, spec.platform
|
244
|
+
sort_by {|spec| [spec.version, -Gem::Platform.platform_specificity_match(spec.platform, Gem::Platform.local)] }.
|
245
245
|
map {|spec| ActivationRequest.new spec, dependency }.
|
246
246
|
each {|activation_request| activation_requests << activation_request }
|
247
247
|
end
|
@@ -27,9 +27,11 @@ class Gem::S3URISigner
|
|
27
27
|
end
|
28
28
|
|
29
29
|
attr_accessor :uri
|
30
|
+
attr_accessor :method
|
30
31
|
|
31
|
-
def initialize(uri)
|
32
|
+
def initialize(uri, method)
|
32
33
|
@uri = uri
|
34
|
+
@method = method
|
33
35
|
end
|
34
36
|
|
35
37
|
##
|
@@ -38,7 +40,7 @@ class Gem::S3URISigner
|
|
38
40
|
s3_config = fetch_s3_config
|
39
41
|
|
40
42
|
current_time = Time.now.utc
|
41
|
-
date_time = current_time.strftime("%Y%m%dT%H%
|
43
|
+
date_time = current_time.strftime("%Y%m%dT%H%M%SZ")
|
42
44
|
date = date_time[0,8]
|
43
45
|
|
44
46
|
credential_info = "#{date}/#{s3_config.region}/s3/aws4_request"
|
@@ -73,7 +75,7 @@ class Gem::S3URISigner
|
|
73
75
|
|
74
76
|
def generate_canonical_request(canonical_host, query_params)
|
75
77
|
[
|
76
|
-
|
78
|
+
method.upcase,
|
77
79
|
uri.path,
|
78
80
|
query_params,
|
79
81
|
"host:#{canonical_host}",
|
data/lib/rubygems/source.rb
CHANGED
@@ -67,28 +67,11 @@ class Gem::Source
|
|
67
67
|
|
68
68
|
##
|
69
69
|
# Returns a Set that can fetch specifications from this source.
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
index_uri = uri.dup
|
76
|
-
index_uri.host = "index.rubygems.org"
|
77
|
-
index_uri
|
78
|
-
else
|
79
|
-
uri
|
80
|
-
end
|
81
|
-
|
82
|
-
bundler_api_uri = enforce_trailing_slash(fetch_uri) + "versions"
|
83
|
-
|
84
|
-
begin
|
85
|
-
fetcher = Gem::RemoteFetcher.fetcher
|
86
|
-
response = fetcher.fetch_path bundler_api_uri, nil, true
|
87
|
-
rescue Gem::RemoteFetcher::FetchError
|
88
|
-
Gem::Resolver::IndexSet.new self
|
89
|
-
else
|
90
|
-
Gem::Resolver::APISet.new response.uri + "./info/"
|
91
|
-
end
|
70
|
+
#
|
71
|
+
# The set will optionally fetch prereleases if requested.
|
72
|
+
#
|
73
|
+
def dependency_resolver_set(prerelease = false)
|
74
|
+
new_dependency_resolver_set.tap {|set| set.prerelease = prerelease }
|
92
75
|
end
|
93
76
|
|
94
77
|
def hash # :nodoc:
|
@@ -234,6 +217,29 @@ class Gem::Source
|
|
234
217
|
|
235
218
|
private
|
236
219
|
|
220
|
+
def new_dependency_resolver_set
|
221
|
+
return Gem::Resolver::IndexSet.new self if uri.scheme == "file"
|
222
|
+
|
223
|
+
fetch_uri = if uri.host == "rubygems.org"
|
224
|
+
index_uri = uri.dup
|
225
|
+
index_uri.host = "index.rubygems.org"
|
226
|
+
index_uri
|
227
|
+
else
|
228
|
+
uri
|
229
|
+
end
|
230
|
+
|
231
|
+
bundler_api_uri = enforce_trailing_slash(fetch_uri) + "versions"
|
232
|
+
|
233
|
+
begin
|
234
|
+
fetcher = Gem::RemoteFetcher.fetcher
|
235
|
+
response = fetcher.fetch_path bundler_api_uri, nil, true
|
236
|
+
rescue Gem::RemoteFetcher::FetchError
|
237
|
+
Gem::Resolver::IndexSet.new self
|
238
|
+
else
|
239
|
+
Gem::Resolver::APISet.new response.uri + "./info/"
|
240
|
+
end
|
241
|
+
end
|
242
|
+
|
237
243
|
def enforce_trailing_slash(uri)
|
238
244
|
uri.merge(uri.path.gsub(%r{/+$}, "") + "/")
|
239
245
|
end
|
@@ -1002,7 +1002,7 @@ class Gem::Specification < Gem::BasicSpecification
|
|
1002
1002
|
def self.find_in_unresolved_tree(path)
|
1003
1003
|
unresolved_specs.each do |spec|
|
1004
1004
|
spec.traverse do |_from_spec, _dep, to_spec, trail|
|
1005
|
-
if to_spec.has_conflicts? || to_spec.
|
1005
|
+
if to_spec.has_conflicts? || to_spec.conflicts_when_loaded_with?(trail)
|
1006
1006
|
:next
|
1007
1007
|
else
|
1008
1008
|
return trail.reverse if to_spec.contains_requirable_file? path
|
@@ -1649,7 +1649,7 @@ class Gem::Specification < Gem::BasicSpecification
|
|
1649
1649
|
##
|
1650
1650
|
# return true if there will be conflict when spec if loaded together with the list of specs.
|
1651
1651
|
|
1652
|
-
def
|
1652
|
+
def conflicts_when_loaded_with?(list_of_specs) # :nodoc:
|
1653
1653
|
result = list_of_specs.any? do |spec|
|
1654
1654
|
spec.runtime_dependencies.any? {|dep| (dep.name == name) && !satisfies_requirement?(dep) }
|
1655
1655
|
end
|
@@ -59,12 +59,15 @@ class Gem::Licenses
|
|
59
59
|
Artistic-1.0-Perl
|
60
60
|
Artistic-1.0-cl8
|
61
61
|
Artistic-2.0
|
62
|
+
Artistic-dist
|
63
|
+
Aspell-RU
|
62
64
|
BSD-1-Clause
|
63
65
|
BSD-2-Clause
|
64
66
|
BSD-2-Clause-Darwin
|
65
67
|
BSD-2-Clause-Patent
|
66
68
|
BSD-2-Clause-Views
|
67
69
|
BSD-2-Clause-first-lines
|
70
|
+
BSD-2-Clause-pkgconf-disclaimer
|
68
71
|
BSD-3-Clause
|
69
72
|
BSD-3-Clause-Attribution
|
70
73
|
BSD-3-Clause-Clear
|
@@ -205,6 +208,7 @@ class Gem::Licenses
|
|
205
208
|
Cornell-Lossless-JPEG
|
206
209
|
Cronyx
|
207
210
|
Crossword
|
211
|
+
CryptoSwift
|
208
212
|
CrystalStacker
|
209
213
|
Cube
|
210
214
|
D-FSL-1.0
|
@@ -215,6 +219,7 @@ class Gem::Licenses
|
|
215
219
|
DRL-1.0
|
216
220
|
DRL-1.1
|
217
221
|
DSDP
|
222
|
+
DocBook-DTD
|
218
223
|
DocBook-Schema
|
219
224
|
DocBook-Stylesheet
|
220
225
|
DocBook-XML
|
@@ -240,7 +245,10 @@ class Gem::Licenses
|
|
240
245
|
FSFAP-no-warranty-disclaimer
|
241
246
|
FSFUL
|
242
247
|
FSFULLR
|
248
|
+
FSFULLRSD
|
243
249
|
FSFULLRWD
|
250
|
+
FSL-1.1-ALv2
|
251
|
+
FSL-1.1-MIT
|
244
252
|
FTL
|
245
253
|
Fair
|
246
254
|
Ferguson-Twofish
|
@@ -276,11 +284,13 @@ class Gem::Licenses
|
|
276
284
|
GPL-2.0-or-later
|
277
285
|
GPL-3.0-only
|
278
286
|
GPL-3.0-or-later
|
287
|
+
Game-Programming-Gems
|
279
288
|
Giftware
|
280
289
|
Glide
|
281
290
|
Glulxe
|
282
291
|
Graphics-Gems
|
283
292
|
Gutmann
|
293
|
+
HDF5
|
284
294
|
HIDAPI
|
285
295
|
HP-1986
|
286
296
|
HP-1989
|
@@ -426,6 +436,7 @@ class Gem::Licenses
|
|
426
436
|
NPL-1.1
|
427
437
|
NPOSL-3.0
|
428
438
|
NRL
|
439
|
+
NTIA-PD
|
429
440
|
NTP
|
430
441
|
NTP-0
|
431
442
|
Naumen
|
@@ -528,11 +539,13 @@ class Gem::Licenses
|
|
528
539
|
SMLNJ
|
529
540
|
SMPPL
|
530
541
|
SNIA
|
542
|
+
SOFA
|
531
543
|
SPL-1.0
|
532
544
|
SSH-OpenSSH
|
533
545
|
SSH-short
|
534
546
|
SSLeay-standalone
|
535
547
|
SSPL-1.0
|
548
|
+
SUL-1.0
|
536
549
|
SWL
|
537
550
|
Saxpath
|
538
551
|
SchemeReport
|
@@ -578,6 +591,8 @@ class Gem::Licenses
|
|
578
591
|
Unicode-TOU
|
579
592
|
UnixCrypt
|
580
593
|
Unlicense
|
594
|
+
Unlicense-libtelnet
|
595
|
+
Unlicense-libwhirlpool
|
581
596
|
VOSTROM
|
582
597
|
VSL-1.0
|
583
598
|
Vim
|
@@ -631,6 +646,8 @@ class Gem::Licenses
|
|
631
646
|
gtkbook
|
632
647
|
hdparm
|
633
648
|
iMatix
|
649
|
+
jove
|
650
|
+
libpng-1.6.35
|
634
651
|
libpng-2.0
|
635
652
|
libselinux-1.0
|
636
653
|
libtiff
|
@@ -638,10 +655,12 @@ class Gem::Licenses
|
|
638
655
|
lsof
|
639
656
|
magaz
|
640
657
|
mailprio
|
658
|
+
man2html
|
641
659
|
metamail
|
642
660
|
mpi-permissive
|
643
661
|
mpich2
|
644
662
|
mplus
|
663
|
+
ngrep
|
645
664
|
pkgconf
|
646
665
|
pnmstitch
|
647
666
|
psfrag
|
@@ -716,6 +735,7 @@ class Gem::Licenses
|
|
716
735
|
CLISP-exception-2.0
|
717
736
|
Classpath-exception-2.0
|
718
737
|
DigiRule-FOSS-exception
|
738
|
+
Digia-Qt-LGPL-exception-1.1
|
719
739
|
FLTK-exception
|
720
740
|
Fawkes-Runtime-exception
|
721
741
|
Font-exception-2.0
|
@@ -772,6 +792,7 @@ class Gem::Licenses
|
|
772
792
|
mif-exception
|
773
793
|
mxml-exception
|
774
794
|
openvpn-openssl-exception
|
795
|
+
polyparse-exception
|
775
796
|
romic-exception
|
776
797
|
stunnel-exception
|
777
798
|
u-boot-exception-2.0
|
@@ -475,8 +475,7 @@ module Gem::Net #:nodoc:
|
|
475
475
|
#
|
476
476
|
# - {::start}[rdoc-ref:Gem::Net::HTTP.start]:
|
477
477
|
# Begins a new session in a new \Gem::Net::HTTP object.
|
478
|
-
# - {#started?}[rdoc-ref:Gem::Net::HTTP#started?]
|
479
|
-
# (aliased as {#active?}[rdoc-ref:Gem::Net::HTTP#active?]):
|
478
|
+
# - {#started?}[rdoc-ref:Gem::Net::HTTP#started?]:
|
480
479
|
# Returns whether in a session.
|
481
480
|
# - {#finish}[rdoc-ref:Gem::Net::HTTP#finish]:
|
482
481
|
# Ends an active session.
|
@@ -556,18 +555,15 @@ module Gem::Net #:nodoc:
|
|
556
555
|
# Sends a PUT request and returns a response object.
|
557
556
|
# - {#request}[rdoc-ref:Gem::Net::HTTP#request]:
|
558
557
|
# Sends a request and returns a response object.
|
559
|
-
# - {#request_get}[rdoc-ref:Gem::Net::HTTP#request_get]
|
560
|
-
# (aliased as {#get2}[rdoc-ref:Gem::Net::HTTP#get2]):
|
558
|
+
# - {#request_get}[rdoc-ref:Gem::Net::HTTP#request_get]:
|
561
559
|
# Sends a GET request and forms a response object;
|
562
560
|
# if a block given, calls the block with the object,
|
563
561
|
# otherwise returns the object.
|
564
|
-
# - {#request_head}[rdoc-ref:Gem::Net::HTTP#request_head]
|
565
|
-
# (aliased as {#head2}[rdoc-ref:Gem::Net::HTTP#head2]):
|
562
|
+
# - {#request_head}[rdoc-ref:Gem::Net::HTTP#request_head]:
|
566
563
|
# Sends a HEAD request and forms a response object;
|
567
564
|
# if a block given, calls the block with the object,
|
568
565
|
# otherwise returns the object.
|
569
|
-
# - {#request_post}[rdoc-ref:Gem::Net::HTTP#request_post]
|
570
|
-
# (aliased as {#post2}[rdoc-ref:Gem::Net::HTTP#post2]):
|
566
|
+
# - {#request_post}[rdoc-ref:Gem::Net::HTTP#request_post]:
|
571
567
|
# Sends a POST request and forms a response object;
|
572
568
|
# if a block given, calls the block with the object,
|
573
569
|
# otherwise returns the object.
|
@@ -605,8 +601,7 @@ module Gem::Net #:nodoc:
|
|
605
601
|
# Returns whether +self+ is a proxy class.
|
606
602
|
# - {#proxy?}[rdoc-ref:Gem::Net::HTTP#proxy?]:
|
607
603
|
# Returns whether +self+ has a proxy.
|
608
|
-
# - {#proxy_address}[rdoc-ref:Gem::Net::HTTP#proxy_address]
|
609
|
-
# (aliased as {#proxyaddr}[rdoc-ref:Gem::Net::HTTP#proxyaddr]):
|
604
|
+
# - {#proxy_address}[rdoc-ref:Gem::Net::HTTP#proxy_address]:
|
610
605
|
# Returns the proxy address.
|
611
606
|
# - {#proxy_from_env?}[rdoc-ref:Gem::Net::HTTP#proxy_from_env?]:
|
612
607
|
# Returns whether the proxy is taken from an environment variable.
|
@@ -718,8 +713,7 @@ module Gem::Net #:nodoc:
|
|
718
713
|
# === \HTTP Version
|
719
714
|
#
|
720
715
|
# - {::version_1_2?}[rdoc-ref:Gem::Net::HTTP.version_1_2?]
|
721
|
-
# (aliased as {::
|
722
|
-
# and {::version_1_2}[rdoc-ref:Gem::Net::HTTP.version_1_2]):
|
716
|
+
# (aliased as {::version_1_2}[rdoc-ref:Gem::Net::HTTP.version_1_2]):
|
723
717
|
# Returns true; retained for compatibility.
|
724
718
|
#
|
725
719
|
# === Debugging
|
@@ -1552,11 +1546,11 @@ module Gem::Net #:nodoc:
|
|
1552
1546
|
attr_accessor :cert_store
|
1553
1547
|
|
1554
1548
|
# Sets or returns the available SSL ciphers.
|
1555
|
-
# See {OpenSSL::SSL::SSLContext#ciphers=}[
|
1549
|
+
# See {OpenSSL::SSL::SSLContext#ciphers=}[OpenSSL::SSL::SSL::Context#ciphers=].
|
1556
1550
|
attr_accessor :ciphers
|
1557
1551
|
|
1558
1552
|
# Sets or returns the extra X509 certificates to be added to the certificate chain.
|
1559
|
-
# See {OpenSSL::SSL::SSLContext#add_certificate}[
|
1553
|
+
# See {OpenSSL::SSL::SSLContext#add_certificate}[OpenSSL::SSL::SSL::Context#add_certificate].
|
1560
1554
|
attr_accessor :extra_chain_cert
|
1561
1555
|
|
1562
1556
|
# Sets or returns the OpenSSL::PKey::RSA or OpenSSL::PKey::DSA object.
|
@@ -1566,15 +1560,15 @@ module Gem::Net #:nodoc:
|
|
1566
1560
|
attr_accessor :ssl_timeout
|
1567
1561
|
|
1568
1562
|
# Sets or returns the SSL version.
|
1569
|
-
# See {OpenSSL::SSL::SSLContext#ssl_version=}[
|
1563
|
+
# See {OpenSSL::SSL::SSLContext#ssl_version=}[OpenSSL::SSL::SSL::Context#ssl_version=].
|
1570
1564
|
attr_accessor :ssl_version
|
1571
1565
|
|
1572
1566
|
# Sets or returns the minimum SSL version.
|
1573
|
-
# See {OpenSSL::SSL::SSLContext#min_version=}[
|
1567
|
+
# See {OpenSSL::SSL::SSLContext#min_version=}[OpenSSL::SSL::SSL::Context#min_version=].
|
1574
1568
|
attr_accessor :min_version
|
1575
1569
|
|
1576
1570
|
# Sets or returns the maximum SSL version.
|
1577
|
-
# See {OpenSSL::SSL::SSLContext#max_version=}[
|
1571
|
+
# See {OpenSSL::SSL::SSLContext#max_version=}[OpenSSL::SSL::SSL::Context#max_version=].
|
1578
1572
|
attr_accessor :max_version
|
1579
1573
|
|
1580
1574
|
# Sets or returns the callback for the server certification verification.
|
@@ -1590,7 +1584,7 @@ module Gem::Net #:nodoc:
|
|
1590
1584
|
|
1591
1585
|
# Sets or returns whether to verify that the server certificate is valid
|
1592
1586
|
# for the hostname.
|
1593
|
-
# See {OpenSSL::SSL::SSLContext#verify_hostname=}[
|
1587
|
+
# See {OpenSSL::SSL::SSLContext#verify_hostname=}[OpenSSL::SSL::SSL::Context#verify_hostname=].
|
1594
1588
|
attr_accessor :verify_hostname
|
1595
1589
|
|
1596
1590
|
# Returns the X509 certificate chain (an array of strings)
|
@@ -1923,7 +1917,8 @@ module Gem::Net #:nodoc:
|
|
1923
1917
|
private
|
1924
1918
|
|
1925
1919
|
def unescape(value)
|
1926
|
-
require 'cgi/
|
1920
|
+
require 'cgi/escape'
|
1921
|
+
require 'cgi/util' unless defined?(CGI::EscapeExt)
|
1927
1922
|
CGI.unescape(value)
|
1928
1923
|
end
|
1929
1924
|
|
@@ -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.0"
|
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,35 @@ 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
|
+
# Make sure there's no version of Bundler in `$LOAD_PATH` that's different
|
302
|
+
# from the version we just activated. If that was the case (it happens
|
303
|
+
# when testing Bundler from ruby/ruby), we would load Bundler extensions
|
304
|
+
# to RubyGems from the copy in `$LOAD_PATH` but then load the binstub from
|
305
|
+
# an installed copy, causing those copies to be mixed and yet more
|
306
|
+
# redefinition warnings.
|
307
|
+
#
|
308
|
+
require_path = $LOAD_PATH.resolve_feature_path("bundler").last.delete_suffix("/bundler.rb")
|
309
|
+
Gem.load_bundler_extensions(spec.version) if spec.full_require_paths.include?(require_path)
|
310
|
+
end
|
311
|
+
|
312
|
+
load spec.bin_file(exec_name)
|
313
|
+
end
|
314
|
+
|
276
315
|
##
|
277
316
|
# Find the full path to the executable for gem +name+. If the +exec_name+
|
278
317
|
# is not given, an exception will be raised, otherwise the
|
@@ -285,12 +324,7 @@ module Gem
|
|
285
324
|
# This method should *only* be used in bin stub files.
|
286
325
|
|
287
326
|
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
|
327
|
+
find_and_activate_spec_for_exe(name, exec_name, requirements).bin_file exec_name
|
294
328
|
end
|
295
329
|
|
296
330
|
##
|
@@ -636,6 +670,30 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
636
670
|
@safe_marshal_loaded = true
|
637
671
|
end
|
638
672
|
|
673
|
+
##
|
674
|
+
# Load Bundler extensions to RubyGems, making sure to avoid redefinition
|
675
|
+
# warnings in platform constants
|
676
|
+
|
677
|
+
def self.load_bundler_extensions(version)
|
678
|
+
return unless version <= "2.6.9"
|
679
|
+
|
680
|
+
previous_platforms = {}
|
681
|
+
|
682
|
+
platform_const_list = ["JAVA", "MSWIN", "MSWIN64", "MINGW", "X64_MINGW_LEGACY", "X64_MINGW", "UNIVERSAL_MINGW", "WINDOWS", "X64_LINUX", "X64_LINUX_MUSL"]
|
683
|
+
|
684
|
+
platform_const_list.each do |platform|
|
685
|
+
previous_platforms[platform] = Gem::Platform.const_get(platform)
|
686
|
+
Gem::Platform.send(:remove_const, platform)
|
687
|
+
end
|
688
|
+
|
689
|
+
require "bundler/rubygems_ext"
|
690
|
+
|
691
|
+
platform_const_list.each do |platform|
|
692
|
+
Gem::Platform.send(:remove_const, platform) if Gem::Platform.const_defined?(platform)
|
693
|
+
Gem::Platform.const_set(platform, previous_platforms[platform])
|
694
|
+
end
|
695
|
+
end
|
696
|
+
|
639
697
|
##
|
640
698
|
# The file name and line number of the caller of the caller of this method.
|
641
699
|
#
|
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.0"
|
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
|