[前][次][番号順一覧][スレッド一覧]

ruby-changes:47663

From: hsbt <ko1@a...>
Date: Fri, 8 Sep 2017 17:45:52 +0900 (JST)
Subject: [ruby-changes:47663] hsbt:r59779 (trunk): Merge bundler to standard libraries.

hsbt	2017-09-08 17:45:41 +0900 (Fri, 08 Sep 2017)

  New Revision: 59779

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59779

  Log:
    Merge bundler to standard libraries.
    
      rubygems 2.7.x depends bundler-1.15.x. This is preparation for
      rubygems and bundler migration.
    
      * lib/bundler.rb, lib/bundler/*: files of bundler-1.15.4
      * spec/bundler/*: rspec examples of bundler-1.15.4. I applied patches.
        * https://github.com/bundler/bundler/pull/6007
        * Exclude not working examples on ruby repository.
        * Fake ruby interpriter instead of installed ruby.
      * Makefile.in: Added test task named `test-bundler`. This task is only
        working macOS/linux yet. I'm going to support Windows environment later.
      * tool/sync_default_gems.rb: Added sync task for bundler.
    
      [Feature #12733][ruby-core:77172]

  Added directories:
    trunk/lib/bundler/
    trunk/lib/bundler/cli/
    trunk/lib/bundler/compact_index_client/
    trunk/lib/bundler/fetcher/
    trunk/lib/bundler/installer/
    trunk/lib/bundler/plugin/
    trunk/lib/bundler/plugin/api/
    trunk/lib/bundler/plugin/installer/
    trunk/lib/bundler/source/
    trunk/lib/bundler/source/git/
    trunk/lib/bundler/source/path/
    trunk/lib/bundler/source/rubygems/
    trunk/lib/bundler/ssl_certs/
    trunk/lib/bundler/ssl_certs/index.rubygems.org/
    trunk/lib/bundler/ssl_certs/rubygems.global.ssl.fastly.net/
    trunk/lib/bundler/ssl_certs/rubygems.org/
    trunk/lib/bundler/templates/
    trunk/lib/bundler/templates/newgem/
    trunk/lib/bundler/templates/newgem/bin/
    trunk/lib/bundler/templates/newgem/exe/
    trunk/lib/bundler/templates/newgem/ext/
    trunk/lib/bundler/templates/newgem/ext/newgem/
    trunk/lib/bundler/templates/newgem/lib/
    trunk/lib/bundler/templates/newgem/lib/newgem/
    trunk/lib/bundler/templates/newgem/spec/
    trunk/lib/bundler/templates/newgem/test/
    trunk/lib/bundler/ui/
    trunk/lib/bundler/vendor/
    trunk/lib/bundler/vendor/molinillo/
    trunk/lib/bundler/vendor/molinillo/lib/
    trunk/lib/bundler/vendor/molinillo/lib/molinillo/
    trunk/lib/bundler/vendor/molinillo/lib/molinillo/delegates/
    trunk/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/
    trunk/lib/bundler/vendor/molinillo/lib/molinillo/modules/
    trunk/lib/bundler/vendor/net-http-persistent/
    trunk/lib/bundler/vendor/net-http-persistent/lib/
    trunk/lib/bundler/vendor/net-http-persistent/lib/net/
    trunk/lib/bundler/vendor/net-http-persistent/lib/net/http/
    trunk/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/
    trunk/lib/bundler/vendor/thor/
    trunk/lib/bundler/vendor/thor/lib/
    trunk/lib/bundler/vendor/thor/lib/thor/
    trunk/lib/bundler/vendor/thor/lib/thor/actions/
    trunk/lib/bundler/vendor/thor/lib/thor/core_ext/
    trunk/lib/bundler/vendor/thor/lib/thor/line_editor/
    trunk/lib/bundler/vendor/thor/lib/thor/parser/
    trunk/lib/bundler/vendor/thor/lib/thor/shell/
    trunk/spec/bundler/
    trunk/spec/bundler/bundler/
    trunk/spec/bundler/bundler/compact_index_client/
    trunk/spec/bundler/bundler/fetcher/
    trunk/spec/bundler/bundler/installer/
    trunk/spec/bundler/bundler/plugin/
    trunk/spec/bundler/bundler/plugin/api/
    trunk/spec/bundler/bundler/source/
    trunk/spec/bundler/bundler/source/git/
    trunk/spec/bundler/bundler/source/rubygems/
    trunk/spec/bundler/bundler/ssl_certs/
    trunk/spec/bundler/cache/
    trunk/spec/bundler/commands/
    trunk/spec/bundler/install/
    trunk/spec/bundler/install/gemfile/
    trunk/spec/bundler/install/gems/
    trunk/spec/bundler/lock/
    trunk/spec/bundler/other/
    trunk/spec/bundler/plugins/
    trunk/spec/bundler/plugins/source/
    trunk/spec/bundler/realworld/
    trunk/spec/bundler/resolver/
    trunk/spec/bundler/runtime/
    trunk/spec/bundler/support/
    trunk/spec/bundler/support/artifice/
    trunk/spec/bundler/update/
    trunk/spec/bundler/update/gems/
  Added files:
    trunk/bin/bundle
    trunk/bin/bundle_ruby
    trunk/bin/bundler
    trunk/lib/bundler/capistrano.rb
    trunk/lib/bundler/cli/add.rb
    trunk/lib/bundler/cli/binstubs.rb
    trunk/lib/bundler/cli/cache.rb
    trunk/lib/bundler/cli/check.rb
    trunk/lib/bundler/cli/clean.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/exec.rb
    trunk/lib/bundler/cli/gem.rb
    trunk/lib/bundler/cli/info.rb
    trunk/lib/bundler/cli/init.rb
    trunk/lib/bundler/cli/inject.rb
    trunk/lib/bundler/cli/install.rb
    trunk/lib/bundler/cli/issue.rb
    trunk/lib/bundler/cli/lock.rb
    trunk/lib/bundler/cli/open.rb
    trunk/lib/bundler/cli/outdated.rb
    trunk/lib/bundler/cli/package.rb
    trunk/lib/bundler/cli/platform.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/viz.rb
    trunk/lib/bundler/cli.rb
    trunk/lib/bundler/compact_index_client/cache.rb
    trunk/lib/bundler/compact_index_client/updater.rb
    trunk/lib/bundler/compact_index_client.rb
    trunk/lib/bundler/constants.rb
    trunk/lib/bundler/current_ruby.rb
    trunk/lib/bundler/definition.rb
    trunk/lib/bundler/dep_proxy.rb
    trunk/lib/bundler/dependency.rb
    trunk/lib/bundler/deployment.rb
    trunk/lib/bundler/deprecate.rb
    trunk/lib/bundler/dsl.rb
    trunk/lib/bundler/endpoint_specification.rb
    trunk/lib/bundler/env.rb
    trunk/lib/bundler/environment_preserver.rb
    trunk/lib/bundler/errors.rb
    trunk/lib/bundler/feature_flag.rb
    trunk/lib/bundler/fetcher/base.rb
    trunk/lib/bundler/fetcher/compact_index.rb
    trunk/lib/bundler/fetcher/dependency.rb
    trunk/lib/bundler/fetcher/downloader.rb
    trunk/lib/bundler/fetcher/index.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_remote_fetcher.rb
    trunk/lib/bundler/gem_tasks.rb
    trunk/lib/bundler/gem_version_promoter.rb
    trunk/lib/bundler/gemdeps.rb
    trunk/lib/bundler/graph.rb
    trunk/lib/bundler/index.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/standalone.rb
    trunk/lib/bundler/installer.rb
    trunk/lib/bundler/lazy_specification.rb
    trunk/lib/bundler/lockfile_parser.rb
    trunk/lib/bundler/match_platform.rb
    trunk/lib/bundler/mirror.rb
    trunk/lib/bundler/plugin/api/source.rb
    trunk/lib/bundler/plugin/api.rb
    trunk/lib/bundler/plugin/dsl.rb
    trunk/lib/bundler/plugin/index.rb
    trunk/lib/bundler/plugin/installer/git.rb
    trunk/lib/bundler/plugin/installer/rubygems.rb
    trunk/lib/bundler/plugin/installer.rb
    trunk/lib/bundler/plugin/source_list.rb
    trunk/lib/bundler/plugin.rb
    trunk/lib/bundler/psyched_yaml.rb
    trunk/lib/bundler/remote_specification.rb
    trunk/lib/bundler/resolver.rb
    trunk/lib/bundler/retry.rb
    trunk/lib/bundler/ruby_dsl.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/gemspec.rb
    trunk/lib/bundler/source/git/git_proxy.rb
    trunk/lib/bundler/source/git.rb
    trunk/lib/bundler/source/path/installer.rb
    trunk/lib/bundler/source/path.rb
    trunk/lib/bundler/source/rubygems/remote.rb
    trunk/lib/bundler/source/rubygems.rb
    trunk/lib/bundler/source.rb
    trunk/lib/bundler/source_list.rb
    trunk/lib/bundler/spec_set.rb
    trunk/lib/bundler/ssl_certs/.document
    trunk/lib/bundler/ssl_certs/certificate_manager.rb
    trunk/lib/bundler/ssl_certs/index.rubygems.org/GlobalSignRootCA.pem
    trunk/lib/bundler/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem
    trunk/lib/bundler/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem
    trunk/lib/bundler/stub_specification.rb
    trunk/lib/bundler/templates/Executable
    trunk/lib/bundler/templates/Executable.standalone
    trunk/lib/bundler/templates/Gemfile
    trunk/lib/bundler/templates/newgem/.travis.yml.tt
    trunk/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt
    trunk/lib/bundler/templates/newgem/Gemfile.tt
    trunk/lib/bundler/templates/newgem/LICENSE.txt.tt
    trunk/lib/bundler/templates/newgem/README.md.tt
    trunk/lib/bundler/templates/newgem/Rakefile.tt
    trunk/lib/bundler/templates/newgem/bin/console.tt
    trunk/lib/bundler/templates/newgem/bin/setup.tt
    trunk/lib/bundler/templates/newgem/exe/newgem.tt
    trunk/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt
    trunk/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt
    trunk/lib/bundler/templates/newgem/ext/newgem/newgem.h.tt
    trunk/lib/bundler/templates/newgem/gitignore.tt
    trunk/lib/bundler/templates/newgem/lib/newgem/version.rb.tt
    trunk/lib/bundler/templates/newgem/lib/newgem.rb.tt
    trunk/lib/bundler/templates/newgem/newgem.gemspec.tt
    trunk/lib/bundler/templates/newgem/rspec.tt
    trunk/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt
    trunk/lib/bundler/templates/newgem/spec/spec_helper.rb.tt
    trunk/lib/bundler/templates/newgem/test/newgem_test.rb.tt
    trunk/lib/bundler/templates/newgem/test/test_helper.rb.tt
    trunk/lib/bundler/ui/rg_proxy.rb
    trunk/lib/bundler/ui/shell.rb
    trunk/lib/bundler/ui/silent.rb
    trunk/lib/bundler/ui.rb
    trunk/lib/bundler/uri_credentials_filter.rb
    trunk/lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb
    trunk/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb
    trunk/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb
    trunk/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb
    trunk/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb
    trunk/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb
    trunk/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb
    trunk/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb
    trunk/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb
    trunk/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb
    trunk/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb
    trunk/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb
    trunk/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb
    trunk/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb
    trunk/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb
    trunk/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb
    trunk/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb
    trunk/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb
    trunk/lib/bundler/vendor/molinillo/lib/molinillo/state.rb
    trunk/lib/bundler/vendor/molinillo/lib/molinillo.rb
    trunk/lib/bundler/vendor/net-http-persistent/lib/net/http/faster.rb
    trunk/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/ssl_reuse.rb
    trunk/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb
    trunk/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb
    trunk/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb
    trunk/lib/bundler/vendor/thor/lib/thor/actions/directory.rb
    trunk/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb
    trunk/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb
    trunk/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.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/command.rb
    trunk/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb
    trunk/lib/bundler/vendor/thor/lib/thor/core_ext/io_binary_read.rb
    trunk/lib/bundler/vendor/thor/lib/thor/core_ext/ordered_hash.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/invocation.rb
    trunk/lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb
    trunk/lib/bundler/vendor/thor/lib/thor/line_editor/readline.rb
    trunk/lib/bundler/vendor/thor/lib/thor/line_editor.rb
    trunk/lib/bundler/vendor/thor/lib/thor/parser/argument.rb
    trunk/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb
    trunk/lib/bundler/vendor/thor/lib/thor/parser/option.rb
    trunk/lib/bundler/vendor/thor/lib/thor/parser/options.rb
    trunk/lib/bundler/vendor/thor/lib/thor/parser.rb
    trunk/lib/bundler/vendor/thor/lib/thor/rake_compat.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/color.rb
    trunk/lib/bundler/vendor/thor/lib/thor/shell/html.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/vendor/thor/lib/thor.rb
    trunk/lib/bundler/vendored_molinillo.rb
    trunk/lib/bundler/vendored_persistent.rb
    trunk/lib/bundler/vendored_thor.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.gemspec
    trunk/lib/bundler.rb
    trunk/spec/bundler/bundler/bundler_spec.rb
    trunk/spec/bundler/bundler/cli_spec.rb
    trunk/spec/bundler/bundler/compact_index_client/updater_spec.rb
    trunk/spec/bundler/bundler/definition_spec.rb
    trunk/spec/bundler/bundler/dsl_spec.rb
    trunk/spec/bundler/bundler/endpoint_specification_spec.rb
    trunk/spec/bundler/bundler/env_spec.rb
    trunk/spec/bundler/bundler/environment_preserver_spec.rb
    trunk/spec/bundler/bundler/fetcher/base_spec.rb
    trunk/spec/bundler/bundler/fetcher/compact_index_spec.rb
    trunk/spec/bundler/bundler/fetcher/dependency_spec.rb
    trunk/spec/bundler/bundler/fetcher/downloader_spec.rb
    trunk/spec/bundler/bundler/fetcher/index_spec.rb
    trunk/spec/bundler/bundler/fetcher_spec.rb
    trunk/spec/bundler/bundler/friendly_errors_spec.rb
    trunk/spec/bundler/bundler/gem_helper_spec.rb
    trunk/spec/bundler/bundler/gem_version_promoter_spec.rb
    trunk/spec/bundler/bundler/index_spec.rb
    trunk/spec/bundler/bundler/installer/gem_installer_spec.rb
    trunk/spec/bundler/bundler/installer/parallel_installer_spec.rb
    trunk/spec/bundler/bundler/installer/spec_installation_spec.rb
    trunk/spec/bundler/bundler/lockfile_parser_spec.rb
    trunk/spec/bundler/bundler/mirror_spec.rb
    trunk/spec/bundler/bundler/plugin/api/source_spec.rb
    trunk/spec/bundler/bundler/plugin/api_spec.rb
    trunk/spec/bundler/bundler/plugin/dsl_spec.rb
    trunk/spec/bundler/bundler/plugin/index_spec.rb
    trunk/spec/bundler/bundler/plugin/installer_spec.rb
    trunk/spec/bundler/bundler/plugin/source_list_spec.rb
    trunk/spec/bundler/bundler/plugin_spec.rb
    trunk/spec/bundler/bundler/psyched_yaml_spec.rb
    trunk/spec/bundler/bundler/remote_specification_spec.rb
    trunk/spec/bundler/bundler/retry_spec.rb
    trunk/spec/bundler/bundler/ruby_dsl_spec.rb
    trunk/spec/bundler/bundler/ruby_version_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/path_spec.rb
    trunk/spec/bundler/bundler/source/rubygems/remote_spec.rb
    trunk/spec/bundler/bundler/source/rubygems_spec.rb
    trunk/spec/bundler/bundler/source_list_spec.rb
    trunk/spec/bundler/bundler/source_spec.rb
    trunk/spec/bundler/bundler/spec_set_spec.rb
    trunk/spec/bundler/bundler/ssl_certs/certificate_manager_spec.rb
    trunk/spec/bundler/bundler/stub_specification_spec.rb
    trunk/spec/bundler/bundler/ui_spec.rb
    trunk/spec/bundler/bundler/uri_credentials_filter_spec.rb
    trunk/spec/bundler/bundler/version_ranges_spec.rb
    trunk/spec/bundler/bundler/worker_spec.rb
    trunk/spec/bundler/bundler/yaml_serializer_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/doctor_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/issue_spec.rb
    trunk/spec/bundler/commands/licenses_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/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/force_spec.rb
    trunk/spec/bundler/install/gemfile/eval_gemfile_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/install_if.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/env_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/gems/win32_spec.rb
    trunk/spec/bundler/install/gemspecs_spec.rb
    trunk/spec/bundler/install/git_spec.rb
    trunk/spec/bundler/install/path_spec.rb
    trunk/spec/bundler/install/post_bundle_message_spec.rb
    trunk/spec/bundler/install/prereleases_spec.rb
    trunk/spec/bundler/install/security_policy_spec.rb
    trunk/spec/bundler/install/yanked_spec.rb
    trunk/spec/bundler/lock/git_spec.rb
    trunk/spec/bundler/lock/lockfile_spec.rb
    trunk/spec/bundler/other/bundle_ruby_spec.rb
    trunk/spec/bundler/other/cli_dispatch_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/other/ssl_cert_spec.rb
    trunk/spec/bundler/plugins/command_spec.rb
    trunk/spec/bundler/plugins/hook_spec.rb
    trunk/spec/bundler/plugins/install_spec.rb
    trunk/spec/bundler/plugins/source/example_spec.rb
    trunk/spec/bundler/plugins/source_spec.rb
    trunk/spec/bundler/quality_spec.rb
    trunk/spec/bundler/realworld/dependency_api_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/resolver/platform_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/load_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/runtime/with_clean_env_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/compact_index_basic_authentication.rb
    trunk/spec/bundler/support/artifice/compact_index_checksum_mismatch.rb
    trunk/spec/bundler/support/artifice/compact_index_concurrent_download.rb
    trunk/spec/bundler/support/artifice/compact_index_creds_diff_host.rb
    trunk/spec/bundler/support/artifice/compact_index_extra.rb
    trunk/spec/bundler/support/artifice/compact_index_extra_api.rb
    trunk/spec/bundler/support/artifice/compact_index_extra_missing.rb
    trunk/spec/bundler/support/artifice/compact_index_forbidden.rb
    trunk/spec/bundler/support/artifice/compact_index_host_redirect.rb
    trunk/spec/bundler/support/artifice/compact_index_partial_update.rb
    trunk/spec/bundler/support/artifice/compact_index_redirects.rb
    trunk/spec/bundler/support/artifice/compact_index_strict_basic_authentication.rb
    trunk/spec/bundler/support/artifice/compact_index_wrong_dependencies.rb
    trunk/spec/bundler/support/artifice/compact_index_wrong_gem_checksum.rb
    trunk/spec/bundler/support/artifice/endopint_marshal_fail_basic_authentication.rb
    trunk/spec/bundler/support/artifice/endpoint.rb
    trunk/spec/bundler/support/artifice/endpoint_500.rb
    trunk/spec/bundler/support/artifice/endpoint_api_forbidden.rb
    trunk/spec/bundler/support/artifice/endpoint_api_missing.rb
    trunk/spec/bundler/support/artifice/endpoint_basic_authentication.rb
    trunk/spec/bundler/support/artifice/endpoint_creds_diff_host.rb
    trunk/spec/bundler/support/artifice/endpoint_extra.rb
    trunk/spec/bundler/support/artifice/endpoint_extra_api.rb
    trunk/spec/bundler/support/artifice/endpoint_extra_missing.rb
    trunk/spec/bundler/support/artifice/endpoint_fallback.rb
    trunk/spec/bundler/support/artifice/endpoint_host_redirect.rb
    trunk/spec/bundler/support/artifice/endpoint_marshal_fail.rb
    trunk/spec/bundler/support/artifice/endpoint_mirror_source.rb
    trunk/spec/bundler/support/artifice/endpoint_redirect.rb
    trunk/spec/bundler/support/artifice/endpoint_strict_basic_authentication.rb
    trunk/spec/bundler/support/artifice/endpoint_timeout.rb
    trunk/spec/bundler/support/artifice/fail.rb
    trunk/spec/bundler/support/artifice/windows.rb
    trunk/spec/bundler/support/builders.rb
    trunk/spec/bundler/support/code_climate.rb
    trunk/spec/bundler/support/hax.rb
    trunk/spec/bundler/support/helpers.rb
    trunk/spec/bundler/support/indexes.rb
    trunk/spec/bundler/support/less_than_proc.rb
    trunk/spec/bundler/support/matchers.rb
    trunk/spec/bundler/support/path.rb
    trunk/spec/bundler/support/permissions.rb
    trunk/spec/bundler/support/platforms.rb
    trunk/spec/bundler/support/rubygems_ext.rb
    trunk/spec/bundler/support/silent_logger.rb
    trunk/spec/bundler/support/sometimes.rb
    trunk/spec/bundler/support/streams.rb
    trunk/spec/bundler/support/sudo.rb
    trunk/spec/bundler/support/the_bundle.rb
    trunk/spec/bundler/update/gems/post_install_spec.rb
    trunk/spec/bundler/update/git_spec.rb
    trunk/spec/bundler/update/path_spec.rb
  Modified files:
    trunk/.gitignore
    trunk/Makefile.in
    trunk/spec/README.md
    trunk/tool/sync_default_gems.rb
Index: spec/bundler/plugins/install_spec.rb
===================================================================
--- spec/bundler/plugins/install_spec.rb	(nonexistent)
+++ spec/bundler/plugins/install_spec.rb	(revision 59779)
@@ -0,0 +1,258 @@ https://github.com/ruby/ruby/blob/trunk/spec/bundler/plugins/install_spec.rb#L1
+# frozen_string_literal: true
+require "spec_helper"
+
+RSpec.describe "bundler plugin install" do
+  before do
+    build_repo2 do
+      build_plugin "foo"
+      build_plugin "kung-foo"
+    end
+  end
+
+  it "shows proper message when gem in not found in the source" do
+    bundle "plugin install no-foo --source file://#{gem_repo1}"
+
+    expect(out).to include("Could not find")
+    plugin_should_not_be_installed("no-foo")
+  end
+
+  it "installs from rubygems source" do
+    bundle "plugin install foo --source file://#{gem_repo2}"
+
+    expect(out).to include("Installed plugin foo")
+    plugin_should_be_installed("foo")
+  end
+
+  it "installs multiple plugins" do
+    bundle "plugin install foo kung-foo --source file://#{gem_repo2}"
+
+    expect(out).to include("Installed plugin foo")
+    expect(out).to include("Installed plugin kung-foo")
+
+    plugin_should_be_installed("foo", "kung-foo")
+  end
+
+  it "uses the same version for multiple plugins" do
+    update_repo2 do
+      build_plugin "foo", "1.1"
+      build_plugin "kung-foo", "1.1"
+    end
+
+    bundle "plugin install foo kung-foo --version '1.0' --source file://#{gem_repo2}"
+
+    expect(out).to include("Installing foo 1.0")
+    expect(out).to include("Installing kung-foo 1.0")
+    plugin_should_be_installed("foo", "kung-foo")
+  end
+
+  it "works with different load paths" do
+    build_repo2 do
+      build_plugin "testing" do |s|
+        s.write "plugins.rb", <<-RUBY
+          require "fubar"
+          class Test < Bundler::Plugin::API
+            command "check2"
+
+            def exec(command, args)
+              puts "mate"
+            end
+          end
+        RUBY
+        s.require_paths = %w(lib src)
+        s.write("src/fubar.rb")
+      end
+    end
+    bundle "plugin install testing --source file://#{gem_repo2}"
+
+    bundle "check2", "no-color" => false
+    expect(out).to eq("mate")
+  end
+
+  context "malformatted plugin" do
+    it "fails when plugins.rb is missing" do
+      update_repo2 do
+        build_plugin "foo", "1.1"
+        build_plugin "kung-foo", "1.1"
+      end
+
+      bundle "plugin install foo kung-foo --version '1.0' --source file://#{gem_repo2}"
+
+      expect(out).to include("Installing foo 1.0")
+      expect(out).to include("Installing kung-foo 1.0")
+      plugin_should_be_installed("foo", "kung-foo")
+
+      build_repo2 do
+        build_gem "charlie"
+      end
+
+      bundle "plugin install charlie --source file://#{gem_repo2}"
+
+      expect(out).to include("plugins.rb was not found")
+
+      expect(global_plugin_gem("charlie-1.0")).not_to be_directory
+
+      plugin_should_be_installed("foo", "kung-foo")
+      plugin_should_not_be_installed("charlie")
+    end
+
+    it "fails when plugins.rb throws exception on load" do
+      build_repo2 do
+        build_plugin "chaplin" do |s|
+          s.write "plugins.rb", <<-RUBY
+            raise "I got you man"
+          RUBY
+        end
+      end
+
+      bundle "plugin install chaplin --source file://#{gem_repo2}"
+
+      expect(global_plugin_gem("chaplin-1.0")).not_to be_directory
+
+      plugin_should_not_be_installed("chaplin")
+    end
+  end
+
+  context "git plugins" do
+    it "installs form a git source" do
+      build_git "foo" do |s|
+        s.write "plugins.rb"
+      end
+
+      bundle "plugin install foo --git file://#{lib_path("foo-1.0")}"
+
+      expect(out).to include("Installed plugin foo")
+      plugin_should_be_installed("foo")
+    end
+  end
+
+  context "Gemfile eval" do
+    it "installs plugins listed in gemfile" do
+      gemfile <<-G
+        source 'file://#{gem_repo2}'
+        plugin 'foo'
+        gem 'rack', "1.0.0"
+      G
+
+      bundle "install"
+
+      expect(out).to include("Installed plugin foo")
+
+      expect(out).to include("Bundle complete!")
+
+      expect(the_bundle).to include_gems("rack 1.0.0")
+      plugin_should_be_installed("foo")
+    end
+
+    it "accepts plugin version" do
+      update_repo2 do
+        build_plugin "foo", "1.1.0"
+      end
+
+      install_gemfile <<-G
+        source 'file://#{gem_repo2}'
+        plugin 'foo', "1.0"
+      G
+
+      bundle "install"
+
+      expect(out).to include("Installing foo 1.0")
+
+      plugin_should_be_installed("foo")
+
+      expect(out).to include("Bundle complete!")
+    end
+
+    it "accepts git sources" do
+      build_git "ga-plugin" do |s|
+        s.write "plugins.rb"
+      end
+
+      install_gemfile <<-G
+        plugin 'ga-plugin', :git => "#{lib_path("ga-plugin-1.0")}"
+      G
+
+      expect(out).to include("Installed plugin ga-plugin")
+      plugin_should_be_installed("ga-plugin")
+    end
+  end
+
+  context "inline gemfiles" do
+    it "installs the listed plugins" do
+      code = <<-RUBY
+        require "bundler/inline"
+
+        gemfile do
+          source 'file://#{gem_repo2}'
+          plugin 'foo'
+        end
+      RUBY
+
+      ruby code
+      expect(local_plugin_gem("foo-1.0", "plugins.rb")).to exist
+    end
+  end
+
+  describe "local plugin" do
+    it "is installed when inside an app" do
+      gemfile ""
+      bundle "plugin install foo --source file://#{gem_repo2}"
+
+      plugin_should_be_installed("foo")
+      expect(local_plugin_gem("foo-1.0")).to be_directory
+    end
+
+    context "conflict with global plugin" do
+      before do
+        update_repo2 do
+          build_plugin "fubar" do |s|
+            s.write "plugins.rb", <<-RUBY
+              class Fubar < Bundler::Plugin::API
+                command "shout"
+
+                def exec(command, args)
+                  puts "local_one"
+                end
+              end
+            RUBY
+          end
+        end
+
+        # inside the app
+        gemfile "source 'file://#{gem_repo2}'\nplugin 'fubar'"
+        bundle "install"
+
+        update_repo2 do
+          build_plugin "fubar", "1.1" do |s|
+            s.write "plugins.rb", <<-RUBY
+              class Fubar < Bundler::Plugin::API
+                command "shout"
+
+                def exec(command, args)
+                  puts "global_one"
+                end
+              end
+            RUBY
+          end
+        end
+
+        # outside the app
+        Dir.chdir tmp
+        bundle "plugin install fubar --source file://#{gem_repo2}"
+      end
+
+      it "inside the app takes precedence over global plugin" do
+        Dir.chdir bundled_app
+
+        bundle "shout"
+        expect(out).to eq("local_one")
+      end
+
+      it "outside the app global plugin is used" do
+        Dir.chdir tmp
+
+        bundle "shout"
+        expect(out).to eq("global_one")
+      end
+    end
+  end
+end
Index: spec/bundler/update/gems/post_install_spec.rb
===================================================================
--- spec/bundler/update/gems/post_install_spec.rb	(nonexistent)
+++ spec/bundler/update/gems/post_install_spec.rb	(revision 59779)
@@ -0,0 +1,77 @@ https://github.com/ruby/ruby/blob/trunk/spec/bundler/update/gems/post_install_spec.rb#L1
+# frozen_string_literal: true
+require "spec_helper"
+
+RSpec.describe "bundle update" do
+  let(:config) {}
+
+  before do
+    gemfile <<-G
+      source "file://#{gem_repo1}"
+      gem 'rack', "< 1.0"
+      gem 'thin'
+    G
+
+    bundle! "config #{config}" if config
+
+    bundle! :install
+  end
+
+  shared_examples "a config observer" do
+    context "when ignore post-install messages for gem is set" do
+      let(:config) { "ignore_messages.rack true" }
+
+      it "doesn't display gem's post-install message" do
+        expect(out).not_to include("Rack's post install message")
+      end
+    end
+
+    context "when ignore post-install messages for all gems" do
+      let(:config) { "ignore_messages true" }
+
+      it "doesn't display any post-install messages" do
+        expect(out).not_to include("Post-install message")
+      end
+    end
+  end
+
+  shared_examples "a post-install message outputter" do
+    it "should display post-install messages for updated gems" do
+      expect(out).to include("Post-install message from rack:")
+      expect(out).to include("Rack's post install message")
+    end
+
+    it "should not display the post-install message for non-updated gems" do
+      expect(out).not_to include("Thin's post install message")
+    end
+  end
+
+  context "when listed gem is updated" do
+    before do
+      gemfile <<-G
+        source "file://#{gem_repo1}"
+        gem 'rack'
+        gem 'thin'
+      G
+
+      bundle! :update
+    end
+
+    it_behaves_like "a post-install message outputter"
+    it_behaves_like "a config observer"
+  end
+
+  context "when dependency triggers update" do
+    before do
+      gemfile <<-G
+        source "file://#{gem_repo1}"
+        gem 'rack-obama'
+        gem 'thin'
+      G
+
+      bundle! :update
+    end
+
+    it_behaves_like "a post-install message outputter"
+    it_behaves_like "a config observer"
+  end
+end
Index: spec/bundler/cache/git_spec.rb
===================================================================
--- spec/bundler/cache/git_spec.rb	(nonexistent)
+++ spec/bundler/cache/git_spec.rb	(revision 59779)
@@ -0,0 +1,215 @@ https://github.com/ruby/ruby/blob/trunk/spec/bundler/cache/git_spec.rb#L1
+# frozen_string_literal: true
+require "spec_helper"
+
+RSpec.describe "git base name" do
+  it "base_name should strip private repo uris" do
+    source = Bundler::Source::Git.new("uri" => "git@g...:bundler.git")
+    expect(source.send(:base_name)).to eq("bundler")
+  end
+
+  it "base_name should strip network share paths" do
+    source = Bundler::Source::Git.new("uri" => "//MachineName/ShareFolder")
+    expect(source.send(:base_name)).to eq("ShareFolder")
+  end
+end
+
+%w(cache package).each do |cmd|
+  RSpec.describe "bundle #{cmd} with git" do
+    it "copies repository to vendor cache and uses it" do
+      git = build_git "foo"
+      ref = git.ref_for("master", 11)
+
+      install_gemfile <<-G
+        gem "foo", :git => '#{lib_path("foo-1.0")}'
+      G
+
+      bundle "#{cmd} --all"
+      expect(bundled_app("vendor/cache/foo-1.0-#{ref}")).to exist
+      expect(bundled_app("vendor/cache/foo-1.0-#{ref}/.git")).not_to exist
+      expect(bundled_app("vendor/cache/foo-1.0-#{ref}/.bundlecache")).to be_file
+
+      FileUtils.rm_rf lib_path("foo-1.0")
+      expect(the_bundle).to include_gems "foo 1.0"
+    end
+
+    it "copies repository to vendor cache and uses it even when installed with bundle --path" do
+      git = build_git "foo"
+      ref = git.ref_for("master", 11)
+
+      install_gemfile <<-G
+        gem "foo", :git => '#{lib_path("foo-1.0")}'
+      G
+
+      bundle "install --path vendor/bundle"
+      bundle "#{cmd} --all"
+
+      expect(bundled_app("vendor/cache/foo-1.0-#{ref}")).to exist
+      expect(bundled_app("vendor/cache/foo-1.0-#{ref}/.git")).not_to exist
+
+      FileUtils.rm_rf lib_path("foo-1.0")
+      expect(the_bundle).to include_gems "foo 1.0"
+    end
+
+    it "runs twice without exploding" do
+      build_git "foo"
+
+      install_gemfile <<-G
+        gem "foo", :git => '#{lib_path("foo-1.0")}'
+      G
+
+      bundle "#{cmd} --all"
+      bundle "#{cmd} --all"
+
+      expect(err).to lack_errors
+      FileUtils.rm_rf lib_path("foo-1.0")
+      expect(the_bundle).to include_gems "foo 1.0"
+    end
+
+    it "tracks updates" do
+      git = build_git "foo"
+      old_ref = git.ref_for("master", 11)
+
+      install_gemfile <<-G
+        gem "foo", :git => '#{lib_path("foo-1.0")}'
+      G
+
+      bundle "#{cmd} --all"
+
+      update_git "foo" do |s|
+        s.write "lib/foo.rb", "puts :CACHE"
+      end
+
+      ref = git.ref_for("master", 11)
+      expect(ref).not_to eq(old_ref)
+
+      bundle "update"
+      bundle "#{cmd} --all"
+
+      expect(bundled_app("vendor/cache/foo-1.0-#{ref}")).to exist
+      expect(bundled_app("vendor/cache/foo-1.0-#{old_ref}")).not_to exist
+
+      FileUtils.rm_rf lib_path("foo-1.0")
+      run "require 'foo'"
+      expect(out).to eq("CACHE")
+    end
+
+    it "tracks updates when specifying the gem" do
+      git = build_git "foo"
+      old_ref = git.ref_for("master", 11)
+
+      install_gemfile <<-G
+        gem "foo", :git => '#{lib_path("foo-1.0")}'
+      G
+
+      bundle "#{cmd} --all"
+
+      update_git "foo" do |s|
+        s.write "lib/foo.rb", "puts :CACHE"
+      end
+
+      ref = git.ref_for("master", 11)
+      expect(ref).not_to eq(old_ref)
+
+      bundle "update foo"
+
+      expect(bundled_app("vendor/cache/foo-1.0-#{ref}")).to exist
+      expect(bundled_app("vendor/cache/foo-1.0-#{old_ref}")).not_to exist
+
+      FileUtils.rm_rf lib_path("foo-1.0")
+      run "require 'foo'"
+      expect(out).to eq("CACHE")
+    end
+
+    it "uses the local repository to generate the cache" do
+      git = build_git "foo"
+      ref = git.ref_for("master", 11)
+
+      gemfile <<-G
+        gem "foo", :git => '#{lib_path("foo-invalid")}', :branch => :master
+      G
+
+      bundle %(config local.foo #{lib_path("foo-1.0")})
+      bundle "install"
+      bundle "#{cmd} --all"
+
+      expect(bundled_app("vendor/cache/foo-invalid-#{ref}")).to exist
+
+      # Updating the local still uses the local.
+      update_git "foo" do |s|
+        s.write "lib/foo.rb", "puts :LOCAL"
+      end
+
+      run "require 'foo'"
+      expect(out).to eq("LOCAL")
+    end
+
+    it "copies repository to vendor cache, including submodules" do
+      build_git "submodule", "1.0"
+
+      git = build_git "has_submodule", "1.0" do |s|
+        s.add_dependency "submodule"
+      end
+
+      Dir.chdir(lib_path("has_submodule-1.0")) do
+        sys_exec "git submodule add #{lib_path("submodule-1.0")} submodule-1.0"
+        `git commit -m "submodulator"`
+      end
+
+      install_gemfile <<-G
+        git "#{lib_path("has_submodule-1.0")}", :submodules => true do
+          gem "has_submodule"
+        end
+      G
+
+      ref = git.ref_for("master", 11)
+      bundle "#{cmd} --all"
+
+      expect(bundled_app("vendor/cache/has_submodule-1.0-#{ref}")).to exist
+      expect(bundled_app("vendor/cache/has_submodule-1.0-#{ref}/submodule-1.0")).to exist
+      expect(the_bundle).to include_gems "has_submodule 1.0"
+    end
+
+    it "displays warning message when detecting git repo in Gemfile" do
+      build_git "foo"
+
+      install_gemfile <<-G
+        gem "foo", :git => '#{lib_path("foo-1.0")}'
+      G
+
+      bundle "#{cmd}"
+
+      expect(out).to include("Your Gemfile contains path and git dependencies.")
+    end
+
+    it "does not display warning message if cache_all is set in bundle config" do
+      build_git "foo"
+
+      install_gemfile <<-G
+        gem "foo", :git => '#{lib_path("foo-1.0")}'
+      G
+
+      bundle "#{cmd} --all"
+      bundle "#{cmd}"
+
+      expect(out).not_to include("Your Gemfile contains path and git dependencies.")
+    end
+
+    it "caches pre-evaluated gemspecs" do
+      git = build_git "foo"
+
+      # Insert a gemspec method that shells out
+      spec_lines = lib_path("foo-1.0/foo.gemspec").read.split("\n")
+      spec_lines.insert(-2, "s.description = `echo bob`")
+      update_git("foo") {|s| s.write "foo.gemspec", spec_lines.join("\n") }
+
+      install_gemfile <<-G
+        gem "foo", :git => '#{lib_path("foo-1.0")}'
+      G
+      bundle "#{cmd} --all"
+
+      ref = git.ref_for("master", 11)
+      gemspec = bundled_app("vendor/cache/foo-1.0-#{ref}/foo.gemspec").read
+      expect(gemspec).to_not match("`echo bob`")
+    end
+  end
+end
Index: spec/bundler/cache/path_spec.rb
===================================================================
--- spec/bundler/cache/path_spec.rb	(nonexistent)
+++ spec/bundler/cache/path_spec.rb	(revision 59779)
@@ -0,0 +1,140 @@ https://github.com/ruby/ruby/blob/trunk/spec/bundler/cache/path_spec.rb#L1
+# frozen_string_literal: true
+require "spec_helper"
+
+%w(cache package).each do |cmd|
+  RSpec.describe "bundle #{cmd} with path" do
+    it "is no-op when the path is within the bundle" do
+      build_lib "foo", :path => bundled_app("lib/foo")
+
+      install_gemfile <<-G
+        gem "foo", :path => '#{bundled_app("lib/foo")}'
+      G
+
+      bundle "#{cmd} --all"
+      expect(bundled_app("vendor/cache/foo-1.0")).not_to exist
+      expect(the_bundle).to include_gems "foo 1.0"
+    end
+
+    it "copies when the path is outside the bundle " do
+      build_lib "foo"
+
+      install_gemfile <<-G
+        gem "foo", :path => '#{lib_path("foo-1.0")}'
+      G
+
+      bundle "#{cmd} --all"
+      expect(bundled_app("vendor/cache/foo-1.0")).to exist
+      expect(bundled_app("vendor/cache/foo-1.0/.bundlecache")).to be_file
+
+      FileUtils.rm_rf lib_path("foo-1.0")
+      expect(the_bundle).to include_gems "foo 1.0"
+    end
+
+    it "copies when the path is outside the bundle and the paths intersect" do
+      libname = File.basename(Dir.pwd) + "_gem"
+      libpath = File.join(File.dirname(Dir.pwd), libname)
+
+      build_lib libname, :path => libpath
+
+      install_gemfile <<-G
+        gem "#{libname}", :path => '#{libpath}'
+      G
+
+      bundle "#{cmd} --all"
+      expect(bundled_app("vendor/cache/#{libname}")).to exist
+      expect(bundled_app("vendor/cache/#{libname}/.bundlecache")).to be_file
+
+      FileUtils.rm_rf libpath
+      expect(the_bundle).to include_gems "#{libname} 1.0"
+    end
+
+    it "updates the path on each cache" do
+      build_lib "foo"
+
+      install_gemfile <<-G
+        gem "foo", :path => '#{lib_path("foo-1.0")}'
+      G
+
+      bundle "#{cmd} --all"
+
+      build_lib "foo" do |s|
+        s.write "lib/foo.rb", "puts :CACHE"
+      end
+
+      bundle "#{cmd} --all"
+
+      expect(bundled_app("vendor/cache/foo-1.0")).to exist
+      FileUtils.rm_rf lib_path("foo-1.0")
+
+      run "require 'foo'"
+      expect(out).to eq("CACHE")
+    end
+
+    it "removes stale entries cache" do
+      build_lib "foo"
+
+      install_gemfile <<-G
+        gem "foo", :path => '#{lib_path("foo-1.0")}'
+      G
+
+      bundle "#{cmd} --all"
+
+      install_gemfile <<-G
+        gem "bar", :path => '#{lib_path("bar-1.0")}'
+      G
+
+      bundle "#{cmd} --all"
+      expect(bundled_app("vendor/cache/bar-1.0")).not_to exist
+    end
+
+    it "raises a warning without --all" do
+      build_lib "foo"
+
+      install_gemfile <<-G
+        gem "foo", :path => '#{lib_path("foo-1.0")}'
+      G
+
+      bundle cmd
+      expect(out).to match(/please pass the \-\-all flag/)
+      expect(bundled_app("vendor/cache/foo-1.0")).not_to exist
+    end
+
+    it "stores the given flag" do
+      build_lib "foo"
+
+      install_gemfile <<-G
+        gem "foo", :path => '#{lib_path("foo-1.0")}'
+      G
+
+      bundle "#{cmd} --all"
+      build_lib "bar"
+
+      install_gemfile <<-G
+        gem "foo", :path => '#{lib_path("foo-1.0")}'
+        gem "bar", :path => '#{lib_path("bar-1.0")}'
+      G
+
+      bundle cmd
+      expect(bundled_app("vendor/cache/bar-1.0")).to exist
+    end
+
+    it "can rewind chosen configuration" do
+      build_lib "foo"
+
+      install_gemfile <<-G
+        gem "foo", :path => '#{lib_path("foo-1.0")}'
+      G
+
+      bundle "#{cmd} --all"
+      build_lib "baz"
+
+      gemfile <<-G
+        gem "foo", :path => '#{lib_path("foo-1.0")}'
+        gem "baz", :path => '#{lib_path("baz-1.0")}'
+      G
+
+      bundle "#{cmd} --no-all"
+      expect(bundled_app("vendor/cache/baz-1.0")).not_to exist
+    end
+  end
+end
Index: spec/bundler/other/major_deprecation_spec.rb
===================================================================
-- (... truncated)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]