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,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
require_relative
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
2
|
+
require_relative "helper"
|
3
|
+
require "rubygems/commands/install_command"
|
4
|
+
require "rubygems/request_set"
|
5
|
+
require "rubygems/rdoc"
|
6
6
|
|
7
7
|
class TestGemCommandsInstallCommand < Gem::TestCase
|
8
8
|
def setup
|
@@ -30,8 +30,8 @@ class TestGemCommandsInstallCommand < Gem::TestCase
|
|
30
30
|
|
31
31
|
def test_execute_exclude_prerelease
|
32
32
|
spec_fetcher do |fetcher|
|
33
|
-
fetcher.gem
|
34
|
-
fetcher.gem
|
33
|
+
fetcher.gem "a", 2
|
34
|
+
fetcher.gem "a", "2.pre"
|
35
35
|
end
|
36
36
|
|
37
37
|
@cmd.options[:args] = %w[a]
|
@@ -47,13 +47,13 @@ class TestGemCommandsInstallCommand < Gem::TestCase
|
|
47
47
|
|
48
48
|
def test_execute_explicit_version_includes_prerelease
|
49
49
|
specs = spec_fetcher do |fetcher|
|
50
|
-
fetcher.gem
|
51
|
-
fetcher.gem
|
50
|
+
fetcher.gem "a", 2
|
51
|
+
fetcher.gem "a", "2.a"
|
52
52
|
end
|
53
53
|
|
54
|
-
a2_pre = specs[
|
54
|
+
a2_pre = specs["a-2.a"]
|
55
55
|
|
56
|
-
@cmd.handle_options [a2_pre.name,
|
56
|
+
@cmd.handle_options [a2_pre.name, "--version", a2_pre.version.to_s,
|
57
57
|
"--no-document"]
|
58
58
|
assert @cmd.options[:prerelease]
|
59
59
|
assert @cmd.options[:version].satisfied_by?(a2_pre.version)
|
@@ -69,12 +69,12 @@ class TestGemCommandsInstallCommand < Gem::TestCase
|
|
69
69
|
|
70
70
|
def test_execute_local
|
71
71
|
specs = spec_fetcher do |fetcher|
|
72
|
-
fetcher.gem
|
72
|
+
fetcher.gem "a", 2
|
73
73
|
end
|
74
74
|
|
75
75
|
@cmd.options[:domain] = :local
|
76
76
|
|
77
|
-
FileUtils.mv specs[
|
77
|
+
FileUtils.mv specs["a-2"].cache_file, @tempdir
|
78
78
|
|
79
79
|
@cmd.options[:args] = %w[a]
|
80
80
|
|
@@ -97,14 +97,14 @@ class TestGemCommandsInstallCommand < Gem::TestCase
|
|
97
97
|
|
98
98
|
def test_execute_local_dependency_nonexistent
|
99
99
|
specs = spec_fetcher do |fetcher|
|
100
|
-
fetcher.gem
|
100
|
+
fetcher.gem "foo", 2, "bar" => "0.5"
|
101
101
|
end
|
102
102
|
|
103
103
|
@cmd.options[:domain] = :local
|
104
104
|
|
105
|
-
FileUtils.mv specs[
|
105
|
+
FileUtils.mv specs["foo-2"].cache_file, @tempdir
|
106
106
|
|
107
|
-
@cmd.options[:args] = [
|
107
|
+
@cmd.options[:args] = ["foo"]
|
108
108
|
|
109
109
|
use_ui @ui do
|
110
110
|
orig_dir = Dir.pwd
|
@@ -128,15 +128,15 @@ ERROR: Could not find a valid gem 'bar' (= 0.5) (required by 'foo' (>= 0)) in a
|
|
128
128
|
|
129
129
|
def test_execute_local_dependency_nonexistent_ignore_dependencies
|
130
130
|
specs = spec_fetcher do |fetcher|
|
131
|
-
fetcher.gem
|
131
|
+
fetcher.gem "foo", 2, "bar" => "0.5"
|
132
132
|
end
|
133
133
|
|
134
134
|
@cmd.options[:domain] = :local
|
135
135
|
@cmd.options[:ignore_dependencies] = true
|
136
136
|
|
137
|
-
FileUtils.mv specs[
|
137
|
+
FileUtils.mv specs["foo-2"].cache_file, @tempdir
|
138
138
|
|
139
|
-
@cmd.options[:args] = [
|
139
|
+
@cmd.options[:args] = ["foo"]
|
140
140
|
|
141
141
|
use_ui @ui do
|
142
142
|
orig_dir = Dir.pwd
|
@@ -155,16 +155,16 @@ ERROR: Could not find a valid gem 'bar' (= 0.5) (required by 'foo' (>= 0)) in a
|
|
155
155
|
|
156
156
|
def test_execute_local_transitive_prerelease
|
157
157
|
specs = spec_fetcher do |fetcher|
|
158
|
-
fetcher.download
|
159
|
-
fetcher.download
|
160
|
-
fetcher.download
|
158
|
+
fetcher.download "a", 2, "b" => "2.a", "c" => "3"
|
159
|
+
fetcher.download "b", "2.a"
|
160
|
+
fetcher.download "c", "3"
|
161
161
|
end
|
162
162
|
|
163
163
|
@cmd.options[:domain] = :local
|
164
164
|
|
165
|
-
FileUtils.mv specs[
|
166
|
-
FileUtils.mv specs[
|
167
|
-
FileUtils.mv specs[
|
165
|
+
FileUtils.mv specs["a-2"].cache_file, @tempdir
|
166
|
+
FileUtils.mv specs["b-2.a"].cache_file, @tempdir
|
167
|
+
FileUtils.mv specs["c-3"].cache_file, @tempdir
|
168
168
|
|
169
169
|
@cmd.options[:args] = %w[a]
|
170
170
|
|
@@ -187,16 +187,16 @@ ERROR: Could not find a valid gem 'bar' (= 0.5) (required by 'foo' (>= 0)) in a
|
|
187
187
|
end
|
188
188
|
|
189
189
|
def test_execute_no_user_install
|
190
|
-
pend
|
191
|
-
pend
|
190
|
+
pend "skipped on MS Windows (chmod has no effect)" if win_platform?
|
191
|
+
pend "skipped in root privilege" if Process.uid.zero?
|
192
192
|
|
193
193
|
specs = spec_fetcher do |fetcher|
|
194
|
-
fetcher.gem
|
194
|
+
fetcher.gem "a", 2
|
195
195
|
end
|
196
196
|
|
197
197
|
@cmd.options[:user_install] = false
|
198
198
|
|
199
|
-
FileUtils.mv specs[
|
199
|
+
FileUtils.mv specs["a-2"].cache_file, @tempdir
|
200
200
|
|
201
201
|
@cmd.options[:args] = %w[a]
|
202
202
|
|
@@ -295,10 +295,10 @@ ERROR: Could not find a valid gem 'bar' (= 0.5) (required by 'foo' (>= 0)) in a
|
|
295
295
|
|
296
296
|
def test_execute_dependency_nonexistent
|
297
297
|
spec_fetcher do |fetcher|
|
298
|
-
fetcher.spec
|
298
|
+
fetcher.spec "foo", 2, "bar" => "0.5"
|
299
299
|
end
|
300
300
|
|
301
|
-
@cmd.options[:args] = [
|
301
|
+
@cmd.options[:args] = ["foo"]
|
302
302
|
|
303
303
|
use_ui @ui do
|
304
304
|
e = assert_raise Gem::MockGemUi::TermError do
|
@@ -451,8 +451,8 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
451
451
|
|
452
452
|
def test_execute_prerelease_skipped_when_no_flag_set
|
453
453
|
spec_fetcher do |fetcher|
|
454
|
-
fetcher.gem
|
455
|
-
fetcher.gem
|
454
|
+
fetcher.gem "a", 1
|
455
|
+
fetcher.gem "a", "3.a"
|
456
456
|
end
|
457
457
|
|
458
458
|
@cmd.options[:prerelease] = false
|
@@ -469,8 +469,8 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
469
469
|
|
470
470
|
def test_execute_prerelease_wins_over_previous_ver
|
471
471
|
spec_fetcher do |fetcher|
|
472
|
-
fetcher.download
|
473
|
-
fetcher.download
|
472
|
+
fetcher.download "a", 1
|
473
|
+
fetcher.download "a", "2.a"
|
474
474
|
end
|
475
475
|
|
476
476
|
@cmd.options[:prerelease] = true
|
@@ -487,8 +487,8 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
487
487
|
|
488
488
|
def test_execute_with_version_specified_by_colon
|
489
489
|
spec_fetcher do |fetcher|
|
490
|
-
fetcher.download
|
491
|
-
fetcher.download
|
490
|
+
fetcher.download "a", 1
|
491
|
+
fetcher.download "a", 2
|
492
492
|
end
|
493
493
|
|
494
494
|
@cmd.options[:args] = %w[a:1]
|
@@ -504,8 +504,8 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
504
504
|
|
505
505
|
def test_execute_prerelease_skipped_when_non_pre_available
|
506
506
|
spec_fetcher do |fetcher|
|
507
|
-
fetcher.gem
|
508
|
-
fetcher.gem
|
507
|
+
fetcher.gem "a", "2.pre"
|
508
|
+
fetcher.gem "a", 2
|
509
509
|
end
|
510
510
|
|
511
511
|
@cmd.options[:prerelease] = true
|
@@ -525,15 +525,15 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
525
525
|
|
526
526
|
local = Gem::Platform.local
|
527
527
|
spec_fetcher do |fetcher|
|
528
|
-
fetcher.download
|
529
|
-
fetcher.download
|
528
|
+
fetcher.download "a", 2
|
529
|
+
fetcher.download "a", 2 do |s|
|
530
530
|
s.required_ruby_version = "< #{RUBY_VERSION}.a"
|
531
531
|
s.platform = local
|
532
532
|
end
|
533
|
-
fetcher.download
|
533
|
+
fetcher.download "a", 3 do |s|
|
534
534
|
s.required_ruby_version = ">= #{next_ruby}"
|
535
535
|
end
|
536
|
-
fetcher.download
|
536
|
+
fetcher.download "a", 3 do |s|
|
537
537
|
s.required_ruby_version = ">= #{next_ruby}"
|
538
538
|
s.platform = local
|
539
539
|
end
|
@@ -553,8 +553,8 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
553
553
|
def test_execute_required_ruby_version_upper_bound
|
554
554
|
local = Gem::Platform.local
|
555
555
|
spec_fetcher do |fetcher|
|
556
|
-
fetcher.gem
|
557
|
-
fetcher.gem
|
556
|
+
fetcher.gem "a", 2.0
|
557
|
+
fetcher.gem "a", 2.0 do |s|
|
558
558
|
s.required_ruby_version = "< #{RUBY_VERSION}.a"
|
559
559
|
s.platform = local
|
560
560
|
end
|
@@ -573,8 +573,8 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
573
573
|
|
574
574
|
def test_execute_required_ruby_version_specific_not_met
|
575
575
|
spec_fetcher do |fetcher|
|
576
|
-
fetcher.gem
|
577
|
-
s.required_ruby_version =
|
576
|
+
fetcher.gem "a", "1.0" do |s|
|
577
|
+
s.required_ruby_version = "= 1.4.6"
|
578
578
|
end
|
579
579
|
end
|
580
580
|
|
@@ -593,8 +593,8 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
593
593
|
|
594
594
|
def test_execute_required_ruby_version_specific_prerelease_met
|
595
595
|
spec_fetcher do |fetcher|
|
596
|
-
fetcher.gem
|
597
|
-
s.required_ruby_version =
|
596
|
+
fetcher.gem "a", "1.0" do |s|
|
597
|
+
s.required_ruby_version = ">= 1.4.6.preview2"
|
598
598
|
end
|
599
599
|
end
|
600
600
|
|
@@ -613,7 +613,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
613
613
|
next_ruby_pre = Gem.ruby_version.segments.map.with_index {|n, i| i == 1 ? n + 1 : n }.join(".") + ".a"
|
614
614
|
|
615
615
|
spec_fetcher do |fetcher|
|
616
|
-
fetcher.gem
|
616
|
+
fetcher.gem "a", "1.0" do |s|
|
617
617
|
s.required_ruby_version = "> #{next_ruby_pre}"
|
618
618
|
end
|
619
619
|
end
|
@@ -633,8 +633,8 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
633
633
|
|
634
634
|
def test_execute_required_rubygems_version_wrong
|
635
635
|
spec_fetcher do |fetcher|
|
636
|
-
fetcher.gem
|
637
|
-
s.required_rubygems_version =
|
636
|
+
fetcher.gem "a", "1.0" do |s|
|
637
|
+
s.required_rubygems_version = "< 0"
|
638
638
|
end
|
639
639
|
end
|
640
640
|
|
@@ -653,7 +653,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
653
653
|
|
654
654
|
def test_execute_rdoc
|
655
655
|
specs = spec_fetcher do |fetcher|
|
656
|
-
fetcher.gem
|
656
|
+
fetcher.gem "a", 2
|
657
657
|
end
|
658
658
|
|
659
659
|
Gem.done_installing(&Gem::RDoc.method(:generation_hook))
|
@@ -661,7 +661,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
661
661
|
@cmd.options[:document] = %w[rdoc ri]
|
662
662
|
@cmd.options[:domain] = :local
|
663
663
|
|
664
|
-
a2 = specs[
|
664
|
+
a2 = specs["a-2"]
|
665
665
|
FileUtils.mv a2.cache_file, @tempdir
|
666
666
|
|
667
667
|
@cmd.options[:args] = %w[a]
|
@@ -683,22 +683,22 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
683
683
|
|
684
684
|
wait_for_child_process_to_exit
|
685
685
|
|
686
|
-
assert_path_exist File.join(a2.doc_dir,
|
687
|
-
assert_path_exist File.join(a2.doc_dir,
|
686
|
+
assert_path_exist File.join(a2.doc_dir, "ri")
|
687
|
+
assert_path_exist File.join(a2.doc_dir, "rdoc")
|
688
688
|
end
|
689
689
|
|
690
690
|
def test_execute_rdoc_with_path
|
691
691
|
specs = spec_fetcher do |fetcher|
|
692
|
-
fetcher.gem
|
692
|
+
fetcher.gem "a", 2
|
693
693
|
end
|
694
694
|
|
695
695
|
Gem.done_installing(&Gem::RDoc.method(:generation_hook))
|
696
696
|
|
697
697
|
@cmd.options[:document] = %w[rdoc ri]
|
698
698
|
@cmd.options[:domain] = :local
|
699
|
-
@cmd.options[:install_dir] =
|
699
|
+
@cmd.options[:install_dir] = "whatever"
|
700
700
|
|
701
|
-
a2 = specs[
|
701
|
+
a2 = specs["a-2"]
|
702
702
|
FileUtils.mv a2.cache_file, @tempdir
|
703
703
|
|
704
704
|
@cmd.options[:args] = %w[a]
|
@@ -720,19 +720,19 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
720
720
|
|
721
721
|
wait_for_child_process_to_exit
|
722
722
|
|
723
|
-
assert_path_exist
|
723
|
+
assert_path_exist "whatever/doc/a-2", "documentation not installed"
|
724
724
|
end
|
725
725
|
|
726
726
|
def test_execute_saves_build_args
|
727
727
|
specs = spec_fetcher do |fetcher|
|
728
|
-
fetcher.gem
|
728
|
+
fetcher.gem "a", 2
|
729
729
|
end
|
730
730
|
|
731
731
|
args = %w[--with-awesome=true --more-awesome=yes]
|
732
732
|
|
733
733
|
Gem::Command.build_args = args
|
734
734
|
|
735
|
-
a2 = specs[
|
735
|
+
a2 = specs["a-2"]
|
736
736
|
FileUtils.mv a2.cache_file, @tempdir
|
737
737
|
|
738
738
|
@cmd.options[:domain] = :local
|
@@ -762,7 +762,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
762
762
|
|
763
763
|
def test_execute_remote
|
764
764
|
spec_fetcher do |fetcher|
|
765
|
-
fetcher.gem
|
765
|
+
fetcher.gem "a", 2
|
766
766
|
end
|
767
767
|
|
768
768
|
@cmd.options[:args] = %w[a]
|
@@ -782,7 +782,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
782
782
|
FileUtils.touch("a.gem")
|
783
783
|
|
784
784
|
spec_fetcher do |fetcher|
|
785
|
-
fetcher.gem
|
785
|
+
fetcher.gem "a", 2
|
786
786
|
end
|
787
787
|
|
788
788
|
@cmd.options[:args] = %w[a]
|
@@ -800,7 +800,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
800
800
|
|
801
801
|
def test_execute_remote_truncates_existing_gemspecs
|
802
802
|
spec_fetcher do |fetcher|
|
803
|
-
fetcher.gem
|
803
|
+
fetcher.gem "a", 1
|
804
804
|
end
|
805
805
|
|
806
806
|
@cmd.options[:domain] = :remote
|
@@ -816,7 +816,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
816
816
|
assert_equal %w[a-1], @cmd.installed_specs.map {|spec| spec.full_name }
|
817
817
|
assert_match "1 gem installed", @ui.output
|
818
818
|
|
819
|
-
a1_gemspec = File.join(@gemhome,
|
819
|
+
a1_gemspec = File.join(@gemhome, "specifications", "a-1.gemspec")
|
820
820
|
|
821
821
|
initial_a1_gemspec_content = File.read(a1_gemspec)
|
822
822
|
modified_a1_gemspec_content = initial_a1_gemspec_content + "\n # AAAAAAA\n"
|
@@ -833,14 +833,14 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
833
833
|
|
834
834
|
def test_execute_remote_ignores_files
|
835
835
|
specs = spec_fetcher do |fetcher|
|
836
|
-
fetcher.gem
|
837
|
-
fetcher.gem
|
836
|
+
fetcher.gem "a", 1
|
837
|
+
fetcher.gem "a", 2
|
838
838
|
end
|
839
839
|
|
840
840
|
@cmd.options[:domain] = :remote
|
841
841
|
|
842
|
-
a1 = specs[
|
843
|
-
a2 = specs[
|
842
|
+
a1 = specs["a-1"]
|
843
|
+
a2 = specs["a-2"]
|
844
844
|
|
845
845
|
FileUtils.mv a2.cache_file, @tempdir
|
846
846
|
|
@@ -849,7 +849,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
849
849
|
|
850
850
|
@cmd.options[:args] = [a2.name]
|
851
851
|
|
852
|
-
gemdir = File.join @gemhome,
|
852
|
+
gemdir = File.join @gemhome, "specifications"
|
853
853
|
|
854
854
|
a2_gemspec = File.join(gemdir, "a-2.gemspec")
|
855
855
|
a1_gemspec = File.join(gemdir, "a-1.gemspec")
|
@@ -878,12 +878,12 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
878
878
|
|
879
879
|
def test_execute_two
|
880
880
|
specs = spec_fetcher do |fetcher|
|
881
|
-
fetcher.gem
|
882
|
-
fetcher.gem
|
881
|
+
fetcher.gem "a", 2
|
882
|
+
fetcher.gem "b", 2
|
883
883
|
end
|
884
884
|
|
885
|
-
FileUtils.mv specs[
|
886
|
-
FileUtils.mv specs[
|
885
|
+
FileUtils.mv specs["a-2"].cache_file, @tempdir
|
886
|
+
FileUtils.mv specs["b-2"].cache_file, @tempdir
|
887
887
|
|
888
888
|
@cmd.options[:domain] = :local
|
889
889
|
|
@@ -929,10 +929,10 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
929
929
|
|
930
930
|
def test_execute_two_version_specified_by_colon
|
931
931
|
spec_fetcher do |fetcher|
|
932
|
-
fetcher.gem
|
933
|
-
fetcher.gem
|
934
|
-
fetcher.gem
|
935
|
-
fetcher.gem
|
932
|
+
fetcher.gem "a", 1
|
933
|
+
fetcher.gem "a", 2
|
934
|
+
fetcher.gem "b", 1
|
935
|
+
fetcher.gem "b", 2
|
936
936
|
end
|
937
937
|
|
938
938
|
@cmd.options[:args] = %w[a:1 b:1]
|
@@ -948,9 +948,9 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
948
948
|
|
949
949
|
def test_execute_conservative
|
950
950
|
spec_fetcher do |fetcher|
|
951
|
-
fetcher.download
|
951
|
+
fetcher.download "b", 2
|
952
952
|
|
953
|
-
fetcher.gem
|
953
|
+
fetcher.gem "a", 2
|
954
954
|
end
|
955
955
|
|
956
956
|
@cmd.options[:conservative] = true
|
@@ -981,7 +981,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
981
981
|
done_installing = true
|
982
982
|
end
|
983
983
|
|
984
|
-
spec = util_spec
|
984
|
+
spec = util_spec "a", 2
|
985
985
|
|
986
986
|
util_build_gem spec
|
987
987
|
|
@@ -989,21 +989,21 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
989
989
|
|
990
990
|
@cmd.options[:ignore_dependencies] = true
|
991
991
|
|
992
|
-
@cmd.install_gem
|
992
|
+
@cmd.install_gem "a", ">= 0"
|
993
993
|
|
994
994
|
assert_equal %w[a-2], @cmd.installed_specs.map {|s| s.full_name }
|
995
995
|
|
996
|
-
assert done_installing,
|
996
|
+
assert done_installing, "documentation was not generated"
|
997
997
|
end
|
998
998
|
|
999
999
|
def test_install_gem_ignore_dependencies_remote
|
1000
1000
|
spec_fetcher do |fetcher|
|
1001
|
-
fetcher.gem
|
1001
|
+
fetcher.gem "a", 2
|
1002
1002
|
end
|
1003
1003
|
|
1004
1004
|
@cmd.options[:ignore_dependencies] = true
|
1005
1005
|
|
1006
|
-
@cmd.install_gem
|
1006
|
+
@cmd.install_gem "a", ">= 0"
|
1007
1007
|
|
1008
1008
|
assert_equal %w[a-2], @cmd.installed_specs.map {|spec| spec.full_name }
|
1009
1009
|
end
|
@@ -1011,22 +1011,22 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
1011
1011
|
def test_install_gem_ignore_dependencies_remote_platform_local
|
1012
1012
|
local = Gem::Platform.local
|
1013
1013
|
spec_fetcher do |fetcher|
|
1014
|
-
fetcher.gem
|
1014
|
+
fetcher.gem "a", 3
|
1015
1015
|
|
1016
|
-
fetcher.gem
|
1016
|
+
fetcher.gem "a", 3 do |s|
|
1017
1017
|
s.platform = local
|
1018
1018
|
end
|
1019
1019
|
end
|
1020
1020
|
|
1021
1021
|
@cmd.options[:ignore_dependencies] = true
|
1022
1022
|
|
1023
|
-
@cmd.install_gem
|
1023
|
+
@cmd.install_gem "a", ">= 0"
|
1024
1024
|
|
1025
1025
|
assert_equal %W[a-3-#{local}], @cmd.installed_specs.map {|spec| spec.full_name }
|
1026
1026
|
end
|
1027
1027
|
|
1028
1028
|
def test_install_gem_ignore_dependencies_specific_file
|
1029
|
-
spec = util_spec
|
1029
|
+
spec = util_spec "a", 2
|
1030
1030
|
|
1031
1031
|
util_build_gem spec
|
1032
1032
|
|
@@ -1041,8 +1041,8 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
1041
1041
|
|
1042
1042
|
def test_parses_requirement_from_gemname
|
1043
1043
|
spec_fetcher do |fetcher|
|
1044
|
-
fetcher.gem
|
1045
|
-
fetcher.gem
|
1044
|
+
fetcher.gem "a", 2
|
1045
|
+
fetcher.gem "b", 2
|
1046
1046
|
end
|
1047
1047
|
|
1048
1048
|
@cmd.options[:domain] = :local
|
@@ -1088,12 +1088,12 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
1088
1088
|
|
1089
1089
|
assert_equal 2, e.exit_code
|
1090
1090
|
|
1091
|
-
assert_match
|
1091
|
+
assert_match "Unable to download data", @ui.error
|
1092
1092
|
end
|
1093
1093
|
|
1094
1094
|
def test_show_source_problems_even_on_success
|
1095
1095
|
spec_fetcher do |fetcher|
|
1096
|
-
fetcher.download
|
1096
|
+
fetcher.download "a", 2
|
1097
1097
|
end
|
1098
1098
|
|
1099
1099
|
Gem.sources << "http://nonexistent.example"
|
@@ -1118,7 +1118,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
1118
1118
|
|
1119
1119
|
def test_redact_credentials_from_uri_on_warning
|
1120
1120
|
spec_fetcher do |fetcher|
|
1121
|
-
fetcher.download
|
1121
|
+
fetcher.download "a", 2
|
1122
1122
|
end
|
1123
1123
|
|
1124
1124
|
Gem.sources << "http://username:SECURE_TOKEN@nonexistent.example"
|
@@ -1143,7 +1143,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
1143
1143
|
|
1144
1144
|
def test_execute_uses_from_a_gemdeps
|
1145
1145
|
spec_fetcher do |fetcher|
|
1146
|
-
fetcher.gem
|
1146
|
+
fetcher.gem "a", 2
|
1147
1147
|
end
|
1148
1148
|
|
1149
1149
|
File.open @gemdeps, "w" do |f|
|
@@ -1166,7 +1166,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
1166
1166
|
|
1167
1167
|
def test_execute_uses_from_a_gemdeps_with_no_lock
|
1168
1168
|
spec_fetcher do |fetcher|
|
1169
|
-
fetcher.gem
|
1169
|
+
fetcher.gem "a", 2
|
1170
1170
|
end
|
1171
1171
|
|
1172
1172
|
File.open @gemdeps, "w" do |f|
|
@@ -1190,8 +1190,8 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
1190
1190
|
|
1191
1191
|
def test_execute_installs_from_a_gemdeps_with_conservative
|
1192
1192
|
spec_fetcher do |fetcher|
|
1193
|
-
fetcher.download
|
1194
|
-
fetcher.gem
|
1193
|
+
fetcher.download "a", 2
|
1194
|
+
fetcher.gem "a", 1
|
1195
1195
|
end
|
1196
1196
|
|
1197
1197
|
File.open @gemdeps, "w" do |f|
|
@@ -1214,7 +1214,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
1214
1214
|
|
1215
1215
|
def test_execute_installs_from_a_gemdeps
|
1216
1216
|
spec_fetcher do |fetcher|
|
1217
|
-
fetcher.download
|
1217
|
+
fetcher.download "a", 2
|
1218
1218
|
end
|
1219
1219
|
|
1220
1220
|
File.open @gemdeps, "w" do |f|
|
@@ -1236,8 +1236,8 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
1236
1236
|
|
1237
1237
|
def test_execute_installs_deps_a_gemdeps
|
1238
1238
|
spec_fetcher do |fetcher|
|
1239
|
-
fetcher.download
|
1240
|
-
fetcher.download
|
1239
|
+
fetcher.download "q", "1.0"
|
1240
|
+
fetcher.download "r", "2.0", "q" => nil
|
1241
1241
|
end
|
1242
1242
|
|
1243
1243
|
File.open @gemdeps, "w" do |f|
|
@@ -1262,9 +1262,9 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
1262
1262
|
|
1263
1263
|
def test_execute_uses_deps_a_gemdeps
|
1264
1264
|
spec_fetcher do |fetcher|
|
1265
|
-
fetcher.download
|
1265
|
+
fetcher.download "r", "2.0", "q" => nil
|
1266
1266
|
|
1267
|
-
fetcher.spec
|
1267
|
+
fetcher.spec "q", "1.0"
|
1268
1268
|
end
|
1269
1269
|
|
1270
1270
|
File.open @gemdeps, "w" do |f|
|
@@ -1289,8 +1289,8 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
1289
1289
|
|
1290
1290
|
def test_execute_installs_deps_a_gemdeps_into_a_path
|
1291
1291
|
spec_fetcher do |fetcher|
|
1292
|
-
fetcher.download
|
1293
|
-
fetcher.download
|
1292
|
+
fetcher.download "q", "1.0"
|
1293
|
+
fetcher.download "r", "2.0", "q" => nil
|
1294
1294
|
end
|
1295
1295
|
|
1296
1296
|
File.open @gemdeps, "w" do |f|
|
@@ -1319,11 +1319,11 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
1319
1319
|
|
1320
1320
|
def test_execute_with_gemdeps_path_ignores_system
|
1321
1321
|
specs = spec_fetcher do |fetcher|
|
1322
|
-
fetcher.download
|
1323
|
-
fetcher.download
|
1322
|
+
fetcher.download "q", "1.0"
|
1323
|
+
fetcher.download "r", "2.0", "q" => nil
|
1324
1324
|
end
|
1325
1325
|
|
1326
|
-
install_specs specs[
|
1326
|
+
install_specs specs["q-1.0"]
|
1327
1327
|
|
1328
1328
|
File.open @gemdeps, "w" do |f|
|
1329
1329
|
f << "gem 'r'"
|
@@ -1351,11 +1351,11 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
1351
1351
|
|
1352
1352
|
def test_execute_uses_deps_a_gemdeps_with_a_path
|
1353
1353
|
specs = spec_fetcher do |fetcher|
|
1354
|
-
fetcher.gem
|
1355
|
-
fetcher.gem
|
1354
|
+
fetcher.gem "q", "1.0"
|
1355
|
+
fetcher.gem "r", "2.0", "q" => nil
|
1356
1356
|
end
|
1357
1357
|
|
1358
|
-
i = Gem::Installer.at specs[
|
1358
|
+
i = Gem::Installer.at specs["q-1.0"].cache_file, :install_dir => "gf-path"
|
1359
1359
|
i.install
|
1360
1360
|
|
1361
1361
|
assert File.file?("gf-path/specifications/q-1.0.gemspec"), "not installed"
|
@@ -1382,39 +1382,39 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
1382
1382
|
end
|
1383
1383
|
|
1384
1384
|
def test_handle_options_file
|
1385
|
-
FileUtils.touch
|
1385
|
+
FileUtils.touch "Gemfile"
|
1386
1386
|
|
1387
1387
|
@cmd.handle_options %w[-g Gemfile]
|
1388
1388
|
|
1389
|
-
assert_equal
|
1389
|
+
assert_equal "Gemfile", @cmd.options[:gemdeps]
|
1390
1390
|
|
1391
|
-
FileUtils.rm
|
1391
|
+
FileUtils.rm "Gemfile"
|
1392
1392
|
|
1393
|
-
FileUtils.touch
|
1393
|
+
FileUtils.touch "gem.deps.rb"
|
1394
1394
|
|
1395
1395
|
@cmd.handle_options %w[--file gem.deps.rb]
|
1396
1396
|
|
1397
|
-
assert_equal
|
1397
|
+
assert_equal "gem.deps.rb", @cmd.options[:gemdeps]
|
1398
1398
|
|
1399
|
-
FileUtils.rm
|
1399
|
+
FileUtils.rm "gem.deps.rb"
|
1400
1400
|
|
1401
|
-
FileUtils.touch
|
1401
|
+
FileUtils.touch "Isolate"
|
1402
1402
|
|
1403
1403
|
@cmd.handle_options %w[-g]
|
1404
1404
|
|
1405
|
-
assert_equal
|
1405
|
+
assert_equal "Isolate", @cmd.options[:gemdeps]
|
1406
1406
|
|
1407
|
-
FileUtils.touch
|
1407
|
+
FileUtils.touch "Gemfile"
|
1408
1408
|
|
1409
1409
|
@cmd.handle_options %w[-g]
|
1410
1410
|
|
1411
|
-
assert_equal
|
1411
|
+
assert_equal "Gemfile", @cmd.options[:gemdeps]
|
1412
1412
|
|
1413
|
-
FileUtils.touch
|
1413
|
+
FileUtils.touch "gem.deps.rb"
|
1414
1414
|
|
1415
1415
|
@cmd.handle_options %w[-g]
|
1416
1416
|
|
1417
|
-
assert_equal
|
1417
|
+
assert_equal "gem.deps.rb", @cmd.options[:gemdeps]
|
1418
1418
|
end
|
1419
1419
|
|
1420
1420
|
def test_handle_options_suggest
|
@@ -1442,9 +1442,9 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
1442
1442
|
def test_explain_platform_local
|
1443
1443
|
local = Gem::Platform.local
|
1444
1444
|
spec_fetcher do |fetcher|
|
1445
|
-
fetcher.spec
|
1445
|
+
fetcher.spec "a", 2
|
1446
1446
|
|
1447
|
-
fetcher.spec
|
1447
|
+
fetcher.spec "a", 2 do |s|
|
1448
1448
|
s.platform = local
|
1449
1449
|
end
|
1450
1450
|
end
|
@@ -1468,9 +1468,9 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
1468
1468
|
def test_explain_platform_local_ignore_dependencies
|
1469
1469
|
local = Gem::Platform.local
|
1470
1470
|
spec_fetcher do |fetcher|
|
1471
|
-
fetcher.spec
|
1471
|
+
fetcher.spec "a", 3
|
1472
1472
|
|
1473
|
-
fetcher.spec
|
1473
|
+
fetcher.spec "a", 3 do |s|
|
1474
1474
|
s.platform = local
|
1475
1475
|
end
|
1476
1476
|
end
|
@@ -1495,9 +1495,9 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
1495
1495
|
def test_explain_platform_ruby
|
1496
1496
|
local = Gem::Platform.local
|
1497
1497
|
spec_fetcher do |fetcher|
|
1498
|
-
fetcher.spec
|
1498
|
+
fetcher.spec "a", 2
|
1499
1499
|
|
1500
|
-
fetcher.spec
|
1500
|
+
fetcher.spec "a", 2 do |s|
|
1501
1501
|
s.platform = local
|
1502
1502
|
end
|
1503
1503
|
end
|
@@ -1524,9 +1524,9 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
1524
1524
|
def test_explain_platform_ruby_ignore_dependencies
|
1525
1525
|
local = Gem::Platform.local
|
1526
1526
|
spec_fetcher do |fetcher|
|
1527
|
-
fetcher.spec
|
1527
|
+
fetcher.spec "a", 3
|
1528
1528
|
|
1529
|
-
fetcher.spec
|
1529
|
+
fetcher.spec "a", 3 do |s|
|
1530
1530
|
s.platform = local
|
1531
1531
|
end
|
1532
1532
|
end
|