rubygems-update 2.5.1 → 2.5.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rubygems-update might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.travis.yml +46 -0
- data/CONTRIBUTING.rdoc +98 -27
- data/History.txt +44 -1
- data/MAINTAINERS.md +4 -0
- data/Manifest.txt +4 -0
- data/POLICIES.rdoc +61 -0
- data/appveyor.yml +6 -1
- data/lib/gauntlet_rubygems.rb +1 -0
- data/lib/rubygems.rb +3 -2
- data/lib/rubygems/available_set.rb +1 -0
- data/lib/rubygems/basic_specification.rb +4 -4
- data/lib/rubygems/command.rb +7 -2
- data/lib/rubygems/command_manager.rb +1 -0
- data/lib/rubygems/commands/build_command.rb +5 -0
- data/lib/rubygems/commands/cert_command.rb +1 -0
- data/lib/rubygems/commands/check_command.rb +1 -0
- data/lib/rubygems/commands/cleanup_command.rb +1 -0
- data/lib/rubygems/commands/contents_command.rb +1 -0
- data/lib/rubygems/commands/dependency_command.rb +3 -2
- data/lib/rubygems/commands/environment_command.rb +3 -3
- data/lib/rubygems/commands/fetch_command.rb +1 -0
- data/lib/rubygems/commands/generate_index_command.rb +1 -0
- data/lib/rubygems/commands/help_command.rb +1 -0
- data/lib/rubygems/commands/install_command.rb +1 -0
- data/lib/rubygems/commands/list_command.rb +1 -0
- data/lib/rubygems/commands/lock_command.rb +1 -0
- data/lib/rubygems/commands/mirror_command.rb +1 -0
- data/lib/rubygems/commands/open_command.rb +1 -0
- data/lib/rubygems/commands/outdated_command.rb +1 -0
- data/lib/rubygems/commands/owner_command.rb +1 -0
- data/lib/rubygems/commands/pristine_command.rb +1 -0
- data/lib/rubygems/commands/push_command.rb +1 -0
- data/lib/rubygems/commands/query_command.rb +12 -5
- data/lib/rubygems/commands/rdoc_command.rb +1 -0
- data/lib/rubygems/commands/search_command.rb +1 -0
- data/lib/rubygems/commands/server_command.rb +1 -0
- data/lib/rubygems/commands/setup_command.rb +1 -0
- data/lib/rubygems/commands/sources_command.rb +1 -0
- data/lib/rubygems/commands/specification_command.rb +1 -0
- data/lib/rubygems/commands/stale_command.rb +1 -0
- data/lib/rubygems/commands/uninstall_command.rb +1 -0
- data/lib/rubygems/commands/unpack_command.rb +1 -0
- data/lib/rubygems/commands/update_command.rb +1 -0
- data/lib/rubygems/commands/which_command.rb +1 -0
- data/lib/rubygems/commands/yank_command.rb +11 -15
- data/lib/rubygems/compatibility.rb +1 -0
- data/lib/rubygems/config_file.rb +6 -4
- data/lib/rubygems/core_ext/kernel_gem.rb +1 -0
- data/lib/rubygems/core_ext/kernel_require.rb +1 -0
- data/lib/rubygems/defaults.rb +1 -0
- data/lib/rubygems/dependency.rb +3 -2
- data/lib/rubygems/dependency_installer.rb +1 -0
- data/lib/rubygems/dependency_list.rb +1 -0
- data/lib/rubygems/deprecate.rb +1 -0
- data/lib/rubygems/doctor.rb +1 -0
- data/lib/rubygems/errors.rb +1 -0
- data/lib/rubygems/exceptions.rb +2 -2
- data/lib/rubygems/ext.rb +1 -0
- data/lib/rubygems/ext/build_error.rb +1 -0
- data/lib/rubygems/ext/builder.rb +1 -0
- data/lib/rubygems/ext/cmake_builder.rb +1 -0
- data/lib/rubygems/ext/configure_builder.rb +1 -0
- data/lib/rubygems/ext/ext_conf_builder.rb +15 -4
- data/lib/rubygems/ext/rake_builder.rb +1 -0
- data/lib/rubygems/gem_runner.rb +1 -0
- data/lib/rubygems/gemcutter_utilities.rb +9 -3
- data/lib/rubygems/indexer.rb +1 -0
- data/lib/rubygems/install_default_message.rb +1 -0
- data/lib/rubygems/install_message.rb +1 -0
- data/lib/rubygems/install_update_options.rb +6 -0
- data/lib/rubygems/installer.rb +12 -5
- data/lib/rubygems/installer_test_case.rb +1 -0
- data/lib/rubygems/local_remote_options.rb +2 -1
- data/lib/rubygems/mock_gem_ui.rb +1 -0
- data/lib/rubygems/name_tuple.rb +2 -1
- data/lib/rubygems/package.rb +3 -2
- data/lib/rubygems/package/digest_io.rb +1 -0
- data/lib/rubygems/package/file_source.rb +1 -0
- data/lib/rubygems/package/io_source.rb +1 -0
- data/lib/rubygems/package/old.rb +4 -4
- data/lib/rubygems/package/source.rb +1 -0
- data/lib/rubygems/package/tar_header.rb +1 -0
- data/lib/rubygems/package/tar_reader.rb +1 -0
- data/lib/rubygems/package/tar_reader/entry.rb +1 -0
- data/lib/rubygems/package/tar_test_case.rb +1 -0
- data/lib/rubygems/package/tar_writer.rb +1 -0
- data/lib/rubygems/package_task.rb +1 -0
- data/lib/rubygems/path_support.rb +15 -5
- data/lib/rubygems/platform.rb +1 -0
- data/lib/rubygems/psych_additions.rb +1 -0
- data/lib/rubygems/psych_tree.rb +1 -0
- data/lib/rubygems/rdoc.rb +1 -0
- data/lib/rubygems/remote_fetcher.rb +1 -0
- data/lib/rubygems/request.rb +3 -2
- data/lib/rubygems/request/connection_pools.rb +1 -0
- data/lib/rubygems/request/http_pool.rb +1 -0
- data/lib/rubygems/request/https_pool.rb +1 -0
- data/lib/rubygems/request_set.rb +14 -8
- data/lib/rubygems/request_set/gem_dependency_api.rb +54 -6
- data/lib/rubygems/request_set/lockfile.rb +3 -3
- data/lib/rubygems/request_set/lockfile/parser.rb +18 -9
- data/lib/rubygems/request_set/lockfile/tokenizer.rb +1 -0
- data/lib/rubygems/requirement.rb +1 -0
- data/lib/rubygems/resolver.rb +2 -0
- data/lib/rubygems/resolver/activation_request.rb +18 -5
- data/lib/rubygems/resolver/api_set.rb +1 -0
- data/lib/rubygems/resolver/api_specification.rb +1 -0
- data/lib/rubygems/resolver/best_set.rb +1 -0
- data/lib/rubygems/resolver/composed_set.rb +1 -0
- data/lib/rubygems/resolver/conflict.rb +1 -0
- data/lib/rubygems/resolver/current_set.rb +1 -0
- data/lib/rubygems/resolver/dependency_request.rb +1 -0
- data/lib/rubygems/resolver/git_set.rb +1 -0
- data/lib/rubygems/resolver/git_specification.rb +1 -0
- data/lib/rubygems/resolver/index_set.rb +1 -0
- data/lib/rubygems/resolver/index_specification.rb +1 -0
- data/lib/rubygems/resolver/installed_specification.rb +1 -0
- data/lib/rubygems/resolver/installer_set.rb +1 -0
- data/lib/rubygems/resolver/local_specification.rb +1 -0
- data/lib/rubygems/resolver/lock_set.rb +4 -5
- data/lib/rubygems/resolver/lock_specification.rb +6 -2
- data/lib/rubygems/resolver/molinillo.rb +1 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo.rb +5 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb +10 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/errors.rb +6 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/gem_metadata.rb +3 -1
- data/lib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb +1 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/modules/ui.rb +1 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb +2 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/resolver.rb +3 -1
- data/lib/rubygems/resolver/molinillo/lib/molinillo/state.rb +8 -7
- data/lib/rubygems/resolver/requirement_list.rb +1 -0
- data/lib/rubygems/resolver/set.rb +1 -0
- data/lib/rubygems/resolver/source_set.rb +48 -0
- data/lib/rubygems/resolver/spec_specification.rb +1 -0
- data/lib/rubygems/resolver/specification.rb +1 -0
- data/lib/rubygems/resolver/stats.rb +1 -0
- data/lib/rubygems/resolver/vendor_set.rb +1 -0
- data/lib/rubygems/resolver/vendor_specification.rb +1 -0
- data/lib/rubygems/security.rb +3 -2
- data/lib/rubygems/security/policies.rb +1 -0
- data/lib/rubygems/security/policy.rb +2 -2
- data/lib/rubygems/security/signer.rb +1 -0
- data/lib/rubygems/security/trust_dir.rb +1 -0
- data/lib/rubygems/server.rb +1 -0
- data/lib/rubygems/source.rb +1 -0
- data/lib/rubygems/source/git.rb +1 -0
- data/lib/rubygems/source/installed.rb +1 -0
- data/lib/rubygems/source/local.rb +1 -0
- data/lib/rubygems/source/lock.rb +1 -0
- data/lib/rubygems/source/specific_file.rb +1 -0
- data/lib/rubygems/source/vendor.rb +1 -0
- data/lib/rubygems/source_list.rb +2 -1
- data/lib/rubygems/source_local.rb +1 -0
- data/lib/rubygems/source_specific_file.rb +1 -0
- data/lib/rubygems/spec_fetcher.rb +1 -0
- data/lib/rubygems/specification.rb +11 -6
- data/lib/rubygems/stub_specification.rb +1 -0
- data/lib/rubygems/syck_hack.rb +1 -0
- data/lib/rubygems/test_case.rb +15 -3
- data/lib/rubygems/test_utilities.rb +1 -0
- data/lib/rubygems/text.rb +1 -1
- data/lib/rubygems/uninstaller.rb +1 -0
- data/lib/rubygems/uri_formatter.rb +1 -0
- data/lib/rubygems/user_interaction.rb +1 -0
- data/lib/rubygems/util.rb +2 -1
- data/lib/rubygems/util/licenses.rb +14 -0
- data/lib/rubygems/util/list.rb +1 -0
- data/lib/rubygems/validator.rb +1 -0
- data/lib/rubygems/version.rb +5 -1
- data/lib/rubygems/version_option.rb +1 -0
- data/lib/ubygems.rb +1 -0
- data/setup.rb +1 -0
- data/test/rubygems/bad_rake.rb +1 -0
- data/test/rubygems/bogussources.rb +1 -0
- data/test/rubygems/fake_certlib/openssl.rb +1 -0
- data/test/rubygems/fix_openssl_warnings.rb +1 -0
- data/test/rubygems/foo/discover.rb +1 -0
- data/test/rubygems/good_rake.rb +1 -0
- data/test/rubygems/plugin/exception/rubygems_plugin.rb +1 -0
- data/test/rubygems/plugin/load/rubygems_plugin.rb +1 -0
- data/test/rubygems/plugin/standarderror/rubygems_plugin.rb +1 -0
- data/test/rubygems/rubygems/commands/crash_command.rb +1 -0
- data/test/rubygems/rubygems_plugin.rb +1 -0
- data/test/rubygems/sff/discover.rb +1 -0
- data/test/rubygems/simple_gem.rb +1 -0
- data/test/rubygems/test_bundled_ca.rb +39 -40
- data/test/rubygems/test_config.rb +1 -0
- data/test/rubygems/test_deprecate.rb +1 -0
- data/test/rubygems/test_gem.rb +1 -1
- data/test/rubygems/test_gem_available_set.rb +1 -0
- data/test/rubygems/test_gem_command.rb +1 -0
- data/test/rubygems/test_gem_command_manager.rb +1 -0
- data/test/rubygems/test_gem_commands_build_command.rb +11 -0
- data/test/rubygems/test_gem_commands_cert_command.rb +1 -0
- data/test/rubygems/test_gem_commands_check_command.rb +1 -0
- data/test/rubygems/test_gem_commands_cleanup_command.rb +1 -0
- data/test/rubygems/test_gem_commands_contents_command.rb +1 -0
- data/test/rubygems/test_gem_commands_dependency_command.rb +1 -0
- data/test/rubygems/test_gem_commands_environment_command.rb +1 -0
- data/test/rubygems/test_gem_commands_fetch_command.rb +1 -0
- data/test/rubygems/test_gem_commands_generate_index_command.rb +1 -0
- data/test/rubygems/test_gem_commands_help_command.rb +1 -0
- data/test/rubygems/test_gem_commands_install_command.rb +1 -0
- data/test/rubygems/test_gem_commands_list_command.rb +1 -0
- data/test/rubygems/test_gem_commands_lock_command.rb +1 -0
- data/test/rubygems/test_gem_commands_mirror.rb +1 -0
- data/test/rubygems/test_gem_commands_open_command.rb +1 -0
- data/test/rubygems/test_gem_commands_outdated_command.rb +1 -0
- data/test/rubygems/test_gem_commands_owner_command.rb +1 -0
- data/test/rubygems/test_gem_commands_pristine_command.rb +1 -0
- data/test/rubygems/test_gem_commands_push_command.rb +28 -0
- data/test/rubygems/test_gem_commands_query_command.rb +24 -0
- data/test/rubygems/test_gem_commands_search_command.rb +1 -0
- data/test/rubygems/test_gem_commands_server_command.rb +1 -0
- data/test/rubygems/test_gem_commands_setup_command.rb +1 -1
- data/test/rubygems/test_gem_commands_sources_command.rb +1 -0
- data/test/rubygems/test_gem_commands_specification_command.rb +1 -0
- data/test/rubygems/test_gem_commands_stale_command.rb +1 -0
- data/test/rubygems/test_gem_commands_uninstall_command.rb +1 -0
- data/test/rubygems/test_gem_commands_unpack_command.rb +1 -0
- data/test/rubygems/test_gem_commands_update_command.rb +1 -0
- data/test/rubygems/test_gem_commands_which_command.rb +1 -0
- data/test/rubygems/test_gem_commands_yank_command.rb +13 -10
- data/test/rubygems/test_gem_config_file.rb +24 -0
- data/test/rubygems/test_gem_dependency.rb +1 -0
- data/test/rubygems/test_gem_dependency_installer.rb +1 -0
- data/test/rubygems/test_gem_dependency_list.rb +1 -0
- data/test/rubygems/test_gem_dependency_resolution_error.rb +1 -0
- data/test/rubygems/test_gem_doctor.rb +1 -0
- data/test/rubygems/test_gem_ext_builder.rb +6 -1
- data/test/rubygems/test_gem_ext_cmake_builder.rb +1 -0
- data/test/rubygems/test_gem_ext_configure_builder.rb +1 -0
- data/test/rubygems/test_gem_ext_ext_conf_builder.rb +1 -0
- data/test/rubygems/test_gem_ext_rake_builder.rb +1 -0
- data/test/rubygems/test_gem_gem_runner.rb +1 -0
- data/test/rubygems/test_gem_gemcutter_utilities.rb +1 -0
- data/test/rubygems/test_gem_impossible_dependencies_error.rb +1 -0
- data/test/rubygems/test_gem_indexer.rb +1 -0
- data/test/rubygems/test_gem_install_update_options.rb +13 -0
- data/test/rubygems/test_gem_installer.rb +17 -4
- data/test/rubygems/test_gem_local_remote_options.rb +1 -0
- data/test/rubygems/test_gem_name_tuple.rb +1 -0
- data/test/rubygems/test_gem_package.rb +16 -9
- data/test/rubygems/test_gem_package_old.rb +1 -0
- data/test/rubygems/test_gem_package_tar_header.rb +1 -0
- data/test/rubygems/test_gem_package_tar_reader.rb +1 -0
- data/test/rubygems/test_gem_package_tar_reader_entry.rb +2 -1
- data/test/rubygems/test_gem_package_tar_writer.rb +1 -0
- data/test/rubygems/test_gem_package_task.rb +1 -0
- data/test/rubygems/test_gem_path_support.rb +1 -0
- data/test/rubygems/test_gem_platform.rb +1 -0
- data/test/rubygems/test_gem_rdoc.rb +1 -0
- data/test/rubygems/test_gem_remote_fetcher.rb +1 -0
- data/test/rubygems/test_gem_request.rb +1 -0
- data/test/rubygems/test_gem_request_connection_pools.rb +1 -0
- data/test/rubygems/test_gem_request_set.rb +3 -2
- data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +34 -45
- data/test/rubygems/test_gem_request_set_lockfile.rb +1 -0
- data/test/rubygems/test_gem_request_set_lockfile_parser.rb +9 -3
- data/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb +1 -0
- data/test/rubygems/test_gem_requirement.rb +1 -0
- data/test/rubygems/test_gem_resolver.rb +1 -0
- data/test/rubygems/test_gem_resolver_activation_request.rb +1 -0
- data/test/rubygems/test_gem_resolver_api_set.rb +1 -0
- data/test/rubygems/test_gem_resolver_api_specification.rb +1 -0
- data/test/rubygems/test_gem_resolver_best_set.rb +1 -0
- data/test/rubygems/test_gem_resolver_composed_set.rb +1 -0
- data/test/rubygems/test_gem_resolver_conflict.rb +1 -0
- data/test/rubygems/test_gem_resolver_dependency_request.rb +1 -0
- data/test/rubygems/test_gem_resolver_git_set.rb +1 -0
- data/test/rubygems/test_gem_resolver_git_specification.rb +1 -0
- data/test/rubygems/test_gem_resolver_index_set.rb +1 -0
- data/test/rubygems/test_gem_resolver_index_specification.rb +1 -0
- data/test/rubygems/test_gem_resolver_installed_specification.rb +1 -0
- data/test/rubygems/test_gem_resolver_installer_set.rb +1 -0
- data/test/rubygems/test_gem_resolver_local_specification.rb +1 -0
- data/test/rubygems/test_gem_resolver_lock_set.rb +1 -0
- data/test/rubygems/test_gem_resolver_lock_specification.rb +7 -6
- data/test/rubygems/test_gem_resolver_requirement_list.rb +1 -0
- data/test/rubygems/test_gem_resolver_specification.rb +1 -0
- data/test/rubygems/test_gem_resolver_vendor_set.rb +1 -0
- data/test/rubygems/test_gem_resolver_vendor_specification.rb +1 -0
- data/test/rubygems/test_gem_security.rb +1 -0
- data/test/rubygems/test_gem_security_policy.rb +1 -0
- data/test/rubygems/test_gem_security_signer.rb +1 -0
- data/test/rubygems/test_gem_security_trust_dir.rb +1 -0
- data/test/rubygems/test_gem_server.rb +1 -0
- data/test/rubygems/test_gem_silent_ui.rb +1 -0
- data/test/rubygems/test_gem_source.rb +1 -0
- data/test/rubygems/test_gem_source_fetch_problem.rb +1 -0
- data/test/rubygems/test_gem_source_git.rb +1 -0
- data/test/rubygems/test_gem_source_installed.rb +1 -0
- data/test/rubygems/test_gem_source_list.rb +1 -0
- data/test/rubygems/test_gem_source_local.rb +1 -0
- data/test/rubygems/test_gem_source_lock.rb +1 -0
- data/test/rubygems/test_gem_source_specific_file.rb +1 -0
- data/test/rubygems/test_gem_source_vendor.rb +1 -0
- data/test/rubygems/test_gem_spec_fetcher.rb +1 -0
- data/test/rubygems/test_gem_specification.rb +80 -64
- data/test/rubygems/test_gem_stream_ui.rb +1 -0
- data/test/rubygems/test_gem_stub_specification.rb +1 -0
- data/test/rubygems/test_gem_text.rb +1 -0
- data/test/rubygems/test_gem_uninstaller.rb +1 -0
- data/test/rubygems/test_gem_unsatisfiable_dependency_error.rb +1 -0
- data/test/rubygems/test_gem_uri_formatter.rb +1 -0
- data/test/rubygems/test_gem_util.rb +1 -0
- data/test/rubygems/test_gem_validator.rb +1 -0
- data/test/rubygems/test_gem_version.rb +1 -0
- data/test/rubygems/test_gem_version_option.rb +1 -0
- data/test/rubygems/test_kernel.rb +1 -0
- data/test/rubygems/test_require.rb +2 -1
- data/util/create_certs.rb +1 -0
- data/util/create_encrypted_key.rb +1 -0
- data/util/generate_spdx_license_list.rb +15 -0
- data/util/update_bundled_ca_certificates.rb +1 -1
- metadata +12 -28
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.gemtest +0 -0
- metadata.gz.sig +0 -2
@@ -1,4 +1,5 @@
|
|
1
1
|
# coding: UTF-8
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
4
|
require 'rubygems/package/tar_test_case'
|
4
5
|
require 'rubygems/simple_gem'
|
@@ -427,19 +428,25 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
427
428
|
"#{@destination} is not allowed", e.message)
|
428
429
|
end
|
429
430
|
|
430
|
-
def
|
431
|
+
def test_extract_tar_gz_symlink_relative_path
|
432
|
+
skip 'symlink not supported' if Gem.win_platform?
|
433
|
+
|
431
434
|
package = Gem::Package.new @gem
|
432
435
|
|
433
436
|
tgz_io = util_tar_gz do |tar|
|
434
|
-
tar.
|
437
|
+
tar.add_file 'relative.rb', 0644 do |io| io.write 'hi' end
|
438
|
+
tar.mkdir 'lib', 0755
|
439
|
+
tar.add_symlink 'lib/foo.rb', '../relative.rb', 0644
|
435
440
|
end
|
436
441
|
|
437
|
-
|
438
|
-
package.extract_tar_gz tgz_io, @destination
|
439
|
-
end
|
442
|
+
package.extract_tar_gz tgz_io, @destination
|
440
443
|
|
441
|
-
|
442
|
-
|
444
|
+
extracted = File.join @destination, 'lib/foo.rb'
|
445
|
+
assert_path_exists extracted
|
446
|
+
assert_equal '../relative.rb',
|
447
|
+
File.readlink(extracted)
|
448
|
+
assert_equal 'hi',
|
449
|
+
File.read(extracted)
|
443
450
|
end
|
444
451
|
|
445
452
|
def test_extract_tar_gz_directory
|
@@ -489,7 +496,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
489
496
|
def test_install_location
|
490
497
|
package = Gem::Package.new @gem
|
491
498
|
|
492
|
-
file = 'file.rb'
|
499
|
+
file = 'file.rb'.dup
|
493
500
|
file.taint
|
494
501
|
|
495
502
|
destination = package.install_location file, @destination
|
@@ -529,7 +536,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
529
536
|
skip 'no File.realpath on 1.8' if RUBY_VERSION < '1.9'
|
530
537
|
package = Gem::Package.new @gem
|
531
538
|
|
532
|
-
file = 'foo//file.rb'
|
539
|
+
file = 'foo//file.rb'.dup
|
533
540
|
file.taint
|
534
541
|
|
535
542
|
destination = @destination.sub '/', '//'
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require 'rubygems/package/tar_test_case'
|
2
3
|
require 'rubygems/package'
|
3
4
|
|
@@ -8,7 +9,7 @@ class TestGemPackageTarReaderEntry < Gem::Package::TarTestCase
|
|
8
9
|
|
9
10
|
@contents = ('a'..'z').to_a.join * 100
|
10
11
|
|
11
|
-
@tar =
|
12
|
+
@tar = String.new
|
12
13
|
@tar << tar_file_header("lib/foo", "", 0, @contents.size, Time.now)
|
13
14
|
@tar << @contents
|
14
15
|
@tar << "\0" * (512 - (@tar.size % 512))
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require 'rubygems/test_case'
|
2
3
|
require 'rubygems/request_set'
|
3
4
|
|
@@ -354,7 +355,7 @@ ruby "0"
|
|
354
355
|
|
355
356
|
assert_equal %w[a-1], names
|
356
357
|
|
357
|
-
assert_equal [@DR::BestSet, @DR::GitSet, @DR::VendorSet],
|
358
|
+
assert_equal [@DR::BestSet, @DR::GitSet, @DR::VendorSet, @DR::SourceSet],
|
358
359
|
rs.sets.map { |set| set.class }
|
359
360
|
end
|
360
361
|
|
@@ -418,7 +419,7 @@ ruby "0"
|
|
418
419
|
|
419
420
|
assert_equal ["a-1", "b-2"], names
|
420
421
|
|
421
|
-
assert_equal [@DR::BestSet, @DR::GitSet, @DR::VendorSet],
|
422
|
+
assert_equal [@DR::BestSet, @DR::GitSet, @DR::VendorSet, @DR::SourceSet],
|
422
423
|
rs.sets.map { |set| set.class }
|
423
424
|
end
|
424
425
|
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require 'rubygems/test_case'
|
2
3
|
require 'rubygems/request_set'
|
3
4
|
|
@@ -51,22 +52,14 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
|
51
52
|
end
|
52
53
|
|
53
54
|
def test_gempspec_with_multiple_runtime_deps
|
54
|
-
|
55
|
-
|
56
|
-
def find_gemspec name, path
|
57
|
-
Gem::Specification.new do |s|
|
58
|
-
s.name = 'foo'
|
59
|
-
s.version = '1.0'
|
60
|
-
s.add_runtime_dependency 'bar', '>= 1.6.0', '< 1.6.4'
|
61
|
-
end
|
62
|
-
end
|
55
|
+
save_gemspec 'foo', '1.0' do |s|
|
56
|
+
s.add_runtime_dependency 'bar', '>= 1.6.0', '< 1.6.4'
|
63
57
|
end
|
64
|
-
|
65
|
-
instance.gemspec
|
58
|
+
@gda.gemspec
|
66
59
|
assert_equal %w{ foo bar }.sort, @set.dependencies.map(&:name).sort
|
67
60
|
bar = @set.dependencies.find { |d| d.name == 'bar' }
|
68
|
-
assert_equal [["
|
69
|
-
["
|
61
|
+
assert_equal [["<", Gem::Version.create('1.6.4')],
|
62
|
+
[">=", Gem::Version.create('1.6.0')]], bar.requirement.requirements.sort
|
70
63
|
end
|
71
64
|
|
72
65
|
def test_gemspec_without_group
|
@@ -144,7 +137,11 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
|
144
137
|
end
|
145
138
|
|
146
139
|
def test_gem_git_branch
|
147
|
-
|
140
|
+
_, err = capture_io do
|
141
|
+
@gda.gem 'a', :git => 'git/a', :branch => 'other', :tag => 'v1'
|
142
|
+
end
|
143
|
+
expected = "Gem dependencies file gem.deps.rb includes git reference for both ref/branch and tag but only ref/branch is used."
|
144
|
+
assert_match expected, err
|
148
145
|
|
149
146
|
assert_equal [dep('a')], @set.dependencies
|
150
147
|
|
@@ -161,7 +158,11 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
|
161
158
|
end
|
162
159
|
|
163
160
|
def test_gem_git_ref
|
164
|
-
|
161
|
+
_, err = capture_io do
|
162
|
+
@gda.gem 'a', :git => 'git/a', :ref => 'abcd123', :branch => 'other'
|
163
|
+
end
|
164
|
+
expected = "Gem dependencies file gem.deps.rb includes git reference for both ref and branch but only ref is used."
|
165
|
+
assert_match expected, err
|
165
166
|
|
166
167
|
assert_equal [dep('a')], @set.dependencies
|
167
168
|
|
@@ -470,11 +471,9 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
|
470
471
|
end
|
471
472
|
|
472
473
|
def test_gemspec
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
open 'a.gemspec', 'w' do |io|
|
477
|
-
io.write spec.to_ruby_for_cache
|
474
|
+
save_gemspec 'a', 1 do |s|
|
475
|
+
s.add_dependency 'b', 2
|
476
|
+
s.add_development_dependency 'c', 3
|
478
477
|
end
|
479
478
|
|
480
479
|
@gda.gemspec
|
@@ -506,11 +505,9 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
|
506
505
|
end
|
507
506
|
|
508
507
|
def test_gemspec_development_group
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
open 'a.gemspec', 'w' do |io|
|
513
|
-
io.write spec.to_ruby_for_cache
|
508
|
+
save_gemspec 'a', 1 do |s|
|
509
|
+
s.add_dependency 'b', 2
|
510
|
+
s.add_development_dependency 'c', 3
|
514
511
|
end
|
515
512
|
|
516
513
|
@gda.without_groups << :other
|
@@ -523,14 +520,12 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
|
523
520
|
end
|
524
521
|
|
525
522
|
def test_gemspec_multiple
|
526
|
-
|
527
|
-
|
528
|
-
io.write spec.to_ruby_for_cache
|
523
|
+
save_gemspec 'a', 1 do |s|
|
524
|
+
s.add_dependency 'b', 2
|
529
525
|
end
|
530
526
|
|
531
|
-
|
532
|
-
|
533
|
-
io.write spec.to_ruby_for_cache
|
527
|
+
save_gemspec 'b', 2 do |s|
|
528
|
+
s.add_dependency 'c', 3
|
534
529
|
end
|
535
530
|
|
536
531
|
e = assert_raises ArgumentError do
|
@@ -541,14 +536,12 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
|
541
536
|
end
|
542
537
|
|
543
538
|
def test_gemspec_name
|
544
|
-
|
545
|
-
|
546
|
-
io.write spec.to_ruby_for_cache
|
539
|
+
save_gemspec 'a', 1 do |s|
|
540
|
+
s.add_dependency 'b', 2
|
547
541
|
end
|
548
542
|
|
549
|
-
|
550
|
-
|
551
|
-
io.write spec.to_ruby_for_cache
|
543
|
+
save_gemspec 'b', 2 do |s|
|
544
|
+
s.add_dependency 'c', 3
|
552
545
|
end
|
553
546
|
|
554
547
|
@gda.gemspec :name => 'b'
|
@@ -557,10 +550,8 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
|
557
550
|
end
|
558
551
|
|
559
552
|
def test_gemspec_named
|
560
|
-
|
561
|
-
|
562
|
-
open 'other.gemspec', 'w' do |io|
|
563
|
-
io.write spec.to_ruby_for_cache
|
553
|
+
save_gemspec 'a', 1 do |s|
|
554
|
+
s.add_dependency 'b', 2
|
564
555
|
end
|
565
556
|
|
566
557
|
@gda.gemspec
|
@@ -577,12 +568,10 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
|
577
568
|
end
|
578
569
|
|
579
570
|
def test_gemspec_path
|
580
|
-
spec = util_spec 'a', 1, 'b' => 2
|
581
|
-
|
582
571
|
FileUtils.mkdir 'other'
|
583
572
|
|
584
|
-
|
585
|
-
|
573
|
+
save_gemspec 'a', 1, 'other' do |s|
|
574
|
+
s.add_dependency 'b', 2
|
586
575
|
end
|
587
576
|
|
588
577
|
@gda.gemspec :path => 'other'
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require 'rubygems/test_case'
|
2
3
|
require 'rubygems/request_set'
|
3
4
|
require 'rubygems/request_set/lockfile'
|
@@ -245,10 +246,15 @@ DEPENDENCIES
|
|
245
246
|
|
246
247
|
assert lockfile_set, 'found a LockSet'
|
247
248
|
|
248
|
-
assert_equal %w[a-2
|
249
|
+
assert_equal %w[a-2], lockfile_set.specs.map { |s| s.full_name }
|
249
250
|
|
250
|
-
|
251
|
-
|
251
|
+
if [].respond_to? :flat_map
|
252
|
+
assert_equal %w[https://gems.example/ https://other.example/],
|
253
|
+
lockfile_set.specs.flat_map { |s| s.sources.map{ |src| src.uri.to_s } }
|
254
|
+
else # FIXME: remove when 1.8 is dropped
|
255
|
+
assert_equal %w[https://gems.example/ https://other.example/],
|
256
|
+
lockfile_set.specs.map { |s| s.sources.map{ |src| src.uri.to_s } }.flatten(1)
|
257
|
+
end
|
252
258
|
end
|
253
259
|
|
254
260
|
def test_parse_GIT
|