rubygems-update 3.5.20 → 3.5.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +61 -0
- data/bundler/CHANGELOG.md +19 -0
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/dsl.rb +7 -7
- data/bundler/lib/bundler/inline.rb +11 -5
- data/bundler/lib/bundler/installer.rb +1 -1
- data/bundler/lib/bundler/plugin/api/source.rb +1 -1
- data/bundler/lib/bundler/rubygems_ext.rb +21 -3
- data/bundler/lib/bundler/rubygems_integration.rb +0 -22
- data/bundler/lib/bundler/source/git/git_proxy.rb +4 -2
- data/bundler/lib/bundler/source/git.rb +3 -3
- data/bundler/lib/bundler/source/path.rb +3 -1
- data/bundler/lib/bundler/source/rubygems.rb +1 -4
- data/bundler/lib/bundler/stub_specification.rb +13 -2
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +46 -8
- data/bundler/lib/bundler/vendor/uri/lib/uri/common.rb +2 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
- data/bundler/lib/bundler/version.rb +1 -1
- data/bundler/lib/bundler.rb +29 -21
- data/lib/rubygems/basic_specification.rb +11 -6
- data/lib/rubygems/command_manager.rb +3 -5
- data/lib/rubygems/commands/cleanup_command.rb +1 -11
- data/lib/rubygems/commands/contents_command.rb +15 -8
- data/lib/rubygems/commands/pristine_command.rb +16 -6
- data/lib/rubygems/dependency.rb +1 -1
- data/lib/rubygems/errors.rb +2 -1
- data/lib/rubygems/installer.rb +14 -23
- data/lib/rubygems/resolver/api_set.rb +12 -7
- data/lib/rubygems/resolver/best_set.rb +0 -2
- data/lib/rubygems/spec_fetcher.rb +4 -11
- data/lib/rubygems/specification.rb +3 -3
- data/lib/rubygems/specification_record.rb +1 -1
- data/lib/rubygems/stub_specification.rb +11 -10
- data/lib/rubygems/vendor/net-http/lib/net/http.rb +1 -1
- data/lib/rubygems/vendor/uri/lib/uri/common.rb +2 -0
- data/lib/rubygems/vendor/uri/lib/uri/version.rb +1 -1
- data/lib/rubygems.rb +3 -4
- data/rubygems-update.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 276b006ba43b78677b3ab572a3c2fe93f5d2dba491ca7e52fe1383b045348149
|
4
|
+
data.tar.gz: c3e120a1d2e201666f9ae43967fbb6633096c79dccfb4b81dcb70239ea92966f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0dd508e5b57121a6bdb08df3f984dcdc39ce14cc5b1725fd857f3f4e67e3334053fa2f2a93d0d2bb92f3050f1a4f85acfb86ea3064113d0388652265a31ed56d
|
7
|
+
data.tar.gz: c0cae4cac2bc5af2c91a3adcf7bbaad26ff5a8662bfbe20913cfe14b2b509f16cc169654451ed58e628d5a53fb88e30b3303d7bf85e266caf76d87324f2b1ddc
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,64 @@
|
|
1
|
+
# 3.5.22 / 2024-10-16
|
2
|
+
|
3
|
+
## Enhancements:
|
4
|
+
|
5
|
+
* Prevent `._*` files in packages generated from macOS. Pull request
|
6
|
+
[#8150](https://github.com/rubygems/rubygems/pull/8150) by
|
7
|
+
deivid-rodriguez
|
8
|
+
* Fix `gem pristine etc` resetting gem twice sometimes. Pull request
|
9
|
+
[#8117](https://github.com/rubygems/rubygems/pull/8117) by
|
10
|
+
deivid-rodriguez
|
11
|
+
* Allow `gem pristine` to reset default gems too. Pull request
|
12
|
+
[#8118](https://github.com/rubygems/rubygems/pull/8118) by
|
13
|
+
deivid-rodriguez
|
14
|
+
* Update vendored `uri` and `net-http`. Pull request
|
15
|
+
[#8112](https://github.com/rubygems/rubygems/pull/8112) by segiddins
|
16
|
+
* Installs bundler 2.5.22 as a default gem.
|
17
|
+
|
18
|
+
## Bug fixes:
|
19
|
+
|
20
|
+
* Fix `gem contents` for default gems. Pull request
|
21
|
+
[#8132](https://github.com/rubygems/rubygems/pull/8132) by
|
22
|
+
deivid-rodriguez
|
23
|
+
* Fix duplicated specs when they have been previously activated. Pull
|
24
|
+
request [#8131](https://github.com/rubygems/rubygems/pull/8131) by
|
25
|
+
deivid-rodriguez
|
26
|
+
* Fix `gem install` on NFS shares. Pull request
|
27
|
+
[#8123](https://github.com/rubygems/rubygems/pull/8123) by
|
28
|
+
deivid-rodriguez
|
29
|
+
* Fix a `gem install` crash during "done installing" hooks. Pull request
|
30
|
+
[#8113](https://github.com/rubygems/rubygems/pull/8113) by
|
31
|
+
deivid-rodriguez
|
32
|
+
* Fix plugin command loading. Pull request
|
33
|
+
[#8121](https://github.com/rubygems/rubygems/pull/8121) by
|
34
|
+
deivid-rodriguez
|
35
|
+
|
36
|
+
# 3.5.21 / 2024-10-03
|
37
|
+
|
38
|
+
## Enhancements:
|
39
|
+
|
40
|
+
* Fix `Gem::MissingSpecVersionError#to_s` not showing exception message.
|
41
|
+
Pull request [#8074](https://github.com/rubygems/rubygems/pull/8074) by
|
42
|
+
deivid-rodriguez
|
43
|
+
* Remove code that makes suggest_gems_from_name give worse results. Pull
|
44
|
+
request [#8083](https://github.com/rubygems/rubygems/pull/8083) by
|
45
|
+
duckinator
|
46
|
+
* Warning about PATH in `--user-install` mode is only necessary for gems
|
47
|
+
with executables. Pull request
|
48
|
+
[#8071](https://github.com/rubygems/rubygems/pull/8071) by
|
49
|
+
deivid-rodriguez
|
50
|
+
* Installs bundler 2.5.21 as a default gem.
|
51
|
+
|
52
|
+
## Bug fixes:
|
53
|
+
|
54
|
+
* Fix error in one source when fetching dependency APIs clearing results
|
55
|
+
from all sources. Pull request
|
56
|
+
[#8080](https://github.com/rubygems/rubygems/pull/8080) by
|
57
|
+
deivid-rodriguez
|
58
|
+
* Fix `gem cleanup` warning when two versions of psych installed. Pull
|
59
|
+
request [#8072](https://github.com/rubygems/rubygems/pull/8072) by
|
60
|
+
deivid-rodriguez
|
61
|
+
|
1
62
|
# 3.5.20 / 2024-09-24
|
2
63
|
|
3
64
|
## Enhancements:
|
data/bundler/CHANGELOG.md
CHANGED
@@ -1,3 +1,22 @@
|
|
1
|
+
# 2.5.22 (October 16, 2024)
|
2
|
+
|
3
|
+
## Enhancements:
|
4
|
+
|
5
|
+
- Update vendored `uri` and `net-http` [#8112](https://github.com/rubygems/rubygems/pull/8112)
|
6
|
+
|
7
|
+
## Bug fixes:
|
8
|
+
|
9
|
+
- Fix bundler sometimes crashing because of trying to use a version of psych compiled for a different Ruby [#8104](https://github.com/rubygems/rubygems/pull/8104)
|
10
|
+
|
11
|
+
# 2.5.21 (October 3, 2024)
|
12
|
+
|
13
|
+
## Bug fixes:
|
14
|
+
|
15
|
+
- Fix bug report template printed when changing a path source to a git source in frozen mode [#8079](https://github.com/rubygems/rubygems/pull/8079)
|
16
|
+
- Fix `stub.activated?` sometimes returning false after activation under bundler [#8073](https://github.com/rubygems/rubygems/pull/8073)
|
17
|
+
- Fix old cache format detection when application is not source controlled [#8076](https://github.com/rubygems/rubygems/pull/8076)
|
18
|
+
- Fix `bundler/inline` resetting ENV changes [#8059](https://github.com/rubygems/rubygems/pull/8059)
|
19
|
+
|
1
20
|
# 2.5.20 (September 24, 2024)
|
2
21
|
|
3
22
|
## Enhancements:
|
@@ -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-
|
8
|
-
@git_commit_sha = "
|
7
|
+
@built_at = "2024-10-16".freeze
|
8
|
+
@git_commit_sha = "342d4542fda".freeze
|
9
9
|
@release = true
|
10
10
|
# end ivars
|
11
11
|
|
data/bundler/lib/bundler/dsl.rb
CHANGED
@@ -589,21 +589,21 @@ module Bundler
|
|
589
589
|
|
590
590
|
trace_line = backtrace.find {|l| l.include?(dsl_path) } || trace_line
|
591
591
|
return m unless trace_line
|
592
|
-
|
593
|
-
return m unless
|
592
|
+
line_number = trace_line.split(":")[1].to_i - 1
|
593
|
+
return m unless line_number
|
594
594
|
|
595
595
|
lines = contents.lines.to_a
|
596
596
|
indent = " # "
|
597
597
|
indicator = indent.tr("#", ">")
|
598
|
-
first_line =
|
599
|
-
last_line = (
|
598
|
+
first_line = line_number.zero?
|
599
|
+
last_line = (line_number == (lines.count - 1))
|
600
600
|
|
601
601
|
m << "\n"
|
602
602
|
m << "#{indent}from #{trace_line.gsub(/:in.*$/, "")}\n"
|
603
603
|
m << "#{indent}-------------------------------------------\n"
|
604
|
-
m << "#{indent}#{lines[
|
605
|
-
m << "#{indicator}#{lines[
|
606
|
-
m << "#{indent}#{lines[
|
604
|
+
m << "#{indent}#{lines[line_number - 1]}" unless first_line
|
605
|
+
m << "#{indicator}#{lines[line_number]}"
|
606
|
+
m << "#{indent}#{lines[line_number + 1]}" unless last_line
|
607
607
|
m << "\n" unless m.end_with?("\n")
|
608
608
|
m << "#{indent}-------------------------------------------\n"
|
609
609
|
end
|
@@ -39,7 +39,11 @@ def gemfile(install = false, options = {}, &gemfile)
|
|
39
39
|
Bundler.ui = ui
|
40
40
|
raise ArgumentError, "Unknown options: #{opts.keys.join(", ")}" unless opts.empty?
|
41
41
|
|
42
|
-
|
42
|
+
old_gemfile = ENV["BUNDLE_GEMFILE"]
|
43
|
+
|
44
|
+
Bundler.unbundle_env!
|
45
|
+
|
46
|
+
begin
|
43
47
|
Bundler.instance_variable_set(:@bundle_path, Pathname.new(Gem.dir))
|
44
48
|
Bundler::SharedHelpers.set_env "BUNDLE_GEMFILE", "Gemfile"
|
45
49
|
|
@@ -80,9 +84,11 @@ def gemfile(install = false, options = {}, &gemfile)
|
|
80
84
|
|
81
85
|
runtime.require
|
82
86
|
end
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
+
ensure
|
88
|
+
if old_gemfile
|
89
|
+
ENV["BUNDLE_GEMFILE"] = old_gemfile
|
90
|
+
else
|
91
|
+
ENV["BUNDLE_GEMFILE"] = ""
|
92
|
+
end
|
87
93
|
end
|
88
94
|
end
|
@@ -221,7 +221,7 @@ module Bundler
|
|
221
221
|
|
222
222
|
requested_path_gems = @definition.requested_specs.select {|s| s.source.is_a?(Source::Path) }
|
223
223
|
path_plugin_files = requested_path_gems.map do |spec|
|
224
|
-
|
224
|
+
spec.matches_for_glob("rubygems_plugin#{Bundler.rubygems.suffix_pattern}")
|
225
225
|
rescue TypeError
|
226
226
|
error_message = "#{spec.name} #{spec.version} has an invalid gemspec"
|
227
227
|
raise Gem::InvalidSpecificationException, error_message
|
@@ -131,7 +131,7 @@ module Bundler
|
|
131
131
|
Bundler::Index.build do |index|
|
132
132
|
files.each do |file|
|
133
133
|
next unless spec = Bundler.load_gemspec(file)
|
134
|
-
|
134
|
+
spec.installed_by_version = Gem::VERSION
|
135
135
|
|
136
136
|
spec.source = self
|
137
137
|
Bundler.rubygems.validate(spec)
|
@@ -36,15 +36,14 @@ module Gem
|
|
36
36
|
remove_method :open_file_with_flock if Gem.respond_to?(:open_file_with_flock)
|
37
37
|
|
38
38
|
def open_file_with_flock(path, &block)
|
39
|
-
mode
|
39
|
+
# read-write mode is used rather than read-only in order to support NFS
|
40
|
+
mode = IO::RDWR | IO::APPEND | IO::CREAT | IO::BINARY
|
40
41
|
mode |= IO::SHARE_DELETE if IO.const_defined?(:SHARE_DELETE)
|
41
42
|
|
42
43
|
File.open(path, mode) do |io|
|
43
44
|
begin
|
44
45
|
io.flock(File::LOCK_EX)
|
45
46
|
rescue Errno::ENOSYS, Errno::ENOTSUP
|
46
|
-
rescue Errno::ENOLCK # NFS
|
47
|
-
raise unless Thread.main == Thread.current
|
48
47
|
end
|
49
48
|
yield io
|
50
49
|
end
|
@@ -267,6 +266,16 @@ module Gem
|
|
267
266
|
end
|
268
267
|
out
|
269
268
|
end
|
269
|
+
|
270
|
+
if Gem.rubygems_version < Gem::Version.new("3.5.22")
|
271
|
+
module FilterIgnoredSpecs
|
272
|
+
def matching_specs(platform_only = false)
|
273
|
+
super.reject(&:ignored?)
|
274
|
+
end
|
275
|
+
end
|
276
|
+
|
277
|
+
prepend FilterIgnoredSpecs
|
278
|
+
end
|
270
279
|
end
|
271
280
|
|
272
281
|
# Requirements using lambda operator differentiate trailing zeros since rubygems 3.2.6
|
@@ -389,6 +398,15 @@ module Gem
|
|
389
398
|
end
|
390
399
|
end
|
391
400
|
end
|
401
|
+
|
402
|
+
# Can be removed once RubyGems 3.5.22 support is dropped
|
403
|
+
unless new.respond_to?(:ignored?)
|
404
|
+
def ignored?
|
405
|
+
return @ignored unless @ignored.nil?
|
406
|
+
|
407
|
+
@ignored = missing_extensions?
|
408
|
+
end
|
409
|
+
end
|
392
410
|
end
|
393
411
|
|
394
412
|
require "rubygems/name_tuple"
|
@@ -57,28 +57,6 @@ module Bundler
|
|
57
57
|
nil
|
58
58
|
end
|
59
59
|
|
60
|
-
def set_installed_by_version(spec, installed_by_version = Gem::VERSION)
|
61
|
-
return unless spec.respond_to?(:installed_by_version=)
|
62
|
-
spec.installed_by_version = Gem::Version.create(installed_by_version)
|
63
|
-
end
|
64
|
-
|
65
|
-
def spec_missing_extensions?(spec, default = true)
|
66
|
-
return spec.missing_extensions? if spec.respond_to?(:missing_extensions?)
|
67
|
-
|
68
|
-
return false if spec.default_gem?
|
69
|
-
return false if spec.extensions.empty?
|
70
|
-
|
71
|
-
default
|
72
|
-
end
|
73
|
-
|
74
|
-
def spec_matches_for_glob(spec, glob)
|
75
|
-
return spec.matches_for_glob(glob) if spec.respond_to?(:matches_for_glob)
|
76
|
-
|
77
|
-
spec.load_paths.flat_map do |lp|
|
78
|
-
Dir["#{lp}/#{glob}#{suffix_pattern}"]
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
82
60
|
def stub_set_spec(stub, spec)
|
83
61
|
stub.instance_variable_set(:@spec, spec)
|
84
62
|
end
|
@@ -84,8 +84,10 @@ module Bundler
|
|
84
84
|
end
|
85
85
|
end
|
86
86
|
|
87
|
-
def
|
88
|
-
|
87
|
+
def not_a_repository?
|
88
|
+
_, status = git_null("rev-parse", "--resolve-git-dir", path.to_s, dir: path)
|
89
|
+
|
90
|
+
!status.success?
|
89
91
|
end
|
90
92
|
|
91
93
|
def contains?(commit)
|
@@ -191,7 +191,7 @@ module Bundler
|
|
191
191
|
set_up_app_cache!(app_cache_path) if use_app_cache?
|
192
192
|
|
193
193
|
if requires_checkout? && !@copied
|
194
|
-
FileUtils.rm_rf(app_cache_path) if use_app_cache? && git_proxy.
|
194
|
+
FileUtils.rm_rf(app_cache_path) if use_app_cache? && git_proxy.not_a_repository?
|
195
195
|
|
196
196
|
fetch
|
197
197
|
checkout
|
@@ -210,7 +210,7 @@ module Bundler
|
|
210
210
|
checkout
|
211
211
|
end
|
212
212
|
|
213
|
-
generate_bin_options = { disable_extensions: !
|
213
|
+
generate_bin_options = { disable_extensions: !spec.missing_extensions?, build_args: options[:build_args] }
|
214
214
|
generate_bin(spec, generate_bin_options)
|
215
215
|
|
216
216
|
requires_checkout? ? spec.post_install_message : nil
|
@@ -299,7 +299,7 @@ module Bundler
|
|
299
299
|
# The gemspecs we cache should already be evaluated.
|
300
300
|
spec = Bundler.load_gemspec(spec_path)
|
301
301
|
next unless spec
|
302
|
-
|
302
|
+
spec.installed_by_version = Gem::VERSION
|
303
303
|
Bundler.rubygems.validate(spec)
|
304
304
|
File.open(spec_path, "wb") {|file| file.write(spec.to_ruby) }
|
305
305
|
end
|
@@ -53,6 +53,8 @@ module Bundler
|
|
53
53
|
"source at `#{@path}`"
|
54
54
|
end
|
55
55
|
|
56
|
+
alias_method :to_gemfile, :path
|
57
|
+
|
56
58
|
def hash
|
57
59
|
[self.class, expanded_path, version].hash
|
58
60
|
end
|
@@ -148,7 +150,7 @@ module Bundler
|
|
148
150
|
|
149
151
|
def load_gemspec(file)
|
150
152
|
return unless spec = Bundler.load_gemspec(file)
|
151
|
-
|
153
|
+
spec.installed_by_version = Gem::VERSION
|
152
154
|
spec
|
153
155
|
end
|
154
156
|
|
@@ -357,10 +357,7 @@ module Bundler
|
|
357
357
|
@installed_specs ||= Index.build do |idx|
|
358
358
|
Bundler.rubygems.installed_specs.reverse_each do |spec|
|
359
359
|
spec.source = self
|
360
|
-
if
|
361
|
-
Bundler.ui.debug "Source #{self} is ignoring #{spec} because it is missing extensions"
|
362
|
-
next
|
363
|
-
end
|
360
|
+
next if spec.ignored?
|
364
361
|
idx << spec
|
365
362
|
end
|
366
363
|
end
|
@@ -28,6 +28,17 @@ module Bundler
|
|
28
28
|
|
29
29
|
# @!group Stub Delegates
|
30
30
|
|
31
|
+
def ignored?
|
32
|
+
return @ignored unless @ignored.nil?
|
33
|
+
|
34
|
+
@ignored = missing_extensions?
|
35
|
+
return false unless @ignored
|
36
|
+
|
37
|
+
warn "Source #{source} is ignoring #{self} because it is missing extensions"
|
38
|
+
|
39
|
+
true
|
40
|
+
end
|
41
|
+
|
31
42
|
def manually_installed?
|
32
43
|
# This is for manually installed gems which are gems that were fixed in place after a
|
33
44
|
# failed installation. Once the issue was resolved, the user then manually created
|
@@ -45,8 +56,8 @@ module Bundler
|
|
45
56
|
true
|
46
57
|
end
|
47
58
|
|
48
|
-
def activated
|
49
|
-
stub.activated
|
59
|
+
def activated?
|
60
|
+
stub.activated?
|
50
61
|
end
|
51
62
|
|
52
63
|
def activated=(activated)
|
@@ -68,6 +68,8 @@ autoload :OpenSSL, 'openssl'
|
|
68
68
|
# #verify_callback :: For server certificate verification
|
69
69
|
# #verify_depth :: Depth of certificate verification
|
70
70
|
# #verify_mode :: How connections should be verified
|
71
|
+
# #verify_hostname :: Use hostname verification for server certificate
|
72
|
+
# during the handshake
|
71
73
|
#
|
72
74
|
# == Proxies
|
73
75
|
#
|
@@ -174,7 +176,7 @@ class Gem::Net::HTTP::Persistent
|
|
174
176
|
##
|
175
177
|
# The version of Gem::Net::HTTP::Persistent you are using
|
176
178
|
|
177
|
-
VERSION = '4.0.
|
179
|
+
VERSION = '4.0.4'
|
178
180
|
|
179
181
|
##
|
180
182
|
# Error class for errors raised by Gem::Net::HTTP::Persistent. Various
|
@@ -449,6 +451,21 @@ class Gem::Net::HTTP::Persistent
|
|
449
451
|
|
450
452
|
attr_reader :verify_mode
|
451
453
|
|
454
|
+
##
|
455
|
+
# HTTPS verify_hostname.
|
456
|
+
#
|
457
|
+
# If a client sets this to true and enables SNI with SSLSocket#hostname=,
|
458
|
+
# the hostname verification on the server certificate is performed
|
459
|
+
# automatically during the handshake using
|
460
|
+
# OpenSSL::SSL.verify_certificate_identity().
|
461
|
+
#
|
462
|
+
# You can set +verify_hostname+ as true to use hostname verification
|
463
|
+
# during the handshake.
|
464
|
+
#
|
465
|
+
# NOTE: This works with Ruby > 3.0.
|
466
|
+
|
467
|
+
attr_reader :verify_hostname
|
468
|
+
|
452
469
|
##
|
453
470
|
# Creates a new Gem::Net::HTTP::Persistent.
|
454
471
|
#
|
@@ -508,6 +525,7 @@ class Gem::Net::HTTP::Persistent
|
|
508
525
|
@verify_callback = nil
|
509
526
|
@verify_depth = nil
|
510
527
|
@verify_mode = nil
|
528
|
+
@verify_hostname = nil
|
511
529
|
@cert_store = nil
|
512
530
|
|
513
531
|
@generation = 0 # incremented when proxy Gem::URI changes
|
@@ -607,13 +625,23 @@ class Gem::Net::HTTP::Persistent
|
|
607
625
|
|
608
626
|
return yield connection
|
609
627
|
rescue Errno::ECONNREFUSED
|
610
|
-
|
611
|
-
|
628
|
+
if http.proxy?
|
629
|
+
address = http.proxy_address
|
630
|
+
port = http.proxy_port
|
631
|
+
else
|
632
|
+
address = http.address
|
633
|
+
port = http.port
|
634
|
+
end
|
612
635
|
|
613
636
|
raise Error, "connection refused: #{address}:#{port}"
|
614
637
|
rescue Errno::EHOSTDOWN
|
615
|
-
|
616
|
-
|
638
|
+
if http.proxy?
|
639
|
+
address = http.proxy_address
|
640
|
+
port = http.proxy_port
|
641
|
+
else
|
642
|
+
address = http.address
|
643
|
+
port = http.port
|
644
|
+
end
|
617
645
|
|
618
646
|
raise Error, "host down: #{address}:#{port}"
|
619
647
|
ensure
|
@@ -948,8 +976,10 @@ class Gem::Net::HTTP::Persistent
|
|
948
976
|
connection.min_version = @min_version if @min_version
|
949
977
|
connection.max_version = @max_version if @max_version
|
950
978
|
|
951
|
-
connection.verify_depth
|
952
|
-
connection.verify_mode
|
979
|
+
connection.verify_depth = @verify_depth
|
980
|
+
connection.verify_mode = @verify_mode
|
981
|
+
connection.verify_hostname = @verify_hostname if
|
982
|
+
@verify_hostname != nil && connection.respond_to?(:verify_hostname=)
|
953
983
|
|
954
984
|
if OpenSSL::SSL::VERIFY_PEER == OpenSSL::SSL::VERIFY_NONE and
|
955
985
|
not Object.const_defined?(:I_KNOW_THAT_OPENSSL_VERIFY_PEER_EQUALS_VERIFY_NONE_IS_WRONG) then
|
@@ -1058,6 +1088,15 @@ application:
|
|
1058
1088
|
reconnect_ssl
|
1059
1089
|
end
|
1060
1090
|
|
1091
|
+
##
|
1092
|
+
# Sets the HTTPS verify_hostname.
|
1093
|
+
|
1094
|
+
def verify_hostname= verify_hostname
|
1095
|
+
@verify_hostname = verify_hostname
|
1096
|
+
|
1097
|
+
reconnect_ssl
|
1098
|
+
end
|
1099
|
+
|
1061
1100
|
##
|
1062
1101
|
# SSL verification callback.
|
1063
1102
|
|
@@ -1070,4 +1109,3 @@ end
|
|
1070
1109
|
|
1071
1110
|
require_relative 'persistent/connection'
|
1072
1111
|
require_relative 'persistent/pool'
|
1073
|
-
|
@@ -19,6 +19,8 @@ module Bundler::URI
|
|
19
19
|
Parser = RFC2396_Parser
|
20
20
|
RFC3986_PARSER = RFC3986_Parser.new
|
21
21
|
Ractor.make_shareable(RFC3986_PARSER) if defined?(Ractor)
|
22
|
+
RFC2396_PARSER = RFC2396_Parser.new
|
23
|
+
Ractor.make_shareable(RFC2396_PARSER) if defined?(Ractor)
|
22
24
|
|
23
25
|
# Bundler::URI::Parser.new
|
24
26
|
DEFAULT_PARSER = Parser.new
|
data/bundler/lib/bundler.rb
CHANGED
@@ -383,28 +383,12 @@ module Bundler
|
|
383
383
|
|
384
384
|
# @return [Hash] Environment with all bundler-related variables removed
|
385
385
|
def unbundled_env
|
386
|
-
|
387
|
-
|
388
|
-
if env.key?("BUNDLER_ORIG_MANPATH")
|
389
|
-
env["MANPATH"] = env["BUNDLER_ORIG_MANPATH"]
|
390
|
-
end
|
391
|
-
|
392
|
-
env.delete_if {|k, _| k[0, 7] == "BUNDLE_" }
|
393
|
-
|
394
|
-
if env.key?("RUBYOPT")
|
395
|
-
rubyopt = env["RUBYOPT"].split(" ")
|
396
|
-
rubyopt.delete("-r#{File.expand_path("bundler/setup", __dir__)}")
|
397
|
-
rubyopt.delete("-rbundler/setup")
|
398
|
-
env["RUBYOPT"] = rubyopt.join(" ")
|
399
|
-
end
|
400
|
-
|
401
|
-
if env.key?("RUBYLIB")
|
402
|
-
rubylib = env["RUBYLIB"].split(File::PATH_SEPARATOR)
|
403
|
-
rubylib.delete(__dir__)
|
404
|
-
env["RUBYLIB"] = rubylib.join(File::PATH_SEPARATOR)
|
405
|
-
end
|
386
|
+
unbundle_env(original_env)
|
387
|
+
end
|
406
388
|
|
407
|
-
|
389
|
+
# Remove all bundler-related variables from ENV
|
390
|
+
def unbundle_env!
|
391
|
+
ENV.replace(unbundle_env(ENV))
|
408
392
|
end
|
409
393
|
|
410
394
|
# Run block with environment present before Bundler was activated
|
@@ -633,6 +617,30 @@ module Bundler
|
|
633
617
|
|
634
618
|
private
|
635
619
|
|
620
|
+
def unbundle_env(env)
|
621
|
+
if env.key?("BUNDLER_ORIG_MANPATH")
|
622
|
+
env["MANPATH"] = env["BUNDLER_ORIG_MANPATH"]
|
623
|
+
end
|
624
|
+
|
625
|
+
env.delete_if {|k, _| k[0, 7] == "BUNDLE_" }
|
626
|
+
env.delete("BUNDLER_SETUP")
|
627
|
+
|
628
|
+
if env.key?("RUBYOPT")
|
629
|
+
rubyopt = env["RUBYOPT"].split(" ")
|
630
|
+
rubyopt.delete("-r#{File.expand_path("bundler/setup", __dir__)}")
|
631
|
+
rubyopt.delete("-rbundler/setup")
|
632
|
+
env["RUBYOPT"] = rubyopt.join(" ")
|
633
|
+
end
|
634
|
+
|
635
|
+
if env.key?("RUBYLIB")
|
636
|
+
rubylib = env["RUBYLIB"].split(File::PATH_SEPARATOR)
|
637
|
+
rubylib.delete(__dir__)
|
638
|
+
env["RUBYLIB"] = rubylib.join(File::PATH_SEPARATOR)
|
639
|
+
end
|
640
|
+
|
641
|
+
env
|
642
|
+
end
|
643
|
+
|
636
644
|
def load_marshal(data, marshal_proc: nil)
|
637
645
|
Marshal.load(data, marshal_proc)
|
638
646
|
rescue TypeError => e
|
@@ -71,11 +71,7 @@ class Gem::BasicSpecification
|
|
71
71
|
# Return true if this spec can require +file+.
|
72
72
|
|
73
73
|
def contains_requirable_file?(file)
|
74
|
-
if
|
75
|
-
return false
|
76
|
-
elsif missing_extensions?
|
77
|
-
@ignored = true
|
78
|
-
|
74
|
+
if ignored?
|
79
75
|
if platform == Gem::Platform::RUBY || Gem::Platform.local === platform
|
80
76
|
warn "Ignoring #{full_name} because its extensions are not built. " \
|
81
77
|
"Try: gem pristine #{name} --version #{version}"
|
@@ -93,8 +89,17 @@ class Gem::BasicSpecification
|
|
93
89
|
end
|
94
90
|
end
|
95
91
|
|
92
|
+
##
|
93
|
+
# Return true if this spec should be ignored because it's missing extensions.
|
94
|
+
|
95
|
+
def ignored?
|
96
|
+
return @ignored unless @ignored.nil?
|
97
|
+
|
98
|
+
@ignored = missing_extensions?
|
99
|
+
end
|
100
|
+
|
96
101
|
def default_gem?
|
97
|
-
loaded_from &&
|
102
|
+
!loaded_from.nil? &&
|
98
103
|
File.dirname(loaded_from) == Gem.default_specifications_dir
|
99
104
|
end
|
100
105
|
|
@@ -230,18 +230,16 @@ class Gem::CommandManager
|
|
230
230
|
def load_and_instantiate(command_name)
|
231
231
|
command_name = command_name.to_s
|
232
232
|
const_name = command_name.capitalize.gsub(/_(.)/) { $1.upcase } << "Command"
|
233
|
-
load_error = nil
|
234
233
|
|
235
234
|
begin
|
236
235
|
begin
|
237
236
|
require "rubygems/commands/#{command_name}_command"
|
238
|
-
rescue LoadError
|
239
|
-
|
237
|
+
rescue LoadError
|
238
|
+
# it may have been defined from a rubygems_plugin.rb file
|
240
239
|
end
|
240
|
+
|
241
241
|
Gem::Commands.const_get(const_name).new
|
242
242
|
rescue StandardError => e
|
243
|
-
e = load_error if load_error
|
244
|
-
|
245
243
|
alert_error clean_text("Loading command: #{command_name} (#{e.class})\n\t#{e}")
|
246
244
|
ui.backtrace e
|
247
245
|
end
|
@@ -38,8 +38,6 @@ class Gem::Commands::CleanupCommand < Gem::Command
|
|
38
38
|
@default_gems = []
|
39
39
|
@full = nil
|
40
40
|
@gems_to_cleanup = nil
|
41
|
-
@original_home = nil
|
42
|
-
@original_path = nil
|
43
41
|
@primary_gems = nil
|
44
42
|
end
|
45
43
|
|
@@ -95,9 +93,6 @@ If no gems are named all gems in GEM_HOME are cleaned.
|
|
95
93
|
end
|
96
94
|
|
97
95
|
def clean_gems
|
98
|
-
@original_home = Gem.dir
|
99
|
-
@original_path = Gem.path
|
100
|
-
|
101
96
|
get_primary_gems
|
102
97
|
get_candidate_gems
|
103
98
|
get_gems_to_cleanup
|
@@ -112,8 +107,6 @@ If no gems are named all gems in GEM_HOME are cleaned.
|
|
112
107
|
deps.reverse_each do |spec|
|
113
108
|
uninstall_dep spec
|
114
109
|
end
|
115
|
-
|
116
|
-
Gem::Specification.reset
|
117
110
|
end
|
118
111
|
|
119
112
|
def get_candidate_gems
|
@@ -133,7 +126,7 @@ If no gems are named all gems in GEM_HOME are cleaned.
|
|
133
126
|
|
134
127
|
default_gems, gems_to_cleanup = gems_to_cleanup.partition(&:default_gem?)
|
135
128
|
|
136
|
-
uninstall_from = options[:user_install] ? Gem.user_dir :
|
129
|
+
uninstall_from = options[:user_install] ? Gem.user_dir : Gem.dir
|
137
130
|
|
138
131
|
gems_to_cleanup = gems_to_cleanup.select do |spec|
|
139
132
|
spec.base_dir == uninstall_from
|
@@ -181,8 +174,5 @@ If no gems are named all gems in GEM_HOME are cleaned.
|
|
181
174
|
say "Unable to uninstall #{spec.full_name}:"
|
182
175
|
say "\t#{e.class}: #{e.message}"
|
183
176
|
end
|
184
|
-
ensure
|
185
|
-
# Restore path Gem::Uninstaller may have changed
|
186
|
-
Gem.use_paths @original_home, *@original_path
|
187
177
|
end
|
188
178
|
end
|
@@ -103,16 +103,23 @@ prefix or only the files that are requireable.
|
|
103
103
|
|
104
104
|
def files_in_default_gem(spec)
|
105
105
|
spec.files.map do |file|
|
106
|
-
|
107
|
-
|
108
|
-
# $' is POSTMATCH
|
109
|
-
[RbConfig::CONFIG["bindir"], $']
|
110
|
-
when /\.so\z/
|
111
|
-
[RbConfig::CONFIG["archdir"], file]
|
106
|
+
if file.start_with?("#{spec.bindir}/")
|
107
|
+
[RbConfig::CONFIG["bindir"], file.delete_prefix("#{spec.bindir}/")]
|
112
108
|
else
|
113
|
-
|
109
|
+
gem spec.name, spec.version
|
110
|
+
|
111
|
+
require_path = spec.require_paths.find do |path|
|
112
|
+
file.start_with?("#{path}/")
|
113
|
+
end
|
114
|
+
|
115
|
+
requirable_part = file.delete_prefix("#{require_path}/")
|
116
|
+
|
117
|
+
resolve = $LOAD_PATH.resolve_feature_path(requirable_part)&.last
|
118
|
+
next unless resolve
|
119
|
+
|
120
|
+
[resolve.delete_suffix(requirable_part), requirable_part]
|
114
121
|
end
|
115
|
-
end
|
122
|
+
end.compact
|
116
123
|
end
|
117
124
|
|
118
125
|
def gem_contents(name)
|
@@ -134,10 +134,14 @@ extensions will be restored.
|
|
134
134
|
|
135
135
|
say "Restoring gems to pristine condition..."
|
136
136
|
|
137
|
-
specs.each do |
|
138
|
-
|
139
|
-
|
140
|
-
|
137
|
+
specs.group_by(&:full_name_with_location).values.each do |grouped_specs|
|
138
|
+
spec = grouped_specs.find {|s| !s.default_gem? } || grouped_specs.first
|
139
|
+
|
140
|
+
unless only_executables_or_plugins?
|
141
|
+
# Default gemspecs include changes provided by ruby-core installer that
|
142
|
+
# can't currently be pristined (inclusion of compiled extension targets in
|
143
|
+
# the file list). So stick to resetting executables if it's a default gem.
|
144
|
+
options[:only_executables] = true if spec.default_gem?
|
141
145
|
end
|
142
146
|
|
143
147
|
if options.key? :skip
|
@@ -147,14 +151,14 @@ extensions will be restored.
|
|
147
151
|
end
|
148
152
|
end
|
149
153
|
|
150
|
-
unless spec.extensions.empty? || options[:extensions] ||
|
154
|
+
unless spec.extensions.empty? || options[:extensions] || only_executables_or_plugins?
|
151
155
|
say "Skipped #{spec.full_name_with_location}, it needs to compile an extension"
|
152
156
|
next
|
153
157
|
end
|
154
158
|
|
155
159
|
gem = spec.cache_file
|
156
160
|
|
157
|
-
unless File.exist?(gem) ||
|
161
|
+
unless File.exist?(gem) || only_executables_or_plugins?
|
158
162
|
require_relative "../remote_fetcher"
|
159
163
|
|
160
164
|
say "Cached gem for #{spec.full_name_with_location} not found, attempting to fetch..."
|
@@ -204,4 +208,10 @@ extensions will be restored.
|
|
204
208
|
say "Restored #{spec.full_name_with_location}"
|
205
209
|
end
|
206
210
|
end
|
211
|
+
|
212
|
+
private
|
213
|
+
|
214
|
+
def only_executables_or_plugins?
|
215
|
+
options[:only_executables] || options[:only_plugins]
|
216
|
+
end
|
207
217
|
end
|
data/lib/rubygems/dependency.rb
CHANGED
data/lib/rubygems/errors.rb
CHANGED
@@ -30,6 +30,7 @@ module Gem
|
|
30
30
|
@name = name
|
31
31
|
@requirement = requirement
|
32
32
|
@extra_message = extra_message
|
33
|
+
super(message)
|
33
34
|
end
|
34
35
|
|
35
36
|
def message # :nodoc:
|
@@ -53,8 +54,8 @@ module Gem
|
|
53
54
|
attr_reader :specs
|
54
55
|
|
55
56
|
def initialize(name, requirement, specs)
|
56
|
-
super(name, requirement)
|
57
57
|
@specs = specs
|
58
|
+
super(name, requirement)
|
58
59
|
end
|
59
60
|
|
60
61
|
private
|
data/lib/rubygems/installer.rb
CHANGED
@@ -66,8 +66,6 @@ class Gem::Installer
|
|
66
66
|
|
67
67
|
attr_reader :package
|
68
68
|
|
69
|
-
@path_warning = false
|
70
|
-
|
71
69
|
class << self
|
72
70
|
#
|
73
71
|
# Changes in rubygems to lazily loading `rubygems/command` (in order to
|
@@ -86,11 +84,6 @@ class Gem::Installer
|
|
86
84
|
super(klass)
|
87
85
|
end
|
88
86
|
|
89
|
-
##
|
90
|
-
# True if we've warned about PATH not including Gem.bindir
|
91
|
-
|
92
|
-
attr_accessor :path_warning
|
93
|
-
|
94
87
|
##
|
95
88
|
# Overrides the executable format.
|
96
89
|
#
|
@@ -188,15 +181,6 @@ class Gem::Installer
|
|
188
181
|
@package.dir_mode = options[:dir_mode]
|
189
182
|
@package.prog_mode = options[:prog_mode]
|
190
183
|
@package.data_mode = options[:data_mode]
|
191
|
-
|
192
|
-
if @gem_home == Gem.user_dir
|
193
|
-
# If we get here, then one of the following likely happened:
|
194
|
-
# - `--user-install` was specified
|
195
|
-
# - `Gem::PathSupport#home` fell back to `Gem.user_dir`
|
196
|
-
# - GEM_HOME was manually set to `Gem.user_dir`
|
197
|
-
|
198
|
-
check_that_user_bin_dir_is_in_path
|
199
|
-
end
|
200
184
|
end
|
201
185
|
|
202
186
|
##
|
@@ -488,11 +472,21 @@ class Gem::Installer
|
|
488
472
|
end
|
489
473
|
|
490
474
|
def generate_bin # :nodoc:
|
491
|
-
|
475
|
+
executables = spec.executables
|
476
|
+
return if executables.nil? || executables.empty?
|
477
|
+
|
478
|
+
if @gem_home == Gem.user_dir
|
479
|
+
# If we get here, then one of the following likely happened:
|
480
|
+
# - `--user-install` was specified
|
481
|
+
# - `Gem::PathSupport#home` fell back to `Gem.user_dir`
|
482
|
+
# - GEM_HOME was manually set to `Gem.user_dir`
|
483
|
+
|
484
|
+
check_that_user_bin_dir_is_in_path(executables)
|
485
|
+
end
|
492
486
|
|
493
487
|
ensure_writable_dir @bin_dir
|
494
488
|
|
495
|
-
|
489
|
+
executables.each do |filename|
|
496
490
|
bin_path = File.join gem_dir, spec.bindir, filename
|
497
491
|
next unless File.exist? bin_path
|
498
492
|
|
@@ -694,9 +688,7 @@ class Gem::Installer
|
|
694
688
|
end
|
695
689
|
end
|
696
690
|
|
697
|
-
def check_that_user_bin_dir_is_in_path # :nodoc:
|
698
|
-
return if self.class.path_warning
|
699
|
-
|
691
|
+
def check_that_user_bin_dir_is_in_path(executables) # :nodoc:
|
700
692
|
user_bin_dir = @bin_dir || Gem.bindir(gem_home)
|
701
693
|
user_bin_dir = user_bin_dir.tr(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR
|
702
694
|
|
@@ -712,8 +704,7 @@ class Gem::Installer
|
|
712
704
|
|
713
705
|
unless path.include? user_bin_dir
|
714
706
|
unless !Gem.win_platform? && (path.include? user_bin_dir.sub(ENV["HOME"], "~"))
|
715
|
-
alert_warning "You don't have #{user_bin_dir} in your PATH,\n\t gem executables will not run."
|
716
|
-
self.class.path_warning = true
|
707
|
+
alert_warning "You don't have #{user_bin_dir} in your PATH,\n\t gem executables (#{executables.join(", ")}) will not run."
|
717
708
|
end
|
718
709
|
end
|
719
710
|
end
|
@@ -104,16 +104,21 @@ class Gem::Resolver::APISet < Gem::Resolver::Set
|
|
104
104
|
end
|
105
105
|
|
106
106
|
uri = @dep_uri + name
|
107
|
-
str = Gem::RemoteFetcher.fetcher.fetch_path uri
|
108
107
|
|
109
|
-
|
110
|
-
|
108
|
+
begin
|
109
|
+
str = Gem::RemoteFetcher.fetcher.fetch_path uri
|
110
|
+
rescue Gem::RemoteFetcher::FetchError
|
111
|
+
@data[name] = []
|
112
|
+
else
|
113
|
+
lines(str).each do |ver|
|
114
|
+
number, platform, dependencies, requirements = parse_gem(ver)
|
111
115
|
|
112
|
-
|
113
|
-
|
114
|
-
|
116
|
+
platform ||= "ruby"
|
117
|
+
dependencies = dependencies.map {|dep_name, reqs| [dep_name, reqs.join(", ")] }
|
118
|
+
requirements = requirements.map {|req_name, reqs| [req_name.to_sym, reqs] }.to_h
|
115
119
|
|
116
|
-
|
120
|
+
@data[name] << { name: name, number: number, platform: platform, dependencies: dependencies, requirements: requirements }
|
121
|
+
end
|
117
122
|
end
|
118
123
|
|
119
124
|
@data[name]
|
@@ -176,19 +176,12 @@ class Gem::SpecFetcher
|
|
176
176
|
|
177
177
|
matches = names.map do |n|
|
178
178
|
next unless n.match_platform?
|
179
|
-
|
179
|
+
distance = levenshtein_distance gem_name, n.name.downcase.tr("_-", "")
|
180
|
+
next if distance >= max
|
181
|
+
return [n.name] if distance == 0
|
182
|
+
[n.name, distance]
|
180
183
|
end.compact
|
181
184
|
|
182
|
-
if matches.length < num_results
|
183
|
-
matches += names.map do |n|
|
184
|
-
next unless n.match_platform?
|
185
|
-
distance = levenshtein_distance gem_name, n.name.downcase.tr("_-", "")
|
186
|
-
next if distance >= max
|
187
|
-
return [n.name] if distance == 0
|
188
|
-
[n.name, distance]
|
189
|
-
end.compact
|
190
|
-
end
|
191
|
-
|
192
185
|
matches = if matches.empty? && type != :prerelease
|
193
186
|
suggest_gems_from_name gem_name, :prerelease
|
194
187
|
else
|
@@ -1208,7 +1208,7 @@ class Gem::Specification < Gem::BasicSpecification
|
|
1208
1208
|
unresolved.values.each do |dep|
|
1209
1209
|
warn " #{dep}"
|
1210
1210
|
|
1211
|
-
versions = find_all_by_name(dep.name)
|
1211
|
+
versions = find_all_by_name(dep.name).uniq(&:full_name)
|
1212
1212
|
unless versions.empty?
|
1213
1213
|
warn " Available/installed versions of this gem:"
|
1214
1214
|
versions.each {|s| warn " - #{s.version}" }
|
@@ -1412,7 +1412,7 @@ class Gem::Specification < Gem::BasicSpecification
|
|
1412
1412
|
end
|
1413
1413
|
|
1414
1414
|
begin
|
1415
|
-
specs = spec_dep.to_specs
|
1415
|
+
specs = spec_dep.to_specs.uniq(&:full_name)
|
1416
1416
|
rescue Gem::MissingSpecError => e
|
1417
1417
|
raise Gem::MissingSpecError.new(e.name, e.requirement, "at: #{spec_file}")
|
1418
1418
|
end
|
@@ -2470,7 +2470,7 @@ class Gem::Specification < Gem::BasicSpecification
|
|
2470
2470
|
|
2471
2471
|
if @installed_by_version
|
2472
2472
|
result << nil
|
2473
|
-
result << " s.installed_by_version = #{ruby_code Gem::VERSION}
|
2473
|
+
result << " s.installed_by_version = #{ruby_code Gem::VERSION}"
|
2474
2474
|
end
|
2475
2475
|
|
2476
2476
|
unless dependencies.empty?
|
@@ -83,11 +83,7 @@ class Gem::StubSpecification < Gem::BasicSpecification
|
|
83
83
|
# True when this gem has been activated
|
84
84
|
|
85
85
|
def activated?
|
86
|
-
@activated ||=
|
87
|
-
begin
|
88
|
-
loaded = Gem.loaded_specs[name]
|
89
|
-
loaded && loaded.version == version
|
90
|
-
end
|
86
|
+
@activated ||= !loaded_spec.nil?
|
91
87
|
end
|
92
88
|
|
93
89
|
def default_gem?
|
@@ -187,11 +183,7 @@ class Gem::StubSpecification < Gem::BasicSpecification
|
|
187
183
|
# The full Gem::Specification for this gem, loaded from evalling its gemspec
|
188
184
|
|
189
185
|
def spec
|
190
|
-
@spec ||= if @data
|
191
|
-
loaded = Gem.loaded_specs[name]
|
192
|
-
loaded if loaded && loaded.version == version
|
193
|
-
end
|
194
|
-
|
186
|
+
@spec ||= loaded_spec if @data
|
195
187
|
@spec ||= Gem::Specification.load(loaded_from)
|
196
188
|
end
|
197
189
|
alias_method :to_spec, :spec
|
@@ -231,4 +223,13 @@ class Gem::StubSpecification < Gem::BasicSpecification
|
|
231
223
|
def sort_obj # :nodoc:
|
232
224
|
[name, version, Gem::Platform.sort_priority(platform)]
|
233
225
|
end
|
226
|
+
|
227
|
+
private
|
228
|
+
|
229
|
+
def loaded_spec
|
230
|
+
spec = Gem.loaded_specs[name]
|
231
|
+
return unless spec && spec.version == version && spec.default_gem? == default_gem?
|
232
|
+
|
233
|
+
spec
|
234
|
+
end
|
234
235
|
end
|
@@ -19,6 +19,8 @@ module Gem::URI
|
|
19
19
|
Parser = RFC2396_Parser
|
20
20
|
RFC3986_PARSER = RFC3986_Parser.new
|
21
21
|
Ractor.make_shareable(RFC3986_PARSER) if defined?(Ractor)
|
22
|
+
RFC2396_PARSER = RFC2396_Parser.new
|
23
|
+
Ractor.make_shareable(RFC2396_PARSER) if defined?(Ractor)
|
22
24
|
|
23
25
|
# Gem::URI::Parser.new
|
24
26
|
DEFAULT_PARSER = Parser.new
|
data/lib/rubygems.rb
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
require "rbconfig"
|
10
10
|
|
11
11
|
module Gem
|
12
|
-
VERSION = "3.5.
|
12
|
+
VERSION = "3.5.22"
|
13
13
|
end
|
14
14
|
|
15
15
|
# Must be first since it unloads the prelude from 1.9.2
|
@@ -788,15 +788,14 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
788
788
|
# Open a file with given flags, and protect access with flock
|
789
789
|
|
790
790
|
def self.open_file_with_flock(path, &block)
|
791
|
-
mode
|
791
|
+
# read-write mode is used rather than read-only in order to support NFS
|
792
|
+
mode = IO::RDWR | IO::APPEND | IO::CREAT | IO::BINARY
|
792
793
|
mode |= IO::SHARE_DELETE if IO.const_defined?(:SHARE_DELETE)
|
793
794
|
|
794
795
|
File.open(path, mode) do |io|
|
795
796
|
begin
|
796
797
|
io.flock(File::LOCK_EX)
|
797
798
|
rescue Errno::ENOSYS, Errno::ENOTSUP
|
798
|
-
rescue Errno::ENOLCK # NFS
|
799
|
-
raise unless Thread.main == Thread.current
|
800
799
|
end
|
801
800
|
yield io
|
802
801
|
end
|
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.
|
5
|
+
s.version = "3.5.22"
|
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.
|
4
|
+
version: 3.5.22
|
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-
|
19
|
+
date: 2024-10-16 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
|
@@ -737,7 +737,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
737
737
|
- !ruby/object:Gem::Version
|
738
738
|
version: '0'
|
739
739
|
requirements: []
|
740
|
-
rubygems_version: 3.5.
|
740
|
+
rubygems_version: 3.5.22
|
741
741
|
signing_key:
|
742
742
|
specification_version: 4
|
743
743
|
summary: RubyGems is a package management framework for Ruby. This gem is downloaded
|