rubygems-update 3.2.17 → 3.2.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +39 -0
- data/Manifest.txt +3 -0
- data/Rakefile +6 -6
- data/bundler/CHANGELOG.md +54 -0
- data/bundler/bundler.gemspec +2 -3
- data/bundler/lib/bundler.rb +2 -1
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli.rb +13 -33
- data/bundler/lib/bundler/cli/check.rb +4 -2
- data/bundler/lib/bundler/cli/install.rb +6 -7
- data/bundler/lib/bundler/cli/outdated.rb +9 -10
- data/bundler/lib/bundler/definition.rb +29 -82
- data/bundler/lib/bundler/feature_flag.rb +0 -2
- data/bundler/lib/bundler/fetcher/compact_index.rb +1 -1
- data/bundler/lib/bundler/fetcher/index.rb +0 -1
- data/bundler/lib/bundler/friendly_errors.rb +2 -4
- data/bundler/lib/bundler/index.rb +1 -2
- data/bundler/lib/bundler/installer.rb +1 -8
- 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 -7
- data/bundler/lib/bundler/man/bundle-config.1.ronn +0 -8
- data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
- data/bundler/lib/bundler/man/bundle-exec.1 +1 -1
- data/bundler/lib/bundler/man/bundle-gem.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-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-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/api/source.rb +14 -0
- data/bundler/lib/bundler/resolver.rb +15 -96
- data/bundler/lib/bundler/resolver/spec_group.rb +0 -24
- data/bundler/lib/bundler/rubygems_ext.rb +2 -2
- data/bundler/lib/bundler/rubygems_integration.rb +4 -3
- data/bundler/lib/bundler/settings.rb +21 -3
- data/bundler/lib/bundler/source.rb +11 -0
- data/bundler/lib/bundler/source/rubygems.rb +24 -11
- data/bundler/lib/bundler/source/rubygems_aggregate.rb +64 -0
- data/bundler/lib/bundler/source_list.rb +35 -10
- data/bundler/lib/bundler/source_map.rb +58 -0
- data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +2 -2
- data/bundler/lib/bundler/version.rb +1 -1
- data/lib/rubygems.rb +1 -1
- data/lib/rubygems/command.rb +2 -0
- data/lib/rubygems/commands/build_command.rb +1 -1
- data/lib/rubygems/config_file.rb +1 -1
- data/lib/rubygems/ext/ext_conf_builder.rb +4 -4
- data/lib/rubygems/installer.rb +4 -0
- data/lib/rubygems/request.rb +1 -1
- data/lib/rubygems/specification.rb +0 -2
- data/lib/rubygems/specification_policy.rb +5 -4
- data/lib/rubygems/test_case.rb +106 -18
- data/lib/rubygems/util/licenses.rb +107 -2
- data/rubygems-update.gemspec +1 -1
- data/setup.rb +1 -2
- data/test/rubygems/packages/ill-formatted-platform-1.0.0.10.gem +0 -0
- data/test/rubygems/test_bundled_ca.rb +2 -2
- data/test/rubygems/test_deprecate.rb +3 -3
- data/test/rubygems/test_gem.rb +33 -31
- data/test/rubygems/test_gem_bundler_version_finder.rb +3 -5
- data/test/rubygems/test_gem_command.rb +13 -1
- data/test/rubygems/test_gem_command_manager.rb +5 -5
- data/test/rubygems/test_gem_commands_build_command.rb +10 -10
- data/test/rubygems/test_gem_commands_cert_command.rb +36 -36
- data/test/rubygems/test_gem_commands_check_command.rb +5 -5
- data/test/rubygems/test_gem_commands_cleanup_command.rb +24 -24
- data/test/rubygems/test_gem_commands_contents_command.rb +3 -3
- data/test/rubygems/test_gem_commands_dependency_command.rb +2 -2
- data/test/rubygems/test_gem_commands_environment_command.rb +1 -1
- data/test/rubygems/test_gem_commands_fetch_command.rb +9 -9
- data/test/rubygems/test_gem_commands_help_command.rb +8 -1
- data/test/rubygems/test_gem_commands_install_command.rb +60 -60
- data/test/rubygems/test_gem_commands_list_command.rb +1 -1
- data/test/rubygems/test_gem_commands_lock_command.rb +1 -1
- data/test/rubygems/test_gem_commands_open_command.rb +8 -9
- data/test/rubygems/test_gem_commands_owner_command.rb +3 -3
- data/test/rubygems/test_gem_commands_pristine_command.rb +14 -14
- data/test/rubygems/test_gem_commands_push_command.rb +6 -11
- data/test/rubygems/test_gem_commands_query_command.rb +7 -7
- data/test/rubygems/test_gem_commands_server_command.rb +2 -2
- data/test/rubygems/test_gem_commands_setup_command.rb +21 -21
- data/test/rubygems/test_gem_commands_signin_command.rb +13 -6
- data/test/rubygems/test_gem_commands_sources_command.rb +5 -5
- data/test/rubygems/test_gem_commands_specification_command.rb +6 -6
- data/test/rubygems/test_gem_commands_uninstall_command.rb +4 -4
- data/test/rubygems/test_gem_commands_unpack_command.rb +2 -2
- data/test/rubygems/test_gem_commands_update_command.rb +10 -10
- data/test/rubygems/test_gem_commands_which_command.rb +3 -3
- data/test/rubygems/test_gem_commands_yank_command.rb +1 -1
- data/test/rubygems/test_gem_config_file.rb +9 -9
- data/test/rubygems/test_gem_dependency.rb +12 -6
- data/test/rubygems/test_gem_dependency_installer.rb +4 -4
- data/test/rubygems/test_gem_doctor.rb +30 -30
- data/test/rubygems/test_gem_ext_builder.rb +20 -20
- data/test/rubygems/test_gem_ext_cmake_builder.rb +4 -4
- data/test/rubygems/test_gem_ext_configure_builder.rb +4 -4
- data/test/rubygems/test_gem_ext_ext_conf_builder.rb +14 -13
- data/test/rubygems/test_gem_ext_rake_builder.rb +1 -1
- data/test/rubygems/test_gem_gemcutter_utilities.rb +8 -14
- data/test/rubygems/test_gem_install_update_options.rb +9 -9
- data/test/rubygems/test_gem_installer.rb +162 -140
- data/test/rubygems/test_gem_local_remote_options.rb +1 -1
- data/test/rubygems/test_gem_package.rb +48 -48
- data/test/rubygems/test_gem_package_old.rb +9 -9
- data/test/rubygems/test_gem_package_tar_header.rb +5 -5
- data/test/rubygems/test_gem_package_tar_reader_entry.rb +8 -8
- data/test/rubygems/test_gem_package_tar_writer.rb +18 -20
- data/test/rubygems/test_gem_package_task.rb +2 -2
- data/test/rubygems/test_gem_path_support.rb +1 -1
- data/test/rubygems/test_gem_rdoc.rb +9 -9
- data/test/rubygems/test_gem_remote_fetcher.rb +17 -18
- data/test/rubygems/test_gem_request.rb +2 -2
- data/test/rubygems/test_gem_request_connection_pools.rb +1 -1
- data/test/rubygems/test_gem_request_set.rb +15 -14
- data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +16 -16
- data/test/rubygems/test_gem_request_set_lockfile.rb +3 -3
- data/test/rubygems/test_gem_request_set_lockfile_parser.rb +3 -3
- data/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb +4 -4
- data/test/rubygems/test_gem_requirement.rb +13 -13
- data/test/rubygems/test_gem_resolver.rb +11 -11
- data/test/rubygems/test_gem_resolver_best_set.rb +1 -1
- data/test/rubygems/test_gem_resolver_git_set.rb +1 -1
- data/test/rubygems/test_gem_resolver_git_specification.rb +2 -2
- data/test/rubygems/test_gem_resolver_index_specification.rb +1 -1
- data/test/rubygems/test_gem_resolver_installer_set.rb +4 -4
- data/test/rubygems/test_gem_resolver_local_specification.rb +1 -1
- data/test/rubygems/test_gem_resolver_specification.rb +1 -1
- data/test/rubygems/test_gem_resolver_vendor_set.rb +2 -2
- data/test/rubygems/test_gem_security.rb +5 -5
- data/test/rubygems/test_gem_security_policy.rb +27 -27
- data/test/rubygems/test_gem_security_signer.rb +7 -7
- data/test/rubygems/test_gem_security_trust_dir.rb +4 -4
- data/test/rubygems/test_gem_server.rb +2 -2
- data/test/rubygems/test_gem_silent_ui.rb +9 -9
- data/test/rubygems/test_gem_source.rb +2 -2
- data/test/rubygems/test_gem_source_fetch_problem.rb +1 -1
- data/test/rubygems/test_gem_source_git.rb +11 -11
- data/test/rubygems/test_gem_source_specific_file.rb +1 -1
- data/test/rubygems/test_gem_spec_fetcher.rb +1 -1
- data/test/rubygems/test_gem_specification.rb +86 -106
- data/test/rubygems/test_gem_stream_ui.rb +1 -1
- data/test/rubygems/test_gem_stub_specification.rb +4 -4
- data/test/rubygems/test_gem_uninstaller.rb +16 -16
- data/test/rubygems/test_gem_util.rb +8 -6
- data/test/rubygems/test_gem_version.rb +4 -13
- data/test/rubygems/test_kernel.rb +6 -4
- data/test/rubygems/test_project_sanity.rb +1 -1
- data/test/rubygems/test_remote_fetch_error.rb +1 -1
- data/test/rubygems/test_require.rb +12 -14
- data/test/test_changelog_generator.rb +1 -2
- metadata +6 -3
@@ -65,9 +65,9 @@ class TestStubSpecification < Gem::TestCase
|
|
65
65
|
end
|
66
66
|
|
67
67
|
def test_contains_requirable_file_eh_extension
|
68
|
-
|
68
|
+
pend "I guess making the stub match the running platform should work" if Gem.java_platform?
|
69
69
|
stub_with_extension do |stub|
|
70
|
-
_, err =
|
70
|
+
_, err = capture_output do
|
71
71
|
refute stub.contains_requirable_file? 'nonexistent'
|
72
72
|
end
|
73
73
|
|
@@ -122,7 +122,7 @@ class TestStubSpecification < Gem::TestCase
|
|
122
122
|
end
|
123
123
|
|
124
124
|
def test_missing_extensions_eh
|
125
|
-
|
125
|
+
pend "I guess making the stub match the running platform should work" if Gem.java_platform?
|
126
126
|
stub = stub_with_extension do |s|
|
127
127
|
extconf_rb = File.join s.gem_dir, s.extensions.first
|
128
128
|
FileUtils.mkdir_p File.dirname extconf_rb
|
@@ -189,7 +189,7 @@ class TestStubSpecification < Gem::TestCase
|
|
189
189
|
def test_to_spec_missing_extensions
|
190
190
|
stub = stub_with_extension
|
191
191
|
|
192
|
-
|
192
|
+
capture_output do
|
193
193
|
stub.contains_requirable_file? 'nonexistent'
|
194
194
|
end
|
195
195
|
|
@@ -54,7 +54,7 @@ class TestGemUninstaller < Gem::InstallerTestCase
|
|
54
54
|
uninstaller.remove_all [@spec]
|
55
55
|
end
|
56
56
|
|
57
|
-
|
57
|
+
assert_path_not_exist @spec.gem_dir
|
58
58
|
end
|
59
59
|
|
60
60
|
def test_remove_executables_force_keep
|
@@ -138,7 +138,7 @@ class TestGemUninstaller < Gem::InstallerTestCase
|
|
138
138
|
Dir.mkdir "#{@gemhome}2"
|
139
139
|
uninstaller = Gem::Uninstaller.new nil, :install_dir => "#{@gemhome}2"
|
140
140
|
|
141
|
-
e =
|
141
|
+
e = assert_raise Gem::GemNotInHomeException do
|
142
142
|
use_ui ui do
|
143
143
|
uninstaller.remove @spec
|
144
144
|
end
|
@@ -149,11 +149,11 @@ class TestGemUninstaller < Gem::InstallerTestCase
|
|
149
149
|
|
150
150
|
assert_equal expected, e.message
|
151
151
|
|
152
|
-
|
152
|
+
assert_path_exist @spec.gem_dir
|
153
153
|
end
|
154
154
|
|
155
155
|
def test_remove_symlinked_gem_home
|
156
|
-
|
156
|
+
pend "Symlinks not supported or not enabled" unless symlink_supported?
|
157
157
|
|
158
158
|
Dir.mktmpdir("gem_home") do |dir|
|
159
159
|
symlinked_gem_home = "#{dir}/#{File.basename(@gemhome)}"
|
@@ -166,7 +166,7 @@ class TestGemUninstaller < Gem::InstallerTestCase
|
|
166
166
|
uninstaller.remove @spec
|
167
167
|
end
|
168
168
|
|
169
|
-
|
169
|
+
assert_path_not_exist @spec.gem_dir
|
170
170
|
end
|
171
171
|
end
|
172
172
|
|
@@ -297,7 +297,7 @@ class TestGemUninstaller < Gem::InstallerTestCase
|
|
297
297
|
|
298
298
|
uninstaller.uninstall
|
299
299
|
|
300
|
-
|
300
|
+
assert_path_not_exist spec.gem_dir
|
301
301
|
end
|
302
302
|
|
303
303
|
def test_uninstall_extension
|
@@ -318,18 +318,18 @@ create_makefile '#{@spec.name}'
|
|
318
318
|
installer.install
|
319
319
|
end
|
320
320
|
|
321
|
-
|
321
|
+
assert_path_exist @spec.extension_dir, 'sanity check'
|
322
322
|
|
323
323
|
uninstaller = Gem::Uninstaller.new @spec.name, :executables => true
|
324
324
|
uninstaller.uninstall
|
325
325
|
|
326
|
-
|
326
|
+
assert_path_not_exist @spec.extension_dir
|
327
327
|
end
|
328
328
|
|
329
329
|
def test_uninstall_nonexistent
|
330
330
|
uninstaller = Gem::Uninstaller.new 'bogus', :executables => true
|
331
331
|
|
332
|
-
e =
|
332
|
+
e = assert_raise Gem::InstallError do
|
333
333
|
uninstaller.uninstall
|
334
334
|
end
|
335
335
|
|
@@ -351,7 +351,7 @@ create_makefile '#{@spec.name}'
|
|
351
351
|
|
352
352
|
ui = Gem::MockGemUi.new "n\n"
|
353
353
|
|
354
|
-
|
354
|
+
assert_raise Gem::DependencyRemovalException do
|
355
355
|
use_ui ui do
|
356
356
|
uninstaller.uninstall
|
357
357
|
end
|
@@ -371,16 +371,16 @@ create_makefile '#{@spec.name}'
|
|
371
371
|
gem_dir = File.join @user_spec.gem_dir
|
372
372
|
|
373
373
|
Gem.pre_uninstall do
|
374
|
-
|
374
|
+
assert_path_exist gem_dir
|
375
375
|
end
|
376
376
|
|
377
377
|
Gem.post_uninstall do
|
378
|
-
|
378
|
+
assert_path_not_exist gem_dir
|
379
379
|
end
|
380
380
|
|
381
381
|
uninstaller.uninstall
|
382
382
|
|
383
|
-
|
383
|
+
assert_path_not_exist gem_dir
|
384
384
|
|
385
385
|
assert_same uninstaller, @pre_uninstall_hook_arg
|
386
386
|
assert_same uninstaller, @post_uninstall_hook_arg
|
@@ -392,7 +392,7 @@ create_makefile '#{@spec.name}'
|
|
392
392
|
|
393
393
|
uninstaller = Gem::Uninstaller.new @spec.name, :executables => true
|
394
394
|
|
395
|
-
e =
|
395
|
+
e = assert_raise Gem::InstallError do
|
396
396
|
uninstaller.uninstall
|
397
397
|
end
|
398
398
|
|
@@ -546,7 +546,7 @@ create_makefile '#{@spec.name}'
|
|
546
546
|
un = Gem::Uninstaller.new('q', :abort_on_dependent => true)
|
547
547
|
ui = Gem::MockGemUi.new("y\n")
|
548
548
|
|
549
|
-
|
549
|
+
assert_raise Gem::DependencyRemovalException do
|
550
550
|
use_ui ui do
|
551
551
|
un.uninstall
|
552
552
|
end
|
@@ -619,7 +619,7 @@ create_makefile '#{@spec.name}'
|
|
619
619
|
end
|
620
620
|
|
621
621
|
FileUtils.stub :rm_r, stub_rm_r do
|
622
|
-
|
622
|
+
assert_raise Gem::UninstallError do
|
623
623
|
uninstaller.uninstall
|
624
624
|
end
|
625
625
|
end
|
@@ -4,20 +4,22 @@ require 'rubygems/util'
|
|
4
4
|
|
5
5
|
class TestGemUtil < Gem::TestCase
|
6
6
|
def test_class_popen
|
7
|
-
|
7
|
+
pend "popen with a block does not behave well on jruby" if Gem.java_platform?
|
8
8
|
assert_equal "0\n", Gem::Util.popen(*ruby_with_rubygems_in_load_path, '-e', 'p 0')
|
9
9
|
|
10
|
-
|
10
|
+
assert_raise Errno::ECHILD do
|
11
11
|
Process.wait(-1)
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
15
|
def test_silent_system
|
16
|
-
|
16
|
+
pend if Gem.java_platform?
|
17
17
|
Gem::Deprecate.skip_during do
|
18
|
-
|
18
|
+
out, err = capture_output do
|
19
19
|
Gem::Util.silent_system(*ruby_with_rubygems_in_load_path, '-e', 'puts "hello"; warn "hello"')
|
20
20
|
end
|
21
|
+
assert_empty out
|
22
|
+
assert_empty err
|
21
23
|
end
|
22
24
|
end
|
23
25
|
|
@@ -33,14 +35,14 @@ class TestGemUtil < Gem::TestCase
|
|
33
35
|
end
|
34
36
|
|
35
37
|
def test_traverse_parents_does_not_crash_on_permissions_error
|
36
|
-
|
38
|
+
pend 'skipped on MS Windows (chmod has no effect)' if win_platform? || java_platform?
|
37
39
|
|
38
40
|
FileUtils.mkdir_p 'd/e/f'
|
39
41
|
# remove 'execute' permission from "e" directory and make it
|
40
42
|
# impossible to cd into it and its children
|
41
43
|
FileUtils.chmod(0666, 'd/e')
|
42
44
|
|
43
|
-
|
45
|
+
pend 'skipped in root privilege' if Process.uid.zero?
|
44
46
|
|
45
47
|
paths = Gem::Util.traverse_parents('d/e/f').to_a
|
46
48
|
|
@@ -2,8 +2,6 @@
|
|
2
2
|
require 'rubygems/test_case'
|
3
3
|
require "rubygems/version"
|
4
4
|
|
5
|
-
require "minitest/benchmark"
|
6
|
-
|
7
5
|
class TestGemVersion < Gem::TestCase
|
8
6
|
class V < ::Gem::Version
|
9
7
|
end
|
@@ -47,9 +45,11 @@ class TestGemVersion < Gem::TestCase
|
|
47
45
|
assert_equal false, Gem::Version.correct?("an incorrect version")
|
48
46
|
|
49
47
|
expected = "nil versions are discouraged and will be deprecated in Rubygems 4\n"
|
50
|
-
|
48
|
+
actual_stdout, actual_stderr = capture_output do
|
51
49
|
Gem::Version.correct?(nil)
|
52
50
|
end
|
51
|
+
assert_empty actual_stdout
|
52
|
+
assert_equal(expected, actual_stderr)
|
53
53
|
end
|
54
54
|
|
55
55
|
def test_class_new_subclass
|
@@ -100,7 +100,7 @@ class TestGemVersion < Gem::TestCase
|
|
100
100
|
invalid_versions << "2.3422222.222.222222222.22222.ads0as.dasd0.ddd2222.2.qd3e."
|
101
101
|
|
102
102
|
invalid_versions.each do |invalid|
|
103
|
-
e =
|
103
|
+
e = assert_raise ArgumentError, invalid do
|
104
104
|
Gem::Version.new invalid
|
105
105
|
end
|
106
106
|
|
@@ -108,15 +108,6 @@ class TestGemVersion < Gem::TestCase
|
|
108
108
|
end
|
109
109
|
end
|
110
110
|
|
111
|
-
def bench_anchored_version_pattern
|
112
|
-
assert_performance_linear 0.5 do |count|
|
113
|
-
version_string = count.times.map {|i| "0" * i.succ }.join(".") << "."
|
114
|
-
version_string =~ Gem::Version::ANCHORED_VERSION_PATTERN
|
115
|
-
end
|
116
|
-
rescue RegexpError
|
117
|
-
skip "It fails to allocate the memory for regex pattern of Gem::Version::ANCHORED_VERSION_PATTERN"
|
118
|
-
end
|
119
|
-
|
120
111
|
def test_empty_version
|
121
112
|
["", " ", " "].each do |empty|
|
122
113
|
assert_equal "0", Gem::Version.new(empty).version
|
@@ -8,6 +8,8 @@ class TestKernel < Gem::TestCase
|
|
8
8
|
@old_path = $:.dup
|
9
9
|
|
10
10
|
util_make_gems
|
11
|
+
|
12
|
+
without_any_upwards_gemfiles
|
11
13
|
end
|
12
14
|
|
13
15
|
def teardown
|
@@ -38,7 +40,7 @@ class TestKernel < Gem::TestCase
|
|
38
40
|
def test_gem_re_gem_mismatch
|
39
41
|
assert gem('a', '=1')
|
40
42
|
|
41
|
-
|
43
|
+
assert_raise Gem::LoadError do
|
42
44
|
gem('a', '= 2')
|
43
45
|
end
|
44
46
|
|
@@ -65,7 +67,7 @@ class TestKernel < Gem::TestCase
|
|
65
67
|
|
66
68
|
def test_gem_env_req
|
67
69
|
ENV["GEM_REQUIREMENT_A"] = '~> 2.0'
|
68
|
-
|
70
|
+
assert_raise(Gem::MissingSpecVersionError) { gem('a', '= 1') }
|
69
71
|
assert gem('a', '> 1')
|
70
72
|
assert_equal @a2, Gem.loaded_specs['a']
|
71
73
|
end
|
@@ -73,7 +75,7 @@ class TestKernel < Gem::TestCase
|
|
73
75
|
def test_gem_conflicting
|
74
76
|
assert gem('a', '= 1'), "Should load"
|
75
77
|
|
76
|
-
ex =
|
78
|
+
ex = assert_raise Gem::LoadError do
|
77
79
|
gem 'a', '= 2'
|
78
80
|
end
|
79
81
|
|
@@ -120,7 +122,7 @@ class TestKernel < Gem::TestCase
|
|
120
122
|
quick_gem 'bundler', '1'
|
121
123
|
quick_gem 'bundler', '2.a'
|
122
124
|
|
123
|
-
e =
|
125
|
+
e = assert_raise Gem::MissingSpecVersionError do
|
124
126
|
gem('bundler')
|
125
127
|
end
|
126
128
|
assert_match "Could not find 'bundler' (55) required by reason.", e.message
|
@@ -5,7 +5,7 @@ require "open3"
|
|
5
5
|
|
6
6
|
class TestProjectSanity < Gem::TestCase
|
7
7
|
def test_manifest_is_up_to_date
|
8
|
-
|
8
|
+
pend unless File.exist?(File.expand_path("../../../Rakefile", __FILE__))
|
9
9
|
|
10
10
|
_, status = Open3.capture2e("rake check_manifest")
|
11
11
|
|
@@ -4,7 +4,7 @@ require 'rubygems/test_case'
|
|
4
4
|
class TestRemoteFetchError < Gem::TestCase
|
5
5
|
def test_password_redacted
|
6
6
|
error = Gem::RemoteFetcher::FetchError.new('There was an error fetching', 'https://user:secret@gemsource.org')
|
7
|
-
refute_match
|
7
|
+
refute_match %r{secret}, error.to_s
|
8
8
|
end
|
9
9
|
|
10
10
|
def test_invalid_url
|
@@ -28,7 +28,7 @@ class TestGemRequire < Gem::TestCase
|
|
28
28
|
super
|
29
29
|
|
30
30
|
@old_loaded_features = $LOADED_FEATURES.dup
|
31
|
-
|
31
|
+
assert_raise LoadError do
|
32
32
|
require 'test_gem_require_a'
|
33
33
|
end
|
34
34
|
$LOADED_FEATURES.replace @old_loaded_features
|
@@ -147,8 +147,8 @@ class TestGemRequire < Gem::TestCase
|
|
147
147
|
end
|
148
148
|
|
149
149
|
def test_dash_i_respects_default_library_extension_priority
|
150
|
-
|
151
|
-
|
150
|
+
pend "extensions don't quite work on jruby" if Gem.java_platform?
|
151
|
+
pend "not installed yet" unless RbConfig::TOPDIR
|
152
152
|
|
153
153
|
dash_i_ext_arg = util_install_extension_file('a')
|
154
154
|
dash_i_lib_arg = util_install_ruby_file('a')
|
@@ -245,12 +245,12 @@ class TestGemRequire < Gem::TestCase
|
|
245
245
|
end
|
246
246
|
|
247
247
|
def test_activate_via_require_respects_loaded_files
|
248
|
-
|
248
|
+
pend "Not sure what's going on. If another spec creates a 'a' gem before
|
249
249
|
this test, somehow require will load the benchmark in b, and ignore that the
|
250
250
|
stdlib one is already in $LOADED_FEATURES?. Reproducible by running the
|
251
251
|
spaceship_specific_file test before this one" if java_platform?
|
252
252
|
|
253
|
-
|
253
|
+
pend "not installed yet" unless RbConfig::TOPDIR
|
254
254
|
|
255
255
|
lib_dir = File.expand_path("../../lib", File.dirname(__FILE__))
|
256
256
|
rubylibdir = File.realdirpath(RbConfig::CONFIG["rubylibdir"])
|
@@ -359,7 +359,7 @@ class TestGemRequire < Gem::TestCase
|
|
359
359
|
assert_equal %w[a-1 c-1], loaded_spec_names
|
360
360
|
assert_equal ["b (> 0)", "x (> 0)"], unresolved_names
|
361
361
|
|
362
|
-
e =
|
362
|
+
e = assert_raise(Gem::LoadError) do
|
363
363
|
require("ib")
|
364
364
|
end
|
365
365
|
|
@@ -382,7 +382,7 @@ class TestGemRequire < Gem::TestCase
|
|
382
382
|
assert_equal %w[a-1 c-1], loaded_spec_names
|
383
383
|
assert_equal ["b (> 0)"], unresolved_names
|
384
384
|
|
385
|
-
e =
|
385
|
+
e = assert_raise(Gem::LoadError) do
|
386
386
|
require("ib")
|
387
387
|
end
|
388
388
|
|
@@ -467,7 +467,7 @@ class TestGemRequire < Gem::TestCase
|
|
467
467
|
|
468
468
|
def test_realworld_default_gem
|
469
469
|
testing_ruby_repo = !ENV["GEM_COMMAND"].nil?
|
470
|
-
|
470
|
+
pend "this test can't work under ruby-core setup" if testing_ruby_repo || java_platform?
|
471
471
|
|
472
472
|
cmd = <<-RUBY
|
473
473
|
$stderr = $stdout
|
@@ -481,7 +481,7 @@ class TestGemRequire < Gem::TestCase
|
|
481
481
|
|
482
482
|
def test_realworld_upgraded_default_gem
|
483
483
|
testing_ruby_repo = !ENV["GEM_COMMAND"].nil?
|
484
|
-
|
484
|
+
pend "this test can't work under ruby-core setup" if testing_ruby_repo
|
485
485
|
|
486
486
|
newer_json = util_spec("json", "999.99.9", nil, ["lib/json.rb"])
|
487
487
|
install_gem newer_json
|
@@ -626,7 +626,7 @@ class TestGemRequire < Gem::TestCase
|
|
626
626
|
b2a = util_spec('bundler', '2.a', nil, "lib/bundler/setup.rb")
|
627
627
|
install_specs b1, b2a
|
628
628
|
|
629
|
-
e =
|
629
|
+
e = assert_raise Gem::MissingSpecVersionError do
|
630
630
|
gem('bundler')
|
631
631
|
end
|
632
632
|
assert_match "Could not find 'bundler' (55) required by reason.", e.message
|
@@ -679,8 +679,6 @@ class TestGemRequire < Gem::TestCase
|
|
679
679
|
end
|
680
680
|
|
681
681
|
def test_no_crash_when_overriding_warn_with_warning_module
|
682
|
-
skip "https://github.com/oracle/truffleruby/issues/2109" if RUBY_ENGINE == "truffleruby"
|
683
|
-
|
684
682
|
Dir.mktmpdir("warn_test") do |dir|
|
685
683
|
File.write(dir + "/main.rb", "module Warning; def warn(str); super; end; end; warn 'Foo Bar'")
|
686
684
|
_, err = capture_subprocess_io do
|
@@ -753,12 +751,12 @@ class TestGemRequire < Gem::TestCase
|
|
753
751
|
spec.files += ["extconf.rb", "depend", "#{name}.c"]
|
754
752
|
|
755
753
|
so = File.join(spec.gem_dir, "#{name}.#{RbConfig::CONFIG["DLEXT"]}")
|
756
|
-
|
754
|
+
assert_path_not_exist so
|
757
755
|
|
758
756
|
path = Gem::Package.build spec
|
759
757
|
installer = Gem::Installer.at path
|
760
758
|
installer.install
|
761
|
-
|
759
|
+
assert_path_exist so
|
762
760
|
|
763
761
|
spec.gem_dir
|
764
762
|
end
|
@@ -1,10 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "minitest/autorun"
|
4
3
|
require_relative "../util/changelog"
|
5
4
|
require "rubygems/commands/setup_command"
|
6
5
|
|
7
|
-
class ChangelogTest <
|
6
|
+
class ChangelogTest < Test::Unit::TestCase
|
8
7
|
def setup
|
9
8
|
@changelog = Changelog.for_rubygems(Gem::VERSION)
|
10
9
|
end
|
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.2.
|
4
|
+
version: 3.2.21
|
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: 2021-
|
19
|
+
date: 2021-06-23 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
|
@@ -236,7 +236,9 @@ files:
|
|
236
236
|
- bundler/lib/bundler/source/path/installer.rb
|
237
237
|
- bundler/lib/bundler/source/rubygems.rb
|
238
238
|
- bundler/lib/bundler/source/rubygems/remote.rb
|
239
|
+
- bundler/lib/bundler/source/rubygems_aggregate.rb
|
239
240
|
- bundler/lib/bundler/source_list.rb
|
241
|
+
- bundler/lib/bundler/source_map.rb
|
240
242
|
- bundler/lib/bundler/spec_set.rb
|
241
243
|
- bundler/lib/bundler/stub_specification.rb
|
242
244
|
- bundler/lib/bundler/templates/.document
|
@@ -592,6 +594,7 @@ files:
|
|
592
594
|
- test/rubygems/invalidchild_cert_32.pem
|
593
595
|
- test/rubygems/invalidchild_key.pem
|
594
596
|
- test/rubygems/packages/ascii_binder-0.1.10.1.gem
|
597
|
+
- test/rubygems/packages/ill-formatted-platform-1.0.0.10.gem
|
595
598
|
- test/rubygems/plugin/exception/rubygems_plugin.rb
|
596
599
|
- test/rubygems/plugin/load/rubygems_plugin.rb
|
597
600
|
- test/rubygems/plugin/standarderror/rubygems_plugin.rb
|
@@ -769,7 +772,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
769
772
|
- !ruby/object:Gem::Version
|
770
773
|
version: '0'
|
771
774
|
requirements: []
|
772
|
-
rubygems_version: 3.2.
|
775
|
+
rubygems_version: 3.2.21
|
773
776
|
signing_key:
|
774
777
|
specification_version: 4
|
775
778
|
summary: RubyGems is a package management framework for Ruby.
|