rubygems-update 2.6.11 → 2.7.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +8 -22
- data/CONTRIBUTING.rdoc +53 -54
- data/History.txt +405 -0
- data/Manifest.txt +46 -15
- data/POLICIES.rdoc +3 -3
- data/README.md +72 -0
- data/Rakefile +55 -12
- data/appveyor.yml +29 -1
- data/bin/gem +1 -1
- data/bin/update_rubygems +2 -2
- data/bundler/CHANGELOG.md +412 -9
- data/bundler/CODE_OF_CONDUCT.md +1 -1
- data/bundler/CONTRIBUTING.md +10 -29
- data/bundler/README.md +27 -11
- data/bundler/bundler.gemspec +58 -0
- data/bundler/exe/bundle +5 -7
- data/bundler/exe/bundle_ruby +4 -3
- data/bundler/lib/bundler.rb +103 -79
- data/bundler/lib/bundler/build_metadata.rb +53 -0
- data/bundler/lib/bundler/capistrano.rb +5 -0
- data/bundler/lib/bundler/cli.rb +231 -66
- data/bundler/lib/bundler/cli/add.rb +25 -0
- data/bundler/lib/bundler/cli/binstubs.rb +9 -7
- data/bundler/lib/bundler/cli/cache.rb +5 -4
- data/bundler/lib/bundler/cli/check.rb +3 -5
- data/bundler/lib/bundler/cli/clean.rb +5 -6
- data/bundler/lib/bundler/cli/common.rb +18 -2
- data/bundler/lib/bundler/cli/config.rb +26 -7
- data/bundler/lib/bundler/cli/console.rb +2 -1
- data/bundler/lib/bundler/cli/doctor.rb +1 -0
- data/bundler/lib/bundler/cli/exec.rb +6 -5
- data/bundler/lib/bundler/cli/gem.rb +42 -18
- data/bundler/lib/bundler/cli/info.rb +50 -0
- data/bundler/lib/bundler/cli/init.rb +21 -7
- data/bundler/lib/bundler/cli/inject.rb +13 -4
- data/bundler/lib/bundler/cli/install.rb +61 -77
- data/bundler/lib/bundler/cli/issue.rb +40 -0
- data/bundler/lib/bundler/cli/list.rb +22 -0
- data/bundler/lib/bundler/cli/lock.rb +4 -2
- data/bundler/lib/bundler/cli/open.rb +2 -2
- data/bundler/lib/bundler/cli/outdated.rb +30 -28
- data/bundler/lib/bundler/cli/package.rb +9 -6
- data/bundler/lib/bundler/cli/platform.rb +1 -0
- data/bundler/lib/bundler/cli/plugin.rb +1 -0
- data/bundler/lib/bundler/cli/pristine.rb +43 -0
- data/bundler/lib/bundler/cli/show.rb +1 -1
- data/bundler/lib/bundler/cli/update.rb +36 -13
- data/bundler/lib/bundler/cli/viz.rb +5 -1
- data/bundler/lib/bundler/compact_index_client.rb +1 -0
- data/bundler/lib/bundler/compact_index_client/cache.rb +1 -2
- data/bundler/lib/bundler/compact_index_client/updater.rb +36 -8
- data/bundler/lib/bundler/compatibility_guard.rb +14 -0
- data/bundler/lib/bundler/constants.rb +1 -0
- data/bundler/lib/bundler/current_ruby.rb +16 -8
- data/bundler/lib/bundler/definition.rb +252 -170
- data/bundler/lib/bundler/dep_proxy.rb +3 -1
- data/bundler/lib/bundler/dependency.rb +7 -7
- data/bundler/lib/bundler/deployment.rb +1 -1
- data/bundler/lib/bundler/deprecate.rb +15 -3
- data/bundler/lib/bundler/dsl.rb +103 -62
- data/bundler/lib/bundler/endpoint_specification.rb +13 -3
- data/bundler/lib/bundler/env.rb +101 -38
- data/bundler/lib/bundler/environment_preserver.rb +27 -6
- data/bundler/lib/bundler/errors.rb +3 -1
- data/bundler/lib/bundler/feature_flag.rb +39 -4
- data/bundler/lib/bundler/fetcher.rb +18 -11
- data/bundler/lib/bundler/fetcher/base.rb +1 -0
- data/bundler/lib/bundler/fetcher/compact_index.rb +2 -12
- data/bundler/lib/bundler/fetcher/dependency.rb +2 -1
- data/bundler/lib/bundler/fetcher/downloader.rb +14 -7
- data/bundler/lib/bundler/fetcher/index.rb +3 -2
- data/bundler/lib/bundler/friendly_errors.rb +7 -2
- data/bundler/lib/bundler/gem_helper.rb +24 -10
- data/bundler/lib/bundler/gem_helpers.rb +1 -0
- data/bundler/lib/bundler/gem_remote_fetcher.rb +1 -0
- data/bundler/lib/bundler/gem_tasks.rb +1 -0
- data/bundler/lib/bundler/gem_version_promoter.rb +13 -0
- data/bundler/lib/bundler/gemdeps.rb +1 -0
- data/bundler/lib/bundler/graph.rb +1 -0
- data/bundler/lib/bundler/index.rb +19 -11
- data/bundler/lib/bundler/injector.rb +54 -30
- data/bundler/lib/bundler/inline.rb +10 -10
- data/bundler/lib/bundler/installer.rb +114 -52
- data/bundler/lib/bundler/installer/gem_installer.rb +14 -4
- data/bundler/lib/bundler/installer/parallel_installer.rb +91 -42
- data/bundler/lib/bundler/installer/standalone.rb +1 -0
- data/bundler/lib/bundler/lazy_specification.rb +17 -4
- data/bundler/lib/bundler/lockfile_generator.rb +95 -0
- data/bundler/lib/bundler/lockfile_parser.rb +49 -35
- data/bundler/lib/bundler/match_platform.rb +1 -0
- data/bundler/lib/bundler/mirror.rb +10 -5
- data/bundler/lib/bundler/plugin.rb +8 -3
- data/bundler/lib/bundler/plugin/api/source.rb +16 -3
- data/bundler/lib/bundler/plugin/index.rb +9 -2
- data/bundler/lib/bundler/plugin/installer.rb +7 -6
- data/bundler/lib/bundler/plugin/source_list.rb +7 -8
- data/bundler/lib/bundler/process_lock.rb +24 -0
- data/bundler/lib/bundler/psyched_yaml.rb +10 -0
- data/bundler/lib/bundler/remote_specification.rb +25 -1
- data/bundler/lib/bundler/resolver.rb +176 -193
- data/bundler/lib/bundler/resolver/spec_group.rb +106 -0
- data/bundler/lib/bundler/retry.rb +1 -0
- data/bundler/lib/bundler/ruby_dsl.rb +1 -0
- data/bundler/lib/bundler/ruby_version.rb +7 -2
- data/bundler/lib/bundler/rubygems_ext.rb +18 -8
- data/bundler/lib/bundler/rubygems_gem_installer.rb +25 -2
- data/bundler/lib/bundler/rubygems_integration.rb +166 -69
- data/bundler/lib/bundler/runtime.rb +29 -19
- data/bundler/lib/bundler/settings.rb +202 -87
- data/bundler/lib/bundler/settings/validator.rb +79 -0
- data/bundler/lib/bundler/setup.rb +4 -7
- data/bundler/lib/bundler/shared_helpers.rb +143 -27
- data/bundler/lib/bundler/similarity_detector.rb +1 -0
- data/bundler/lib/bundler/source.rb +53 -1
- data/bundler/lib/bundler/source/gemspec.rb +1 -0
- data/bundler/lib/bundler/source/git.rb +51 -22
- data/bundler/lib/bundler/source/git/git_proxy.rb +23 -13
- data/bundler/lib/bundler/source/metadata.rb +63 -0
- data/bundler/lib/bundler/source/path.rb +38 -17
- data/bundler/lib/bundler/source/path/installer.rb +4 -2
- data/bundler/lib/bundler/source/rubygems.rb +161 -82
- data/bundler/lib/bundler/source/rubygems/remote.rb +12 -2
- data/bundler/lib/bundler/source_list.rb +75 -15
- data/bundler/lib/bundler/spec_set.rb +37 -21
- data/bundler/lib/bundler/ssl_certs/certificate_manager.rb +2 -1
- data/bundler/lib/bundler/stub_specification.rb +86 -2
- data/bundler/lib/bundler/templates/.document +1 -0
- data/bundler/lib/bundler/templates/Executable +13 -1
- data/bundler/lib/bundler/templates/Executable.bundler +105 -0
- data/bundler/lib/bundler/templates/Executable.standalone +5 -5
- data/bundler/lib/bundler/templates/Gemfile +3 -0
- data/bundler/lib/bundler/templates/gems.rb +8 -0
- data/bundler/lib/bundler/templates/newgem/Gemfile.tt +4 -2
- data/bundler/lib/bundler/templates/newgem/LICENSE.txt.tt +1 -1
- data/bundler/lib/bundler/templates/newgem/README.md.tt +14 -8
- data/bundler/lib/bundler/templates/newgem/Rakefile.tt +5 -5
- data/bundler/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt +4 -4
- data/bundler/lib/bundler/templates/newgem/ext/newgem/newgem.h.tt +3 -3
- data/bundler/lib/bundler/templates/newgem/gitignore.tt +0 -1
- data/bundler/lib/bundler/templates/newgem/lib/newgem.rb.tt +6 -6
- data/bundler/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +4 -4
- data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +21 -12
- data/bundler/lib/bundler/templates/newgem/rspec.tt +1 -0
- data/bundler/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +0 -2
- data/bundler/lib/bundler/templates/newgem/spec/spec_helper.rb.tt +3 -0
- data/bundler/lib/bundler/templates/newgem/test/newgem_test.rb.tt +1 -1
- data/bundler/lib/bundler/templates/newgem/test/test_helper.rb.tt +3 -3
- data/bundler/lib/bundler/templates/newgem/{.travis.yml.tt → travis.yml.tt} +2 -0
- data/bundler/lib/bundler/ui.rb +1 -0
- data/bundler/lib/bundler/ui/rg_proxy.rb +1 -0
- data/bundler/lib/bundler/ui/shell.rb +26 -10
- data/bundler/lib/bundler/ui/silent.rb +12 -1
- data/bundler/lib/bundler/uri_credentials_filter.rb +1 -0
- data/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb +1638 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo.rb +2 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/compatibility.rb +26 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +7 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +1 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +16 -5
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb +1 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +10 -2
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +1 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +1 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +1 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb +1 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb +1 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +1 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +16 -5
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +75 -7
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +2 -1
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +1 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb +3 -1
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +501 -138
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb +1 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/state.rb +8 -4
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +3 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor.rb +46 -21
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions.rb +24 -22
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb +2 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb +2 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/directory.rb +2 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +16 -8
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +66 -18
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +17 -15
- data/bundler/lib/bundler/vendor/thor/lib/thor/base.rb +55 -32
- data/bundler/lib/bundler/vendor/thor/lib/thor/command.rb +13 -11
- data/bundler/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +21 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/core_ext/io_binary_read.rb +7 -5
- data/bundler/lib/bundler/vendor/thor/lib/thor/core_ext/ordered_hash.rb +94 -63
- data/bundler/lib/bundler/vendor/thor/lib/thor/error.rb +3 -3
- data/bundler/lib/bundler/vendor/thor/lib/thor/group.rb +13 -13
- data/bundler/lib/bundler/vendor/thor/lib/thor/invocation.rb +4 -5
- data/bundler/lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb +2 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +4 -7
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +16 -16
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/option.rb +42 -21
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/options.rb +13 -10
- data/bundler/lib/bundler/vendor/thor/lib/thor/runner.rb +31 -29
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +49 -33
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/color.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/html.rb +4 -4
- data/bundler/lib/bundler/vendor/thor/lib/thor/util.rb +8 -7
- data/bundler/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
- data/bundler/lib/bundler/vendored_fileutils.rb +9 -0
- data/bundler/lib/bundler/vendored_molinillo.rb +1 -0
- data/bundler/lib/bundler/vendored_persistent.rb +35 -0
- data/bundler/lib/bundler/vendored_thor.rb +6 -2
- data/bundler/lib/bundler/version.rb +19 -2
- data/bundler/lib/bundler/version_ranges.rb +76 -0
- data/bundler/lib/bundler/vlad.rb +5 -0
- data/bundler/lib/bundler/worker.rb +3 -1
- data/bundler/lib/bundler/yaml_serializer.rb +3 -3
- data/bundler/man/bundle-add.ronn +29 -0
- data/bundler/man/bundle-binstubs.ronn +15 -1
- data/bundler/man/bundle-check.ronn +26 -0
- data/bundler/man/bundle-clean.ronn +18 -0
- data/bundler/man/bundle-config.ronn +193 -69
- data/bundler/man/bundle-doctor.ronn +33 -0
- data/bundler/man/bundle-exec.ronn +10 -3
- data/bundler/man/bundle-gem.ronn +3 -2
- data/bundler/man/bundle-info.ronn +17 -0
- data/bundler/man/bundle-init.ronn +29 -0
- data/bundler/man/bundle-inject.ronn +22 -0
- data/bundler/man/bundle-install.ronn +44 -35
- data/bundler/man/bundle-list.ronn +15 -0
- data/bundler/man/bundle-lock.ronn +1 -1
- data/bundler/man/bundle-open.ronn +19 -0
- data/bundler/man/bundle-outdated.ronn +2 -2
- data/bundler/man/bundle-package.ronn +7 -2
- data/bundler/man/bundle-pristine.ronn +34 -0
- data/bundler/man/bundle-show.ronn +21 -0
- data/bundler/man/bundle-update.ronn +24 -17
- data/bundler/man/bundle-viz.ronn +30 -0
- data/bundler/man/bundle.ronn +36 -45
- data/bundler/man/gemfile.5.ronn +77 -71
- data/lib/rubygems.rb +102 -46
- data/lib/rubygems/basic_specification.rb +8 -4
- data/lib/rubygems/bundler_version_finder.rb +99 -0
- data/lib/rubygems/command.rb +10 -2
- data/lib/rubygems/command_manager.rb +8 -4
- data/lib/rubygems/commands/cert_command.rb +31 -6
- data/lib/rubygems/commands/cleanup_command.rb +10 -3
- data/lib/rubygems/commands/generate_index_command.rb +1 -1
- data/lib/rubygems/commands/help_command.rb +1 -1
- data/lib/rubygems/commands/install_command.rb +7 -0
- data/lib/rubygems/commands/open_command.rb +1 -1
- data/lib/rubygems/commands/owner_command.rb +7 -2
- data/lib/rubygems/commands/pristine_command.rb +11 -8
- data/lib/rubygems/commands/push_command.rb +39 -5
- data/lib/rubygems/commands/query_command.rb +17 -17
- data/lib/rubygems/commands/setup_command.rb +174 -69
- data/lib/rubygems/commands/signin_command.rb +33 -0
- data/lib/rubygems/commands/signout_command.rb +33 -0
- data/lib/rubygems/commands/sources_command.rb +1 -1
- data/lib/rubygems/commands/uninstall_command.rb +5 -4
- data/lib/rubygems/commands/unpack_command.rb +19 -7
- data/lib/rubygems/commands/update_command.rb +1 -1
- data/lib/rubygems/commands/which_command.rb +1 -1
- data/lib/rubygems/commands/yank_command.rb +4 -11
- data/lib/rubygems/config_file.rb +15 -26
- data/lib/rubygems/core_ext/kernel_require.rb +12 -16
- data/lib/rubygems/dependency.rb +3 -0
- data/lib/rubygems/dependency_installer.rb +8 -2
- data/lib/rubygems/dependency_list.rb +1 -1
- data/lib/rubygems/errors.rb +3 -0
- data/lib/rubygems/exceptions.rb +11 -1
- data/lib/rubygems/ext/builder.rb +2 -2
- data/lib/rubygems/ext/ext_conf_builder.rb +2 -4
- data/lib/rubygems/ext/rake_builder.rb +1 -1
- data/lib/rubygems/gem_runner.rb +5 -1
- data/lib/rubygems/gemcutter_utilities.rb +5 -2
- data/lib/rubygems/indexer.rb +6 -5
- data/lib/rubygems/install_update_options.rb +6 -29
- data/lib/rubygems/installer.rb +60 -13
- data/lib/rubygems/installer_test_case.rb +6 -3
- data/lib/rubygems/package.rb +55 -8
- data/lib/rubygems/package/file_source.rb +2 -2
- data/lib/rubygems/package/old.rb +3 -3
- data/lib/rubygems/package/tar_header.rb +17 -10
- data/lib/rubygems/package/tar_writer.rb +4 -3
- data/lib/rubygems/platform.rb +1 -1
- data/lib/rubygems/remote_fetcher.rb +2 -2
- data/lib/rubygems/request.rb +1 -1
- data/lib/rubygems/request_set.rb +47 -19
- data/lib/rubygems/request_set/gem_dependency_api.rb +3 -3
- data/lib/rubygems/request_set/lockfile.rb +1 -1
- data/lib/rubygems/requirement.rb +19 -4
- data/lib/rubygems/resolver.rb +24 -3
- data/lib/rubygems/resolver/api_specification.rb +5 -0
- data/lib/rubygems/resolver/installer_set.rb +4 -6
- data/lib/rubygems/safe_yaml.rb +51 -0
- data/lib/rubygems/security.rb +18 -6
- data/lib/rubygems/security/trust_dir.rb +1 -1
- data/lib/rubygems/security_option.rb +43 -0
- data/lib/rubygems/server.rb +21 -17
- data/lib/rubygems/source.rb +9 -6
- data/lib/rubygems/source/git.rb +2 -1
- data/lib/rubygems/source/local.rb +38 -35
- data/lib/rubygems/source/lock.rb +4 -1
- data/lib/rubygems/source_local.rb +3 -1
- data/lib/rubygems/source_specific_file.rb +3 -2
- data/lib/rubygems/spec_fetcher.rb +7 -3
- data/lib/rubygems/specification.rb +315 -249
- data/lib/rubygems/ssl_certs/{index.rubygems.org → rubygems.org}/GlobalSignRootCA.pem +0 -0
- data/lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA_R3.pem +21 -0
- data/lib/rubygems/stub_specification.rb +4 -3
- data/lib/rubygems/test_case.rb +51 -11
- data/lib/rubygems/test_utilities.rb +2 -2
- data/lib/rubygems/text.rb +14 -1
- data/lib/rubygems/user_interaction.rb +24 -15
- data/lib/rubygems/util.rb +6 -16
- data/lib/rubygems/util/licenses.rb +72 -4
- data/lib/rubygems/validator.rb +3 -3
- data/lib/rubygems/version.rb +24 -4
- data/lib/rubygems/version_option.rb +6 -1
- data/lib/ubygems.rb +3 -0
- data/setup.rb +1 -1
- data/test/rubygems/private3072_key.pem +40 -0
- data/test/rubygems/public3072_cert.pem +25 -0
- data/test/rubygems/test_bundled_ca.rb +7 -4
- data/test/rubygems/test_config.rb +1 -1
- data/test/rubygems/test_gem.rb +158 -39
- data/test/rubygems/test_gem_bundler_version_finder.rb +126 -0
- data/test/rubygems/test_gem_command.rb +7 -1
- data/test/rubygems/test_gem_command_manager.rb +2 -2
- data/test/rubygems/test_gem_commands_build_command.rb +29 -1
- data/test/rubygems/test_gem_commands_cert_command.rb +64 -0
- data/test/rubygems/test_gem_commands_cleanup_command.rb +44 -1
- data/test/rubygems/test_gem_commands_install_command.rb +73 -2
- data/test/rubygems/test_gem_commands_open_command.rb +2 -1
- data/test/rubygems/test_gem_commands_owner_command.rb +25 -0
- data/test/rubygems/test_gem_commands_pristine_command.rb +1 -1
- data/test/rubygems/test_gem_commands_push_command.rb +25 -5
- data/test/rubygems/test_gem_commands_query_command.rb +154 -1
- data/test/rubygems/test_gem_commands_setup_command.rb +140 -10
- data/test/rubygems/test_gem_commands_signin_command.rb +98 -0
- data/test/rubygems/test_gem_commands_signout_command.rb +37 -0
- data/test/rubygems/test_gem_commands_sources_command.rb +52 -0
- data/test/rubygems/test_gem_commands_uninstall_command.rb +15 -3
- data/test/rubygems/test_gem_commands_update_command.rb +1 -7
- data/test/rubygems/test_gem_commands_which_command.rb +3 -3
- data/test/rubygems/test_gem_dependency.rb +28 -0
- data/test/rubygems/test_gem_dependency_installer.rb +1 -1
- data/test/rubygems/test_gem_doctor.rb +2 -2
- data/test/rubygems/test_gem_ext_builder.rb +8 -8
- data/test/rubygems/test_gem_ext_configure_builder.rb +1 -1
- data/test/rubygems/test_gem_ext_rake_builder.rb +2 -6
- data/test/rubygems/test_gem_gemcutter_utilities.rb +4 -4
- data/test/rubygems/test_gem_indexer.rb +1 -2
- data/test/rubygems/test_gem_install_update_options.rb +6 -1
- data/test/rubygems/test_gem_installer.rb +168 -31
- data/test/rubygems/test_gem_package.rb +183 -26
- data/test/rubygems/test_gem_package_old.rb +1 -1
- data/test/rubygems/test_gem_package_tar_header.rb +21 -0
- data/test/rubygems/test_gem_rdoc.rb +2 -0
- data/test/rubygems/test_gem_remote_fetcher.rb +24 -5
- data/test/rubygems/test_gem_request.rb +5 -2
- data/test/rubygems/test_gem_request_connection_pools.rb +6 -7
- data/test/rubygems/test_gem_request_set.rb +7 -7
- data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +3 -3
- data/test/rubygems/test_gem_request_set_lockfile.rb +4 -4
- data/test/rubygems/test_gem_request_set_lockfile_parser.rb +1 -1
- data/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb +1 -1
- data/test/rubygems/test_gem_requirement.rb +12 -0
- data/test/rubygems/test_gem_resolver.rb +26 -0
- data/test/rubygems/test_gem_resolver_api_specification.rb +24 -0
- data/test/rubygems/test_gem_resolver_conflict.rb +1 -1
- data/test/rubygems/test_gem_resolver_git_specification.rb +1 -1
- data/test/rubygems/test_gem_resolver_installer_set.rb +1 -1
- data/test/rubygems/test_gem_security.rb +5 -0
- data/test/rubygems/test_gem_security_policy.rb +27 -27
- data/test/rubygems/test_gem_security_signer.rb +6 -6
- data/test/rubygems/test_gem_security_trust_dir.rb +2 -2
- data/test/rubygems/test_gem_server.rb +194 -12
- data/test/rubygems/test_gem_source.rb +12 -3
- data/test/rubygems/test_gem_source_git.rb +1 -1
- data/test/rubygems/test_gem_spec_fetcher.rb +20 -0
- data/test/rubygems/test_gem_specification.rb +180 -42
- data/test/rubygems/test_gem_stream_ui.rb +8 -8
- data/test/rubygems/test_gem_stub_specification.rb +26 -8
- data/test/rubygems/test_gem_text.rb +16 -0
- data/test/rubygems/test_gem_util.rb +26 -0
- data/test/rubygems/test_gem_version.rb +68 -9
- data/test/rubygems/test_gem_version_option.rb +15 -0
- data/test/rubygems/test_kernel.rb +30 -0
- data/test/rubygems/test_require.rb +70 -21
- data/util/ci +1 -0
- data/util/generate_spdx_license_list.rb +16 -6
- data/util/update_bundled_ca_certificates.rb +1 -3
- metadata +61 -57
- data/README.rdoc +0 -54
- data/bundler/DEVELOPMENT.md +0 -150
- data/bundler/ISSUES.md +0 -117
- data/bundler/lib/bundler/postit_trampoline.rb +0 -73
- data/bundler/lib/bundler/vendor/postit/lib/postit.rb +0 -15
- data/bundler/lib/bundler/vendor/postit/lib/postit/environment.rb +0 -44
- data/bundler/lib/bundler/vendor/postit/lib/postit/installer.rb +0 -28
- data/bundler/lib/bundler/vendor/postit/lib/postit/parser.rb +0 -21
- data/bundler/lib/bundler/vendor/postit/lib/postit/setup.rb +0 -12
- data/bundler/lib/bundler/vendor/postit/lib/postit/version.rb +0 -3
- data/bundler/man/index.txt +0 -8
- data/lib/rubygems/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem +0 -23
- data/lib/rubygems/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem +0 -25
@@ -0,0 +1,51 @@
|
|
1
|
+
module Gem
|
2
|
+
|
3
|
+
###
|
4
|
+
# This module is used for safely loading YAML specs from a gem. The
|
5
|
+
# `safe_load` method defined on this module is specifically designed for
|
6
|
+
# loading Gem specifications. For loading other YAML safely, please see
|
7
|
+
# Psych.safe_load
|
8
|
+
|
9
|
+
module SafeYAML
|
10
|
+
WHITELISTED_CLASSES = %w(
|
11
|
+
Symbol
|
12
|
+
Time
|
13
|
+
Date
|
14
|
+
Gem::Dependency
|
15
|
+
Gem::Platform
|
16
|
+
Gem::Requirement
|
17
|
+
Gem::Specification
|
18
|
+
Gem::Version
|
19
|
+
Gem::Version::Requirement
|
20
|
+
YAML::Syck::DefaultKey
|
21
|
+
Syck::DefaultKey
|
22
|
+
)
|
23
|
+
|
24
|
+
WHITELISTED_SYMBOLS = %w(
|
25
|
+
development
|
26
|
+
runtime
|
27
|
+
)
|
28
|
+
|
29
|
+
if ::YAML.respond_to? :safe_load
|
30
|
+
def self.safe_load input
|
31
|
+
::YAML.safe_load(input, WHITELISTED_CLASSES, WHITELISTED_SYMBOLS, true)
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.load input
|
35
|
+
::YAML.safe_load(input, [::Symbol])
|
36
|
+
end
|
37
|
+
else
|
38
|
+
unless Gem::Deprecate.skip
|
39
|
+
warn "YAML safe loading is not available. Please upgrade psych to a version that supports safe loading (>= 2.0)."
|
40
|
+
end
|
41
|
+
|
42
|
+
def self.safe_load input, *args
|
43
|
+
::YAML.load input
|
44
|
+
end
|
45
|
+
|
46
|
+
def self.load input
|
47
|
+
::YAML.load input
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
data/lib/rubygems/security.rb
CHANGED
@@ -340,16 +340,23 @@ module Gem::Security
|
|
340
340
|
# Digest algorithm used to sign gems
|
341
341
|
|
342
342
|
DIGEST_ALGORITHM =
|
343
|
-
if defined?(OpenSSL::Digest::
|
343
|
+
if defined?(OpenSSL::Digest::SHA256) then
|
344
|
+
OpenSSL::Digest::SHA256
|
345
|
+
elsif defined?(OpenSSL::Digest::SHA1) then
|
344
346
|
OpenSSL::Digest::SHA1
|
347
|
+
else
|
348
|
+
require 'digest'
|
349
|
+
Digest::SHA512
|
345
350
|
end
|
346
351
|
|
347
352
|
##
|
348
353
|
# Used internally to select the signing digest from all computed digests
|
349
354
|
|
350
355
|
DIGEST_NAME = # :nodoc:
|
351
|
-
if DIGEST_ALGORITHM then
|
356
|
+
if DIGEST_ALGORITHM.method_defined? :name then
|
352
357
|
DIGEST_ALGORITHM.new.name
|
358
|
+
else
|
359
|
+
DIGEST_ALGORITHM.name[/::([^:]+)\z/, 1]
|
353
360
|
end
|
354
361
|
|
355
362
|
##
|
@@ -363,7 +370,7 @@ module Gem::Security
|
|
363
370
|
##
|
364
371
|
# Length of keys created by KEY_ALGORITHM
|
365
372
|
|
366
|
-
KEY_LENGTH =
|
373
|
+
KEY_LENGTH = 3072
|
367
374
|
|
368
375
|
##
|
369
376
|
# Cipher used to encrypt the key pair used to sign gems.
|
@@ -371,10 +378,15 @@ module Gem::Security
|
|
371
378
|
|
372
379
|
KEY_CIPHER = OpenSSL::Cipher.new('AES-256-CBC') if defined?(OpenSSL::Cipher)
|
373
380
|
|
381
|
+
##
|
382
|
+
# One day in seconds
|
383
|
+
|
384
|
+
ONE_DAY = 86400
|
385
|
+
|
374
386
|
##
|
375
387
|
# One year in seconds
|
376
388
|
|
377
|
-
ONE_YEAR =
|
389
|
+
ONE_YEAR = ONE_DAY * 365
|
378
390
|
|
379
391
|
##
|
380
392
|
# The default set of extensions are:
|
@@ -455,7 +467,7 @@ module Gem::Security
|
|
455
467
|
|
456
468
|
##
|
457
469
|
# Creates a new key pair of the specified +length+ and +algorithm+. The
|
458
|
-
# default is a
|
470
|
+
# default is a 3072 bit RSA key.
|
459
471
|
|
460
472
|
def self.create_key length = KEY_LENGTH, algorithm = KEY_ALGORITHM
|
461
473
|
algorithm.new length
|
@@ -571,7 +583,7 @@ module Gem::Security
|
|
571
583
|
def self.write pemmable, path, permissions = 0600, passphrase = nil, cipher = KEY_CIPHER
|
572
584
|
path = File.expand_path path
|
573
585
|
|
574
|
-
open path, 'wb', permissions do |io|
|
586
|
+
File.open path, 'wb', permissions do |io|
|
575
587
|
if passphrase and cipher
|
576
588
|
io.write pemmable.to_pem cipher, passphrase
|
577
589
|
else
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
#--
|
3
|
+
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
|
4
|
+
# All rights reserved.
|
5
|
+
# See LICENSE.txt for permissions.
|
6
|
+
#++
|
7
|
+
|
8
|
+
require 'rubygems'
|
9
|
+
|
10
|
+
# forward-declare
|
11
|
+
|
12
|
+
module Gem::Security # :nodoc:
|
13
|
+
class Policy # :nodoc:
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
##
|
18
|
+
# Mixin methods for security option for Gem::Commands
|
19
|
+
|
20
|
+
module Gem::SecurityOption
|
21
|
+
def add_security_option
|
22
|
+
# TODO: use @parser.accept
|
23
|
+
OptionParser.accept Gem::Security::Policy do |value|
|
24
|
+
require 'rubygems/security'
|
25
|
+
|
26
|
+
raise OptionParser::InvalidArgument, 'OpenSSL not installed' unless
|
27
|
+
defined?(Gem::Security::HighSecurity)
|
28
|
+
|
29
|
+
policy = Gem::Security::Policies[value]
|
30
|
+
unless policy
|
31
|
+
valid = Gem::Security::Policies.keys.sort
|
32
|
+
raise OptionParser::InvalidArgument, "#{value} (#{valid.join ', '} are valid)"
|
33
|
+
end
|
34
|
+
policy
|
35
|
+
end
|
36
|
+
|
37
|
+
add_option(:"Install/Update", '-P', '--trust-policy POLICY',
|
38
|
+
Gem::Security::Policy,
|
39
|
+
'Specify gem trust policy') do |value, options|
|
40
|
+
options[:security_policy] = value
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
data/lib/rubygems/server.rb
CHANGED
@@ -492,7 +492,7 @@ div.method-source-code pre { color: #ffdead; overflow: hidden; }
|
|
492
492
|
specs = Marshal.dump specs
|
493
493
|
|
494
494
|
if req.path =~ /\.gz$/ then
|
495
|
-
specs = Gem.gzip specs
|
495
|
+
specs = Gem::Util.gzip specs
|
496
496
|
res['content-type'] = 'application/x-gzip'
|
497
497
|
else
|
498
498
|
res['content-type'] = 'application/octet-stream'
|
@@ -553,7 +553,7 @@ div.method-source-code pre { color: #ffdead; overflow: hidden; }
|
|
553
553
|
specs = Marshal.dump specs
|
554
554
|
|
555
555
|
if req.path =~ /\.gz$/ then
|
556
|
-
specs = Gem.gzip specs
|
556
|
+
specs = Gem::Util.gzip specs
|
557
557
|
res['content-type'] = 'application/x-gzip'
|
558
558
|
else
|
559
559
|
res['content-type'] = 'application/octet-stream'
|
@@ -573,19 +573,11 @@ div.method-source-code pre { color: #ffdead; overflow: hidden; }
|
|
573
573
|
add_date res
|
574
574
|
|
575
575
|
case req.request_uri.path
|
576
|
-
when %r|^/quick/(Marshal.#{Regexp.escape Gem.marshal_version}/)?(.*?)
|
577
|
-
marshal_format,
|
578
|
-
specs = Gem::Specification.
|
576
|
+
when %r|^/quick/(Marshal.#{Regexp.escape Gem.marshal_version}/)?(.*?)\.gemspec\.rz$| then
|
577
|
+
marshal_format, full_name = $1, $2
|
578
|
+
specs = Gem::Specification.find_all_by_full_name(full_name)
|
579
579
|
|
580
|
-
selector =
|
581
|
-
|
582
|
-
platform = if platform then
|
583
|
-
Gem::Platform.new platform.sub(/^-/, '')
|
584
|
-
else
|
585
|
-
Gem::Platform::RUBY
|
586
|
-
end
|
587
|
-
|
588
|
-
specs = specs.select { |s| s.platform == platform }
|
580
|
+
selector = full_name.inspect
|
589
581
|
|
590
582
|
if specs.empty? then
|
591
583
|
res.status = 404
|
@@ -631,6 +623,18 @@ div.method-source-code pre { color: #ffdead; overflow: hidden; }
|
|
631
623
|
executables = nil if executables.empty?
|
632
624
|
executables.last["is_last"] = true if executables
|
633
625
|
|
626
|
+
# Pre-process spec homepage for safety reasons
|
627
|
+
begin
|
628
|
+
homepage_uri = URI.parse(spec.homepage)
|
629
|
+
if [URI::HTTP, URI::HTTPS].member? homepage_uri.class
|
630
|
+
homepage_uri = spec.homepage
|
631
|
+
else
|
632
|
+
homepage_uri = "."
|
633
|
+
end
|
634
|
+
rescue URI::InvalidURIError
|
635
|
+
homepage_uri = "."
|
636
|
+
end
|
637
|
+
|
634
638
|
specs << {
|
635
639
|
"authors" => spec.authors.sort.join(", "),
|
636
640
|
"date" => spec.date.to_s,
|
@@ -640,7 +644,7 @@ div.method-source-code pre { color: #ffdead; overflow: hidden; }
|
|
640
644
|
"only_one_executable" => (executables && executables.size == 1),
|
641
645
|
"full_name" => spec.full_name,
|
642
646
|
"has_deps" => !deps.empty?,
|
643
|
-
"homepage" =>
|
647
|
+
"homepage" => homepage_uri,
|
644
648
|
"name" => spec.name,
|
645
649
|
"rdoc_installed" => Gem::RDoc.new(spec).rdoc_installed?,
|
646
650
|
"ri_installed" => Gem::RDoc.new(spec).ri_installed?,
|
@@ -657,7 +661,7 @@ div.method-source-code pre { color: #ffdead; overflow: hidden; }
|
|
657
661
|
"only_one_executable" => true,
|
658
662
|
"full_name" => "rubygems-#{Gem::VERSION}",
|
659
663
|
"has_deps" => false,
|
660
|
-
"homepage" => "http://
|
664
|
+
"homepage" => "http://guides.rubygems.org/",
|
661
665
|
"name" => 'rubygems',
|
662
666
|
"ri_installed" => true,
|
663
667
|
"summary" => "RubyGems itself",
|
@@ -848,7 +852,7 @@ div.method-source-code pre { color: #ffdead; overflow: hidden; }
|
|
848
852
|
specs = Marshal.dump specs
|
849
853
|
|
850
854
|
if req.path =~ /\.gz$/ then
|
851
|
-
specs = Gem.gzip specs
|
855
|
+
specs = Gem::Util.gzip specs
|
852
856
|
res['content-type'] = 'application/x-gzip'
|
853
857
|
else
|
854
858
|
res['content-type'] = 'application/octet-stream'
|
data/lib/rubygems/source.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
3
|
-
|
2
|
+
autoload :FileUtils, 'fileutils'
|
3
|
+
autoload :URI, 'uri'
|
4
4
|
|
5
5
|
##
|
6
6
|
# A Source knows how to list and fetch gems from a RubyGems marshal index.
|
@@ -67,7 +67,11 @@ class Gem::Source
|
|
67
67
|
|
68
68
|
return -1 if !other.uri
|
69
69
|
|
70
|
-
|
70
|
+
# Returning 1 here ensures that when sorting a list of sources, the
|
71
|
+
# original ordering of sources supplied by the user is preserved.
|
72
|
+
return 1 unless @uri.to_s == other.uri.to_s
|
73
|
+
|
74
|
+
0
|
71
75
|
else
|
72
76
|
nil
|
73
77
|
end
|
@@ -151,12 +155,12 @@ class Gem::Source
|
|
151
155
|
uri.path << '.rz'
|
152
156
|
|
153
157
|
spec = fetcher.fetch_path uri
|
154
|
-
spec = Gem.inflate spec
|
158
|
+
spec = Gem::Util.inflate spec
|
155
159
|
|
156
160
|
if update_cache? then
|
157
161
|
FileUtils.mkdir_p cache_dir
|
158
162
|
|
159
|
-
open local_spec, 'wb' do |io|
|
163
|
+
File.open local_spec, 'wb' do |io|
|
160
164
|
io.write spec
|
161
165
|
end
|
162
166
|
end
|
@@ -232,4 +236,3 @@ require 'rubygems/source/specific_file'
|
|
232
236
|
require 'rubygems/source/local'
|
233
237
|
require 'rubygems/source/lock'
|
234
238
|
require 'rubygems/source/vendor'
|
235
|
-
|
data/lib/rubygems/source/git.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
require 'digest'
|
3
2
|
require 'rubygems/util'
|
4
3
|
|
5
4
|
##
|
@@ -226,6 +225,8 @@ class Gem::Source::Git < Gem::Source
|
|
226
225
|
# A hash for the git gem based on the git repository URI.
|
227
226
|
|
228
227
|
def uri_hash # :nodoc:
|
228
|
+
require 'digest' # required here to avoid deadlocking in Gem.activate_bin_path (because digest is a gem on 2.5+)
|
229
|
+
|
229
230
|
normalized =
|
230
231
|
if @repository =~ %r%^\w+://(\w+@)?% then
|
231
232
|
uri = URI(@repository).normalize.to_s.sub %r%/$%,''
|
@@ -9,6 +9,7 @@ class Gem::Source::Local < Gem::Source
|
|
9
9
|
@specs = nil
|
10
10
|
@api_uri = nil
|
11
11
|
@uri = nil
|
12
|
+
@load_specs_names = {}
|
12
13
|
end
|
13
14
|
|
14
15
|
##
|
@@ -34,45 +35,47 @@ class Gem::Source::Local < Gem::Source
|
|
34
35
|
end
|
35
36
|
|
36
37
|
def load_specs type # :nodoc:
|
37
|
-
|
38
|
-
|
39
|
-
@specs = {}
|
40
|
-
|
41
|
-
Dir["*.gem"].each do |file|
|
42
|
-
begin
|
43
|
-
pkg = Gem::Package.new(file)
|
44
|
-
rescue SystemCallError, Gem::Package::FormatError
|
45
|
-
# ignore
|
46
|
-
else
|
47
|
-
tup = pkg.spec.name_tuple
|
48
|
-
@specs[tup] = [File.expand_path(file), pkg]
|
49
|
-
|
50
|
-
case type
|
51
|
-
when :released
|
52
|
-
unless pkg.spec.version.prerelease?
|
53
|
-
names << pkg.spec.name_tuple
|
54
|
-
end
|
55
|
-
when :prerelease
|
56
|
-
if pkg.spec.version.prerelease?
|
57
|
-
names << pkg.spec.name_tuple
|
58
|
-
end
|
59
|
-
when :latest
|
60
|
-
tup = pkg.spec.name_tuple
|
38
|
+
@load_specs_names[type] ||= begin
|
39
|
+
names = []
|
61
40
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
41
|
+
@specs = {}
|
42
|
+
|
43
|
+
Dir["*.gem"].each do |file|
|
44
|
+
begin
|
45
|
+
pkg = Gem::Package.new(file)
|
46
|
+
rescue SystemCallError, Gem::Package::FormatError
|
47
|
+
# ignore
|
69
48
|
else
|
70
|
-
|
49
|
+
tup = pkg.spec.name_tuple
|
50
|
+
@specs[tup] = [File.expand_path(file), pkg]
|
51
|
+
|
52
|
+
case type
|
53
|
+
when :released
|
54
|
+
unless pkg.spec.version.prerelease?
|
55
|
+
names << pkg.spec.name_tuple
|
56
|
+
end
|
57
|
+
when :prerelease
|
58
|
+
if pkg.spec.version.prerelease?
|
59
|
+
names << pkg.spec.name_tuple
|
60
|
+
end
|
61
|
+
when :latest
|
62
|
+
tup = pkg.spec.name_tuple
|
63
|
+
|
64
|
+
cur = names.find { |x| x.name == tup.name }
|
65
|
+
if !cur
|
66
|
+
names << tup
|
67
|
+
elsif cur.version < tup.version
|
68
|
+
names.delete cur
|
69
|
+
names << tup
|
70
|
+
end
|
71
|
+
else
|
72
|
+
names << pkg.spec.name_tuple
|
73
|
+
end
|
71
74
|
end
|
72
75
|
end
|
73
|
-
end
|
74
76
|
|
75
|
-
|
77
|
+
names
|
78
|
+
end
|
76
79
|
end
|
77
80
|
|
78
81
|
def find_gem gem_name, version = Gem::Requirement.default, # :nodoc:
|
@@ -88,7 +91,7 @@ class Gem::Source::Local < Gem::Source
|
|
88
91
|
if version.satisfied_by?(s.version)
|
89
92
|
if prerelease
|
90
93
|
found << s
|
91
|
-
elsif !s.version.prerelease?
|
94
|
+
elsif !s.version.prerelease? || version.prerelease?
|
92
95
|
found << s
|
93
96
|
end
|
94
97
|
end
|
data/lib/rubygems/source/lock.rb
CHANGED
@@ -34,6 +34,10 @@ class Gem::Source::Lock < Gem::Source
|
|
34
34
|
0 == (self <=> other)
|
35
35
|
end
|
36
36
|
|
37
|
+
def hash # :nodoc:
|
38
|
+
@wrapped.hash ^ 3
|
39
|
+
end
|
40
|
+
|
37
41
|
##
|
38
42
|
# Delegates to the wrapped source's fetch_spec method.
|
39
43
|
|
@@ -46,4 +50,3 @@ class Gem::Source::Lock < Gem::Source
|
|
46
50
|
end
|
47
51
|
|
48
52
|
end
|
49
|
-
|
@@ -2,5 +2,7 @@
|
|
2
2
|
require 'rubygems/source'
|
3
3
|
require 'rubygems/source_local'
|
4
4
|
|
5
|
-
|
5
|
+
unless Gem::Deprecate.skip
|
6
|
+
Kernel.warn "#{Gem.location_of_caller(3).join(':')}: Warning: Requiring rubygems/source_local is deprecated; please use rubygems/source/local instead."
|
7
|
+
end
|
6
8
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
require 'rubygems/source/specific_file'
|
3
3
|
|
4
|
-
|
5
|
-
|
4
|
+
unless Gem::Deprecate.skip
|
5
|
+
Kernel.warn "#{Gem.location_of_caller(3).join(':')}: Warning: Requiring rubygems/source_specific_file is deprecated; please use rubygems/source/specific_file instead."
|
6
|
+
end
|