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
@@ -132,12 +132,12 @@ install:
132
132
  @builder.build_extensions
133
133
  end
134
134
 
135
- assert_path_exists @spec.extension_dir
136
- assert_path_exists @spec.gem_build_complete_path
137
- assert_path_exists File.join @spec.extension_dir, 'gem_make.out'
138
- assert_path_exists File.join @spec.extension_dir, 'a.rb'
139
- assert_path_exists File.join @spec.gem_dir, 'lib', 'a.rb'
140
- assert_path_exists File.join @spec.gem_dir, 'lib', 'a', 'b.rb'
135
+ assert_path_exist @spec.extension_dir
136
+ assert_path_exist @spec.gem_build_complete_path
137
+ assert_path_exist File.join @spec.extension_dir, 'gem_make.out'
138
+ assert_path_exist File.join @spec.extension_dir, 'a.rb'
139
+ assert_path_exist File.join @spec.gem_dir, 'lib', 'a.rb'
140
+ assert_path_exist File.join @spec.gem_dir, 'lib', 'a', 'b.rb'
141
141
  end
142
142
 
143
143
  def test_build_extensions_with_gemhome_with_space
@@ -188,12 +188,12 @@ install:
188
188
  @builder.build_extensions
189
189
  end
190
190
 
191
- assert_path_exists @spec.extension_dir
192
- assert_path_exists @spec.gem_build_complete_path
193
- assert_path_exists File.join @spec.extension_dir, 'gem_make.out'
194
- assert_path_exists File.join @spec.extension_dir, 'a.rb'
195
- refute_path_exists File.join @spec.gem_dir, 'lib', 'a.rb'
196
- refute_path_exists File.join @spec.gem_dir, 'lib', 'a', 'b.rb'
191
+ assert_path_exist @spec.extension_dir
192
+ assert_path_exist @spec.gem_build_complete_path
193
+ assert_path_exist File.join @spec.extension_dir, 'gem_make.out'
194
+ assert_path_exist File.join @spec.extension_dir, 'a.rb'
195
+ assert_path_not_exist File.join @spec.gem_dir, 'lib', 'a.rb'
196
+ assert_path_not_exist File.join @spec.gem_dir, 'lib', 'a', 'b.rb'
197
197
  ensure
198
198
  class << Gem
199
199
  remove_method :install_extension_in_lib
@@ -210,7 +210,7 @@ install:
210
210
  assert_equal '', @ui.output
211
211
  assert_equal '', @ui.error
212
212
 
213
- refute_path_exists File.join @spec.extension_dir, 'gem_make.out'
213
+ assert_path_not_exist File.join @spec.extension_dir, 'gem_make.out'
214
214
  end
215
215
 
216
216
  def test_build_extensions_rebuild_failure
@@ -219,13 +219,13 @@ install:
219
219
 
220
220
  @spec.extensions << nil
221
221
 
222
- assert_raises Gem::Ext::BuildError do
222
+ assert_raise Gem::Ext::BuildError do
223
223
  use_ui @ui do
224
224
  @builder.build_extensions
225
225
  end
226
226
  end
227
227
 
228
- refute_path_exists @spec.gem_build_complete_path
228
+ assert_path_not_exist @spec.gem_build_complete_path
229
229
  end
230
230
 
231
231
  def test_build_extensions_extconf_bad
@@ -235,7 +235,7 @@ install:
235
235
 
236
236
  FileUtils.mkdir_p @spec.gem_dir
237
237
 
238
- e = assert_raises Gem::Ext::BuildError do
238
+ e = assert_raise Gem::Ext::BuildError do
239
239
  use_ui @ui do
240
240
  @builder.build_extensions
241
241
  end
@@ -251,7 +251,7 @@ install:
251
251
  assert_match %r{#{Regexp.escape Gem.ruby} .* extconf\.rb}, cmd_make_out
252
252
  assert_match %r{: No such file}, cmd_make_out
253
253
 
254
- refute_path_exists @spec.gem_build_complete_path
254
+ assert_path_not_exist @spec.gem_build_complete_path
255
255
 
256
256
  assert_equal cwd, Dir.pwd
257
257
  end
@@ -261,7 +261,7 @@ install:
261
261
  gem_make_out = File.join @spec.extension_dir, 'gem_make.out'
262
262
  @spec.extensions << nil
263
263
 
264
- e = assert_raises Gem::Ext::BuildError do
264
+ e = assert_raise Gem::Ext::BuildError do
265
265
  use_ui @ui do
266
266
  @builder.build_extensions
267
267
  end
@@ -273,7 +273,7 @@ install:
273
273
 
274
274
  assert_equal "No builder for extension ''\n", File.read(gem_make_out)
275
275
 
276
- refute_path_exists @spec.gem_build_complete_path
276
+ assert_path_not_exist @spec.gem_build_complete_path
277
277
  ensure
278
278
  FileUtils.rm_f gem_make_out
279
279
  end
@@ -308,7 +308,7 @@ install:
308
308
  path = File.join @spec.gem_dir, "extconf_args"
309
309
 
310
310
  assert_equal args.inspect, File.read(path).strip
311
- assert_path_exists @spec.extension_dir
311
+ assert_path_exist @spec.extension_dir
312
312
  end
313
313
 
314
314
  def test_initialize
@@ -7,13 +7,13 @@ class TestGemExtCmakeBuilder < Gem::TestCase
7
7
  super
8
8
 
9
9
  # Details: https://github.com/rubygems/rubygems/issues/1270#issuecomment-177368340
10
- skip "CmakeBuilder doesn't work on Windows." if Gem.win_platform?
10
+ pend "CmakeBuilder doesn't work on Windows." if Gem.win_platform?
11
11
 
12
12
  begin
13
13
  _, status = Open3.capture2e('cmake')
14
- skip 'cmake not present' unless status.success?
14
+ pend 'cmake not present' unless status.success?
15
15
  rescue Errno::ENOENT
16
- skip 'cmake not present'
16
+ pend 'cmake not present'
17
17
  end
18
18
 
19
19
  @ext = File.join @tempdir, 'ext'
@@ -50,7 +50,7 @@ install (FILES test.txt DESTINATION bin)
50
50
  def test_self_build_fail
51
51
  output = []
52
52
 
53
- error = assert_raises Gem::InstallError do
53
+ error = assert_raise Gem::InstallError do
54
54
  Gem::Ext::CmakeBuilder.build nil, @dest_path, output, [], nil, @ext
55
55
  end
56
56
 
@@ -17,7 +17,7 @@ class TestGemExtConfigureBuilder < Gem::TestCase
17
17
  end
18
18
 
19
19
  def test_self_build
20
- skip("test_self_build skipped on MS Windows (VC++)") if vc_windows?
20
+ pend("test_self_build skipped on MS Windows (VC++)") if vc_windows?
21
21
 
22
22
  File.open File.join(@ext, './configure'), 'w' do |configure|
23
23
  configure.puts "#!/bin/sh\necho \"#{@makefile_body}\" > Makefile"
@@ -42,10 +42,10 @@ class TestGemExtConfigureBuilder < Gem::TestCase
42
42
  end
43
43
 
44
44
  def test_self_build_fail
45
- skip("test_self_build_fail skipped on MS Windows (VC++)") if vc_windows?
45
+ pend("test_self_build_fail skipped on MS Windows (VC++)") if vc_windows?
46
46
  output = []
47
47
 
48
- error = assert_raises Gem::InstallError do
48
+ error = assert_raise Gem::InstallError do
49
49
  Gem::Ext::ConfigureBuilder.build nil, @dest_path, output, [], nil, @ext
50
50
  end
51
51
 
@@ -62,7 +62,7 @@ class TestGemExtConfigureBuilder < Gem::TestCase
62
62
 
63
63
  def test_self_build_has_makefile
64
64
  if vc_windows? && !nmake_found?
65
- skip("test_self_build_has_makefile skipped - nmake not found")
65
+ pend("test_self_build_has_makefile skipped - nmake not found")
66
66
  end
67
67
 
68
68
  File.open File.join(@ext, 'Makefile'), 'w' do |makefile|
@@ -16,11 +16,11 @@ class TestGemExtExtConfBuilder < Gem::TestCase
16
16
 
17
17
  def test_class_build
18
18
  if java_platform?
19
- skip("failing on jruby")
19
+ pend("failing on jruby")
20
20
  end
21
21
 
22
22
  if vc_windows? && !nmake_found?
23
- skip("test_class_build skipped - nmake not found")
23
+ pend("test_class_build skipped - nmake not found")
24
24
  end
25
25
 
26
26
  File.open File.join(@ext, 'extconf.rb'), 'w' do |extconf|
@@ -41,11 +41,12 @@ class TestGemExtExtConfBuilder < Gem::TestCase
41
41
  assert_contains_make_command '', output[7]
42
42
  assert_contains_make_command 'install', output[10]
43
43
  assert_empty Dir.glob(File.join(@ext, 'siteconf*.rb'))
44
+ assert_empty Dir.glob(File.join(@ext, '.gem.*'))
44
45
  end
45
46
 
46
47
  def test_class_build_rbconfig_make_prog
47
48
  if java_platform?
48
- skip("failing on jruby")
49
+ pend("failing on jruby")
49
50
  end
50
51
 
51
52
  configure_args do
@@ -70,7 +71,7 @@ class TestGemExtExtConfBuilder < Gem::TestCase
70
71
  ENV['MAKE'] = 'anothermake'
71
72
 
72
73
  if java_platform?
73
- skip("failing on jruby")
74
+ pend("failing on jruby")
74
75
  end
75
76
 
76
77
  configure_args '' do
@@ -80,7 +81,7 @@ class TestGemExtExtConfBuilder < Gem::TestCase
80
81
 
81
82
  output = []
82
83
 
83
- assert_raises Gem::InstallError do
84
+ assert_raise Gem::InstallError do
84
85
  Gem::Ext::ExtConfBuilder.build 'extconf.rb', @dest_path, output, [], nil, @ext
85
86
  end
86
87
 
@@ -93,7 +94,7 @@ class TestGemExtExtConfBuilder < Gem::TestCase
93
94
 
94
95
  def test_class_build_extconf_fail
95
96
  if vc_windows? && !nmake_found?
96
- skip("test_class_build_extconf_fail skipped - nmake not found")
97
+ pend("test_class_build_extconf_fail skipped - nmake not found")
97
98
  end
98
99
 
99
100
  File.open File.join(@ext, 'extconf.rb'), 'w' do |extconf|
@@ -104,7 +105,7 @@ class TestGemExtExtConfBuilder < Gem::TestCase
104
105
 
105
106
  output = []
106
107
 
107
- error = assert_raises Gem::InstallError do
108
+ error = assert_raise Gem::InstallError do
108
109
  Gem::Ext::ExtConfBuilder.build 'extconf.rb', @dest_path, output, [], nil, @ext
109
110
  end
110
111
 
@@ -114,12 +115,12 @@ class TestGemExtExtConfBuilder < Gem::TestCase
114
115
  assert_match(File.join(@dest_path, 'mkmf.log'), output[4])
115
116
  assert_includes(output, "To see why this extension failed to compile, please check the mkmf.log which can be found here:\n")
116
117
 
117
- assert_path_exists File.join @dest_path, 'mkmf.log'
118
+ assert_path_exist File.join @dest_path, 'mkmf.log'
118
119
  end
119
120
 
120
121
  def test_class_build_extconf_success_without_warning
121
122
  if vc_windows? && !nmake_found?
122
- skip("test_class_build_extconf_fail skipped - nmake not found")
123
+ pend("test_class_build_extconf_fail skipped - nmake not found")
123
124
  end
124
125
 
125
126
  File.open File.join(@ext, 'extconf.rb'), 'w' do |extconf|
@@ -134,12 +135,12 @@ class TestGemExtExtConfBuilder < Gem::TestCase
134
135
 
135
136
  refute_includes(output, "To see why this extension failed to compile, please check the mkmf.log which can be found here:\n")
136
137
 
137
- assert_path_exists File.join @dest_path, 'mkmf.log'
138
+ assert_path_exist File.join @dest_path, 'mkmf.log'
138
139
  end
139
140
 
140
141
  def test_class_build_unconventional
141
142
  if vc_windows? && !nmake_found?
142
- skip("test_class_build skipped - nmake not found")
143
+ pend("test_class_build skipped - nmake not found")
143
144
  end
144
145
 
145
146
  File.open File.join(@ext, 'extconf.rb'), 'w' do |extconf|
@@ -180,7 +181,7 @@ end
180
181
 
181
182
  def test_class_make
182
183
  if vc_windows? && !nmake_found?
183
- skip("test_class_make skipped - nmake not found")
184
+ pend("test_class_make skipped - nmake not found")
184
185
  end
185
186
 
186
187
  output = []
@@ -202,7 +203,7 @@ end
202
203
  end
203
204
 
204
205
  def test_class_make_no_Makefile
205
- error = assert_raises Gem::InstallError do
206
+ error = assert_raise Gem::InstallError do
206
207
  Gem::Ext::ExtConfBuilder.make @ext, ['output'], @ext
207
208
  end
208
209
 
@@ -90,7 +90,7 @@ class TestGemExtRakeBuilder < Gem::TestCase
90
90
  output = []
91
91
 
92
92
  build_rake_in(false) do |rake|
93
- error = assert_raises Gem::InstallError do
93
+ error = assert_raise Gem::InstallError do
94
94
  Gem::Ext::RakeBuilder.build "mkrf_conf.rb", @dest_path, output, [], nil, @ext
95
95
  end
96
96
 
@@ -35,8 +35,6 @@ class TestGemGemcutterUtilities < Gem::TestCase
35
35
  "http://rubygems.engineyard.com" => "EYKEY",
36
36
  }
37
37
 
38
- FileUtils.mkdir_p File.dirname Gem.configuration.credentials_path
39
-
40
38
  File.open Gem.configuration.credentials_path, 'w' do |f|
41
39
  f.write keys.to_yaml
42
40
  end
@@ -50,7 +48,6 @@ class TestGemGemcutterUtilities < Gem::TestCase
50
48
 
51
49
  def test_api_key
52
50
  keys = { :rubygems_api_key => 'KEY' }
53
- FileUtils.mkdir_p File.dirname Gem.configuration.credentials_path
54
51
 
55
52
  File.open Gem.configuration.credentials_path, 'w' do |f|
56
53
  f.write keys.to_yaml
@@ -63,7 +60,6 @@ class TestGemGemcutterUtilities < Gem::TestCase
63
60
 
64
61
  def test_api_key_override
65
62
  keys = { :rubygems_api_key => 'KEY', :other => 'OTHER' }
66
- FileUtils.mkdir_p File.dirname Gem.configuration.credentials_path
67
63
 
68
64
  File.open Gem.configuration.credentials_path, 'w' do |f|
69
65
  f.write keys.to_yaml
@@ -101,7 +97,7 @@ class TestGemGemcutterUtilities < Gem::TestCase
101
97
  assert @fetcher.last_request["authorization"]
102
98
  assert_match %r{Signed in.}, @sign_in_ui.output
103
99
 
104
- credentials = YAML.load_file Gem.configuration.credentials_path
100
+ credentials = load_yaml_file Gem.configuration.credentials_path
105
101
  assert_equal api_key, credentials[:rubygems_api_key]
106
102
  end
107
103
 
@@ -115,7 +111,7 @@ class TestGemGemcutterUtilities < Gem::TestCase
115
111
  assert @fetcher.last_request["authorization"]
116
112
  assert_match %r{Signed in.}, @sign_in_ui.output
117
113
 
118
- credentials = YAML.load_file Gem.configuration.credentials_path
114
+ credentials = load_yaml_file Gem.configuration.credentials_path
119
115
  assert_equal api_key, credentials['http://example.com']
120
116
  end
121
117
 
@@ -129,7 +125,7 @@ class TestGemGemcutterUtilities < Gem::TestCase
129
125
  assert @fetcher.last_request["authorization"]
130
126
  assert_match %r{Signed in.}, @sign_in_ui.output
131
127
 
132
- credentials = YAML.load_file Gem.configuration.credentials_path
128
+ credentials = load_yaml_file Gem.configuration.credentials_path
133
129
  assert_equal api_key, credentials[:rubygems_api_key]
134
130
  end
135
131
 
@@ -142,7 +138,7 @@ class TestGemGemcutterUtilities < Gem::TestCase
142
138
  assert @fetcher.last_request["authorization"]
143
139
  assert_match %r{Signed in.}, @sign_in_ui.output
144
140
 
145
- credentials = YAML.load_file Gem.configuration.credentials_path
141
+ credentials = load_yaml_file Gem.configuration.credentials_path
146
142
  assert_equal api_key, credentials['http://example.com']
147
143
  end
148
144
 
@@ -168,7 +164,6 @@ class TestGemGemcutterUtilities < Gem::TestCase
168
164
  api_key = 'a5fdbb6ba150cbb83aad2bb2fede64cf040453903'
169
165
  other_api_key = 'f46dbb18bb6a9c97cdc61b5b85c186a17403cdcbf'
170
166
 
171
- FileUtils.mkdir_p File.dirname(Gem.configuration.credentials_path)
172
167
  File.open Gem.configuration.credentials_path, 'w' do |f|
173
168
  f.write Hash[:other_api_key, other_api_key].to_yaml
174
169
  end
@@ -177,13 +172,13 @@ class TestGemGemcutterUtilities < Gem::TestCase
177
172
  assert_match %r{Enter your RubyGems.org credentials.}, @sign_in_ui.output
178
173
  assert_match %r{Signed in.}, @sign_in_ui.output
179
174
 
180
- credentials = YAML.load_file Gem.configuration.credentials_path
175
+ credentials = load_yaml_file Gem.configuration.credentials_path
181
176
  assert_equal api_key, credentials[:rubygems_api_key]
182
177
  assert_equal other_api_key, credentials[:other_api_key]
183
178
  end
184
179
 
185
180
  def test_sign_in_with_bad_credentials
186
- assert_raises Gem::MockGemUi::TermError do
181
+ assert_raise Gem::MockGemUi::TermError do
187
182
  util_sign_in ['Access Denied.', 403, 'Forbidden']
188
183
  end
189
184
 
@@ -209,7 +204,7 @@ class TestGemGemcutterUtilities < Gem::TestCase
209
204
  def test_sign_in_with_incorrect_otp_code
210
205
  response = "You have enabled multifactor authentication but your request doesn't have the correct OTP code. Please check it and retry."
211
206
 
212
- assert_raises Gem::MockGemUi::TermError do
207
+ assert_raise Gem::MockGemUi::TermError do
213
208
  util_sign_in [response, 401, 'Unauthorized'], nil, [], "111111\n"
214
209
  end
215
210
 
@@ -246,7 +241,6 @@ class TestGemGemcutterUtilities < Gem::TestCase
246
241
 
247
242
  def test_verify_api_key
248
243
  keys = {:other => 'a5fdbb6ba150cbb83aad2bb2fede64cf040453903'}
249
- FileUtils.mkdir_p File.dirname(Gem.configuration.credentials_path)
250
244
  File.open Gem.configuration.credentials_path, 'w' do |f|
251
245
  f.write keys.to_yaml
252
246
  end
@@ -257,7 +251,7 @@ class TestGemGemcutterUtilities < Gem::TestCase
257
251
  end
258
252
 
259
253
  def test_verify_missing_api_key
260
- assert_raises Gem::MockGemUi::TermError do
254
+ assert_raise Gem::MockGemUi::TermError do
261
255
  @cmd.verify_api_key :missing
262
256
  end
263
257
  end
@@ -92,7 +92,7 @@ class TestGemInstallUpdateOptions < Gem::InstallerTestCase
92
92
  end
93
93
 
94
94
  def test_security_policy
95
- skip 'openssl is missing' unless Gem::HAVE_OPENSSL
95
+ pend 'openssl is missing' unless Gem::HAVE_OPENSSL
96
96
 
97
97
  @cmd.handle_options %w[-P HighSecurity]
98
98
 
@@ -100,11 +100,11 @@ class TestGemInstallUpdateOptions < Gem::InstallerTestCase
100
100
  end
101
101
 
102
102
  def test_security_policy_unknown
103
- skip 'openssl is missing' unless Gem::HAVE_OPENSSL
103
+ pend 'openssl is missing' unless Gem::HAVE_OPENSSL
104
104
 
105
105
  @cmd.add_install_update_options
106
106
 
107
- e = assert_raises OptionParser::InvalidArgument do
107
+ e = assert_raise OptionParser::InvalidArgument do
108
108
  @cmd.handle_options %w[-P UnknownSecurity]
109
109
  end
110
110
  assert_includes e.message, "UnknownSecurity"
@@ -124,8 +124,8 @@ class TestGemInstallUpdateOptions < Gem::InstallerTestCase
124
124
 
125
125
  @installer = Gem::Installer.at @gem, @cmd.options
126
126
  @installer.install
127
- assert_path_exists File.join(Gem.user_dir, 'gems')
128
- assert_path_exists File.join(Gem.user_dir, 'gems', @spec.full_name)
127
+ assert_path_exist File.join(Gem.user_dir, 'gems')
128
+ assert_path_exist File.join(Gem.user_dir, 'gems', @spec.full_name)
129
129
  end
130
130
 
131
131
  def test_user_install_disabled_read_only
@@ -137,9 +137,9 @@ class TestGemInstallUpdateOptions < Gem::InstallerTestCase
137
137
  @gem = @spec.cache_file
138
138
 
139
139
  if win_platform?
140
- skip('test_user_install_disabled_read_only test skipped on MS Windows')
140
+ pend('test_user_install_disabled_read_only test skipped on MS Windows')
141
141
  elsif Process.uid.zero?
142
- skip('test_user_install_disabled_read_only test skipped in root privilege')
142
+ pend('test_user_install_disabled_read_only test skipped in root privilege')
143
143
  else
144
144
  @cmd.handle_options %w[--no-user-install]
145
145
 
@@ -150,7 +150,7 @@ class TestGemInstallUpdateOptions < Gem::InstallerTestCase
150
150
 
151
151
  Gem.use_paths @gemhome, @userhome
152
152
 
153
- assert_raises(Gem::FilePermissionError) do
153
+ assert_raise(Gem::FilePermissionError) do
154
154
  Gem::Installer.at(@gem, @cmd.options).install
155
155
  end
156
156
  end
@@ -169,7 +169,7 @@ class TestGemInstallUpdateOptions < Gem::InstallerTestCase
169
169
 
170
170
  def test_vendor_missing
171
171
  vendordir(nil) do
172
- e = assert_raises OptionParser::InvalidOption do
172
+ e = assert_raise OptionParser::InvalidOption do
173
173
  @cmd.handle_options %w[--vendor]
174
174
  end
175
175