rubygems-update 3.3.22 → 3.3.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +25 -0
- data/Manifest.txt +1 -1
- data/POLICIES.md +38 -5
- data/bundler/CHANGELOG.md +29 -0
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli/init.rb +5 -1
- data/bundler/lib/bundler/definition.rb +12 -40
- data/bundler/lib/bundler/dsl.rb +0 -1
- data/bundler/lib/bundler/endpoint_specification.rb +4 -0
- data/bundler/lib/bundler/gem_helpers.rb +0 -1
- data/bundler/lib/bundler/gem_version_promoter.rb +6 -7
- data/bundler/lib/bundler/index.rb +3 -27
- data/bundler/lib/bundler/injector.rb +1 -1
- data/bundler/lib/bundler/lazy_specification.rb +7 -11
- data/bundler/lib/bundler/remote_specification.rb +6 -2
- data/bundler/lib/bundler/resolver/base.rb +1 -1
- data/bundler/lib/bundler/resolver/spec_group.rb +22 -44
- data/bundler/lib/bundler/resolver.rb +31 -76
- data/bundler/lib/bundler/rubygems_ext.rb +12 -1
- data/bundler/lib/bundler/shared_helpers.rb +1 -2
- data/bundler/lib/bundler/spec_set.rb +1 -1
- data/bundler/lib/bundler/templates/newgem/gitlab-ci.yml.tt +5 -4
- data/bundler/lib/bundler/version.rb +1 -1
- data/bundler/lib/bundler.rb +0 -1
- data/lib/rubygems/gemcutter_utilities.rb +8 -1
- data/lib/rubygems/package.rb +9 -4
- data/lib/rubygems/platform.rb +17 -1
- data/lib/rubygems/resolver.rb +1 -1
- data/lib/rubygems.rb +1 -1
- data/rubygems-update.gemspec +1 -1
- data/test/rubygems/alternate_cert.pem +14 -14
- data/test/rubygems/alternate_cert_32.pem +15 -15
- data/test/rubygems/alternate_key.pem +25 -25
- data/test/rubygems/child_cert.pem +15 -16
- data/test/rubygems/child_cert_32.pem +15 -16
- data/test/rubygems/child_key.pem +25 -25
- data/test/rubygems/encrypted_private_key.pem +26 -26
- data/test/rubygems/expired_cert.pem +15 -15
- data/test/rubygems/future_cert.pem +15 -15
- data/test/rubygems/future_cert_32.pem +15 -15
- data/test/rubygems/grandchild_cert.pem +15 -16
- data/test/rubygems/grandchild_cert_32.pem +15 -16
- data/test/rubygems/grandchild_key.pem +25 -25
- data/test/rubygems/helper.rb +23 -17
- data/test/rubygems/invalid_issuer_cert.pem +16 -16
- data/test/rubygems/invalid_issuer_cert_32.pem +16 -16
- data/test/rubygems/invalid_key.pem +25 -25
- data/test/rubygems/invalid_signer_cert.pem +15 -15
- data/test/rubygems/invalid_signer_cert_32.pem +15 -15
- data/test/rubygems/invalidchild_cert.pem +15 -16
- data/test/rubygems/invalidchild_cert_32.pem +15 -16
- data/test/rubygems/invalidchild_key.pem +25 -25
- data/test/rubygems/packages/Bluebie-legs-0.6.2.gem +0 -0
- data/test/rubygems/private_key.pem +25 -25
- data/test/rubygems/public_cert.pem +16 -16
- data/test/rubygems/public_cert_32.pem +15 -15
- data/test/rubygems/public_key.pem +7 -7
- data/test/rubygems/test_gem.rb +254 -212
- data/test/rubygems/test_gem_commands_owner_command.rb +105 -24
- data/test/rubygems/test_gem_commands_push_command.rb +44 -23
- data/test/rubygems/test_gem_commands_signin_command.rb +28 -3
- data/test/rubygems/test_gem_commands_yank_command.rb +9 -9
- data/test/rubygems/test_gem_ext_cargo_builder/custom_name/Cargo.lock +4 -4
- data/test/rubygems/test_gem_ext_cargo_builder/custom_name/Cargo.toml +1 -1
- data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.lock +4 -4
- data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.toml +1 -1
- data/test/rubygems/test_gem_gemcutter_utilities.rb +16 -12
- data/test/rubygems/test_gem_package.rb +15 -0
- data/test/rubygems/test_gem_platform.rb +35 -0
- data/test/rubygems/test_gem_resolver.rb +33 -0
- data/test/rubygems/test_gem_security.rb +5 -5
- data/test/rubygems/test_gem_security_signer.rb +6 -6
- data/test/rubygems/test_require.rb +5 -5
- data/test/rubygems/utilities.rb +36 -14
- data/test/rubygems/wrong_key_cert.pem +15 -15
- data/test/rubygems/wrong_key_cert_32.pem +15 -15
- metadata +4 -4
- data/bundler/lib/bundler/dep_proxy.rb +0 -55
@@ -93,7 +93,7 @@ class TestGemGemcutterUtilities < Gem::TestCase
|
|
93
93
|
|
94
94
|
def test_sign_in
|
95
95
|
api_key = "a5fdbb6ba150cbb83aad2bb2fede64cf040453903"
|
96
|
-
util_sign_in
|
96
|
+
util_sign_in HTTPResponseFactory.create(body: api_key, code: 200, msg: "OK")
|
97
97
|
|
98
98
|
assert_match %r{Enter your RubyGems.org credentials.}, @sign_in_ui.output
|
99
99
|
assert @fetcher.last_request["authorization"]
|
@@ -106,7 +106,7 @@ class TestGemGemcutterUtilities < Gem::TestCase
|
|
106
106
|
def test_sign_in_with_host
|
107
107
|
api_key = "a5fdbb6ba150cbb83aad2bb2fede64cf040453903"
|
108
108
|
|
109
|
-
util_sign_in
|
109
|
+
util_sign_in HTTPResponseFactory.create(body: api_key, code: 200, msg: "OK"), "http://example.com", ["http://example.com"]
|
110
110
|
|
111
111
|
assert_match "Enter your http://example.com credentials.",
|
112
112
|
@sign_in_ui.output
|
@@ -120,7 +120,7 @@ class TestGemGemcutterUtilities < Gem::TestCase
|
|
120
120
|
def test_sign_in_with_host_nil
|
121
121
|
api_key = "a5fdbb6ba150cbb83aad2bb2fede64cf040453903"
|
122
122
|
|
123
|
-
util_sign_in
|
123
|
+
util_sign_in HTTPResponseFactory.create(body: api_key, code: 200, msg: "OK"), nil, [nil]
|
124
124
|
|
125
125
|
assert_match "Enter your RubyGems.org credentials.",
|
126
126
|
@sign_in_ui.output
|
@@ -133,7 +133,7 @@ class TestGemGemcutterUtilities < Gem::TestCase
|
|
133
133
|
|
134
134
|
def test_sign_in_with_host_ENV
|
135
135
|
api_key = "a5fdbb6ba150cbb83aad2bb2fede64cf040453903"
|
136
|
-
util_sign_in
|
136
|
+
util_sign_in HTTPResponseFactory.create(body: api_key, code: 200, msg: "OK"), "http://example.com"
|
137
137
|
|
138
138
|
assert_match "Enter your http://example.com credentials.",
|
139
139
|
@sign_in_ui.output
|
@@ -148,7 +148,7 @@ class TestGemGemcutterUtilities < Gem::TestCase
|
|
148
148
|
api_key = "a5fdbb6ba150cbb83aad2bb2fede64cf040453903"
|
149
149
|
Gem.configuration.rubygems_api_key = api_key
|
150
150
|
|
151
|
-
util_sign_in
|
151
|
+
util_sign_in HTTPResponseFactory.create(body: api_key, code: 200, msg: "OK")
|
152
152
|
|
153
153
|
assert_equal "", @sign_in_ui.output
|
154
154
|
end
|
@@ -157,7 +157,7 @@ class TestGemGemcutterUtilities < Gem::TestCase
|
|
157
157
|
api_key = "a5fdbb6ba150cbb83aad2bb2fede64cf040453903"
|
158
158
|
Gem.configuration.api_keys[:KEY] = "other"
|
159
159
|
@cmd.options[:key] = :KEY
|
160
|
-
util_sign_in
|
160
|
+
util_sign_in HTTPResponseFactory.create(body: api_key, code: 200, msg: "OK")
|
161
161
|
|
162
162
|
assert_equal "", @sign_in_ui.output
|
163
163
|
end
|
@@ -169,7 +169,7 @@ class TestGemGemcutterUtilities < Gem::TestCase
|
|
169
169
|
File.open Gem.configuration.credentials_path, "w" do |f|
|
170
170
|
f.write Hash[:other_api_key, other_api_key].to_yaml
|
171
171
|
end
|
172
|
-
util_sign_in
|
172
|
+
util_sign_in HTTPResponseFactory.create(body: api_key, code: 200, msg: "OK")
|
173
173
|
|
174
174
|
assert_match %r{Enter your RubyGems.org credentials.}, @sign_in_ui.output
|
175
175
|
assert_match %r{Signed in.}, @sign_in_ui.output
|
@@ -181,7 +181,7 @@ class TestGemGemcutterUtilities < Gem::TestCase
|
|
181
181
|
|
182
182
|
def test_sign_in_with_bad_credentials
|
183
183
|
assert_raise Gem::MockGemUi::TermError do
|
184
|
-
util_sign_in
|
184
|
+
util_sign_in HTTPResponseFactory.create(body: "Access Denied.", code: 403, msg: "Forbidden")
|
185
185
|
end
|
186
186
|
|
187
187
|
assert_match %r{Enter your RubyGems.org credentials.}, @sign_in_ui.output
|
@@ -192,7 +192,7 @@ class TestGemGemcutterUtilities < Gem::TestCase
|
|
192
192
|
ENV["GEM_HOST_OTP_CODE"] = "111111"
|
193
193
|
api_key = "a5fdbb6ba150cbb83aad2bb2fede64cf040453903"
|
194
194
|
|
195
|
-
util_sign_in
|
195
|
+
util_sign_in HTTPResponseFactory.create(body: api_key, code: 200, msg: "OK")
|
196
196
|
|
197
197
|
assert_match "Signed in with API key:", @sign_in_ui.output
|
198
198
|
assert_equal "111111", @fetcher.last_request["OTP"]
|
@@ -204,7 +204,11 @@ class TestGemGemcutterUtilities < Gem::TestCase
|
|
204
204
|
|
205
205
|
util_sign_in(proc do
|
206
206
|
@call_count ||= 0
|
207
|
-
(@call_count += 1).odd?
|
207
|
+
if (@call_count += 1).odd?
|
208
|
+
HTTPResponseFactory.create(body: response_fail, code: 401, msg: "Unauthorized")
|
209
|
+
else
|
210
|
+
HTTPResponseFactory.create(body: api_key, code: 200, msg: "OK")
|
211
|
+
end
|
208
212
|
end, nil, [], "111111\n")
|
209
213
|
|
210
214
|
assert_match "You have enabled multi-factor authentication. Please enter OTP code.", @sign_in_ui.output
|
@@ -217,7 +221,7 @@ class TestGemGemcutterUtilities < Gem::TestCase
|
|
217
221
|
response = "You have enabled multifactor authentication but your request doesn't have the correct OTP code. Please check it and retry."
|
218
222
|
|
219
223
|
assert_raise Gem::MockGemUi::TermError do
|
220
|
-
util_sign_in
|
224
|
+
util_sign_in HTTPResponseFactory.create(body: response, code: 401, msg: "Unauthorized"), nil, [], "111111\n"
|
221
225
|
end
|
222
226
|
|
223
227
|
assert_match "You have enabled multi-factor authentication. Please enter OTP code.", @sign_in_ui.output
|
@@ -229,7 +233,7 @@ class TestGemGemcutterUtilities < Gem::TestCase
|
|
229
233
|
def util_sign_in(response, host = nil, args = [], extra_input = "")
|
230
234
|
email = "you@example.com"
|
231
235
|
password = "secret"
|
232
|
-
profile_response =
|
236
|
+
profile_response = HTTPResponseFactory.create(body: "mfa: disabled\n", code: 200, msg: "OK")
|
233
237
|
|
234
238
|
if host
|
235
239
|
ENV["RUBYGEMS_HOST"] = host
|
@@ -510,6 +510,21 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
510
510
|
assert_path_exist @destination
|
511
511
|
end
|
512
512
|
|
513
|
+
def test_extract_file_permissions
|
514
|
+
pend "chmod not supported" if win_platform?
|
515
|
+
|
516
|
+
gem_with_long_permissions = File.expand_path("packages/Bluebie-legs-0.6.2.gem", __dir__)
|
517
|
+
|
518
|
+
package = Gem::Package.new gem_with_long_permissions
|
519
|
+
|
520
|
+
package.extract_files @destination
|
521
|
+
|
522
|
+
filepath = File.join @destination, "README.rdoc"
|
523
|
+
assert_path_exist filepath
|
524
|
+
|
525
|
+
assert_equal 0104444, File.stat(filepath).mode
|
526
|
+
end
|
527
|
+
|
513
528
|
def test_extract_tar_gz_absolute
|
514
529
|
package = Gem::Package.new @gem
|
515
530
|
|
@@ -333,6 +333,34 @@ class TestGemPlatform < Gem::TestCase
|
|
333
333
|
refute(arm_linux_uclibceabi === arm_linux_eabi, "linux-uclibceabi =~ linux-eabi")
|
334
334
|
end
|
335
335
|
|
336
|
+
def test_eabi_and_nil_version_combination_strictness
|
337
|
+
arm_linux = Gem::Platform.new "arm-linux"
|
338
|
+
arm_linux_eabi = Gem::Platform.new "arm-linux-eabi"
|
339
|
+
arm_linux_eabihf = Gem::Platform.new "arm-linux-eabihf"
|
340
|
+
arm_linux_gnueabi = Gem::Platform.new "arm-linux-gnueabi"
|
341
|
+
arm_linux_gnueabihf = Gem::Platform.new "arm-linux-gnueabihf"
|
342
|
+
arm_linux_musleabi = Gem::Platform.new "arm-linux-musleabi"
|
343
|
+
arm_linux_musleabihf = Gem::Platform.new "arm-linux-musleabihf"
|
344
|
+
arm_linux_uclibceabi = Gem::Platform.new "arm-linux-uclibceabi"
|
345
|
+
arm_linux_uclibceabihf = Gem::Platform.new "arm-linux-uclibceabihf"
|
346
|
+
|
347
|
+
# generic arm host runtime with eabi modifier accepts generic arm gems
|
348
|
+
assert(arm_linux === arm_linux_eabi, "arm-linux =~ arm-linux-eabi")
|
349
|
+
assert(arm_linux === arm_linux_eabihf, "arm-linux =~ arm-linux-eabihf")
|
350
|
+
|
351
|
+
# explicit gnu arm host runtime with eabi modifier accepts generic arm gems
|
352
|
+
assert(arm_linux === arm_linux_gnueabi, "arm-linux =~ arm-linux-gnueabi")
|
353
|
+
assert(arm_linux === arm_linux_gnueabihf, "arm-linux =~ arm-linux-gnueabihf")
|
354
|
+
|
355
|
+
# musl arm host runtime accepts libc-generic or statically linked gems...
|
356
|
+
assert(arm_linux === arm_linux_musleabi, "arm-linux =~ arm-linux-musleabi")
|
357
|
+
assert(arm_linux === arm_linux_musleabihf, "arm-linux =~ arm-linux-musleabihf")
|
358
|
+
|
359
|
+
# other libc arm hosts are not glibc compatible
|
360
|
+
refute(arm_linux === arm_linux_uclibceabi, "arm-linux =~ arm-linux-uclibceabi")
|
361
|
+
refute(arm_linux === arm_linux_uclibceabihf, "arm-linux =~ arm-linux-uclibceabihf")
|
362
|
+
end
|
363
|
+
|
336
364
|
def test_equals3_cpu_arm
|
337
365
|
arm = Gem::Platform.new "arm-linux"
|
338
366
|
armv5 = Gem::Platform.new "armv5-linux"
|
@@ -452,6 +480,13 @@ class TestGemPlatform < Gem::TestCase
|
|
452
480
|
assert_equal 1, result.scan(/@version=/).size
|
453
481
|
end
|
454
482
|
|
483
|
+
def test_gem_platform_match_with_string_argument
|
484
|
+
util_set_arch "x86_64-linux-musl"
|
485
|
+
|
486
|
+
assert(Gem::Platform.match(Gem::Platform.new("x86_64-linux")), "should match Gem::Platform")
|
487
|
+
assert(Gem::Platform.match("x86_64-linux"), "should match String platform")
|
488
|
+
end
|
489
|
+
|
455
490
|
def assert_local_match(name)
|
456
491
|
assert_match Gem::Platform.local, name
|
457
492
|
end
|
@@ -391,6 +391,39 @@ class TestGemResolver < Gem::TestCase
|
|
391
391
|
end
|
392
392
|
end
|
393
393
|
|
394
|
+
def test_pick_generic_linux_variants_on_musl_linux
|
395
|
+
util_set_arch "aarch64-linux-musl" do
|
396
|
+
is = Gem::Resolver::IndexSpecification
|
397
|
+
|
398
|
+
linux = Gem::Platform.new("aarch64-linux")
|
399
|
+
|
400
|
+
spec_fetcher do |fetcher|
|
401
|
+
fetcher.spec "libv8-node", "15.14.0.1" do |s|
|
402
|
+
s.platform = linux
|
403
|
+
end
|
404
|
+
|
405
|
+
fetcher.spec "libv8-node", "15.14.0.1"
|
406
|
+
end
|
407
|
+
|
408
|
+
v15 = v("15.14.0.1")
|
409
|
+
source = Gem::Source.new @gem_repo
|
410
|
+
|
411
|
+
s = set
|
412
|
+
|
413
|
+
v15_ruby = is.new s, "libv8-node", v15, source, Gem::Platform::RUBY
|
414
|
+
v15_linux = is.new s, "libv8-node", v15, source, linux.to_s
|
415
|
+
|
416
|
+
s.add v15_linux
|
417
|
+
s.add v15_ruby
|
418
|
+
|
419
|
+
ad = make_dep "libv8-node", "= 15.14.0.1"
|
420
|
+
|
421
|
+
res = Gem::Resolver.new([ad], s)
|
422
|
+
|
423
|
+
assert_resolves_to [v15_linux.spec], res
|
424
|
+
end
|
425
|
+
end
|
426
|
+
|
394
427
|
def test_only_returns_spec_once
|
395
428
|
a1 = util_spec "a", "1", "c" => "= 1"
|
396
429
|
b1 = util_spec "b", "1", "c" => "= 1"
|
@@ -51,7 +51,7 @@ class TestGemSecurity < Gem::TestCase
|
|
51
51
|
|
52
52
|
key_ident = cert.extensions.find {|ext| ext.oid == "subjectKeyIdentifier" }
|
53
53
|
assert_equal 59, key_ident.value.length
|
54
|
-
assert_equal "
|
54
|
+
assert_equal "B1:1A:54:09:67:45:60:02:02:D7:CE:F4:1D:60:4A:89:DF:E7:58:D9",
|
55
55
|
key_ident.value
|
56
56
|
|
57
57
|
assert_equal "", cert.issuer.to_s
|
@@ -99,7 +99,7 @@ class TestGemSecurity < Gem::TestCase
|
|
99
99
|
|
100
100
|
key_ident = cert.extensions.find {|ext| ext.oid == "subjectKeyIdentifier" }
|
101
101
|
assert_equal 59, key_ident.value.length
|
102
|
-
assert_equal "
|
102
|
+
assert_equal "B1:1A:54:09:67:45:60:02:02:D7:CE:F4:1D:60:4A:89:DF:E7:58:D9",
|
103
103
|
key_ident.value
|
104
104
|
end
|
105
105
|
|
@@ -151,7 +151,7 @@ class TestGemSecurity < Gem::TestCase
|
|
151
151
|
end
|
152
152
|
|
153
153
|
def test_class_re_sign
|
154
|
-
assert_equal "
|
154
|
+
assert_equal "sha256WithRSAEncryption", EXPIRED_CERT.signature_algorithm
|
155
155
|
re_signed = Gem::Security.re_sign EXPIRED_CERT, PRIVATE_KEY, 60
|
156
156
|
|
157
157
|
assert_in_delta Time.now, re_signed.not_before, 10
|
@@ -230,7 +230,7 @@ class TestGemSecurity < Gem::TestCase
|
|
230
230
|
key_ident =
|
231
231
|
signed.extensions.find {|ext| ext.oid == "subjectKeyIdentifier" }
|
232
232
|
assert_equal 59, key_ident.value.length
|
233
|
-
assert_equal "
|
233
|
+
assert_equal "B1:1A:54:09:67:45:60:02:02:D7:CE:F4:1D:60:4A:89:DF:E7:58:D9",
|
234
234
|
key_ident.value
|
235
235
|
|
236
236
|
assert signed.verify key
|
@@ -272,7 +272,7 @@ class TestGemSecurity < Gem::TestCase
|
|
272
272
|
key_ident =
|
273
273
|
signed.extensions.find {|ext| ext.oid == "subjectKeyIdentifier" }
|
274
274
|
assert_equal 59, key_ident.value.length
|
275
|
-
assert_equal "
|
275
|
+
assert_equal "B1:1A:54:09:67:45:60:02:02:D7:CE:F4:1D:60:4A:89:DF:E7:58:D9",
|
276
276
|
key_ident.value
|
277
277
|
|
278
278
|
assert signed.verify PUBLIC_KEY
|
@@ -120,12 +120,12 @@ class TestGemSecuritySigner < Gem::TestCase
|
|
120
120
|
signature = signer.sign "hello"
|
121
121
|
|
122
122
|
expected = <<-EXPECTED
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
123
|
+
FmrCYxEXW3dgYYNMxPdS16VrdXT+d5nyXTVlRm64ZHSgMxMAaPtQJsVYv73m
|
124
|
+
DWHTzNnLhhINSpgBMLh5a4atM52yxVdkPUTgqIH+LeIPBXn8xaP5JLmfDcmI
|
125
|
+
tBpc/9DhS3v9iKCX40igAArFu7Gg3swbgQ61SP+U22LvG5nDQZQz3sudtsw3
|
126
|
+
qKPykFVaYjrRwzvBdSdJ1PwlAsanSwcwS/GKPtmE/ykZ6X5XOx7wvCDL/zGy
|
127
|
+
B8khkB8hDKC6moCzebmUxCBmTmXD0Wjzon+bf4MOriVE3a0ySGRvpr1mKR2+
|
128
|
+
9EaVo7pDJLEM487+xg1CAZHRhwshd6II00XEzG/jBQ==
|
129
129
|
EXPECTED
|
130
130
|
|
131
131
|
assert_equal expected, [signature].pack("m")
|
@@ -252,9 +252,9 @@ class TestGemRequire < Gem::TestCase
|
|
252
252
|
# Activates a-1, but not b-1 and b-2
|
253
253
|
assert_require "test_gem_require_a"
|
254
254
|
assert_equal %w[a-1], loaded_spec_names
|
255
|
-
assert $LOAD_PATH.include? a1.
|
256
|
-
refute $LOAD_PATH.include? b1.
|
257
|
-
refute $LOAD_PATH.include? b2.
|
255
|
+
assert $LOAD_PATH.include? a1.full_require_paths[0]
|
256
|
+
refute $LOAD_PATH.include? b1.full_require_paths[0]
|
257
|
+
refute $LOAD_PATH.include? b2.full_require_paths[0]
|
258
258
|
|
259
259
|
assert_equal unresolved_names, ["b (>= 1)"]
|
260
260
|
|
@@ -265,13 +265,13 @@ class TestGemRequire < Gem::TestCase
|
|
265
265
|
# and as a result #gem_original_require returns false.
|
266
266
|
refute require("benchmark"), "the benchmark stdlib should be recognized as already loaded"
|
267
267
|
|
268
|
-
assert_includes $LOAD_PATH, b2.
|
268
|
+
assert_includes $LOAD_PATH, b2.full_require_paths[0]
|
269
269
|
assert_includes $LOAD_PATH, rubylibdir
|
270
270
|
message = proc {
|
271
271
|
"this test relies on the b-2 gem lib/ to be before stdlib to make sense\n" +
|
272
272
|
$LOAD_PATH.pretty_inspect
|
273
273
|
}
|
274
|
-
assert_operator $LOAD_PATH.index(b2.
|
274
|
+
assert_operator $LOAD_PATH.index(b2.full_require_paths[0]), :<, $LOAD_PATH.index(rubylibdir), message
|
275
275
|
|
276
276
|
# We detected that we should activate b-2, so we did so, but
|
277
277
|
# then #gem_original_require decided "I've already got some benchmark.rb" loaded.
|
data/test/rubygems/utilities.rb
CHANGED
@@ -54,13 +54,21 @@ class Gem::FakeFetcher
|
|
54
54
|
raise Gem::RemoteFetcher::FetchError.new("no data for #{path}", path)
|
55
55
|
end
|
56
56
|
|
57
|
-
if @data[path].kind_of?(Array)
|
57
|
+
if @data[path].kind_of?(Array)
|
58
58
|
@data[path].shift
|
59
59
|
else
|
60
60
|
@data[path]
|
61
61
|
end
|
62
62
|
end
|
63
63
|
|
64
|
+
def create_response(uri)
|
65
|
+
data = find_data(uri)
|
66
|
+
response = data.respond_to?(:call) ? data.call : data
|
67
|
+
raise TypeError, "#{response.class} is not a type of Net::HTTPResponse" unless response.kind_of?(Net::HTTPResponse)
|
68
|
+
|
69
|
+
response
|
70
|
+
end
|
71
|
+
|
64
72
|
def fetch_path(path, mtime = nil, head = false)
|
65
73
|
data = find_data(path)
|
66
74
|
|
@@ -85,26 +93,16 @@ class Gem::FakeFetcher
|
|
85
93
|
|
86
94
|
# Thanks, FakeWeb!
|
87
95
|
def open_uri_or_path(path)
|
88
|
-
|
89
|
-
body, code, msg = data
|
96
|
+
find_data(path)
|
90
97
|
|
91
|
-
|
92
|
-
response.instance_variable_set(:@body, body)
|
93
|
-
response.instance_variable_set(:@read, true)
|
94
|
-
response
|
98
|
+
create_response(uri)
|
95
99
|
end
|
96
100
|
|
97
101
|
def request(uri, request_class, last_modified = nil)
|
98
|
-
data = find_data(uri)
|
99
|
-
body, code, msg = (data.respond_to?(:call) ? data.call : data)
|
100
|
-
|
101
102
|
@last_request = request_class.new uri.request_uri
|
102
103
|
yield @last_request if block_given?
|
103
104
|
|
104
|
-
|
105
|
-
response.instance_variable_set(:@body, body)
|
106
|
-
response.instance_variable_set(:@read, true)
|
107
|
-
response
|
105
|
+
create_response(uri)
|
108
106
|
end
|
109
107
|
|
110
108
|
def pretty_print(q) # :nodoc:
|
@@ -164,6 +162,30 @@ class Gem::FakeFetcher
|
|
164
162
|
end
|
165
163
|
end
|
166
164
|
|
165
|
+
##
|
166
|
+
# The HTTPResponseFactory allows easy creation of Net::HTTPResponse instances in RubyGems tests:
|
167
|
+
#
|
168
|
+
# Example:
|
169
|
+
#
|
170
|
+
# HTTPResponseFactory.create(
|
171
|
+
# body: "",
|
172
|
+
# code: 301,
|
173
|
+
# msg: "Moved Permanently",
|
174
|
+
# headers: { "location" => "http://example.com" }
|
175
|
+
# )
|
176
|
+
#
|
177
|
+
|
178
|
+
class HTTPResponseFactory
|
179
|
+
def self.create(body:, code:, msg:, headers: {})
|
180
|
+
response = Net::HTTPResponse.send(:response_class, code.to_s).new("1.0", code.to_s, msg)
|
181
|
+
response.instance_variable_set(:@body, body)
|
182
|
+
response.instance_variable_set(:@read, true)
|
183
|
+
headers.each {|name, value| response[name] = value }
|
184
|
+
|
185
|
+
response
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
167
189
|
# :stopdoc:
|
168
190
|
class Gem::RemoteFetcher
|
169
191
|
def self.fetcher=(fetcher)
|
@@ -1,19 +1,19 @@
|
|
1
1
|
-----BEGIN CERTIFICATE-----
|
2
|
-
|
2
|
+
MIIDDTCCAfWgAwIBAgIBEjANBgkqhkiG9w0BAQsFADAqMQ8wDQYDVQQDDAZub2Jv
|
3
3
|
ZHkxFzAVBgoJkiaJk/IsZAEZFgdleGFtcGxlMCAXDTEyMDEwMTAwMDAwMFoYDzk5
|
4
4
|
OTkxMjMxMjM1OTU5WjAqMQ8wDQYDVQQDDAZub2JvZHkxFzAVBgoJkiaJk/IsZAEZ
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
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ERiRVLZIlHbZzuPp0YRYH9gyJot/+0piaAcnUEvjz2Z8axoFq
|
15
|
+
lE3/q4s6Yw8xdqwxvc5kiwymv2nEm4+v5w6Pb3K/fP/QQLvDUBWrBUMHPgdYXYk2
|
16
|
+
zvc58BBwgGDSpFRO0tw+lnqMTM1y+fbpfuvP9TY1m4y13nuw/g7KxVxYolAWVQs3
|
17
|
+
TptnJqqzEwdFa2S9BidUIlDRRY8cuhY6R3DM6THNLjR3c1oyf04nhT3sd/ilAJdD
|
18
|
+
YjnEtcLlkjxZyLLoWjn2
|
19
19
|
-----END CERTIFICATE-----
|
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.3.
|
4
|
+
version: 3.3.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Weirich
|
@@ -16,7 +16,7 @@ authors:
|
|
16
16
|
autorequire:
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
|
-
date: 2022-
|
19
|
+
date: 2022-10-17 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
|
@@ -113,7 +113,6 @@ files:
|
|
113
113
|
- bundler/lib/bundler/constants.rb
|
114
114
|
- bundler/lib/bundler/current_ruby.rb
|
115
115
|
- bundler/lib/bundler/definition.rb
|
116
|
-
- bundler/lib/bundler/dep_proxy.rb
|
117
116
|
- bundler/lib/bundler/dependency.rb
|
118
117
|
- bundler/lib/bundler/deployment.rb
|
119
118
|
- bundler/lib/bundler/deprecate.rb
|
@@ -633,6 +632,7 @@ files:
|
|
633
632
|
- test/rubygems/invalidchild_cert_32.pem
|
634
633
|
- test/rubygems/invalidchild_key.pem
|
635
634
|
- test/rubygems/package/tar_test_case.rb
|
635
|
+
- test/rubygems/packages/Bluebie-legs-0.6.2.gem
|
636
636
|
- test/rubygems/packages/ascii_binder-0.1.10.1.gem
|
637
637
|
- test/rubygems/packages/ill-formatted-platform-1.0.0.10.gem
|
638
638
|
- test/rubygems/plugin/exception/rubygems_plugin.rb
|
@@ -831,7 +831,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
831
831
|
- !ruby/object:Gem::Version
|
832
832
|
version: '0'
|
833
833
|
requirements: []
|
834
|
-
rubygems_version: 3.
|
834
|
+
rubygems_version: 3.3.24
|
835
835
|
signing_key:
|
836
836
|
specification_version: 4
|
837
837
|
summary: RubyGems is a package management framework for Ruby.
|
@@ -1,55 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Bundler
|
4
|
-
class DepProxy
|
5
|
-
attr_reader :__platform, :dep
|
6
|
-
|
7
|
-
@proxies = {}
|
8
|
-
|
9
|
-
def self.get_proxy(dep, platform)
|
10
|
-
@proxies[[dep, platform]] ||= new(dep, platform).freeze
|
11
|
-
end
|
12
|
-
|
13
|
-
def initialize(dep, platform)
|
14
|
-
@dep = dep
|
15
|
-
@__platform = platform
|
16
|
-
end
|
17
|
-
|
18
|
-
private_class_method :new
|
19
|
-
|
20
|
-
alias_method :eql?, :==
|
21
|
-
|
22
|
-
def type
|
23
|
-
@dep.type
|
24
|
-
end
|
25
|
-
|
26
|
-
def name
|
27
|
-
@dep.name
|
28
|
-
end
|
29
|
-
|
30
|
-
def requirement
|
31
|
-
@dep.requirement
|
32
|
-
end
|
33
|
-
|
34
|
-
def to_s
|
35
|
-
s = name.dup
|
36
|
-
s << " (#{requirement})" unless requirement == Gem::Requirement.default
|
37
|
-
s << " #{__platform}" unless __platform == Gem::Platform::RUBY
|
38
|
-
s
|
39
|
-
end
|
40
|
-
|
41
|
-
def dup
|
42
|
-
raise NoMethodError.new("DepProxy cannot be duplicated")
|
43
|
-
end
|
44
|
-
|
45
|
-
def clone
|
46
|
-
raise NoMethodError.new("DepProxy cannot be cloned")
|
47
|
-
end
|
48
|
-
|
49
|
-
private
|
50
|
-
|
51
|
-
def method_missing(*args, &blk)
|
52
|
-
@dep.send(*args, &blk)
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|