rubygems-update 3.0.8 → 3.1.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +31 -8
- data/.travis.yml +9 -27
- data/CONTRIBUTING.md +13 -0
- data/History.txt +24 -21
- data/MAINTAINERS.txt +1 -6
- data/Manifest.txt +62 -13
- data/Rakefile +39 -23
- data/bin/gem +0 -6
- data/bundler/CHANGELOG.md +746 -570
- data/bundler/CODE_OF_CONDUCT.md +117 -23
- data/bundler/LICENSE.md +18 -19
- data/bundler/README.md +9 -8
- data/bundler/bundler.gemspec +8 -25
- data/bundler/exe/bundle +19 -3
- data/bundler/lib/bundler.rb +120 -67
- data/bundler/lib/bundler/build_metadata.rb +1 -3
- data/bundler/lib/bundler/capistrano.rb +4 -4
- data/bundler/lib/bundler/cli.rb +129 -121
- data/bundler/lib/bundler/cli/add.rb +27 -16
- data/bundler/lib/bundler/cli/common.rb +11 -12
- data/bundler/lib/bundler/cli/config.rb +161 -86
- data/bundler/lib/bundler/cli/console.rb +1 -1
- data/bundler/lib/bundler/cli/doctor.rb +4 -4
- data/bundler/lib/bundler/cli/exec.rb +4 -9
- data/bundler/lib/bundler/cli/gem.rb +5 -5
- data/bundler/lib/bundler/cli/info.rb +17 -5
- data/bundler/lib/bundler/cli/init.rb +1 -1
- data/bundler/lib/bundler/cli/install.rb +11 -10
- data/bundler/lib/bundler/cli/issue.rb +3 -3
- data/bundler/lib/bundler/cli/open.rb +10 -6
- data/bundler/lib/bundler/cli/outdated.rb +85 -81
- data/bundler/lib/bundler/cli/package.rb +8 -9
- data/bundler/lib/bundler/cli/plugin.rb +9 -2
- data/bundler/lib/bundler/cli/pristine.rb +1 -1
- data/bundler/lib/bundler/cli/show.rb +1 -1
- data/bundler/lib/bundler/cli/update.rb +31 -11
- data/bundler/lib/bundler/compact_index_client.rb +25 -9
- data/bundler/lib/bundler/compact_index_client/updater.rb +2 -6
- data/bundler/lib/bundler/current_ruby.rb +9 -7
- data/bundler/lib/bundler/definition.rb +35 -26
- data/bundler/lib/bundler/dependency.rb +16 -4
- data/bundler/lib/bundler/deployment.rb +1 -1
- data/bundler/lib/bundler/dsl.rb +15 -39
- data/bundler/lib/bundler/env.rb +8 -13
- data/bundler/lib/bundler/environment_preserver.rb +0 -1
- data/bundler/lib/bundler/feature_flag.rb +23 -34
- data/bundler/lib/bundler/fetcher.rb +14 -11
- data/bundler/lib/bundler/fetcher/compact_index.rb +26 -12
- data/bundler/lib/bundler/fetcher/dependency.rb +1 -1
- data/bundler/lib/bundler/fetcher/downloader.rb +4 -1
- data/bundler/lib/bundler/fetcher/index.rb +4 -2
- data/bundler/lib/bundler/friendly_errors.rb +4 -5
- data/bundler/lib/bundler/gem_helper.rb +39 -24
- data/bundler/lib/bundler/gem_helpers.rb +2 -4
- data/bundler/lib/bundler/gem_tasks.rb +1 -1
- data/bundler/lib/bundler/gem_version_promoter.rb +3 -3
- data/bundler/lib/bundler/graph.rb +2 -2
- data/bundler/lib/bundler/injector.rb +10 -8
- data/bundler/lib/bundler/inline.rb +19 -18
- data/bundler/lib/bundler/installer.rb +7 -14
- data/bundler/lib/bundler/installer/gem_installer.rb +5 -1
- data/bundler/lib/bundler/installer/parallel_installer.rb +4 -8
- data/bundler/lib/bundler/installer/standalone.rb +1 -2
- data/bundler/lib/bundler/lazy_specification.rb +2 -2
- data/bundler/lib/bundler/lockfile_parser.rb +13 -21
- data/bundler/lib/bundler/match_platform.rb +1 -1
- data/bundler/lib/bundler/plugin.rb +42 -29
- data/bundler/lib/bundler/plugin/api.rb +1 -1
- data/bundler/lib/bundler/plugin/api/source.rb +2 -2
- data/bundler/lib/bundler/plugin/index.rb +14 -3
- data/bundler/lib/bundler/plugin/installer.rb +28 -15
- data/bundler/lib/bundler/psyched_yaml.rb +1 -1
- data/bundler/lib/bundler/resolver.rb +72 -24
- data/bundler/lib/bundler/resolver/spec_group.rb +3 -2
- data/bundler/lib/bundler/retry.rb +2 -2
- data/bundler/lib/bundler/ruby_version.rb +4 -19
- data/bundler/lib/bundler/rubygems_ext.rb +10 -66
- data/bundler/lib/bundler/rubygems_gem_installer.rb +1 -8
- data/bundler/lib/bundler/rubygems_integration.rb +144 -395
- data/bundler/lib/bundler/runtime.rb +2 -9
- data/bundler/lib/bundler/settings.rb +15 -47
- data/bundler/lib/bundler/setup.rb +6 -5
- data/bundler/lib/bundler/shared_helpers.rb +58 -71
- data/bundler/lib/bundler/similarity_detector.rb +2 -2
- data/bundler/lib/bundler/source.rb +5 -5
- data/bundler/lib/bundler/source/git.rb +19 -12
- data/bundler/lib/bundler/source/git/git_proxy.rb +35 -39
- data/bundler/lib/bundler/source/metadata.rb +7 -2
- data/bundler/lib/bundler/source/path.rb +13 -8
- data/bundler/lib/bundler/source/rubygems.rb +11 -5
- data/bundler/lib/bundler/source/rubygems/remote.rb +1 -2
- data/bundler/lib/bundler/source_list.rb +9 -12
- data/bundler/lib/bundler/spec_set.rb +23 -12
- data/bundler/lib/bundler/stub_specification.rb +18 -30
- data/bundler/lib/bundler/templates/Executable.bundler +23 -14
- data/bundler/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +3 -3
- data/bundler/lib/bundler/templates/newgem/Gemfile.tt +8 -2
- data/bundler/lib/bundler/templates/newgem/README.md.tt +4 -3
- data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +6 -27
- data/bundler/lib/bundler/templates/newgem/test/test_helper.rb.tt +1 -1
- data/bundler/lib/bundler/templates/newgem/travis.yml.tt +0 -1
- data/bundler/lib/bundler/ui.rb +3 -3
- data/bundler/lib/bundler/ui/rg_proxy.rb +1 -1
- data/bundler/lib/bundler/ui/shell.rb +4 -8
- data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +161 -0
- data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/monotonic_time.rb +66 -0
- data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +176 -0
- data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +3 -0
- data/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb +151 -48
- data/bundler/lib/bundler/vendor/fileutils/lib/fileutils/version.rb +5 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo.rb +6 -6
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +2 -2
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +1 -1
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +1 -1
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +1 -1
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +1 -1
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb +6 -6
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb +1 -1
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +1 -1
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +30 -8
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +1 -1
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +4 -4
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb +2 -2
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +248 -279
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb +40 -0
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb +53 -0
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb +79 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor.rb +7 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions.rb +21 -11
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/directory.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +11 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/base.rb +16 -17
- data/bundler/lib/bundler/vendor/thor/lib/thor/error.rb +82 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/group.rb +3 -3
- data/bundler/lib/bundler/vendor/thor/lib/thor/line_editor.rb +2 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser.rb +4 -4
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/options.rb +7 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/runner.rb +6 -6
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell.rb +4 -4
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +52 -7
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/color.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/html.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/util.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
- data/bundler/lib/bundler/vendored_fileutils.rb +1 -6
- data/bundler/lib/bundler/vendored_molinillo.rb +1 -1
- data/bundler/lib/bundler/vendored_persistent.rb +7 -5
- data/bundler/lib/bundler/vendored_thor.rb +2 -2
- data/bundler/lib/bundler/version.rb +1 -20
- data/bundler/lib/bundler/version_ranges.rb +51 -5
- data/bundler/lib/bundler/vlad.rb +2 -2
- data/bundler/lib/bundler/worker.rb +1 -3
- data/bundler/lib/bundler/yaml_serializer.rb +2 -3
- data/bundler/man/bundle-add.1 +66 -0
- data/bundler/man/bundle-add.1.txt +58 -0
- data/bundler/man/bundle-add.ronn +7 -1
- data/bundler/man/bundle-binstubs.1 +40 -0
- data/bundler/man/bundle-binstubs.1.txt +48 -0
- data/bundler/man/bundle-binstubs.ronn +1 -1
- data/bundler/man/bundle-check.1 +31 -0
- data/bundler/man/bundle-check.1.txt +33 -0
- data/bundler/man/bundle-clean.1 +24 -0
- data/bundler/man/bundle-clean.1.txt +26 -0
- data/bundler/man/bundle-config.1 +497 -0
- data/bundler/man/bundle-config.1.txt +528 -0
- data/bundler/man/bundle-config.ronn +42 -40
- data/bundler/man/bundle-doctor.1 +44 -0
- data/bundler/man/bundle-doctor.1.txt +44 -0
- data/bundler/man/bundle-exec.1 +165 -0
- data/bundler/man/bundle-exec.1.txt +178 -0
- data/bundler/man/bundle-exec.ronn +1 -1
- data/bundler/man/bundle-gem.1 +80 -0
- data/bundler/man/bundle-gem.1.txt +91 -0
- data/bundler/man/bundle-info.1 +20 -0
- data/bundler/man/bundle-info.1.txt +21 -0
- data/bundler/man/bundle-init.1 +25 -0
- data/bundler/man/bundle-init.1.txt +34 -0
- data/bundler/man/bundle-init.ronn +1 -1
- data/bundler/man/bundle-inject.1 +33 -0
- data/bundler/man/bundle-inject.1.txt +32 -0
- data/bundler/man/bundle-install.1 +311 -0
- data/bundler/man/bundle-install.1.txt +401 -0
- data/bundler/man/bundle-install.ronn +9 -4
- data/bundler/man/bundle-list.1 +50 -0
- data/bundler/man/bundle-list.1.txt +43 -0
- data/bundler/man/bundle-lock.1 +84 -0
- data/bundler/man/bundle-lock.1.txt +93 -0
- data/bundler/man/bundle-open.1 +32 -0
- data/bundler/man/bundle-open.1.txt +29 -0
- data/bundler/man/bundle-outdated.1 +155 -0
- data/bundler/man/bundle-outdated.1.txt +131 -0
- data/bundler/man/bundle-package.1 +55 -0
- data/bundler/man/bundle-package.1.txt +79 -0
- data/bundler/man/bundle-platform.1 +61 -0
- data/bundler/man/bundle-platform.1.txt +57 -0
- data/bundler/man/bundle-pristine.1 +34 -0
- data/bundler/man/bundle-pristine.1.txt +44 -0
- data/bundler/man/bundle-remove.1 +31 -0
- data/bundler/man/bundle-remove.1.txt +34 -0
- data/bundler/man/bundle-show.1 +23 -0
- data/bundler/man/bundle-show.1.txt +27 -0
- data/bundler/man/bundle-update.1 +394 -0
- data/bundler/man/bundle-update.1.txt +390 -0
- data/bundler/man/bundle-update.ronn +3 -3
- data/bundler/man/bundle-viz.1 +39 -0
- data/bundler/man/bundle-viz.1.txt +39 -0
- data/bundler/man/bundle.1 +136 -0
- data/bundler/man/bundle.1.txt +116 -0
- data/bundler/man/bundle.ronn +2 -2
- data/bundler/man/gemfile.5 +686 -0
- data/bundler/man/gemfile.5.ronn +14 -18
- data/bundler/man/gemfile.5.txt +649 -0
- data/bundler/man/index.txt +25 -0
- data/lib/rubygems.rb +80 -48
- data/lib/rubygems/available_set.rb +1 -0
- data/lib/rubygems/basic_specification.rb +17 -6
- data/lib/rubygems/bundler_version_finder.rb +5 -0
- data/lib/rubygems/command.rb +34 -5
- data/lib/rubygems/command_manager.rb +0 -6
- data/lib/rubygems/commands/build_command.rb +21 -8
- data/lib/rubygems/commands/cert_command.rb +0 -1
- data/lib/rubygems/commands/cleanup_command.rb +7 -7
- data/lib/rubygems/commands/contents_command.rb +3 -3
- data/lib/rubygems/commands/dependency_command.rb +4 -3
- data/lib/rubygems/commands/environment_command.rb +0 -3
- data/lib/rubygems/commands/info_command.rb +2 -0
- data/lib/rubygems/commands/install_command.rb +12 -52
- data/lib/rubygems/commands/lock_command.rb +2 -2
- data/lib/rubygems/commands/mirror_command.rb +1 -0
- data/lib/rubygems/commands/open_command.rb +2 -1
- data/lib/rubygems/commands/outdated_command.rb +1 -0
- data/lib/rubygems/commands/owner_command.rb +2 -7
- data/lib/rubygems/commands/pristine_command.rb +3 -0
- data/lib/rubygems/commands/push_command.rb +4 -6
- data/lib/rubygems/commands/query_command.rb +94 -80
- data/lib/rubygems/commands/rdoc_command.rb +1 -0
- data/lib/rubygems/commands/setup_command.rb +10 -8
- data/lib/rubygems/commands/signin_command.rb +1 -0
- data/lib/rubygems/commands/specification_command.rb +1 -0
- data/lib/rubygems/commands/stale_command.rb +2 -0
- data/lib/rubygems/commands/uninstall_command.rb +1 -0
- data/lib/rubygems/commands/unpack_command.rb +2 -29
- data/lib/rubygems/commands/update_command.rb +14 -14
- data/lib/rubygems/commands/which_command.rb +1 -0
- data/lib/rubygems/commands/yank_command.rb +8 -2
- data/lib/rubygems/compatibility.rb +4 -4
- data/lib/rubygems/config_file.rb +28 -23
- data/lib/rubygems/core_ext/kernel_gem.rb +2 -5
- data/lib/rubygems/core_ext/kernel_require.rb +29 -2
- data/lib/rubygems/core_ext/kernel_warn.rb +10 -4
- data/lib/rubygems/defaults.rb +10 -17
- data/lib/rubygems/dependency.rb +21 -6
- data/lib/rubygems/dependency_installer.rb +19 -102
- data/lib/rubygems/dependency_list.rb +11 -10
- data/lib/rubygems/deprecate.rb +5 -5
- data/lib/rubygems/errors.rb +11 -2
- data/lib/rubygems/exceptions.rb +9 -0
- data/lib/rubygems/ext/builder.rb +24 -43
- data/lib/rubygems/ext/cmake_builder.rb +2 -0
- data/lib/rubygems/ext/ext_conf_builder.rb +11 -9
- data/lib/rubygems/ext/rake_builder.rb +1 -1
- data/lib/rubygems/gemcutter_utilities.rb +19 -26
- data/lib/rubygems/indexer.rb +9 -5
- data/lib/rubygems/installer.rb +26 -13
- data/lib/rubygems/installer_test_case.rb +86 -38
- data/lib/rubygems/local_remote_options.rb +1 -1
- data/lib/rubygems/mock_gem_ui.rb +4 -1
- data/lib/rubygems/name_tuple.rb +1 -0
- data/lib/rubygems/package.rb +37 -9
- data/lib/rubygems/package/tar_writer.rb +4 -4
- data/lib/rubygems/path_support.rb +2 -0
- data/lib/rubygems/platform.rb +2 -1
- data/lib/rubygems/psych_tree.rb +2 -0
- data/lib/rubygems/remote_fetcher.rb +5 -1
- data/lib/rubygems/request.rb +5 -3
- data/lib/rubygems/request/connection_pools.rb +4 -4
- data/lib/rubygems/request/http_pool.rb +1 -0
- data/lib/rubygems/request/https_pool.rb +2 -0
- data/lib/rubygems/request_set.rb +2 -2
- data/lib/rubygems/request_set/gem_dependency_api.rb +2 -2
- data/lib/rubygems/request_set/lockfile.rb +5 -2
- data/lib/rubygems/request_set/lockfile/parser.rb +4 -2
- data/lib/rubygems/request_set/lockfile/tokenizer.rb +2 -0
- data/lib/rubygems/requirement.rb +20 -18
- data/lib/rubygems/resolver.rb +4 -5
- data/lib/rubygems/resolver/activation_request.rb +19 -49
- data/lib/rubygems/resolver/best_set.rb +2 -2
- data/lib/rubygems/resolver/conflict.rb +0 -5
- data/lib/rubygems/resolver/installer_set.rb +3 -3
- data/lib/rubygems/resolver/lock_set.rb +1 -1
- data/lib/rubygems/resolver/lock_specification.rb +2 -2
- data/lib/rubygems/resolver/requirement_list.rb +1 -0
- data/lib/rubygems/resolver/specification.rb +1 -0
- data/lib/rubygems/resolver/stats.rb +2 -0
- data/lib/rubygems/security/signer.rb +3 -2
- data/lib/rubygems/server.rb +5 -4
- data/lib/rubygems/source_list.rb +1 -0
- data/lib/rubygems/spec_fetcher.rb +3 -16
- data/lib/rubygems/specification.rb +69 -133
- data/lib/rubygems/specification_policy.rb +7 -2
- data/lib/rubygems/stub_specification.rb +5 -2
- data/lib/rubygems/syck_hack.rb +2 -0
- data/lib/rubygems/test_case.rb +78 -227
- data/lib/rubygems/test_utilities.rb +17 -6
- data/lib/rubygems/text.rb +2 -3
- data/lib/rubygems/uninstaller.rb +15 -15
- data/lib/rubygems/user_interaction.rb +9 -1
- data/lib/rubygems/util.rb +5 -41
- data/lib/rubygems/util/licenses.rb +398 -396
- data/lib/rubygems/util/list.rb +2 -0
- data/lib/rubygems/validator.rb +9 -29
- data/lib/rubygems/version.rb +5 -3
- data/rubygems-update.gemspec +3 -3
- data/test/rubygems/plugin/load/rubygems_plugin.rb +2 -0
- data/test/rubygems/test_deprecate.rb +3 -0
- data/test/rubygems/test_gem.rb +183 -176
- data/test/rubygems/test_gem_available_set.rb +3 -2
- data/test/rubygems/test_gem_bundler_version_finder.rb +3 -1
- data/test/rubygems/test_gem_command.rb +94 -5
- data/test/rubygems/test_gem_command_manager.rb +5 -13
- data/test/rubygems/test_gem_commands_build_command.rb +142 -4
- data/test/rubygems/test_gem_commands_cert_command.rb +15 -1
- data/test/rubygems/test_gem_commands_cleanup_command.rb +22 -6
- data/test/rubygems/test_gem_commands_dependency_command.rb +1 -1
- data/test/rubygems/test_gem_commands_environment_command.rb +1 -11
- data/test/rubygems/test_gem_commands_help_command.rb +2 -0
- data/test/rubygems/test_gem_commands_info_command.rb +1 -0
- data/test/rubygems/test_gem_commands_install_command.rb +207 -2
- data/test/rubygems/test_gem_commands_mirror.rb +1 -0
- data/test/rubygems/test_gem_commands_outdated_command.rb +1 -0
- data/test/rubygems/test_gem_commands_owner_command.rb +4 -5
- data/test/rubygems/test_gem_commands_pristine_command.rb +56 -4
- data/test/rubygems/test_gem_commands_push_command.rb +19 -14
- data/test/rubygems/test_gem_commands_query_command.rb +27 -2
- data/test/rubygems/test_gem_commands_setup_command.rb +62 -37
- data/test/rubygems/test_gem_commands_signin_command.rb +5 -4
- data/test/rubygems/test_gem_commands_sources_command.rb +20 -6
- data/test/rubygems/test_gem_commands_uninstall_command.rb +107 -50
- data/test/rubygems/test_gem_commands_update_command.rb +86 -23
- data/test/rubygems/test_gem_commands_yank_command.rb +46 -1
- data/test/rubygems/test_gem_config_file.rb +9 -2
- data/test/rubygems/test_gem_dependency.rb +6 -0
- data/test/rubygems/test_gem_dependency_installer.rb +67 -36
- data/test/rubygems/test_gem_dependency_list.rb +21 -14
- data/test/rubygems/test_gem_ext_builder.rb +5 -1
- data/test/rubygems/test_gem_ext_cmake_builder.rb +2 -0
- data/test/rubygems/test_gem_ext_configure_builder.rb +8 -0
- data/test/rubygems/test_gem_ext_ext_conf_builder.rb +12 -0
- data/test/rubygems/test_gem_ext_rake_builder.rb +2 -0
- data/test/rubygems/test_gem_gemcutter_utilities.rb +8 -8
- data/test/rubygems/test_gem_indexer.rb +31 -40
- data/test/rubygems/test_gem_install_update_options.rb +31 -17
- data/test/rubygems/test_gem_installer.rb +383 -223
- data/test/rubygems/test_gem_package.rb +99 -14
- data/test/rubygems/test_gem_package_old.rb +57 -54
- data/test/rubygems/test_gem_package_tar_reader_entry.rb +6 -5
- data/test/rubygems/test_gem_package_tar_writer.rb +11 -6
- data/test/rubygems/test_gem_path_support.rb +19 -13
- data/test/rubygems/test_gem_platform.rb +4 -2
- data/test/rubygems/test_gem_rdoc.rb +1 -0
- data/test/rubygems/test_gem_remote_fetcher.rb +29 -16
- data/test/rubygems/test_gem_request.rb +19 -4
- data/test/rubygems/test_gem_request_connection_pools.rb +6 -2
- data/test/rubygems/test_gem_request_set.rb +33 -8
- data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +1 -1
- data/test/rubygems/test_gem_request_set_lockfile.rb +1 -0
- data/test/rubygems/test_gem_request_set_lockfile_parser.rb +2 -1
- data/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb +2 -0
- data/test/rubygems/test_gem_requirement.rb +7 -1
- data/test/rubygems/test_gem_resolver.rb +67 -23
- data/test/rubygems/test_gem_resolver_activation_request.rb +3 -32
- data/test/rubygems/test_gem_resolver_conflict.rb +0 -4
- data/test/rubygems/test_gem_resolver_git_specification.rb +1 -0
- data/test/rubygems/test_gem_resolver_index_specification.rb +7 -2
- data/test/rubygems/test_gem_resolver_installed_specification.rb +0 -1
- data/test/rubygems/test_gem_resolver_installer_set.rb +3 -1
- data/test/rubygems/test_gem_resolver_specification.rb +2 -0
- data/test/rubygems/test_gem_security.rb +6 -2
- data/test/rubygems/test_gem_security_signer.rb +1 -0
- data/test/rubygems/test_gem_server.rb +7 -2
- data/test/rubygems/test_gem_silent_ui.rb +1 -0
- data/test/rubygems/test_gem_source.rb +7 -7
- data/test/rubygems/test_gem_source_fetch_problem.rb +1 -0
- data/test/rubygems/test_gem_source_git.rb +4 -9
- data/test/rubygems/test_gem_source_installed.rb +6 -6
- data/test/rubygems/test_gem_source_list.rb +1 -0
- data/test/rubygems/test_gem_source_local.rb +5 -4
- data/test/rubygems/test_gem_source_lock.rb +12 -12
- data/test/rubygems/test_gem_source_specific_file.rb +7 -6
- data/test/rubygems/test_gem_source_vendor.rb +4 -4
- data/test/rubygems/test_gem_specification.rb +75 -43
- data/test/rubygems/test_gem_stream_ui.rb +2 -0
- data/test/rubygems/test_gem_stub_specification.rb +3 -1
- data/test/rubygems/test_gem_text.rb +1 -0
- data/test/rubygems/test_gem_uninstaller.rb +31 -10
- data/test/rubygems/test_gem_util.rb +6 -4
- data/test/rubygems/test_gem_validator.rb +3 -4
- data/test/rubygems/test_gem_version.rb +16 -8
- data/test/rubygems/test_kernel.rb +1 -0
- data/test/rubygems/test_rake_package.rb +26 -0
- data/test/rubygems/test_remote_fetch_error.rb +1 -0
- data/test/rubygems/test_require.rb +107 -3
- data/util/bisect +31 -0
- data/util/ci.sh +50 -0
- data/util/generate_spdx_license_list.rb +4 -2
- data/util/rubocop +2 -2
- metadata +90 -18
- data/appveyor.yml +0 -43
- data/bundler/CONTRIBUTING.md +0 -17
- data/bundler/exe/bundle_ruby +0 -60
- data/bundler/lib/bundler/cli/cache.rb +0 -36
- data/bundler/lib/bundler/compatibility_guard.rb +0 -14
- data/bundler/lib/bundler/ssl_certs/.document +0 -1
- data/bundler/lib/bundler/ssl_certs/certificate_manager.rb +0 -66
- data/bundler/lib/bundler/ssl_certs/index.rubygems.org/GlobalSignRootCA.pem +0 -21
- data/bundler/lib/bundler/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem +0 -23
- data/bundler/lib/bundler/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem +0 -25
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/faster.rb +0 -27
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/ssl_reuse.rb +0 -129
- data/util/ci +0 -82
@@ -1,11 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
3
|
+
require_relative 'molinillo/compatibility'
|
4
|
+
require_relative 'molinillo/gem_metadata'
|
5
|
+
require_relative 'molinillo/errors'
|
6
|
+
require_relative 'molinillo/resolver'
|
7
|
+
require_relative 'molinillo/modules/ui'
|
8
|
+
require_relative 'molinillo/modules/specification_provider'
|
9
9
|
|
10
10
|
# Bundler::Molinillo is a generic dependency resolution algorithm.
|
11
11
|
module Bundler::Molinillo
|
@@ -3,8 +3,8 @@
|
|
3
3
|
require 'set'
|
4
4
|
require 'tsort'
|
5
5
|
|
6
|
-
|
7
|
-
|
6
|
+
require_relative 'dependency_graph/log'
|
7
|
+
require_relative 'dependency_graph/vertex'
|
8
8
|
|
9
9
|
module Bundler::Molinillo
|
10
10
|
# A directed acyclic graph that is tuned to hold named dependencies
|
@@ -1,11 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
3
|
+
require_relative 'add_edge_no_circular'
|
4
|
+
require_relative 'add_vertex'
|
5
|
+
require_relative 'delete_edge'
|
6
|
+
require_relative 'detach_vertex_named'
|
7
|
+
require_relative 'set_payload'
|
8
|
+
require_relative 'tag'
|
9
9
|
|
10
10
|
module Bundler::Molinillo
|
11
11
|
class DependencyGraph
|
@@ -50,14 +50,25 @@ module Bundler::Molinillo
|
|
50
50
|
incoming_edges.map(&:origin)
|
51
51
|
end
|
52
52
|
|
53
|
-
# @return [
|
53
|
+
# @return [Set<Vertex>] the vertices of {#graph} where `self` is a
|
54
54
|
# {#descendent?}
|
55
55
|
def recursive_predecessors
|
56
|
-
|
57
|
-
|
58
|
-
|
56
|
+
_recursive_predecessors
|
57
|
+
end
|
58
|
+
|
59
|
+
# @param [Set<Vertex>] vertices the set to add the predecessors to
|
60
|
+
# @return [Set<Vertex>] the vertices of {#graph} where `self` is a
|
61
|
+
# {#descendent?}
|
62
|
+
def _recursive_predecessors(vertices = Set.new)
|
63
|
+
incoming_edges.each do |edge|
|
64
|
+
vertex = edge.origin
|
65
|
+
next unless vertices.add?(vertex)
|
66
|
+
vertex._recursive_predecessors(vertices)
|
67
|
+
end
|
68
|
+
|
59
69
|
vertices
|
60
70
|
end
|
71
|
+
protected :_recursive_predecessors
|
61
72
|
|
62
73
|
# @return [Array<Vertex>] the vertices of {#graph} that have an edge with
|
63
74
|
# `self` as their {Edge#origin}
|
@@ -65,14 +76,25 @@ module Bundler::Molinillo
|
|
65
76
|
outgoing_edges.map(&:destination)
|
66
77
|
end
|
67
78
|
|
68
|
-
# @return [
|
79
|
+
# @return [Set<Vertex>] the vertices of {#graph} where `self` is an
|
69
80
|
# {#ancestor?}
|
70
81
|
def recursive_successors
|
71
|
-
|
72
|
-
|
73
|
-
|
82
|
+
_recursive_successors
|
83
|
+
end
|
84
|
+
|
85
|
+
# @param [Set<Vertex>] vertices the set to add the successors to
|
86
|
+
# @return [Set<Vertex>] the vertices of {#graph} where `self` is an
|
87
|
+
# {#ancestor?}
|
88
|
+
def _recursive_successors(vertices = Set.new)
|
89
|
+
outgoing_edges.each do |edge|
|
90
|
+
vertex = edge.destination
|
91
|
+
next unless vertices.add?(vertex)
|
92
|
+
vertex._recursive_successors(vertices)
|
93
|
+
end
|
94
|
+
|
74
95
|
vertices
|
75
96
|
end
|
97
|
+
protected :_recursive_successors
|
76
98
|
|
77
99
|
# @return [String] a string suitable for debugging
|
78
100
|
def inspect
|
@@ -80,7 +80,7 @@ module Bundler::Molinillo
|
|
80
80
|
@specification_provider = specification_provider
|
81
81
|
end
|
82
82
|
|
83
|
-
|
83
|
+
require_relative 'delegates/specification_provider'
|
84
84
|
include Delegates::SpecificationProvider
|
85
85
|
|
86
86
|
# @return [String] An error message that includes requirement trees,
|
@@ -238,11 +238,11 @@ module Bundler::Molinillo
|
|
238
238
|
debug { 'Activated: ' + Hash[activated.vertices.select { |_n, v| v.payload }].keys.join(', ') } if state
|
239
239
|
end
|
240
240
|
|
241
|
-
|
242
|
-
|
241
|
+
require_relative 'state'
|
242
|
+
require_relative 'modules/specification_provider'
|
243
243
|
|
244
|
-
|
245
|
-
|
244
|
+
require_relative 'delegates/resolution_state'
|
245
|
+
require_relative 'delegates/specification_provider'
|
246
246
|
|
247
247
|
include Bundler::Molinillo::Delegates::ResolutionState
|
248
248
|
include Bundler::Molinillo::Delegates::SpecificationProvider
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require_relative 'dependency_graph'
|
4
4
|
|
5
5
|
module Bundler::Molinillo
|
6
6
|
# This class encapsulates a dependency resolver.
|
@@ -9,7 +9,7 @@ module Bundler::Molinillo
|
|
9
9
|
#
|
10
10
|
#
|
11
11
|
class Resolver
|
12
|
-
|
12
|
+
require_relative 'resolution'
|
13
13
|
|
14
14
|
# @return [SpecificationProvider] the specification provider used
|
15
15
|
# in the resolution process
|
@@ -1,12 +1,7 @@
|
|
1
1
|
require 'net/http'
|
2
|
-
begin
|
3
|
-
require 'net/https'
|
4
|
-
rescue LoadError
|
5
|
-
# net/https or openssl
|
6
|
-
end if RUBY_VERSION < '1.9' # but only for 1.8
|
7
|
-
require 'bundler/vendor/net-http-persistent/lib/net/http/faster'
|
8
2
|
require 'uri'
|
9
3
|
require 'cgi' # for escaping
|
4
|
+
require_relative '../../../../connection_pool/lib/connection_pool'
|
10
5
|
|
11
6
|
begin
|
12
7
|
require 'net/http/pipeline'
|
@@ -38,7 +33,7 @@ autoload :OpenSSL, 'openssl'
|
|
38
33
|
#
|
39
34
|
# uri = URI 'http://example.com/awesome/web/service'
|
40
35
|
#
|
41
|
-
# http = Bundler::Persistent::Net::HTTP::Persistent.new 'my_app_name'
|
36
|
+
# http = Bundler::Persistent::Net::HTTP::Persistent.new name: 'my_app_name'
|
42
37
|
#
|
43
38
|
# # perform a GET
|
44
39
|
# response = http.request uri
|
@@ -70,13 +65,17 @@ autoload :OpenSSL, 'openssl'
|
|
70
65
|
# Here are the SSL settings, see the individual methods for documentation:
|
71
66
|
#
|
72
67
|
# #certificate :: This client's certificate
|
73
|
-
# #ca_file :: The certificate-
|
68
|
+
# #ca_file :: The certificate-authorities
|
69
|
+
# #ca_path :: Directory with certificate-authorities
|
74
70
|
# #cert_store :: An SSL certificate store
|
71
|
+
# #ciphers :: List of SSl ciphers allowed
|
75
72
|
# #private_key :: The client's SSL private key
|
76
73
|
# #reuse_ssl_sessions :: Reuse a previously opened SSL session for a new
|
77
74
|
# connection
|
75
|
+
# #ssl_timeout :: SSL session lifetime
|
78
76
|
# #ssl_version :: Which specific SSL version to use
|
79
77
|
# #verify_callback :: For server certificate verification
|
78
|
+
# #verify_depth :: Depth of certificate verification
|
80
79
|
# #verify_mode :: How connections should be verified
|
81
80
|
#
|
82
81
|
# == Proxies
|
@@ -154,7 +153,7 @@ autoload :OpenSSL, 'openssl'
|
|
154
153
|
# uri = URI 'http://example.com/awesome/web/service'
|
155
154
|
# post_uri = uri + 'create'
|
156
155
|
#
|
157
|
-
# http = Bundler::Persistent::Net::HTTP::Persistent.new 'my_app_name'
|
156
|
+
# http = Bundler::Persistent::Net::HTTP::Persistent.new name: 'my_app_name'
|
158
157
|
#
|
159
158
|
# post = Net::HTTP::Post.new post_uri.path
|
160
159
|
# # ... fill in POST request
|
@@ -200,10 +199,19 @@ class Bundler::Persistent::Net::HTTP::Persistent
|
|
200
199
|
|
201
200
|
HAVE_OPENSSL = defined? OpenSSL::SSL # :nodoc:
|
202
201
|
|
202
|
+
##
|
203
|
+
# The default connection pool size is 1/4 the allowed open files.
|
204
|
+
|
205
|
+
if Gem.win_platform? then
|
206
|
+
DEFAULT_POOL_SIZE = 256
|
207
|
+
else
|
208
|
+
DEFAULT_POOL_SIZE = Process.getrlimit(Process::RLIMIT_NOFILE).first / 4
|
209
|
+
end
|
210
|
+
|
203
211
|
##
|
204
212
|
# The version of Bundler::Persistent::Net::HTTP::Persistent you are using
|
205
213
|
|
206
|
-
VERSION = '
|
214
|
+
VERSION = '3.1.0'
|
207
215
|
|
208
216
|
##
|
209
217
|
# Exceptions rescued for automatic retry on ruby 2.0.0. This overlaps with
|
@@ -248,31 +256,31 @@ class Bundler::Persistent::Net::HTTP::Persistent
|
|
248
256
|
|
249
257
|
http = new 'net-http-persistent detect_idle_timeout'
|
250
258
|
|
251
|
-
|
259
|
+
http.connection_for uri do |connection|
|
260
|
+
sleep_time = 0
|
252
261
|
|
253
|
-
|
262
|
+
http = connection.http
|
254
263
|
|
255
|
-
|
256
|
-
|
264
|
+
loop do
|
265
|
+
response = http.request req
|
257
266
|
|
258
|
-
|
267
|
+
$stderr.puts "HEAD #{uri} => #{response.code}" if $DEBUG
|
259
268
|
|
260
|
-
|
261
|
-
|
262
|
-
|
269
|
+
unless Net::HTTPOK === response then
|
270
|
+
raise Error, "bad response code #{response.code} detecting idle timeout"
|
271
|
+
end
|
263
272
|
|
264
|
-
|
273
|
+
break if sleep_time >= max
|
265
274
|
|
266
|
-
|
275
|
+
sleep_time += 1
|
267
276
|
|
268
|
-
|
269
|
-
|
277
|
+
$stderr.puts "sleeping #{sleep_time}" if $DEBUG
|
278
|
+
sleep sleep_time
|
279
|
+
end
|
270
280
|
end
|
271
281
|
rescue
|
272
282
|
# ignore StandardErrors, we've probably found the idle timeout.
|
273
283
|
ensure
|
274
|
-
http.shutdown
|
275
|
-
|
276
284
|
return sleep_time unless $!
|
277
285
|
end
|
278
286
|
|
@@ -281,7 +289,9 @@ class Bundler::Persistent::Net::HTTP::Persistent
|
|
281
289
|
|
282
290
|
attr_reader :certificate
|
283
291
|
|
292
|
+
##
|
284
293
|
# For Net::HTTP parity
|
294
|
+
|
285
295
|
alias cert certificate
|
286
296
|
|
287
297
|
##
|
@@ -290,12 +300,23 @@ class Bundler::Persistent::Net::HTTP::Persistent
|
|
290
300
|
|
291
301
|
attr_reader :ca_file
|
292
302
|
|
303
|
+
##
|
304
|
+
# A directory of SSL certificates to be used as certificate authorities.
|
305
|
+
# Setting this will set verify_mode to VERIFY_PEER.
|
306
|
+
|
307
|
+
attr_reader :ca_path
|
308
|
+
|
293
309
|
##
|
294
310
|
# An SSL certificate store. Setting this will override the default
|
295
311
|
# certificate store. See verify_mode for more information.
|
296
312
|
|
297
313
|
attr_reader :cert_store
|
298
314
|
|
315
|
+
##
|
316
|
+
# The ciphers allowed for SSL connections
|
317
|
+
|
318
|
+
attr_reader :ciphers
|
319
|
+
|
299
320
|
##
|
300
321
|
# Sends debug_output to this IO via Net::HTTP#set_debug_output.
|
301
322
|
#
|
@@ -309,11 +330,6 @@ class Bundler::Persistent::Net::HTTP::Persistent
|
|
309
330
|
|
310
331
|
attr_reader :generation # :nodoc:
|
311
332
|
|
312
|
-
##
|
313
|
-
# Where this instance's connections live in the thread local variables
|
314
|
-
|
315
|
-
attr_reader :generation_key # :nodoc:
|
316
|
-
|
317
333
|
##
|
318
334
|
# Headers that are added to every request using Net::HTTP#add_field
|
319
335
|
|
@@ -369,7 +385,9 @@ class Bundler::Persistent::Net::HTTP::Persistent
|
|
369
385
|
|
370
386
|
attr_reader :private_key
|
371
387
|
|
388
|
+
##
|
372
389
|
# For Net::HTTP parity
|
390
|
+
|
373
391
|
alias key private_key
|
374
392
|
|
375
393
|
##
|
@@ -382,15 +400,20 @@ class Bundler::Persistent::Net::HTTP::Persistent
|
|
382
400
|
|
383
401
|
attr_reader :no_proxy
|
384
402
|
|
403
|
+
##
|
404
|
+
# Test-only accessor for the connection pool
|
405
|
+
|
406
|
+
attr_reader :pool # :nodoc:
|
407
|
+
|
385
408
|
##
|
386
409
|
# Seconds to wait until reading one block. See Net::HTTP#read_timeout
|
387
410
|
|
388
411
|
attr_accessor :read_timeout
|
389
412
|
|
390
413
|
##
|
391
|
-
#
|
414
|
+
# Seconds to wait until writing one block. See Net::HTTP#write_timeout
|
392
415
|
|
393
|
-
|
416
|
+
attr_accessor :write_timeout
|
394
417
|
|
395
418
|
##
|
396
419
|
# By default SSL sessions are reused to avoid extra SSL handshakes. Set
|
@@ -418,17 +441,33 @@ class Bundler::Persistent::Net::HTTP::Persistent
|
|
418
441
|
attr_reader :ssl_generation # :nodoc:
|
419
442
|
|
420
443
|
##
|
421
|
-
#
|
444
|
+
# SSL session lifetime
|
422
445
|
|
423
|
-
attr_reader :
|
446
|
+
attr_reader :ssl_timeout
|
424
447
|
|
425
448
|
##
|
426
449
|
# SSL version to use.
|
427
450
|
#
|
428
451
|
# By default, the version will be negotiated automatically between client
|
429
|
-
# and server. Ruby 1.9 and newer only.
|
452
|
+
# and server. Ruby 1.9 and newer only. Deprecated since Ruby 2.5.
|
430
453
|
|
431
|
-
attr_reader :ssl_version
|
454
|
+
attr_reader :ssl_version
|
455
|
+
|
456
|
+
##
|
457
|
+
# Minimum SSL version to use, e.g. :TLS1_1
|
458
|
+
#
|
459
|
+
# By default, the version will be negotiated automatically between client
|
460
|
+
# and server. Ruby 2.5 and newer only.
|
461
|
+
|
462
|
+
attr_reader :min_version
|
463
|
+
|
464
|
+
##
|
465
|
+
# Maximum SSL version to use, e.g. :TLS1_2
|
466
|
+
#
|
467
|
+
# By default, the version will be negotiated automatically between client
|
468
|
+
# and server. Ruby 2.5 and newer only.
|
469
|
+
|
470
|
+
attr_reader :max_version
|
432
471
|
|
433
472
|
##
|
434
473
|
# Where this instance's last-use times live in the thread local variables
|
@@ -436,16 +475,21 @@ class Bundler::Persistent::Net::HTTP::Persistent
|
|
436
475
|
attr_reader :timeout_key # :nodoc:
|
437
476
|
|
438
477
|
##
|
439
|
-
# SSL verification callback. Used when ca_file is set.
|
478
|
+
# SSL verification callback. Used when ca_file or ca_path is set.
|
440
479
|
|
441
480
|
attr_reader :verify_callback
|
442
481
|
|
482
|
+
##
|
483
|
+
# Sets the depth of SSL certificate verification
|
484
|
+
|
485
|
+
attr_reader :verify_depth
|
486
|
+
|
443
487
|
##
|
444
488
|
# HTTPS verify mode. Defaults to OpenSSL::SSL::VERIFY_PEER which verifies
|
445
489
|
# the server certificate.
|
446
490
|
#
|
447
|
-
# If no ca_file or cert_store is set the default system certificate
|
448
|
-
# used.
|
491
|
+
# If no ca_file, ca_path or cert_store is set the default system certificate
|
492
|
+
# store is used.
|
449
493
|
#
|
450
494
|
# You can use +verify_mode+ to override any default values.
|
451
495
|
|
@@ -478,8 +522,12 @@ class Bundler::Persistent::Net::HTTP::Persistent
|
|
478
522
|
# proxy = URI 'http://proxy.example'
|
479
523
|
# proxy.user = 'AzureDiamond'
|
480
524
|
# proxy.password = 'hunter2'
|
525
|
+
#
|
526
|
+
# Set +pool_size+ to limit the maximum number of connections allowed.
|
527
|
+
# Defaults to 1/4 the number of allowed file handles. You can have no more
|
528
|
+
# than this many threads with active HTTP transactions.
|
481
529
|
|
482
|
-
def initialize name
|
530
|
+
def initialize name: nil, proxy: nil, pool_size: DEFAULT_POOL_SIZE
|
483
531
|
@name = name
|
484
532
|
|
485
533
|
@debug_output = nil
|
@@ -491,29 +539,34 @@ class Bundler::Persistent::Net::HTTP::Persistent
|
|
491
539
|
@keep_alive = 30
|
492
540
|
@open_timeout = nil
|
493
541
|
@read_timeout = nil
|
542
|
+
@write_timeout = nil
|
494
543
|
@idle_timeout = 5
|
495
544
|
@max_requests = nil
|
496
545
|
@socket_options = []
|
546
|
+
@ssl_generation = 0 # incremented when SSL session variables change
|
497
547
|
|
498
548
|
@socket_options << [Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1] if
|
499
549
|
Socket.const_defined? :TCP_NODELAY
|
500
550
|
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
@request_key = [key, 'requests' ].join('_').intern
|
505
|
-
@timeout_key = [key, 'timeouts' ].join('_').intern
|
551
|
+
@pool = Bundler::Persistent::Net::HTTP::Persistent::Pool.new size: pool_size do |http_args|
|
552
|
+
Bundler::Persistent::Net::HTTP::Persistent::Connection.new Net::HTTP, http_args, @ssl_generation
|
553
|
+
end
|
506
554
|
|
507
555
|
@certificate = nil
|
508
556
|
@ca_file = nil
|
557
|
+
@ca_path = nil
|
558
|
+
@ciphers = nil
|
509
559
|
@private_key = nil
|
560
|
+
@ssl_timeout = nil
|
510
561
|
@ssl_version = nil
|
562
|
+
@min_version = nil
|
563
|
+
@max_version = nil
|
511
564
|
@verify_callback = nil
|
565
|
+
@verify_depth = nil
|
512
566
|
@verify_mode = nil
|
513
567
|
@cert_store = nil
|
514
568
|
|
515
569
|
@generation = 0 # incremented when proxy URI changes
|
516
|
-
@ssl_generation = 0 # incremented when SSL session variables change
|
517
570
|
|
518
571
|
if HAVE_OPENSSL then
|
519
572
|
@verify_mode = OpenSSL::SSL::VERIFY_PEER
|
@@ -522,9 +575,6 @@ class Bundler::Persistent::Net::HTTP::Persistent
|
|
522
575
|
|
523
576
|
@retry_change_requests = false
|
524
577
|
|
525
|
-
@ruby_1 = RUBY_VERSION < '2'
|
526
|
-
@retried_on_ruby_2 = !@ruby_1
|
527
|
-
|
528
578
|
self.proxy = proxy if proxy
|
529
579
|
end
|
530
580
|
|
@@ -549,6 +599,15 @@ class Bundler::Persistent::Net::HTTP::Persistent
|
|
549
599
|
reconnect_ssl
|
550
600
|
end
|
551
601
|
|
602
|
+
##
|
603
|
+
# Sets the SSL certificate authority path.
|
604
|
+
|
605
|
+
def ca_path= path
|
606
|
+
@ca_path = path
|
607
|
+
|
608
|
+
reconnect_ssl
|
609
|
+
end
|
610
|
+
|
552
611
|
##
|
553
612
|
# Overrides the default SSL certificate store used for verifying
|
554
613
|
# connections.
|
@@ -560,92 +619,59 @@ class Bundler::Persistent::Net::HTTP::Persistent
|
|
560
619
|
end
|
561
620
|
|
562
621
|
##
|
563
|
-
#
|
564
|
-
# the given +generation+ in the threads +generation_key+ list.
|
565
|
-
#
|
566
|
-
# See #shutdown for a bunch of scary warning about misusing this method.
|
567
|
-
|
568
|
-
def cleanup(generation, thread = Thread.current,
|
569
|
-
generation_key = @generation_key) # :nodoc:
|
570
|
-
timeouts = thread[@timeout_key]
|
571
|
-
|
572
|
-
(0...generation).each do |old_generation|
|
573
|
-
next unless thread[generation_key]
|
574
|
-
|
575
|
-
conns = thread[generation_key].delete old_generation
|
622
|
+
# The ciphers allowed for SSL connections
|
576
623
|
|
577
|
-
|
578
|
-
|
624
|
+
def ciphers= ciphers
|
625
|
+
@ciphers = ciphers
|
579
626
|
|
580
|
-
|
581
|
-
end if conns
|
582
|
-
end
|
627
|
+
reconnect_ssl
|
583
628
|
end
|
584
629
|
|
585
630
|
##
|
586
631
|
# Creates a new connection for +uri+
|
587
632
|
|
588
633
|
def connection_for uri
|
589
|
-
Thread.current[@generation_key] ||= Hash.new { |h,k| h[k] = {} }
|
590
|
-
Thread.current[@ssl_generation_key] ||= Hash.new { |h,k| h[k] = {} }
|
591
|
-
Thread.current[@request_key] ||= Hash.new 0
|
592
|
-
Thread.current[@timeout_key] ||= Hash.new EPOCH
|
593
|
-
|
594
634
|
use_ssl = uri.scheme.downcase == 'https'
|
595
635
|
|
596
|
-
|
597
|
-
raise Bundler::Persistent::Net::HTTP::Persistent::Error, 'OpenSSL is not available' unless
|
598
|
-
HAVE_OPENSSL
|
599
|
-
|
600
|
-
ssl_generation = @ssl_generation
|
601
|
-
|
602
|
-
ssl_cleanup ssl_generation
|
636
|
+
net_http_args = [uri.hostname, uri.port]
|
603
637
|
|
604
|
-
|
605
|
-
else
|
606
|
-
generation = @generation
|
607
|
-
|
608
|
-
cleanup generation
|
609
|
-
|
610
|
-
connections = Thread.current[@generation_key][generation]
|
611
|
-
end
|
612
|
-
|
613
|
-
net_http_args = [uri.host, uri.port]
|
614
|
-
connection_id = net_http_args.join ':'
|
615
|
-
|
616
|
-
if @proxy_uri and not proxy_bypass? uri.host, uri.port then
|
617
|
-
connection_id << @proxy_connection_id
|
638
|
+
if @proxy_uri and not proxy_bypass? uri.hostname, uri.port then
|
618
639
|
net_http_args.concat @proxy_args
|
619
640
|
else
|
620
641
|
net_http_args.concat [nil, nil, nil, nil]
|
621
642
|
end
|
622
643
|
|
623
|
-
connection =
|
644
|
+
connection = @pool.checkout net_http_args
|
624
645
|
|
625
|
-
|
626
|
-
connections[connection_id] = http_class.new(*net_http_args)
|
627
|
-
connection = connections[connection_id]
|
628
|
-
ssl connection if use_ssl
|
629
|
-
else
|
630
|
-
reset connection if expired? connection
|
631
|
-
end
|
646
|
+
http = connection.http
|
632
647
|
|
633
|
-
|
648
|
+
connection.ressl @ssl_generation if
|
649
|
+
connection.ssl_generation != @ssl_generation
|
634
650
|
|
635
|
-
|
636
|
-
|
651
|
+
if not http.started? then
|
652
|
+
ssl http if use_ssl
|
653
|
+
start http
|
654
|
+
elsif expired? connection then
|
655
|
+
reset connection
|
656
|
+
end
|
637
657
|
|
638
|
-
|
658
|
+
http.read_timeout = @read_timeout if @read_timeout
|
659
|
+
http.write_timeout = @write_timeout if @write_timeout && http.respond_to?(:write_timeout=)
|
660
|
+
http.keep_alive_timeout = @idle_timeout if @idle_timeout
|
661
|
+
|
662
|
+
return yield connection
|
639
663
|
rescue Errno::ECONNREFUSED
|
640
|
-
address =
|
641
|
-
port =
|
664
|
+
address = http.proxy_address || http.address
|
665
|
+
port = http.proxy_port || http.port
|
642
666
|
|
643
667
|
raise Error, "connection refused: #{address}:#{port}"
|
644
668
|
rescue Errno::EHOSTDOWN
|
645
|
-
address =
|
646
|
-
port =
|
669
|
+
address = http.proxy_address || http.address
|
670
|
+
port = http.proxy_port || http.port
|
647
671
|
|
648
672
|
raise Error, "host down: #{address}:#{port}"
|
673
|
+
ensure
|
674
|
+
@pool.checkin net_http_args
|
649
675
|
end
|
650
676
|
|
651
677
|
##
|
@@ -653,12 +679,11 @@ class Bundler::Persistent::Net::HTTP::Persistent
|
|
653
679
|
# this connection
|
654
680
|
|
655
681
|
def error_message connection
|
656
|
-
|
657
|
-
last_use = Thread.current[@timeout_key][connection.object_id]
|
682
|
+
connection.requests -= 1 # fixup
|
658
683
|
|
659
|
-
age = Time.now - last_use
|
684
|
+
age = Time.now - connection.last_use
|
660
685
|
|
661
|
-
"after #{requests} requests on #{connection.object_id}, " \
|
686
|
+
"after #{connection.requests} requests on #{connection.http.object_id}, " \
|
662
687
|
"last used #{age} seconds ago"
|
663
688
|
end
|
664
689
|
|
@@ -682,26 +707,23 @@ class Bundler::Persistent::Net::HTTP::Persistent
|
|
682
707
|
# maximum request count, false otherwise.
|
683
708
|
|
684
709
|
def expired? connection
|
685
|
-
requests
|
686
|
-
return true if @max_requests && requests >= @max_requests
|
710
|
+
return true if @max_requests && connection.requests >= @max_requests
|
687
711
|
return false unless @idle_timeout
|
688
712
|
return true if @idle_timeout.zero?
|
689
713
|
|
690
|
-
|
691
|
-
|
692
|
-
Time.now - last_used > @idle_timeout
|
714
|
+
Time.now - connection.last_use > @idle_timeout
|
693
715
|
end
|
694
716
|
|
695
717
|
##
|
696
718
|
# Starts the Net::HTTP +connection+
|
697
719
|
|
698
|
-
def start
|
699
|
-
|
700
|
-
|
720
|
+
def start http
|
721
|
+
http.set_debug_output @debug_output if @debug_output
|
722
|
+
http.open_timeout = @open_timeout if @open_timeout
|
701
723
|
|
702
|
-
|
724
|
+
http.start
|
703
725
|
|
704
|
-
socket =
|
726
|
+
socket = http.instance_variable_get :@socket
|
705
727
|
|
706
728
|
if socket then # for fakeweb
|
707
729
|
@socket_options.each do |option|
|
@@ -713,25 +735,11 @@ class Bundler::Persistent::Net::HTTP::Persistent
|
|
713
735
|
##
|
714
736
|
# Finishes the Net::HTTP +connection+
|
715
737
|
|
716
|
-
def finish connection
|
717
|
-
if requests = thread[@request_key] then
|
718
|
-
requests.delete connection.object_id
|
719
|
-
end
|
720
|
-
|
738
|
+
def finish connection
|
721
739
|
connection.finish
|
722
|
-
rescue IOError
|
723
|
-
end
|
724
740
|
|
725
|
-
|
726
|
-
|
727
|
-
Net::HTTP
|
728
|
-
elsif [:Artifice, :FakeWeb, :WebMock].any? { |klass|
|
729
|
-
Object.const_defined?(klass)
|
730
|
-
} or not @reuse_ssl_sessions then
|
731
|
-
Net::HTTP
|
732
|
-
else
|
733
|
-
Bundler::Persistent::Net::HTTP::Persistent::SSLReuse
|
734
|
-
end
|
741
|
+
connection.http.instance_variable_set :@ssl_session, nil unless
|
742
|
+
@reuse_ssl_sessions
|
735
743
|
end
|
736
744
|
|
737
745
|
##
|
@@ -745,64 +753,17 @@ class Bundler::Persistent::Net::HTTP::Persistent
|
|
745
753
|
# Is +req+ idempotent according to RFC 2616?
|
746
754
|
|
747
755
|
def idempotent? req
|
748
|
-
case req
|
749
|
-
when
|
750
|
-
Net::HTTP::Options, Net::HTTP::Put, Net::HTTP::Trace then
|
756
|
+
case req.method
|
757
|
+
when 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PUT', 'TRACE' then
|
751
758
|
true
|
752
759
|
end
|
753
760
|
end
|
754
761
|
|
755
762
|
##
|
756
763
|
# Is the request +req+ idempotent or is retry_change_requests allowed.
|
757
|
-
#
|
758
|
-
# If +retried_on_ruby_2+ is true, true will be returned if we are on ruby,
|
759
|
-
# retry_change_requests is allowed and the request is not idempotent.
|
760
764
|
|
761
|
-
def can_retry? req
|
762
|
-
|
763
|
-
|
764
|
-
@retry_change_requests || idempotent?(req)
|
765
|
-
end
|
766
|
-
|
767
|
-
if RUBY_VERSION > '1.9' then
|
768
|
-
##
|
769
|
-
# Workaround for missing Net::HTTPHeader#connection_close? on Ruby 1.8
|
770
|
-
|
771
|
-
def connection_close? header
|
772
|
-
header.connection_close?
|
773
|
-
end
|
774
|
-
|
775
|
-
##
|
776
|
-
# Workaround for missing Net::HTTPHeader#connection_keep_alive? on Ruby 1.8
|
777
|
-
|
778
|
-
def connection_keep_alive? header
|
779
|
-
header.connection_keep_alive?
|
780
|
-
end
|
781
|
-
else
|
782
|
-
##
|
783
|
-
# Workaround for missing Net::HTTPRequest#connection_close? on Ruby 1.8
|
784
|
-
|
785
|
-
def connection_close? header
|
786
|
-
header['connection'] =~ /close/ or header['proxy-connection'] =~ /close/
|
787
|
-
end
|
788
|
-
|
789
|
-
##
|
790
|
-
# Workaround for missing Net::HTTPRequest#connection_keep_alive? on Ruby
|
791
|
-
# 1.8
|
792
|
-
|
793
|
-
def connection_keep_alive? header
|
794
|
-
header['connection'] =~ /keep-alive/ or
|
795
|
-
header['proxy-connection'] =~ /keep-alive/
|
796
|
-
end
|
797
|
-
end
|
798
|
-
|
799
|
-
##
|
800
|
-
# Deprecated in favor of #expired?
|
801
|
-
|
802
|
-
def max_age # :nodoc:
|
803
|
-
return Time.now + 1 unless @idle_timeout
|
804
|
-
|
805
|
-
Time.now - @idle_timeout
|
765
|
+
def can_retry? req
|
766
|
+
@retry_change_requests && !idempotent?(req)
|
806
767
|
end
|
807
768
|
|
808
769
|
##
|
@@ -824,9 +785,9 @@ class Bundler::Persistent::Net::HTTP::Persistent
|
|
824
785
|
# <tt>net-http-persistent</tt> #pipeline will be present.
|
825
786
|
|
826
787
|
def pipeline uri, requests, &block # :yields: responses
|
827
|
-
|
828
|
-
|
829
|
-
|
788
|
+
connection_for uri do |connection|
|
789
|
+
connection.http.pipeline requests, &block
|
790
|
+
end
|
830
791
|
end
|
831
792
|
|
832
793
|
##
|
@@ -959,18 +920,17 @@ class Bundler::Persistent::Net::HTTP::Persistent
|
|
959
920
|
# Finishes then restarts the Net::HTTP +connection+
|
960
921
|
|
961
922
|
def reset connection
|
962
|
-
|
963
|
-
Thread.current[@timeout_key].delete connection.object_id
|
923
|
+
http = connection.http
|
964
924
|
|
965
925
|
finish connection
|
966
926
|
|
967
|
-
start
|
927
|
+
start http
|
968
928
|
rescue Errno::ECONNREFUSED
|
969
|
-
e = Error.new "connection refused: #{
|
929
|
+
e = Error.new "connection refused: #{http.address}:#{http.port}"
|
970
930
|
e.set_backtrace $@
|
971
931
|
raise e
|
972
932
|
rescue Errno::EHOSTDOWN
|
973
|
-
e = Error.new "host down: #{
|
933
|
+
e = Error.new "host down: #{http.address}:#{http.port}"
|
974
934
|
e.set_backtrace $@
|
975
935
|
raise e
|
976
936
|
end
|
@@ -982,7 +942,7 @@ class Bundler::Persistent::Net::HTTP::Persistent
|
|
982
942
|
# If a block is passed #request behaves like Net::HTTP#request (the body of
|
983
943
|
# the response will not have been read).
|
984
944
|
#
|
985
|
-
# +req+ must be a Net::
|
945
|
+
# +req+ must be a Net::HTTPGenericRequest subclass (see Net::HTTP for a list).
|
986
946
|
#
|
987
947
|
# If there is an error and the request is idempotent according to RFC 2616
|
988
948
|
# it will be retried automatically.
|
@@ -991,52 +951,56 @@ class Bundler::Persistent::Net::HTTP::Persistent
|
|
991
951
|
retried = false
|
992
952
|
bad_response = false
|
993
953
|
|
994
|
-
|
954
|
+
uri = URI uri
|
955
|
+
req = request_setup req || uri
|
956
|
+
response = nil
|
995
957
|
|
996
|
-
|
997
|
-
|
958
|
+
connection_for uri do |connection|
|
959
|
+
http = connection.http
|
998
960
|
|
999
|
-
|
1000
|
-
|
1001
|
-
response = connection.request req, &block
|
961
|
+
begin
|
962
|
+
connection.requests += 1
|
1002
963
|
|
1003
|
-
|
1004
|
-
(response.http_version <= '1.0' and
|
1005
|
-
not connection_keep_alive?(response)) or
|
1006
|
-
connection_close?(response) then
|
1007
|
-
connection.finish
|
1008
|
-
end
|
1009
|
-
rescue Net::HTTPBadResponse => e
|
1010
|
-
message = error_message connection
|
964
|
+
response = http.request req, &block
|
1011
965
|
|
1012
|
-
|
966
|
+
if req.connection_close? or
|
967
|
+
(response.http_version <= '1.0' and
|
968
|
+
not response.connection_keep_alive?) or
|
969
|
+
response.connection_close? then
|
970
|
+
finish connection
|
971
|
+
end
|
972
|
+
rescue Net::HTTPBadResponse => e
|
973
|
+
message = error_message connection
|
1013
974
|
|
1014
|
-
|
975
|
+
finish connection
|
976
|
+
|
977
|
+
raise Error, "too many bad responses #{message}" if
|
1015
978
|
bad_response or not can_retry? req
|
1016
979
|
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
980
|
+
bad_response = true
|
981
|
+
retry
|
982
|
+
rescue *RETRIED_EXCEPTIONS => e
|
983
|
+
request_failed e, req, connection if
|
984
|
+
retried or not can_retry? req
|
1022
985
|
|
1023
|
-
|
986
|
+
reset connection
|
1024
987
|
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
988
|
+
retried = true
|
989
|
+
retry
|
990
|
+
rescue Errno::EINVAL, Errno::ETIMEDOUT => e # not retried on ruby 2
|
991
|
+
request_failed e, req, connection if retried or not can_retry? req
|
1029
992
|
|
1030
|
-
|
993
|
+
reset connection
|
1031
994
|
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
995
|
+
retried = true
|
996
|
+
retry
|
997
|
+
rescue Exception => e
|
998
|
+
finish connection
|
1036
999
|
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1000
|
+
raise
|
1001
|
+
ensure
|
1002
|
+
connection.last_use = Time.now
|
1003
|
+
end
|
1040
1004
|
end
|
1041
1005
|
|
1042
1006
|
@http_versions["#{uri.host}:#{uri.port}"] ||= response.http_version
|
@@ -1056,7 +1020,6 @@ class Bundler::Persistent::Net::HTTP::Persistent
|
|
1056
1020
|
|
1057
1021
|
finish connection
|
1058
1022
|
|
1059
|
-
|
1060
1023
|
raise Error, message, exception.backtrace
|
1061
1024
|
end
|
1062
1025
|
|
@@ -1090,45 +1053,15 @@ class Bundler::Persistent::Net::HTTP::Persistent
|
|
1090
1053
|
end
|
1091
1054
|
|
1092
1055
|
##
|
1093
|
-
# Shuts down all connections
|
1094
|
-
#
|
1095
|
-
# Uses the current thread by default.
|
1056
|
+
# Shuts down all connections
|
1096
1057
|
#
|
1097
|
-
#
|
1098
|
-
# call this in each thread when you're done making HTTP requests.
|
1058
|
+
# *NOTE*: Calling shutdown for can be dangerous!
|
1099
1059
|
#
|
1100
|
-
#
|
1101
|
-
#
|
1102
|
-
# If the thread is still using the connection it may cause an error! It is
|
1103
|
-
# best to call #shutdown in the thread at the appropriate time instead!
|
1104
|
-
|
1105
|
-
def shutdown thread = Thread.current
|
1106
|
-
generation = reconnect
|
1107
|
-
cleanup generation, thread, @generation_key
|
1108
|
-
|
1109
|
-
ssl_generation = reconnect_ssl
|
1110
|
-
cleanup ssl_generation, thread, @ssl_generation_key
|
1060
|
+
# If any thread is still using a connection it may cause an error! Call
|
1061
|
+
# #shutdown when you are completely done making requests!
|
1111
1062
|
|
1112
|
-
|
1113
|
-
|
1114
|
-
end
|
1115
|
-
|
1116
|
-
##
|
1117
|
-
# Shuts down all connections in all threads
|
1118
|
-
#
|
1119
|
-
# *NOTE*: THIS METHOD IS VERY DANGEROUS!
|
1120
|
-
#
|
1121
|
-
# Do not call this method if other threads are still using their
|
1122
|
-
# connections! Call #shutdown at the appropriate time instead!
|
1123
|
-
#
|
1124
|
-
# Use this method only as a last resort!
|
1125
|
-
|
1126
|
-
def shutdown_in_all_threads
|
1127
|
-
Thread.list.each do |thread|
|
1128
|
-
shutdown thread
|
1129
|
-
end
|
1130
|
-
|
1131
|
-
nil
|
1063
|
+
def shutdown
|
1064
|
+
@pool.shutdown { |http| http.finish }
|
1132
1065
|
end
|
1133
1066
|
|
1134
1067
|
##
|
@@ -1137,9 +1070,14 @@ class Bundler::Persistent::Net::HTTP::Persistent
|
|
1137
1070
|
def ssl connection
|
1138
1071
|
connection.use_ssl = true
|
1139
1072
|
|
1073
|
+
connection.ciphers = @ciphers if @ciphers
|
1074
|
+
connection.ssl_timeout = @ssl_timeout if @ssl_timeout
|
1140
1075
|
connection.ssl_version = @ssl_version if @ssl_version
|
1076
|
+
connection.min_version = @min_version if @min_version
|
1077
|
+
connection.max_version = @max_version if @max_version
|
1141
1078
|
|
1142
|
-
connection.
|
1079
|
+
connection.verify_depth = @verify_depth
|
1080
|
+
connection.verify_mode = @verify_mode
|
1143
1081
|
|
1144
1082
|
if OpenSSL::SSL::VERIFY_PEER == OpenSSL::SSL::VERIFY_NONE and
|
1145
1083
|
not Object.const_defined?(:I_KNOW_THAT_OPENSSL_VERIFY_PEER_EQUALS_VERIFY_NONE_IS_WRONG) then
|
@@ -1168,8 +1106,10 @@ application:
|
|
1168
1106
|
WARNING
|
1169
1107
|
end
|
1170
1108
|
|
1171
|
-
if @ca_file
|
1172
|
-
|
1109
|
+
connection.ca_file = @ca_file if @ca_file
|
1110
|
+
connection.ca_path = @ca_path if @ca_path
|
1111
|
+
|
1112
|
+
if @ca_file or @ca_path then
|
1173
1113
|
connection.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
1174
1114
|
connection.verify_callback = @verify_callback if @verify_callback
|
1175
1115
|
end
|
@@ -1189,11 +1129,12 @@ application:
|
|
1189
1129
|
end
|
1190
1130
|
|
1191
1131
|
##
|
1192
|
-
#
|
1193
|
-
# +generation+.
|
1132
|
+
# SSL session lifetime
|
1194
1133
|
|
1195
|
-
def
|
1196
|
-
|
1134
|
+
def ssl_timeout= ssl_timeout
|
1135
|
+
@ssl_timeout = ssl_timeout
|
1136
|
+
|
1137
|
+
reconnect_ssl
|
1197
1138
|
end
|
1198
1139
|
|
1199
1140
|
##
|
@@ -1203,7 +1144,34 @@ application:
|
|
1203
1144
|
@ssl_version = ssl_version
|
1204
1145
|
|
1205
1146
|
reconnect_ssl
|
1206
|
-
end
|
1147
|
+
end
|
1148
|
+
|
1149
|
+
##
|
1150
|
+
# Minimum SSL version to use
|
1151
|
+
|
1152
|
+
def min_version= min_version
|
1153
|
+
@min_version = min_version
|
1154
|
+
|
1155
|
+
reconnect_ssl
|
1156
|
+
end
|
1157
|
+
|
1158
|
+
##
|
1159
|
+
# maximum SSL version to use
|
1160
|
+
|
1161
|
+
def max_version= max_version
|
1162
|
+
@max_version = max_version
|
1163
|
+
|
1164
|
+
reconnect_ssl
|
1165
|
+
end
|
1166
|
+
|
1167
|
+
##
|
1168
|
+
# Sets the depth of SSL certificate verification
|
1169
|
+
|
1170
|
+
def verify_depth= verify_depth
|
1171
|
+
@verify_depth = verify_depth
|
1172
|
+
|
1173
|
+
reconnect_ssl
|
1174
|
+
end
|
1207
1175
|
|
1208
1176
|
##
|
1209
1177
|
# Sets the HTTPS verify mode. Defaults to OpenSSL::SSL::VERIFY_PEER.
|
@@ -1229,5 +1197,6 @@ application:
|
|
1229
1197
|
|
1230
1198
|
end
|
1231
1199
|
|
1232
|
-
|
1200
|
+
require_relative 'persistent/connection'
|
1201
|
+
require_relative 'persistent/pool'
|
1233
1202
|
|