rubygems-update 3.2.17 → 3.2.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +39 -0
- data/Manifest.txt +3 -0
- data/Rakefile +6 -6
- data/bundler/CHANGELOG.md +54 -0
- data/bundler/bundler.gemspec +2 -3
- data/bundler/lib/bundler.rb +2 -1
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli.rb +13 -33
- data/bundler/lib/bundler/cli/check.rb +4 -2
- data/bundler/lib/bundler/cli/install.rb +6 -7
- data/bundler/lib/bundler/cli/outdated.rb +9 -10
- data/bundler/lib/bundler/definition.rb +29 -82
- data/bundler/lib/bundler/feature_flag.rb +0 -2
- data/bundler/lib/bundler/fetcher/compact_index.rb +1 -1
- data/bundler/lib/bundler/fetcher/index.rb +0 -1
- data/bundler/lib/bundler/friendly_errors.rb +2 -4
- data/bundler/lib/bundler/index.rb +1 -2
- data/bundler/lib/bundler/installer.rb +1 -8
- data/bundler/lib/bundler/man/bundle-add.1 +1 -1
- data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
- data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
- data/bundler/lib/bundler/man/bundle-check.1 +1 -1
- data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
- data/bundler/lib/bundler/man/bundle-config.1 +1 -7
- data/bundler/lib/bundler/man/bundle-config.1.ronn +0 -8
- data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
- data/bundler/lib/bundler/man/bundle-exec.1 +1 -1
- data/bundler/lib/bundler/man/bundle-gem.1 +1 -1
- data/bundler/lib/bundler/man/bundle-info.1 +1 -1
- data/bundler/lib/bundler/man/bundle-init.1 +1 -1
- data/bundler/lib/bundler/man/bundle-inject.1 +1 -1
- data/bundler/lib/bundler/man/bundle-install.1 +1 -1
- data/bundler/lib/bundler/man/bundle-list.1 +1 -1
- data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
- data/bundler/lib/bundler/man/bundle-open.1 +1 -1
- data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
- data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
- data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
- data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
- data/bundler/lib/bundler/man/bundle-show.1 +1 -1
- data/bundler/lib/bundler/man/bundle-update.1 +1 -1
- data/bundler/lib/bundler/man/bundle-viz.1 +1 -1
- data/bundler/lib/bundler/man/bundle.1 +1 -1
- data/bundler/lib/bundler/man/gemfile.5 +1 -1
- data/bundler/lib/bundler/plugin/api/source.rb +14 -0
- data/bundler/lib/bundler/resolver.rb +15 -96
- data/bundler/lib/bundler/resolver/spec_group.rb +0 -24
- data/bundler/lib/bundler/rubygems_ext.rb +2 -2
- data/bundler/lib/bundler/rubygems_integration.rb +4 -3
- data/bundler/lib/bundler/settings.rb +21 -3
- data/bundler/lib/bundler/source.rb +11 -0
- data/bundler/lib/bundler/source/rubygems.rb +24 -11
- data/bundler/lib/bundler/source/rubygems_aggregate.rb +64 -0
- data/bundler/lib/bundler/source_list.rb +35 -10
- data/bundler/lib/bundler/source_map.rb +58 -0
- data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +2 -2
- data/bundler/lib/bundler/version.rb +1 -1
- data/lib/rubygems.rb +1 -1
- data/lib/rubygems/command.rb +2 -0
- data/lib/rubygems/commands/build_command.rb +1 -1
- data/lib/rubygems/config_file.rb +1 -1
- data/lib/rubygems/ext/ext_conf_builder.rb +4 -4
- data/lib/rubygems/installer.rb +4 -0
- data/lib/rubygems/request.rb +1 -1
- data/lib/rubygems/specification.rb +0 -2
- data/lib/rubygems/specification_policy.rb +5 -4
- data/lib/rubygems/test_case.rb +106 -18
- data/lib/rubygems/util/licenses.rb +107 -2
- data/rubygems-update.gemspec +1 -1
- data/setup.rb +1 -2
- data/test/rubygems/packages/ill-formatted-platform-1.0.0.10.gem +0 -0
- data/test/rubygems/test_bundled_ca.rb +2 -2
- data/test/rubygems/test_deprecate.rb +3 -3
- data/test/rubygems/test_gem.rb +33 -31
- data/test/rubygems/test_gem_bundler_version_finder.rb +3 -5
- data/test/rubygems/test_gem_command.rb +13 -1
- data/test/rubygems/test_gem_command_manager.rb +5 -5
- data/test/rubygems/test_gem_commands_build_command.rb +10 -10
- data/test/rubygems/test_gem_commands_cert_command.rb +36 -36
- data/test/rubygems/test_gem_commands_check_command.rb +5 -5
- data/test/rubygems/test_gem_commands_cleanup_command.rb +24 -24
- data/test/rubygems/test_gem_commands_contents_command.rb +3 -3
- data/test/rubygems/test_gem_commands_dependency_command.rb +2 -2
- data/test/rubygems/test_gem_commands_environment_command.rb +1 -1
- data/test/rubygems/test_gem_commands_fetch_command.rb +9 -9
- data/test/rubygems/test_gem_commands_help_command.rb +8 -1
- data/test/rubygems/test_gem_commands_install_command.rb +60 -60
- data/test/rubygems/test_gem_commands_list_command.rb +1 -1
- data/test/rubygems/test_gem_commands_lock_command.rb +1 -1
- data/test/rubygems/test_gem_commands_open_command.rb +8 -9
- data/test/rubygems/test_gem_commands_owner_command.rb +3 -3
- data/test/rubygems/test_gem_commands_pristine_command.rb +14 -14
- data/test/rubygems/test_gem_commands_push_command.rb +6 -11
- data/test/rubygems/test_gem_commands_query_command.rb +7 -7
- data/test/rubygems/test_gem_commands_server_command.rb +2 -2
- data/test/rubygems/test_gem_commands_setup_command.rb +21 -21
- data/test/rubygems/test_gem_commands_signin_command.rb +13 -6
- data/test/rubygems/test_gem_commands_sources_command.rb +5 -5
- data/test/rubygems/test_gem_commands_specification_command.rb +6 -6
- data/test/rubygems/test_gem_commands_uninstall_command.rb +4 -4
- data/test/rubygems/test_gem_commands_unpack_command.rb +2 -2
- data/test/rubygems/test_gem_commands_update_command.rb +10 -10
- data/test/rubygems/test_gem_commands_which_command.rb +3 -3
- data/test/rubygems/test_gem_commands_yank_command.rb +1 -1
- data/test/rubygems/test_gem_config_file.rb +9 -9
- data/test/rubygems/test_gem_dependency.rb +12 -6
- data/test/rubygems/test_gem_dependency_installer.rb +4 -4
- data/test/rubygems/test_gem_doctor.rb +30 -30
- data/test/rubygems/test_gem_ext_builder.rb +20 -20
- data/test/rubygems/test_gem_ext_cmake_builder.rb +4 -4
- data/test/rubygems/test_gem_ext_configure_builder.rb +4 -4
- data/test/rubygems/test_gem_ext_ext_conf_builder.rb +14 -13
- data/test/rubygems/test_gem_ext_rake_builder.rb +1 -1
- data/test/rubygems/test_gem_gemcutter_utilities.rb +8 -14
- data/test/rubygems/test_gem_install_update_options.rb +9 -9
- data/test/rubygems/test_gem_installer.rb +162 -140
- data/test/rubygems/test_gem_local_remote_options.rb +1 -1
- data/test/rubygems/test_gem_package.rb +48 -48
- data/test/rubygems/test_gem_package_old.rb +9 -9
- data/test/rubygems/test_gem_package_tar_header.rb +5 -5
- data/test/rubygems/test_gem_package_tar_reader_entry.rb +8 -8
- data/test/rubygems/test_gem_package_tar_writer.rb +18 -20
- data/test/rubygems/test_gem_package_task.rb +2 -2
- data/test/rubygems/test_gem_path_support.rb +1 -1
- data/test/rubygems/test_gem_rdoc.rb +9 -9
- data/test/rubygems/test_gem_remote_fetcher.rb +17 -18
- data/test/rubygems/test_gem_request.rb +2 -2
- data/test/rubygems/test_gem_request_connection_pools.rb +1 -1
- data/test/rubygems/test_gem_request_set.rb +15 -14
- data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +16 -16
- data/test/rubygems/test_gem_request_set_lockfile.rb +3 -3
- data/test/rubygems/test_gem_request_set_lockfile_parser.rb +3 -3
- data/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb +4 -4
- data/test/rubygems/test_gem_requirement.rb +13 -13
- data/test/rubygems/test_gem_resolver.rb +11 -11
- data/test/rubygems/test_gem_resolver_best_set.rb +1 -1
- data/test/rubygems/test_gem_resolver_git_set.rb +1 -1
- data/test/rubygems/test_gem_resolver_git_specification.rb +2 -2
- data/test/rubygems/test_gem_resolver_index_specification.rb +1 -1
- data/test/rubygems/test_gem_resolver_installer_set.rb +4 -4
- data/test/rubygems/test_gem_resolver_local_specification.rb +1 -1
- data/test/rubygems/test_gem_resolver_specification.rb +1 -1
- data/test/rubygems/test_gem_resolver_vendor_set.rb +2 -2
- data/test/rubygems/test_gem_security.rb +5 -5
- data/test/rubygems/test_gem_security_policy.rb +27 -27
- data/test/rubygems/test_gem_security_signer.rb +7 -7
- data/test/rubygems/test_gem_security_trust_dir.rb +4 -4
- data/test/rubygems/test_gem_server.rb +2 -2
- data/test/rubygems/test_gem_silent_ui.rb +9 -9
- data/test/rubygems/test_gem_source.rb +2 -2
- data/test/rubygems/test_gem_source_fetch_problem.rb +1 -1
- data/test/rubygems/test_gem_source_git.rb +11 -11
- data/test/rubygems/test_gem_source_specific_file.rb +1 -1
- data/test/rubygems/test_gem_spec_fetcher.rb +1 -1
- data/test/rubygems/test_gem_specification.rb +86 -106
- data/test/rubygems/test_gem_stream_ui.rb +1 -1
- data/test/rubygems/test_gem_stub_specification.rb +4 -4
- data/test/rubygems/test_gem_uninstaller.rb +16 -16
- data/test/rubygems/test_gem_util.rb +8 -6
- data/test/rubygems/test_gem_version.rb +4 -13
- data/test/rubygems/test_kernel.rb +6 -4
- data/test/rubygems/test_project_sanity.rb +1 -1
- data/test/rubygems/test_remote_fetch_error.rb +1 -1
- data/test/rubygems/test_require.rb +12 -14
- data/test/test_changelog_generator.rb +1 -2
- metadata +6 -3
@@ -22,7 +22,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def test_class_new_old_format
|
25
|
-
|
25
|
+
pend "jruby can't require the simple_gem file" if Gem.java_platform?
|
26
26
|
require_relative "simple_gem"
|
27
27
|
File.open 'old_format.gem', 'wb' do |io|
|
28
28
|
io.write SIMPLE_GEM
|
@@ -98,7 +98,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
98
98
|
},
|
99
99
|
}
|
100
100
|
|
101
|
-
assert_equal expected,
|
101
|
+
assert_equal expected, load_yaml(checksums)
|
102
102
|
end
|
103
103
|
|
104
104
|
def test_build_time_uses_source_date_epoch
|
@@ -190,7 +190,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
190
190
|
File.symlink('../lib/code.rb', 'lib/code_sym2.rb')
|
191
191
|
rescue Errno::EACCES => e
|
192
192
|
if win_platform?
|
193
|
-
|
193
|
+
pend "symlink - must be admin with no UAC on Windows"
|
194
194
|
else
|
195
195
|
raise e
|
196
196
|
end
|
@@ -240,7 +240,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
240
240
|
package.build
|
241
241
|
|
242
242
|
assert_equal Gem::VERSION, spec.rubygems_version
|
243
|
-
|
243
|
+
assert_path_exist spec.file_name
|
244
244
|
|
245
245
|
reader = Gem::Package.new spec.file_name
|
246
246
|
assert_equal spec, reader.spec
|
@@ -252,7 +252,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
252
252
|
end
|
253
253
|
|
254
254
|
def test_build_auto_signed
|
255
|
-
|
255
|
+
pend 'openssl is missing' unless Gem::HAVE_OPENSSL
|
256
256
|
|
257
257
|
FileUtils.mkdir_p File.join(Gem.user_home, '.gem')
|
258
258
|
|
@@ -279,7 +279,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
279
279
|
package.build
|
280
280
|
|
281
281
|
assert_equal Gem::VERSION, spec.rubygems_version
|
282
|
-
|
282
|
+
assert_path_exist spec.file_name
|
283
283
|
|
284
284
|
reader = Gem::Package.new spec.file_name
|
285
285
|
assert reader.verify
|
@@ -295,7 +295,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
295
295
|
end
|
296
296
|
|
297
297
|
def test_build_auto_signed_encrypted_key
|
298
|
-
|
298
|
+
pend 'openssl is missing' unless Gem::HAVE_OPENSSL
|
299
299
|
|
300
300
|
FileUtils.mkdir_p File.join(Gem.user_home, '.gem')
|
301
301
|
|
@@ -322,7 +322,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
322
322
|
package.build
|
323
323
|
|
324
324
|
assert_equal Gem::VERSION, spec.rubygems_version
|
325
|
-
|
325
|
+
assert_path_exist spec.file_name
|
326
326
|
|
327
327
|
reader = Gem::Package.new spec.file_name
|
328
328
|
assert reader.verify
|
@@ -343,7 +343,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
343
343
|
package = Gem::Package.new spec.file_name
|
344
344
|
package.spec = spec
|
345
345
|
|
346
|
-
e =
|
346
|
+
e = assert_raise Gem::InvalidSpecificationException do
|
347
347
|
package.build
|
348
348
|
end
|
349
349
|
|
@@ -356,7 +356,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
356
356
|
package = Gem::Package.new spec.file_name
|
357
357
|
package.spec = spec
|
358
358
|
|
359
|
-
e =
|
359
|
+
e = assert_raise ArgumentError do
|
360
360
|
package.build true, true
|
361
361
|
end
|
362
362
|
|
@@ -364,7 +364,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
364
364
|
end
|
365
365
|
|
366
366
|
def test_build_signed
|
367
|
-
|
367
|
+
pend 'openssl is missing' unless Gem::HAVE_OPENSSL
|
368
368
|
|
369
369
|
spec = Gem::Specification.new 'build', '1'
|
370
370
|
spec.summary = 'build'
|
@@ -385,7 +385,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
385
385
|
package.build
|
386
386
|
|
387
387
|
assert_equal Gem::VERSION, spec.rubygems_version
|
388
|
-
|
388
|
+
assert_path_exist spec.file_name
|
389
389
|
|
390
390
|
reader = Gem::Package.new spec.file_name
|
391
391
|
assert reader.verify
|
@@ -401,7 +401,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
401
401
|
end
|
402
402
|
|
403
403
|
def test_build_signed_encrypted_key
|
404
|
-
|
404
|
+
pend 'openssl is missing' unless Gem::HAVE_OPENSSL
|
405
405
|
|
406
406
|
spec = Gem::Specification.new 'build', '1'
|
407
407
|
spec.summary = 'build'
|
@@ -422,7 +422,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
422
422
|
package.build
|
423
423
|
|
424
424
|
assert_equal Gem::VERSION, spec.rubygems_version
|
425
|
-
|
425
|
+
assert_path_exist spec.file_name
|
426
426
|
|
427
427
|
reader = Gem::Package.new spec.file_name
|
428
428
|
assert reader.verify
|
@@ -476,7 +476,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
476
476
|
package.extract_files @destination
|
477
477
|
|
478
478
|
extracted = File.join @destination, 'lib/code.rb'
|
479
|
-
|
479
|
+
assert_path_exist extracted
|
480
480
|
|
481
481
|
mask = 0100666 & (~File.umask)
|
482
482
|
|
@@ -507,7 +507,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
507
507
|
|
508
508
|
package.extract_files @destination
|
509
509
|
|
510
|
-
|
510
|
+
assert_path_exist @destination
|
511
511
|
end
|
512
512
|
|
513
513
|
def test_extract_tar_gz_absolute
|
@@ -519,7 +519,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
519
519
|
end
|
520
520
|
end
|
521
521
|
|
522
|
-
e =
|
522
|
+
e = assert_raise Gem::Package::PathError do
|
523
523
|
package.extract_tar_gz tgz_io, @destination
|
524
524
|
end
|
525
525
|
|
@@ -543,14 +543,14 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
543
543
|
package.extract_tar_gz tgz_io, @destination
|
544
544
|
rescue Errno::EACCES => e
|
545
545
|
if win_platform?
|
546
|
-
|
546
|
+
pend "symlink - must be admin with no UAC on Windows"
|
547
547
|
else
|
548
548
|
raise e
|
549
549
|
end
|
550
550
|
end
|
551
551
|
|
552
552
|
extracted = File.join @destination, 'lib/foo.rb'
|
553
|
-
|
553
|
+
assert_path_exist extracted
|
554
554
|
assert_equal '../relative.rb',
|
555
555
|
File.readlink(extracted)
|
556
556
|
assert_equal 'hi',
|
@@ -574,7 +574,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
574
574
|
destination_subdir = File.join @destination, 'subdir'
|
575
575
|
FileUtils.mkdir_p destination_subdir
|
576
576
|
|
577
|
-
e =
|
577
|
+
e = assert_raise(Gem::Package::PathError, Errno::EACCES) do
|
578
578
|
package.extract_tar_gz tgz_io, destination_subdir
|
579
579
|
end
|
580
580
|
|
@@ -582,7 +582,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
582
582
|
assert_equal("installing into parent path lib/link/outside.txt of " +
|
583
583
|
"#{destination_subdir} is not allowed", e.message)
|
584
584
|
elsif win_platform?
|
585
|
-
|
585
|
+
pend "symlink - must be admin with no UAC on Windows"
|
586
586
|
else
|
587
587
|
raise e
|
588
588
|
end
|
@@ -601,24 +601,24 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
601
601
|
destination_user_subdir = File.join destination_user_dir, 'dir'
|
602
602
|
FileUtils.mkdir_p destination_user_subdir
|
603
603
|
|
604
|
-
|
604
|
+
pend "TMPDIR seems too long to add it as symlink into tar" if destination_user_dir.size > 90
|
605
605
|
|
606
606
|
tgz_io = util_tar_gz do |tar|
|
607
607
|
tar.add_symlink 'link', destination_user_dir, 16877
|
608
608
|
tar.add_symlink 'link/dir', '.', 16877
|
609
609
|
end
|
610
610
|
|
611
|
-
e =
|
611
|
+
e = assert_raise(Gem::Package::PathError, Errno::EACCES) do
|
612
612
|
package.extract_tar_gz tgz_io, destination_subdir
|
613
613
|
end
|
614
614
|
|
615
|
-
|
615
|
+
assert_path_exist destination_user_subdir
|
616
616
|
|
617
617
|
if Gem::Package::PathError === e
|
618
618
|
assert_equal("installing into parent path #{destination_user_subdir} of " +
|
619
619
|
"#{destination_subdir} is not allowed", e.message)
|
620
620
|
elsif win_platform?
|
621
|
-
|
621
|
+
pend "symlink - must be admin with no UAC on Windows"
|
622
622
|
else
|
623
623
|
raise e
|
624
624
|
end
|
@@ -638,10 +638,10 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
638
638
|
package.extract_tar_gz tgz_io, @destination
|
639
639
|
|
640
640
|
extracted = File.join @destination, 'lib/foo.rb'
|
641
|
-
|
641
|
+
assert_path_exist extracted
|
642
642
|
|
643
643
|
extracted = File.join @destination, 'lib/foo'
|
644
|
-
|
644
|
+
assert_path_exist extracted
|
645
645
|
end
|
646
646
|
|
647
647
|
def test_extract_tar_gz_dot_slash
|
@@ -656,7 +656,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
656
656
|
package.extract_tar_gz tgz_io, @destination
|
657
657
|
|
658
658
|
extracted = File.join @destination, 'dot_slash.rb'
|
659
|
-
|
659
|
+
assert_path_exist extracted
|
660
660
|
end
|
661
661
|
|
662
662
|
def test_extract_tar_gz_dot_file
|
@@ -671,7 +671,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
671
671
|
package.extract_tar_gz tgz_io, @destination
|
672
672
|
|
673
673
|
extracted = File.join @destination, '.dot_file.rb'
|
674
|
-
|
674
|
+
assert_path_exist extracted
|
675
675
|
end
|
676
676
|
|
677
677
|
if Gem.win_platform?
|
@@ -687,7 +687,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
687
687
|
package.extract_tar_gz tgz_io, @destination.upcase
|
688
688
|
|
689
689
|
extracted = File.join @destination, 'foo/file.rb'
|
690
|
-
|
690
|
+
assert_path_exist extracted
|
691
691
|
end
|
692
692
|
end
|
693
693
|
|
@@ -706,7 +706,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
706
706
|
def test_install_location_absolute
|
707
707
|
package = Gem::Package.new @gem
|
708
708
|
|
709
|
-
e =
|
709
|
+
e = assert_raise Gem::Package::PathError do
|
710
710
|
package.install_location '/absolute.rb', @destination
|
711
711
|
end
|
712
712
|
|
@@ -747,7 +747,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
747
747
|
def test_install_location_relative
|
748
748
|
package = Gem::Package.new @gem
|
749
749
|
|
750
|
-
e =
|
750
|
+
e = assert_raise Gem::Package::PathError do
|
751
751
|
package.install_location '../relative.rb', @destination
|
752
752
|
end
|
753
753
|
|
@@ -762,7 +762,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
762
762
|
|
763
763
|
filename = "../#{File.basename(@destination)}suffix.rb"
|
764
764
|
|
765
|
-
e =
|
765
|
+
e = assert_raise Gem::Package::PathError do
|
766
766
|
package.install_location filename, @destination
|
767
767
|
end
|
768
768
|
|
@@ -832,7 +832,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
832
832
|
|
833
833
|
package = Gem::Package.new 'mismatch.gem'
|
834
834
|
|
835
|
-
e =
|
835
|
+
e = assert_raise Gem::Package::FormatError do
|
836
836
|
package.verify
|
837
837
|
end
|
838
838
|
|
@@ -886,7 +886,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
886
886
|
end
|
887
887
|
|
888
888
|
def test_verify_corrupt
|
889
|
-
|
889
|
+
pend "jruby strips the null byte and does not think it's corrupt" if Gem.java_platform?
|
890
890
|
tf = Tempfile.open 'corrupt' do |io|
|
891
891
|
data = Gem::Util.gzip 'a' * 10
|
892
892
|
io.write \
|
@@ -896,7 +896,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
896
896
|
|
897
897
|
package = Gem::Package.new io.path
|
898
898
|
|
899
|
-
e =
|
899
|
+
e = assert_raise Gem::Package::FormatError do
|
900
900
|
package.verify
|
901
901
|
end
|
902
902
|
|
@@ -912,7 +912,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
912
912
|
|
913
913
|
package = Gem::Package.new 'empty.gem'
|
914
914
|
|
915
|
-
e =
|
915
|
+
e = assert_raise Gem::Package::FormatError do
|
916
916
|
package.verify
|
917
917
|
end
|
918
918
|
|
@@ -922,7 +922,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
922
922
|
def test_verify_nonexistent
|
923
923
|
package = Gem::Package.new 'nonexistent.gem'
|
924
924
|
|
925
|
-
e =
|
925
|
+
e = assert_raise Gem::Package::FormatError do
|
926
926
|
package.verify
|
927
927
|
end
|
928
928
|
|
@@ -949,7 +949,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
949
949
|
|
950
950
|
package = Gem::Package.new @gem
|
951
951
|
|
952
|
-
e =
|
952
|
+
e = assert_raise Gem::Security::Exception do
|
953
953
|
package.verify
|
954
954
|
end
|
955
955
|
|
@@ -957,12 +957,12 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
957
957
|
end
|
958
958
|
|
959
959
|
def test_verify_security_policy
|
960
|
-
|
960
|
+
pend 'openssl is missing' unless Gem::HAVE_OPENSSL
|
961
961
|
|
962
962
|
package = Gem::Package.new @gem
|
963
963
|
package.security_policy = Gem::Security::HighSecurity
|
964
964
|
|
965
|
-
e =
|
965
|
+
e = assert_raise Gem::Security::Exception do
|
966
966
|
package.verify
|
967
967
|
end
|
968
968
|
|
@@ -974,7 +974,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
974
974
|
end
|
975
975
|
|
976
976
|
def test_verify_security_policy_low_security
|
977
|
-
|
977
|
+
pend 'openssl is missing' unless Gem::HAVE_OPENSSL
|
978
978
|
|
979
979
|
@spec.cert_chain = [PUBLIC_CERT.to_pem]
|
980
980
|
@spec.signing_key = PRIVATE_KEY
|
@@ -994,7 +994,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
994
994
|
end
|
995
995
|
|
996
996
|
def test_verify_security_policy_checksum_missing
|
997
|
-
|
997
|
+
pend 'openssl is missing' unless Gem::HAVE_OPENSSL
|
998
998
|
|
999
999
|
@spec.cert_chain = [PUBLIC_CERT.to_pem]
|
1000
1000
|
@spec.signing_key = PRIVATE_KEY
|
@@ -1032,7 +1032,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
1032
1032
|
package = Gem::Package.new @gem
|
1033
1033
|
package.security_policy = Gem::Security::HighSecurity
|
1034
1034
|
|
1035
|
-
e =
|
1035
|
+
e = assert_raise Gem::Security::Exception do
|
1036
1036
|
package.verify
|
1037
1037
|
end
|
1038
1038
|
|
@@ -1049,7 +1049,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
1049
1049
|
|
1050
1050
|
package = Gem::Package.new 'bad.gem'
|
1051
1051
|
|
1052
|
-
e =
|
1052
|
+
e = assert_raise Gem::Package::FormatError do
|
1053
1053
|
package.verify
|
1054
1054
|
end
|
1055
1055
|
|
@@ -1068,8 +1068,8 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
1068
1068
|
_, err = use_ui @ui do
|
1069
1069
|
e = nil
|
1070
1070
|
|
1071
|
-
out_err =
|
1072
|
-
e =
|
1071
|
+
out_err = capture_output do
|
1072
|
+
e = assert_raise ArgumentError do
|
1073
1073
|
package.verify_entry entry
|
1074
1074
|
end
|
1075
1075
|
end
|
@@ -1140,7 +1140,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
1140
1140
|
def test_spec_from_io_raises_gem_error_for_io_not_at_start
|
1141
1141
|
io = StringIO.new Gem.read_binary @gem
|
1142
1142
|
io.read(1)
|
1143
|
-
|
1143
|
+
assert_raise(Gem::Package::Error) do
|
1144
1144
|
Gem::Package.new io
|
1145
1145
|
end
|
1146
1146
|
end
|
@@ -23,11 +23,11 @@ unless Gem.java_platform? # jruby can't require the simple_gem file
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def test_contents_security_policy
|
26
|
-
|
26
|
+
pend 'openssl is missing' unless Gem::HAVE_OPENSSL
|
27
27
|
|
28
28
|
@package.security_policy = Gem::Security::AlmostNoSecurity
|
29
29
|
|
30
|
-
|
30
|
+
assert_raise Gem::Security::Exception do
|
31
31
|
@package.contents
|
32
32
|
end
|
33
33
|
end
|
@@ -36,7 +36,7 @@ unless Gem.java_platform? # jruby can't require the simple_gem file
|
|
36
36
|
@package.extract_files @destination
|
37
37
|
|
38
38
|
extracted = File.join @destination, 'lib/foo.rb'
|
39
|
-
|
39
|
+
assert_path_exist extracted
|
40
40
|
|
41
41
|
mask = 0100644 & (~File.umask)
|
42
42
|
|
@@ -44,11 +44,11 @@ unless Gem.java_platform? # jruby can't require the simple_gem file
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def test_extract_files_security_policy
|
47
|
-
|
47
|
+
pend 'openssl is missing' unless Gem::HAVE_OPENSSL
|
48
48
|
|
49
49
|
@package.security_policy = Gem::Security::AlmostNoSecurity
|
50
50
|
|
51
|
-
|
51
|
+
assert_raise Gem::Security::Exception do
|
52
52
|
@package.extract_files @destination
|
53
53
|
end
|
54
54
|
end
|
@@ -58,17 +58,17 @@ unless Gem.java_platform? # jruby can't require the simple_gem file
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def test_spec_security_policy
|
61
|
-
|
61
|
+
pend 'openssl is missing' unless Gem::HAVE_OPENSSL
|
62
62
|
|
63
63
|
@package.security_policy = Gem::Security::AlmostNoSecurity
|
64
64
|
|
65
|
-
|
65
|
+
assert_raise Gem::Security::Exception do
|
66
66
|
@package.spec
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
70
70
|
def test_verify
|
71
|
-
|
71
|
+
pend 'openssl is missing' unless Gem::HAVE_OPENSSL
|
72
72
|
|
73
73
|
assert @package.verify
|
74
74
|
|
@@ -78,7 +78,7 @@ unless Gem.java_platform? # jruby can't require the simple_gem file
|
|
78
78
|
|
79
79
|
@package.security_policy = Gem::Security::AlmostNoSecurity
|
80
80
|
|
81
|
-
e =
|
81
|
+
e = assert_raise Gem::Security::Exception do
|
82
82
|
@package.verify
|
83
83
|
end
|
84
84
|
|