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.
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
@@ -54,7 +54,7 @@ class TestGemCommandsCertCommand < Gem::TestCase
54
54
  assert_equal PUBLIC_CERT.to_pem, match.first.to_pem
55
55
  assert_equal @trust_dir.cert_path(PUBLIC_CERT), match.last
56
56
 
57
- assert_raises StopIteration do
57
+ assert_raise StopIteration do
58
58
  matches.next
59
59
  end
60
60
  end
@@ -69,7 +69,7 @@ class TestGemCommandsCertCommand < Gem::TestCase
69
69
  assert_equal ALTERNATE_CERT.to_pem, match.first.to_pem
70
70
  assert_equal @trust_dir.cert_path(ALTERNATE_CERT), match.last
71
71
 
72
- assert_raises StopIteration do
72
+ assert_raise StopIteration do
73
73
  matches.next
74
74
  end
75
75
  end
@@ -83,7 +83,7 @@ class TestGemCommandsCertCommand < Gem::TestCase
83
83
 
84
84
  cert_path = @trust_dir.cert_path PUBLIC_CERT
85
85
 
86
- assert_path_exists cert_path
86
+ assert_path_exist cert_path
87
87
 
88
88
  assert_equal "Added '/CN=nobody/DC=example'\n", @ui.output
89
89
  assert_empty @ui.error
@@ -138,8 +138,8 @@ Added '/CN=alternate/DC=example'
138
138
  assert_empty output
139
139
  assert_empty @build_ui.error
140
140
 
141
- assert_path_exists File.join(@tempdir, 'gem-private_key.pem')
142
- assert_path_exists File.join(@tempdir, 'gem-public_cert.pem')
141
+ assert_path_exist File.join(@tempdir, 'gem-private_key.pem')
142
+ assert_path_exist File.join(@tempdir, 'gem-public_cert.pem')
143
143
  end
144
144
 
145
145
  def test_execute_build_bad_email_address
@@ -152,15 +152,15 @@ Added '/CN=alternate/DC=example'
152
152
 
153
153
  use_ui @build_ui do
154
154
 
155
- e = assert_raises Gem::CommandLineError do
155
+ e = assert_raise Gem::CommandLineError do
156
156
  @cmd.execute
157
157
  end
158
158
 
159
159
  assert_equal "Invalid email address #{email}",
160
160
  e.message
161
161
 
162
- refute_path_exists File.join(@tempdir, 'gem-private_key.pem')
163
- refute_path_exists File.join(@tempdir, 'gem-public_cert.pem')
162
+ assert_path_not_exist File.join(@tempdir, 'gem-private_key.pem')
163
+ assert_path_not_exist File.join(@tempdir, 'gem-public_cert.pem')
164
164
  end
165
165
  end
166
166
 
@@ -195,8 +195,8 @@ Added '/CN=alternate/DC=example'
195
195
  assert_empty output
196
196
  assert_empty @build_ui.error
197
197
 
198
- assert_path_exists File.join(@tempdir, 'gem-private_key.pem')
199
- assert_path_exists File.join(@tempdir, 'gem-public_cert.pem')
198
+ assert_path_exist File.join(@tempdir, 'gem-private_key.pem')
199
+ assert_path_exist File.join(@tempdir, 'gem-public_cert.pem')
200
200
 
201
201
  pem = File.read("#{@tempdir}/gem-public_cert.pem")
202
202
  cert = OpenSSL::X509::Certificate.new(pem)
@@ -214,7 +214,7 @@ Added '/CN=alternate/DC=example'
214
214
  @build_ui = Gem::MockGemUi.new "#{passphrase}\n#{passphrase_confirmation}"
215
215
 
216
216
  use_ui @build_ui do
217
- e = assert_raises Gem::CommandLineError do
217
+ e = assert_raise Gem::CommandLineError do
218
218
  @cmd.execute
219
219
  end
220
220
 
@@ -232,8 +232,8 @@ Added '/CN=alternate/DC=example'
232
232
 
233
233
  end
234
234
 
235
- refute_path_exists File.join(@tempdir, 'gem-private_key.pem')
236
- refute_path_exists File.join(@tempdir, 'gem-public_cert.pem')
235
+ assert_path_not_exist File.join(@tempdir, 'gem-private_key.pem')
236
+ assert_path_not_exist File.join(@tempdir, 'gem-public_cert.pem')
237
237
  end
238
238
 
239
239
  def test_execute_build_key
@@ -254,8 +254,8 @@ Added '/CN=alternate/DC=example'
254
254
  assert_empty output
255
255
  assert_empty @ui.error
256
256
 
257
- assert_path_exists File.join(@tempdir, 'gem-public_cert.pem')
258
- refute_path_exists File.join(@tempdir, 'gem-private_key.pem')
257
+ assert_path_exist File.join(@tempdir, 'gem-public_cert.pem')
258
+ assert_path_not_exist File.join(@tempdir, 'gem-private_key.pem')
259
259
  end
260
260
 
261
261
  def test_execute_build_encrypted_key
@@ -276,7 +276,7 @@ Added '/CN=alternate/DC=example'
276
276
  assert_empty output
277
277
  assert_empty @ui.error
278
278
 
279
- assert_path_exists File.join(@tempdir, 'gem-public_cert.pem')
279
+ assert_path_exist File.join(@tempdir, 'gem-public_cert.pem')
280
280
  end
281
281
 
282
282
  def test_execute_certificate
@@ -346,7 +346,7 @@ Added '/CN=alternate/DC=example'
346
346
 
347
347
  cert_path = @trust_dir.cert_path PUBLIC_CERT
348
348
 
349
- assert_path_exists cert_path
349
+ assert_path_exist cert_path
350
350
 
351
351
  @cmd.handle_options %W[--remove nobody]
352
352
 
@@ -357,7 +357,7 @@ Added '/CN=alternate/DC=example'
357
357
  assert_equal "Removed '/CN=nobody/DC=example'\n", @ui.output
358
358
  assert_equal '', @ui.error
359
359
 
360
- refute_path_exists cert_path
360
+ assert_path_not_exist cert_path
361
361
  end
362
362
 
363
363
  def test_execute_remove_multiple
@@ -367,8 +367,8 @@ Added '/CN=alternate/DC=example'
367
367
  public_path = @trust_dir.cert_path PUBLIC_CERT
368
368
  alternate_path = @trust_dir.cert_path ALTERNATE_CERT
369
369
 
370
- assert_path_exists public_path
371
- assert_path_exists alternate_path
370
+ assert_path_exist public_path
371
+ assert_path_exist alternate_path
372
372
 
373
373
  @cmd.handle_options %W[--remove example]
374
374
 
@@ -384,8 +384,8 @@ Removed '/CN=nobody/DC=example'
384
384
  assert_equal expected, @ui.output
385
385
  assert_equal '', @ui.error
386
386
 
387
- refute_path_exists public_path
388
- refute_path_exists alternate_path
387
+ assert_path_not_exist public_path
388
+ assert_path_not_exist alternate_path
389
389
  end
390
390
 
391
391
  def test_execute_remove_twice
@@ -395,8 +395,8 @@ Removed '/CN=nobody/DC=example'
395
395
  public_path = @trust_dir.cert_path PUBLIC_CERT
396
396
  alternate_path = @trust_dir.cert_path ALTERNATE_CERT
397
397
 
398
- assert_path_exists public_path
399
- assert_path_exists alternate_path
398
+ assert_path_exist public_path
399
+ assert_path_exist alternate_path
400
400
 
401
401
  @cmd.handle_options %W[--remove nobody --remove alternate]
402
402
 
@@ -412,8 +412,8 @@ Removed '/CN=alternate/DC=example'
412
412
  assert_equal expected, @ui.output
413
413
  assert_equal '', @ui.error
414
414
 
415
- refute_path_exists public_path
416
- refute_path_exists alternate_path
415
+ assert_path_not_exist public_path
416
+ assert_path_not_exist alternate_path
417
417
  end
418
418
 
419
419
  def test_execute_sign
@@ -552,7 +552,7 @@ Removed '/CN=alternate/DC=example'
552
552
  @cmd.handle_options %W[--sign #{path}]
553
553
 
554
554
  use_ui @ui do
555
- assert_raises Gem::MockGemUi::TermError do
555
+ assert_raise Gem::MockGemUi::TermError do
556
556
  @cmd.execute
557
557
  end
558
558
  end
@@ -580,7 +580,7 @@ ERROR: --certificate not specified and ~/.gem/gem-public_cert.pem does not exis
580
580
  @cmd.handle_options %W[--sign #{path}]
581
581
 
582
582
  use_ui @ui do
583
- assert_raises Gem::MockGemUi::TermError do
583
+ assert_raise Gem::MockGemUi::TermError do
584
584
  @cmd.execute
585
585
  end
586
586
  end
@@ -686,7 +686,7 @@ ERROR: --private-key not specified and ~/.gem/gem-private_key.pem does not exis
686
686
 
687
687
  def test_handle_options_add_bad
688
688
  nonexistent = File.join @tempdir, 'nonexistent'
689
- e = assert_raises OptionParser::InvalidArgument do
689
+ e = assert_raise OptionParser::InvalidArgument do
690
690
  @cmd.handle_options %W[--add #{nonexistent}]
691
691
  end
692
692
 
@@ -696,7 +696,7 @@ ERROR: --private-key not specified and ~/.gem/gem-private_key.pem does not exis
696
696
  bad = File.join @tempdir, 'bad'
697
697
  FileUtils.touch bad
698
698
 
699
- e = assert_raises OptionParser::InvalidArgument do
699
+ e = assert_raise OptionParser::InvalidArgument do
700
700
  @cmd.handle_options %W[--add #{bad}]
701
701
  end
702
702
 
@@ -706,7 +706,7 @@ ERROR: --private-key not specified and ~/.gem/gem-private_key.pem does not exis
706
706
 
707
707
  def test_handle_options_certificate
708
708
  nonexistent = File.join @tempdir, 'nonexistent'
709
- e = assert_raises OptionParser::InvalidArgument do
709
+ e = assert_raise OptionParser::InvalidArgument do
710
710
  @cmd.handle_options %W[--certificate #{nonexistent}]
711
711
  end
712
712
 
@@ -716,7 +716,7 @@ ERROR: --private-key not specified and ~/.gem/gem-private_key.pem does not exis
716
716
  bad = File.join @tempdir, 'bad'
717
717
  FileUtils.touch bad
718
718
 
719
- e = assert_raises OptionParser::InvalidArgument do
719
+ e = assert_raise OptionParser::InvalidArgument do
720
720
  @cmd.handle_options %W[--certificate #{bad}]
721
721
  end
722
722
 
@@ -727,7 +727,7 @@ ERROR: --private-key not specified and ~/.gem/gem-private_key.pem does not exis
727
727
 
728
728
  def test_handle_options_key_bad
729
729
  nonexistent = File.join @tempdir, 'nonexistent'
730
- e = assert_raises OptionParser::InvalidArgument do
730
+ e = assert_raise OptionParser::InvalidArgument do
731
731
  @cmd.handle_options %W[--private-key #{nonexistent}]
732
732
  end
733
733
 
@@ -738,14 +738,14 @@ ERROR: --private-key not specified and ~/.gem/gem-private_key.pem does not exis
738
738
  bad = File.join @tempdir, 'bad'
739
739
  FileUtils.touch bad
740
740
 
741
- e = assert_raises OptionParser::InvalidArgument do
741
+ e = assert_raise OptionParser::InvalidArgument do
742
742
  @cmd.handle_options %W[--private-key #{bad}]
743
743
  end
744
744
 
745
745
  assert_equal "invalid argument: --private-key #{bad}: invalid RSA key",
746
746
  e.message
747
747
 
748
- e = assert_raises OptionParser::InvalidArgument do
748
+ e = assert_raise OptionParser::InvalidArgument do
749
749
  @cmd.handle_options %W[--private-key #{PUBLIC_KEY_FILE}]
750
750
  end
751
751
 
@@ -792,7 +792,7 @@ ERROR: --private-key not specified and ~/.gem/gem-private_key.pem does not exis
792
792
 
793
793
  def test_handle_options_sign_nonexistent
794
794
  nonexistent = File.join @tempdir, 'nonexistent'
795
- e = assert_raises OptionParser::InvalidArgument do
795
+ e = assert_raise OptionParser::InvalidArgument do
796
796
  @cmd.handle_options %W[
797
797
  --private-key #{ALTERNATE_KEY_FILE}
798
798
 
@@ -50,18 +50,18 @@ class TestGemCommandsCheckCommand < Gem::TestCase
50
50
 
51
51
  FileUtils.rm b.spec_file
52
52
 
53
- assert_path_exists b.gem_dir
54
- refute_path_exists b.spec_file
53
+ assert_path_exist b.gem_dir
54
+ assert_path_not_exist b.spec_file
55
55
 
56
56
  Gem.use_paths @gemhome
57
57
 
58
- capture_io do
58
+ capture_output do
59
59
  use_ui @ui do
60
60
  @cmd.doctor
61
61
  end
62
62
  end
63
63
 
64
- refute_path_exists b.gem_dir
65
- refute_path_exists b.spec_file
64
+ assert_path_not_exist b.gem_dir
65
+ assert_path_not_exist b.spec_file
66
66
  end
67
67
  end
@@ -62,7 +62,7 @@ class TestGemCommandsCleanupCommand < Gem::TestCase
62
62
 
63
63
  @cmd.execute
64
64
 
65
- refute_path_exists @a_1.gem_dir
65
+ assert_path_not_exist @a_1.gem_dir
66
66
  end
67
67
 
68
68
  def test_execute_all_dependencies
@@ -81,8 +81,8 @@ class TestGemCommandsCleanupCommand < Gem::TestCase
81
81
 
82
82
  @cmd.execute
83
83
 
84
- refute_path_exists @a_1.gem_dir
85
- refute_path_exists @b_1.gem_dir
84
+ assert_path_not_exist @a_1.gem_dir
85
+ assert_path_not_exist @b_1.gem_dir
86
86
  end
87
87
 
88
88
  def test_execute_dev_dependencies
@@ -101,7 +101,7 @@ class TestGemCommandsCleanupCommand < Gem::TestCase
101
101
 
102
102
  @cmd.execute
103
103
 
104
- assert_path_exists @a_1.gem_dir
104
+ assert_path_exist @a_1.gem_dir
105
105
  end
106
106
 
107
107
  def test_execute_without_dev_dependencies
@@ -120,7 +120,7 @@ class TestGemCommandsCleanupCommand < Gem::TestCase
120
120
 
121
121
  @cmd.execute
122
122
 
123
- refute_path_exists @a_1.gem_dir
123
+ assert_path_not_exist @a_1.gem_dir
124
124
  end
125
125
 
126
126
  def test_execute_all
@@ -143,8 +143,8 @@ class TestGemCommandsCleanupCommand < Gem::TestCase
143
143
  assert_equal @gemhome, Gem.dir, 'GEM_HOME'
144
144
  assert_equal [@gemhome, gemhome2], Gem.path.sort, 'GEM_PATH'
145
145
 
146
- refute_path_exists @a_1.gem_dir
147
- refute_path_exists @b_1.gem_dir
146
+ assert_path_not_exist @a_1.gem_dir
147
+ assert_path_not_exist @b_1.gem_dir
148
148
  end
149
149
 
150
150
  def test_execute_all_user
@@ -153,15 +153,15 @@ class TestGemCommandsCleanupCommand < Gem::TestCase
153
153
 
154
154
  Gem::Specification.dirs = [Gem.dir, Gem.user_dir]
155
155
 
156
- assert_path_exists @a_1.gem_dir
157
- assert_path_exists @a_1_1.gem_dir
156
+ assert_path_exist @a_1.gem_dir
157
+ assert_path_exist @a_1_1.gem_dir
158
158
 
159
159
  @cmd.options[:args] = %w[a]
160
160
 
161
161
  @cmd.execute
162
162
 
163
- refute_path_exists @a_1.gem_dir
164
- refute_path_exists @a_1_1.gem_dir
163
+ assert_path_not_exist @a_1.gem_dir
164
+ assert_path_not_exist @a_1_1.gem_dir
165
165
  end
166
166
 
167
167
  def test_execute_all_user_no_sudo
@@ -172,15 +172,15 @@ class TestGemCommandsCleanupCommand < Gem::TestCase
172
172
 
173
173
  Gem::Specification.dirs = [Gem.dir, Gem.user_dir]
174
174
 
175
- assert_path_exists @a_1.gem_dir
176
- assert_path_exists @a_1_1.gem_dir
175
+ assert_path_exist @a_1.gem_dir
176
+ assert_path_exist @a_1_1.gem_dir
177
177
 
178
178
  @cmd.options[:args] = %w[a]
179
179
 
180
180
  @cmd.execute
181
181
 
182
- assert_path_exists @a_1.gem_dir
183
- assert_path_exists @a_1_1.gem_dir
182
+ assert_path_exist @a_1.gem_dir
183
+ assert_path_exist @a_1_1.gem_dir
184
184
  ensure
185
185
  FileUtils.chmod 0755, @gemhome
186
186
  end unless win_platform? || Process.uid.zero?
@@ -191,7 +191,7 @@ class TestGemCommandsCleanupCommand < Gem::TestCase
191
191
 
192
192
  @cmd.execute
193
193
 
194
- assert_path_exists @a_1.gem_dir
194
+ assert_path_exist @a_1.gem_dir
195
195
  end
196
196
 
197
197
  def test_execute_keeps_older_versions_with_deps
@@ -210,7 +210,7 @@ class TestGemCommandsCleanupCommand < Gem::TestCase
210
210
 
211
211
  @cmd.execute
212
212
 
213
- assert_path_exists @b_1.gem_dir
213
+ assert_path_exist @b_1.gem_dir
214
214
  end
215
215
 
216
216
  def test_execute_ignore_default_gem_verbose
@@ -257,9 +257,9 @@ class TestGemCommandsCleanupCommand < Gem::TestCase
257
257
 
258
258
  @cmd.execute
259
259
 
260
- assert_path_exists c_1.gem_dir
261
- refute_path_exists d_1.gem_dir
262
- refute_path_exists e_1.gem_dir
260
+ assert_path_exist c_1.gem_dir
261
+ assert_path_not_exist d_1.gem_dir
262
+ assert_path_not_exist e_1.gem_dir
263
263
  end
264
264
 
265
265
  def test_execute_user_install
@@ -282,10 +282,10 @@ class TestGemCommandsCleanupCommand < Gem::TestCase
282
282
 
283
283
  @cmd.execute
284
284
 
285
- refute_path_exists c_1.gem_dir
286
- assert_path_exists c_2.gem_dir
285
+ assert_path_not_exist c_1.gem_dir
286
+ assert_path_exist c_2.gem_dir
287
287
 
288
- assert_path_exists d_1.gem_dir
289
- assert_path_exists d_2.gem_dir
288
+ assert_path_exist d_1.gem_dir
289
+ assert_path_exist d_2.gem_dir
290
290
  end
291
291
  end
@@ -50,7 +50,7 @@ class TestGemCommandsContentsCommand < Gem::TestCase
50
50
  def test_execute_bad_gem
51
51
  @cmd.options[:args] = %w[foo]
52
52
 
53
- assert_raises Gem::MockGemUi::TermError do
53
+ assert_raise Gem::MockGemUi::TermError do
54
54
  use_ui @ui do
55
55
  @cmd.execute
56
56
  end
@@ -94,7 +94,7 @@ class TestGemCommandsContentsCommand < Gem::TestCase
94
94
  def test_execute_missing_single
95
95
  @cmd.options[:args] = %w[foo]
96
96
 
97
- assert_raises Gem::MockGemUi::TermError do
97
+ assert_raise Gem::MockGemUi::TermError do
98
98
  use_ui @ui do
99
99
  @cmd.execute
100
100
  end
@@ -110,7 +110,7 @@ class TestGemCommandsContentsCommand < Gem::TestCase
110
110
 
111
111
  gem 'foo', 1
112
112
 
113
- assert_raises Gem::MockGemUi::TermError do
113
+ assert_raise Gem::MockGemUi::TermError do
114
114
  use_ui @ui do
115
115
  @cmd.execute
116
116
  end
@@ -64,7 +64,7 @@ Gem x-2
64
64
  def test_execute_no_match
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 @stub_ui do
69
69
  @cmd.execute
70
70
  end
@@ -155,7 +155,7 @@ Gem foo-2
155
155
  @cmd.options[:reverse_dependencies] = true
156
156
  @cmd.options[:domain] = :remote
157
157
 
158
- assert_raises Gem::MockGemUi::TermError do
158
+ assert_raise Gem::MockGemUi::TermError do
159
159
  use_ui @stub_ui do
160
160
  @cmd.execute
161
161
  end
@@ -109,7 +109,7 @@ class TestGemCommandsEnvironmentCommand < Gem::TestCase
109
109
  def test_execute_unknown
110
110
  @cmd.send :handle_options, %w[unknown]
111
111
 
112
- assert_raises Gem::CommandLineError do
112
+ assert_raise Gem::CommandLineError do
113
113
  use_ui @ui do
114
114
  @cmd.execute
115
115
  end