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
@@ -57,19 +57,19 @@ class TestGemPackageTarHeader < Gem::Package::TarTestCase
57
57
  end
58
58
 
59
59
  def test_initialize_bad
60
- assert_raises ArgumentError do
60
+ assert_raise ArgumentError do
61
61
  Gem::Package::TarHeader.new :name => '', :size => '', :mode => ''
62
62
  end
63
63
 
64
- assert_raises ArgumentError do
64
+ assert_raise ArgumentError do
65
65
  Gem::Package::TarHeader.new :name => '', :size => '', :prefix => ''
66
66
  end
67
67
 
68
- assert_raises ArgumentError do
68
+ assert_raise ArgumentError do
69
69
  Gem::Package::TarHeader.new :name => '', :prefix => '', :mode => ''
70
70
  end
71
71
 
72
- assert_raises ArgumentError do
72
+ assert_raise ArgumentError do
73
73
  Gem::Package::TarHeader.new :prefix => '', :size => '', :mode => ''
74
74
  end
75
75
  end
@@ -156,7 +156,7 @@ group\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000
156
156
  # overwrite the size field
157
157
  header_s[124, 12] = val
158
158
  io = TempIO.new header_s
159
- assert_raises ArgumentError do
159
+ assert_raise ArgumentError do
160
160
  Gem::Package::TarHeader.from io
161
161
  end
162
162
  io.close!
@@ -42,19 +42,19 @@ class TestGemPackageTarReaderEntry < Gem::Package::TarTestCase
42
42
 
43
43
  assert @entry.bytes_read
44
44
 
45
- e = assert_raises(IOError) { @entry.eof? }
45
+ e = assert_raise(IOError) { @entry.eof? }
46
46
  assert_equal 'closed Gem::Package::TarReader::Entry', e.message
47
47
 
48
- e = assert_raises(IOError) { @entry.getc }
48
+ e = assert_raise(IOError) { @entry.getc }
49
49
  assert_equal 'closed Gem::Package::TarReader::Entry', e.message
50
50
 
51
- e = assert_raises(IOError) { @entry.pos }
51
+ e = assert_raise(IOError) { @entry.pos }
52
52
  assert_equal 'closed Gem::Package::TarReader::Entry', e.message
53
53
 
54
- e = assert_raises(IOError) { @entry.read }
54
+ e = assert_raise(IOError) { @entry.read }
55
55
  assert_equal 'closed Gem::Package::TarReader::Entry', e.message
56
56
 
57
- e = assert_raises(IOError) { @entry.rewind }
57
+ e = assert_raise(IOError) { @entry.rewind }
58
58
  assert_equal 'closed Gem::Package::TarReader::Entry', e.message
59
59
  end
60
60
 
@@ -75,10 +75,10 @@ class TestGemPackageTarReaderEntry < Gem::Package::TarTestCase
75
75
  end
76
76
 
77
77
  def test_full_name_null
78
- skip "jruby strips the null byte and does not think it's corrupt" if Gem.java_platform?
78
+ pend "jruby strips the null byte and does not think it's corrupt" if Gem.java_platform?
79
79
  @entry.header.prefix << "\000"
80
80
 
81
- e = assert_raises Gem::Package::TarInvalidError do
81
+ e = assert_raise Gem::Package::TarInvalidError do
82
82
  @entry.full_name
83
83
  end
84
84
 
@@ -134,7 +134,7 @@ class TestGemPackageTarReaderEntry < Gem::Package::TarTestCase
134
134
  end
135
135
 
136
136
  def test_readpartial
137
- assert_raises(EOFError) do
137
+ assert_raise(EOFError) do
138
138
  @entry.read(@contents.size)
139
139
  @entry.readpartial(1)
140
140
  end
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  require 'rubygems/package/tar_test_case'
3
3
  require 'rubygems/package/tar_writer'
4
- require 'minitest/mock'
5
4
 
6
5
  class TestGemPackageTarWriter < Gem::Package::TarTestCase
7
6
  def setup
@@ -117,7 +116,7 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
117
116
  end
118
117
 
119
118
  def test_add_file_signer
120
- skip 'openssl is missing' unless Gem::HAVE_OPENSSL
119
+ pend 'openssl is missing' unless Gem::HAVE_OPENSSL
121
120
 
122
121
  signer = Gem::Security::Signer.new PRIVATE_KEY, [PUBLIC_CERT]
123
122
 
@@ -150,13 +149,12 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
150
149
  signer = Gem::Security::Signer.new nil, nil
151
150
 
152
151
  Time.stub :now, Time.at(1458518157) do
153
-
154
152
  @tar_writer.add_file_signed 'x', 0644, signer do |io|
155
153
  io.write 'a' * 10
156
154
  end
157
155
 
158
156
  assert_headers_equal(tar_file_header('x', '', 0644, 10, Time.now),
159
- @io.string[0, 512])
157
+ @io.string[0, 512])
160
158
  end
161
159
  assert_equal "aaaaaaaaaa#{"\0" * 502}", @io.string[512, 512]
162
160
 
@@ -170,11 +168,11 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
170
168
  end
171
169
 
172
170
  assert_headers_equal(tar_file_header('x', '', 0644, 10, Time.now),
173
- @io.string[0, 512])
174
- end
171
+ @io.string[0, 512])
175
172
 
176
- assert_equal "aaaaaaaaaa#{"\0" * 502}", @io.string[512, 512]
177
- assert_equal 1024, @io.pos
173
+ assert_equal "aaaaaaaaaa#{"\0" * 502}", @io.string[512, 512]
174
+ assert_equal 1024, @io.pos
175
+ end
178
176
  end
179
177
 
180
178
  def test_add_file_simple_source_date_epoch
@@ -185,7 +183,7 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
185
183
  end
186
184
 
187
185
  assert_headers_equal(tar_file_header('x', '', 0644, 10, Time.at(ENV["SOURCE_DATE_EPOCH"].to_i).utc),
188
- @io.string[0, 512])
186
+ @io.string[0, 512])
189
187
  end
190
188
  end
191
189
 
@@ -194,7 +192,7 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
194
192
  @tar_writer.add_file_simple 'x', 0, 100
195
193
 
196
194
  assert_headers_equal tar_file_header('x', '', 0, 100, Time.now),
197
- @io.string[0, 512]
195
+ @io.string[0, 512]
198
196
  end
199
197
 
200
198
  assert_equal "\0" * 512, @io.string[512, 512]
@@ -209,7 +207,7 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
209
207
  end
210
208
 
211
209
  def test_add_file_simple_size
212
- assert_raises Gem::Package::TarWriter::FileOverflow do
210
+ assert_raise Gem::Package::TarWriter::FileOverflow do
213
211
  @tar_writer.add_file_simple("lib/foo/bar", 0, 10) do |io|
214
212
  io.write "1" * 11
215
213
  end
@@ -221,27 +219,27 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
221
219
 
222
220
  assert_equal "\0" * 1024, @io.string
223
221
 
224
- e = assert_raises IOError do
222
+ e = assert_raise IOError do
225
223
  @tar_writer.close
226
224
  end
227
225
  assert_equal 'closed Gem::Package::TarWriter', e.message
228
226
 
229
- e = assert_raises IOError do
227
+ e = assert_raise IOError do
230
228
  @tar_writer.flush
231
229
  end
232
230
  assert_equal 'closed Gem::Package::TarWriter', e.message
233
231
 
234
- e = assert_raises IOError do
232
+ e = assert_raise IOError do
235
233
  @tar_writer.add_file 'x', 0
236
234
  end
237
235
  assert_equal 'closed Gem::Package::TarWriter', e.message
238
236
 
239
- e = assert_raises IOError do
237
+ e = assert_raise IOError do
240
238
  @tar_writer.add_file_simple 'x', 0, 0
241
239
  end
242
240
  assert_equal 'closed Gem::Package::TarWriter', e.message
243
241
 
244
- e = assert_raises IOError do
242
+ e = assert_raise IOError do
245
243
  @tar_writer.mkdir 'x', 0
246
244
  end
247
245
  assert_equal 'closed Gem::Package::TarWriter', e.message
@@ -297,7 +295,7 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
297
295
  assert_equal ['b' * 100, 'a'], @tar_writer.split_name(name)
298
296
 
299
297
  name = File.join 'a', 'b' * 101
300
- exception = assert_raises Gem::Package::TooLongFileName do
298
+ exception = assert_raise Gem::Package::TooLongFileName do
301
299
  @tar_writer.split_name name
302
300
  end
303
301
  assert_includes exception.message, name
@@ -305,7 +303,7 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
305
303
  # note, GNU tar 1.28 is unable to handle this case too,
306
304
  # tested with "tar --format=ustar -cPf /tmp/foo.tartar -- /aaaaaa....a"
307
305
  name = '/' + 'a' * 100
308
- exception = assert_raises Gem::Package::TooLongFileName do
306
+ exception = assert_raise Gem::Package::TooLongFileName do
309
307
  @tar_writer.split_name name
310
308
  end
311
309
  assert_includes exception.message, name
@@ -316,7 +314,7 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
316
314
  assert_equal ['b', 'a' * 155], @tar_writer.split_name(name)
317
315
 
318
316
  name = File.join 'a' * 156, 'b'
319
- exception = assert_raises Gem::Package::TooLongFileName do
317
+ exception = assert_raise Gem::Package::TooLongFileName do
320
318
  @tar_writer.split_name name
321
319
  end
322
320
  assert_includes exception.message, name
@@ -324,7 +322,7 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
324
322
 
325
323
  def test_split_name_too_long_total
326
324
  name = 'a' * 257
327
- exception = assert_raises Gem::Package::TooLongFileName do
325
+ exception = assert_raise Gem::Package::TooLongFileName do
328
326
  @tar_writer.split_name name
329
327
  end
330
328
  assert_includes exception.message, name
@@ -40,7 +40,7 @@ class TestGemPackageTask < Gem::TestCase
40
40
 
41
41
  Rake.application['package'].invoke
42
42
 
43
- assert_path_exists 'pkg/pkgr-1.2.3.gem'
43
+ assert_path_exist 'pkg/pkgr-1.2.3.gem'
44
44
  end
45
45
  ensure
46
46
  RakeFileUtils.verbose_flag = original_rake_fileutils_verbosity
@@ -56,7 +56,7 @@ class TestGemPackageTask < Gem::TestCase
56
56
  g.summary = 'summary'
57
57
  end
58
58
 
59
- _, err = capture_io do
59
+ _, err = capture_output do
60
60
  Rake.application = Rake::Application.new
61
61
 
62
62
  pkg = Gem::PackageTask.new(gem) do |p|
@@ -130,7 +130,7 @@ class TestGemPathSupport < Gem::TestCase
130
130
  begin
131
131
  File.symlink(dir, symlink)
132
132
  rescue NotImplementedError, SystemCallError
133
- skip 'symlinks not supported'
133
+ pend 'symlinks not supported'
134
134
  end
135
135
  not_existing = "#{@tempdir}/does_not_exist"
136
136
  path = "#{symlink}#{File::PATH_SEPARATOR}#{not_existing}"
@@ -24,7 +24,7 @@ class TestGemRDoc < Gem::TestCase
24
24
  begin
25
25
  Gem::RDoc.load_rdoc
26
26
  rescue Gem::DocumentError => e
27
- skip e.message
27
+ pend e.message
28
28
  end
29
29
 
30
30
  Gem.configuration[:rdoc] = nil
@@ -84,16 +84,16 @@ class TestGemRDoc < Gem::TestCase
84
84
  refute @hook.rdoc_installed?
85
85
  refute @hook.ri_installed?
86
86
 
87
- assert_path_exists @a.doc_dir
87
+ assert_path_exist @a.doc_dir
88
88
  end
89
89
 
90
90
  def test_remove_unwritable
91
- skip 'chmod not supported' if Gem.win_platform?
92
- skip 'skipped in root privilege' if Process.uid.zero?
91
+ pend 'chmod not supported' if Gem.win_platform?
92
+ pend 'skipped in root privilege' if Process.uid.zero?
93
93
  FileUtils.mkdir_p @a.base_dir
94
94
  FileUtils.chmod 0, @a.base_dir
95
95
 
96
- e = assert_raises Gem::FilePermissionError do
96
+ e = assert_raise Gem::FilePermissionError do
97
97
  @hook.remove
98
98
  end
99
99
 
@@ -113,16 +113,16 @@ class TestGemRDoc < Gem::TestCase
113
113
  def test_setup
114
114
  @hook.setup
115
115
 
116
- assert_path_exists @a.doc_dir
116
+ assert_path_exist @a.doc_dir
117
117
  end
118
118
 
119
119
  def test_setup_unwritable
120
- skip 'chmod not supported' if Gem.win_platform?
121
- skip 'skipped in root privilege' if Process.uid.zero?
120
+ pend 'chmod not supported' if Gem.win_platform?
121
+ pend 'skipped in root privilege' if Process.uid.zero?
122
122
  FileUtils.mkdir_p @a.doc_dir
123
123
  FileUtils.chmod 0, @a.doc_dir
124
124
 
125
- e = assert_raises Gem::FilePermissionError do
125
+ e = assert_raise Gem::FilePermissionError do
126
126
  @hook.setup
127
127
  end
128
128
 
@@ -10,7 +10,6 @@ end
10
10
 
11
11
  require 'rubygems/remote_fetcher'
12
12
  require 'rubygems/package'
13
- require 'minitest/mock'
14
13
 
15
14
  # = Testing Proxy Settings
16
15
  #
@@ -146,7 +145,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
146
145
  fetcher = Gem::RemoteFetcher.new nil
147
146
  @fetcher = fetcher
148
147
 
149
- e = assert_raises ArgumentError do
148
+ e = assert_raise ArgumentError do
150
149
  @fetcher.fetch_path("gems.example.com/yaml", nil, true)
151
150
  end
152
151
 
@@ -184,7 +183,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
184
183
 
185
184
  assert_equal 'hello', data
186
185
 
187
- refute_path_exists path
186
+ assert_path_not_exist path
188
187
  end
189
188
 
190
189
  def util_fuck_with_fetcher(data, blow = false)
@@ -390,7 +389,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
390
389
  def test_download_unsupported
391
390
  inst = Gem::RemoteFetcher.fetcher
392
391
 
393
- e = assert_raises ArgumentError do
392
+ e = assert_raise ArgumentError do
394
393
  inst.download @a1, 'ftp://gems.rubyforge.org'
395
394
  end
396
395
 
@@ -451,7 +450,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
451
450
 
452
451
  url = 'http://example.com/uri'
453
452
 
454
- e = assert_raises Gem::RemoteFetcher::FetchError do
453
+ e = assert_raise Gem::RemoteFetcher::FetchError do
455
454
  fetcher.fetch_path url
456
455
  end
457
456
 
@@ -469,7 +468,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
469
468
 
470
469
  url = 'http://example.com/uri'
471
470
 
472
- e = assert_raises Gem::RemoteFetcher::FetchError do
471
+ e = assert_raise Gem::RemoteFetcher::FetchError do
473
472
  fetcher.fetch_path url
474
473
  end
475
474
 
@@ -487,7 +486,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
487
486
 
488
487
  url = 'http://example.com/uri'
489
488
 
490
- e = assert_raises Gem::RemoteFetcher::FetchError do
489
+ e = assert_raise Gem::RemoteFetcher::FetchError do
491
490
  fetcher.fetch_path url
492
491
  end
493
492
 
@@ -506,7 +505,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
506
505
 
507
506
  url = 'http://example.com/uri'
508
507
 
509
- e = assert_raises Gem::RemoteFetcher::FetchError do
508
+ e = assert_raise Gem::RemoteFetcher::FetchError do
510
509
  fetcher.fetch_path url
511
510
  end
512
511
 
@@ -525,7 +524,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
525
524
 
526
525
  url = 'http://example.com/uri'
527
526
 
528
- e = assert_raises Gem::RemoteFetcher::FetchError do
527
+ e = assert_raise Gem::RemoteFetcher::FetchError do
529
528
  fetcher.fetch_path url
530
529
  end
531
530
 
@@ -544,7 +543,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
544
543
 
545
544
  url = 'http://example.com/uri'
546
545
 
547
- e = assert_raises Gem::RemoteFetcher::FetchError do
546
+ e = assert_raise Gem::RemoteFetcher::FetchError do
548
547
  fetcher.fetch_path url
549
548
  end
550
549
 
@@ -634,7 +633,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
634
633
  res
635
634
  end
636
635
 
637
- e = assert_raises Gem::RemoteFetcher::FetchError do
636
+ e = assert_raise Gem::RemoteFetcher::FetchError do
638
637
  fetcher.fetch_http URI.parse(url)
639
638
  end
640
639
 
@@ -651,7 +650,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
651
650
  res
652
651
  end
653
652
 
654
- e = assert_raises Gem::RemoteFetcher::FetchError do
653
+ e = assert_raise Gem::RemoteFetcher::FetchError do
655
654
  fetcher.fetch_http URI.parse(url)
656
655
  end
657
656
 
@@ -836,7 +835,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
836
835
  fetcher = Gem::RemoteFetcher.new nil
837
836
  @fetcher = fetcher
838
837
 
839
- e = assert_raises Gem::RemoteFetcher::FetchError do
838
+ e = assert_raise Gem::RemoteFetcher::FetchError do
840
839
  fetcher.fetch_s3 URI.parse(url)
841
840
  end
842
841
 
@@ -952,7 +951,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
952
951
  with_configured_fetcher(
953
952
  ":ssl_ca_cert: #{temp_ca_cert}\n" +
954
953
  ":ssl_client_cert: #{temp_client_cert}\n") do |fetcher|
955
- assert_raises Gem::RemoteFetcher::FetchError do
954
+ assert_raise Gem::RemoteFetcher::FetchError do
956
955
  fetcher.fetch_path("https://localhost:#{ssl_server.config[:Port]}/yaml")
957
956
  end
958
957
  end
@@ -961,7 +960,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
961
960
  def test_do_not_allow_insecure_ssl_connection_by_default
962
961
  ssl_server = start_ssl_server
963
962
  with_configured_fetcher do |fetcher|
964
- assert_raises Gem::RemoteFetcher::FetchError do
963
+ assert_raise Gem::RemoteFetcher::FetchError do
965
964
  fetcher.fetch_path("https://localhost:#{ssl_server.config[:Port]}/yaml")
966
965
  end
967
966
  end
@@ -981,7 +980,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
981
980
  "redirecting to non-https resource: #{@server_uri} (https://localhost:#{ssl_server.config[:Port]}/insecure_redirect?to=#{@server_uri})"
982
981
 
983
982
  with_configured_fetcher(":ssl_ca_cert: #{temp_ca_cert}") do |fetcher|
984
- err = assert_raises Gem::RemoteFetcher::FetchError do
983
+ err = assert_raise Gem::RemoteFetcher::FetchError do
985
984
  fetcher.fetch_path("https://localhost:#{ssl_server.config[:Port]}/insecure_redirect?to=#{@server_uri}")
986
985
  end
987
986
 
@@ -994,7 +993,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
994
993
  temp_ca_cert = nil
995
994
 
996
995
  with_configured_fetcher(":ssl_ca_cert: #{temp_ca_cert}") do |fetcher|
997
- assert_raises Gem::RemoteFetcher::FetchError do
996
+ assert_raise Gem::RemoteFetcher::FetchError do
998
997
  fetcher.fetch_path("https://localhost:#{ssl_server.config[:Port]}")
999
998
  end
1000
999
  end
@@ -1084,7 +1083,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
1084
1083
  end
1085
1084
 
1086
1085
  def start_ssl_server(config = {})
1087
- skip "starting this test server fails randomly on jruby" if Gem.java_platform?
1086
+ pend "starting this test server fails randomly on jruby" if Gem.java_platform?
1088
1087
 
1089
1088
  null_logger = NilLog.new
1090
1089
  server = WEBrick::HTTPServer.new({