rubygems-update 3.2.17 → 3.2.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +39 -0
  3. data/Manifest.txt +3 -0
  4. data/Rakefile +6 -6
  5. data/bundler/CHANGELOG.md +54 -0
  6. data/bundler/bundler.gemspec +2 -3
  7. data/bundler/lib/bundler.rb +2 -1
  8. data/bundler/lib/bundler/build_metadata.rb +2 -2
  9. data/bundler/lib/bundler/cli.rb +13 -33
  10. data/bundler/lib/bundler/cli/check.rb +4 -2
  11. data/bundler/lib/bundler/cli/install.rb +6 -7
  12. data/bundler/lib/bundler/cli/outdated.rb +9 -10
  13. data/bundler/lib/bundler/definition.rb +29 -82
  14. data/bundler/lib/bundler/feature_flag.rb +0 -2
  15. data/bundler/lib/bundler/fetcher/compact_index.rb +1 -1
  16. data/bundler/lib/bundler/fetcher/index.rb +0 -1
  17. data/bundler/lib/bundler/friendly_errors.rb +2 -4
  18. data/bundler/lib/bundler/index.rb +1 -2
  19. data/bundler/lib/bundler/installer.rb +1 -8
  20. data/bundler/lib/bundler/man/bundle-add.1 +1 -1
  21. data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
  22. data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
  23. data/bundler/lib/bundler/man/bundle-check.1 +1 -1
  24. data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
  25. data/bundler/lib/bundler/man/bundle-config.1 +1 -7
  26. data/bundler/lib/bundler/man/bundle-config.1.ronn +0 -8
  27. data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
  28. data/bundler/lib/bundler/man/bundle-exec.1 +1 -1
  29. data/bundler/lib/bundler/man/bundle-gem.1 +1 -1
  30. data/bundler/lib/bundler/man/bundle-info.1 +1 -1
  31. data/bundler/lib/bundler/man/bundle-init.1 +1 -1
  32. data/bundler/lib/bundler/man/bundle-inject.1 +1 -1
  33. data/bundler/lib/bundler/man/bundle-install.1 +1 -1
  34. data/bundler/lib/bundler/man/bundle-list.1 +1 -1
  35. data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
  36. data/bundler/lib/bundler/man/bundle-open.1 +1 -1
  37. data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
  38. data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
  39. data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
  40. data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
  41. data/bundler/lib/bundler/man/bundle-show.1 +1 -1
  42. data/bundler/lib/bundler/man/bundle-update.1 +1 -1
  43. data/bundler/lib/bundler/man/bundle-viz.1 +1 -1
  44. data/bundler/lib/bundler/man/bundle.1 +1 -1
  45. data/bundler/lib/bundler/man/gemfile.5 +1 -1
  46. data/bundler/lib/bundler/plugin/api/source.rb +14 -0
  47. data/bundler/lib/bundler/resolver.rb +15 -96
  48. data/bundler/lib/bundler/resolver/spec_group.rb +0 -24
  49. data/bundler/lib/bundler/rubygems_ext.rb +2 -2
  50. data/bundler/lib/bundler/rubygems_integration.rb +4 -3
  51. data/bundler/lib/bundler/settings.rb +21 -3
  52. data/bundler/lib/bundler/source.rb +11 -0
  53. data/bundler/lib/bundler/source/rubygems.rb +24 -11
  54. data/bundler/lib/bundler/source/rubygems_aggregate.rb +64 -0
  55. data/bundler/lib/bundler/source_list.rb +35 -10
  56. data/bundler/lib/bundler/source_map.rb +58 -0
  57. data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +2 -2
  58. data/bundler/lib/bundler/version.rb +1 -1
  59. data/lib/rubygems.rb +1 -1
  60. data/lib/rubygems/command.rb +2 -0
  61. data/lib/rubygems/commands/build_command.rb +1 -1
  62. data/lib/rubygems/config_file.rb +1 -1
  63. data/lib/rubygems/ext/ext_conf_builder.rb +4 -4
  64. data/lib/rubygems/installer.rb +4 -0
  65. data/lib/rubygems/request.rb +1 -1
  66. data/lib/rubygems/specification.rb +0 -2
  67. data/lib/rubygems/specification_policy.rb +5 -4
  68. data/lib/rubygems/test_case.rb +106 -18
  69. data/lib/rubygems/util/licenses.rb +107 -2
  70. data/rubygems-update.gemspec +1 -1
  71. data/setup.rb +1 -2
  72. data/test/rubygems/packages/ill-formatted-platform-1.0.0.10.gem +0 -0
  73. data/test/rubygems/test_bundled_ca.rb +2 -2
  74. data/test/rubygems/test_deprecate.rb +3 -3
  75. data/test/rubygems/test_gem.rb +33 -31
  76. data/test/rubygems/test_gem_bundler_version_finder.rb +3 -5
  77. data/test/rubygems/test_gem_command.rb +13 -1
  78. data/test/rubygems/test_gem_command_manager.rb +5 -5
  79. data/test/rubygems/test_gem_commands_build_command.rb +10 -10
  80. data/test/rubygems/test_gem_commands_cert_command.rb +36 -36
  81. data/test/rubygems/test_gem_commands_check_command.rb +5 -5
  82. data/test/rubygems/test_gem_commands_cleanup_command.rb +24 -24
  83. data/test/rubygems/test_gem_commands_contents_command.rb +3 -3
  84. data/test/rubygems/test_gem_commands_dependency_command.rb +2 -2
  85. data/test/rubygems/test_gem_commands_environment_command.rb +1 -1
  86. data/test/rubygems/test_gem_commands_fetch_command.rb +9 -9
  87. data/test/rubygems/test_gem_commands_help_command.rb +8 -1
  88. data/test/rubygems/test_gem_commands_install_command.rb +60 -60
  89. data/test/rubygems/test_gem_commands_list_command.rb +1 -1
  90. data/test/rubygems/test_gem_commands_lock_command.rb +1 -1
  91. data/test/rubygems/test_gem_commands_open_command.rb +8 -9
  92. data/test/rubygems/test_gem_commands_owner_command.rb +3 -3
  93. data/test/rubygems/test_gem_commands_pristine_command.rb +14 -14
  94. data/test/rubygems/test_gem_commands_push_command.rb +6 -11
  95. data/test/rubygems/test_gem_commands_query_command.rb +7 -7
  96. data/test/rubygems/test_gem_commands_server_command.rb +2 -2
  97. data/test/rubygems/test_gem_commands_setup_command.rb +21 -21
  98. data/test/rubygems/test_gem_commands_signin_command.rb +13 -6
  99. data/test/rubygems/test_gem_commands_sources_command.rb +5 -5
  100. data/test/rubygems/test_gem_commands_specification_command.rb +6 -6
  101. data/test/rubygems/test_gem_commands_uninstall_command.rb +4 -4
  102. data/test/rubygems/test_gem_commands_unpack_command.rb +2 -2
  103. data/test/rubygems/test_gem_commands_update_command.rb +10 -10
  104. data/test/rubygems/test_gem_commands_which_command.rb +3 -3
  105. data/test/rubygems/test_gem_commands_yank_command.rb +1 -1
  106. data/test/rubygems/test_gem_config_file.rb +9 -9
  107. data/test/rubygems/test_gem_dependency.rb +12 -6
  108. data/test/rubygems/test_gem_dependency_installer.rb +4 -4
  109. data/test/rubygems/test_gem_doctor.rb +30 -30
  110. data/test/rubygems/test_gem_ext_builder.rb +20 -20
  111. data/test/rubygems/test_gem_ext_cmake_builder.rb +4 -4
  112. data/test/rubygems/test_gem_ext_configure_builder.rb +4 -4
  113. data/test/rubygems/test_gem_ext_ext_conf_builder.rb +14 -13
  114. data/test/rubygems/test_gem_ext_rake_builder.rb +1 -1
  115. data/test/rubygems/test_gem_gemcutter_utilities.rb +8 -14
  116. data/test/rubygems/test_gem_install_update_options.rb +9 -9
  117. data/test/rubygems/test_gem_installer.rb +162 -140
  118. data/test/rubygems/test_gem_local_remote_options.rb +1 -1
  119. data/test/rubygems/test_gem_package.rb +48 -48
  120. data/test/rubygems/test_gem_package_old.rb +9 -9
  121. data/test/rubygems/test_gem_package_tar_header.rb +5 -5
  122. data/test/rubygems/test_gem_package_tar_reader_entry.rb +8 -8
  123. data/test/rubygems/test_gem_package_tar_writer.rb +18 -20
  124. data/test/rubygems/test_gem_package_task.rb +2 -2
  125. data/test/rubygems/test_gem_path_support.rb +1 -1
  126. data/test/rubygems/test_gem_rdoc.rb +9 -9
  127. data/test/rubygems/test_gem_remote_fetcher.rb +17 -18
  128. data/test/rubygems/test_gem_request.rb +2 -2
  129. data/test/rubygems/test_gem_request_connection_pools.rb +1 -1
  130. data/test/rubygems/test_gem_request_set.rb +15 -14
  131. data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +16 -16
  132. data/test/rubygems/test_gem_request_set_lockfile.rb +3 -3
  133. data/test/rubygems/test_gem_request_set_lockfile_parser.rb +3 -3
  134. data/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb +4 -4
  135. data/test/rubygems/test_gem_requirement.rb +13 -13
  136. data/test/rubygems/test_gem_resolver.rb +11 -11
  137. data/test/rubygems/test_gem_resolver_best_set.rb +1 -1
  138. data/test/rubygems/test_gem_resolver_git_set.rb +1 -1
  139. data/test/rubygems/test_gem_resolver_git_specification.rb +2 -2
  140. data/test/rubygems/test_gem_resolver_index_specification.rb +1 -1
  141. data/test/rubygems/test_gem_resolver_installer_set.rb +4 -4
  142. data/test/rubygems/test_gem_resolver_local_specification.rb +1 -1
  143. data/test/rubygems/test_gem_resolver_specification.rb +1 -1
  144. data/test/rubygems/test_gem_resolver_vendor_set.rb +2 -2
  145. data/test/rubygems/test_gem_security.rb +5 -5
  146. data/test/rubygems/test_gem_security_policy.rb +27 -27
  147. data/test/rubygems/test_gem_security_signer.rb +7 -7
  148. data/test/rubygems/test_gem_security_trust_dir.rb +4 -4
  149. data/test/rubygems/test_gem_server.rb +2 -2
  150. data/test/rubygems/test_gem_silent_ui.rb +9 -9
  151. data/test/rubygems/test_gem_source.rb +2 -2
  152. data/test/rubygems/test_gem_source_fetch_problem.rb +1 -1
  153. data/test/rubygems/test_gem_source_git.rb +11 -11
  154. data/test/rubygems/test_gem_source_specific_file.rb +1 -1
  155. data/test/rubygems/test_gem_spec_fetcher.rb +1 -1
  156. data/test/rubygems/test_gem_specification.rb +86 -106
  157. data/test/rubygems/test_gem_stream_ui.rb +1 -1
  158. data/test/rubygems/test_gem_stub_specification.rb +4 -4
  159. data/test/rubygems/test_gem_uninstaller.rb +16 -16
  160. data/test/rubygems/test_gem_util.rb +8 -6
  161. data/test/rubygems/test_gem_version.rb +4 -13
  162. data/test/rubygems/test_kernel.rb +6 -4
  163. data/test/rubygems/test_project_sanity.rb +1 -1
  164. data/test/rubygems/test_remote_fetch_error.rb +1 -1
  165. data/test/rubygems/test_require.rb +12 -14
  166. data/test/test_changelog_generator.rb +1 -2
  167. metadata +6 -3
@@ -162,7 +162,7 @@ class TestGemCommandsSourcesCommand < Gem::TestCase
162
162
 
163
163
  use_ui ui do
164
164
 
165
- assert_raises Gem::MockGemUi::TermError do
165
+ assert_raise Gem::MockGemUi::TermError do
166
166
  @cmd.execute
167
167
  end
168
168
  end
@@ -188,7 +188,7 @@ class TestGemCommandsSourcesCommand < Gem::TestCase
188
188
  @cmd.handle_options %w[--add http://beta-gems.example.com]
189
189
 
190
190
  use_ui @ui do
191
- assert_raises Gem::MockGemUi::TermError do
191
+ assert_raise Gem::MockGemUi::TermError do
192
192
  @cmd.execute
193
193
  end
194
194
  end
@@ -299,7 +299,7 @@ source http://gems.example.com/ already present in the cache
299
299
  ui = Gem::MockGemUi.new "n"
300
300
 
301
301
  use_ui ui do
302
- assert_raises Gem::MockGemUi::TermError do
302
+ assert_raise Gem::MockGemUi::TermError do
303
303
  @cmd.execute
304
304
  end
305
305
  end
@@ -367,7 +367,7 @@ source http://gems.example.com/ already present in the cache
367
367
  ui = Gem::MockGemUi.new "n"
368
368
 
369
369
  use_ui ui do
370
- assert_raises Gem::MockGemUi::TermError do
370
+ assert_raise Gem::MockGemUi::TermError do
371
371
  @cmd.execute
372
372
  end
373
373
  end
@@ -385,7 +385,7 @@ source http://gems.example.com/ already present in the cache
385
385
  @cmd.handle_options %w[--add beta-gems.example.com]
386
386
 
387
387
  use_ui @ui do
388
- assert_raises Gem::MockGemUi::TermError do
388
+ assert_raise Gem::MockGemUi::TermError do
389
389
  @cmd.execute
390
390
  end
391
391
  end
@@ -51,7 +51,7 @@ class TestGemCommandsSpecificationCommand < Gem::TestCase
51
51
  @cmd.options[:all] = true
52
52
  @cmd.options[:version] = "1"
53
53
 
54
- assert_raises Gem::MockGemUi::TermError do
54
+ assert_raise Gem::MockGemUi::TermError do
55
55
  use_ui @ui do
56
56
  @cmd.execute
57
57
  end
@@ -64,7 +64,7 @@ class TestGemCommandsSpecificationCommand < Gem::TestCase
64
64
  def test_execute_bad_name
65
65
  @cmd.options[:args] = %w[foo]
66
66
 
67
- assert_raises Gem::MockGemUi::TermError do
67
+ assert_raise Gem::MockGemUi::TermError do
68
68
  use_ui @ui do
69
69
  @cmd.execute
70
70
  end
@@ -78,7 +78,7 @@ class TestGemCommandsSpecificationCommand < Gem::TestCase
78
78
  @cmd.options[:args] = %w[foo]
79
79
  @cmd.options[:version] = "1.3.2"
80
80
 
81
- assert_raises Gem::MockGemUi::TermError do
81
+ assert_raise Gem::MockGemUi::TermError do
82
82
  use_ui @ui do
83
83
  @cmd.execute
84
84
  end
@@ -114,7 +114,7 @@ class TestGemCommandsSpecificationCommand < Gem::TestCase
114
114
  @cmd.execute
115
115
  end
116
116
 
117
- assert_equal "foo", YAML.load(@ui.output)
117
+ assert_equal "foo", load_yaml(@ui.output)
118
118
  end
119
119
 
120
120
  def test_execute_file
@@ -230,7 +230,7 @@ class TestGemCommandsSpecificationCommand < Gem::TestCase
230
230
  assert_match %r{\A--- !ruby/object:Gem::Specification}, @ui.output
231
231
  assert_match %r{name: foo}, @ui.output
232
232
 
233
- spec = YAML.load @ui.output
233
+ spec = load_yaml @ui.output
234
234
 
235
235
  assert_equal Gem::Version.new("2.0.0"), spec.version
236
236
  end
@@ -252,7 +252,7 @@ class TestGemCommandsSpecificationCommand < Gem::TestCase
252
252
  assert_match %r{\A--- !ruby/object:Gem::Specification}, @ui.output
253
253
  assert_match %r{name: foo}, @ui.output
254
254
 
255
- spec = YAML.load @ui.output
255
+ spec = load_yaml @ui.output
256
256
 
257
257
  assert_equal Gem::Version.new("2.0.1.pre"), spec.version
258
258
  end
@@ -377,7 +377,7 @@ class TestGemCommandsUninstallCommand < Gem::InstallerTestCase
377
377
 
378
378
  @cmd.options[:args] = ['a:4']
379
379
 
380
- e = assert_raises Gem::InstallError do
380
+ e = assert_raise Gem::InstallError do
381
381
  use_ui ui do
382
382
  @cmd.execute
383
383
  end
@@ -420,7 +420,7 @@ WARNING: Use your OS package manager to uninstall vendor gems
420
420
  @cmd.options[:version] = Gem::Requirement.new("> 1")
421
421
 
422
422
  use_ui @ui do
423
- e = assert_raises Gem::MockGemUi::TermError do
423
+ e = assert_raise Gem::MockGemUi::TermError do
424
424
  @cmd.execute
425
425
  end
426
426
 
@@ -436,7 +436,7 @@ WARNING: Use your OS package manager to uninstall vendor gems
436
436
 
437
437
  def test_handle_options_vendor_missing
438
438
  vendordir(nil) do
439
- e = assert_raises OptionParser::InvalidOption do
439
+ e = assert_raise OptionParser::InvalidOption do
440
440
  @cmd.handle_options %w[--vendor]
441
441
  end
442
442
 
@@ -477,7 +477,7 @@ WARNING: Use your OS package manager to uninstall vendor gems
477
477
  e = nil
478
478
  @cmd.stub :uninstall, uninstall_exception do
479
479
  use_ui @ui do
480
- e = assert_raises Gem::MockGemUi::TermError do
480
+ e = assert_raise Gem::MockGemUi::TermError do
481
481
  @cmd.execute
482
482
  end
483
483
  end
@@ -151,7 +151,7 @@ class TestGemCommandsUnpackCommand < Gem::TestCase
151
151
  end
152
152
 
153
153
  def test_execute_sudo
154
- skip 'Cannot perform this test on windows (chmod)' if win_platform?
154
+ pend 'Cannot perform this test on windows (chmod)' if win_platform?
155
155
 
156
156
  util_make_gems
157
157
 
@@ -210,7 +210,7 @@ class TestGemCommandsUnpackCommand < Gem::TestCase
210
210
  end
211
211
  end
212
212
 
213
- assert_path_exists File.join(@tempdir, foo_spec.full_name)
213
+ assert_path_exist File.join(@tempdir, foo_spec.full_name)
214
214
  end
215
215
 
216
216
  def test_handle_options_metadata
@@ -95,7 +95,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
95
95
  @cmd.options[:args] = []
96
96
  @cmd.options[:system] = true
97
97
 
98
- assert_raises Gem::MockGemUi::SystemExitException do
98
+ assert_raise Gem::MockGemUi::SystemExitException do
99
99
  use_ui @ui do
100
100
  @cmd.execute
101
101
  end
@@ -177,7 +177,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
177
177
 
178
178
  @cmd.extend(oldest_version_mod)
179
179
 
180
- assert_raises Gem::MockGemUi::TermError do
180
+ assert_raise Gem::MockGemUi::TermError do
181
181
  use_ui @ui do
182
182
  @cmd.execute
183
183
  end
@@ -211,7 +211,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
211
211
 
212
212
  @cmd.execute
213
213
 
214
- refute_path_exists Gem.plugindir, "Plugins folder not removed when updating rubygems to pre-3.2"
214
+ assert_path_not_exist Gem.plugindir, "Plugins folder not removed when updating rubygems to pre-3.2"
215
215
  end
216
216
 
217
217
  def test_execute_system_specific_newer_than_or_equal_to_3_2_leaves_plugins_dir_alone
@@ -239,8 +239,8 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
239
239
 
240
240
  @cmd.execute
241
241
 
242
- assert_path_exists Gem.plugindir, "Plugin folder removed when updating rubygems to post-3.2"
243
- assert_path_exists plugin_file, "Plugin removed when updating rubygems to post-3.2"
242
+ assert_path_exist Gem.plugindir, "Plugin folder removed when updating rubygems to post-3.2"
243
+ assert_path_exist plugin_file, "Plugin removed when updating rubygems to post-3.2"
244
244
  end
245
245
 
246
246
  def test_execute_system_specifically_to_latest_version
@@ -273,7 +273,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
273
273
  @cmd.options[:args] = %w[gem]
274
274
  @cmd.options[:system] = true
275
275
 
276
- assert_raises Gem::MockGemUi::TermError do
276
+ assert_raise Gem::MockGemUi::TermError do
277
277
  use_ui @ui do
278
278
  @cmd.execute
279
279
  end
@@ -291,7 +291,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
291
291
  @cmd.options[:args] = []
292
292
  @cmd.options[:system] = true
293
293
 
294
- assert_raises Gem::MockGemUi::TermError do
294
+ assert_raise Gem::MockGemUi::TermError do
295
295
  use_ui @ui do
296
296
  @cmd.execute
297
297
  end
@@ -384,7 +384,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
384
384
 
385
385
  a2 = @specs['a-2']
386
386
 
387
- assert_path_exists File.join(a2.doc_dir, 'rdoc')
387
+ assert_path_exist File.join(a2.doc_dir, 'rdoc')
388
388
  end
389
389
 
390
390
  def test_execute_named
@@ -530,7 +530,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
530
530
  def test_fetch_remote_gems_error
531
531
  Gem.sources.replace %w[http://nonexistent.example]
532
532
 
533
- assert_raises Gem::RemoteFetcher::FetchError do
533
+ assert_raise Gem::RemoteFetcher::FetchError do
534
534
  @cmd.fetch_remote_gems @specs['a-1']
535
535
  end
536
536
  end
@@ -588,7 +588,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
588
588
  end
589
589
 
590
590
  def test_handle_options_system_non_version
591
- assert_raises ArgumentError do
591
+ assert_raise ArgumentError do
592
592
  @cmd.handle_options %w[--system non-version]
593
593
  end
594
594
  end
@@ -26,7 +26,7 @@ class TestGemCommandsWhichCommand < Gem::TestCase
26
26
  @cmd.handle_options %w[directory]
27
27
 
28
28
  use_ui @ui do
29
- assert_raises Gem::MockGemUi::TermError do
29
+ assert_raise Gem::MockGemUi::TermError do
30
30
  @cmd.execute
31
31
  end
32
32
  end
@@ -44,7 +44,7 @@ class TestGemCommandsWhichCommand < Gem::TestCase
44
44
  @cmd.handle_options %w[foo_bar missinglib]
45
45
 
46
46
  use_ui @ui do
47
- assert_raises Gem::MockGemUi::TermError do
47
+ assert_raise Gem::MockGemUi::TermError do
48
48
  @cmd.execute
49
49
  end
50
50
  end
@@ -58,7 +58,7 @@ class TestGemCommandsWhichCommand < Gem::TestCase
58
58
  @cmd.handle_options %w[missinglib]
59
59
 
60
60
  use_ui @ui do
61
- assert_raises Gem::MockGemUi::TermError do
61
+ assert_raise Gem::MockGemUi::TermError do
62
62
  @cmd.execute
63
63
  end
64
64
  end
@@ -35,7 +35,7 @@ class TestGemCommandsYankCommand < Gem::TestCase
35
35
 
36
36
  def test_handle_options_missing_argument
37
37
  %w[-v --version -p --platform].each do |option|
38
- assert_raises OptionParser::MissingArgument do
38
+ assert_raise OptionParser::MissingArgument do
39
39
  @cmd.handle_options %W[a #{option}]
40
40
  end
41
41
  end
@@ -195,14 +195,14 @@ class TestGemConfigFile < Gem::TestCase
195
195
  end
196
196
 
197
197
  def test_check_credentials_permissions
198
- skip 'chmod not supported' if win_platform?
198
+ pend 'chmod not supported' if win_platform?
199
199
 
200
200
  @cfg.rubygems_api_key = 'x'
201
201
 
202
202
  File.chmod 0644, @cfg.credentials_path
203
203
 
204
204
  use_ui @ui do
205
- assert_raises Gem::MockGemUi::TermError do
205
+ assert_raise Gem::MockGemUi::TermError do
206
206
  @cfg.load_api_keys
207
207
  end
208
208
  end
@@ -253,7 +253,7 @@ if you believe they were disclosed to a third party.
253
253
 
254
254
  args = %w[--debug]
255
255
 
256
- _, err = capture_io do
256
+ _, err = capture_output do
257
257
  @cfg.handle_arguments args
258
258
  end
259
259
 
@@ -322,13 +322,13 @@ if you believe they were disclosed to a third party.
322
322
  end
323
323
 
324
324
  def test_load_api_keys_bad_permission
325
- skip 'chmod not supported' if win_platform?
325
+ pend 'chmod not supported' if win_platform?
326
326
 
327
327
  @cfg.rubygems_api_key = 'x'
328
328
 
329
329
  File.chmod 0644, @cfg.credentials_path
330
330
 
331
- assert_raises Gem::MockGemUi::TermError do
331
+ assert_raise Gem::MockGemUi::TermError do
332
332
  @cfg.load_api_keys
333
333
  end
334
334
  end
@@ -354,7 +354,7 @@ if you believe they were disclosed to a third party.
354
354
  :rubygems_api_key => 'x',
355
355
  }
356
356
 
357
- assert_equal expected, YAML.load_file(@cfg.credentials_path)
357
+ assert_equal expected, load_yaml_file(@cfg.credentials_path)
358
358
 
359
359
  unless win_platform?
360
360
  stat = File.stat @cfg.credentials_path
@@ -364,13 +364,13 @@ if you believe they were disclosed to a third party.
364
364
  end
365
365
 
366
366
  def test_rubygems_api_key_equals_bad_permission
367
- skip 'chmod not supported' if win_platform?
367
+ pend 'chmod not supported' if win_platform?
368
368
 
369
369
  @cfg.rubygems_api_key = 'x'
370
370
 
371
371
  File.chmod 0644, @cfg.credentials_path
372
372
 
373
- assert_raises Gem::MockGemUi::TermError do
373
+ assert_raise Gem::MockGemUi::TermError do
374
374
  @cfg.rubygems_api_key = 'y'
375
375
  end
376
376
 
@@ -378,7 +378,7 @@ if you believe they were disclosed to a third party.
378
378
  :rubygems_api_key => 'x',
379
379
  }
380
380
 
381
- assert_equal expected, YAML.load_file(@cfg.credentials_path)
381
+ assert_equal expected, load_yaml_file(@cfg.credentials_path)
382
382
 
383
383
  stat = File.stat @cfg.credentials_path
384
384
 
@@ -3,6 +3,12 @@ require 'rubygems/test_case'
3
3
  require 'rubygems/dependency'
4
4
 
5
5
  class TestGemDependency < Gem::TestCase
6
+ def setup
7
+ super
8
+
9
+ without_any_upwards_gemfiles
10
+ end
11
+
6
12
  def test_initialize
7
13
  d = dep "pkg", "> 1.0"
8
14
 
@@ -11,7 +17,7 @@ class TestGemDependency < Gem::TestCase
11
17
  end
12
18
 
13
19
  def test_initialize_type_bad
14
- e = assert_raises ArgumentError do
20
+ e = assert_raise ArgumentError do
15
21
  Gem::Dependency.new 'monkey' => '1.0'
16
22
  end
17
23
 
@@ -43,7 +49,7 @@ class TestGemDependency < Gem::TestCase
43
49
  assert_equal :runtime, dep("pkg").type
44
50
  assert_equal :development, dep("pkg", [], :development).type
45
51
 
46
- assert_raises ArgumentError do
52
+ assert_raise ArgumentError do
47
53
  dep "pkg", :sometimes
48
54
  end
49
55
  end
@@ -248,7 +254,7 @@ class TestGemDependency < Gem::TestCase
248
254
  a = dep 'a'
249
255
  b = dep 'b'
250
256
 
251
- e = assert_raises ArgumentError do
257
+ e = assert_raise ArgumentError do
252
258
  a.merge b
253
259
  end
254
260
 
@@ -330,7 +336,7 @@ class TestGemDependency < Gem::TestCase
330
336
 
331
337
  dep = Gem::Dependency.new "a", "= 2.0"
332
338
 
333
- e = assert_raises Gem::MissingSpecVersionError do
339
+ e = assert_raise Gem::MissingSpecVersionError do
334
340
  dep.to_specs
335
341
  end
336
342
 
@@ -353,7 +359,7 @@ class TestGemDependency < Gem::TestCase
353
359
  assert_equal [b, b_1], dep.to_specs
354
360
 
355
361
  Gem::BundlerVersionFinder.stub(:bundler_version_with_reason, ["3.5", "reason"]) do
356
- e = assert_raises Gem::MissingSpecVersionError do
362
+ e = assert_raise Gem::MissingSpecVersionError do
357
363
  dep.to_specs
358
364
  end
359
365
 
@@ -377,7 +383,7 @@ class TestGemDependency < Gem::TestCase
377
383
 
378
384
  dep = Gem::Dependency.new "b", "= 2.0"
379
385
 
380
- e = assert_raises Gem::MissingSpecError do
386
+ e = assert_raise Gem::MissingSpecError do
381
387
  dep.to_specs
382
388
  end
383
389
 
@@ -113,7 +113,7 @@ class TestGemDependencyInstaller < Gem::TestCase
113
113
 
114
114
  dep = Gem::Dependency.new "p"
115
115
  inst = Gem::DependencyInstaller.new
116
- assert_raises Gem::UnsatisfiableDependencyError do
116
+ assert_raise Gem::UnsatisfiableDependencyError do
117
117
  inst.install dep
118
118
  end
119
119
 
@@ -392,7 +392,7 @@ class TestGemDependencyInstaller < Gem::TestCase
392
392
 
393
393
  assert_equal %w[f-1], inst.installed_gems.map {|s| s.full_name }
394
394
 
395
- assert_path_exists e1.extension_dir
395
+ assert_path_exist e1.extension_dir
396
396
  end
397
397
 
398
398
  def test_install_dependency_old
@@ -712,7 +712,7 @@ class TestGemDependencyInstaller < Gem::TestCase
712
712
  inst = nil
713
713
 
714
714
  Dir.chdir @tempdir do
715
- e = assert_raises Gem::UnsatisfiableDependencyError do
715
+ e = assert_raise Gem::UnsatisfiableDependencyError do
716
716
  inst = Gem::DependencyInstaller.new :domain => :local
717
717
  inst.install 'b'
718
718
  end
@@ -883,7 +883,7 @@ class TestGemDependencyInstaller < Gem::TestCase
883
883
  policy = Gem::Security::HighSecurity
884
884
  inst = Gem::DependencyInstaller.new :security_policy => policy
885
885
 
886
- e = assert_raises Gem::Security::Exception do
886
+ e = assert_raise Gem::Security::Exception do
887
887
  inst.install 'b'
888
888
  end
889
889
 
@@ -27,31 +27,31 @@ class TestGemDoctor < Gem::TestCase
27
27
  io.write 'this will raise an exception when evaluated.'
28
28
  end
29
29
 
30
- assert_path_exists File.join(a.gem_dir, 'Rakefile')
31
- assert_path_exists File.join(a.gem_dir, 'lib', 'a.rb')
30
+ assert_path_exist File.join(a.gem_dir, 'Rakefile')
31
+ assert_path_exist File.join(a.gem_dir, 'lib', 'a.rb')
32
32
 
33
- assert_path_exists b.gem_dir
34
- refute_path_exists b.spec_file
33
+ assert_path_exist b.gem_dir
34
+ assert_path_not_exist b.spec_file
35
35
 
36
- assert_path_exists c.gem_dir
37
- assert_path_exists c.spec_file
36
+ assert_path_exist c.gem_dir
37
+ assert_path_exist c.spec_file
38
38
 
39
39
  doctor = Gem::Doctor.new @gemhome
40
40
 
41
- capture_io do
41
+ capture_output do
42
42
  use_ui @ui do
43
43
  doctor.doctor
44
44
  end
45
45
  end
46
46
 
47
- assert_path_exists File.join(a.gem_dir, 'Rakefile')
48
- assert_path_exists File.join(a.gem_dir, 'lib', 'a.rb')
47
+ assert_path_exist File.join(a.gem_dir, 'Rakefile')
48
+ assert_path_exist File.join(a.gem_dir, 'lib', 'a.rb')
49
49
 
50
- refute_path_exists b.gem_dir
51
- refute_path_exists b.spec_file
50
+ assert_path_not_exist b.gem_dir
51
+ assert_path_not_exist b.spec_file
52
52
 
53
- refute_path_exists c.gem_dir
54
- refute_path_exists c.spec_file
53
+ assert_path_not_exist c.gem_dir
54
+ assert_path_not_exist c.spec_file
55
55
 
56
56
  expected = <<-OUTPUT
57
57
  Checking #{@gemhome}
@@ -80,31 +80,31 @@ Removed directory gems/c-2
80
80
  io.write 'this will raise an exception when evaluated.'
81
81
  end
82
82
 
83
- assert_path_exists File.join(a.gem_dir, 'Rakefile')
84
- assert_path_exists File.join(a.gem_dir, 'lib', 'a.rb')
83
+ assert_path_exist File.join(a.gem_dir, 'Rakefile')
84
+ assert_path_exist File.join(a.gem_dir, 'lib', 'a.rb')
85
85
 
86
- assert_path_exists b.gem_dir
87
- refute_path_exists b.spec_file
86
+ assert_path_exist b.gem_dir
87
+ assert_path_not_exist b.spec_file
88
88
 
89
- assert_path_exists c.gem_dir
90
- assert_path_exists c.spec_file
89
+ assert_path_exist c.gem_dir
90
+ assert_path_exist c.spec_file
91
91
 
92
92
  doctor = Gem::Doctor.new @gemhome, true
93
93
 
94
- capture_io do
94
+ capture_output do
95
95
  use_ui @ui do
96
96
  doctor.doctor
97
97
  end
98
98
  end
99
99
 
100
- assert_path_exists File.join(a.gem_dir, 'Rakefile')
101
- assert_path_exists File.join(a.gem_dir, 'lib', 'a.rb')
100
+ assert_path_exist File.join(a.gem_dir, 'Rakefile')
101
+ assert_path_exist File.join(a.gem_dir, 'lib', 'a.rb')
102
102
 
103
- assert_path_exists b.gem_dir
104
- refute_path_exists b.spec_file
103
+ assert_path_exist b.gem_dir
104
+ assert_path_not_exist b.spec_file
105
105
 
106
- assert_path_exists c.gem_dir
107
- assert_path_exists c.spec_file
106
+ assert_path_exist c.gem_dir
107
+ assert_path_exist c.spec_file
108
108
 
109
109
  expected = <<-OUTPUT
110
110
  Checking #{@gemhome}
@@ -127,13 +127,13 @@ Extra directory gems/c-2
127
127
 
128
128
  doctor = Gem::Doctor.new @tempdir
129
129
 
130
- capture_io do
130
+ capture_output do
131
131
  use_ui @ui do
132
132
  doctor.doctor
133
133
  end
134
134
  end
135
135
 
136
- assert_path_exists other_dir
136
+ assert_path_exist other_dir
137
137
 
138
138
  expected = <<-OUTPUT
139
139
  Checking #{@tempdir}
@@ -163,13 +163,13 @@ This directory does not appear to be a RubyGems repository, skipping
163
163
 
164
164
  doctor = Gem::Doctor.new @gemhome
165
165
 
166
- capture_io do
166
+ capture_output do
167
167
  use_ui @ui do
168
168
  doctor.doctor
169
169
  end
170
170
  end
171
171
 
172
- # refute_path_exists bad_plugin
172
+ # assert_path_not_exist bad_plugin
173
173
 
174
174
  expected = <<-OUTPUT
175
175
  Checking #{@gemhome}