ruby-changes:55332
From: hsbt <ko1@a...>
Date: Sun, 14 Apr 2019 15:01:55 +0900 (JST)
Subject: [ruby-changes:55332] hsbt:r67539 (trunk): Merge Bundler 2.1.0.pre.1 as developed version from upstream.
hsbt 2019-04-14 15:01:35 +0900 (Sun, 14 Apr 2019) New Revision: 67539 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67539 Log: Merge Bundler 2.1.0.pre.1 as developed version from upstream. https://github.com/bundler/bundler/commit/a53709556b95a914e874b22ed2116a46b0528852 Added directories: trunk/lib/bundler/vendor/fileutils/lib/fileutils/ Added files: trunk/lib/bundler/vendor/fileutils/lib/fileutils/version.rb trunk/spec/bundler/plugins/list_spec.rb trunk/spec/bundler/quality_es_spec.rb trunk/spec/bundler/runtime/with_unbundled_env_spec.rb trunk/spec/bundler/support/artifice/compact_index_rate_limited.rb trunk/spec/bundler/support/requirement_checker.rb Removed directories: trunk/lib/bundler/ssl_certs/ trunk/spec/bundler/bundler/ssl_certs/ Removed files: trunk/libexec/bundle_ruby trunk/spec/bundler/lock/lockfile_bundler_1_spec.rb trunk/spec/bundler/other/bundle_ruby_spec.rb trunk/spec/bundler/other/ssl_cert_spec.rb trunk/spec/bundler/runtime/with_clean_env_spec.rb trunk/spec/bundler/support/less_than_proc.rb Modified files: trunk/lib/bundler/bundler.gemspec trunk/lib/bundler/capistrano.rb trunk/lib/bundler/cli/cache.rb trunk/lib/bundler/cli/common.rb trunk/lib/bundler/cli/config.rb trunk/lib/bundler/cli/console.rb trunk/lib/bundler/cli/doctor.rb trunk/lib/bundler/cli/gem.rb trunk/lib/bundler/cli/info.rb trunk/lib/bundler/cli/init.rb trunk/lib/bundler/cli/install.rb trunk/lib/bundler/cli/issue.rb trunk/lib/bundler/cli/outdated.rb trunk/lib/bundler/cli/package.rb trunk/lib/bundler/cli/plugin.rb trunk/lib/bundler/cli/pristine.rb trunk/lib/bundler/cli/show.rb trunk/lib/bundler/cli/update.rb trunk/lib/bundler/cli.rb trunk/lib/bundler/compact_index_client/updater.rb trunk/lib/bundler/compact_index_client.rb trunk/lib/bundler/compatibility_guard.rb trunk/lib/bundler/definition.rb trunk/lib/bundler/deployment.rb trunk/lib/bundler/dsl.rb trunk/lib/bundler/env.rb trunk/lib/bundler/feature_flag.rb trunk/lib/bundler/fetcher/compact_index.rb trunk/lib/bundler/fetcher/downloader.rb trunk/lib/bundler/fetcher.rb trunk/lib/bundler/friendly_errors.rb trunk/lib/bundler/gem_helper.rb trunk/lib/bundler/gem_helpers.rb trunk/lib/bundler/gem_version_promoter.rb trunk/lib/bundler/graph.rb trunk/lib/bundler/injector.rb trunk/lib/bundler/inline.rb trunk/lib/bundler/installer/gem_installer.rb trunk/lib/bundler/installer/parallel_installer.rb trunk/lib/bundler/installer.rb trunk/lib/bundler/lazy_specification.rb trunk/lib/bundler/lockfile_parser.rb trunk/lib/bundler/plugin/api/source.rb trunk/lib/bundler/plugin/index.rb trunk/lib/bundler/plugin/installer.rb trunk/lib/bundler/plugin.rb trunk/lib/bundler/resolver/spec_group.rb trunk/lib/bundler/resolver.rb trunk/lib/bundler/retry.rb trunk/lib/bundler/ruby_version.rb trunk/lib/bundler/rubygems_ext.rb trunk/lib/bundler/rubygems_gem_installer.rb trunk/lib/bundler/rubygems_integration.rb trunk/lib/bundler/runtime.rb trunk/lib/bundler/settings.rb trunk/lib/bundler/setup.rb trunk/lib/bundler/shared_helpers.rb trunk/lib/bundler/similarity_detector.rb trunk/lib/bundler/source/git/git_proxy.rb trunk/lib/bundler/source/git.rb trunk/lib/bundler/source/metadata.rb trunk/lib/bundler/source/path.rb trunk/lib/bundler/source/rubygems.rb trunk/lib/bundler/source_list.rb trunk/lib/bundler/spec_set.rb trunk/lib/bundler/stub_specification.rb trunk/lib/bundler/templates/Executable.bundler trunk/lib/bundler/templates/newgem/README.md.tt trunk/lib/bundler/templates/newgem/newgem.gemspec.tt trunk/lib/bundler/templates/newgem/test/test_helper.rb.tt trunk/lib/bundler/templates/newgem/travis.yml.tt trunk/lib/bundler/vendor/fileutils/lib/fileutils.rb trunk/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb trunk/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb trunk/lib/bundler/vendor/thor/lib/thor/actions.rb trunk/lib/bundler/vendor/thor/lib/thor/base.rb trunk/lib/bundler/vendor/thor/lib/thor/error.rb trunk/lib/bundler/vendor/thor/lib/thor/group.rb trunk/lib/bundler/vendor/thor/lib/thor/parser/options.rb trunk/lib/bundler/vendor/thor/lib/thor/runner.rb trunk/lib/bundler/vendor/thor/lib/thor/shell/basic.rb trunk/lib/bundler/vendor/thor/lib/thor/shell.rb trunk/lib/bundler/vendor/thor/lib/thor/util.rb trunk/lib/bundler/vendor/thor/lib/thor/version.rb trunk/lib/bundler/version.rb trunk/lib/bundler/version_ranges.rb trunk/lib/bundler/vlad.rb trunk/lib/bundler/worker.rb trunk/lib/bundler/yaml_serializer.rb trunk/lib/bundler.rb trunk/man/bundle-add.1 trunk/man/bundle-add.1.txt trunk/man/bundle-binstubs.1 trunk/man/bundle-binstubs.1.txt trunk/man/bundle-check.1 trunk/man/bundle-check.1.txt trunk/man/bundle-clean.1 trunk/man/bundle-clean.1.txt trunk/man/bundle-config.1 trunk/man/bundle-config.1.txt trunk/man/bundle-config.ronn trunk/man/bundle-doctor.1 trunk/man/bundle-doctor.1.txt trunk/man/bundle-exec.1 trunk/man/bundle-exec.1.txt trunk/man/bundle-gem.1 trunk/man/bundle-gem.1.txt trunk/man/bundle-info.1 trunk/man/bundle-info.1.txt trunk/man/bundle-init.1 trunk/man/bundle-init.1.txt trunk/man/bundle-init.ronn trunk/man/bundle-inject.1 trunk/man/bundle-inject.1.txt trunk/man/bundle-install.1 trunk/man/bundle-install.1.txt trunk/man/bundle-install.ronn trunk/man/bundle-list.1 trunk/man/bundle-list.1.txt trunk/man/bundle-lock.1 trunk/man/bundle-lock.1.txt trunk/man/bundle-open.1 trunk/man/bundle-open.1.txt trunk/man/bundle-outdated.1 trunk/man/bundle-outdated.1.txt trunk/man/bundle-package.1 trunk/man/bundle-package.1.txt trunk/man/bundle-platform.1 trunk/man/bundle-platform.1.txt trunk/man/bundle-pristine.1 trunk/man/bundle-pristine.1.txt trunk/man/bundle-remove.1 trunk/man/bundle-remove.1.txt trunk/man/bundle-show.1 trunk/man/bundle-show.1.txt trunk/man/bundle-update.1 trunk/man/bundle-update.1.txt trunk/man/bundle-update.ronn trunk/man/bundle-viz.1 trunk/man/bundle-viz.1.txt trunk/man/bundle.1 trunk/man/bundle.1.txt trunk/man/bundle.ronn trunk/man/gemfile.5 trunk/man/gemfile.5.ronn trunk/man/gemfile.5.txt trunk/spec/bundler/bundler/bundler_spec.rb trunk/spec/bundler/bundler/cli_spec.rb trunk/spec/bundler/bundler/definition_spec.rb trunk/spec/bundler/bundler/dsl_spec.rb trunk/spec/bundler/bundler/fetcher/compact_index_spec.rb trunk/spec/bundler/bundler/fetcher/downloader_spec.rb trunk/spec/bundler/bundler/friendly_errors_spec.rb trunk/spec/bundler/bundler/gem_helper_spec.rb trunk/spec/bundler/bundler/installer/gem_installer_spec.rb trunk/spec/bundler/bundler/mirror_spec.rb trunk/spec/bundler/bundler/plugin/index_spec.rb trunk/spec/bundler/bundler/plugin/installer_spec.rb trunk/spec/bundler/bundler/plugin_spec.rb trunk/spec/bundler/bundler/rubygems_integration_spec.rb trunk/spec/bundler/bundler/settings_spec.rb trunk/spec/bundler/bundler/shared_helpers_spec.rb trunk/spec/bundler/bundler/source/git/git_proxy_spec.rb trunk/spec/bundler/bundler/source/rubygems/remote_spec.rb trunk/spec/bundler/bundler/source_list_spec.rb trunk/spec/bundler/bundler/stub_specification_spec.rb trunk/spec/bundler/bundler/ui/shell_spec.rb trunk/spec/bundler/bundler/ui_spec.rb trunk/spec/bundler/bundler/vendored_persistent_spec.rb trunk/spec/bundler/bundler/version_ranges_spec.rb trunk/spec/bundler/cache/cache_path_spec.rb trunk/spec/bundler/cache/gems_spec.rb trunk/spec/bundler/cache/git_spec.rb trunk/spec/bundler/cache/path_spec.rb trunk/spec/bundler/cache/platform_spec.rb trunk/spec/bundler/commands/add_spec.rb trunk/spec/bundler/commands/binstubs_spec.rb trunk/spec/bundler/commands/check_spec.rb trunk/spec/bundler/commands/clean_spec.rb trunk/spec/bundler/commands/config_spec.rb trunk/spec/bundler/commands/console_spec.rb trunk/spec/bundler/commands/exec_spec.rb trunk/spec/bundler/commands/help_spec.rb trunk/spec/bundler/commands/info_spec.rb trunk/spec/bundler/commands/init_spec.rb trunk/spec/bundler/commands/inject_spec.rb trunk/spec/bundler/commands/install_spec.rb trunk/spec/bundler/commands/licenses_spec.rb trunk/spec/bundler/commands/list_spec.rb trunk/spec/bundler/commands/lock_spec.rb trunk/spec/bundler/commands/newgem_spec.rb trunk/spec/bundler/commands/open_spec.rb trunk/spec/bundler/commands/outdated_spec.rb trunk/spec/bundler/commands/package_spec.rb trunk/spec/bundler/commands/pristine_spec.rb trunk/spec/bundler/commands/remove_spec.rb trunk/spec/bundler/commands/show_spec.rb trunk/spec/bundler/commands/update_spec.rb trunk/spec/bundler/commands/viz_spec.rb trunk/spec/bundler/install/allow_offline_install_spec.rb trunk/spec/bundler/install/binstubs_spec.rb trunk/spec/bundler/install/bundler_spec.rb trunk/spec/bundler/install/deploy_spec.rb trunk/spec/bundler/install/failure_spec.rb trunk/spec/bundler/install/gemfile/gemspec_spec.rb trunk/spec/bundler/install/gemfile/git_spec.rb trunk/spec/bundler/install/gemfile/groups_spec.rb trunk/spec/bundler/install/gemfile/lockfile_spec.rb trunk/spec/bundler/install/gemfile/path_spec.rb trunk/spec/bundler/install/gemfile/platform_spec.rb trunk/spec/bundler/install/gemfile/ruby_spec.rb trunk/spec/bundler/install/gemfile/sources_spec.rb trunk/spec/bundler/install/gemfile/specific_platform_spec.rb trunk/spec/bundler/install/gemfile_spec.rb trunk/spec/bundler/install/gems/compact_index_spec.rb trunk/spec/bundler/install/gems/dependency_api_spec.rb trunk/spec/bundler/install/gems/flex_spec.rb trunk/spec/bundler/install/gems/mirror_spec.rb trunk/spec/bundler/install/gems/native_extensions_spec.rb trunk/spec/bundler/install/gems/post_install_spec.rb trunk/spec/bundler/install/gems/resolving_spec.rb trunk/spec/bundler/install/gems/standalone_spec.rb trunk/spec/bundler/install/gems/sudo_spec.rb trunk/spec/bundler/install/gemspecs_spec.rb trunk/spec/bundler/install/git_spec.rb trunk/spec/bundler/install/global_cache_spec.rb trunk/spec/bundler/install/path_spec.rb trunk/spec/bundler/install/post_bundle_message_spec.rb trunk/spec/bundler/install/process_lock_spec.rb trunk/spec/bundler/install/redownload_spec.rb trunk/spec/bundler/install/security_policy_spec.rb trunk/spec/bundler/install/yanked_spec.rb trunk/spec/bundler/lock/lockfile_spec.rb trunk/spec/bundler/other/cli_dispatch_spec.rb trunk/spec/bundler/other/compatibility_guard_spec.rb trunk/spec/bundler/other/ext_spec.rb trunk/spec/bundler/other/major_deprecation_spec.rb trunk/spec/bundler/other/platform_spec.rb trunk/spec/bundler/plugins/command_spec.rb trunk/spec/bundler/plugins/install_spec.rb trunk/spec/bundler/plugins/source/example_spec.rb trunk/spec/bundler/quality_spec.rb trunk/spec/bundler/realworld/dependency_api_spec.rb trunk/spec/bundler/realworld/double_check_spec.rb trunk/spec/bundler/realworld/edgecases_spec.rb trunk/spec/bundler/realworld/gemfile_source_header_spec.rb trunk/spec/bundler/realworld/mirror_probe_spec.rb trunk/spec/bundler/realworld/parallel_spec.rb trunk/spec/bundler/resolver/basic_spec.rb trunk/spec/bundler/runtime/executable_spec.rb trunk/spec/bundler/runtime/gem_tasks_spec.rb trunk/spec/bundler/runtime/inline_spec.rb trunk/spec/bundler/runtime/platform_spec.rb trunk/spec/bundler/runtime/require_spec.rb trunk/spec/bundler/runtime/setup_spec.rb trunk/spec/bundler/spec_helper.rb trunk/spec/bundler/support/artifice/compact_index.rb trunk/spec/bundler/support/artifice/compact_index_api_missing.rb trunk/spec/bundler/support/artifice/endpoint.rb trunk/spec/bundler/support/artifice/endpoint_api_missing.rb trunk/spec/bundler/support/artifice/vcr.rb trunk/spec/bundler/support/builders.rb trunk/spec/bundler/support/helpers.rb trunk/spec/bundler/support/indexes.rb trunk/spec/bundler/support/matchers.rb trunk/spec/bundler/support/path.rb trunk/spec/bundler/support/platforms.rb trunk/spec/bundler/support/rubygems_ext.rb trunk/spec/bundler/update/gemfile_spec.rb trunk/spec/bundler/update/gems/post_install_spec.rb trunk/spec/bundler/update/git_spec.rb trunk/spec/bundler/update/redownload_spec.rb Index: lib/bundler/ssl_certs/certificate_manager.rb =================================================================== --- lib/bundler/ssl_certs/certificate_manager.rb (revision 67538) +++ lib/bundler/ssl_certs/certificate_manager.rb (nonexistent) @@ -1,66 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/lib/bundler/ssl_certs/certificate_manager.rb#L0 -# frozen_string_literal: true - -require "bundler/vendored_fileutils" -require "net/https" -require "openssl" - -module Bundler - module SSLCerts - class CertificateManager - attr_reader :bundler_cert_path, :bundler_certs, :rubygems_certs - - def self.update_from!(rubygems_path) - new(rubygems_path).update! - end - - def initialize(rubygems_path = nil) - if rubygems_path - rubygems_cert_path = File.join(rubygems_path, "lib/rubygems/ssl_certs") - @rubygems_certs = certificates_in(rubygems_cert_path) - end - - @bundler_cert_path = File.expand_path("..", __FILE__) - @bundler_certs = certificates_in(bundler_cert_path) - end - - def up_to_date? - rubygems_certs.all? do |rc| - bundler_certs.find do |bc| - File.basename(bc) == File.basename(rc) && FileUtils.compare_file(bc, rc) - end - end - end - - def update! - return if up_to_date? - - FileUtils.rm bundler_certs - FileUtils.cp rubygems_certs, bundler_cert_path - end - - def connect_to(host) - http = Net::HTTP.new(host, 443) - http.use_ssl = true - http.verify_mode = OpenSSL::SSL::VERIFY_PEER - http.cert_store = store - http.head("/") - end - - private - - def certificates_in(path) - Dir[File.join(path, "**/*.pem")].sort - end - - def store - @store ||= begin - store = OpenSSL::X509::Store.new - bundler_certs.each do |cert| - store.add_file cert - end - store - end - end - end - end -end Index: lib/bundler/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem =================================================================== --- lib/bundler/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem (revision 67538) +++ lib/bundler/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem (nonexistent) @@ -1,23 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/lib/bundler/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem#L0 ------BEGIN CERTIFICATE----- -MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBs -MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 -d3cuZGlnaWNlcnQuY29tMSswKQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5j -ZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAwMFoXDTMxMTExMDAwMDAwMFowbDEL -MAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZMBcGA1UECxMQd3d3 -LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFuY2Ug -RVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm -+9S75S0tMqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTW -PNt0OKRKzE0lgvdKpVMSOO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEM -xChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFB -Ik5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQNAQTXKFx01p8VdteZOE3 -hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUeh10aUAsg -EsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQF -MAMBAf8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaA -FLE+w2kD+L9HAdSYJhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3Nec -nzyIZgYIVyHbIUf4KmeqvxgydkAQV8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6z -eM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFpmyPInngiK3BD41VHMWEZ71jF -hS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkKmNEVX58Svnw2 -Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe -vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep -+OkuE6N36B9K ------END CERTIFICATE----- Index: lib/bundler/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem =================================================================== --- lib/bundler/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem (revision 67538) +++ lib/bundler/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem (nonexistent) @@ -1,25 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/lib/bundler/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem#L0 ------BEGIN CERTIFICATE----- -MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEU -MBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFs -IFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290 -MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFowbzELMAkGA1UEBhMCU0Ux -FDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRUcnVzdCBFeHRlcm5h -bCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0EgUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvt -H7xsD821+iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9 -uMq/NzgtHj6RQa1wVsfwTz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzX -mk6vBbOmcZSccbNQYArHE504B4YCqOmoaSYYkKtMsE8jqzpPhNjfzp/haW+710LX -a0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy2xSoRcRdKn23tNbE7qzN -E0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv77+ldU9U0 -WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYD -VR0PBAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0 -Jvf6xCZU7wO94CTLVBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRU -cnVzdCBBQjEmMCQGA1UECxMdQWRkVHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsx -IjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENBIFJvb3SCAQEwDQYJKoZIhvcN -AQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZlj7DYd7usQWxH -YINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5 -6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvC -Nr4TDea9Y355e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEX -c4g/VhsxOBi0cQ+azcgOno4uG+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5a -mnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ= ------END CERTIFICATE----- Index: lib/bundler/ssl_certs/index.rubygems.org/GlobalSignRootCA.pem =================================================================== --- lib/bundler/ssl_certs/index.rubygems.org/GlobalSignRootCA.pem (revision 67538) +++ lib/bundler/ssl_certs/index.rubygems.org/GlobalSignRootCA.pem (nonexistent) @@ -1,21 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/lib/bundler/ssl_certs/index.rubygems.org/GlobalSignRootCA.pem#L0 ------BEGIN CERTIFICATE----- -MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkG -A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv -b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAw -MDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i -YWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYDVQQDExJHbG9iYWxT -aWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDaDuaZ -jc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavp -xy0Sy6scTHAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp -1Wrjsok6Vjk4bwY8iGlbKk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdG -snUOhugZitVtbNV4FpWi6cgKOOvyJBNPc1STE4U6G7weNLWLBYy5d4ux2x8gkasJ -U26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrXgzT/LCrBbBlDSgeF59N8 -9iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8E -BTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0B -AQUFAAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOz -yj1hTdNGCbM+w6DjY1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE -38NflNUVyRRBnMRddWQVDf9VMOyGj/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymP -AbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhHhm4qxFYxldBniYUr+WymXUad -DKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveCX4XSQRjbgbME -HMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A== ------END CERTIFICATE----- Index: lib/bundler/ssl_certs/.document =================================================================== --- lib/bundler/ssl_certs/.document (revision 67538) +++ lib/bundler/ssl_certs/.document (nonexistent) @@ -1 +0,0 @@ -# Ignore all files in this directory Index: lib/bundler/plugin/index.rb =================================================================== --- lib/bundler/plugin/index.rb (revision 67538) +++ lib/bundler/plugin/index.rb (revision 67539) @@ -58,7 +58,10 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/plugin/index.rb#L58 raise SourceConflict.new(name, common) unless common.empty? sources.each {|k| @sources[k] = name } - hooks.each {|e| (@hooks[e] ||= []) << name } + hooks.each do |event| + event_hooks = (@hooks[event] ||= []) << name + event_hooks.uniq! + end @plugin_paths[name] = path @load_paths[name] = load_paths @@ -100,6 +103,14 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/plugin/index.rb#L103 @plugin_paths[name] end + def installed_plugins + @plugin_paths.keys + end + + def plugin_commands(plugin) + @commands.find_all {|_, n| n == plugin }.map(&:first) + end + def source?(source) @sources.key? source end Index: lib/bundler/setup.rb =================================================================== --- lib/bundler/setup.rb (revision 67538) +++ lib/bundler/setup.rb (revision 67539) @@ -6,13 +6,14 @@ if Bundler::SharedHelpers.in_bundle? https://github.com/ruby/ruby/blob/trunk/lib/bundler/setup.rb#L6 require "bundler" if STDOUT.tty? || ENV["BUNDLER_FORCE_TTY"] + Bundler.ui = Bundler::UI::Shell.new begin Bundler.setup rescue Bundler::BundlerError => e - puts "\e[31m#{e.message}\e[0m" - puts e.backtrace.join("\n") if ENV["DEBUG"] + Bundler.ui.warn "\e[31m#{e.message}\e[0m" + Bundler.ui.warn e.backtrace.join("\n") if ENV["DEBUG"] if e.is_a?(Bundler::GemNotFound) - puts "\e[33mRun `bundle install` to install missing gems.\e[0m" + Bundler.ui.warn "\e[33mRun `bundle install` to install missing gems.\e[0m" end exit e.status_code end Index: lib/bundler/gem_version_promoter.rb =================================================================== --- lib/bundler/gem_version_promoter.rb (revision 67538) +++ lib/bundler/gem_version_promoter.rb (revision 67539) @@ -109,7 +109,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/gem_version_promoter.rb#L109 must_match = minor? ? [0] : [0, 1] matches = must_match.map {|idx| gsv.segments[idx] == lsv.segments[idx] } - (matches.uniq == [true]) ? (gsv >= lsv) : false + matches.uniq == [true] ? (gsv >= lsv) : false else true end Index: lib/bundler/similarity_detector.rb =================================================================== --- lib/bundler/similarity_detector.rb (revision 67538) +++ lib/bundler/similarity_detector.rb (revision 67539) @@ -51,7 +51,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/similarity_detector.rb#L51 dm[i][j] = [ dm[i - 1][j - 1] + (this[j - 1] == that[i - 1] ? 0 : sub), dm[i][j - 1] + ins, - dm[i - 1][j] + del + dm[i - 1][j] + del, ].min end end Index: lib/bundler/version.rb =================================================================== --- lib/bundler/version.rb (revision 67538) +++ lib/bundler/version.rb (revision 67539) @@ -1,13 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/lib/bundler/version.rb#L1 # frozen_string_literal: false -# Ruby 1.9.3 and old RubyGems don't play nice with frozen version strings -# rubocop:disable MutableConstant - module Bundler # We're doing this because we might write tests that deal # with other versions of bundler and we are unsure how to # handle this better. - VERSION = "2.0.1" unless defined?(::Bundler::VERSION) + VERSION = "2.1.0.pre.1".freeze unless defined?(::Bundler::VERSION) def self.overwrite_loaded_gem_version begin Index: lib/bundler/vendor/thor/lib/thor/shell/basic.rb =================================================================== --- lib/bundler/vendor/thor/lib/thor/shell/basic.rb (revision 67538) +++ lib/bundler/vendor/thor/lib/thor/shell/basic.rb (revision 67539) @@ -1,6 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/lib/bundler/vendor/thor/lib/thor/shell/basic.rb#L1 class Bundler::Thor module Shell class Basic + DEFAULT_TERMINAL_WIDTH = 80 + attr_accessor :base attr_reader :padding @@ -45,6 +47,10 @@ class Bundler::Thor https://github.com/ruby/ruby/blob/trunk/lib/bundler/vendor/thor/lib/thor/shell/basic.rb#L47 # Asks something to the user and receives a response. # + # If a default value is specified it will be presented to the user + # and allows them to select that value with an empty response. This + # option is ignored when limited answers are supplied. + # # If asked to limit the correct responses, you can pass in an # array of acceptable answers. If one of those is not supplied, # they will be shown a message stating that one of those answers @@ -61,6 +67,8 @@ class Bundler::Thor https://github.com/ruby/ruby/blob/trunk/lib/bundler/vendor/thor/lib/thor/shell/basic.rb#L67 # ==== Example # ask("What is your name?") # + # ask("What is the planet furthest from the sun?", :default => "Pluto") + # # ask("What is your favorite Neopolitan flavor?", :limited_to => ["strawberry", "chocolate", "vanilla"]) # # ask("What is your password?", :echo => false) @@ -222,8 +230,20 @@ class Bundler::Thor https://github.com/ruby/ruby/blob/trunk/lib/bundler/vendor/thor/lib/thor/shell/basic.rb#L230 paras = message.split("\n\n") paras.map! do |unwrapped| - unwrapped.strip.tr("\n", " ").squeeze(" ").gsub(/.{1,#{width}}(?:\s|\Z)/) { ($& + 5.chr).gsub(/\n\005/, "\n").gsub(/\005/, "\n") } - end + counter = 0 + unwrapped.split(" ").inject do |memo, word| + word = word.gsub(/\n\005/, "\n").gsub(/\005/, "\n") + counter = 0 if word.include? "\n" + if (counter + word.length + 1) < width + memo = "#{memo} #{word}" + counter += (word.length + 1) + else + memo = "#{memo}\n#{word}" + counter = word.length + end + memo + end + end.compact! paras.each do |para| para.split("\n").each do |line| @@ -239,11 +259,11 @@ class Bundler::Thor https://github.com/ruby/ruby/blob/trunk/lib/bundler/vendor/thor/lib/thor/shell/basic.rb#L259 # # ==== Parameters # destination<String>:: the destination file to solve conflicts - # block<Proc>:: an optional block that returns the value to be used in diff + # block<Proc>:: an optional block that returns the value to be used in diff and merge # def file_collision(destination) return true if @always_force - options = block_given? ? "[Ynaqdh]" : "[Ynaqh]" + options = block_given? ? "[Ynaqdhm]" : "[Ynaqh]" loop do answer = ask( @@ -267,6 +287,13 @@ class Bundler::Thor https://github.com/ruby/ruby/blob/trunk/lib/bundler/vendor/thor/lib/thor/shell/basic.rb#L287 when is?(:diff) show_diff(destination, yield) if block_given? say "Retrying..." + when is?(:merge) + if block_given? && !merge_tool.empty? + merge(destination, yield) + return nil + end + + say "Please specify merge tool to `THOR_MERGE` env." else say file_collision_help end @@ -279,11 +306,11 @@ class Bundler::Thor https://github.com/ruby/ruby/blob/trunk/lib/bundler/vendor/thor/lib/thor/shell/basic.rb#L306 result = if ENV["THOR_COLUMNS"] ENV["THOR_COLUMNS"].to_i else - unix? ? dynamic_width : 80 + unix? ? dynamic_width : DEFAULT_TERMINAL_WIDTH end - result < 10 ? 80 : result + result < 10 ? DEFAULT_TERMINAL_WIDTH : result rescue - 80 + DEFAULT_TERMINAL_WIDTH end # Called if something goes wrong during the execution. This is used by Bundler::Thor @@ -344,6 +371,7 @@ class Bundler::Thor https://github.com/ruby/ruby/blob/trunk/lib/bundler/vendor/thor/lib/thor/shell/basic.rb#L371 q - quit, abort d - diff, show the differences between the old and the new h - help, show this help + m - merge, run merge tool HELP end @@ -432,6 +460,23 @@ class Bundler::Thor https://github.com/ruby/ruby/blob/trunk/lib/bundler/vendor/thor/lib/thor/shell/basic.rb#L460 end correct_answer end + + def merge(destination, content) #:nodoc: + require "tempfile" + Tempfile.open([File.basename(destination), File.extname(destination)], File.dirname(destination)) do |temp| + temp.write content + temp.rewind + system %(#{merge_tool} "#{temp.path}" "#{destination}") + end + end + + def merge_tool #:nodoc: + @merge_tool ||= ENV["THOR_MERGE"] || git_merge_tool + end + + def git_merge_tool #:nodoc: + `git config merge.tool`.rstrip rescue "" + end end end end Index: lib/bundler/vendor/thor/lib/thor/base.rb =================================================================== --- lib/bundler/vendor/thor/lib/thor/base.rb (revision 67538) +++ lib/bundler/vendor/thor/lib/thor/base.rb (revision 67539) @@ -113,7 +113,7 @@ class Bundler::Thor https://github.com/ruby/ruby/blob/trunk/lib/bundler/vendor/thor/lib/thor/base.rb#L113 end # Whenever a class inherits from Bundler::Thor or Bundler::Thor::Group, we should track the - # class and the file on Bundler::Thor::Base. This is the method responsable for it. + # class and the file on Bundler::Thor::Base. This is the method responsible for it. # def register_klass_file(klass) #:nodoc: file = caller[1].match(/(.*):\d+/)[1] @@ -466,13 +466,13 @@ class Bundler::Thor https://github.com/ruby/ruby/blob/trunk/lib/bundler/vendor/thor/lib/thor/base.rb#L466 dispatch(nil, given_args.dup, nil, config) rescue Bundler::Thor::Error => e config[:debug] || ENV["THOR_DEBUG"] == "1" ? (raise e) : config[:shell].error(e.message) - exit(1) if exit_on_failure? + exit(false) if exit_on_failure? rescue Errno::EPIPE # This happens if a thor command is piped to something like `head`, # which closes the pipe when it's done reading. This will also # mean that if the pipe is closed, further unnecessary # computation will not occur. - exit(0) + exit(true) end # Allows to use private methods from parent in child classes as commands. @@ -493,8 +493,7 @@ class Bundler::Thor https://github.com/ruby/ruby/blob/trunk/lib/bundler/vendor/thor/lib/thor/base.rb#L493 alias_method :public_task, :public_command def handle_no_command_error(command, has_namespace = $thor_runner) #:nodoc: - raise UndefinedCommandError, "Could not find command #{command.inspect} in #{namespace.inspect} namespace." if has_namespace - raise UndefinedCommandError, "Could not find command #{command.inspect}." + raise UndefinedCommandError.new(command, all_commands.keys, (namespace if has_namespace)) end alias_method :handle_no_task_error, :handle_no_command_error Index: lib/bundler/vendor/thor/lib/thor/error.rb =================================================================== --- lib/bundler/vendor/thor/lib/thor/error.rb (revision 67538) +++ lib/bundler/vendor/thor/lib/thor/error.rb (revision 67539) @@ -1,4 +1,23 @@ https://github.com/ruby/ruby/blob/trunk/lib/bundler/vendor/thor/lib/thor/error.rb#L1 class Bundler::Thor + Correctable = + begin + require 'did_you_mean' + + # In order to support versions of Ruby that don't have keyword + # arguments, we need ou (... truncated) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/