rubygems-update 3.4.20 → 3.4.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 +55 -0
- data/Manifest.txt +6 -0
- data/bundler/CHANGELOG.md +55 -3
- data/bundler/README.md +1 -2
- data/bundler/lib/bundler/build_metadata.rb +3 -3
- data/bundler/lib/bundler/cli/check.rb +1 -1
- data/bundler/lib/bundler/cli/gem.rb +4 -3
- data/bundler/lib/bundler/cli/install.rb +2 -2
- data/bundler/lib/bundler/cli/lock.rb +26 -23
- data/bundler/lib/bundler/cli/open.rb +5 -7
- data/bundler/lib/bundler/definition.rb +43 -26
- data/bundler/lib/bundler/endpoint_specification.rb +1 -1
- data/bundler/lib/bundler/env.rb +2 -2
- data/bundler/lib/bundler/errors.rb +15 -0
- data/bundler/lib/bundler/gem_helpers.rb +7 -0
- data/bundler/lib/bundler/gem_version_promoter.rb +2 -2
- data/bundler/lib/bundler/injector.rb +1 -1
- data/bundler/lib/bundler/installer/gem_installer.rb +5 -5
- data/bundler/lib/bundler/installer/parallel_installer.rb +0 -26
- data/bundler/lib/bundler/installer/standalone.rb +13 -6
- data/bundler/lib/bundler/lazy_specification.rb +4 -0
- data/bundler/lib/bundler/lockfile_parser.rb +29 -24
- 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 +1 -1
- data/bundler/lib/bundler/man/bundle-console.1 +1 -1
- data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
- data/bundler/lib/bundler/man/bundle-exec.1 +2 -2
- data/bundler/lib/bundler/man/bundle-exec.1.ronn +2 -3
- data/bundler/lib/bundler/man/bundle-gem.1 +1 -1
- 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 +1 -1
- data/bundler/lib/bundler/man/bundle-install.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 +17 -17
- data/bundler/lib/bundler/man/bundle-plugin.1.ronn +5 -5
- 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/plugin/index.rb +8 -0
- data/bundler/lib/bundler/plugin.rb +9 -2
- data/bundler/lib/bundler/resolver/package.rb +5 -0
- data/bundler/lib/bundler/resolver.rb +27 -7
- data/bundler/lib/bundler/ruby_version.rb +8 -1
- data/bundler/lib/bundler/rubygems_ext.rb +3 -4
- data/bundler/lib/bundler/rubygems_gem_installer.rb +23 -8
- data/bundler/lib/bundler/settings.rb +53 -16
- data/bundler/lib/bundler/shared_helpers.rb +16 -1
- data/bundler/lib/bundler/source/git/git_proxy.rb +21 -4
- data/bundler/lib/bundler/source/metadata.rb +1 -1
- data/bundler/lib/bundler/spec_set.rb +7 -4
- data/bundler/lib/bundler/stub_specification.rb +4 -2
- data/bundler/lib/bundler/templates/newgem/Rakefile.tt +6 -2
- data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +1 -1
- data/bundler/lib/bundler/ui/shell.rb +1 -1
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb +1 -0
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb +21 -9
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb +3 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/directory.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +8 -10
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +15 -4
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions.rb +15 -15
- data/bundler/lib/bundler/vendor/thor/lib/thor/base.rb +140 -14
- data/bundler/lib/bundler/vendor/thor/lib/thor/command.rb +13 -4
- data/bundler/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +4 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/error.rb +16 -25
- data/bundler/lib/bundler/vendor/thor/lib/thor/group.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/invocation.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/nested_context.rb +2 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +20 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +33 -17
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/option.rb +27 -8
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/options.rb +44 -6
- data/bundler/lib/bundler/vendor/thor/lib/thor/rake_compat.rb +2 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/runner.rb +40 -30
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +26 -150
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/color.rb +4 -46
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/column_printer.rb +29 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/html.rb +3 -45
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/lcs_diff.rb +49 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/table_printer.rb +134 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/terminal.rb +42 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/wrapped_printer.rb +38 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/util.rb +8 -7
- data/bundler/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor.rb +155 -8
- data/bundler/lib/bundler/version.rb +1 -1
- data/bundler/lib/bundler/yaml_serializer.rb +12 -8
- data/bundler/lib/bundler.rb +0 -8
- data/lib/rubygems/basic_specification.rb +1 -1
- data/lib/rubygems/command.rb +5 -5
- data/lib/rubygems/command_manager.rb +1 -1
- data/lib/rubygems/commands/cert_command.rb +3 -3
- data/lib/rubygems/commands/check_command.rb +5 -1
- data/lib/rubygems/commands/cleanup_command.rb +1 -1
- data/lib/rubygems/commands/contents_command.rb +2 -2
- data/lib/rubygems/commands/environment_command.rb +2 -2
- data/lib/rubygems/commands/help_command.rb +3 -3
- data/lib/rubygems/commands/open_command.rb +1 -3
- data/lib/rubygems/commands/owner_command.rb +1 -1
- data/lib/rubygems/commands/setup_command.rb +10 -10
- data/lib/rubygems/commands/specification_command.rb +5 -1
- data/lib/rubygems/commands/stale_command.rb +1 -1
- data/lib/rubygems/commands/uninstall_command.rb +4 -4
- data/lib/rubygems/commands/unpack_command.rb +3 -3
- data/lib/rubygems/commands/update_command.rb +4 -4
- data/lib/rubygems/commands/yank_command.rb +1 -1
- data/lib/rubygems/config_file.rb +63 -16
- data/lib/rubygems/core_ext/kernel_gem.rb +1 -1
- data/lib/rubygems/core_ext/kernel_require.rb +2 -2
- data/lib/rubygems/defaults.rb +6 -2
- data/lib/rubygems/dependency_installer.rb +4 -4
- data/lib/rubygems/deprecate.rb +2 -1
- data/lib/rubygems/doctor.rb +2 -2
- data/lib/rubygems/errors.rb +1 -1
- data/lib/rubygems/exceptions.rb +1 -1
- data/lib/rubygems/ext/builder.rb +5 -4
- data/lib/rubygems/ext/cargo_builder.rb +2 -2
- data/lib/rubygems/ext/ext_conf_builder.rb +1 -1
- data/lib/rubygems/ext/rake_builder.rb +1 -1
- data/lib/rubygems/gem_runner.rb +5 -1
- data/lib/rubygems/gemcutter_utilities.rb +2 -2
- data/lib/rubygems/indexer.rb +1 -1
- data/lib/rubygems/install_update_options.rb +1 -1
- data/lib/rubygems/installer.rb +15 -20
- data/lib/rubygems/local_remote_options.rb +1 -1
- data/lib/rubygems/package/digest_io.rb +1 -1
- data/lib/rubygems/package/old.rb +1 -1
- data/lib/rubygems/package/tar_header.rb +2 -2
- data/lib/rubygems/package/tar_reader.rb +9 -2
- data/lib/rubygems/package/tar_writer.rb +2 -2
- data/lib/rubygems/package.rb +9 -9
- data/lib/rubygems/path_support.rb +1 -1
- data/lib/rubygems/platform.rb +12 -6
- data/lib/rubygems/query_utils.rb +4 -4
- data/lib/rubygems/remote_fetcher.rb +12 -4
- data/lib/rubygems/request.rb +1 -1
- data/lib/rubygems/request_set/gem_dependency_api.rb +1 -1
- data/lib/rubygems/request_set.rb +2 -1
- data/lib/rubygems/requirement.rb +1 -1
- data/lib/rubygems/resolver/api_set.rb +2 -1
- data/lib/rubygems/resolver/api_specification.rb +1 -1
- data/lib/rubygems/resolver.rb +3 -3
- data/lib/rubygems/security/signer.rb +10 -2
- data/lib/rubygems/security/trust_dir.rb +5 -5
- data/lib/rubygems/security.rb +1 -1
- data/lib/rubygems/security_option.rb +1 -1
- data/lib/rubygems/source/local.rb +2 -1
- data/lib/rubygems/source.rb +5 -1
- data/lib/rubygems/source_list.rb +1 -1
- data/lib/rubygems/spec_fetcher.rb +2 -2
- data/lib/rubygems/specification.rb +30 -23
- data/lib/rubygems/specification_policy.rb +11 -11
- data/lib/rubygems/uninstaller.rb +3 -3
- data/lib/rubygems/update_suggestion.rb +1 -1
- data/lib/rubygems/user_interaction.rb +2 -2
- data/lib/rubygems/util/licenses.rb +48 -0
- data/lib/rubygems/util.rb +5 -1
- data/lib/rubygems/validator.rb +1 -1
- data/lib/rubygems/version.rb +6 -5
- data/lib/rubygems/yaml_serializer.rb +93 -0
- data/lib/rubygems.rb +9 -9
- data/rubygems-update.gemspec +1 -1
- data/setup.rb +2 -0
- data/test/rubygems/bundler_test_gem.rb +6 -3
- data/test/rubygems/helper.rb +29 -21
- data/test/rubygems/package/tar_test_case.rb +2 -2
- data/test/rubygems/test_gem.rb +51 -26
- data/test/rubygems/test_gem_command.rb +3 -1
- data/test/rubygems/test_gem_command_manager.rb +6 -6
- data/test/rubygems/test_gem_commands_cert_command.rb +23 -23
- data/test/rubygems/test_gem_commands_cleanup_command.rb +2 -2
- data/test/rubygems/test_gem_commands_environment_command.rb +2 -1
- data/test/rubygems/test_gem_commands_exec_command.rb +5 -1
- data/test/rubygems/test_gem_commands_install_command.rb +5 -5
- data/test/rubygems/test_gem_commands_open_command.rb +5 -2
- data/test/rubygems/test_gem_commands_pristine_command.rb +2 -2
- data/test/rubygems/test_gem_commands_push_command.rb +7 -6
- data/test/rubygems/test_gem_commands_signin_command.rb +8 -8
- data/test/rubygems/test_gem_commands_uninstall_command.rb +21 -1
- data/test/rubygems/test_gem_commands_unpack_command.rb +2 -2
- data/test/rubygems/test_gem_config_file.rb +46 -12
- data/test/rubygems/test_gem_ext_builder.rb +1 -1
- data/test/rubygems/test_gem_ext_cargo_builder.rb +2 -2
- data/test/rubygems/test_gem_gemcutter_utilities.rb +8 -5
- data/test/rubygems/test_gem_install_update_options.rb +3 -3
- data/test/rubygems/test_gem_installer.rb +16 -16
- data/test/rubygems/test_gem_package.rb +35 -34
- data/test/rubygems/test_gem_package_old.rb +1 -1
- data/test/rubygems/test_gem_package_tar_header.rb +3 -3
- data/test/rubygems/test_gem_package_tar_reader.rb +19 -4
- data/test/rubygems/test_gem_package_tar_writer.rb +28 -28
- data/test/rubygems/test_gem_rdoc.rb +2 -2
- data/test/rubygems/test_gem_remote_fetcher.rb +13 -9
- data/test/rubygems/test_gem_request.rb +5 -5
- data/test/rubygems/test_gem_request_connection_pools.rb +2 -1
- data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +14 -7
- data/test/rubygems/test_gem_security.rb +2 -2
- data/test/rubygems/test_gem_security_policy.rb +2 -2
- data/test/rubygems/test_gem_security_signer.rb +2 -2
- data/test/rubygems/test_gem_security_trust_dir.rb +6 -6
- data/test/rubygems/test_gem_spec_fetcher.rb +2 -2
- data/test/rubygems/test_gem_specification.rb +29 -29
- data/test/rubygems/test_gem_stream_ui.rb +1 -1
- data/test/rubygems/test_gem_update_suggestion.rb +12 -6
- data/test/rubygems/test_gem_util.rb +2 -2
- data/test/rubygems/test_gem_version.rb +4 -2
- data/test/rubygems/utilities.rb +4 -3
- metadata +9 -3
@@ -246,7 +246,8 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
|
246
246
|
end
|
247
247
|
|
248
248
|
def test_gem_platforms
|
249
|
-
win_platform
|
249
|
+
win_platform = Gem.win_platform?
|
250
|
+
Gem.win_platform = false
|
250
251
|
|
251
252
|
with_engine_version "ruby", "2.0.0" do
|
252
253
|
@gda.gem "a", :platforms => :ruby
|
@@ -258,7 +259,8 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
|
258
259
|
end
|
259
260
|
|
260
261
|
def test_gem_platforms_bundler_ruby
|
261
|
-
win_platform
|
262
|
+
win_platform = Gem.win_platform?
|
263
|
+
Gem.win_platform = false
|
262
264
|
|
263
265
|
with_engine_version "ruby", "2.0.0" do
|
264
266
|
set = Gem::RequestSet.new
|
@@ -320,7 +322,8 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
|
320
322
|
end
|
321
323
|
|
322
324
|
def test_gem_platforms_maglev
|
323
|
-
win_platform
|
325
|
+
win_platform = Gem.win_platform?
|
326
|
+
Gem.win_platform = false
|
324
327
|
|
325
328
|
with_engine_version "maglev", "1.0.0" do
|
326
329
|
set = Gem::RequestSet.new
|
@@ -356,7 +359,8 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
|
356
359
|
end
|
357
360
|
|
358
361
|
def test_gem_platforms_multiple
|
359
|
-
win_platform
|
362
|
+
win_platform = Gem.win_platform?
|
363
|
+
Gem.win_platform = false
|
360
364
|
|
361
365
|
with_engine_version "ruby", "2.0.0" do
|
362
366
|
@gda.gem "a", :platforms => [:mswin, :jruby]
|
@@ -369,7 +373,8 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
|
369
373
|
end
|
370
374
|
|
371
375
|
def test_gem_platforms_platform
|
372
|
-
win_platform
|
376
|
+
win_platform = Gem.win_platform?
|
377
|
+
Gem.win_platform = false
|
373
378
|
|
374
379
|
with_engine_version "ruby", "2.0.0" do
|
375
380
|
@gda.gem "a", :platforms => :jruby, :platform => :ruby
|
@@ -696,7 +701,8 @@ end
|
|
696
701
|
end
|
697
702
|
|
698
703
|
def test_platform_multiple
|
699
|
-
win_platform
|
704
|
+
win_platform = Gem.win_platform?
|
705
|
+
Gem.win_platform = false
|
700
706
|
|
701
707
|
gda = @GDA.new @set, nil
|
702
708
|
|
@@ -722,7 +728,8 @@ end
|
|
722
728
|
end
|
723
729
|
|
724
730
|
def test_platform_ruby
|
725
|
-
win_platform
|
731
|
+
win_platform = Gem.win_platform?
|
732
|
+
Gem.win_platform = false
|
726
733
|
|
727
734
|
@gda.platform :ruby do
|
728
735
|
@gda.gem "a"
|
@@ -308,7 +308,7 @@ class TestGemSecurity < Gem::TestCase
|
|
308
308
|
|
309
309
|
passphrase = "It should be long."
|
310
310
|
|
311
|
-
@SEC.write key, path,
|
311
|
+
@SEC.write key, path, 0o600, passphrase
|
312
312
|
|
313
313
|
assert_path_exist path
|
314
314
|
|
@@ -326,7 +326,7 @@ class TestGemSecurity < Gem::TestCase
|
|
326
326
|
|
327
327
|
cipher = OpenSSL::Cipher.new "AES-192-CBC"
|
328
328
|
|
329
|
-
@SEC.write key, path,
|
329
|
+
@SEC.write key, path, 0o600, passphrase, cipher
|
330
330
|
|
331
331
|
assert_path_exist path
|
332
332
|
|
@@ -33,7 +33,7 @@ class TestGemSecurityPolicy < Gem::TestCase
|
|
33
33
|
end
|
34
34
|
|
35
35
|
@digest = OpenSSL::Digest.new Gem::Security::DIGEST_NAME
|
36
|
-
@trust_dir = Gem::Security.trust_dir.dir # HACK use the object
|
36
|
+
@trust_dir = Gem::Security.trust_dir.dir # HACK: use the object
|
37
37
|
|
38
38
|
@no = Gem::Security::NoSecurity
|
39
39
|
@almost_no = Gem::Security::AlmostNoSecurity
|
@@ -530,6 +530,6 @@ class TestGemSecurityPolicy < Gem::TestCase
|
|
530
530
|
digests = { Gem::Security::DIGEST_NAME => { 0 => data } }
|
531
531
|
signatures = { 0 => sign(data, key) }
|
532
532
|
|
533
|
-
|
533
|
+
[digests, signatures]
|
534
534
|
end
|
535
535
|
end if Gem::HAVE_OPENSSL
|
@@ -144,7 +144,7 @@ B8khkB8hDKC6moCzebmUxCBmTmXD0Wjzon+bf4MOriVE3a0ySGRvpr1mKR2+
|
|
144
144
|
|
145
145
|
def test_sign_expired_auto_update
|
146
146
|
pend if Gem.java_platform?
|
147
|
-
FileUtils.mkdir_p File.join(Gem.user_home, ".gem"), :mode =>
|
147
|
+
FileUtils.mkdir_p File.join(Gem.user_home, ".gem"), :mode => 0o700
|
148
148
|
|
149
149
|
private_key_path = File.join(Gem.user_home, ".gem", "gem-private_key.pem")
|
150
150
|
Gem::Security.write PRIVATE_KEY, private_key_path
|
@@ -171,7 +171,7 @@ B8khkB8hDKC6moCzebmUxCBmTmXD0Wjzon+bf4MOriVE3a0ySGRvpr1mKR2+
|
|
171
171
|
end
|
172
172
|
|
173
173
|
def test_sign_expired_auto_update_exists
|
174
|
-
FileUtils.mkdir_p File.join(Gem.user_home, ".gem"), :mode =>
|
174
|
+
FileUtils.mkdir_p File.join(Gem.user_home, ".gem"), :mode => 0o700
|
175
175
|
|
176
176
|
expiry = EXPIRED_CERT.not_after.strftime "%Y%m%d%H%M%S"
|
177
177
|
expired_path =
|
@@ -56,7 +56,7 @@ class TestGemSecurityTrustDir < Gem::TestCase
|
|
56
56
|
|
57
57
|
assert_path_exist trusted
|
58
58
|
|
59
|
-
mask =
|
59
|
+
mask = 0o100600 & (~File.umask)
|
60
60
|
|
61
61
|
assert_equal mask, File.stat(trusted).mode unless win_platform?
|
62
62
|
|
@@ -70,8 +70,8 @@ class TestGemSecurityTrustDir < Gem::TestCase
|
|
70
70
|
|
71
71
|
assert_path_exist @dest_dir
|
72
72
|
|
73
|
-
mask =
|
74
|
-
mask |=
|
73
|
+
mask = 0o40700 & (~File.umask)
|
74
|
+
mask |= 0o200000 if RUBY_PLATFORM.include?("aix")
|
75
75
|
|
76
76
|
assert_equal mask, File.stat(@dest_dir).mode unless win_platform?
|
77
77
|
end
|
@@ -87,12 +87,12 @@ class TestGemSecurityTrustDir < Gem::TestCase
|
|
87
87
|
end
|
88
88
|
|
89
89
|
def test_verify_wrong_permissions
|
90
|
-
FileUtils.mkdir_p @dest_dir, :mode =>
|
90
|
+
FileUtils.mkdir_p @dest_dir, :mode => 0o777
|
91
91
|
|
92
92
|
@trust_dir.verify
|
93
93
|
|
94
|
-
mask =
|
95
|
-
mask |=
|
94
|
+
mask = 0o40700 & (~File.umask)
|
95
|
+
mask |= 0o200000 if RUBY_PLATFORM.include?("aix")
|
96
96
|
|
97
97
|
assert_equal mask, File.stat(@dest_dir).mode unless win_platform?
|
98
98
|
end
|
@@ -41,12 +41,12 @@ class TestGemSpecFetcher < Gem::TestCase
|
|
41
41
|
def test_initialize_unwritable_home_dir
|
42
42
|
pend "chmod not supported" if Gem.win_platform?
|
43
43
|
|
44
|
-
FileUtils.chmod
|
44
|
+
FileUtils.chmod 0o000, Gem.user_home
|
45
45
|
|
46
46
|
begin
|
47
47
|
assert Gem::SpecFetcher.new
|
48
48
|
ensure
|
49
|
-
FileUtils.chmod
|
49
|
+
FileUtils.chmod 0o755, Gem.user_home
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
@@ -1472,15 +1472,15 @@ dependencies: []
|
|
1472
1472
|
end
|
1473
1473
|
|
1474
1474
|
FileUtils.mkdir_p File.join @ext.base_dir, "extensions"
|
1475
|
-
FileUtils.chmod
|
1476
|
-
FileUtils.chmod
|
1475
|
+
FileUtils.chmod 0o555, @ext.base_dir
|
1476
|
+
FileUtils.chmod 0o555, File.join(@ext.base_dir, "extensions")
|
1477
1477
|
|
1478
1478
|
@ext.build_extensions
|
1479
1479
|
assert_path_not_exist @ext.extension_dir
|
1480
1480
|
ensure
|
1481
1481
|
unless ($DEBUG || win_platform? || Process.uid.zero? || Gem.java_platform?)
|
1482
|
-
FileUtils.chmod
|
1483
|
-
FileUtils.chmod
|
1482
|
+
FileUtils.chmod 0o755, File.join(@ext.base_dir, "extensions")
|
1483
|
+
FileUtils.chmod 0o755, @ext.base_dir
|
1484
1484
|
end
|
1485
1485
|
end
|
1486
1486
|
|
@@ -1505,14 +1505,14 @@ dependencies: []
|
|
1505
1505
|
end
|
1506
1506
|
|
1507
1507
|
FileUtils.rm_r File.join @gemhome, "extensions"
|
1508
|
-
FileUtils.chmod
|
1508
|
+
FileUtils.chmod 0o555, @gemhome
|
1509
1509
|
|
1510
1510
|
@ext.build_extensions
|
1511
1511
|
|
1512
1512
|
gem_make_out = File.join @ext.extension_dir, "gem_make.out"
|
1513
1513
|
assert_path_not_exist gem_make_out
|
1514
1514
|
ensure
|
1515
|
-
FileUtils.chmod
|
1515
|
+
FileUtils.chmod 0o755, @gemhome
|
1516
1516
|
end
|
1517
1517
|
|
1518
1518
|
def test_build_extensions_none
|
@@ -1620,12 +1620,12 @@ dependencies: []
|
|
1620
1620
|
|
1621
1621
|
def test_date_tolerates_hour_sec_zulu
|
1622
1622
|
@a1.date = "2012-01-12 11:22:33.4444444 Z"
|
1623
|
-
assert_equal Time.utc(2012,
|
1623
|
+
assert_equal Time.utc(2012,0o1,12,0,0,0), @a1.date
|
1624
1624
|
end
|
1625
1625
|
|
1626
1626
|
def test_date_tolerates_hour_sec_and_timezone
|
1627
1627
|
@a1.date = "2012-01-12 11:22:33.4444444 +02:33"
|
1628
|
-
assert_equal Time.utc(2012,
|
1628
|
+
assert_equal Time.utc(2012,0o1,12,0,0,0), @a1.date
|
1629
1629
|
end
|
1630
1630
|
|
1631
1631
|
def test_date_use_env_source_date_epoch
|
@@ -1712,8 +1712,8 @@ dependencies: []
|
|
1712
1712
|
end
|
1713
1713
|
|
1714
1714
|
def test_extension_dir
|
1715
|
-
enable_shared
|
1716
|
-
|
1715
|
+
enable_shared = RbConfig::CONFIG["ENABLE_SHARED"]
|
1716
|
+
RbConfig::CONFIG["ENABLE_SHARED"] = "no"
|
1717
1717
|
|
1718
1718
|
ext_spec
|
1719
1719
|
|
@@ -1729,8 +1729,8 @@ dependencies: []
|
|
1729
1729
|
end
|
1730
1730
|
|
1731
1731
|
def test_extension_dir_override
|
1732
|
-
enable_shared
|
1733
|
-
|
1732
|
+
enable_shared = RbConfig::CONFIG["ENABLE_SHARED"]
|
1733
|
+
RbConfig::CONFIG["ENABLE_SHARED"] = "no"
|
1734
1734
|
|
1735
1735
|
class << Gem
|
1736
1736
|
alias orig_default_ext_dir_for default_ext_dir_for
|
@@ -2291,7 +2291,7 @@ dependencies: []
|
|
2291
2291
|
|
2292
2292
|
Gem::Specification.new do |s|
|
2293
2293
|
s.name = "a".freeze
|
2294
|
-
s.version = "2"
|
2294
|
+
s.version = "2".freeze
|
2295
2295
|
|
2296
2296
|
s.required_rubygems_version = Gem::Requirement.new(\"> 0\".freeze) if s.respond_to? :required_rubygems_version=
|
2297
2297
|
s.require_paths = ["lib".freeze, "other".freeze]
|
@@ -2306,7 +2306,7 @@ Gem::Specification.new do |s|
|
|
2306
2306
|
|
2307
2307
|
s.specification_version = #{Gem::Specification::CURRENT_SPECIFICATION_VERSION}
|
2308
2308
|
|
2309
|
-
s.add_runtime_dependency(%q<b>.freeze, [\"= 1\"])
|
2309
|
+
s.add_runtime_dependency(%q<b>.freeze, [\"= 1\".freeze])
|
2310
2310
|
end
|
2311
2311
|
SPEC
|
2312
2312
|
|
@@ -2331,7 +2331,7 @@ end
|
|
2331
2331
|
|
2332
2332
|
Gem::Specification.new do |s|
|
2333
2333
|
s.name = "a".freeze
|
2334
|
-
s.version = "2"
|
2334
|
+
s.version = "2".freeze
|
2335
2335
|
|
2336
2336
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
2337
2337
|
s.require_paths = ["lib".freeze]
|
@@ -2364,7 +2364,7 @@ end
|
|
2364
2364
|
|
2365
2365
|
Gem::Specification.new do |s|
|
2366
2366
|
s.name = "a".freeze
|
2367
|
-
s.version = "2"
|
2367
|
+
s.version = "2".freeze
|
2368
2368
|
|
2369
2369
|
s.required_rubygems_version = Gem::Requirement.new(\"> 0\".freeze) if s.respond_to? :required_rubygems_version=
|
2370
2370
|
s.require_paths = ["lib".freeze]
|
@@ -2376,11 +2376,11 @@ Gem::Specification.new do |s|
|
|
2376
2376
|
s.rubygems_version = "#{Gem::VERSION}".freeze
|
2377
2377
|
s.summary = "this is a summary".freeze
|
2378
2378
|
|
2379
|
-
s.installed_by_version = "#{Gem::VERSION}" if s.respond_to? :installed_by_version
|
2379
|
+
s.installed_by_version = "#{Gem::VERSION}".freeze if s.respond_to? :installed_by_version
|
2380
2380
|
|
2381
2381
|
s.specification_version = #{Gem::Specification::CURRENT_SPECIFICATION_VERSION}
|
2382
2382
|
|
2383
|
-
s.add_runtime_dependency(%q<b>.freeze, [
|
2383
|
+
s.add_runtime_dependency(%q<b>.freeze, ["= 1".freeze])
|
2384
2384
|
end
|
2385
2385
|
SPEC
|
2386
2386
|
|
@@ -2400,7 +2400,7 @@ end
|
|
2400
2400
|
ruby_code = @c1.to_ruby
|
2401
2401
|
|
2402
2402
|
local = Gem::Platform.local
|
2403
|
-
expected_platform = "[#{local.cpu.inspect}, #{local.os.inspect}, #{local.version.inspect}]"
|
2403
|
+
expected_platform = "[#{local.cpu.inspect}.freeze, #{local.os.inspect}.freeze, #{local.version.inspect}.freeze]"
|
2404
2404
|
stub_require_paths =
|
2405
2405
|
@c1.instance_variable_get(:@require_paths).join "\u0000"
|
2406
2406
|
extensions = @c1.extensions.join "\u0000"
|
@@ -2412,7 +2412,7 @@ end
|
|
2412
2412
|
|
2413
2413
|
Gem::Specification.new do |s|
|
2414
2414
|
s.name = "a".freeze
|
2415
|
-
s.version = "1"
|
2415
|
+
s.version = "1".freeze
|
2416
2416
|
s.platform = Gem::Platform.new(#{expected_platform})
|
2417
2417
|
|
2418
2418
|
s.required_rubygems_version = Gem::Requirement.new(\">= 0\".freeze) if s.respond_to? :required_rubygems_version=
|
@@ -2433,9 +2433,9 @@ Gem::Specification.new do |s|
|
|
2433
2433
|
|
2434
2434
|
s.specification_version = 4
|
2435
2435
|
|
2436
|
-
s.add_runtime_dependency(%q<rake>.freeze, [\"> 0.4\"])
|
2437
|
-
s.add_runtime_dependency(%q<jabber4r>.freeze, [\"> 0.0.0\"])
|
2438
|
-
s.add_runtime_dependency(%q<pqa>.freeze, [\"> 0.4\", \"<= 0.6\"])
|
2436
|
+
s.add_runtime_dependency(%q<rake>.freeze, [\"> 0.4\".freeze])
|
2437
|
+
s.add_runtime_dependency(%q<jabber4r>.freeze, [\"> 0.0.0\".freeze])
|
2438
|
+
s.add_runtime_dependency(%q<pqa>.freeze, [\"> 0.4\".freeze, \"<= 0.6\".freeze])
|
2439
2439
|
end
|
2440
2440
|
SPEC
|
2441
2441
|
|
@@ -2451,7 +2451,7 @@ end
|
|
2451
2451
|
s.add_dependency "b", ["~> 1.0", ">= 1.0.0"]
|
2452
2452
|
end
|
2453
2453
|
|
2454
|
-
assert_includes spec.to_ruby, '"~> 1.0", ">= 1.0.0"'
|
2454
|
+
assert_includes spec.to_ruby, '"~> 1.0".freeze, ">= 1.0.0".freeze'
|
2455
2455
|
end
|
2456
2456
|
|
2457
2457
|
def test_to_ruby_legacy
|
@@ -3350,8 +3350,8 @@ Did you mean 'Ruby'?
|
|
3350
3350
|
util_setup_validate
|
3351
3351
|
|
3352
3352
|
Dir.chdir @tempdir do
|
3353
|
-
File.chmod
|
3354
|
-
File.chmod
|
3353
|
+
File.chmod 0o640, File.join("lib", "code.rb")
|
3354
|
+
File.chmod 0o640, File.join("bin", "exec")
|
3355
3355
|
|
3356
3356
|
use_ui @ui do
|
3357
3357
|
@a1.validate
|
@@ -3499,7 +3499,7 @@ Did you mean 'Ruby'?
|
|
3499
3499
|
capture_output do
|
3500
3500
|
Gem::Specification.load(specfile.path)
|
3501
3501
|
end
|
3502
|
-
rescue => e
|
3502
|
+
rescue StandardError => e
|
3503
3503
|
name_rexp = Regexp.new(Regexp.escape(specfile.path))
|
3504
3504
|
assert e.backtrace.grep(name_rexp).any?
|
3505
3505
|
end
|
@@ -3654,7 +3654,7 @@ Did you mean 'Ruby'?
|
|
3654
3654
|
|
3655
3655
|
Gem::Specification.new do |s|
|
3656
3656
|
s.name = "m".freeze
|
3657
|
-
s.version = "1"
|
3657
|
+
s.version = "1".freeze
|
3658
3658
|
|
3659
3659
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
3660
3660
|
s.metadata = { "one" => "two", "two" => "three" } if s.respond_to? :metadata=
|
@@ -3845,7 +3845,7 @@ end
|
|
3845
3845
|
FileUtils.touch File.join("lib", "code.rb")
|
3846
3846
|
FileUtils.touch File.join("test", "suite.rb")
|
3847
3847
|
|
3848
|
-
File.open "bin/exec", "w",
|
3848
|
+
File.open "bin/exec", "w", 0o755 do |fp|
|
3849
3849
|
fp.puts "#!#{Gem.ruby}"
|
3850
3850
|
end
|
3851
3851
|
ensure
|
@@ -29,9 +29,12 @@ class TestUpdateSuggestion < Gem::TestCase
|
|
29
29
|
reset_last_update_check: true,
|
30
30
|
cmd:
|
31
31
|
)
|
32
|
-
original_config
|
33
|
-
|
34
|
-
|
32
|
+
original_config = Gem.configuration[:prevent_update_suggestion]
|
33
|
+
Gem.configuration[:prevent_update_suggestion] = nil
|
34
|
+
original_env = ENV["RUBYGEMS_PREVENT_UPDATE_SUGGESTION"]
|
35
|
+
ENV["RUBYGEMS_PREVENT_UPDATE_SUGGESTION"] = nil
|
36
|
+
original_disable = Gem.disable_system_update_message
|
37
|
+
Gem.disable_system_update_message = nil
|
35
38
|
Gem.configuration.last_update_check = 0 if reset_last_update_check
|
36
39
|
|
37
40
|
Gem.ui.stub :tty?, tty do
|
@@ -143,7 +146,8 @@ class TestUpdateSuggestion < Gem::TestCase
|
|
143
146
|
|
144
147
|
def test_eglible_for_update_prevent_config
|
145
148
|
with_eglible_environment(cmd: @cmd) do
|
146
|
-
original_config
|
149
|
+
original_config = Gem.configuration[:prevent_update_suggestion]
|
150
|
+
Gem.configuration[:prevent_update_suggestion] = true
|
147
151
|
refute @cmd.eglible_for_update?
|
148
152
|
ensure
|
149
153
|
Gem.configuration[:prevent_update_suggestion] = original_config
|
@@ -152,7 +156,8 @@ class TestUpdateSuggestion < Gem::TestCase
|
|
152
156
|
|
153
157
|
def test_eglible_for_update_prevent_env
|
154
158
|
with_eglible_environment(cmd: @cmd) do
|
155
|
-
original_env
|
159
|
+
original_env = ENV["RUBYGEMS_PREVENT_UPDATE_SUGGESTION"]
|
160
|
+
ENV["RUBYGEMS_PREVENT_UPDATE_SUGGESTION"] = "yes"
|
156
161
|
refute @cmd.eglible_for_update?
|
157
162
|
ensure
|
158
163
|
ENV["RUBYGEMS_PREVENT_UPDATE_SUGGESTION"] = original_env
|
@@ -173,7 +178,8 @@ class TestUpdateSuggestion < Gem::TestCase
|
|
173
178
|
|
174
179
|
def test_eglible_for_update_disabled_update
|
175
180
|
with_eglible_environment(cmd: @cmd) do
|
176
|
-
original_disable
|
181
|
+
original_disable = Gem.disable_system_update_message
|
182
|
+
Gem.disable_system_update_message = "disabled"
|
177
183
|
refute @cmd.eglible_for_update?
|
178
184
|
ensure
|
179
185
|
Gem.disable_system_update_message = original_disable
|
@@ -41,7 +41,7 @@ class TestGemUtil < Gem::TestCase
|
|
41
41
|
FileUtils.mkdir_p "d/e/f"
|
42
42
|
# remove 'execute' permission from "e" directory and make it
|
43
43
|
# impossible to cd into it and its children
|
44
|
-
FileUtils.chmod(
|
44
|
+
FileUtils.chmod(0o666, "d/e")
|
45
45
|
|
46
46
|
pend "skipped in root privilege" if Process.uid.zero?
|
47
47
|
|
@@ -53,7 +53,7 @@ class TestGemUtil < Gem::TestCase
|
|
53
53
|
assert_equal File.realpath("../..", @tempdir), paths[3]
|
54
54
|
ensure
|
55
55
|
# restore default permissions, allow the directory to be removed
|
56
|
-
FileUtils.chmod(
|
56
|
+
FileUtils.chmod(0o775, "d/e") unless win_platform? || java_platform?
|
57
57
|
end
|
58
58
|
|
59
59
|
def test_linked_list_find
|
@@ -269,7 +269,8 @@ class TestGemVersion < Gem::TestCase
|
|
269
269
|
# Assert that two versions are eql?. Checks both directions.
|
270
270
|
|
271
271
|
def assert_version_eql(first, second)
|
272
|
-
first
|
272
|
+
first = v(first)
|
273
|
+
second = v(second)
|
273
274
|
assert first.eql?(second), "#{first} is eql? #{second}"
|
274
275
|
assert second.eql?(first), "#{second} is eql? #{first}"
|
275
276
|
end
|
@@ -290,7 +291,8 @@ class TestGemVersion < Gem::TestCase
|
|
290
291
|
# directions.
|
291
292
|
|
292
293
|
def refute_version_eql(first, second)
|
293
|
-
first
|
294
|
+
first = v(first)
|
295
|
+
second = v(second)
|
294
296
|
refute first.eql?(second), "#{first} is NOT eql? #{second}"
|
295
297
|
refute second.eql?(first), "#{second} is NOT eql? #{first}"
|
296
298
|
end
|
data/test/rubygems/utilities.rb
CHANGED
@@ -120,7 +120,7 @@ class Gem::FakeFetcher
|
|
120
120
|
path = path.to_s
|
121
121
|
@paths << path
|
122
122
|
|
123
|
-
raise ArgumentError, "need full URI" unless
|
123
|
+
raise ArgumentError, "need full URI" unless %r{^http://}.match?(path)
|
124
124
|
|
125
125
|
unless @data.key? path
|
126
126
|
raise Gem::RemoteFetcher::FetchError.new("no data for #{path}", path)
|
@@ -141,7 +141,7 @@ class Gem::FakeFetcher
|
|
141
141
|
|
142
142
|
path = File.join path, name
|
143
143
|
|
144
|
-
if
|
144
|
+
if /^http/.match?(source_uri)
|
145
145
|
File.open(path, "wb") do |f|
|
146
146
|
f.write fetch_path(File.join(source_uri, "gems", name))
|
147
147
|
end
|
@@ -366,7 +366,8 @@ class Gem::TestCase::SpecFetcherSetup
|
|
366
366
|
Gem::Specification.reset
|
367
367
|
|
368
368
|
begin
|
369
|
-
gem_repo
|
369
|
+
gem_repo = @test.gem_repo
|
370
|
+
@test.gem_repo = @repository
|
370
371
|
@test.uri = URI @repository
|
371
372
|
|
372
373
|
@test.util_setup_spec_fetcher(*@downloaded)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubygems-update
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.4.
|
4
|
+
version: 3.4.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: 2023-09
|
19
|
+
date: 2023-11-09 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
|
@@ -384,7 +384,12 @@ files:
|
|
384
384
|
- bundler/lib/bundler/vendor/thor/lib/thor/shell.rb
|
385
385
|
- bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb
|
386
386
|
- bundler/lib/bundler/vendor/thor/lib/thor/shell/color.rb
|
387
|
+
- bundler/lib/bundler/vendor/thor/lib/thor/shell/column_printer.rb
|
387
388
|
- bundler/lib/bundler/vendor/thor/lib/thor/shell/html.rb
|
389
|
+
- bundler/lib/bundler/vendor/thor/lib/thor/shell/lcs_diff.rb
|
390
|
+
- bundler/lib/bundler/vendor/thor/lib/thor/shell/table_printer.rb
|
391
|
+
- bundler/lib/bundler/vendor/thor/lib/thor/shell/terminal.rb
|
392
|
+
- bundler/lib/bundler/vendor/thor/lib/thor/shell/wrapped_printer.rb
|
388
393
|
- bundler/lib/bundler/vendor/thor/lib/thor/util.rb
|
389
394
|
- bundler/lib/bundler/vendor/thor/lib/thor/version.rb
|
390
395
|
- bundler/lib/bundler/vendor/tsort/LICENSE.txt
|
@@ -627,6 +632,7 @@ files:
|
|
627
632
|
- lib/rubygems/validator.rb
|
628
633
|
- lib/rubygems/version.rb
|
629
634
|
- lib/rubygems/version_option.rb
|
635
|
+
- lib/rubygems/yaml_serializer.rb
|
630
636
|
- rubygems-update.gemspec
|
631
637
|
- setup.rb
|
632
638
|
- test/rubygems/alternate_cert.pem
|
@@ -872,7 +878,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
872
878
|
- !ruby/object:Gem::Version
|
873
879
|
version: '0'
|
874
880
|
requirements: []
|
875
|
-
rubygems_version: 3.4.
|
881
|
+
rubygems_version: 3.4.22
|
876
882
|
signing_key:
|
877
883
|
specification_version: 4
|
878
884
|
summary: RubyGems is a package management framework for Ruby. This gem is downloaded
|