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.
- 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
@@ -76,7 +76,7 @@ end
|
|
76
76
|
installer.generate_bin
|
77
77
|
|
78
78
|
installed_exec = File.join util_inst_bindir, 'executable'
|
79
|
-
|
79
|
+
assert_path_exist installed_exec
|
80
80
|
|
81
81
|
wrapper = File.read installed_exec
|
82
82
|
assert_match %r{generated by RubyGems}, wrapper
|
@@ -90,7 +90,7 @@ end
|
|
90
90
|
|
91
91
|
ui = Gem::MockGemUi.new "n\n"
|
92
92
|
use_ui ui do
|
93
|
-
e =
|
93
|
+
e = assert_raise Gem::InstallError do
|
94
94
|
installer.generate_bin
|
95
95
|
end
|
96
96
|
|
@@ -134,7 +134,7 @@ gem 'other', version
|
|
134
134
|
installer.generate_bin # should not raise
|
135
135
|
|
136
136
|
installed_exec = File.join util_inst_bindir, 'foo-executable-bar'
|
137
|
-
|
137
|
+
assert_path_exist installed_exec
|
138
138
|
|
139
139
|
wrapper = File.read installed_exec
|
140
140
|
assert_match %r{generated by RubyGems}, wrapper
|
@@ -150,7 +150,7 @@ gem 'other', version
|
|
150
150
|
ui = Gem::MockGemUi.new "n\n"
|
151
151
|
|
152
152
|
use_ui ui do
|
153
|
-
e =
|
153
|
+
e = assert_raise Gem::InstallError do
|
154
154
|
installer.generate_bin
|
155
155
|
end
|
156
156
|
|
@@ -169,7 +169,7 @@ gem 'other', version
|
|
169
169
|
installer.generate_bin
|
170
170
|
|
171
171
|
installed_exec = File.join util_inst_bindir, 'executable'
|
172
|
-
|
172
|
+
assert_path_exist installed_exec
|
173
173
|
|
174
174
|
wrapper = File.read installed_exec
|
175
175
|
assert_match %r{generated by RubyGems}, wrapper
|
@@ -184,7 +184,7 @@ gem 'other', version
|
|
184
184
|
installer.generate_bin
|
185
185
|
|
186
186
|
installed_exec = File.join util_inst_bindir, 'executable'
|
187
|
-
|
187
|
+
assert_path_exist installed_exec
|
188
188
|
|
189
189
|
wrapper = File.read installed_exec
|
190
190
|
assert_match %r{generated by RubyGems}, wrapper
|
@@ -222,7 +222,7 @@ gem 'other', version
|
|
222
222
|
end
|
223
223
|
|
224
224
|
def test_check_that_user_bin_dir_is_in_path_tilde
|
225
|
-
|
225
|
+
pend "Tilde is PATH is not supported under MS Windows" if win_platform?
|
226
226
|
|
227
227
|
orig_PATH, ENV['PATH'] =
|
228
228
|
ENV['PATH'], [ENV['PATH'], '~/bin'].join(File::PATH_SEPARATOR)
|
@@ -264,7 +264,7 @@ gem 'other', version
|
|
264
264
|
assert installer.ensure_dependency(@spec, dep)
|
265
265
|
|
266
266
|
dep = Gem::Dependency.new 'b', '> 2'
|
267
|
-
e =
|
267
|
+
e = assert_raise Gem::InstallError do
|
268
268
|
installer.ensure_dependency @spec, dep
|
269
269
|
end
|
270
270
|
|
@@ -278,7 +278,7 @@ gem 'other', version
|
|
278
278
|
|
279
279
|
installer = Gem::Installer.at a_gem
|
280
280
|
|
281
|
-
e =
|
281
|
+
e = assert_raise Gem::InstallError do
|
282
282
|
installer.ensure_loadable_spec
|
283
283
|
end
|
284
284
|
|
@@ -287,7 +287,7 @@ gem 'other', version
|
|
287
287
|
end
|
288
288
|
|
289
289
|
def test_ensure_loadable_spec_security_policy
|
290
|
-
|
290
|
+
pend 'openssl is missing' unless Gem::HAVE_OPENSSL
|
291
291
|
|
292
292
|
_, a_gem = util_gem 'a', 2 do |s|
|
293
293
|
s.add_dependency 'garbage ~> 5'
|
@@ -296,7 +296,7 @@ gem 'other', version
|
|
296
296
|
policy = Gem::Security::HighSecurity
|
297
297
|
installer = Gem::Installer.at a_gem, :security_policy => policy
|
298
298
|
|
299
|
-
|
299
|
+
assert_raise Gem::Security::Exception do
|
300
300
|
installer.ensure_loadable_spec
|
301
301
|
end
|
302
302
|
end
|
@@ -306,7 +306,7 @@ gem 'other', version
|
|
306
306
|
|
307
307
|
installer.extract_files
|
308
308
|
|
309
|
-
|
309
|
+
assert_path_exist File.join @spec.gem_dir, 'bin/executable'
|
310
310
|
end
|
311
311
|
|
312
312
|
def test_generate_bin_bindir
|
@@ -329,7 +329,7 @@ gem 'other', version
|
|
329
329
|
|
330
330
|
assert_directory_exists util_inst_bindir
|
331
331
|
installed_exec = File.join(util_inst_bindir, 'executable')
|
332
|
-
|
332
|
+
assert_path_exist installed_exec
|
333
333
|
assert_equal mask, File.stat(installed_exec).mode unless win_platform?
|
334
334
|
|
335
335
|
wrapper = File.read installed_exec
|
@@ -372,7 +372,7 @@ gem 'other', version
|
|
372
372
|
installer.generate_bin
|
373
373
|
assert_directory_exists util_inst_bindir
|
374
374
|
installed_exec = File.join util_inst_bindir, 'executable'
|
375
|
-
|
375
|
+
assert_path_exist installed_exec
|
376
376
|
assert_equal mask, File.stat(installed_exec).mode unless win_platform?
|
377
377
|
|
378
378
|
wrapper = File.read installed_exec
|
@@ -391,7 +391,7 @@ gem 'other', version
|
|
391
391
|
installer.generate_bin
|
392
392
|
assert_directory_exists util_inst_bindir
|
393
393
|
installed_exec = File.join util_inst_bindir, 'foo-executable-bar'
|
394
|
-
|
394
|
+
assert_path_exist installed_exec
|
395
395
|
ensure
|
396
396
|
Gem::Installer.exec_format = nil
|
397
397
|
end
|
@@ -407,7 +407,7 @@ gem 'other', version
|
|
407
407
|
installer.generate_bin
|
408
408
|
assert_directory_exists util_inst_bindir
|
409
409
|
installed_exec = File.join util_inst_bindir, 'executable'
|
410
|
-
|
410
|
+
assert_path_exist installed_exec
|
411
411
|
ensure
|
412
412
|
Gem::Installer.exec_format = nil
|
413
413
|
end
|
@@ -431,7 +431,7 @@ gem 'other', version
|
|
431
431
|
installer.generate_bin
|
432
432
|
|
433
433
|
installed_exec = File.join("#{@gemhome}2", "bin", 'executable')
|
434
|
-
|
434
|
+
assert_path_exist installed_exec
|
435
435
|
assert_equal mask, File.stat(installed_exec).mode unless win_platform?
|
436
436
|
|
437
437
|
wrapper = File.read installed_exec
|
@@ -446,7 +446,7 @@ gem 'other', version
|
|
446
446
|
installer.wrappers = true
|
447
447
|
installer.generate_bin
|
448
448
|
|
449
|
-
|
449
|
+
assert_path_not_exist util_inst_bindir, 'bin dir was created when not needed'
|
450
450
|
end
|
451
451
|
|
452
452
|
def test_generate_bin_script_no_perms
|
@@ -458,13 +458,13 @@ gem 'other', version
|
|
458
458
|
Dir.mkdir util_inst_bindir
|
459
459
|
|
460
460
|
if win_platform?
|
461
|
-
|
461
|
+
pend('test_generate_bin_script_no_perms skipped on MS Windows')
|
462
462
|
elsif Process.uid.zero?
|
463
|
-
|
463
|
+
pend('test_generate_bin_script_no_perms skipped in root privilege')
|
464
464
|
else
|
465
465
|
FileUtils.chmod 0000, util_inst_bindir
|
466
466
|
|
467
|
-
|
467
|
+
assert_raise Gem::FilePermissionError do
|
468
468
|
installer.generate_bin
|
469
469
|
end
|
470
470
|
end
|
@@ -488,7 +488,7 @@ gem 'other', version
|
|
488
488
|
installer.generate_bin
|
489
489
|
|
490
490
|
installed_exec = File.join @gemhome, 'bin', 'executable'
|
491
|
-
|
491
|
+
assert_path_exist installed_exec
|
492
492
|
assert_equal mask, File.stat(installed_exec).mode unless win_platform?
|
493
493
|
|
494
494
|
wrapper = File.read installed_exec
|
@@ -515,7 +515,7 @@ gem 'other', version
|
|
515
515
|
|
516
516
|
installer.generate_bin
|
517
517
|
assert_directory_exists util_inst_bindir
|
518
|
-
|
518
|
+
assert_path_exist installed_exec
|
519
519
|
assert_equal mask, File.stat(installed_exec).mode unless win_platform?
|
520
520
|
|
521
521
|
assert_match %r{generated by RubyGems}, File.read(installed_exec)
|
@@ -525,7 +525,7 @@ gem 'other', version
|
|
525
525
|
end
|
526
526
|
|
527
527
|
def test_generate_bin_symlink
|
528
|
-
|
528
|
+
pend "Symlinks not supported or not enabled" unless symlink_supported?
|
529
529
|
|
530
530
|
installer = setup_base_installer
|
531
531
|
|
@@ -549,7 +549,7 @@ gem 'other', version
|
|
549
549
|
installer.wrappers = false
|
550
550
|
installer.generate_bin
|
551
551
|
|
552
|
-
|
552
|
+
assert_path_not_exist util_inst_bindir
|
553
553
|
end
|
554
554
|
|
555
555
|
def test_generate_bin_symlink_no_perms
|
@@ -562,13 +562,13 @@ gem 'other', version
|
|
562
562
|
Dir.mkdir util_inst_bindir
|
563
563
|
|
564
564
|
if win_platform?
|
565
|
-
|
565
|
+
pend('test_generate_bin_symlink_no_perms skipped on MS Windows')
|
566
566
|
elsif Process.uid.zero?
|
567
|
-
|
567
|
+
pend('test_user_install_disabled_read_only test skipped in root privilege')
|
568
568
|
else
|
569
569
|
FileUtils.chmod 0000, util_inst_bindir
|
570
570
|
|
571
|
-
|
571
|
+
assert_raise Gem::FilePermissionError do
|
572
572
|
installer.generate_bin
|
573
573
|
end
|
574
574
|
end
|
@@ -577,7 +577,7 @@ gem 'other', version
|
|
577
577
|
end
|
578
578
|
|
579
579
|
def test_generate_bin_symlink_update_newer
|
580
|
-
|
580
|
+
pend "Symlinks not supported or not enabled" unless symlink_supported?
|
581
581
|
|
582
582
|
installer = setup_base_installer
|
583
583
|
|
@@ -609,7 +609,7 @@ gem 'other', version
|
|
609
609
|
end
|
610
610
|
|
611
611
|
def test_generate_bin_symlink_update_older
|
612
|
-
|
612
|
+
pend "Symlinks not supported or not enabled" unless symlink_supported?
|
613
613
|
|
614
614
|
installer = setup_base_installer
|
615
615
|
|
@@ -647,7 +647,7 @@ gem 'other', version
|
|
647
647
|
end
|
648
648
|
|
649
649
|
def test_generate_bin_symlink_update_remove_wrapper
|
650
|
-
|
650
|
+
pend "Symlinks not supported or not enabled" unless symlink_supported?
|
651
651
|
|
652
652
|
installer = setup_base_installer
|
653
653
|
|
@@ -658,7 +658,7 @@ gem 'other', version
|
|
658
658
|
installer.generate_bin
|
659
659
|
|
660
660
|
installed_exec = File.join util_inst_bindir, 'executable'
|
661
|
-
|
661
|
+
assert_path_exist installed_exec
|
662
662
|
|
663
663
|
@spec = Gem::Specification.new do |s|
|
664
664
|
s.files = ['lib/code.rb']
|
@@ -701,7 +701,7 @@ gem 'other', version
|
|
701
701
|
|
702
702
|
assert_directory_exists util_inst_bindir
|
703
703
|
installed_exec = File.join(util_inst_bindir, 'executable')
|
704
|
-
|
704
|
+
assert_path_exist installed_exec
|
705
705
|
|
706
706
|
if symlink_supported?
|
707
707
|
assert File.symlink?(installed_exec)
|
@@ -720,7 +720,7 @@ gem 'other', version
|
|
720
720
|
end
|
721
721
|
|
722
722
|
def test_generate_bin_uses_default_shebang
|
723
|
-
|
723
|
+
pend "Symlinks not supported or not enabled" unless symlink_supported?
|
724
724
|
|
725
725
|
installer = setup_base_installer
|
726
726
|
|
@@ -946,22 +946,22 @@ gem 'other', version
|
|
946
946
|
spec_file = File.join @gemhome, 'specifications', @spec.spec_name
|
947
947
|
|
948
948
|
Gem.pre_install do
|
949
|
-
|
950
|
-
|
949
|
+
assert_path_not_exist cache_file, 'cache file must not exist yet'
|
950
|
+
assert_path_not_exist spec_file, 'spec file must not exist yet'
|
951
951
|
true
|
952
952
|
end
|
953
953
|
|
954
954
|
Gem.post_build do
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
955
|
+
assert_path_exist gemdir, 'gem install dir must exist'
|
956
|
+
assert_path_exist rakefile, 'gem executable must exist'
|
957
|
+
assert_path_not_exist stub_exe, 'gem executable must not exist'
|
958
|
+
assert_path_not_exist spec_file, 'spec file must not exist yet'
|
959
959
|
true
|
960
960
|
end
|
961
961
|
|
962
962
|
Gem.post_install do
|
963
|
-
|
964
|
-
|
963
|
+
assert_path_exist cache_file, 'cache file must exist'
|
964
|
+
assert_path_exist spec_file, 'spec file must exist'
|
965
965
|
end
|
966
966
|
|
967
967
|
@newspec = nil
|
@@ -972,21 +972,21 @@ gem 'other', version
|
|
972
972
|
end
|
973
973
|
|
974
974
|
assert_equal @spec, @newspec
|
975
|
-
|
976
|
-
|
975
|
+
assert_path_exist gemdir
|
976
|
+
assert_path_exist stub_exe, 'gem executable must exist'
|
977
977
|
|
978
978
|
exe = File.join gemdir, 'bin', 'executable'
|
979
|
-
|
979
|
+
assert_path_exist exe
|
980
980
|
|
981
981
|
exe_mode = File.stat(exe).mode & 0111
|
982
982
|
assert_equal 0111, exe_mode, "0%o" % exe_mode unless win_platform?
|
983
983
|
|
984
|
-
|
984
|
+
assert_path_exist File.join gemdir, 'lib', 'code.rb'
|
985
985
|
|
986
|
-
|
986
|
+
assert_path_exist rakefile
|
987
987
|
|
988
988
|
assert_equal spec_file, @newspec.loaded_from
|
989
|
-
|
989
|
+
assert_path_exist spec_file
|
990
990
|
|
991
991
|
assert_same installer, @post_build_hook_arg
|
992
992
|
assert_same installer, @post_install_hook_arg
|
@@ -1009,7 +1009,7 @@ gem 'other', version
|
|
1009
1009
|
|
1010
1010
|
exe = File.join gemdir, 'bin', 'executable'
|
1011
1011
|
|
1012
|
-
e =
|
1012
|
+
e = assert_raise RuntimeError do
|
1013
1013
|
instance_eval File.read(exe)
|
1014
1014
|
end
|
1015
1015
|
|
@@ -1055,7 +1055,7 @@ gem 'other', version
|
|
1055
1055
|
end
|
1056
1056
|
end
|
1057
1057
|
|
1058
|
-
e =
|
1058
|
+
e = assert_raise RuntimeError do
|
1059
1059
|
instance_eval File.read(old_bin_file)
|
1060
1060
|
end
|
1061
1061
|
|
@@ -1083,7 +1083,7 @@ gem 'other', version
|
|
1083
1083
|
begin
|
1084
1084
|
Gem::Specification.reset
|
1085
1085
|
|
1086
|
-
e =
|
1086
|
+
e = assert_raise Gem::GemNotFoundException do
|
1087
1087
|
instance_eval File.read(exe)
|
1088
1088
|
end
|
1089
1089
|
ensure
|
@@ -1100,7 +1100,7 @@ gem 'other', version
|
|
1100
1100
|
|
1101
1101
|
exe = File.join @gemhome, 'bin', 'executable'
|
1102
1102
|
|
1103
|
-
|
1103
|
+
assert_path_exist exe, "default gem's executable not installed"
|
1104
1104
|
|
1105
1105
|
installer = util_setup_installer do |spec|
|
1106
1106
|
spec.name = 'default'
|
@@ -1118,7 +1118,7 @@ gem 'other', version
|
|
1118
1118
|
end
|
1119
1119
|
end
|
1120
1120
|
|
1121
|
-
e =
|
1121
|
+
e = assert_raise RuntimeError do
|
1122
1122
|
instance_eval File.read(exe)
|
1123
1123
|
end
|
1124
1124
|
|
@@ -1145,7 +1145,7 @@ gem 'other', version
|
|
1145
1145
|
begin
|
1146
1146
|
Gem::Specification.reset
|
1147
1147
|
|
1148
|
-
e =
|
1148
|
+
e = assert_raise RuntimeError do
|
1149
1149
|
instance_eval File.read(exe)
|
1150
1150
|
end
|
1151
1151
|
ensure
|
@@ -1165,7 +1165,7 @@ gem 'other', version
|
|
1165
1165
|
end
|
1166
1166
|
|
1167
1167
|
gemdir = File.join(@gemhome, 'gems', @spec.full_name)
|
1168
|
-
|
1168
|
+
assert_path_exist File.join gemdir, 'lib', 'code.rb'
|
1169
1169
|
|
1170
1170
|
installer = util_setup_installer
|
1171
1171
|
|
@@ -1188,8 +1188,8 @@ gem 'other', version
|
|
1188
1188
|
end
|
1189
1189
|
end
|
1190
1190
|
|
1191
|
-
|
1192
|
-
|
1191
|
+
assert_path_exist File.join gemdir, 'lib', 'other.rb'
|
1192
|
+
assert_path_not_exist File.join gemdir, 'lib', 'code.rb',
|
1193
1193
|
"code.rb from prior install of same gem shouldn't remain here"
|
1194
1194
|
end
|
1195
1195
|
|
@@ -1204,7 +1204,7 @@ gem 'other', version
|
|
1204
1204
|
end
|
1205
1205
|
|
1206
1206
|
gem_dir = File.join(@gemhome, 'gems', 'missing_dep-1')
|
1207
|
-
|
1207
|
+
assert_path_exist gem_dir
|
1208
1208
|
end
|
1209
1209
|
|
1210
1210
|
def test_install_build_root
|
@@ -1231,8 +1231,8 @@ gem 'other', version
|
|
1231
1231
|
assert_directory_exists File.join(Gem.dir, 'doc')
|
1232
1232
|
assert_directory_exists File.join(Gem.dir, 'specifications')
|
1233
1233
|
|
1234
|
-
|
1235
|
-
|
1234
|
+
assert_path_exist File.join @gemhome, 'cache', @spec.file_name
|
1235
|
+
assert_path_exist File.join @gemhome, 'specifications', @spec.spec_name
|
1236
1236
|
end
|
1237
1237
|
|
1238
1238
|
def test_install_post_build_false
|
@@ -1243,7 +1243,7 @@ gem 'other', version
|
|
1243
1243
|
end
|
1244
1244
|
|
1245
1245
|
use_ui @ui do
|
1246
|
-
e =
|
1246
|
+
e = assert_raise Gem::InstallError do
|
1247
1247
|
installer.install
|
1248
1248
|
end
|
1249
1249
|
|
@@ -1253,10 +1253,10 @@ gem 'other', version
|
|
1253
1253
|
end
|
1254
1254
|
|
1255
1255
|
spec_file = File.join @gemhome, 'specifications', @spec.spec_name
|
1256
|
-
|
1256
|
+
assert_path_not_exist spec_file
|
1257
1257
|
|
1258
1258
|
gem_dir = File.join @gemhome, 'gems', @spec.full_name
|
1259
|
-
|
1259
|
+
assert_path_not_exist gem_dir
|
1260
1260
|
end
|
1261
1261
|
|
1262
1262
|
def test_install_post_build_nil
|
@@ -1271,10 +1271,10 @@ gem 'other', version
|
|
1271
1271
|
end
|
1272
1272
|
|
1273
1273
|
spec_file = File.join @gemhome, 'specifications', @spec.spec_name
|
1274
|
-
|
1274
|
+
assert_path_exist spec_file
|
1275
1275
|
|
1276
1276
|
gem_dir = File.join @gemhome, 'gems', @spec.full_name
|
1277
|
-
|
1277
|
+
assert_path_exist gem_dir
|
1278
1278
|
end
|
1279
1279
|
|
1280
1280
|
def test_install_pre_install_false
|
@@ -1285,7 +1285,7 @@ gem 'other', version
|
|
1285
1285
|
end
|
1286
1286
|
|
1287
1287
|
use_ui @ui do
|
1288
|
-
e =
|
1288
|
+
e = assert_raise Gem::InstallError do
|
1289
1289
|
installer.install
|
1290
1290
|
end
|
1291
1291
|
|
@@ -1295,7 +1295,7 @@ gem 'other', version
|
|
1295
1295
|
end
|
1296
1296
|
|
1297
1297
|
spec_file = File.join @gemhome, 'specifications', @spec.spec_name
|
1298
|
-
|
1298
|
+
assert_path_not_exist spec_file
|
1299
1299
|
end
|
1300
1300
|
|
1301
1301
|
def test_install_pre_install_nil
|
@@ -1310,7 +1310,7 @@ gem 'other', version
|
|
1310
1310
|
end
|
1311
1311
|
|
1312
1312
|
spec_file = File.join @gemhome, 'specifications', @spec.spec_name
|
1313
|
-
|
1313
|
+
assert_path_exist spec_file
|
1314
1314
|
end
|
1315
1315
|
|
1316
1316
|
def test_install_with_message
|
@@ -1364,7 +1364,7 @@ gem 'other', version
|
|
1364
1364
|
|
1365
1365
|
expected_makefile = File.join gemhome2, 'gems', @spec.full_name, 'Makefile'
|
1366
1366
|
|
1367
|
-
|
1367
|
+
assert_path_exist expected_makefile
|
1368
1368
|
end
|
1369
1369
|
|
1370
1370
|
def test_install_extension_dir_is_removed_on_reinstall
|
@@ -1393,7 +1393,7 @@ gem 'other', version
|
|
1393
1393
|
write_file should_be_removed do |io|
|
1394
1394
|
io.write "DELETE ME ON REINSTALL"
|
1395
1395
|
end
|
1396
|
-
|
1396
|
+
assert_path_exist should_be_removed
|
1397
1397
|
|
1398
1398
|
# reinstall the gem, this is also the same as pristine
|
1399
1399
|
use_ui @ui do
|
@@ -1401,7 +1401,7 @@ gem 'other', version
|
|
1401
1401
|
installer.install
|
1402
1402
|
end
|
1403
1403
|
|
1404
|
-
|
1404
|
+
assert_path_not_exist should_be_removed
|
1405
1405
|
end
|
1406
1406
|
|
1407
1407
|
def test_install_user_extension_dir
|
@@ -1429,13 +1429,13 @@ gem 'other', version
|
|
1429
1429
|
|
1430
1430
|
expected_makefile = File.join Gem.user_dir, 'gems', @spec.full_name, 'Makefile'
|
1431
1431
|
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1432
|
+
assert_path_exist expected_makefile
|
1433
|
+
assert_path_exist expected_extension_dir
|
1434
|
+
assert_path_not_exist File.join expected_extension_dir, 'gem_make.out'
|
1435
1435
|
end
|
1436
1436
|
|
1437
1437
|
def test_find_lib_file_after_install
|
1438
|
-
|
1438
|
+
pend "extensions don't quite work on jruby" if Gem.java_platform?
|
1439
1439
|
|
1440
1440
|
@spec = setup_base_spec
|
1441
1441
|
@spec.extensions << "extconf.rb"
|
@@ -1481,7 +1481,7 @@ gem 'other', version
|
|
1481
1481
|
end
|
1482
1482
|
|
1483
1483
|
def test_install_extension_and_script
|
1484
|
-
|
1484
|
+
pend "Makefile creation crashes on jruby" if Gem.java_platform?
|
1485
1485
|
|
1486
1486
|
@spec = setup_base_spec
|
1487
1487
|
@spec.extensions << "extconf.rb"
|
@@ -1509,65 +1509,67 @@ gem 'other', version
|
|
1509
1509
|
RUBY
|
1510
1510
|
end
|
1511
1511
|
|
1512
|
-
|
1513
|
-
|
1512
|
+
assert_path_not_exist File.join @spec.gem_dir, rb
|
1513
|
+
assert_path_not_exist File.join @spec.gem_dir, rb2
|
1514
1514
|
use_ui @ui do
|
1515
1515
|
path = Gem::Package.build @spec
|
1516
1516
|
|
1517
1517
|
installer = Gem::Installer.at path
|
1518
1518
|
installer.install
|
1519
1519
|
end
|
1520
|
-
|
1521
|
-
|
1520
|
+
assert_path_exist File.join @spec.gem_dir, rb
|
1521
|
+
assert_path_exist File.join @spec.gem_dir, rb2
|
1522
1522
|
end
|
1523
1523
|
|
1524
1524
|
def test_install_extension_flat
|
1525
|
-
|
1525
|
+
pend "extensions don't quite work on jruby" if Gem.java_platform?
|
1526
1526
|
|
1527
|
-
|
1528
|
-
|
1527
|
+
begin
|
1528
|
+
@spec = setup_base_spec
|
1529
|
+
@spec.require_paths = ["."]
|
1529
1530
|
|
1530
|
-
|
1531
|
+
@spec.extensions << "extconf.rb"
|
1531
1532
|
|
1532
|
-
|
1533
|
-
|
1534
|
-
|
1533
|
+
write_file File.join(@tempdir, "extconf.rb") do |io|
|
1534
|
+
io.write <<-RUBY
|
1535
|
+
require "mkmf"
|
1535
1536
|
|
1536
|
-
|
1537
|
-
|
1538
|
-
|
1537
|
+
CONFIG['CC'] = '$(TOUCH) $@ ||'
|
1538
|
+
CONFIG['LDSHARED'] = '$(TOUCH) $@ ||'
|
1539
|
+
$ruby = '#{Gem.ruby}'
|
1539
1540
|
|
1540
|
-
|
1541
|
-
|
1542
|
-
|
1541
|
+
create_makefile("#{@spec.name}")
|
1542
|
+
RUBY
|
1543
|
+
end
|
1543
1544
|
|
1544
|
-
|
1545
|
-
|
1546
|
-
|
1547
|
-
|
1545
|
+
# empty depend file for no auto dependencies
|
1546
|
+
@spec.files += %W[depend #{@spec.name}.c].each do |file|
|
1547
|
+
write_file File.join(@tempdir, file)
|
1548
|
+
end
|
1548
1549
|
|
1549
|
-
|
1550
|
-
|
1551
|
-
|
1552
|
-
|
1550
|
+
so = File.join(@spec.gem_dir, "#{@spec.name}.#{RbConfig::CONFIG["DLEXT"]}")
|
1551
|
+
assert_path_not_exist so
|
1552
|
+
use_ui @ui do
|
1553
|
+
path = Gem::Package.build @spec
|
1553
1554
|
|
1554
|
-
|
1555
|
-
|
1556
|
-
|
1557
|
-
|
1558
|
-
|
1559
|
-
|
1560
|
-
|
1561
|
-
|
1555
|
+
installer = Gem::Installer.at path
|
1556
|
+
installer.install
|
1557
|
+
end
|
1558
|
+
assert_path_exist so
|
1559
|
+
rescue
|
1560
|
+
puts '-' * 78
|
1561
|
+
puts File.read File.join(@gemhome, 'gems', 'a-2', 'Makefile')
|
1562
|
+
puts '-' * 78
|
1562
1563
|
|
1563
|
-
|
1564
|
+
path = File.join(@gemhome, 'gems', 'a-2', 'gem_make.out')
|
1564
1565
|
|
1565
|
-
|
1566
|
-
|
1567
|
-
|
1568
|
-
|
1566
|
+
if File.exist?(path)
|
1567
|
+
puts File.read(path)
|
1568
|
+
puts '-' * 78
|
1569
|
+
end
|
1569
1570
|
|
1570
|
-
|
1571
|
+
raise
|
1572
|
+
end
|
1571
1573
|
end
|
1572
1574
|
|
1573
1575
|
def test_installation_satisfies_dependency_eh
|
@@ -1600,7 +1602,7 @@ gem 'other', version
|
|
1600
1602
|
installer.force = false
|
1601
1603
|
|
1602
1604
|
use_ui @ui do
|
1603
|
-
|
1605
|
+
assert_raise Gem::InstallError do
|
1604
1606
|
installer.install
|
1605
1607
|
end
|
1606
1608
|
end
|
@@ -1659,7 +1661,7 @@ gem 'other', version
|
|
1659
1661
|
|
1660
1662
|
use_ui @ui do
|
1661
1663
|
installer = Gem::Installer.at gem
|
1662
|
-
e =
|
1664
|
+
e = assert_raise Gem::InstallError do
|
1663
1665
|
installer.pre_install_checks
|
1664
1666
|
end
|
1665
1667
|
assert_equal '#<Gem::Specification name=../malicious version=1> has an invalid name', e.message
|
@@ -1679,7 +1681,7 @@ gem 'other', version
|
|
1679
1681
|
|
1680
1682
|
use_ui @ui do
|
1681
1683
|
installer = Gem::Installer.at gem
|
1682
|
-
e =
|
1684
|
+
e = assert_raise Gem::InstallError do
|
1683
1685
|
installer.pre_install_checks
|
1684
1686
|
end
|
1685
1687
|
assert_equal "#<Gem::Specification name=malicious\n::Object.const_set(:FROM_EVAL, true)# version=1> has an invalid name", e.message
|
@@ -1701,7 +1703,7 @@ gem 'other', version
|
|
1701
1703
|
|
1702
1704
|
use_ui @ui do
|
1703
1705
|
installer = Gem::Installer.at gem
|
1704
|
-
e =
|
1706
|
+
e = assert_raise Gem::InstallError do
|
1705
1707
|
installer.pre_install_checks
|
1706
1708
|
end
|
1707
1709
|
assert_equal "#<Gem::Specification name=malicious version=1> has an invalid require_paths", e.message
|
@@ -1709,7 +1711,7 @@ gem 'other', version
|
|
1709
1711
|
end
|
1710
1712
|
|
1711
1713
|
def test_pre_install_checks_malicious_extensions_before_eval
|
1712
|
-
|
1714
|
+
pend "mswin environment disallow to create file contained the carriage return code." if Gem.win_platform?
|
1713
1715
|
|
1714
1716
|
spec = util_spec "malicious", '1'
|
1715
1717
|
def spec.full_name # so the spec is buildable
|
@@ -1724,7 +1726,7 @@ gem 'other', version
|
|
1724
1726
|
|
1725
1727
|
use_ui @ui do
|
1726
1728
|
installer = Gem::Installer.at gem
|
1727
|
-
e =
|
1729
|
+
e = assert_raise Gem::InstallError do
|
1728
1730
|
installer.pre_install_checks
|
1729
1731
|
end
|
1730
1732
|
assert_equal "#<Gem::Specification name=malicious version=1> has an invalid extensions", e.message
|
@@ -1745,7 +1747,7 @@ gem 'other', version
|
|
1745
1747
|
|
1746
1748
|
use_ui @ui do
|
1747
1749
|
installer = Gem::Installer.at gem
|
1748
|
-
e =
|
1750
|
+
e = assert_raise Gem::InstallError do
|
1749
1751
|
installer.pre_install_checks
|
1750
1752
|
end
|
1751
1753
|
assert_equal "#<Gem::Specification name=malicious version=1> has an invalid specification_version", e.message
|
@@ -1767,13 +1769,33 @@ gem 'other', version
|
|
1767
1769
|
use_ui @ui do
|
1768
1770
|
installer = Gem::Installer.at gem
|
1769
1771
|
installer.ignore_dependencies = true
|
1770
|
-
e =
|
1772
|
+
e = assert_raise Gem::InstallError do
|
1771
1773
|
installer.pre_install_checks
|
1772
1774
|
end
|
1773
1775
|
assert_equal "#<Gem::Specification name=malicious version=1> has an invalid dependencies", e.message
|
1774
1776
|
end
|
1775
1777
|
end
|
1776
1778
|
|
1779
|
+
def test_pre_install_checks_malicious_platform_before_eval
|
1780
|
+
gem_with_ill_formated_platform = File.expand_path("packages/ill-formatted-platform-1.0.0.10.gem", __dir__)
|
1781
|
+
|
1782
|
+
installer = Gem::Installer.at(
|
1783
|
+
gem_with_ill_formated_platform,
|
1784
|
+
:install_dir => @gem_home,
|
1785
|
+
:user_install => false,
|
1786
|
+
:force => true
|
1787
|
+
)
|
1788
|
+
|
1789
|
+
use_ui @ui do
|
1790
|
+
e = assert_raise Gem::InstallError do
|
1791
|
+
installer.pre_install_checks
|
1792
|
+
end
|
1793
|
+
|
1794
|
+
assert_equal "x86-mswin32\n system('id > /tmp/nyangawa')# is an invalid platform", e.message
|
1795
|
+
assert_empty @ui.output
|
1796
|
+
end
|
1797
|
+
end
|
1798
|
+
|
1777
1799
|
def test_shebang
|
1778
1800
|
installer = setup_base_installer
|
1779
1801
|
|
@@ -1991,14 +2013,14 @@ gem 'other', version
|
|
1991
2013
|
installer.unpack dest
|
1992
2014
|
end
|
1993
2015
|
|
1994
|
-
|
1995
|
-
|
2016
|
+
assert_path_exist File.join dest, 'lib', 'code.rb'
|
2017
|
+
assert_path_exist File.join dest, 'bin', 'executable'
|
1996
2018
|
end
|
1997
2019
|
|
1998
2020
|
def test_write_build_info_file
|
1999
2021
|
installer = setup_base_installer
|
2000
2022
|
|
2001
|
-
|
2023
|
+
assert_path_not_exist @spec.build_info_file
|
2002
2024
|
|
2003
2025
|
installer.build_args = %w[
|
2004
2026
|
--with-libyaml-dir /usr/local/Cellar/libyaml/0.1.4
|
@@ -2006,7 +2028,7 @@ gem 'other', version
|
|
2006
2028
|
|
2007
2029
|
installer.write_build_info_file
|
2008
2030
|
|
2009
|
-
|
2031
|
+
assert_path_exist @spec.build_info_file
|
2010
2032
|
|
2011
2033
|
expected = "--with-libyaml-dir\n/usr/local/Cellar/libyaml/0.1.4\n"
|
2012
2034
|
|
@@ -2016,11 +2038,11 @@ gem 'other', version
|
|
2016
2038
|
def test_write_build_info_file_empty
|
2017
2039
|
installer = setup_base_installer
|
2018
2040
|
|
2019
|
-
|
2041
|
+
assert_path_not_exist @spec.build_info_file
|
2020
2042
|
|
2021
2043
|
installer.write_build_info_file
|
2022
2044
|
|
2023
|
-
|
2045
|
+
assert_path_not_exist @spec.build_info_file
|
2024
2046
|
end
|
2025
2047
|
|
2026
2048
|
def test_write_build_info_file_install_dir
|
@@ -2033,8 +2055,8 @@ gem 'other', version
|
|
2033
2055
|
|
2034
2056
|
installer.write_build_info_file
|
2035
2057
|
|
2036
|
-
|
2037
|
-
|
2058
|
+
assert_path_not_exist @spec.build_info_file
|
2059
|
+
assert_path_exist \
|
2038
2060
|
File.join("#{@gemhome}2", 'build_info', "#{@spec.full_name}.info")
|
2039
2061
|
end
|
2040
2062
|
|
@@ -2044,27 +2066,27 @@ gem 'other', version
|
|
2044
2066
|
gem = File.join @gemhome, @spec.file_name
|
2045
2067
|
|
2046
2068
|
FileUtils.mv cache_file, gem
|
2047
|
-
|
2069
|
+
assert_path_not_exist cache_file
|
2048
2070
|
|
2049
2071
|
installer = Gem::Installer.at gem
|
2050
2072
|
installer.gem_home = @gemhome
|
2051
2073
|
|
2052
2074
|
installer.write_cache_file
|
2053
2075
|
|
2054
|
-
|
2076
|
+
assert_path_exist cache_file
|
2055
2077
|
end
|
2056
2078
|
|
2057
2079
|
def test_write_spec
|
2058
2080
|
@spec = setup_base_spec
|
2059
2081
|
FileUtils.rm @spec.spec_file
|
2060
|
-
|
2082
|
+
assert_path_not_exist @spec.spec_file
|
2061
2083
|
|
2062
2084
|
installer = Gem::Installer.for_spec @spec
|
2063
2085
|
installer.gem_home = @gemhome
|
2064
2086
|
|
2065
2087
|
installer.write_spec
|
2066
2088
|
|
2067
|
-
|
2089
|
+
assert_path_exist @spec.spec_file
|
2068
2090
|
|
2069
2091
|
loaded = Gem::Specification.load @spec.spec_file
|
2070
2092
|
|
@@ -2076,7 +2098,7 @@ gem 'other', version
|
|
2076
2098
|
def test_write_spec_writes_cached_spec
|
2077
2099
|
@spec = setup_base_spec
|
2078
2100
|
FileUtils.rm @spec.spec_file
|
2079
|
-
|
2101
|
+
assert_path_not_exist @spec.spec_file
|
2080
2102
|
|
2081
2103
|
@spec.files = %w[a.rb b.rb c.rb]
|
2082
2104
|
|
@@ -2119,7 +2141,7 @@ gem 'other', version
|
|
2119
2141
|
|
2120
2142
|
assert_directory_exists File.join(@spec.gem_dir, 'bin')
|
2121
2143
|
installed_exec = File.join @spec.gem_dir, 'bin', 'executable'
|
2122
|
-
|
2144
|
+
assert_path_exist installed_exec
|
2123
2145
|
|
2124
2146
|
assert_directory_exists File.join(Gem.default_dir, 'specifications')
|
2125
2147
|
assert_directory_exists File.join(Gem.default_dir, 'specifications', 'default')
|
@@ -2131,7 +2153,7 @@ gem 'other', version
|
|
2131
2153
|
assert_directory_exists util_inst_bindir
|
2132
2154
|
|
2133
2155
|
installed_exec = File.join util_inst_bindir, 'executable'
|
2134
|
-
|
2156
|
+
assert_path_exist installed_exec
|
2135
2157
|
|
2136
2158
|
wrapper = File.read installed_exec
|
2137
2159
|
|
@@ -2157,7 +2179,7 @@ gem 'other', version
|
|
2157
2179
|
assert_directory_exists util_inst_bindir
|
2158
2180
|
|
2159
2181
|
installed_exec = File.join util_inst_bindir, 'executable'
|
2160
|
-
|
2182
|
+
assert_path_exist installed_exec
|
2161
2183
|
|
2162
2184
|
wrapper = File.read installed_exec
|
2163
2185
|
assert_match %r{generated by RubyGems}, wrapper
|
@@ -2183,7 +2205,7 @@ gem 'other', version
|
|
2183
2205
|
|
2184
2206
|
assert_directory_exists File.join(@spec.gem_dir, 'exe')
|
2185
2207
|
installed_exec = File.join @spec.gem_dir, 'exe', 'executable'
|
2186
|
-
|
2208
|
+
assert_path_exist installed_exec
|
2187
2209
|
|
2188
2210
|
assert_directory_exists File.join(Gem.default_dir, 'specifications')
|
2189
2211
|
assert_directory_exists File.join(Gem.default_dir, 'specifications', 'default')
|