ruby-changes:43930
From: nagachika <ko1@a...>
Date: Thu, 25 Aug 2016 00:28:37 +0900 (JST)
Subject: [ruby-changes:43930] nagachika:r56003 (ruby_2_3): merge revision(s) 53707, 53708, 53709, 53712, 53777, 53781: [Backport #12326]
nagachika 2016-08-25 00:28:23 +0900 (Thu, 25 Aug 2016) New Revision: 56003 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56003 Log: merge revision(s) 53707,53708,53709,53712,53777,53781: [Backport #12326] * lib/rubygems.rb, lib/rubygems/*, test/rubygems/*: Update rubygems-2.5.2. It supports to enable frozen string literal and add `--norc` option for disable to `.gemrc` configuration. See 2.5.2 release notes for other fixes and enhancements. https://github.com/rubygems/rubygems/blob/a8aa3bac723f045c52471c7b9328310a048561e0/History.txt#L3 * lib/rubygems/specification.rb: `coding` is affect only first line except shebang. * lib/rubygems/package.rb, lib/rubygems/package/*: ditto. Added files: branches/ruby_2_3/lib/rubygems/resolver/source_set.rb Removed files: branches/ruby_2_3/test/rubygems/specifications/foo-0.0.1.gemspec Modified directories: branches/ruby_2_3/ Modified files: branches/ruby_2_3/ChangeLog branches/ruby_2_3/lib/rubygems/available_set.rb branches/ruby_2_3/lib/rubygems/basic_specification.rb branches/ruby_2_3/lib/rubygems/command.rb branches/ruby_2_3/lib/rubygems/command_manager.rb branches/ruby_2_3/lib/rubygems/commands/build_command.rb branches/ruby_2_3/lib/rubygems/commands/cert_command.rb branches/ruby_2_3/lib/rubygems/commands/check_command.rb branches/ruby_2_3/lib/rubygems/commands/cleanup_command.rb branches/ruby_2_3/lib/rubygems/commands/contents_command.rb branches/ruby_2_3/lib/rubygems/commands/dependency_command.rb branches/ruby_2_3/lib/rubygems/commands/environment_command.rb branches/ruby_2_3/lib/rubygems/commands/fetch_command.rb branches/ruby_2_3/lib/rubygems/commands/generate_index_command.rb branches/ruby_2_3/lib/rubygems/commands/help_command.rb branches/ruby_2_3/lib/rubygems/commands/install_command.rb branches/ruby_2_3/lib/rubygems/commands/list_command.rb branches/ruby_2_3/lib/rubygems/commands/lock_command.rb branches/ruby_2_3/lib/rubygems/commands/mirror_command.rb branches/ruby_2_3/lib/rubygems/commands/open_command.rb branches/ruby_2_3/lib/rubygems/commands/outdated_command.rb branches/ruby_2_3/lib/rubygems/commands/owner_command.rb branches/ruby_2_3/lib/rubygems/commands/pristine_command.rb branches/ruby_2_3/lib/rubygems/commands/push_command.rb branches/ruby_2_3/lib/rubygems/commands/query_command.rb branches/ruby_2_3/lib/rubygems/commands/rdoc_command.rb branches/ruby_2_3/lib/rubygems/commands/search_command.rb branches/ruby_2_3/lib/rubygems/commands/server_command.rb branches/ruby_2_3/lib/rubygems/commands/setup_command.rb branches/ruby_2_3/lib/rubygems/commands/sources_command.rb branches/ruby_2_3/lib/rubygems/commands/specification_command.rb branches/ruby_2_3/lib/rubygems/commands/stale_command.rb branches/ruby_2_3/lib/rubygems/commands/uninstall_command.rb branches/ruby_2_3/lib/rubygems/commands/unpack_command.rb branches/ruby_2_3/lib/rubygems/commands/update_command.rb branches/ruby_2_3/lib/rubygems/commands/which_command.rb branches/ruby_2_3/lib/rubygems/commands/yank_command.rb branches/ruby_2_3/lib/rubygems/compatibility.rb branches/ruby_2_3/lib/rubygems/config_file.rb branches/ruby_2_3/lib/rubygems/core_ext/kernel_gem.rb branches/ruby_2_3/lib/rubygems/core_ext/kernel_require.rb branches/ruby_2_3/lib/rubygems/defaults.rb branches/ruby_2_3/lib/rubygems/dependency.rb branches/ruby_2_3/lib/rubygems/dependency_installer.rb branches/ruby_2_3/lib/rubygems/dependency_list.rb branches/ruby_2_3/lib/rubygems/deprecate.rb branches/ruby_2_3/lib/rubygems/doctor.rb branches/ruby_2_3/lib/rubygems/errors.rb branches/ruby_2_3/lib/rubygems/exceptions.rb branches/ruby_2_3/lib/rubygems/ext/build_error.rb branches/ruby_2_3/lib/rubygems/ext/builder.rb branches/ruby_2_3/lib/rubygems/ext/cmake_builder.rb branches/ruby_2_3/lib/rubygems/ext/configure_builder.rb branches/ruby_2_3/lib/rubygems/ext/ext_conf_builder.rb branches/ruby_2_3/lib/rubygems/ext/rake_builder.rb branches/ruby_2_3/lib/rubygems/ext.rb branches/ruby_2_3/lib/rubygems/gem_runner.rb branches/ruby_2_3/lib/rubygems/gemcutter_utilities.rb branches/ruby_2_3/lib/rubygems/indexer.rb branches/ruby_2_3/lib/rubygems/install_default_message.rb branches/ruby_2_3/lib/rubygems/install_message.rb branches/ruby_2_3/lib/rubygems/install_update_options.rb branches/ruby_2_3/lib/rubygems/installer.rb branches/ruby_2_3/lib/rubygems/installer_test_case.rb branches/ruby_2_3/lib/rubygems/local_remote_options.rb branches/ruby_2_3/lib/rubygems/mock_gem_ui.rb branches/ruby_2_3/lib/rubygems/name_tuple.rb branches/ruby_2_3/lib/rubygems/package/digest_io.rb branches/ruby_2_3/lib/rubygems/package/file_source.rb branches/ruby_2_3/lib/rubygems/package/io_source.rb branches/ruby_2_3/lib/rubygems/package/old.rb branches/ruby_2_3/lib/rubygems/package/source.rb branches/ruby_2_3/lib/rubygems/package/tar_header.rb branches/ruby_2_3/lib/rubygems/package/tar_reader/entry.rb branches/ruby_2_3/lib/rubygems/package/tar_reader.rb branches/ruby_2_3/lib/rubygems/package/tar_test_case.rb branches/ruby_2_3/lib/rubygems/package/tar_writer.rb branches/ruby_2_3/lib/rubygems/package.rb branches/ruby_2_3/lib/rubygems/package_task.rb branches/ruby_2_3/lib/rubygems/path_support.rb branches/ruby_2_3/lib/rubygems/platform.rb branches/ruby_2_3/lib/rubygems/psych_additions.rb branches/ruby_2_3/lib/rubygems/psych_tree.rb branches/ruby_2_3/lib/rubygems/rdoc.rb branches/ruby_2_3/lib/rubygems/remote_fetcher.rb branches/ruby_2_3/lib/rubygems/request/connection_pools.rb branches/ruby_2_3/lib/rubygems/request/http_pool.rb branches/ruby_2_3/lib/rubygems/request/https_pool.rb branches/ruby_2_3/lib/rubygems/request.rb branches/ruby_2_3/lib/rubygems/request_set/gem_dependency_api.rb branches/ruby_2_3/lib/rubygems/request_set/lockfile/parser.rb branches/ruby_2_3/lib/rubygems/request_set/lockfile/tokenizer.rb branches/ruby_2_3/lib/rubygems/request_set/lockfile.rb branches/ruby_2_3/lib/rubygems/request_set.rb branches/ruby_2_3/lib/rubygems/requirement.rb branches/ruby_2_3/lib/rubygems/resolver/activation_request.rb branches/ruby_2_3/lib/rubygems/resolver/api_set.rb branches/ruby_2_3/lib/rubygems/resolver/api_specification.rb branches/ruby_2_3/lib/rubygems/resolver/best_set.rb branches/ruby_2_3/lib/rubygems/resolver/composed_set.rb branches/ruby_2_3/lib/rubygems/resolver/conflict.rb branches/ruby_2_3/lib/rubygems/resolver/current_set.rb branches/ruby_2_3/lib/rubygems/resolver/dependency_request.rb branches/ruby_2_3/lib/rubygems/resolver/git_set.rb branches/ruby_2_3/lib/rubygems/resolver/git_specification.rb branches/ruby_2_3/lib/rubygems/resolver/index_set.rb branches/ruby_2_3/lib/rubygems/resolver/index_specification.rb branches/ruby_2_3/lib/rubygems/resolver/installed_specification.rb branches/ruby_2_3/lib/rubygems/resolver/installer_set.rb branches/ruby_2_3/lib/rubygems/resolver/local_specification.rb branches/ruby_2_3/lib/rubygems/resolver/lock_set.rb branches/ruby_2_3/lib/rubygems/resolver/lock_specification.rb branches/ruby_2_3/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb branches/ruby_2_3/lib/rubygems/resolver/molinillo/lib/molinillo/errors.rb branches/ruby_2_3/lib/rubygems/resolver/molinillo/lib/molinillo/gem_metadata.rb branches/ruby_2_3/lib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb branches/ruby_2_3/lib/rubygems/resolver/molinillo/lib/molinillo/modules/ui.rb branches/ruby_2_3/lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb branches/ruby_2_3/lib/rubygems/resolver/molinillo/lib/molinillo/resolver.rb branches/ruby_2_3/lib/rubygems/resolver/molinillo/lib/molinillo/state.rb branches/ruby_2_3/lib/rubygems/resolver/molinillo/lib/molinillo.rb branches/ruby_2_3/lib/rubygems/resolver/molinillo.rb branches/ruby_2_3/lib/rubygems/resolver/requirement_list.rb branches/ruby_2_3/lib/rubygems/resolver/set.rb branches/ruby_2_3/lib/rubygems/resolver/spec_specification.rb branches/ruby_2_3/lib/rubygems/resolver/specification.rb branches/ruby_2_3/lib/rubygems/resolver/stats.rb branches/ruby_2_3/lib/rubygems/resolver/vendor_set.rb branches/ruby_2_3/lib/rubygems/resolver/vendor_specification.rb branches/ruby_2_3/lib/rubygems/resolver.rb branches/ruby_2_3/lib/rubygems/security/policies.rb branches/ruby_2_3/lib/rubygems/security/policy.rb branches/ruby_2_3/lib/rubygems/security/signer.rb branches/ruby_2_3/lib/rubygems/security/trust_dir.rb branches/ruby_2_3/lib/rubygems/security.rb branches/ruby_2_3/lib/rubygems/server.rb branches/ruby_2_3/lib/rubygems/source/git.rb branches/ruby_2_3/lib/rubygems/source/installed.rb branches/ruby_2_3/lib/rubygems/source/local.rb branches/ruby_2_3/lib/rubygems/source/lock.rb branches/ruby_2_3/lib/rubygems/source/specific_file.rb branches/ruby_2_3/lib/rubygems/source/vendor.rb branches/ruby_2_3/lib/rubygems/source.rb branches/ruby_2_3/lib/rubygems/source_list.rb branches/ruby_2_3/lib/rubygems/source_local.rb branches/ruby_2_3/lib/rubygems/source_specific_file.rb branches/ruby_2_3/lib/rubygems/spec_fetcher.rb branches/ruby_2_3/lib/rubygems/specification.rb branches/ruby_2_3/lib/rubygems/stub_specification.rb branches/ruby_2_3/lib/rubygems/syck_hack.rb branches/ruby_2_3/lib/rubygems/test_case.rb branches/ruby_2_3/lib/rubygems/test_utilities.rb branches/ruby_2_3/lib/rubygems/text.rb branches/ruby_2_3/lib/rubygems/uninstaller.rb branches/ruby_2_3/lib/rubygems/uri_formatter.rb branches/ruby_2_3/lib/rubygems/user_interaction.rb branches/ruby_2_3/lib/rubygems/util/licenses.rb branches/ruby_2_3/lib/rubygems/util/list.rb branches/ruby_2_3/lib/rubygems/util.rb branches/ruby_2_3/lib/rubygems/validator.rb branches/ruby_2_3/lib/rubygems/version.rb branches/ruby_2_3/lib/rubygems/version_option.rb branches/ruby_2_3/lib/rubygems.rb branches/ruby_2_3/test/rubygems/bad_rake.rb branches/ruby_2_3/test/rubygems/bogussources.rb branches/ruby_2_3/test/rubygems/fake_certlib/openssl.rb branches/ruby_2_3/test/rubygems/fix_openssl_warnings.rb branches/ruby_2_3/test/rubygems/foo/discover.rb branches/ruby_2_3/test/rubygems/good_rake.rb branches/ruby_2_3/test/rubygems/plugin/exception/rubygems_plugin.rb branches/ruby_2_3/test/rubygems/plugin/load/rubygems_plugin.rb branches/ruby_2_3/test/rubygems/plugin/standarderror/rubygems_plugin.rb branches/ruby_2_3/test/rubygems/rubygems/commands/crash_command.rb branches/ruby_2_3/test/rubygems/rubygems_plugin.rb branches/ruby_2_3/test/rubygems/sff/discover.rb branches/ruby_2_3/test/rubygems/simple_gem.rb branches/ruby_2_3/test/rubygems/test_bundled_ca.rb branches/ruby_2_3/test/rubygems/test_config.rb branches/ruby_2_3/test/rubygems/test_deprecate.rb branches/ruby_2_3/test/rubygems/test_gem.rb branches/ruby_2_3/test/rubygems/test_gem_available_set.rb branches/ruby_2_3/test/rubygems/test_gem_command.rb branches/ruby_2_3/test/rubygems/test_gem_command_manager.rb branches/ruby_2_3/test/rubygems/test_gem_commands_build_command.rb branches/ruby_2_3/test/rubygems/test_gem_commands_cert_command.rb branches/ruby_2_3/test/rubygems/test_gem_commands_check_command.rb branches/ruby_2_3/test/rubygems/test_gem_commands_cleanup_command.rb branches/ruby_2_3/test/rubygems/test_gem_commands_contents_command.rb branches/ruby_2_3/test/rubygems/test_gem_commands_dependency_command.rb branches/ruby_2_3/test/rubygems/test_gem_commands_environment_command.rb branches/ruby_2_3/test/rubygems/test_gem_commands_fetch_command.rb branches/ruby_2_3/test/rubygems/test_gem_commands_generate_index_command.rb branches/ruby_2_3/test/rubygems/test_gem_commands_help_command.rb branches/ruby_2_3/test/rubygems/test_gem_commands_install_command.rb branches/ruby_2_3/test/rubygems/test_gem_commands_list_command.rb branches/ruby_2_3/test/rubygems/test_gem_commands_lock_command.rb branches/ruby_2_3/test/rubygems/test_gem_commands_mirror.rb branches/ruby_2_3/test/rubygems/test_gem_commands_open_command.rb branches/ruby_2_3/test/rubygems/test_gem_commands_outdated_command.rb branches/ruby_2_3/test/rubygems/test_gem_commands_owner_command.rb branches/ruby_2_3/test/rubygems/test_gem_commands_pristine_command.rb branches/ruby_2_3/test/rubygems/test_gem_commands_push_command.rb branches/ruby_2_3/test/rubygems/test_gem_commands_query_command.rb branches/ruby_2_3/test/rubygems/test_gem_commands_search_command.rb branches/ruby_2_3/test/rubygems/test_gem_commands_server_command.rb branches/ruby_2_3/test/rubygems/test_gem_commands_setup_command.rb branches/ruby_2_3/test/rubygems/test_gem_commands_sources_command.rb branches/ruby_2_3/test/rubygems/test_gem_commands_specification_command.rb branches/ruby_2_3/test/rubygems/test_gem_commands_stale_command.rb branches/ruby_2_3/test/rubygems/test_gem_commands_uninstall_command.rb branches/ruby_2_3/test/rubygems/test_gem_commands_unpack_command.rb branches/ruby_2_3/test/rubygems/test_gem_commands_update_command.rb branches/ruby_2_3/test/rubygems/test_gem_commands_which_command.rb branches/ruby_2_3/test/rubygems/test_gem_commands_yank_command.rb branches/ruby_2_3/test/rubygems/test_gem_config_file.rb branches/ruby_2_3/test/rubygems/test_gem_dependency.rb branches/ruby_2_3/test/rubygems/test_gem_dependency_installer.rb branches/ruby_2_3/test/rubygems/test_gem_dependency_list.rb branches/ruby_2_3/test/rubygems/test_gem_dependency_resolution_error.rb branches/ruby_2_3/test/rubygems/test_gem_doctor.rb branches/ruby_2_3/test/rubygems/test_gem_ext_builder.rb branches/ruby_2_3/test/rubygems/test_gem_ext_cmake_builder.rb branches/ruby_2_3/test/rubygems/test_gem_ext_configure_builder.rb branches/ruby_2_3/test/rubygems/test_gem_ext_ext_conf_builder.rb branches/ruby_2_3/test/rubygems/test_gem_ext_rake_builder.rb branches/ruby_2_3/test/rubygems/test_gem_gem_runner.rb branches/ruby_2_3/test/rubygems/test_gem_gemcutter_utilities.rb branches/ruby_2_3/test/rubygems/test_gem_impossible_dependencies_error.rb branches/ruby_2_3/test/rubygems/test_gem_indexer.rb branches/ruby_2_3/test/rubygems/test_gem_install_update_options.rb branches/ruby_2_3/test/rubygems/test_gem_installer.rb branches/ruby_2_3/test/rubygems/test_gem_local_remote_options.rb branches/ruby_2_3/test/rubygems/test_gem_name_tuple.rb branches/ruby_2_3/test/rubygems/test_gem_package.rb branches/ruby_2_3/test/rubygems/test_gem_package_old.rb branches/ruby_2_3/test/rubygems/test_gem_package_tar_header.rb branches/ruby_2_3/test/rubygems/test_gem_package_tar_reader.rb branches/ruby_2_3/test/rubygems/test_gem_package_tar_reader_entry.rb branches/ruby_2_3/test/rubygems/test_gem_package_tar_writer.rb branches/ruby_2_3/test/rubygems/test_gem_package_task.rb branches/ruby_2_3/test/rubygems/test_gem_path_support.rb branches/ruby_2_3/test/rubygems/test_gem_platform.rb branches/ruby_2_3/test/rubygems/test_gem_rdoc.rb branches/ruby_2_3/test/rubygems/test_gem_remote_fetcher.rb branches/ruby_2_3/test/rubygems/test_gem_request.rb branches/ruby_2_3/test/rubygems/test_gem_request_connection_pools.rb branches/ruby_2_3/test/rubygems/test_gem_request_set.rb branches/ruby_2_3/test/rubygems/test_gem_request_set_gem_dependency_api.rb branches/ruby_2_3/test/rubygems/test_gem_request_set_lockfile.rb branches/ruby_2_3/test/rubygems/test_gem_request_set_lockfile_parser.rb branches/ruby_2_3/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb branches/ruby_2_3/test/rubygems/test_gem_requirement.rb branches/ruby_2_3/test/rubygems/test_gem_resolver.rb branches/ruby_2_3/test/rubygems/test_gem_resolver_activation_request.rb branches/ruby_2_3/test/rubygems/test_gem_resolver_api_set.rb branches/ruby_2_3/test/rubygems/test_gem_resolver_api_specification.rb branches/ruby_2_3/test/rubygems/test_gem_resolver_best_set.rb branches/ruby_2_3/test/rubygems/test_gem_resolver_composed_set.rb branches/ruby_2_3/test/rubygems/test_gem_resolver_conflict.rb branches/ruby_2_3/test/rubygems/test_gem_resolver_dependency_request.rb branches/ruby_2_3/test/rubygems/test_gem_resolver_git_set.rb branches/ruby_2_3/test/rubygems/test_gem_resolver_git_specification.rb branches/ruby_2_3/test/rubygems/test_gem_resolver_index_set.rb branches/ruby_2_3/test/rubygems/test_gem_resolver_index_specification.rb branches/ruby_2_3/test/rubygems/test_gem_resolver_installed_specification.rb branches/ruby_2_3/test/rubygems/test_gem_resolver_installer_set.rb branches/ruby_2_3/test/rubygems/test_gem_resolver_local_specification.rb branches/ruby_2_3/test/rubygems/test_gem_resolver_lock_set.rb branches/ruby_2_3/test/rubygems/test_gem_resolver_lock_specification.rb branches/ruby_2_3/test/rubygems/test_gem_resolver_requirement_list.rb branches/ruby_2_3/test/rubygems/test_gem_resolver_specification.rb branches/ruby_2_3/test/rubygems/test_gem_resolver_vendor_set.rb branches/ruby_2_3/test/rubygems/test_gem_resolver_vendor_specification.rb branches/ruby_2_3/test/rubygems/test_gem_security.rb branches/ruby_2_3/test/rubygems/test_gem_security_policy.rb branches/ruby_2_3/test/rubygems/test_gem_security_signer.rb branches/ruby_2_3/test/rubygems/test_gem_security_trust_dir.rb branches/ruby_2_3/test/rubygems/test_gem_server.rb branches/ruby_2_3/test/rubygems/test_gem_silent_ui.rb branches/ruby_2_3/test/rubygems/test_gem_source.rb branches/ruby_2_3/test/rubygems/test_gem_source_fetch_problem.rb branches/ruby_2_3/test/rubygems/test_gem_source_git.rb branches/ruby_2_3/test/rubygems/test_gem_source_installed.rb branches/ruby_2_3/test/rubygems/test_gem_source_list.rb branches/ruby_2_3/test/rubygems/test_gem_source_local.rb branches/ruby_2_3/test/rubygems/test_gem_source_lock.rb branches/ruby_2_3/test/rubygems/test_gem_source_specific_file.rb branches/ruby_2_3/test/rubygems/test_gem_source_vendor.rb branches/ruby_2_3/test/rubygems/test_gem_spec_fetcher.rb branches/ruby_2_3/test/rubygems/test_gem_specification.rb branches/ruby_2_3/test/rubygems/test_gem_stream_ui.rb branches/ruby_2_3/test/rubygems/test_gem_stub_specification.rb branches/ruby_2_3/test/rubygems/test_gem_text.rb branches/ruby_2_3/test/rubygems/test_gem_uninstaller.rb branches/ruby_2_3/test/rubygems/test_gem_unsatisfiable_dependency_error.rb branches/ruby_2_3/test/rubygems/test_gem_uri_formatter.rb branches/ruby_2_3/test/rubygems/test_gem_util.rb branches/ruby_2_3/test/rubygems/test_gem_validator.rb branches/ruby_2_3/test/rubygems/test_gem_version.rb branches/ruby_2_3/test/rubygems/test_gem_version_option.rb branches/ruby_2_3/test/rubygems/test_kernel.rb branches/ruby_2_3/test/rubygems/test_require.rb branches/ruby_2_3/version.h Index: ruby_2_3/test/rubygems/sff/discover.rb =================================================================== --- ruby_2_3/test/rubygems/sff/discover.rb (revision 56002) +++ ruby_2_3/test/rubygems/sff/discover.rb (revision 56003) @@ -1 +1 @@ -# frozen_string_literal: false +# frozen_string_literal: true Index: ruby_2_3/test/rubygems/test_gem_request_set_lockfile_parser.rb =================================================================== --- ruby_2_3/test/rubygems/test_gem_request_set_lockfile_parser.rb (revision 56002) +++ ruby_2_3/test/rubygems/test_gem_request_set_lockfile_parser.rb (revision 56003) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/rubygems/test_gem_request_set_lockfile_parser.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true require 'rubygems/test_case' require 'rubygems/request_set' require 'rubygems/request_set/lockfile' @@ -246,10 +246,15 @@ DEPENDENCIES https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/rubygems/test_gem_request_set_lockfile_parser.rb#L246 assert lockfile_set, 'found a LockSet' - assert_equal %w[a-2 a-2], lockfile_set.specs.map { |s| s.full_name } + assert_equal %w[a-2], lockfile_set.specs.map { |s| s.full_name } - assert_equal %w[https://gems.example/ https://other.example/], - lockfile_set.specs.map { |s| s.source.uri.to_s } + if [].respond_to? :flat_map + assert_equal %w[https://gems.example/ https://other.example/], + lockfile_set.specs.flat_map { |s| s.sources.map{ |src| src.uri.to_s } } + else # FIXME: remove when 1.8 is dropped + assert_equal %w[https://gems.example/ https://other.example/], + lockfile_set.specs.map { |s| s.sources.map{ |src| src.uri.to_s } }.flatten(1) + end end def test_parse_GIT Index: ruby_2_3/test/rubygems/test_bundled_ca.rb =================================================================== --- ruby_2_3/test/rubygems/test_bundled_ca.rb (revision 56002) +++ ruby_2_3/test/rubygems/test_bundled_ca.rb (revision 56003) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/rubygems/test_bundled_ca.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true require 'rubygems/test_case' require 'net/https' require 'rubygems/request' @@ -7,51 +7,53 @@ require 'rubygems/request' https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/rubygems/test_bundled_ca.rb#L7 # # The tested hosts are explained in detail here: https://github.com/rubygems/rubygems/commit/5e16a5428f973667cabfa07e94ff939e7a83ebd9 # -class TestBundledCA < Gem::TestCase - THIS_FILE = File.expand_path __FILE__ +if ENV["TRAVIS"] || ENV["TEST_SSL"] + class TestBundledCA < Gem::TestCase - def bundled_certificate_store - store = OpenSSL::X509::Store.new + THIS_FILE = File.expand_path __FILE__ - ssl_cert_glob = - File.expand_path '../../../lib/rubygems/ssl_certs/*.pem', THIS_FILE + def bundled_certificate_store + store = OpenSSL::X509::Store.new - Dir[ssl_cert_glob].each do |ssl_cert| - store.add_file ssl_cert - end + ssl_cert_glob = + File.expand_path '../../../lib/rubygems/ssl_certs/*.pem', THIS_FILE - store - end + Dir[ssl_cert_glob].each do |ssl_cert| + store.add_file ssl_cert + end - def assert_https(host) - if self.respond_to? :_assertions # minitest <= 4 - self._assertions += 1 - else # minitest >= 5 - self.assertions += 1 - end - http = Net::HTTP.new(host, 443) - http.use_ssl = true - http.verify_mode = OpenSSL::SSL::VERIFY_PEER - http.cert_store = bundled_certificate_store - http.get('/') - rescue Errno::ENOENT, Errno::ETIMEDOUT - skip "#{host} seems offline, I can't tell whether ssl would work." - rescue OpenSSL::SSL::SSLError => e - # Only fail for certificate verification errors - if e.message =~ /certificate verify failed/ - flunk "#{host} is not verifiable using the included certificates. Error was: #{e.message}" + store end - raise - end - def test_accessing_rubygems - assert_https('rubygems.org') - end + def assert_https(host) + if self.respond_to? :_assertions # minitest <= 4 + self._assertions += 1 + else # minitest >= 5 + self.assertions += 1 + end + http = Net::HTTP.new(host, 443) + http.use_ssl = true + http.verify_mode = OpenSSL::SSL::VERIFY_PEER + http.cert_store = bundled_certificate_store + http.get('/') + rescue Errno::ENOENT, Errno::ETIMEDOUT + skip "#{host} seems offline, I can't tell whether ssl would work." + rescue OpenSSL::SSL::SSLError => e + # Only fail for certificate verification errors + if e.message =~ /certificate verify failed/ + flunk "#{host} is not verifiable using the included certificates. Error was: #{e.message}" + end + raise + end - def test_accessing_fastly - assert_https('rubygems.global.ssl.fastly.net') - end + def test_accessing_rubygems + assert_https('rubygems.org') + end -end if ENV['TRAVIS'] + def test_accessing_fastly + assert_https('rubygems.global.ssl.fastly.net') + end + end +end Index: ruby_2_3/test/rubygems/test_gem_package_old.rb =================================================================== --- ruby_2_3/test/rubygems/test_gem_package_old.rb (revision 56002) +++ ruby_2_3/test/rubygems/test_gem_package_old.rb (revision 56003) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/rubygems/test_gem_package_old.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true require 'rubygems/test_case' require 'rubygems/simple_gem' Index: ruby_2_3/test/rubygems/test_gem_commands_mirror.rb =================================================================== --- ruby_2_3/test/rubygems/test_gem_commands_mirror.rb (revision 56002) +++ ruby_2_3/test/rubygems/test_gem_commands_mirror.rb (revision 56003) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/rubygems/test_gem_commands_mirror.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true require 'rubygems/test_case' require 'rubygems/commands/mirror_command' Index: ruby_2_3/test/rubygems/test_gem_resolver_installed_specification.rb =================================================================== --- ruby_2_3/test/rubygems/test_gem_resolver_installed_specification.rb (revision 56002) +++ ruby_2_3/test/rubygems/test_gem_resolver_installed_specification.rb (revision 56003) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/rubygems/test_gem_resolver_installed_specification.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true require 'rubygems/test_case' class TestGemResolverInstalledSpecification < Gem::TestCase Index: ruby_2_3/test/rubygems/test_gem_unsatisfiable_dependency_error.rb =================================================================== --- ruby_2_3/test/rubygems/test_gem_unsatisfiable_dependency_error.rb (revision 56002) +++ ruby_2_3/test/rubygems/test_gem_unsatisfiable_dependency_error.rb (revision 56003) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/rubygems/test_gem_unsatisfiable_dependency_error.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true require 'rubygems/test_case' class TestGemUnsatisfiableDependencyError < Gem::TestCase Index: ruby_2_3/test/rubygems/test_gem_resolver_specification.rb =================================================================== --- ruby_2_3/test/rubygems/test_gem_resolver_specification.rb (revision 56002) +++ ruby_2_3/test/rubygems/test_gem_resolver_specification.rb (revision 56003) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/rubygems/test_gem_resolver_specification.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true require 'rubygems/test_case' class TestGemResolverSpecification < Gem::TestCase Index: ruby_2_3/test/rubygems/test_gem_commands_sources_command.rb =================================================================== --- ruby_2_3/test/rubygems/test_gem_commands_sources_command.rb (revision 56002) +++ ruby_2_3/test/rubygems/test_gem_commands_sources_command.rb (revision 56003) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/rubygems/test_gem_commands_sources_command.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true require 'rubygems/test_case' require 'rubygems/commands/sources_command' Index: ruby_2_3/test/rubygems/test_deprecate.rb =================================================================== --- ruby_2_3/test/rubygems/test_deprecate.rb (revision 56002) +++ ruby_2_3/test/rubygems/test_deprecate.rb (revision 56003) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/rubygems/test_deprecate.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true require 'rubygems/test_case' # require 'rubygems/builder' # require 'rubygems/package' Index: ruby_2_3/test/rubygems/rubygems/commands/crash_command.rb =================================================================== --- ruby_2_3/test/rubygems/rubygems/commands/crash_command.rb (revision 56002) +++ ruby_2_3/test/rubygems/rubygems/commands/crash_command.rb (revision 56003) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/rubygems/rubygems/commands/crash_command.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true class Gem::Commands::CrashCommand < Gem::Command raise "crash" Index: ruby_2_3/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb =================================================================== --- ruby_2_3/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb (revision 56002) +++ ruby_2_3/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb (revision 56003) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true require 'rubygems/test_case' require 'rubygems/request_set' require 'rubygems/request_set/lockfile' Index: ruby_2_3/test/rubygems/test_gem_server.rb =================================================================== --- ruby_2_3/test/rubygems/test_gem_server.rb (revision 56002) +++ ruby_2_3/test/rubygems/test_gem_server.rb (revision 56003) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/rubygems/test_gem_server.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true require 'rubygems/test_case' require 'rubygems/server' require 'stringio' Index: ruby_2_3/test/rubygems/test_gem_ext_configure_builder.rb =================================================================== --- ruby_2_3/test/rubygems/test_gem_ext_configure_builder.rb (revision 56002) +++ ruby_2_3/test/rubygems/test_gem_ext_configure_builder.rb (revision 56003) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/rubygems/test_gem_ext_configure_builder.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true require 'rubygems/test_case' require 'rubygems/ext' Index: ruby_2_3/test/rubygems/test_gem_commands_fetch_command.rb =================================================================== --- ruby_2_3/test/rubygems/test_gem_commands_fetch_command.rb (revision 56002) +++ ruby_2_3/test/rubygems/test_gem_commands_fetch_command.rb (revision 56003) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/rubygems/test_gem_commands_fetch_command.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true require 'rubygems/test_case' require 'rubygems/package' require 'rubygems/security' Index: ruby_2_3/test/rubygems/test_gem_resolver_local_specification.rb =================================================================== --- ruby_2_3/test/rubygems/test_gem_resolver_local_specification.rb (revision 56002) +++ ruby_2_3/test/rubygems/test_gem_resolver_local_specification.rb (revision 56003) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/rubygems/test_gem_resolver_local_specification.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true require 'rubygems/test_case' require 'rubygems/available_set' Index: ruby_2_3/test/rubygems/test_gem_stub_specification.rb =================================================================== --- ruby_2_3/test/rubygems/test_gem_stub_specification.rb (revision 56002) +++ ruby_2_3/test/rubygems/test_gem_stub_specification.rb (revision 56003) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/rubygems/test_gem_stub_specification.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true require "rubygems/test_case" require "rubygems/stub_specification" Index: ruby_2_3/test/rubygems/test_gem_command.rb =================================================================== --- ruby_2_3/test/rubygems/test_gem_command.rb (revision 56002) +++ ruby_2_3/test/rubygems/test_gem_command.rb (revision 56003) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/rubygems/test_gem_command.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true require 'rubygems/test_case' require 'rubygems/command' Index: ruby_2_3/test/rubygems/test_gem_dependency.rb =================================================================== --- ruby_2_3/test/rubygems/test_gem_dependency.rb (revision 56002) +++ ruby_2_3/test/rubygems/test_gem_dependency.rb (revision 56003) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/rubygems/test_gem_dependency.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true require 'rubygems/test_case' require 'rubygems/dependency' Index: ruby_2_3/test/rubygems/test_gem_commands_yank_command.rb =================================================================== --- ruby_2_3/test/rubygems/test_gem_commands_yank_command.rb (revision 56002) +++ ruby_2_3/test/rubygems/test_gem_commands_yank_command.rb (revision 56003) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/rubygems/test_gem_commands_yank_command.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true require 'rubygems/test_case' require 'rubygems/commands/yank_command' @@ -7,7 +7,7 @@ class TestGemCommandsYankCommand < Gem:: https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/rubygems/test_gem_commands_yank_command.rb#L7 super @cmd = Gem::Commands::YankCommand.new - @cmd.host = 'http://example' + @cmd.options[:host] = 'http://example' @fetcher = Gem::RemoteFetcher.fetcher @@ -16,10 +16,11 @@ class TestGemCommandsYankCommand < Gem:: https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/rubygems/test_gem_commands_yank_command.rb#L16 end def test_handle_options - @cmd.handle_options %w[a --version 1.0 --platform x86-darwin -k KEY] + @cmd.handle_options %w[a --version 1.0 --platform x86-darwin -k KEY --host HOST] assert_equal %w[a], @cmd.options[:args] assert_equal :KEY, @cmd.options[:key] + assert_equal "HOST", @cmd.options[:host] assert_nil @cmd.options[:platform] assert_equal req('= 1.0'), @cmd.options[:version] end @@ -73,25 +74,26 @@ class TestGemCommandsYankCommand < Gem:: https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/rubygems/test_gem_commands_yank_command.rb#L74 assert_equal 'other', @fetcher.last_request['Authorization'] end - def test_execute_undo - unyank_uri = 'http://example/api/v1/gems/unyank' - @fetcher.data[unyank_uri] = ['Successfully unyanked', 200, 'OK'] + def test_execute_host + host = 'https://other.example' + yank_uri = "#{host}/api/v1/gems/yank" + @fetcher.data[yank_uri] = ['Successfully yanked', 200, 'OK'] @cmd.options[:args] = %w[a] @cmd.options[:version] = req('= 1.0') - @cmd.options[:undo] = true + @cmd.options[:host] = host use_ui @ui do @cmd.execute end - assert_match %r%Unyanking gem from http://example%, @ui.output - assert_match %r%Successfully unyanked%, @ui.output + assert_match %r%Yanking gem from https://other.example%, @ui.output + assert_match %r%Successfully yanked%, @ui.output body = @fetcher.last_request.body.split('&').sort assert_equal %w[gem_name=a version=1.0], body - - assert_equal [unyank_uri], @fetcher.paths + assert_equal 'key', @fetcher.last_request['Authorization'] + assert_equal [yank_uri], @fetcher.paths end end Index: ruby_2_3/test/rubygems/test_gem_request_set_gem_dependency_api.rb =================================================================== --- ruby_2_3/test/rubygems/test_gem_request_set_gem_dependency_api.rb (revision 56002) +++ ruby_2_3/test/rubygems/test_gem_request_set_gem_dependency_api.rb (revision 56003) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/rubygems/test_gem_request_set_gem_dependency_api.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true require 'rubygems/test_case' require 'rubygems/request_set' @@ -52,22 +52,14 @@ class TestGemRequestSetGemDependencyAPI https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/rubygems/test_gem_request_set_gem_dependency_api.rb#L52 end def test_gempspec_with_multiple_runtime_deps - gda = Class.new(@GDA) do - # implement find_gemspec so we don't need one on the FS - def find_gemspec name, path - Gem::Specification.new do |s| - s.name = 'foo' - s.version = '1.0' - s.add_runtime_dependency 'bar', '>= 1.6.0', '< 1.6.4' - end - end + save_gemspec 'foo', '1.0' do |s| + s.add_runtime_dependency 'bar', '>= 1.6.0', '< 1.6.4' end - instance = gda.new @set, __FILE__ - instance.gemspec + @gda.gemspec assert_equal %w{ foo bar }.sort, @set.dependencies.map(&:name).sort bar = @set.dependencies.find { |d| d.name == 'bar' } - assert_equal [[">=", Gem::Version.create('1.6.0')], - ["<", Gem::Version.create('1.6.4')]], bar.requirement.requirements + assert_equal [["<", Gem::Version.create('1.6.4')], + [">=", Gem::Version.create('1.6.0')]], bar.requirement.requirements.sort end def test_gemspec_without_group @@ -145,7 +137,11 @@ class TestGemRequestSetGemDependencyAPI https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/rubygems/test_gem_request_set_gem_dependency_api.rb#L137 end def test_gem_git_branch - @gda.gem 'a', :git => 'git/a', :branch => 'other', :tag => 'v1' + _, err = capture_io do + @gda.gem 'a', :git => 'git/a', :branch => 'other', :tag => 'v1' + end + expected = "Gem dependencies file gem.deps.rb includes git reference for both ref/branch and tag but only ref/branch is used." + assert_match expected, err assert_equal [dep('a')], @set.dependencies @@ -162,7 +158,11 @@ class TestGemRequestSetGemDependencyAPI https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/rubygems/test_gem_request_set_gem_dependency_api.rb#L158 end def test_gem_git_ref - @gda.gem 'a', :git => 'git/a', :ref => 'abcd123', :branch => 'other' + _, err = capture_io do + @gda.gem 'a', :git => 'git/a', :ref => 'abcd123', :branch => 'other' + end + expected = "Gem dependencies file gem.deps.rb includes git reference for both ref and branch but only ref is used." + assert_match expected, err assert_equal [dep('a')], @set.dependencies @@ -471,11 +471,9 @@ class TestGemRequestSetGemDependencyAPI https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/rubygems/test_gem_request_set_gem_dependency_api.rb#L471 end def test_gemspec - spec = util_spec 'a', 1, 'b' => 2 - spec.add_development_dependency 'c', 3 - - open 'a.gemspec', 'w' do |io| - io.write spec.to_ruby_for_cache + save_gemspec 'a', 1 do |s| + s.add_dependency 'b', 2 + s.add_development_dependen (... truncated) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/