rubygems-update 3.3.18 → 3.3.22
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 +65 -0
- data/Manifest.txt +11 -0
- data/bin/gem +2 -2
- data/bin/update_rubygems +4 -4
- data/bundler/CHANGELOG.md +100 -0
- data/bundler/UPGRADING.md +11 -4
- data/bundler/bundler.gemspec +6 -8
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli/common.rb +1 -0
- data/bundler/lib/bundler/cli/install.rb +5 -2
- data/bundler/lib/bundler/cli/outdated.rb +12 -3
- data/bundler/lib/bundler/cli/platform.rb +1 -1
- data/bundler/lib/bundler/cli.rb +7 -4
- data/bundler/lib/bundler/current_ruby.rb +14 -5
- data/bundler/lib/bundler/definition.rb +102 -31
- data/bundler/lib/bundler/dependency.rb +18 -85
- data/bundler/lib/bundler/dsl.rb +2 -2
- data/bundler/lib/bundler/endpoint_specification.rb +2 -13
- data/bundler/lib/bundler/feature_flag.rb +0 -1
- data/bundler/lib/bundler/fetcher.rb +6 -6
- data/bundler/lib/bundler/gem_helpers.rb +7 -1
- data/bundler/lib/bundler/gem_version_promoter.rb +8 -18
- data/bundler/lib/bundler/index.rb +10 -12
- data/bundler/lib/bundler/injector.rb +2 -1
- data/bundler/lib/bundler/inline.rb +1 -1
- data/bundler/lib/bundler/installer/standalone.rb +1 -1
- data/bundler/lib/bundler/installer.rb +14 -12
- data/bundler/lib/bundler/lazy_specification.rb +30 -23
- data/bundler/lib/bundler/lockfile_generator.rb +1 -1
- data/bundler/lib/bundler/man/bundle-add.1 +6 -2
- data/bundler/lib/bundler/man/bundle-add.1.ronn +4 -1
- data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
- data/bundler/lib/bundler/man/bundle-cache.1 +7 -1
- data/bundler/lib/bundler/man/bundle-cache.1.ronn +7 -0
- 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 +25 -6
- data/bundler/lib/bundler/man/bundle-config.1.ronn +16 -6
- data/bundler/lib/bundler/man/bundle-console.1 +53 -0
- data/bundler/lib/bundler/man/bundle-console.1.ronn +44 -0
- data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
- data/bundler/lib/bundler/man/bundle-exec.1 +2 -2
- data/bundler/lib/bundler/man/bundle-exec.1.ronn +1 -1
- data/bundler/lib/bundler/man/bundle-gem.1 +1 -1
- data/bundler/lib/bundler/man/bundle-help.1 +13 -0
- data/bundler/lib/bundler/man/bundle-help.1.ronn +12 -0
- 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 +5 -2
- data/bundler/lib/bundler/man/bundle-inject.1.ronn +3 -1
- data/bundler/lib/bundler/man/bundle-install.1 +5 -1
- data/bundler/lib/bundler/man/bundle-install.1.ronn +6 -0
- 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 +16 -6
- data/bundler/lib/bundler/man/bundle-platform.1.ronn +14 -7
- data/bundler/lib/bundler/man/bundle-plugin.1 +81 -0
- data/bundler/lib/bundler/man/bundle-plugin.1.ronn +59 -0
- 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-version.1 +35 -0
- data/bundler/lib/bundler/man/bundle-version.1.ronn +24 -0
- data/bundler/lib/bundler/man/bundle-viz.1 +4 -1
- data/bundler/lib/bundler/man/bundle-viz.1.ronn +2 -0
- data/bundler/lib/bundler/man/bundle.1 +15 -10
- data/bundler/lib/bundler/man/bundle.1.ronn +12 -7
- data/bundler/lib/bundler/man/gemfile.5 +23 -47
- data/bundler/lib/bundler/man/gemfile.5.ronn +32 -43
- data/bundler/lib/bundler/man/index.txt +4 -0
- data/bundler/lib/bundler/match_metadata.rb +13 -0
- data/bundler/lib/bundler/match_remote_metadata.rb +29 -0
- data/bundler/lib/bundler/plugin.rb +2 -0
- data/bundler/lib/bundler/remote_specification.rb +6 -11
- data/bundler/lib/bundler/resolver/base.rb +50 -0
- data/bundler/lib/bundler/resolver/spec_group.rb +11 -8
- data/bundler/lib/bundler/resolver.rb +95 -90
- data/bundler/lib/bundler/ruby_dsl.rb +1 -1
- data/bundler/lib/bundler/ruby_version.rb +5 -5
- data/bundler/lib/bundler/rubygems_ext.rb +52 -1
- data/bundler/lib/bundler/rubygems_gem_installer.rb +19 -12
- data/bundler/lib/bundler/settings.rb +1 -1
- data/bundler/lib/bundler/source/metadata.rb +1 -1
- data/bundler/lib/bundler/source_list.rb +4 -0
- data/bundler/lib/bundler/spec_set.rb +48 -33
- data/bundler/lib/bundler/version.rb +1 -1
- data/bundler/lib/bundler.rb +3 -3
- data/lib/rubygems/available_set.rb +3 -3
- data/lib/rubygems/basic_specification.rb +4 -4
- data/lib/rubygems/command.rb +25 -25
- data/lib/rubygems/command_manager.rb +9 -9
- data/lib/rubygems/commands/build_command.rb +8 -8
- data/lib/rubygems/commands/cert_command.rb +33 -33
- data/lib/rubygems/commands/check_command.rb +20 -20
- data/lib/rubygems/commands/cleanup_command.rb +17 -17
- data/lib/rubygems/commands/contents_command.rb +13 -13
- data/lib/rubygems/commands/dependency_command.rb +16 -16
- data/lib/rubygems/commands/environment_command.rb +5 -5
- data/lib/rubygems/commands/fetch_command.rb +8 -8
- data/lib/rubygems/commands/generate_index_command.rb +17 -17
- data/lib/rubygems/commands/help_command.rb +3 -3
- data/lib/rubygems/commands/info_command.rb +3 -3
- data/lib/rubygems/commands/install_command.rb +20 -20
- data/lib/rubygems/commands/list_command.rb +3 -3
- data/lib/rubygems/commands/lock_command.rb +4 -4
- data/lib/rubygems/commands/mirror_command.rb +3 -3
- data/lib/rubygems/commands/open_command.rb +9 -9
- data/lib/rubygems/commands/outdated_command.rb +5 -5
- data/lib/rubygems/commands/owner_command.rb +11 -11
- data/lib/rubygems/commands/pristine_command.rb +36 -36
- data/lib/rubygems/commands/push_command.rb +8 -8
- data/lib/rubygems/commands/query_command.rb +8 -8
- data/lib/rubygems/commands/rdoc_command.rb +17 -17
- data/lib/rubygems/commands/search_command.rb +3 -3
- data/lib/rubygems/commands/server_command.rb +3 -3
- data/lib/rubygems/commands/setup_command.rb +96 -106
- data/lib/rubygems/commands/signin_command.rb +9 -9
- data/lib/rubygems/commands/signout_command.rb +7 -7
- data/lib/rubygems/commands/sources_command.rb +21 -21
- data/lib/rubygems/commands/specification_command.rb +13 -13
- data/lib/rubygems/commands/stale_command.rb +2 -2
- data/lib/rubygems/commands/uninstall_command.rb +40 -40
- data/lib/rubygems/commands/unpack_command.rb +12 -12
- data/lib/rubygems/commands/update_command.rb +40 -56
- data/lib/rubygems/commands/which_command.rb +7 -7
- data/lib/rubygems/commands/yank_command.rb +11 -11
- data/lib/rubygems/config_file.rb +21 -21
- data/lib/rubygems/core_ext/kernel_gem.rb +1 -1
- data/lib/rubygems/core_ext/kernel_require.rb +1 -1
- data/lib/rubygems/core_ext/kernel_warn.rb +1 -1
- data/lib/rubygems/core_ext/tcpsocket_init.rb +1 -1
- data/lib/rubygems/defaults.rb +16 -16
- data/lib/rubygems/dependency.rb +9 -9
- data/lib/rubygems/dependency_installer.rb +13 -13
- data/lib/rubygems/dependency_list.rb +6 -6
- data/lib/rubygems/doctor.rb +18 -18
- data/lib/rubygems/errors.rb +2 -2
- data/lib/rubygems/exceptions.rb +5 -5
- data/lib/rubygems/ext/build_error.rb +1 -1
- data/lib/rubygems/ext/builder.rb +16 -16
- data/lib/rubygems/ext/cargo_builder.rb +7 -7
- data/lib/rubygems/ext/cmake_builder.rb +2 -2
- data/lib/rubygems/ext/configure_builder.rb +1 -1
- data/lib/rubygems/ext/ext_conf_builder.rb +8 -8
- data/lib/rubygems/ext/rake_builder.rb +3 -3
- data/lib/rubygems/ext.rb +7 -7
- data/lib/rubygems/gem_runner.rb +5 -5
- data/lib/rubygems/gemcutter_utilities.rb +31 -28
- data/lib/rubygems/indexer.rb +27 -27
- data/lib/rubygems/install_default_message.rb +2 -2
- data/lib/rubygems/install_message.rb +2 -2
- data/lib/rubygems/install_update_options.rb +55 -55
- data/lib/rubygems/installer.rb +32 -40
- data/lib/rubygems/installer_uninstaller_utils.rb +2 -2
- data/lib/rubygems/local_remote_options.rb +18 -20
- data/lib/rubygems/mock_gem_ui.rb +2 -2
- data/lib/rubygems/name_tuple.rb +4 -4
- data/lib/rubygems/optparse.rb +1 -1
- data/lib/rubygems/package/file_source.rb +2 -2
- data/lib/rubygems/package/old.rb +8 -8
- data/lib/rubygems/package/tar_header.rb +50 -50
- data/lib/rubygems/package/tar_reader/entry.rb +2 -2
- data/lib/rubygems/package/tar_reader.rb +1 -1
- data/lib/rubygems/package/tar_writer.rb +7 -7
- data/lib/rubygems/package.rb +54 -43
- data/lib/rubygems/package_task.rb +4 -4
- data/lib/rubygems/platform.rb +66 -55
- data/lib/rubygems/psych_tree.rb +1 -1
- data/lib/rubygems/query_utils.rb +35 -35
- data/lib/rubygems/rdoc.rb +2 -2
- data/lib/rubygems/remote_fetcher.rb +22 -22
- data/lib/rubygems/request/connection_pools.rb +4 -4
- data/lib/rubygems/request/http_pool.rb +1 -1
- data/lib/rubygems/request.rb +22 -22
- data/lib/rubygems/request_set/gem_dependency_api.rb +18 -18
- data/lib/rubygems/request_set/lockfile/parser.rb +26 -26
- data/lib/rubygems/request_set/lockfile/tokenizer.rb +4 -4
- data/lib/rubygems/request_set/lockfile.rb +5 -5
- data/lib/rubygems/request_set.rb +17 -17
- data/lib/rubygems/requirement.rb +6 -6
- data/lib/rubygems/resolver/activation_request.rb +3 -3
- data/lib/rubygems/resolver/api_set.rb +4 -4
- data/lib/rubygems/resolver/api_specification.rb +6 -6
- data/lib/rubygems/resolver/best_set.rb +5 -5
- data/lib/rubygems/resolver/conflict.rb +10 -10
- data/lib/rubygems/resolver/dependency_request.rb +2 -2
- data/lib/rubygems/resolver/git_set.rb +2 -2
- data/lib/rubygems/resolver/git_specification.rb +6 -6
- data/lib/rubygems/resolver/index_set.rb +3 -3
- data/lib/rubygems/resolver/index_specification.rb +6 -5
- data/lib/rubygems/resolver/installed_specification.rb +4 -4
- data/lib/rubygems/resolver/installer_set.rb +11 -16
- data/lib/rubygems/resolver/local_specification.rb +2 -2
- data/lib/rubygems/resolver/lock_set.rb +4 -4
- data/lib/rubygems/resolver/lock_specification.rb +4 -4
- data/lib/rubygems/resolver/molinillo.rb +1 -1
- data/lib/rubygems/resolver/specification.rb +1 -1
- data/lib/rubygems/resolver/vendor_set.rb +1 -1
- data/lib/rubygems/resolver/vendor_specification.rb +3 -3
- data/lib/rubygems/resolver.rb +39 -39
- data/lib/rubygems/s3_uri_signer.rb +6 -6
- data/lib/rubygems/safe_yaml.rb +2 -2
- data/lib/rubygems/security/policies.rb +11 -11
- data/lib/rubygems/security/policy.rb +18 -18
- data/lib/rubygems/security/signer.rb +5 -5
- data/lib/rubygems/security/trust_dir.rb +3 -3
- data/lib/rubygems/security.rb +28 -28
- data/lib/rubygems/security_option.rb +5 -5
- data/lib/rubygems/source/git.rb +21 -21
- data/lib/rubygems/source/installed.rb +1 -1
- data/lib/rubygems/source/local.rb +2 -2
- data/lib/rubygems/source/specific_file.rb +1 -1
- data/lib/rubygems/source.rb +16 -16
- data/lib/rubygems/spec_fetcher.rb +9 -9
- data/lib/rubygems/specification.rb +63 -62
- data/lib/rubygems/specification_policy.rb +15 -15
- data/lib/rubygems/stub_specification.rb +5 -5
- data/lib/rubygems/tsort.rb +1 -1
- data/lib/rubygems/uninstaller.rb +18 -18
- data/lib/rubygems/uri.rb +4 -4
- data/lib/rubygems/uri_formatter.rb +1 -1
- data/lib/rubygems/user_interaction.rb +33 -19
- data/lib/rubygems/util/licenses.rb +3 -3
- data/lib/rubygems/util.rb +10 -10
- data/lib/rubygems/validator.rb +5 -5
- data/lib/rubygems/version.rb +15 -9
- data/lib/rubygems/version_option.rb +3 -3
- data/lib/rubygems.rb +62 -61
- data/rubygems-update.gemspec +2 -2
- data/setup.rb +9 -9
- data/test/rubygems/helper.rb +132 -134
- data/test/rubygems/installer_test_case.rb +13 -13
- data/test/rubygems/package/tar_test_case.rb +2 -2
- data/test/rubygems/plugin/exception/rubygems_plugin.rb +1 -1
- data/test/rubygems/plugin/standarderror/rubygems_plugin.rb +1 -1
- data/test/rubygems/rubygems_plugin.rb +2 -2
- data/test/rubygems/specifications/rubyforge-0.0.1.gemspec +4 -4
- data/test/rubygems/test_bundled_ca.rb +10 -10
- data/test/rubygems/test_config.rb +3 -3
- data/test/rubygems/test_deprecate.rb +3 -3
- data/test/rubygems/test_exit.rb +2 -2
- data/test/rubygems/test_gem.rb +342 -342
- data/test/rubygems/test_gem_available_set.rb +21 -21
- data/test/rubygems/test_gem_bundler_version_finder.rb +1 -1
- data/test/rubygems/test_gem_command.rb +44 -44
- data/test/rubygems/test_gem_command_manager.rb +29 -29
- data/test/rubygems/test_gem_commands_build_command.rb +63 -63
- data/test/rubygems/test_gem_commands_cert_command.rb +97 -99
- data/test/rubygems/test_gem_commands_check_command.rb +4 -4
- data/test/rubygems/test_gem_commands_cleanup_command.rb +40 -40
- data/test/rubygems/test_gem_commands_contents_command.rb +27 -27
- data/test/rubygems/test_gem_commands_dependency_command.rb +36 -36
- data/test/rubygems/test_gem_commands_environment_command.rb +16 -16
- data/test/rubygems/test_gem_commands_fetch_command.rb +37 -37
- data/test/rubygems/test_gem_commands_generate_index_command.rb +7 -7
- data/test/rubygems/test_gem_commands_help_command.rb +13 -13
- data/test/rubygems/test_gem_commands_info_command.rb +28 -2
- data/test/rubygems/test_gem_commands_install_command.rb +131 -131
- data/test/rubygems/test_gem_commands_list_command.rb +4 -4
- data/test/rubygems/test_gem_commands_lock_command.rb +10 -10
- data/test/rubygems/test_gem_commands_mirror.rb +2 -2
- data/test/rubygems/test_gem_commands_open_command.rb +4 -4
- data/test/rubygems/test_gem_commands_outdated_command.rb +9 -9
- data/test/rubygems/test_gem_commands_owner_command.rb +41 -41
- data/test/rubygems/test_gem_commands_pristine_command.rb +92 -92
- data/test/rubygems/test_gem_commands_push_command.rb +54 -54
- data/test/rubygems/test_gem_commands_query_command.rb +73 -73
- data/test/rubygems/test_gem_commands_search_command.rb +2 -2
- data/test/rubygems/test_gem_commands_server_command.rb +2 -2
- data/test/rubygems/test_gem_commands_setup_command.rb +119 -85
- data/test/rubygems/test_gem_commands_signin_command.rb +45 -31
- data/test/rubygems/test_gem_commands_signout_command.rb +3 -3
- data/test/rubygems/test_gem_commands_sources_command.rb +28 -29
- data/test/rubygems/test_gem_commands_specification_command.rb +32 -32
- data/test/rubygems/test_gem_commands_stale_command.rb +4 -4
- data/test/rubygems/test_gem_commands_uninstall_command.rb +75 -75
- data/test/rubygems/test_gem_commands_unpack_command.rb +31 -31
- data/test/rubygems/test_gem_commands_update_command.rb +89 -89
- data/test/rubygems/test_gem_commands_which_command.rb +6 -6
- data/test/rubygems/test_gem_commands_yank_command.rb +40 -40
- data/test/rubygems/test_gem_config_file.rb +93 -81
- data/test/rubygems/test_gem_dependency.rb +73 -73
- data/test/rubygems/test_gem_dependency_installer.rb +165 -165
- data/test/rubygems/test_gem_dependency_list.rb +47 -47
- data/test/rubygems/test_gem_dependency_resolution_error.rb +4 -4
- data/test/rubygems/test_gem_doctor.rb +26 -26
- data/test/rubygems/test_gem_ext_builder.rb +59 -59
- data/test/rubygems/test_gem_ext_cargo_builder/custom_name/Cargo.lock +6 -6
- data/test/rubygems/test_gem_ext_cargo_builder/custom_name/Cargo.toml +1 -1
- data/test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb +8 -8
- data/test/rubygems/test_gem_ext_cargo_builder/custom_name/custom_name.gemspec +1 -1
- data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.lock +6 -6
- data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.toml +1 -1
- data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/build.rb +8 -8
- data/test/rubygems/test_gem_ext_cargo_builder.rb +26 -26
- data/test/rubygems/test_gem_ext_cargo_builder_link_flag_converter.rb +3 -3
- data/test/rubygems/test_gem_ext_cargo_builder_unit.rb +23 -23
- data/test/rubygems/test_gem_ext_cmake_builder.rb +15 -15
- data/test/rubygems/test_gem_ext_configure_builder.rb +13 -13
- data/test/rubygems/test_gem_ext_ext_conf_builder.rb +51 -52
- data/test/rubygems/test_gem_ext_rake_builder.rb +15 -15
- data/test/rubygems/test_gem_gem_runner.rb +7 -7
- data/test/rubygems/test_gem_gemcutter_utilities.rb +66 -66
- data/test/rubygems/test_gem_impossible_dependencies_error.rb +4 -4
- data/test/rubygems/test_gem_indexer.rb +48 -48
- data/test/rubygems/test_gem_install_update_options.rb +16 -16
- data/test/rubygems/test_gem_installer.rb +303 -300
- data/test/rubygems/test_gem_local_remote_options.rb +10 -10
- data/test/rubygems/test_gem_name_tuple.rb +4 -4
- data/test/rubygems/test_gem_package.rb +228 -206
- data/test/rubygems/test_gem_package_old.rb +13 -13
- data/test/rubygems/test_gem_package_tar_header.rb +42 -42
- data/test/rubygems/test_gem_package_tar_reader.rb +8 -8
- data/test/rubygems/test_gem_package_tar_reader_entry.rb +10 -10
- data/test/rubygems/test_gem_package_tar_writer.rb +76 -76
- data/test/rubygems/test_gem_package_task.rb +18 -18
- data/test/rubygems/test_gem_path_support.rb +14 -14
- data/test/rubygems/test_gem_platform.rb +298 -227
- data/test/rubygems/test_gem_rdoc.rb +14 -14
- data/test/rubygems/test_gem_remote_fetcher.rb +149 -149
- data/test/rubygems/test_gem_request.rb +55 -55
- data/test/rubygems/test_gem_request_connection_pools.rb +29 -29
- data/test/rubygems/test_gem_request_set.rb +99 -99
- data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +204 -206
- data/test/rubygems/test_gem_request_set_lockfile.rb +86 -86
- data/test/rubygems/test_gem_request_set_lockfile_parser.rb +56 -56
- data/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb +62 -62
- data/test/rubygems/test_gem_requirement.rb +47 -41
- data/test/rubygems/test_gem_resolver.rb +133 -99
- data/test/rubygems/test_gem_resolver_activation_request.rb +6 -6
- data/test/rubygems/test_gem_resolver_api_set.rb +33 -33
- data/test/rubygems/test_gem_resolver_api_specification.rb +47 -47
- data/test/rubygems/test_gem_resolver_best_set.rb +22 -22
- data/test/rubygems/test_gem_resolver_composed_set.rb +1 -1
- data/test/rubygems/test_gem_resolver_conflict.rb +12 -12
- data/test/rubygems/test_gem_resolver_dependency_request.rb +15 -15
- data/test/rubygems/test_gem_resolver_git_set.rb +21 -21
- data/test/rubygems/test_gem_resolver_git_specification.rb +21 -21
- data/test/rubygems/test_gem_resolver_index_set.rb +12 -12
- data/test/rubygems/test_gem_resolver_index_specification.rb +16 -16
- data/test/rubygems/test_gem_resolver_installed_specification.rb +5 -5
- data/test/rubygems/test_gem_resolver_installer_set.rb +78 -34
- data/test/rubygems/test_gem_resolver_local_specification.rb +7 -7
- data/test/rubygems/test_gem_resolver_lock_set.rb +12 -12
- data/test/rubygems/test_gem_resolver_lock_specification.rb +17 -17
- data/test/rubygems/test_gem_resolver_requirement_list.rb +1 -1
- data/test/rubygems/test_gem_resolver_specification.rb +8 -8
- data/test/rubygems/test_gem_resolver_vendor_set.rb +6 -6
- data/test/rubygems/test_gem_resolver_vendor_specification.rb +10 -10
- data/test/rubygems/test_gem_security.rb +67 -67
- data/test/rubygems/test_gem_security_policy.rb +62 -62
- data/test/rubygems/test_gem_security_signer.rb +28 -28
- data/test/rubygems/test_gem_security_trust_dir.rb +4 -4
- data/test/rubygems/test_gem_silent_ui.rb +38 -32
- data/test/rubygems/test_gem_source.rb +44 -44
- data/test/rubygems/test_gem_source_fetch_problem.rb +9 -9
- data/test/rubygems/test_gem_source_git.rb +59 -59
- data/test/rubygems/test_gem_source_installed.rb +16 -16
- data/test/rubygems/test_gem_source_list.rb +5 -5
- data/test/rubygems/test_gem_source_local.rb +14 -14
- data/test/rubygems/test_gem_source_lock.rb +31 -31
- data/test/rubygems/test_gem_source_specific_file.rb +17 -17
- data/test/rubygems/test_gem_source_subpath_problem.rb +7 -7
- data/test/rubygems/test_gem_source_vendor.rb +13 -13
- data/test/rubygems/test_gem_spec_fetcher.rb +72 -72
- data/test/rubygems/test_gem_specification.rb +444 -436
- data/test/rubygems/test_gem_stream_ui.rb +19 -19
- data/test/rubygems/test_gem_stub_specification.rb +32 -32
- data/test/rubygems/test_gem_text.rb +1 -1
- data/test/rubygems/test_gem_uninstaller.rb +112 -112
- data/test/rubygems/test_gem_unsatisfiable_dependency_error.rb +3 -3
- data/test/rubygems/test_gem_uri.rb +4 -4
- data/test/rubygems/test_gem_uri_formatter.rb +14 -14
- data/test/rubygems/test_gem_util.rb +23 -23
- data/test/rubygems/test_gem_validator.rb +8 -8
- data/test/rubygems/test_gem_version.rb +22 -15
- data/test/rubygems/test_gem_version_option.rb +15 -15
- data/test/rubygems/test_kernel.rb +31 -31
- data/test/rubygems/test_project_sanity.rb +1 -1
- data/test/rubygems/test_remote_fetch_error.rb +6 -6
- data/test/rubygems/test_require.rb +43 -43
- data/test/rubygems/test_rubygems.rb +8 -8
- data/test/rubygems/utilities.rb +19 -19
- metadata +14 -3
@@ -1,15 +1,15 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
require_relative
|
3
|
-
require
|
4
|
-
require
|
2
|
+
require_relative "helper"
|
3
|
+
require "rubygems/dependency_installer"
|
4
|
+
require "rubygems/security"
|
5
5
|
|
6
6
|
class TestGemDependencyInstaller < Gem::TestCase
|
7
7
|
def setup
|
8
8
|
super
|
9
9
|
common_installer_setup
|
10
10
|
|
11
|
-
@gems_dir = File.join @tempdir,
|
12
|
-
@cache_dir = File.join @gemhome,
|
11
|
+
@gems_dir = File.join @tempdir, "gems"
|
12
|
+
@cache_dir = File.join @gemhome, "cache"
|
13
13
|
|
14
14
|
FileUtils.mkdir @gems_dir
|
15
15
|
|
@@ -25,23 +25,23 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def util_setup_gems
|
28
|
-
@a1, @a1_gem = util_gem
|
29
|
-
s.executables <<
|
28
|
+
@a1, @a1_gem = util_gem "a", "1" do |s|
|
29
|
+
s.executables << "a_bin"
|
30
30
|
end
|
31
31
|
|
32
|
-
@a1_pre, @a1_pre_gem = util_gem
|
32
|
+
@a1_pre, @a1_pre_gem = util_gem "a", "1.a"
|
33
33
|
|
34
|
-
@b1, @b1_gem = util_gem
|
35
|
-
s.add_dependency
|
36
|
-
s.add_development_dependency
|
34
|
+
@b1, @b1_gem = util_gem "b", "1" do |s|
|
35
|
+
s.add_dependency "a"
|
36
|
+
s.add_development_dependency "aa"
|
37
37
|
end
|
38
38
|
|
39
|
-
@c1, @c1_gem = util_gem
|
40
|
-
s.add_development_dependency
|
39
|
+
@c1, @c1_gem = util_gem "c", "1" do |s|
|
40
|
+
s.add_development_dependency "b"
|
41
41
|
end
|
42
42
|
|
43
|
-
@d1, @d1_gem = util_gem
|
44
|
-
s.add_development_dependency
|
43
|
+
@d1, @d1_gem = util_gem "d", "1" do |s|
|
44
|
+
s.add_development_dependency "c"
|
45
45
|
end
|
46
46
|
|
47
47
|
util_setup_spec_fetcher(@a1, @a1_pre, @b1, @d1)
|
@@ -55,7 +55,7 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
55
55
|
|
56
56
|
Dir.chdir @tempdir do
|
57
57
|
inst = Gem::DependencyInstaller.new
|
58
|
-
inst.install
|
58
|
+
inst.install "a"
|
59
59
|
end
|
60
60
|
|
61
61
|
assert_equal %w[a-1], Gem::Specification.map(&:full_name)
|
@@ -65,13 +65,13 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
65
65
|
def test_install_prerelease
|
66
66
|
util_setup_gems
|
67
67
|
|
68
|
-
p1a, gem = util_gem
|
68
|
+
p1a, gem = util_gem "a", "10.a"
|
69
69
|
|
70
70
|
util_setup_spec_fetcher(p1a, @a1, @a1_pre)
|
71
71
|
|
72
72
|
p1a_data = Gem.read_binary(gem)
|
73
73
|
|
74
|
-
@fetcher.data[
|
74
|
+
@fetcher.data["http://gems.example.com/gems/a-10.a.gem"] = p1a_data
|
75
75
|
|
76
76
|
dep = Gem::Dependency.new "a"
|
77
77
|
inst = Gem::DependencyInstaller.new :prerelease => true
|
@@ -83,18 +83,18 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
83
83
|
|
84
84
|
def test_install_prerelease_bug_990
|
85
85
|
spec_fetcher do |fetcher|
|
86
|
-
fetcher.gem
|
87
|
-
s.add_dependency
|
86
|
+
fetcher.gem "a", "1.b" do |s|
|
87
|
+
s.add_dependency "b", "~> 1.a"
|
88
88
|
end
|
89
89
|
|
90
|
-
fetcher.gem
|
91
|
-
s.add_dependency
|
90
|
+
fetcher.gem "b", "1.b" do |s|
|
91
|
+
s.add_dependency "c", ">= 1"
|
92
92
|
end
|
93
93
|
|
94
|
-
fetcher.gem
|
94
|
+
fetcher.gem "c", "1.1.b"
|
95
95
|
end
|
96
96
|
|
97
|
-
dep = Gem::Dependency.new
|
97
|
+
dep = Gem::Dependency.new "a"
|
98
98
|
|
99
99
|
inst = Gem::DependencyInstaller.new :prerelease => true
|
100
100
|
inst.install dep
|
@@ -103,13 +103,13 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
103
103
|
end
|
104
104
|
|
105
105
|
def test_install_when_only_prerelease
|
106
|
-
p1a, gem = util_gem
|
106
|
+
p1a, gem = util_gem "p", "1.a"
|
107
107
|
|
108
108
|
util_setup_spec_fetcher(p1a)
|
109
109
|
|
110
110
|
p1a_data = Gem.read_binary(gem)
|
111
111
|
|
112
|
-
@fetcher.data[
|
112
|
+
@fetcher.data["http://gems.example.com/gems/p-1.a.gem"] = p1a_data
|
113
113
|
|
114
114
|
dep = Gem::Dependency.new "p"
|
115
115
|
inst = Gem::DependencyInstaller.new
|
@@ -128,7 +128,7 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
128
128
|
|
129
129
|
p1a_data = Gem.read_binary(@a1_gem)
|
130
130
|
|
131
|
-
@fetcher.data[
|
131
|
+
@fetcher.data["http://gems.example.com/gems/a-1.gem"] = p1a_data
|
132
132
|
|
133
133
|
dep = Gem::Dependency.new "a"
|
134
134
|
inst = Gem::DependencyInstaller.new :prerelease => true
|
@@ -141,8 +141,8 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
141
141
|
def test_install_all_dependencies
|
142
142
|
util_setup_gems
|
143
143
|
|
144
|
-
_, e1_gem = util_gem
|
145
|
-
s.add_dependency
|
144
|
+
_, e1_gem = util_gem "e", "1" do |s|
|
145
|
+
s.add_dependency "b"
|
146
146
|
end
|
147
147
|
|
148
148
|
FileUtils.mv @a1_gem, @tempdir
|
@@ -153,15 +153,15 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
153
153
|
|
154
154
|
Dir.chdir @tempdir do
|
155
155
|
inst = Gem::DependencyInstaller.new :ignore_dependencies => true
|
156
|
-
inst.install
|
156
|
+
inst.install "b"
|
157
157
|
end
|
158
158
|
|
159
159
|
assert_equal %w[b-1], inst.installed_gems.map {|s| s.full_name },
|
160
|
-
|
160
|
+
"sanity check"
|
161
161
|
|
162
162
|
Dir.chdir @tempdir do
|
163
163
|
inst = Gem::DependencyInstaller.new
|
164
|
-
inst.install
|
164
|
+
inst.install "e"
|
165
165
|
end
|
166
166
|
|
167
167
|
assert_equal %w[a-1 e-1], inst.installed_gems.map {|s| s.full_name }
|
@@ -178,7 +178,7 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
178
178
|
|
179
179
|
Dir.chdir dir do
|
180
180
|
inst = Gem::DependencyInstaller.new :cache_dir => @tempdir
|
181
|
-
inst.install
|
181
|
+
inst.install "b"
|
182
182
|
end
|
183
183
|
|
184
184
|
assert_equal %w[a-1 b-1], inst.installed_gems.map {|s| s.full_name }
|
@@ -190,9 +190,9 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
190
190
|
def test_install_dependencies_satisfied
|
191
191
|
util_setup_gems
|
192
192
|
|
193
|
-
a2, a2_gem = util_gem
|
193
|
+
a2, a2_gem = util_gem "a", "2"
|
194
194
|
|
195
|
-
FileUtils.rm_rf File.join(@gemhome,
|
195
|
+
FileUtils.rm_rf File.join(@gemhome, "gems")
|
196
196
|
|
197
197
|
Gem::Specification.reset
|
198
198
|
|
@@ -203,17 +203,17 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
203
203
|
|
204
204
|
Dir.chdir @tempdir do
|
205
205
|
inst = Gem::DependencyInstaller.new
|
206
|
-
inst.install
|
206
|
+
inst.install "a", req("= 2")
|
207
207
|
end
|
208
208
|
|
209
209
|
assert_equal %w[a-2], inst.installed_gems.map {|s| s.full_name },
|
210
|
-
|
210
|
+
"sanity check"
|
211
211
|
|
212
212
|
FileUtils.rm File.join(@tempdir, a2.file_name)
|
213
213
|
|
214
214
|
Dir.chdir @tempdir do
|
215
215
|
inst = Gem::DependencyInstaller.new
|
216
|
-
inst.install
|
216
|
+
inst.install "b"
|
217
217
|
end
|
218
218
|
|
219
219
|
assert_equal %w[a-2 b-1], Gem::Specification.map(&:full_name)
|
@@ -226,12 +226,12 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
226
226
|
def test_install_doesnt_upgrade_installed_dependencies
|
227
227
|
util_setup_gems
|
228
228
|
|
229
|
-
a2, a2_gem = util_gem
|
230
|
-
a3, a3_gem = util_gem
|
229
|
+
a2, a2_gem = util_gem "a", "2"
|
230
|
+
a3, a3_gem = util_gem "a", "3"
|
231
231
|
|
232
232
|
util_setup_spec_fetcher @a1, a3, @b1
|
233
233
|
|
234
|
-
FileUtils.rm_rf File.join(@gemhome,
|
234
|
+
FileUtils.rm_rf File.join(@gemhome, "gems")
|
235
235
|
|
236
236
|
Gem::Specification.reset
|
237
237
|
|
@@ -241,7 +241,7 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
241
241
|
FileUtils.mv a3_gem, @tempdir
|
242
242
|
|
243
243
|
Dir.chdir @tempdir do
|
244
|
-
Gem::DependencyInstaller.new.install
|
244
|
+
Gem::DependencyInstaller.new.install "a", req("= 2")
|
245
245
|
end
|
246
246
|
|
247
247
|
FileUtils.rm File.join(@tempdir, a2.file_name)
|
@@ -250,7 +250,7 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
250
250
|
|
251
251
|
Dir.chdir @tempdir do
|
252
252
|
inst = Gem::DependencyInstaller.new
|
253
|
-
inst.install
|
253
|
+
inst.install "b"
|
254
254
|
end
|
255
255
|
|
256
256
|
assert_equal %w[a-2 b-1], Gem::Specification.map(&:full_name)
|
@@ -274,18 +274,18 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
274
274
|
|
275
275
|
Dir.chdir @tempdir do
|
276
276
|
inst = Gem::DependencyInstaller.new(:build_docs_in_background => false)
|
277
|
-
inst.install
|
277
|
+
inst.install "b"
|
278
278
|
end
|
279
279
|
|
280
280
|
assert_equal %w[a-1 b-1], inst.installed_gems.map {|s| s.full_name }
|
281
281
|
|
282
|
-
assert done_installing_ran,
|
282
|
+
assert done_installing_ran, "post installs hook was not run"
|
283
283
|
end
|
284
284
|
|
285
285
|
def test_install_dependency_development
|
286
286
|
util_setup_gems
|
287
287
|
|
288
|
-
@aa1, @aa1_gem = util_gem
|
288
|
+
@aa1, @aa1_gem = util_gem "aa", "1"
|
289
289
|
|
290
290
|
FileUtils.mv @a1_gem, @tempdir
|
291
291
|
FileUtils.mv @aa1_gem, @tempdir
|
@@ -294,7 +294,7 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
294
294
|
|
295
295
|
Dir.chdir @tempdir do
|
296
296
|
inst = Gem::DependencyInstaller.new(:development => true)
|
297
|
-
inst.install
|
297
|
+
inst.install "b"
|
298
298
|
end
|
299
299
|
|
300
300
|
assert_equal %w[a-1 aa-1 b-1], inst.installed_gems.map {|s| s.full_name }
|
@@ -303,7 +303,7 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
303
303
|
def test_install_dependency_development_deep
|
304
304
|
util_setup_gems
|
305
305
|
|
306
|
-
@aa1, @aa1_gem = util_gem
|
306
|
+
@aa1, @aa1_gem = util_gem "aa", "1"
|
307
307
|
|
308
308
|
FileUtils.mv @a1_gem, @tempdir
|
309
309
|
FileUtils.mv @aa1_gem, @tempdir
|
@@ -314,7 +314,7 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
314
314
|
|
315
315
|
Dir.chdir @tempdir do
|
316
316
|
inst = Gem::DependencyInstaller.new(:development => true)
|
317
|
-
inst.install
|
317
|
+
inst.install "d"
|
318
318
|
end
|
319
319
|
|
320
320
|
assert_equal %w[a-1 aa-1 b-1 c-1 d-1], inst.installed_gems.map {|s| s.full_name }
|
@@ -323,7 +323,7 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
323
323
|
def test_install_dependency_development_shallow
|
324
324
|
util_setup_gems
|
325
325
|
|
326
|
-
@aa1, @aa1_gem = util_gem
|
326
|
+
@aa1, @aa1_gem = util_gem "aa", "1"
|
327
327
|
|
328
328
|
FileUtils.mv @a1_gem, @tempdir
|
329
329
|
FileUtils.mv @aa1_gem, @tempdir
|
@@ -334,7 +334,7 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
334
334
|
|
335
335
|
Dir.chdir @tempdir do
|
336
336
|
inst = Gem::DependencyInstaller.new(:development => true, :dev_shallow => true)
|
337
|
-
inst.install
|
337
|
+
inst.install "d"
|
338
338
|
end
|
339
339
|
|
340
340
|
assert_equal %w[c-1 d-1], inst.installed_gems.map {|s| s.full_name }
|
@@ -350,29 +350,29 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
350
350
|
|
351
351
|
Dir.chdir @tempdir do
|
352
352
|
inst = Gem::DependencyInstaller.new
|
353
|
-
inst.install
|
353
|
+
inst.install "b"
|
354
354
|
end
|
355
355
|
|
356
356
|
assert_equal %w[b-1], inst.installed_gems.map {|s| s.full_name }
|
357
357
|
end
|
358
358
|
|
359
359
|
def test_install_dependency_existing_extension
|
360
|
-
extconf_rb = File.join @gemhome,
|
360
|
+
extconf_rb = File.join @gemhome, "gems", "e-1", "extconf.rb"
|
361
361
|
FileUtils.mkdir_p File.dirname extconf_rb
|
362
362
|
|
363
|
-
File.open extconf_rb,
|
363
|
+
File.open extconf_rb, "w" do |io|
|
364
364
|
io.write <<-EXTCONF_RB
|
365
365
|
require 'mkmf'
|
366
366
|
create_makefile 'e'
|
367
367
|
EXTCONF_RB
|
368
368
|
end
|
369
369
|
|
370
|
-
e1 = util_spec
|
371
|
-
s.extensions <<
|
370
|
+
e1 = util_spec "e", "1", nil, "extconf.rb" do |s|
|
371
|
+
s.extensions << "extconf.rb"
|
372
372
|
end
|
373
373
|
e1_gem = e1.cache_file
|
374
374
|
|
375
|
-
_, f1_gem = util_gem
|
375
|
+
_, f1_gem = util_gem "f", "1", "e" => nil
|
376
376
|
|
377
377
|
Gem::Installer.at(e1_gem).install
|
378
378
|
FileUtils.rm_r e1.extension_dir
|
@@ -385,7 +385,7 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
385
385
|
Dir.chdir @tempdir
|
386
386
|
begin
|
387
387
|
inst = Gem::DependencyInstaller.new
|
388
|
-
inst.install
|
388
|
+
inst.install "f"
|
389
389
|
ensure
|
390
390
|
Dir.chdir pwd
|
391
391
|
end
|
@@ -396,9 +396,9 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
396
396
|
end
|
397
397
|
|
398
398
|
def test_install_dependency_old
|
399
|
-
_, e1_gem = util_gem
|
400
|
-
_, f1_gem = util_gem
|
401
|
-
_, f2_gem = util_gem
|
399
|
+
_, e1_gem = util_gem "e", "1"
|
400
|
+
_, f1_gem = util_gem "f", "1", "e" => nil
|
401
|
+
_, f2_gem = util_gem "f", "2"
|
402
402
|
|
403
403
|
FileUtils.mv e1_gem, @tempdir
|
404
404
|
FileUtils.mv f1_gem, @tempdir
|
@@ -407,7 +407,7 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
407
407
|
|
408
408
|
Dir.chdir @tempdir do
|
409
409
|
inst = Gem::DependencyInstaller.new
|
410
|
-
inst.install
|
410
|
+
inst.install "f"
|
411
411
|
end
|
412
412
|
|
413
413
|
assert_equal %w[f-2], inst.installed_gems.map {|s| s.full_name }
|
@@ -421,7 +421,7 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
421
421
|
|
422
422
|
Dir.chdir @tempdir do
|
423
423
|
inst = Gem::DependencyInstaller.new :domain => :local
|
424
|
-
inst.install
|
424
|
+
inst.install "a-1.gem"
|
425
425
|
end
|
426
426
|
|
427
427
|
assert_equal %w[a-1], inst.installed_gems.map {|s| s.full_name }
|
@@ -435,7 +435,7 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
435
435
|
|
436
436
|
Dir.chdir @tempdir do
|
437
437
|
inst = Gem::DependencyInstaller.new :domain => :local
|
438
|
-
inst.install
|
438
|
+
inst.install "a-1.a.gem"
|
439
439
|
end
|
440
440
|
|
441
441
|
assert_equal %w[a-1.a], inst.installed_gems.map {|s| s.full_name }
|
@@ -451,7 +451,7 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
451
451
|
|
452
452
|
Dir.chdir @tempdir do
|
453
453
|
inst = Gem::DependencyInstaller.new :domain => :local
|
454
|
-
inst.install
|
454
|
+
inst.install "b-1.gem"
|
455
455
|
end
|
456
456
|
|
457
457
|
assert_equal %w[a-1 b-1], inst.installed_gems.map {|s| s.full_name }
|
@@ -466,10 +466,10 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
466
466
|
inst = nil
|
467
467
|
|
468
468
|
Dir.chdir @tempdir do
|
469
|
-
Gem::Installer.at(
|
469
|
+
Gem::Installer.at("a-1.gem").install
|
470
470
|
|
471
471
|
inst = Gem::DependencyInstaller.new :domain => :local
|
472
|
-
inst.install
|
472
|
+
inst.install "b-1.gem"
|
473
473
|
end
|
474
474
|
|
475
475
|
assert_equal %w[b-1], inst.installed_gems.map {|s| s.full_name }
|
@@ -482,7 +482,7 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
482
482
|
|
483
483
|
Dir.chdir @tempdir do
|
484
484
|
inst = Gem::DependencyInstaller.new :domain => :local
|
485
|
-
inst.install
|
485
|
+
inst.install "gems/a-1.gem"
|
486
486
|
end
|
487
487
|
|
488
488
|
assert_equal %w[a-1], inst.installed_gems.map {|s| s.full_name }
|
@@ -491,12 +491,12 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
491
491
|
def test_install_minimal_deps
|
492
492
|
util_setup_gems
|
493
493
|
|
494
|
-
_, e1_gem = util_gem
|
495
|
-
s.add_dependency
|
494
|
+
_, e1_gem = util_gem "e", "1" do |s|
|
495
|
+
s.add_dependency "b"
|
496
496
|
end
|
497
497
|
|
498
|
-
_, b2_gem = util_gem
|
499
|
-
s.add_dependency
|
498
|
+
_, b2_gem = util_gem "b", "2" do |s|
|
499
|
+
s.add_dependency "a"
|
500
500
|
end
|
501
501
|
|
502
502
|
FileUtils.mv @a1_gem, @tempdir
|
@@ -508,15 +508,15 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
508
508
|
|
509
509
|
Dir.chdir @tempdir do
|
510
510
|
inst = Gem::DependencyInstaller.new :ignore_dependencies => true
|
511
|
-
inst.install
|
511
|
+
inst.install "b", req("= 1")
|
512
512
|
end
|
513
513
|
|
514
514
|
assert_equal %w[b-1], inst.installed_gems.map {|s| s.full_name },
|
515
|
-
|
515
|
+
"sanity check"
|
516
516
|
|
517
517
|
Dir.chdir @tempdir do
|
518
518
|
inst = Gem::DependencyInstaller.new :minimal_deps => true
|
519
|
-
inst.install
|
519
|
+
inst.install "e"
|
520
520
|
end
|
521
521
|
|
522
522
|
assert_equal %w[a-1 e-1], inst.installed_gems.map {|s| s.full_name }
|
@@ -525,12 +525,12 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
525
525
|
def test_install_no_minimal_deps
|
526
526
|
util_setup_gems
|
527
527
|
|
528
|
-
_, e1_gem = util_gem
|
529
|
-
s.add_dependency
|
528
|
+
_, e1_gem = util_gem "e", "1" do |s|
|
529
|
+
s.add_dependency "b"
|
530
530
|
end
|
531
531
|
|
532
|
-
_, b2_gem = util_gem
|
533
|
-
s.add_dependency
|
532
|
+
_, b2_gem = util_gem "b", "2" do |s|
|
533
|
+
s.add_dependency "a"
|
534
534
|
end
|
535
535
|
|
536
536
|
FileUtils.mv @a1_gem, @tempdir
|
@@ -542,15 +542,15 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
542
542
|
|
543
543
|
Dir.chdir @tempdir do
|
544
544
|
inst = Gem::DependencyInstaller.new :ignore_dependencies => true
|
545
|
-
inst.install
|
545
|
+
inst.install "b", req("= 1")
|
546
546
|
end
|
547
547
|
|
548
548
|
assert_equal %w[b-1], inst.installed_gems.map {|s| s.full_name },
|
549
|
-
|
549
|
+
"sanity check"
|
550
550
|
|
551
551
|
Dir.chdir @tempdir do
|
552
552
|
inst = Gem::DependencyInstaller.new :minimal_deps => false
|
553
|
-
inst.install
|
553
|
+
inst.install "e"
|
554
554
|
end
|
555
555
|
|
556
556
|
assert_equal %w[a-1 b-2 e-1], inst.installed_gems.map {|s| s.full_name }
|
@@ -581,13 +581,13 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
581
581
|
|
582
582
|
Dir.chdir @tempdir do
|
583
583
|
inst = Gem::DependencyInstaller.new :env_shebang => true, :wrappers => true, :format_executable => false
|
584
|
-
inst.install
|
584
|
+
inst.install "a"
|
585
585
|
end
|
586
586
|
|
587
587
|
env = "/\\S+/env" unless Gem.win_platform?
|
588
588
|
|
589
589
|
assert_match %r{\A#!#{env} #{RbConfig::CONFIG['ruby_install_name']}\n},
|
590
|
-
File.read(File.join(@gemhome,
|
590
|
+
File.read(File.join(@gemhome, "bin", "a_bin"))
|
591
591
|
end
|
592
592
|
|
593
593
|
def test_install_force
|
@@ -595,12 +595,12 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
595
595
|
|
596
596
|
FileUtils.mv @b1_gem, @tempdir
|
597
597
|
si = util_setup_spec_fetcher @b1
|
598
|
-
@fetcher.data[
|
598
|
+
@fetcher.data["http://gems.example.com/gems/yaml"] = si.to_yaml
|
599
599
|
inst = nil
|
600
600
|
|
601
601
|
Dir.chdir @tempdir do
|
602
602
|
inst = Gem::DependencyInstaller.new :force => true
|
603
|
-
inst.install
|
603
|
+
inst.install "b"
|
604
604
|
end
|
605
605
|
|
606
606
|
assert_equal %w[b-1], inst.installed_gems.map {|s| s.full_name }
|
@@ -616,7 +616,7 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
616
616
|
Dir.chdir @tempdir do
|
617
617
|
inst = Gem::DependencyInstaller.new(
|
618
618
|
:build_args => build_args)
|
619
|
-
inst.install
|
619
|
+
inst.install "a"
|
620
620
|
end
|
621
621
|
|
622
622
|
assert_equal build_args.join("\n"), File.read(inst.installed_gems.first.build_info_file).strip
|
@@ -630,7 +630,7 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
630
630
|
|
631
631
|
Dir.chdir @tempdir do
|
632
632
|
inst = Gem::DependencyInstaller.new :ignore_dependencies => true
|
633
|
-
inst.install
|
633
|
+
inst.install "b"
|
634
634
|
end
|
635
635
|
|
636
636
|
assert_equal %w[b-1], inst.installed_gems.map {|s| s.full_name }
|
@@ -645,37 +645,37 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
645
645
|
inst = Gem::Installer.at @a1.file_name
|
646
646
|
inst.install
|
647
647
|
|
648
|
-
gemhome2 = File.join @tempdir,
|
648
|
+
gemhome2 = File.join @tempdir, "gemhome2"
|
649
649
|
Dir.mkdir gemhome2
|
650
650
|
inst = nil
|
651
651
|
|
652
652
|
Dir.chdir @tempdir do
|
653
653
|
inst = Gem::DependencyInstaller.new :install_dir => gemhome2
|
654
|
-
inst.install
|
654
|
+
inst.install "b"
|
655
655
|
end
|
656
656
|
|
657
657
|
assert_equal %w[a-1 b-1], inst.installed_gems.map {|s| s.full_name }
|
658
658
|
|
659
|
-
assert File.exist?(File.join(gemhome2,
|
660
|
-
assert File.exist?(File.join(gemhome2,
|
659
|
+
assert File.exist?(File.join(gemhome2, "specifications", @a1.spec_name))
|
660
|
+
assert File.exist?(File.join(gemhome2, "cache", @a1.file_name))
|
661
661
|
end
|
662
662
|
|
663
663
|
def test_install_domain_both
|
664
664
|
util_setup_gems
|
665
665
|
|
666
666
|
a1_data = nil
|
667
|
-
File.open @a1_gem,
|
667
|
+
File.open @a1_gem, "rb" do |fp|
|
668
668
|
a1_data = fp.read
|
669
669
|
end
|
670
670
|
|
671
|
-
@fetcher.data[
|
671
|
+
@fetcher.data["http://gems.example.com/gems/a-1.gem"] = a1_data
|
672
672
|
|
673
673
|
FileUtils.mv @b1_gem, @tempdir
|
674
674
|
inst = nil
|
675
675
|
|
676
676
|
Dir.chdir @tempdir do
|
677
677
|
inst = Gem::DependencyInstaller.new :domain => :both
|
678
|
-
inst.install
|
678
|
+
inst.install "b"
|
679
679
|
end
|
680
680
|
|
681
681
|
assert_equal %w[a-1 b-1], inst.installed_gems.map {|s| s.full_name }
|
@@ -699,7 +699,7 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
699
699
|
|
700
700
|
Dir.chdir @tempdir do
|
701
701
|
inst = Gem::DependencyInstaller.new :domain => :both
|
702
|
-
inst.install
|
702
|
+
inst.install "b"
|
703
703
|
end
|
704
704
|
|
705
705
|
assert_equal %w[a-1 b-1], inst.installed_gems.map {|s| s.full_name }
|
@@ -714,7 +714,7 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
714
714
|
Dir.chdir @tempdir do
|
715
715
|
e = assert_raise Gem::UnsatisfiableDependencyError do
|
716
716
|
inst = Gem::DependencyInstaller.new :domain => :local
|
717
|
-
inst.install
|
717
|
+
inst.install "b"
|
718
718
|
end
|
719
719
|
|
720
720
|
expected = "Unable to resolve dependency: 'b (>= 0)' requires 'a (>= 0)'"
|
@@ -728,14 +728,14 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
728
728
|
util_setup_gems
|
729
729
|
|
730
730
|
a1_data = nil
|
731
|
-
File.open @a1_gem,
|
731
|
+
File.open @a1_gem, "rb" do |fp|
|
732
732
|
a1_data = fp.read
|
733
733
|
end
|
734
734
|
|
735
|
-
@fetcher.data[
|
735
|
+
@fetcher.data["http://gems.example.com/gems/a-1.gem"] = a1_data
|
736
736
|
|
737
737
|
inst = Gem::DependencyInstaller.new :domain => :remote
|
738
|
-
inst.install
|
738
|
+
inst.install "a"
|
739
739
|
|
740
740
|
assert_equal %w[a-1], inst.installed_gems.map {|s| s.full_name }
|
741
741
|
end
|
@@ -751,19 +751,19 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
751
751
|
|
752
752
|
Dir.chdir @tempdir do
|
753
753
|
inst = Gem::DependencyInstaller.new :install_dir => gemhome2
|
754
|
-
inst.install
|
754
|
+
inst.install "a"
|
755
755
|
end
|
756
756
|
|
757
757
|
assert_equal %w[a-1], inst.installed_gems.map {|s| s.full_name },
|
758
|
-
|
758
|
+
"sanity check"
|
759
759
|
|
760
|
-
ENV[
|
761
|
-
ENV[
|
760
|
+
ENV["GEM_HOME"] = @gemhome
|
761
|
+
ENV["GEM_PATH"] = [@gemhome, gemhome2].join File::PATH_SEPARATOR
|
762
762
|
Gem.clear_paths
|
763
763
|
|
764
764
|
Dir.chdir @tempdir do
|
765
765
|
inst = Gem::DependencyInstaller.new
|
766
|
-
inst.install
|
766
|
+
inst.install "b"
|
767
767
|
end
|
768
768
|
|
769
769
|
assert_equal %w[b-1], inst.installed_gems.map {|s| s.full_name }
|
@@ -778,7 +778,7 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
778
778
|
|
779
779
|
Dir.chdir @tempdir do
|
780
780
|
inst = Gem::DependencyInstaller.new :force => true
|
781
|
-
inst.install
|
781
|
+
inst.install "a"
|
782
782
|
end
|
783
783
|
|
784
784
|
assert_equal %w[a-1], Gem::Specification.map(&:full_name)
|
@@ -789,16 +789,16 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
789
789
|
util_setup_gems
|
790
790
|
|
791
791
|
a1_data = nil
|
792
|
-
File.open @a1_gem,
|
792
|
+
File.open @a1_gem, "rb" do |fp|
|
793
793
|
a1_data = fp.read
|
794
794
|
end
|
795
795
|
|
796
|
-
@fetcher.data[
|
796
|
+
@fetcher.data["http://gems.example.com/gems/a-1.gem"] = a1_data
|
797
797
|
|
798
798
|
inst = Gem::DependencyInstaller.new
|
799
799
|
|
800
800
|
Dir.chdir @tempdir do
|
801
|
-
inst.install
|
801
|
+
inst.install "a"
|
802
802
|
end
|
803
803
|
|
804
804
|
assert_equal %w[a-1], inst.installed_gems.map {|s| s.full_name }
|
@@ -808,11 +808,11 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
808
808
|
util_setup_gems
|
809
809
|
|
810
810
|
a1_data = nil
|
811
|
-
File.open @a1_gem,
|
811
|
+
File.open @a1_gem, "rb" do |fp|
|
812
812
|
a1_data = fp.read
|
813
813
|
end
|
814
814
|
|
815
|
-
@fetcher.data[
|
815
|
+
@fetcher.data["http://gems.example.com/gems/a-1.gem"] = a1_data
|
816
816
|
|
817
817
|
inst = Gem::DependencyInstaller.new
|
818
818
|
|
@@ -827,22 +827,22 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
827
827
|
def test_install_remote_platform_newer
|
828
828
|
util_setup_gems
|
829
829
|
|
830
|
-
a2_o, a2_o_gem = util_gem
|
830
|
+
a2_o, a2_o_gem = util_gem "a", "2" do |s|
|
831
831
|
s.platform = Gem::Platform.new %w[cpu other_platform 1]
|
832
832
|
end
|
833
833
|
|
834
834
|
si = util_setup_spec_fetcher @a1, a2_o
|
835
835
|
|
836
|
-
@fetcher.data[
|
836
|
+
@fetcher.data["http://gems.example.com/gems/yaml"] = si.to_yaml
|
837
837
|
|
838
838
|
a1_data = nil
|
839
839
|
a2_o_data = nil
|
840
840
|
|
841
|
-
File.open @a1_gem,
|
841
|
+
File.open @a1_gem, "rb" do |fp|
|
842
842
|
a1_data = fp.read
|
843
843
|
end
|
844
844
|
|
845
|
-
File.open a2_o_gem,
|
845
|
+
File.open a2_o_gem, "rb" do |fp|
|
846
846
|
a2_o_data = fp.read
|
847
847
|
end
|
848
848
|
|
@@ -852,13 +852,13 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
852
852
|
a2_o_data
|
853
853
|
|
854
854
|
inst = Gem::DependencyInstaller.new :domain => :remote
|
855
|
-
inst.install
|
855
|
+
inst.install "a"
|
856
856
|
|
857
857
|
assert_equal %w[a-1], inst.installed_gems.map {|s| s.full_name }
|
858
858
|
end
|
859
859
|
|
860
860
|
def test_install_platform_is_ignored_when_a_file_is_specified
|
861
|
-
_, a_gem = util_gem
|
861
|
+
_, a_gem = util_gem "a", "1" do |s|
|
862
862
|
s.platform = Gem::Platform.new %w[cpu other_platform 1]
|
863
863
|
end
|
864
864
|
|
@@ -868,26 +868,26 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
868
868
|
assert_equal %w[a-1-cpu-other_platform-1], inst.installed_gems.map {|s| s.full_name }
|
869
869
|
end
|
870
870
|
|
871
|
-
require
|
871
|
+
require "rubygems/openssl"
|
872
872
|
|
873
873
|
if Gem::HAVE_OPENSSL
|
874
874
|
def test_install_security_policy
|
875
875
|
util_setup_gems
|
876
876
|
|
877
|
-
data = File.open(@a1_gem,
|
878
|
-
@fetcher.data[
|
877
|
+
data = File.open(@a1_gem, "rb") {|f| f.read }
|
878
|
+
@fetcher.data["http://gems.example.com/gems/a-1.gem"] = data
|
879
879
|
|
880
|
-
data = File.open(@b1_gem,
|
881
|
-
@fetcher.data[
|
880
|
+
data = File.open(@b1_gem, "rb") {|f| f.read }
|
881
|
+
@fetcher.data["http://gems.example.com/gems/b-1.gem"] = data
|
882
882
|
|
883
883
|
policy = Gem::Security::HighSecurity
|
884
884
|
inst = Gem::DependencyInstaller.new :security_policy => policy
|
885
885
|
|
886
886
|
e = assert_raise Gem::Security::Exception do
|
887
|
-
inst.install
|
887
|
+
inst.install "b"
|
888
888
|
end
|
889
889
|
|
890
|
-
assert_equal
|
890
|
+
assert_equal "unsigned gems are not allowed by the High Security policy",
|
891
891
|
e.message
|
892
892
|
|
893
893
|
assert_equal %w[], inst.installed_gems.map {|s| s.full_name }
|
@@ -899,28 +899,28 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
899
899
|
def test_install_no_wrappers
|
900
900
|
util_setup_gems
|
901
901
|
|
902
|
-
@fetcher.data[
|
902
|
+
@fetcher.data["http://gems.example.com/gems/a-1.gem"] = read_binary(@a1_gem)
|
903
903
|
|
904
904
|
inst = Gem::DependencyInstaller.new :wrappers => false, :format_executable => false
|
905
|
-
inst.install
|
905
|
+
inst.install "a"
|
906
906
|
|
907
907
|
refute_match(%r{This file was generated by RubyGems.},
|
908
|
-
File.read(File.join(@gemhome,
|
908
|
+
File.read(File.join(@gemhome, "bin", "a_bin")))
|
909
909
|
end
|
910
910
|
end
|
911
911
|
|
912
912
|
def test_install_version
|
913
913
|
util_setup_d
|
914
914
|
|
915
|
-
data = File.open(@d2_gem,
|
916
|
-
@fetcher.data[
|
915
|
+
data = File.open(@d2_gem, "rb") {|f| f.read }
|
916
|
+
@fetcher.data["http://gems.example.com/gems/d-2.gem"] = data
|
917
917
|
|
918
|
-
data = File.open(@d1_gem,
|
919
|
-
@fetcher.data[
|
918
|
+
data = File.open(@d1_gem, "rb") {|f| f.read }
|
919
|
+
@fetcher.data["http://gems.example.com/gems/d-1.gem"] = data
|
920
920
|
|
921
921
|
inst = Gem::DependencyInstaller.new
|
922
922
|
|
923
|
-
inst.install
|
923
|
+
inst.install "d", "= 1"
|
924
924
|
|
925
925
|
assert_equal %w[d-1], inst.installed_gems.map {|s| s.full_name }
|
926
926
|
end
|
@@ -928,26 +928,26 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
928
928
|
def test_install_version_default
|
929
929
|
util_setup_d
|
930
930
|
|
931
|
-
data = File.open(@d2_gem,
|
932
|
-
@fetcher.data[
|
931
|
+
data = File.open(@d2_gem, "rb") {|f| f.read }
|
932
|
+
@fetcher.data["http://gems.example.com/gems/d-2.gem"] = data
|
933
933
|
|
934
|
-
data = File.open(@d1_gem,
|
935
|
-
@fetcher.data[
|
934
|
+
data = File.open(@d1_gem, "rb") {|f| f.read }
|
935
|
+
@fetcher.data["http://gems.example.com/gems/d-1.gem"] = data
|
936
936
|
|
937
937
|
inst = Gem::DependencyInstaller.new
|
938
|
-
inst.install
|
938
|
+
inst.install "d"
|
939
939
|
|
940
940
|
assert_equal %w[d-2], inst.installed_gems.map {|s| s.full_name }
|
941
941
|
end
|
942
942
|
|
943
943
|
def test_install_legacy_spec_with_nil_required_ruby_version
|
944
|
-
path = File.expand_path
|
944
|
+
path = File.expand_path "data/null-required-ruby-version.gemspec.rz", __dir__
|
945
945
|
spec = Marshal.load Gem.read_binary(path)
|
946
946
|
def spec.validate(*args); end
|
947
947
|
|
948
948
|
util_build_gem spec
|
949
949
|
|
950
|
-
cache_file = File.join @tempdir,
|
950
|
+
cache_file = File.join @tempdir, "gems", "#{spec.original_name}.gem"
|
951
951
|
FileUtils.mkdir_p File.dirname cache_file
|
952
952
|
FileUtils.mv spec.cache_file, cache_file
|
953
953
|
|
@@ -955,9 +955,9 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
955
955
|
|
956
956
|
data = Gem.read_binary(cache_file)
|
957
957
|
|
958
|
-
@fetcher.data[
|
958
|
+
@fetcher.data["http://gems.example.com/gems/activesupport-1.0.0.gem"] = data
|
959
959
|
|
960
|
-
dep = Gem::Dependency.new
|
960
|
+
dep = Gem::Dependency.new "activesupport"
|
961
961
|
|
962
962
|
inst = Gem::DependencyInstaller.new
|
963
963
|
inst.install dep
|
@@ -966,13 +966,13 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
966
966
|
end
|
967
967
|
|
968
968
|
def test_install_legacy_spec_with_nil_required_rubygems_version
|
969
|
-
path = File.expand_path
|
969
|
+
path = File.expand_path "data/null-required-rubygems-version.gemspec.rz", __dir__
|
970
970
|
spec = Marshal.load Gem.read_binary(path)
|
971
971
|
def spec.validate(*args); end
|
972
972
|
|
973
973
|
util_build_gem spec
|
974
974
|
|
975
|
-
cache_file = File.join @tempdir,
|
975
|
+
cache_file = File.join @tempdir, "gems", "#{spec.original_name}.gem"
|
976
976
|
FileUtils.mkdir_p File.dirname cache_file
|
977
977
|
FileUtils.mv spec.cache_file, cache_file
|
978
978
|
|
@@ -980,9 +980,9 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
980
980
|
|
981
981
|
data = Gem.read_binary(cache_file)
|
982
982
|
|
983
|
-
@fetcher.data[
|
983
|
+
@fetcher.data["http://gems.example.com/gems/activesupport-1.0.0.gem"] = data
|
984
984
|
|
985
|
-
dep = Gem::Dependency.new
|
985
|
+
dep = Gem::Dependency.new "activesupport"
|
986
986
|
|
987
987
|
inst = Gem::DependencyInstaller.new
|
988
988
|
inst.install dep
|
@@ -994,7 +994,7 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
994
994
|
util_setup_gems
|
995
995
|
|
996
996
|
inst = Gem::DependencyInstaller.new
|
997
|
-
dep = Gem::Dependency.new
|
997
|
+
dep = Gem::Dependency.new "b", ">= 0"
|
998
998
|
|
999
999
|
Gem::Specification.reset
|
1000
1000
|
|
@@ -1015,7 +1015,7 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
1015
1015
|
|
1016
1016
|
FileUtils.mv @a1_gem, @tempdir
|
1017
1017
|
inst = Gem::DependencyInstaller.new
|
1018
|
-
dep = Gem::Dependency.new
|
1018
|
+
dep = Gem::Dependency.new "a", ">= 0"
|
1019
1019
|
set = nil
|
1020
1020
|
|
1021
1021
|
Dir.chdir @tempdir do
|
@@ -1030,12 +1030,12 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
1030
1030
|
|
1031
1031
|
remote, local = gems
|
1032
1032
|
|
1033
|
-
assert_equal
|
1033
|
+
assert_equal "a-1", local.spec.full_name, "local spec"
|
1034
1034
|
assert_equal File.join(@tempdir, @a1.file_name),
|
1035
|
-
local.source.download(local.spec),
|
1035
|
+
local.source.download(local.spec), "local path"
|
1036
1036
|
|
1037
|
-
assert_equal
|
1038
|
-
assert_equal Gem::Source.new(@gem_repo), remote.source,
|
1037
|
+
assert_equal "a-1", remote.spec.full_name, "remote spec"
|
1038
|
+
assert_equal Gem::Source.new(@gem_repo), remote.source, "remote path"
|
1039
1039
|
end
|
1040
1040
|
|
1041
1041
|
def test_find_gems_with_sources_prerelease
|
@@ -1043,7 +1043,7 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
1043
1043
|
|
1044
1044
|
installer = Gem::DependencyInstaller.new
|
1045
1045
|
|
1046
|
-
dependency = Gem::Dependency.new(
|
1046
|
+
dependency = Gem::Dependency.new("a", Gem::Requirement.default)
|
1047
1047
|
|
1048
1048
|
set = Gem::Deprecate.skip_during do
|
1049
1049
|
installer.find_gems_with_sources(dependency)
|
@@ -1051,8 +1051,8 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
1051
1051
|
|
1052
1052
|
releases = set.all_specs
|
1053
1053
|
|
1054
|
-
assert releases.any? {|s| s.name ==
|
1055
|
-
refute releases.any? {|s| s.name ==
|
1054
|
+
assert releases.any? {|s| s.name == "a" && s.version.to_s == "1" }
|
1055
|
+
refute releases.any? {|s| s.name == "a" && s.version.to_s == "1.a" }
|
1056
1056
|
|
1057
1057
|
dependency.prerelease = true
|
1058
1058
|
|
@@ -1067,15 +1067,15 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
1067
1067
|
|
1068
1068
|
def test_find_gems_with_sources_with_best_only_and_platform
|
1069
1069
|
util_setup_gems
|
1070
|
-
a1_x86_mingw32, = util_gem
|
1071
|
-
s.platform =
|
1070
|
+
a1_x86_mingw32, = util_gem "a", "1" do |s|
|
1071
|
+
s.platform = "x86-mingw32"
|
1072
1072
|
end
|
1073
1073
|
util_setup_spec_fetcher @a1, a1_x86_mingw32
|
1074
|
-
Gem.platforms << Gem::Platform.new(
|
1074
|
+
Gem.platforms << Gem::Platform.new("x86-mingw32")
|
1075
1075
|
|
1076
1076
|
installer = Gem::DependencyInstaller.new
|
1077
1077
|
|
1078
|
-
dependency = Gem::Dependency.new(
|
1078
|
+
dependency = Gem::Dependency.new("a", Gem::Requirement.default)
|
1079
1079
|
|
1080
1080
|
set = Gem::Deprecate.skip_during do
|
1081
1081
|
installer.find_gems_with_sources(dependency, true)
|
@@ -1091,7 +1091,7 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
1091
1091
|
|
1092
1092
|
installer = Gem::DependencyInstaller.new
|
1093
1093
|
|
1094
|
-
dep = Gem::Dependency.new(
|
1094
|
+
dep = Gem::Dependency.new("a")
|
1095
1095
|
|
1096
1096
|
out = Gem::Deprecate.skip_during do
|
1097
1097
|
installer.find_gems_with_sources(dep)
|
@@ -1108,7 +1108,7 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
1108
1108
|
FileUtils.mv @b1_gem, @tempdir
|
1109
1109
|
|
1110
1110
|
inst = Gem::DependencyInstaller.new
|
1111
|
-
request_set = inst.resolve_dependencies
|
1111
|
+
request_set = inst.resolve_dependencies "b", req(">= 0")
|
1112
1112
|
|
1113
1113
|
requests = request_set.sorted_requests.map {|req| req.full_name }
|
1114
1114
|
|
@@ -1122,7 +1122,7 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
1122
1122
|
FileUtils.mv @b1_gem, @tempdir
|
1123
1123
|
|
1124
1124
|
inst = Gem::DependencyInstaller.new :ignore_dependencies => true
|
1125
|
-
request_set = inst.resolve_dependencies
|
1125
|
+
request_set = inst.resolve_dependencies "b", req(">= 0")
|
1126
1126
|
|
1127
1127
|
requests = request_set.sorted_requests.map {|req| req.full_name }
|
1128
1128
|
|
@@ -1134,12 +1134,12 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
1134
1134
|
def test_resolve_dependencies_local
|
1135
1135
|
util_setup_gems
|
1136
1136
|
|
1137
|
-
@a2, @a2_gem = util_gem
|
1137
|
+
@a2, @a2_gem = util_gem "a", "2"
|
1138
1138
|
FileUtils.mv @a1_gem, @tempdir
|
1139
1139
|
FileUtils.mv @a2_gem, @tempdir
|
1140
1140
|
|
1141
1141
|
inst = Gem::DependencyInstaller.new
|
1142
|
-
request_set = inst.resolve_dependencies
|
1142
|
+
request_set = inst.resolve_dependencies "a-1.gem", req(">= 0")
|
1143
1143
|
|
1144
1144
|
requests = request_set.sorted_requests.map {|req| req.full_name }
|
1145
1145
|
|
@@ -1147,8 +1147,8 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
1147
1147
|
end
|
1148
1148
|
|
1149
1149
|
def util_setup_d
|
1150
|
-
@d1, @d1_gem = util_gem
|
1151
|
-
@d2, @d2_gem = util_gem
|
1150
|
+
@d1, @d1_gem = util_gem "d", "1"
|
1151
|
+
@d2, @d2_gem = util_gem "d", "2"
|
1152
1152
|
|
1153
1153
|
util_setup_spec_fetcher(@d1, @d2)
|
1154
1154
|
end
|