rubygems-update 3.4.17 → 3.4.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/Manifest.txt +7 -4
- data/POLICIES.md +2 -2
- data/bundler/CHANGELOG.md +30 -0
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli/binstubs.rb +1 -1
- data/bundler/lib/bundler/cli/info.rb +1 -1
- data/bundler/lib/bundler/cli/install.rb +1 -1
- data/bundler/lib/bundler/cli/outdated.rb +1 -1
- data/bundler/lib/bundler/cli/platform.rb +7 -5
- data/bundler/lib/bundler/definition.rb +25 -20
- data/bundler/lib/bundler/dsl.rb +1 -1
- data/bundler/lib/bundler/env.rb +1 -1
- data/bundler/lib/bundler/fetcher/compact_index.rb +3 -3
- data/bundler/lib/bundler/fetcher/downloader.rb +2 -0
- data/bundler/lib/bundler/fetcher/index.rb +1 -2
- data/bundler/lib/bundler/fetcher.rb +11 -1
- data/bundler/lib/bundler/friendly_errors.rb +1 -1
- data/bundler/lib/bundler/gem_helper.rb +3 -4
- data/bundler/lib/bundler/installer/parallel_installer.rb +1 -1
- data/bundler/lib/bundler/man/bundle-add.1 +1 -1
- data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
- data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
- data/bundler/lib/bundler/man/bundle-check.1 +1 -1
- data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
- data/bundler/lib/bundler/man/bundle-config.1 +1 -1
- data/bundler/lib/bundler/man/bundle-console.1 +1 -1
- data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
- data/bundler/lib/bundler/man/bundle-exec.1 +1 -1
- data/bundler/lib/bundler/man/bundle-gem.1 +1 -1
- data/bundler/lib/bundler/man/bundle-help.1 +1 -1
- data/bundler/lib/bundler/man/bundle-info.1 +3 -3
- data/bundler/lib/bundler/man/bundle-info.1.ronn +3 -3
- data/bundler/lib/bundler/man/bundle-init.1 +1 -1
- data/bundler/lib/bundler/man/bundle-inject.1 +1 -1
- data/bundler/lib/bundler/man/bundle-install.1 +1 -1
- data/bundler/lib/bundler/man/bundle-list.1 +1 -1
- data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
- data/bundler/lib/bundler/man/bundle-open.1 +1 -1
- data/bundler/lib/bundler/man/bundle-outdated.1 +13 -9
- data/bundler/lib/bundler/man/bundle-outdated.1.ronn +12 -9
- data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
- data/bundler/lib/bundler/man/bundle-plugin.1 +1 -1
- data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
- data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
- data/bundler/lib/bundler/man/bundle-show.1 +1 -1
- data/bundler/lib/bundler/man/bundle-update.1 +1 -1
- data/bundler/lib/bundler/man/bundle-version.1 +1 -1
- data/bundler/lib/bundler/man/bundle-viz.1 +1 -1
- data/bundler/lib/bundler/man/bundle.1 +1 -1
- data/bundler/lib/bundler/man/gemfile.5 +14 -1
- data/bundler/lib/bundler/man/gemfile.5.ronn +5 -0
- data/bundler/lib/bundler/plugin/index.rb +1 -1
- data/bundler/lib/bundler/ruby_dsl.rb +6 -0
- data/bundler/lib/bundler/ruby_version.rb +2 -2
- data/bundler/lib/bundler/rubygems_integration.rb +1 -1
- data/bundler/lib/bundler/source/git.rb +7 -0
- data/bundler/lib/bundler/source_list.rb +0 -4
- data/bundler/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +1 -1
- data/bundler/lib/bundler/templates/newgem/ext/newgem/src/lib.rs.tt +4 -4
- data/bundler/lib/bundler/ui/rg_proxy.rb +1 -1
- data/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb +1 -1
- data/bundler/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +2 -2
- data/bundler/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +1 -1
- data/bundler/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
- data/bundler/lib/bundler/version.rb +1 -1
- data/bundler/lib/bundler.rb +1 -1
- data/{bin → exe}/gem +2 -0
- data/{bin → exe}/update_rubygems +7 -5
- data/lib/rubygems/available_set.rb +1 -0
- data/lib/rubygems/basic_specification.rb +1 -0
- data/lib/rubygems/bundler_version_finder.rb +1 -1
- data/lib/rubygems/command.rb +1 -0
- data/lib/rubygems/command_manager.rb +1 -0
- data/lib/rubygems/commands/build_command.rb +1 -0
- data/lib/rubygems/commands/cert_command.rb +1 -0
- data/lib/rubygems/commands/check_command.rb +1 -0
- data/lib/rubygems/commands/cleanup_command.rb +1 -0
- data/lib/rubygems/commands/contents_command.rb +1 -0
- data/lib/rubygems/commands/dependency_command.rb +1 -0
- data/lib/rubygems/commands/environment_command.rb +1 -0
- data/lib/rubygems/commands/exec_command.rb +1 -0
- data/lib/rubygems/commands/fetch_command.rb +1 -0
- data/lib/rubygems/commands/generate_index_command.rb +1 -0
- data/lib/rubygems/commands/help_command.rb +1 -0
- data/lib/rubygems/commands/install_command.rb +1 -0
- data/lib/rubygems/commands/list_command.rb +1 -0
- data/lib/rubygems/commands/lock_command.rb +1 -0
- data/lib/rubygems/commands/mirror_command.rb +1 -0
- data/lib/rubygems/commands/open_command.rb +1 -0
- data/lib/rubygems/commands/outdated_command.rb +1 -0
- data/lib/rubygems/commands/owner_command.rb +1 -0
- data/lib/rubygems/commands/pristine_command.rb +1 -0
- data/lib/rubygems/commands/push_command.rb +1 -0
- data/lib/rubygems/commands/query_command.rb +1 -0
- data/lib/rubygems/commands/rdoc_command.rb +1 -0
- data/lib/rubygems/commands/search_command.rb +1 -0
- data/lib/rubygems/commands/server_command.rb +1 -0
- data/lib/rubygems/commands/setup_command.rb +2 -1
- data/lib/rubygems/commands/signin_command.rb +1 -0
- data/lib/rubygems/commands/signout_command.rb +1 -0
- data/lib/rubygems/commands/sources_command.rb +1 -0
- data/lib/rubygems/commands/specification_command.rb +1 -0
- data/lib/rubygems/commands/stale_command.rb +1 -0
- data/lib/rubygems/commands/uninstall_command.rb +1 -0
- data/lib/rubygems/commands/unpack_command.rb +1 -0
- data/lib/rubygems/commands/update_command.rb +1 -0
- data/lib/rubygems/commands/which_command.rb +1 -0
- data/lib/rubygems/commands/yank_command.rb +1 -0
- data/lib/rubygems/config_file.rb +1 -0
- data/lib/rubygems/core_ext/kernel_require.rb +1 -0
- data/lib/rubygems/core_ext/tcpsocket_init.rb +2 -0
- data/lib/rubygems/defaults.rb +1 -0
- data/lib/rubygems/dependency.rb +1 -0
- data/lib/rubygems/dependency_installer.rb +1 -0
- data/lib/rubygems/dependency_list.rb +1 -0
- data/lib/rubygems/deprecate.rb +1 -0
- data/lib/rubygems/doctor.rb +1 -0
- data/lib/rubygems/errors.rb +1 -0
- data/lib/rubygems/ext/build_error.rb +1 -0
- data/lib/rubygems/ext/builder.rb +1 -0
- data/lib/rubygems/ext/configure_builder.rb +1 -0
- data/lib/rubygems/ext/ext_conf_builder.rb +1 -0
- data/lib/rubygems/ext.rb +1 -0
- data/lib/rubygems/gem_runner.rb +1 -0
- data/lib/rubygems/gemcutter_utilities/webauthn_listener/response.rb +163 -0
- data/lib/rubygems/gemcutter_utilities/webauthn_listener.rb +105 -0
- data/lib/rubygems/gemcutter_utilities/webauthn_poller.rb +78 -0
- data/lib/rubygems/gemcutter_utilities.rb +30 -26
- data/lib/rubygems/indexer.rb +1 -0
- data/lib/rubygems/install_default_message.rb +1 -0
- data/lib/rubygems/install_message.rb +1 -0
- data/lib/rubygems/install_update_options.rb +1 -0
- data/lib/rubygems/installer.rb +1 -0
- data/lib/rubygems/local_remote_options.rb +1 -0
- data/lib/rubygems/mock_gem_ui.rb +1 -0
- data/lib/rubygems/name_tuple.rb +1 -0
- data/lib/rubygems/package/digest_io.rb +1 -0
- data/lib/rubygems/package/file_source.rb +1 -0
- data/lib/rubygems/package/io_source.rb +1 -0
- data/lib/rubygems/package/old.rb +1 -0
- data/lib/rubygems/package/source.rb +1 -0
- data/lib/rubygems/package/tar_header.rb +1 -0
- data/lib/rubygems/package/tar_reader/entry.rb +1 -0
- data/lib/rubygems/package/tar_reader.rb +1 -0
- data/lib/rubygems/package/tar_writer.rb +1 -0
- data/lib/rubygems/package.rb +2 -2
- data/lib/rubygems/package_task.rb +1 -0
- data/lib/rubygems/path_support.rb +1 -0
- data/lib/rubygems/platform.rb +1 -0
- data/lib/rubygems/psych_tree.rb +1 -0
- data/lib/rubygems/rdoc.rb +1 -0
- data/lib/rubygems/remote_fetcher.rb +1 -0
- data/lib/rubygems/request/http_pool.rb +1 -0
- data/lib/rubygems/request/https_pool.rb +1 -0
- data/lib/rubygems/request.rb +1 -0
- data/lib/rubygems/request_set/gem_dependency_api.rb +1 -0
- data/lib/rubygems/request_set/lockfile/parser.rb +2 -1
- data/lib/rubygems/request_set/lockfile/tokenizer.rb +2 -0
- data/lib/rubygems/request_set/lockfile.rb +1 -0
- data/lib/rubygems/request_set.rb +1 -0
- data/lib/rubygems/requirement.rb +1 -0
- data/lib/rubygems/resolver/activation_request.rb +1 -0
- data/lib/rubygems/resolver/api_set.rb +1 -0
- data/lib/rubygems/resolver/api_specification.rb +1 -0
- data/lib/rubygems/resolver/best_set.rb +1 -0
- data/lib/rubygems/resolver/composed_set.rb +1 -0
- data/lib/rubygems/resolver/conflict.rb +1 -0
- data/lib/rubygems/resolver/current_set.rb +1 -0
- data/lib/rubygems/resolver/dependency_request.rb +1 -0
- data/lib/rubygems/resolver/git_set.rb +1 -0
- data/lib/rubygems/resolver/git_specification.rb +1 -0
- data/lib/rubygems/resolver/index_set.rb +1 -0
- data/lib/rubygems/resolver/index_specification.rb +1 -0
- data/lib/rubygems/resolver/installed_specification.rb +1 -0
- data/lib/rubygems/resolver/installer_set.rb +1 -0
- data/lib/rubygems/resolver/local_specification.rb +1 -0
- data/lib/rubygems/resolver/lock_set.rb +1 -0
- data/lib/rubygems/resolver/lock_specification.rb +1 -0
- data/lib/rubygems/resolver/molinillo.rb +1 -0
- data/lib/rubygems/resolver/requirement_list.rb +1 -0
- data/lib/rubygems/resolver/set.rb +1 -0
- data/lib/rubygems/resolver/source_set.rb +2 -0
- data/lib/rubygems/resolver/spec_specification.rb +1 -0
- data/lib/rubygems/resolver/specification.rb +1 -0
- data/lib/rubygems/resolver/stats.rb +1 -0
- data/lib/rubygems/resolver/vendor_set.rb +1 -0
- data/lib/rubygems/resolver/vendor_specification.rb +1 -0
- data/lib/rubygems/resolver.rb +1 -0
- data/lib/rubygems/s3_uri_signer.rb +4 -2
- data/lib/rubygems/safe_yaml.rb +2 -0
- data/lib/rubygems/security/policies.rb +1 -0
- data/lib/rubygems/security/policy.rb +1 -0
- data/lib/rubygems/security/signer.rb +1 -0
- data/lib/rubygems/security/trust_dir.rb +1 -0
- data/lib/rubygems/security.rb +1 -0
- data/lib/rubygems/security_option.rb +1 -0
- data/lib/rubygems/source/installed.rb +1 -0
- data/lib/rubygems/source/local.rb +1 -0
- data/lib/rubygems/source/lock.rb +1 -0
- data/lib/rubygems/source/specific_file.rb +1 -0
- data/lib/rubygems/source/vendor.rb +1 -0
- data/lib/rubygems/spec_fetcher.rb +1 -0
- data/lib/rubygems/specification.rb +11 -3
- data/lib/rubygems/specification_policy.rb +2 -0
- data/lib/rubygems/stub_specification.rb +1 -0
- data/lib/rubygems/uninstaller.rb +1 -0
- data/lib/rubygems/user_interaction.rb +4 -2
- data/lib/rubygems/util/licenses.rb +1 -0
- data/lib/rubygems/util/list.rb +1 -0
- data/lib/rubygems/util.rb +1 -0
- data/lib/rubygems/validator.rb +1 -0
- data/lib/rubygems/version_option.rb +1 -0
- data/lib/rubygems.rb +3 -3
- data/rubygems-update.gemspec +5 -4
- data/setup.rb +1 -0
- data/test/rubygems/bad_rake.rb +1 -0
- data/test/rubygems/bundler_test_gem.rb +3 -1
- data/test/rubygems/fake_certlib/openssl.rb +1 -0
- data/test/rubygems/good_rake.rb +1 -0
- data/test/rubygems/helper.rb +1 -1
- data/test/rubygems/installer_test_case.rb +1 -0
- data/test/rubygems/multifactor_auth_utilities.rb +111 -0
- data/test/rubygems/package/tar_test_case.rb +1 -0
- data/test/rubygems/plugin/exception/rubygems_plugin.rb +1 -0
- data/test/rubygems/plugin/load/rubygems_plugin.rb +1 -0
- data/test/rubygems/plugin/standarderror/rubygems_plugin.rb +1 -0
- data/test/rubygems/rubygems/commands/crash_command.rb +1 -0
- data/test/rubygems/rubygems_plugin.rb +1 -0
- data/test/rubygems/simple_gem.rb +1 -0
- data/test/rubygems/specifications/bar-0.0.2.gemspec +2 -0
- data/test/rubygems/specifications/rubyforge-0.0.1.gemspec +2 -0
- data/test/rubygems/test_bundled_ca.rb +1 -0
- data/test/rubygems/test_config.rb +1 -0
- data/test/rubygems/test_deprecate.rb +1 -0
- data/test/rubygems/test_gem.rb +1 -0
- data/test/rubygems/test_gem_available_set.rb +1 -0
- data/test/rubygems/test_gem_bundler_version_finder.rb +1 -0
- data/test/rubygems/test_gem_command.rb +1 -0
- data/test/rubygems/test_gem_command_manager.rb +1 -0
- data/test/rubygems/test_gem_commands_build_command.rb +1 -0
- data/test/rubygems/test_gem_commands_cert_command.rb +1 -0
- data/test/rubygems/test_gem_commands_check_command.rb +1 -0
- data/test/rubygems/test_gem_commands_cleanup_command.rb +1 -0
- data/test/rubygems/test_gem_commands_contents_command.rb +1 -0
- data/test/rubygems/test_gem_commands_dependency_command.rb +1 -0
- data/test/rubygems/test_gem_commands_environment_command.rb +1 -0
- data/test/rubygems/test_gem_commands_exec_command.rb +2 -0
- data/test/rubygems/test_gem_commands_fetch_command.rb +1 -0
- data/test/rubygems/test_gem_commands_generate_index_command.rb +1 -0
- data/test/rubygems/test_gem_commands_help_command.rb +1 -0
- data/test/rubygems/test_gem_commands_info_command.rb +1 -0
- data/test/rubygems/test_gem_commands_install_command.rb +1 -0
- data/test/rubygems/test_gem_commands_list_command.rb +1 -0
- data/test/rubygems/test_gem_commands_lock_command.rb +1 -0
- data/test/rubygems/test_gem_commands_mirror.rb +1 -0
- data/test/rubygems/test_gem_commands_open_command.rb +1 -0
- data/test/rubygems/test_gem_commands_outdated_command.rb +1 -0
- data/test/rubygems/test_gem_commands_owner_command.rb +68 -39
- data/test/rubygems/test_gem_commands_pristine_command.rb +1 -0
- data/test/rubygems/test_gem_commands_push_command.rb +68 -37
- data/test/rubygems/test_gem_commands_query_command.rb +1 -0
- data/test/rubygems/test_gem_commands_search_command.rb +1 -0
- data/test/rubygems/test_gem_commands_server_command.rb +1 -0
- data/test/rubygems/test_gem_commands_setup_command.rb +1 -1
- data/test/rubygems/test_gem_commands_signin_command.rb +1 -0
- data/test/rubygems/test_gem_commands_sources_command.rb +1 -0
- data/test/rubygems/test_gem_commands_specification_command.rb +1 -0
- data/test/rubygems/test_gem_commands_stale_command.rb +1 -0
- data/test/rubygems/test_gem_commands_uninstall_command.rb +1 -0
- data/test/rubygems/test_gem_commands_unpack_command.rb +1 -0
- data/test/rubygems/test_gem_commands_update_command.rb +1 -0
- data/test/rubygems/test_gem_commands_which_command.rb +1 -0
- data/test/rubygems/test_gem_commands_yank_command.rb +76 -41
- data/test/rubygems/test_gem_config_file.rb +1 -0
- data/test/rubygems/test_gem_dependency.rb +1 -0
- data/test/rubygems/test_gem_dependency_installer.rb +1 -0
- data/test/rubygems/test_gem_dependency_list.rb +1 -0
- data/test/rubygems/test_gem_dependency_resolution_error.rb +1 -0
- data/test/rubygems/test_gem_doctor.rb +1 -0
- data/test/rubygems/test_gem_ext_builder.rb +4 -3
- data/test/rubygems/test_gem_ext_cargo_builder/custom_name/custom_name.gemspec +2 -0
- data/test/rubygems/test_gem_ext_cargo_builder/custom_name/lib/custom_name.rb +2 -0
- data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/rust_ruby_example.gemspec +2 -0
- data/test/rubygems/test_gem_ext_cargo_builder.rb +2 -2
- data/test/rubygems/test_gem_ext_cargo_builder_link_flag_converter.rb +1 -0
- data/test/rubygems/test_gem_ext_cmake_builder.rb +1 -0
- data/test/rubygems/test_gem_ext_configure_builder.rb +1 -0
- data/test/rubygems/test_gem_ext_rake_builder.rb +1 -0
- data/test/rubygems/test_gem_gem_runner.rb +1 -0
- data/test/rubygems/test_gem_gemcutter_utilities.rb +106 -92
- data/test/rubygems/test_gem_impossible_dependencies_error.rb +1 -0
- data/test/rubygems/test_gem_indexer.rb +1 -0
- data/test/rubygems/test_gem_install_update_options.rb +1 -0
- data/test/rubygems/test_gem_installer.rb +2 -1
- data/test/rubygems/test_gem_local_remote_options.rb +1 -0
- data/test/rubygems/test_gem_name_tuple.rb +1 -0
- data/test/rubygems/test_gem_package_old.rb +1 -0
- data/test/rubygems/test_gem_package_tar_header.rb +1 -0
- data/test/rubygems/test_gem_package_tar_reader.rb +1 -0
- data/test/rubygems/test_gem_package_tar_reader_entry.rb +1 -0
- data/test/rubygems/test_gem_package_tar_writer.rb +1 -0
- data/test/rubygems/test_gem_package_task.rb +1 -0
- data/test/rubygems/test_gem_path_support.rb +1 -0
- data/test/rubygems/test_gem_platform.rb +1 -0
- data/test/rubygems/test_gem_rdoc.rb +1 -0
- data/test/rubygems/test_gem_remote_fetcher.rb +1 -0
- data/test/rubygems/test_gem_request.rb +1 -0
- data/test/rubygems/test_gem_request_connection_pools.rb +1 -0
- data/test/rubygems/test_gem_request_set.rb +1 -0
- data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +1 -0
- data/test/rubygems/test_gem_request_set_lockfile.rb +1 -0
- data/test/rubygems/test_gem_request_set_lockfile_parser.rb +1 -0
- data/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb +1 -0
- data/test/rubygems/test_gem_requirement.rb +1 -0
- data/test/rubygems/test_gem_resolver.rb +1 -0
- data/test/rubygems/test_gem_resolver_activation_request.rb +1 -0
- data/test/rubygems/test_gem_resolver_api_set.rb +1 -0
- data/test/rubygems/test_gem_resolver_api_specification.rb +1 -0
- data/test/rubygems/test_gem_resolver_best_set.rb +1 -0
- data/test/rubygems/test_gem_resolver_composed_set.rb +1 -0
- data/test/rubygems/test_gem_resolver_conflict.rb +1 -0
- data/test/rubygems/test_gem_resolver_dependency_request.rb +1 -0
- data/test/rubygems/test_gem_resolver_git_set.rb +1 -0
- data/test/rubygems/test_gem_resolver_git_specification.rb +2 -1
- data/test/rubygems/test_gem_resolver_index_set.rb +1 -0
- data/test/rubygems/test_gem_resolver_index_specification.rb +1 -0
- data/test/rubygems/test_gem_resolver_installed_specification.rb +1 -0
- data/test/rubygems/test_gem_resolver_installer_set.rb +1 -0
- data/test/rubygems/test_gem_resolver_local_specification.rb +1 -0
- data/test/rubygems/test_gem_resolver_lock_set.rb +1 -0
- data/test/rubygems/test_gem_resolver_lock_specification.rb +1 -0
- data/test/rubygems/test_gem_resolver_requirement_list.rb +1 -0
- data/test/rubygems/test_gem_resolver_specification.rb +1 -0
- data/test/rubygems/test_gem_resolver_vendor_set.rb +1 -0
- data/test/rubygems/test_gem_resolver_vendor_specification.rb +1 -0
- data/test/rubygems/test_gem_security.rb +1 -0
- data/test/rubygems/test_gem_security_signer.rb +1 -0
- data/test/rubygems/test_gem_security_trust_dir.rb +1 -0
- data/test/rubygems/test_gem_silent_ui.rb +1 -0
- data/test/rubygems/test_gem_source.rb +1 -0
- data/test/rubygems/test_gem_source_fetch_problem.rb +1 -0
- data/test/rubygems/test_gem_source_git.rb +1 -0
- data/test/rubygems/test_gem_source_installed.rb +1 -0
- data/test/rubygems/test_gem_source_list.rb +1 -0
- data/test/rubygems/test_gem_source_local.rb +1 -0
- data/test/rubygems/test_gem_source_lock.rb +1 -0
- data/test/rubygems/test_gem_source_specific_file.rb +1 -0
- data/test/rubygems/test_gem_source_subpath_problem.rb +1 -0
- data/test/rubygems/test_gem_source_vendor.rb +1 -0
- data/test/rubygems/test_gem_spec_fetcher.rb +1 -0
- data/test/rubygems/test_gem_specification.rb +9 -0
- data/test/rubygems/test_gem_stream_ui.rb +34 -3
- data/test/rubygems/test_gem_stub_specification.rb +1 -0
- data/test/rubygems/test_gem_text.rb +1 -0
- data/test/rubygems/test_gem_uninstaller.rb +1 -0
- data/test/rubygems/test_gem_unsatisfiable_dependency_error.rb +1 -0
- data/test/rubygems/test_gem_update_suggestion.rb +1 -0
- data/test/rubygems/test_gem_uri.rb +2 -0
- data/test/rubygems/test_gem_uri_formatter.rb +1 -0
- data/test/rubygems/test_gem_util.rb +1 -0
- data/test/rubygems/test_gem_version.rb +1 -0
- data/test/rubygems/test_gem_version_option.rb +1 -0
- data/test/rubygems/test_kernel.rb +1 -0
- data/test/rubygems/test_remote_fetch_error.rb +1 -0
- data/test/rubygems/test_require.rb +1 -0
- data/test/rubygems/test_rubygems.rb +2 -0
- data/test/rubygems/test_webauthn_listener.rb +29 -6
- data/test/rubygems/test_webauthn_listener_response.rb +8 -8
- data/test/rubygems/test_webauthn_poller.rb +124 -0
- data/test/rubygems/utilities.rb +1 -0
- data/test/test_changelog_generator.rb +1 -1
- metadata +39 -10
- data/lib/rubygems/webauthn_listener/response.rb +0 -161
- data/lib/rubygems/webauthn_listener.rb +0 -92
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require_relative "helper"
|
3
4
|
require "rubygems/installer"
|
4
5
|
|
@@ -63,7 +64,7 @@ class TestGemResolverGitSpecification < Gem::TestCase
|
|
63
64
|
|
64
65
|
def test_install_extension
|
65
66
|
pend if Gem.java_platform?
|
66
|
-
pend
|
67
|
+
pend "terminates on mswin" if vc_windows? && ruby_repo?
|
67
68
|
name, _, repository, = git_gem "a", 1 do |s|
|
68
69
|
s.extensions << "ext/extconf.rb"
|
69
70
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require "benchmark"
|
3
4
|
require_relative "helper"
|
4
5
|
require "date"
|
@@ -1068,19 +1069,27 @@ dependencies: []
|
|
1068
1069
|
end
|
1069
1070
|
|
1070
1071
|
def test_handles_private_null_type
|
1072
|
+
yaml_defined = Object.const_defined?("YAML")
|
1073
|
+
|
1071
1074
|
path = File.expand_path "data/pry-0.4.7.gemspec.rz", __dir__
|
1072
1075
|
|
1073
1076
|
data = Marshal.load Gem::Util.inflate(Gem.read_binary(path))
|
1074
1077
|
|
1075
1078
|
assert_instance_of Gem::Specification, data
|
1079
|
+
|
1080
|
+
assert_equal(yaml_defined, Object.const_defined?("YAML"))
|
1076
1081
|
end
|
1077
1082
|
|
1078
1083
|
def test_handles_dependencies_with_syck_requirements_bug
|
1084
|
+
yaml_defined = Object.const_defined?("YAML")
|
1085
|
+
|
1079
1086
|
path = File.expand_path "data/excon-0.7.7.gemspec.rz", __dir__
|
1080
1087
|
|
1081
1088
|
data = Marshal.load Gem::Util.inflate(Gem.read_binary(path))
|
1082
1089
|
|
1083
1090
|
assert_instance_of Gem::Specification, data
|
1091
|
+
|
1092
|
+
assert_equal(yaml_defined, Object.const_defined?("YAML"))
|
1084
1093
|
end
|
1085
1094
|
|
1086
1095
|
def test_initialize
|
@@ -1,12 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require_relative "helper"
|
3
4
|
require "rubygems/user_interaction"
|
4
5
|
require "timeout"
|
5
6
|
|
6
7
|
class TestGemStreamUI < Gem::TestCase
|
7
|
-
# increase timeout with
|
8
|
-
|
9
|
-
SHORT_TIMEOUT = (RUBY_ENGINE == "ruby" && !
|
8
|
+
# increase timeout with RJIT for --jit-wait testing
|
9
|
+
rjit_enabled = defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled?
|
10
|
+
SHORT_TIMEOUT = (RUBY_ENGINE == "ruby" && !rjit_enabled) ? 0.1 : 1.0
|
10
11
|
|
11
12
|
module IsTty
|
12
13
|
attr_accessor :tty
|
@@ -113,6 +114,36 @@ class TestGemStreamUI < Gem::TestCase
|
|
113
114
|
assert_equal "which one?\n 1. foo\n 2. bar\n> ", @out.string
|
114
115
|
end
|
115
116
|
|
117
|
+
def test_choose_from_list_0
|
118
|
+
@in.puts "0"
|
119
|
+
@in.rewind
|
120
|
+
|
121
|
+
result = @sui.choose_from_list "which one?", %w[foo bar]
|
122
|
+
|
123
|
+
assert_equal [nil, nil], result
|
124
|
+
assert_equal "which one?\n 1. foo\n 2. bar\n> ", @out.string
|
125
|
+
end
|
126
|
+
|
127
|
+
def test_choose_from_list_over
|
128
|
+
@in.puts "3"
|
129
|
+
@in.rewind
|
130
|
+
|
131
|
+
result = @sui.choose_from_list "which one?", %w[foo bar]
|
132
|
+
|
133
|
+
assert_equal [nil, nil], result
|
134
|
+
assert_equal "which one?\n 1. foo\n 2. bar\n> ", @out.string
|
135
|
+
end
|
136
|
+
|
137
|
+
def test_choose_from_list_negative
|
138
|
+
@in.puts "-1"
|
139
|
+
@in.rewind
|
140
|
+
|
141
|
+
result = @sui.choose_from_list "which one?", %w[foo bar]
|
142
|
+
|
143
|
+
assert_equal [nil, nil], result
|
144
|
+
assert_equal "which one?\n 1. foo\n 2. bar\n> ", @out.string
|
145
|
+
end
|
146
|
+
|
116
147
|
def test_progress_reporter_silent_nil
|
117
148
|
@cfg.verbose = nil
|
118
149
|
reporter = @sui.progress_reporter 10, "hi"
|
@@ -1,7 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "helper"
|
4
|
-
require "rubygems/webauthn_listener"
|
4
|
+
require "rubygems/gemcutter_utilities/webauthn_listener"
|
5
|
+
require "rubygems/gemcutter_utilities"
|
5
6
|
|
6
7
|
class WebauthnListenerTest < Gem::TestCase
|
7
8
|
def setup
|
@@ -10,6 +11,28 @@ class WebauthnListenerTest < Gem::TestCase
|
|
10
11
|
@port = @server.addr[1].to_s
|
11
12
|
end
|
12
13
|
|
14
|
+
def teardown
|
15
|
+
@thread.kill.join if @thread
|
16
|
+
@server&.close
|
17
|
+
super
|
18
|
+
end
|
19
|
+
|
20
|
+
def test_listener_thread_retreives_otp_code
|
21
|
+
thread = Gem::GemcutterUtilities::WebauthnListener.listener_thread(Gem.host, @server)
|
22
|
+
Gem::MockBrowser.get URI("http://localhost:#{@port}?code=xyz")
|
23
|
+
|
24
|
+
thread.join
|
25
|
+
assert_equal "xyz", thread[:otp]
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_listener_thread_sets_error
|
29
|
+
thread = Gem::GemcutterUtilities::WebauthnListener.listener_thread(Gem.host, @server)
|
30
|
+
Gem::MockBrowser.post URI("http://localhost:#{@port}?code=xyz")
|
31
|
+
|
32
|
+
thread.join
|
33
|
+
assert_equal "Security device verification failed: Invalid HTTP method POST received.", thread[:error].message
|
34
|
+
end
|
35
|
+
|
13
36
|
def test_wait_for_otp_code_get_follows_options
|
14
37
|
wait_for_otp_code
|
15
38
|
assert Gem::MockBrowser.options(URI("http://localhost:#{@port}?code=xyz")).is_a? Net::HTTPNoContent
|
@@ -32,7 +55,7 @@ class WebauthnListenerTest < Gem::TestCase
|
|
32
55
|
response = Gem::MockBrowser.get URI("http://localhost:#{@port}?code=xyz")
|
33
56
|
|
34
57
|
assert response.is_a? Net::HTTPOK
|
35
|
-
assert_equal "text/plain", response["Content-Type"]
|
58
|
+
assert_equal "text/plain; charset=utf-8", response["Content-Type"]
|
36
59
|
assert_equal "7", response["Content-Length"]
|
37
60
|
assert_equal Gem.host, response["access-control-allow-origin"]
|
38
61
|
assert_equal "POST", response["access-control-allow-methods"]
|
@@ -73,7 +96,7 @@ class WebauthnListenerTest < Gem::TestCase
|
|
73
96
|
response = Gem::MockBrowser.get URI("http://localhost:#{@port}")
|
74
97
|
|
75
98
|
assert response.is_a? Net::HTTPBadRequest
|
76
|
-
assert_equal "text/plain", response["Content-Type"]
|
99
|
+
assert_equal "text/plain; charset=utf-8", response["Content-Type"]
|
77
100
|
assert_equal "22", response["Content-Length"]
|
78
101
|
assert_equal "close", response["Connection"]
|
79
102
|
assert_equal "missing code parameter", response.body
|
@@ -87,7 +110,7 @@ class WebauthnListenerTest < Gem::TestCase
|
|
87
110
|
response = Gem::MockBrowser.get URI("http://localhost:#{@port}?param=xyz")
|
88
111
|
|
89
112
|
assert response.is_a? Net::HTTPBadRequest
|
90
|
-
assert_equal "text/plain", response["Content-Type"]
|
113
|
+
assert_equal "text/plain; charset=utf-8", response["Content-Type"]
|
91
114
|
assert_equal "22", response["Content-Length"]
|
92
115
|
assert_equal "close", response["Connection"]
|
93
116
|
assert_equal "missing code parameter", response.body
|
@@ -100,7 +123,7 @@ class WebauthnListenerTest < Gem::TestCase
|
|
100
123
|
|
101
124
|
def wait_for_otp_code
|
102
125
|
@thread = Thread.new do
|
103
|
-
Thread.current[:otp] = Gem::WebauthnListener.
|
126
|
+
Thread.current[:otp] = Gem::GemcutterUtilities::WebauthnListener.new(Gem.host).wait_for_otp_code(@server)
|
104
127
|
end
|
105
128
|
@thread.abort_on_exception = true
|
106
129
|
@thread.report_on_exception = false
|
@@ -109,7 +132,7 @@ class WebauthnListenerTest < Gem::TestCase
|
|
109
132
|
def wait_for_otp_code_expect_error_with_message(message)
|
110
133
|
@thread = Thread.new do
|
111
134
|
error = assert_raise Gem::WebauthnVerificationError do
|
112
|
-
Thread.current[:otp] = Gem::WebauthnListener.
|
135
|
+
Thread.current[:otp] = Gem::GemcutterUtilities::WebauthnListener.new(Gem.host).wait_for_otp_code(@server)
|
113
136
|
end
|
114
137
|
|
115
138
|
assert_equal message, error.message
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "helper"
|
4
|
-
require "rubygems/webauthn_listener/response"
|
4
|
+
require "rubygems/gemcutter_utilities/webauthn_listener/response"
|
5
5
|
|
6
6
|
class WebauthnListenerResponseTest < Gem::TestCase
|
7
7
|
def setup
|
@@ -10,7 +10,7 @@ class WebauthnListenerResponseTest < Gem::TestCase
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def test_ok_response_to_s
|
13
|
-
to_s = Gem::WebauthnListener::OkResponse.new(@host).to_s
|
13
|
+
to_s = Gem::GemcutterUtilities::WebauthnListener::OkResponse.new(@host).to_s
|
14
14
|
|
15
15
|
expected_to_s = <<~RESPONSE
|
16
16
|
HTTP/1.1 200 OK\r
|
@@ -18,7 +18,7 @@ class WebauthnListenerResponseTest < Gem::TestCase
|
|
18
18
|
access-control-allow-origin: rubygems.example\r
|
19
19
|
access-control-allow-methods: POST\r
|
20
20
|
access-control-allow-headers: Content-Type, Authorization, x-csrf-token\r
|
21
|
-
content-type: text/plain\r
|
21
|
+
content-type: text/plain; charset=utf-8\r
|
22
22
|
content-length: 7\r
|
23
23
|
\r
|
24
24
|
success
|
@@ -28,7 +28,7 @@ class WebauthnListenerResponseTest < Gem::TestCase
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def test_no_to_s_response_to_s
|
31
|
-
to_s = Gem::WebauthnListener::NoContentResponse.new(@host).to_s
|
31
|
+
to_s = Gem::GemcutterUtilities::WebauthnListener::NoContentResponse.new(@host).to_s
|
32
32
|
|
33
33
|
expected_to_s = <<~RESPONSE
|
34
34
|
HTTP/1.1 204 No Content\r
|
@@ -43,7 +43,7 @@ class WebauthnListenerResponseTest < Gem::TestCase
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def test_method_not_allowed_response_to_s
|
46
|
-
to_s = Gem::WebauthnListener::MethodNotAllowedResponse.new(@host).to_s
|
46
|
+
to_s = Gem::GemcutterUtilities::WebauthnListener::MethodNotAllowedResponse.new(@host).to_s
|
47
47
|
|
48
48
|
expected_to_s = <<~RESPONSE
|
49
49
|
HTTP/1.1 405 Method Not Allowed\r
|
@@ -59,7 +59,7 @@ class WebauthnListenerResponseTest < Gem::TestCase
|
|
59
59
|
end
|
60
60
|
|
61
61
|
def test_method_not_found_response_to_s
|
62
|
-
to_s = Gem::WebauthnListener::NotFoundResponse.new(@host).to_s
|
62
|
+
to_s = Gem::GemcutterUtilities::WebauthnListener::NotFoundResponse.new(@host).to_s
|
63
63
|
|
64
64
|
expected_to_s = <<~RESPONSE
|
65
65
|
HTTP/1.1 404 Not Found\r
|
@@ -74,7 +74,7 @@ class WebauthnListenerResponseTest < Gem::TestCase
|
|
74
74
|
end
|
75
75
|
|
76
76
|
def test_bad_request_response_to_s
|
77
|
-
to_s = Gem::WebauthnListener::BadRequestResponse.new(@host).to_s
|
77
|
+
to_s = Gem::GemcutterUtilities::WebauthnListener::BadRequestResponse.new(@host).to_s
|
78
78
|
|
79
79
|
expected_to_s = <<~RESPONSE
|
80
80
|
HTTP/1.1 400 Bad Request\r
|
@@ -82,7 +82,7 @@ class WebauthnListenerResponseTest < Gem::TestCase
|
|
82
82
|
access-control-allow-origin: rubygems.example\r
|
83
83
|
access-control-allow-methods: POST\r
|
84
84
|
access-control-allow-headers: Content-Type, Authorization, x-csrf-token\r
|
85
|
-
content-type: text/plain\r
|
85
|
+
content-type: text/plain; charset=utf-8\r
|
86
86
|
content-length: 22\r
|
87
87
|
\r
|
88
88
|
missing code parameter
|