rubygems-update 2.6.3 → 2.7.7
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rubygems-update might be problematic. Click here for more details.
- checksums.yaml +5 -5
- data/.travis.yml +17 -34
- data/CODE_OF_CONDUCT.md +36 -33
- data/CONTRIBUTING.rdoc +56 -55
- data/History.txt +467 -10
- data/Manifest.txt +276 -4
- data/POLICIES.rdoc +4 -4
- data/README.md +72 -0
- data/Rakefile +77 -10
- data/appveyor.yml +61 -31
- data/bin/gem +1 -1
- data/bin/update_rubygems +2 -2
- data/bundler/CHANGELOG.md +2910 -0
- data/bundler/CODE_OF_CONDUCT.md +42 -0
- data/bundler/CONTRIBUTING.md +17 -0
- data/bundler/LICENSE.md +23 -0
- data/bundler/README.md +63 -0
- data/bundler/bundler.gemspec +57 -0
- data/bundler/exe/bundle +31 -0
- data/bundler/exe/bundle_ruby +60 -0
- data/bundler/exe/bundler +4 -0
- data/bundler/lib/bundler/build_metadata.rb +36 -0
- data/bundler/lib/bundler/capistrano.rb +22 -0
- data/bundler/lib/bundler/cli/add.rb +25 -0
- data/bundler/lib/bundler/cli/binstubs.rb +43 -0
- data/bundler/lib/bundler/cli/cache.rb +36 -0
- data/bundler/lib/bundler/cli/check.rb +38 -0
- data/bundler/lib/bundler/cli/clean.rb +25 -0
- data/bundler/lib/bundler/cli/common.rb +102 -0
- data/bundler/lib/bundler/cli/config.rb +119 -0
- data/bundler/lib/bundler/cli/console.rb +43 -0
- data/bundler/lib/bundler/cli/doctor.rb +94 -0
- data/bundler/lib/bundler/cli/exec.rb +104 -0
- data/bundler/lib/bundler/cli/gem.rb +252 -0
- data/bundler/lib/bundler/cli/info.rb +50 -0
- data/bundler/lib/bundler/cli/init.rb +47 -0
- data/bundler/lib/bundler/cli/inject.rb +60 -0
- data/bundler/lib/bundler/cli/install.rb +214 -0
- 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 +63 -0
- data/bundler/lib/bundler/cli/open.rb +26 -0
- data/bundler/lib/bundler/cli/outdated.rb +260 -0
- data/bundler/lib/bundler/cli/package.rb +49 -0
- data/bundler/lib/bundler/cli/platform.rb +46 -0
- data/bundler/lib/bundler/cli/plugin.rb +24 -0
- data/bundler/lib/bundler/cli/pristine.rb +43 -0
- data/bundler/lib/bundler/cli/show.rb +75 -0
- data/bundler/lib/bundler/cli/update.rb +91 -0
- data/bundler/lib/bundler/cli/viz.rb +31 -0
- data/bundler/lib/bundler/cli.rb +748 -0
- data/bundler/lib/bundler/compact_index_client/cache.rb +118 -0
- data/bundler/lib/bundler/compact_index_client/updater.rb +116 -0
- data/bundler/lib/bundler/compact_index_client.rb +109 -0
- data/bundler/lib/bundler/compatibility_guard.rb +14 -0
- data/bundler/lib/bundler/constants.rb +7 -0
- data/bundler/lib/bundler/current_ruby.rb +86 -0
- data/bundler/lib/bundler/definition.rb +989 -0
- data/bundler/lib/bundler/dep_proxy.rb +48 -0
- data/bundler/lib/bundler/dependency.rb +138 -0
- data/bundler/lib/bundler/deployment.rb +69 -0
- data/bundler/lib/bundler/deprecate.rb +43 -0
- data/bundler/lib/bundler/dsl.rb +599 -0
- data/bundler/lib/bundler/endpoint_specification.rb +141 -0
- data/bundler/lib/bundler/env.rb +153 -0
- data/bundler/lib/bundler/environment_preserver.rb +59 -0
- data/bundler/lib/bundler/errors.rb +158 -0
- data/bundler/lib/bundler/feature_flag.rb +67 -0
- data/bundler/lib/bundler/fetcher/base.rb +52 -0
- data/bundler/lib/bundler/fetcher/compact_index.rb +126 -0
- data/bundler/lib/bundler/fetcher/dependency.rb +82 -0
- data/bundler/lib/bundler/fetcher/downloader.rb +79 -0
- data/bundler/lib/bundler/fetcher/index.rb +52 -0
- data/bundler/lib/bundler/fetcher.rb +312 -0
- data/bundler/lib/bundler/friendly_errors.rb +131 -0
- data/bundler/lib/bundler/gem_helper.rb +202 -0
- data/bundler/lib/bundler/gem_helpers.rb +101 -0
- data/bundler/lib/bundler/gem_remote_fetcher.rb +43 -0
- data/bundler/lib/bundler/gem_tasks.rb +7 -0
- data/bundler/lib/bundler/gem_version_promoter.rb +176 -0
- data/bundler/lib/bundler/gemdeps.rb +29 -0
- data/bundler/lib/bundler/graph.rb +152 -0
- data/bundler/lib/bundler/index.rb +213 -0
- data/bundler/lib/bundler/injector.rb +94 -0
- data/bundler/lib/bundler/inline.rb +74 -0
- data/bundler/lib/bundler/installer/gem_installer.rb +83 -0
- data/bundler/lib/bundler/installer/parallel_installer.rb +228 -0
- data/bundler/lib/bundler/installer/standalone.rb +53 -0
- data/bundler/lib/bundler/installer.rb +295 -0
- data/bundler/lib/bundler/lazy_specification.rb +123 -0
- data/bundler/lib/bundler/lockfile_generator.rb +95 -0
- data/bundler/lib/bundler/lockfile_parser.rb +256 -0
- data/bundler/lib/bundler/match_platform.rb +24 -0
- data/bundler/lib/bundler/mirror.rb +223 -0
- data/bundler/lib/bundler/plugin/api/source.rb +306 -0
- data/bundler/lib/bundler/plugin/api.rb +81 -0
- data/bundler/lib/bundler/plugin/dsl.rb +53 -0
- data/bundler/lib/bundler/plugin/index.rb +162 -0
- data/bundler/lib/bundler/plugin/installer/git.rb +38 -0
- data/bundler/lib/bundler/plugin/installer/rubygems.rb +27 -0
- data/bundler/lib/bundler/plugin/installer.rb +96 -0
- data/bundler/lib/bundler/plugin/source_list.rb +27 -0
- data/bundler/lib/bundler/plugin.rb +285 -0
- data/bundler/lib/bundler/process_lock.rb +24 -0
- data/bundler/lib/bundler/psyched_yaml.rb +37 -0
- data/bundler/lib/bundler/remote_specification.rb +114 -0
- data/bundler/lib/bundler/resolver/spec_group.rb +110 -0
- data/bundler/lib/bundler/resolver.rb +372 -0
- data/bundler/lib/bundler/retry.rb +66 -0
- data/bundler/lib/bundler/ruby_dsl.rb +18 -0
- data/bundler/lib/bundler/ruby_version.rb +152 -0
- data/bundler/lib/bundler/rubygems_ext.rb +210 -0
- data/bundler/lib/bundler/rubygems_gem_installer.rb +99 -0
- data/bundler/lib/bundler/rubygems_integration.rb +898 -0
- data/bundler/lib/bundler/runtime.rb +316 -0
- data/bundler/lib/bundler/settings/validator.rb +79 -0
- data/bundler/lib/bundler/settings.rb +442 -0
- data/bundler/lib/bundler/setup.rb +28 -0
- data/bundler/lib/bundler/shared_helpers.rb +356 -0
- data/bundler/lib/bundler/similarity_detector.rb +63 -0
- data/bundler/lib/bundler/source/gemspec.rb +18 -0
- data/bundler/lib/bundler/source/git/git_proxy.rb +262 -0
- data/bundler/lib/bundler/source/git.rb +329 -0
- data/bundler/lib/bundler/source/metadata.rb +63 -0
- data/bundler/lib/bundler/source/path/installer.rb +74 -0
- data/bundler/lib/bundler/source/path.rb +249 -0
- data/bundler/lib/bundler/source/rubygems/remote.rb +66 -0
- data/bundler/lib/bundler/source/rubygems.rb +535 -0
- data/bundler/lib/bundler/source.rb +94 -0
- data/bundler/lib/bundler/source_list.rb +186 -0
- data/bundler/lib/bundler/spec_set.rb +192 -0
- data/bundler/lib/bundler/ssl_certs/.document +1 -0
- data/bundler/lib/bundler/ssl_certs/certificate_manager.rb +66 -0
- data/bundler/lib/bundler/ssl_certs/index.rubygems.org/GlobalSignRootCA.pem +21 -0
- data/bundler/lib/bundler/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem +23 -0
- data/bundler/lib/bundler/stub_specification.rb +108 -0
- data/bundler/lib/bundler/templates/.document +1 -0
- data/bundler/lib/bundler/templates/Executable +29 -0
- data/bundler/lib/bundler/templates/Executable.bundler +105 -0
- data/bundler/lib/bundler/templates/Executable.standalone +14 -0
- data/bundler/lib/bundler/templates/Gemfile +7 -0
- data/bundler/lib/bundler/templates/gems.rb +8 -0
- data/bundler/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +74 -0
- data/bundler/lib/bundler/templates/newgem/Gemfile.tt +6 -0
- data/bundler/lib/bundler/templates/newgem/LICENSE.txt.tt +21 -0
- data/bundler/lib/bundler/templates/newgem/README.md.tt +47 -0
- data/bundler/lib/bundler/templates/newgem/Rakefile.tt +29 -0
- data/bundler/lib/bundler/templates/newgem/bin/console.tt +14 -0
- data/bundler/lib/bundler/templates/newgem/bin/setup.tt +8 -0
- data/bundler/lib/bundler/templates/newgem/exe/newgem.tt +3 -0
- data/bundler/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt +3 -0
- data/bundler/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt +9 -0
- data/bundler/lib/bundler/templates/newgem/ext/newgem/newgem.h.tt +6 -0
- data/bundler/lib/bundler/templates/newgem/gitignore.tt +20 -0
- data/bundler/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +7 -0
- data/bundler/lib/bundler/templates/newgem/lib/newgem.rb.tt +12 -0
- data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +51 -0
- data/bundler/lib/bundler/templates/newgem/rspec.tt +3 -0
- data/bundler/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +9 -0
- data/bundler/lib/bundler/templates/newgem/spec/spec_helper.rb.tt +14 -0
- data/bundler/lib/bundler/templates/newgem/test/newgem_test.rb.tt +11 -0
- data/bundler/lib/bundler/templates/newgem/test/test_helper.rb.tt +4 -0
- data/bundler/lib/bundler/templates/newgem/travis.yml.tt +5 -0
- data/bundler/lib/bundler/ui/rg_proxy.rb +19 -0
- data/bundler/lib/bundler/ui/shell.rb +146 -0
- data/bundler/lib/bundler/ui/silent.rb +69 -0
- data/bundler/lib/bundler/ui.rb +9 -0
- data/bundler/lib/bundler/uri_credentials_filter.rb +37 -0
- data/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb +1638 -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 +57 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +81 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb +36 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +66 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +62 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +63 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +61 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb +126 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb +46 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +36 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +126 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +223 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +138 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +6 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +101 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb +67 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +837 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb +46 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/state.rb +58 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo.rb +12 -0
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/faster.rb +27 -0
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/ssl_reuse.rb +129 -0
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +1233 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb +104 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb +60 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/directory.rb +118 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +143 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +364 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +109 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions.rb +321 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/base.rb +679 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/command.rb +135 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +97 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/core_ext/io_binary_read.rb +12 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/core_ext/ordered_hash.rb +129 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/error.rb +32 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/group.rb +281 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/invocation.rb +177 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb +37 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/line_editor/readline.rb +88 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/line_editor.rb +17 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +70 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +175 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/option.rb +146 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/options.rb +221 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser.rb +4 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/rake_compat.rb +71 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/runner.rb +324 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +437 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/color.rb +149 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/html.rb +126 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell.rb +81 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/util.rb +268 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/version.rb +3 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor.rb +509 -0
- data/bundler/lib/bundler/vendored_fileutils.rb +9 -0
- data/bundler/lib/bundler/vendored_molinillo.rb +4 -0
- data/bundler/lib/bundler/vendored_persistent.rb +52 -0
- data/bundler/lib/bundler/vendored_thor.rb +8 -0
- data/bundler/lib/bundler/version.rb +28 -0
- data/bundler/lib/bundler/version_ranges.rb +76 -0
- data/bundler/lib/bundler/vlad.rb +17 -0
- data/bundler/lib/bundler/worker.rb +106 -0
- data/bundler/lib/bundler/yaml_serializer.rb +90 -0
- data/bundler/lib/bundler.rb +545 -0
- data/bundler/man/bundle-add.ronn +29 -0
- data/bundler/man/bundle-binstubs.ronn +43 -0
- data/bundler/man/bundle-check.ronn +26 -0
- data/bundler/man/bundle-clean.ronn +18 -0
- data/bundler/man/bundle-config.ronn +376 -0
- data/bundler/man/bundle-doctor.ronn +33 -0
- data/bundler/man/bundle-exec.ronn +152 -0
- data/bundler/man/bundle-gem.ronn +78 -0
- 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 +369 -0
- data/bundler/man/bundle-list.ronn +15 -0
- data/bundler/man/bundle-lock.ronn +94 -0
- data/bundler/man/bundle-open.ronn +19 -0
- data/bundler/man/bundle-outdated.ronn +107 -0
- data/bundler/man/bundle-package.ronn +72 -0
- data/bundler/man/bundle-platform.ronn +42 -0
- data/bundler/man/bundle-pristine.ronn +34 -0
- data/bundler/man/bundle-show.ronn +20 -0
- data/bundler/man/bundle-update.ronn +346 -0
- data/bundler/man/bundle-viz.ronn +30 -0
- data/bundler/man/bundle.ronn +108 -0
- data/bundler/man/gemfile.5.ronn +506 -0
- data/lib/rubygems/basic_specification.rb +8 -4
- data/lib/rubygems/bundler_version_finder.rb +116 -0
- data/lib/rubygems/command.rb +10 -2
- data/lib/rubygems/command_manager.rb +3 -1
- 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/open_command.rb +1 -1
- data/lib/rubygems/commands/owner_command.rb +4 -2
- data/lib/rubygems/commands/pristine_command.rb +11 -8
- data/lib/rubygems/commands/push_command.rb +3 -2
- data/lib/rubygems/commands/query_command.rb +17 -17
- data/lib/rubygems/commands/setup_command.rb +175 -70
- 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 +4 -3
- data/lib/rubygems/commands/unpack_command.rb +19 -7
- data/lib/rubygems/commands/update_command.rb +2 -2
- data/lib/rubygems/commands/which_command.rb +1 -1
- data/lib/rubygems/commands/yank_command.rb +4 -11
- data/lib/rubygems/config_file.rb +21 -28
- data/lib/rubygems/core_ext/kernel_require.rb +10 -9
- data/lib/rubygems/defaults.rb +18 -0
- data/lib/rubygems/dependency.rb +10 -4
- data/lib/rubygems/dependency_installer.rb +8 -2
- data/lib/rubygems/dependency_list.rb +1 -1
- data/lib/rubygems/errors.rb +4 -0
- data/lib/rubygems/exceptions.rb +11 -1
- data/lib/rubygems/ext/builder.rb +2 -2
- data/lib/rubygems/ext/ext_conf_builder.rb +7 -7
- data/lib/rubygems/ext/rake_builder.rb +2 -2
- data/lib/rubygems/gem_runner.rb +5 -1
- data/lib/rubygems/indexer.rb +6 -5
- data/lib/rubygems/install_update_options.rb +5 -28
- data/lib/rubygems/installer.rb +53 -22
- data/lib/rubygems/installer_test_case.rb +6 -3
- data/lib/rubygems/package/file_source.rb +2 -2
- data/lib/rubygems/package/old.rb +3 -3
- data/lib/rubygems/package/tar_header.rb +14 -9
- data/lib/rubygems/package/tar_writer.rb +12 -16
- data/lib/rubygems/package.rb +48 -9
- data/lib/rubygems/platform.rb +1 -1
- data/lib/rubygems/remote_fetcher.rb +13 -18
- data/lib/rubygems/request.rb +47 -1
- data/lib/rubygems/request_set/gem_dependency_api.rb +3 -3
- data/lib/rubygems/request_set/lockfile/tokenizer.rb +1 -1
- data/lib/rubygems/request_set/lockfile.rb +1 -1
- data/lib/rubygems/request_set.rb +22 -3
- data/lib/rubygems/requirement.rb +5 -1
- data/lib/rubygems/resolver/installer_set.rb +4 -6
- data/lib/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb +50 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb +80 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/action.rb +35 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +65 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +61 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +62 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +60 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb +125 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/set_payload.rb +45 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/tag.rb +35 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb +125 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb +78 -147
- data/lib/rubygems/resolver/molinillo/lib/molinillo/errors.rb +1 -1
- data/lib/rubygems/resolver/molinillo/lib/molinillo/gem_metadata.rb +1 -1
- data/lib/rubygems/resolver/molinillo/lib/molinillo/modules/ui.rb +1 -1
- data/lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb +110 -75
- data/lib/rubygems/resolver/molinillo/lib/molinillo/state.rb +4 -2
- data/lib/rubygems/resolver/set.rb +1 -1
- data/lib/rubygems/resolver.rb +61 -5
- data/lib/rubygems/safe_yaml.rb +51 -0
- data/lib/rubygems/security/signer.rb +2 -0
- data/lib/rubygems/security/trust_dir.rb +1 -1
- data/lib/rubygems/security.rb +12 -5
- data/lib/rubygems/security_option.rb +43 -0
- data/lib/rubygems/server.rb +49 -40
- 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.rb +9 -6
- 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 +317 -251
- data/lib/rubygems/ssl_certs/index.rubygems.org/GlobalSignRootCA.pem +21 -0
- data/lib/rubygems/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem +25 -0
- data/lib/rubygems/stub_specification.rb +10 -4
- 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 +22 -20
- data/lib/rubygems/util/licenses.rb +37 -0
- data/lib/rubygems/util.rb +6 -16
- data/lib/rubygems/validator.rb +3 -3
- data/lib/rubygems/version.rb +24 -5
- data/lib/rubygems/version_option.rb +6 -1
- data/lib/rubygems.rb +147 -45
- data/lib/ubygems.rb +3 -0
- data/setup.rb +1 -1
- data/test/rubygems/alternate_cert.pem +10 -9
- data/test/rubygems/alternate_cert_32.pem +10 -9
- data/test/rubygems/child_cert.pem +11 -9
- data/test/rubygems/child_cert_32.pem +11 -9
- data/test/rubygems/encrypted_private_key.pem +26 -26
- data/test/rubygems/expired_cert.pem +9 -8
- data/test/rubygems/future_cert.pem +9 -8
- data/test/rubygems/future_cert_32.pem +9 -8
- data/test/rubygems/grandchild_cert.pem +11 -9
- data/test/rubygems/grandchild_cert_32.pem +11 -9
- data/test/rubygems/invalid_issuer_cert.pem +11 -9
- data/test/rubygems/invalid_issuer_cert_32.pem +11 -9
- data/test/rubygems/invalid_signer_cert.pem +10 -9
- data/test/rubygems/invalid_signer_cert_32.pem +10 -9
- data/test/rubygems/invalidchild_cert.pem +11 -9
- data/test/rubygems/invalidchild_cert_32.pem +11 -9
- data/test/rubygems/private3072_key.pem +40 -0
- data/test/rubygems/public3072_cert.pem +25 -0
- data/test/rubygems/public_cert.pem +11 -9
- data/test/rubygems/public_cert_32.pem +10 -9
- data/test/rubygems/rubygems_plugin.rb +4 -0
- data/test/rubygems/test_bundled_ca.rb +1 -1
- data/test/rubygems/test_config.rb +1 -1
- data/test/rubygems/test_gem.rb +168 -55
- data/test/rubygems/test_gem_bundler_version_finder.rb +125 -0
- data/test/rubygems/test_gem_command.rb +7 -1
- data/test/rubygems/test_gem_commands_build_command.rb +27 -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 +36 -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 +5 -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 +14 -2
- 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_config_file.rb +1 -2
- 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_ext_conf_builder.rb +23 -0
- data/test/rubygems/test_gem_ext_rake_builder.rb +33 -16
- 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 +4 -1
- data/test/rubygems/test_gem_installer.rb +230 -32
- data/test/rubygems/test_gem_package.rb +156 -29
- 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_package_tar_writer.rb +24 -0
- data/test/rubygems/test_gem_rdoc.rb +2 -0
- data/test/rubygems/test_gem_remote_fetcher.rb +38 -19
- data/test/rubygems/test_gem_request.rb +132 -0
- 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 +6 -0
- data/test/rubygems/test_gem_resolver.rb +29 -3
- 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_security.rb +5 -0
- data/test/rubygems/test_gem_security_policy.rb +27 -27
- data/test/rubygems/test_gem_security_signer.rb +14 -6
- data/test/rubygems/test_gem_security_trust_dir.rb +2 -2
- data/test/rubygems/test_gem_server.rb +210 -12
- data/test/rubygems/test_gem_source.rb +12 -3
- data/test/rubygems/test_gem_source_fetch_problem.rb +8 -0
- 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 +163 -32
- data/test/rubygems/test_gem_stream_ui.rb +6 -6
- data/test/rubygems/test_gem_stub_specification.rb +85 -6
- data/test/rubygems/test_gem_text.rb +11 -0
- data/test/rubygems/test_gem_util.rb +26 -0
- data/test/rubygems/test_gem_version.rb +46 -7
- data/test/rubygems/test_gem_version_option.rb +15 -0
- data/test/rubygems/test_kernel.rb +30 -0
- data/test/rubygems/test_remote_fetch_error.rb +21 -0
- data/test/rubygems/test_require.rb +95 -21
- data/test/rubygems/wrong_key_cert.pem +10 -9
- data/test/rubygems/wrong_key_cert_32.pem +10 -9
- data/util/ci +74 -0
- data/util/create_certs.rb +64 -49
- data/util/generate_spdx_license_list.rb +2 -1
- data/util/patch_with_prs.rb +77 -0
- data/util/update_bundled_ca_certificates.rb +23 -2
- data/util/update_changelog.rb +67 -0
- metadata +301 -48
- data/README.rdoc +0 -54
- data/lib/gauntlet_rubygems.rb +0 -51
- data/lib/rubygems/ssl_certs/index.rubygems.org/GlobalSignRoot.pem +0 -18
- /data/{lib/rubygems/ssl_certs/rubygems.org/AddTrustExternalCARoot-2048.pem → bundler/lib/bundler/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem} +0 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
2
|
+
MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkG
|
3
|
+
A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
|
4
|
+
b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAw
|
5
|
+
MDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
|
6
|
+
YWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYDVQQDExJHbG9iYWxT
|
7
|
+
aWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDaDuaZ
|
8
|
+
jc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavp
|
9
|
+
xy0Sy6scTHAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp
|
10
|
+
1Wrjsok6Vjk4bwY8iGlbKk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdG
|
11
|
+
snUOhugZitVtbNV4FpWi6cgKOOvyJBNPc1STE4U6G7weNLWLBYy5d4ux2x8gkasJ
|
12
|
+
U26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrXgzT/LCrBbBlDSgeF59N8
|
13
|
+
9iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8E
|
14
|
+
BTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0B
|
15
|
+
AQUFAAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOz
|
16
|
+
yj1hTdNGCbM+w6DjY1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE
|
17
|
+
38NflNUVyRRBnMRddWQVDf9VMOyGj/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymP
|
18
|
+
AbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhHhm4qxFYxldBniYUr+WymXUad
|
19
|
+
DKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveCX4XSQRjbgbME
|
20
|
+
HMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A==
|
21
|
+
-----END CERTIFICATE-----
|
@@ -0,0 +1,25 @@
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
2
|
+
MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEU
|
3
|
+
MBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFs
|
4
|
+
IFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290
|
5
|
+
MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFowbzELMAkGA1UEBhMCU0Ux
|
6
|
+
FDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRUcnVzdCBFeHRlcm5h
|
7
|
+
bCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0EgUm9v
|
8
|
+
dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvt
|
9
|
+
H7xsD821+iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9
|
10
|
+
uMq/NzgtHj6RQa1wVsfwTz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzX
|
11
|
+
mk6vBbOmcZSccbNQYArHE504B4YCqOmoaSYYkKtMsE8jqzpPhNjfzp/haW+710LX
|
12
|
+
a0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy2xSoRcRdKn23tNbE7qzN
|
13
|
+
E0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv77+ldU9U0
|
14
|
+
WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYD
|
15
|
+
VR0PBAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0
|
16
|
+
Jvf6xCZU7wO94CTLVBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRU
|
17
|
+
cnVzdCBBQjEmMCQGA1UECxMdQWRkVHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsx
|
18
|
+
IjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENBIFJvb3SCAQEwDQYJKoZIhvcN
|
19
|
+
AQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZlj7DYd7usQWxH
|
20
|
+
YINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5
|
21
|
+
6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvC
|
22
|
+
Nr4TDea9Y355e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEX
|
23
|
+
c4g/VhsxOBi0cQ+azcgOno4uG+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5a
|
24
|
+
mnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=
|
25
|
+
-----END CERTIFICATE-----
|
@@ -39,7 +39,12 @@ class Gem::StubSpecification < Gem::BasicSpecification
|
|
39
39
|
def initialize data, extensions
|
40
40
|
parts = data[PREFIX.length..-1].split(" ".freeze, 4)
|
41
41
|
@name = parts[0].freeze
|
42
|
-
@version = Gem::Version.
|
42
|
+
@version = if Gem::Version.correct?(parts[1])
|
43
|
+
Gem::Version.new(parts[1])
|
44
|
+
else
|
45
|
+
Gem::Version.new(0)
|
46
|
+
end
|
47
|
+
|
43
48
|
@platform = Gem::Platform.new parts[2]
|
44
49
|
@extensions = extensions
|
45
50
|
@full_name = if platform == Gem::Platform::RUBY
|
@@ -108,6 +113,8 @@ class Gem::StubSpecification < Gem::BasicSpecification
|
|
108
113
|
unless @data
|
109
114
|
begin
|
110
115
|
saved_lineno = $.
|
116
|
+
|
117
|
+
# TODO It should be use `File.open`, but bundler-1.16.1 example expects Kernel#open.
|
111
118
|
open loaded_from, OPEN_MODE do |file|
|
112
119
|
begin
|
113
120
|
file.readline # discard encoding line
|
@@ -183,9 +190,8 @@ class Gem::StubSpecification < Gem::BasicSpecification
|
|
183
190
|
|
184
191
|
def to_spec
|
185
192
|
@spec ||= if @data then
|
186
|
-
Gem.loaded_specs
|
187
|
-
|
188
|
-
}
|
193
|
+
loaded = Gem.loaded_specs[name]
|
194
|
+
loaded if loaded && loaded.version == version
|
189
195
|
end
|
190
196
|
|
191
197
|
@spec ||= Gem::Specification.load(loaded_from)
|
data/lib/rubygems/test_case.rb
CHANGED
@@ -25,6 +25,9 @@ unless Gem::Dependency.new('rdoc', '>= 3.10').matching_specs.empty?
|
|
25
25
|
gem 'json'
|
26
26
|
end
|
27
27
|
|
28
|
+
if Gem::USE_BUNDLER_FOR_GEMDEPS
|
29
|
+
require 'bundler'
|
30
|
+
end
|
28
31
|
require 'minitest/autorun'
|
29
32
|
|
30
33
|
require 'rubygems/deprecate'
|
@@ -85,6 +88,8 @@ end
|
|
85
88
|
|
86
89
|
class Gem::TestCase < MiniTest::Unit::TestCase
|
87
90
|
|
91
|
+
extend Gem::Deprecate
|
92
|
+
|
88
93
|
attr_accessor :fetcher # :nodoc:
|
89
94
|
|
90
95
|
attr_accessor :gem_repo # :nodoc:
|
@@ -222,6 +227,7 @@ class Gem::TestCase < MiniTest::Unit::TestCase
|
|
222
227
|
@orig_gem_vendor = ENV['GEM_VENDOR']
|
223
228
|
@orig_gem_spec_cache = ENV['GEM_SPEC_CACHE']
|
224
229
|
@orig_rubygems_gemdeps = ENV['RUBYGEMS_GEMDEPS']
|
230
|
+
@orig_bundle_gemfile = ENV['BUNDLE_GEMFILE']
|
225
231
|
@orig_rubygems_host = ENV['RUBYGEMS_HOST']
|
226
232
|
ENV.keys.find_all { |k| k.start_with?('GEM_REQUIREMENT_') }.each do |k|
|
227
233
|
ENV.delete k
|
@@ -232,7 +238,15 @@ class Gem::TestCase < MiniTest::Unit::TestCase
|
|
232
238
|
|
233
239
|
@current_dir = Dir.pwd
|
234
240
|
@fetcher = nil
|
235
|
-
|
241
|
+
|
242
|
+
if Gem::USE_BUNDLER_FOR_GEMDEPS
|
243
|
+
Bundler.ui = Bundler::UI::Silent.new
|
244
|
+
end
|
245
|
+
@back_ui = Gem::DefaultUserInteraction.ui
|
246
|
+
@ui = Gem::MockGemUi.new
|
247
|
+
# This needs to be a new instance since we call use_ui(@ui) when we want to
|
248
|
+
# capture output
|
249
|
+
Gem::DefaultUserInteraction.ui = Gem::MockGemUi.new
|
236
250
|
|
237
251
|
tmpdir = File.expand_path Dir.tmpdir
|
238
252
|
tmpdir.untaint
|
@@ -283,7 +297,16 @@ class Gem::TestCase < MiniTest::Unit::TestCase
|
|
283
297
|
|
284
298
|
@orig_LOAD_PATH = $LOAD_PATH.dup
|
285
299
|
$LOAD_PATH.map! { |s|
|
286
|
-
|
300
|
+
expand_path = File.expand_path(s)
|
301
|
+
if expand_path != s
|
302
|
+
expand_path.untaint
|
303
|
+
if s.instance_variable_defined?(:@gem_prelude_index)
|
304
|
+
expand_path.instance_variable_set(:@gem_prelude_index, expand_path)
|
305
|
+
end
|
306
|
+
expand_path.freeze if s.frozen?
|
307
|
+
s = expand_path
|
308
|
+
end
|
309
|
+
s
|
287
310
|
}
|
288
311
|
|
289
312
|
Dir.chdir @tempdir
|
@@ -323,6 +346,9 @@ class Gem::TestCase < MiniTest::Unit::TestCase
|
|
323
346
|
Gem.loaded_specs.clear
|
324
347
|
Gem.clear_default_specs
|
325
348
|
Gem::Specification.unresolved_deps.clear
|
349
|
+
if Gem::USE_BUNDLER_FOR_GEMDEPS
|
350
|
+
Bundler.reset!
|
351
|
+
end
|
326
352
|
|
327
353
|
Gem.configuration.verbose = true
|
328
354
|
Gem.configuration.update_sources = true
|
@@ -394,6 +420,7 @@ class Gem::TestCase < MiniTest::Unit::TestCase
|
|
394
420
|
ENV['GEM_VENDOR'] = @orig_gem_vendor
|
395
421
|
ENV['GEM_SPEC_CACHE'] = @orig_gem_spec_cache
|
396
422
|
ENV['RUBYGEMS_GEMDEPS'] = @orig_rubygems_gemdeps
|
423
|
+
ENV['BUNDLE_GEMFILE'] = @orig_bundle_gemfile
|
397
424
|
ENV['RUBYGEMS_HOST'] = @orig_rubygems_host
|
398
425
|
|
399
426
|
Gem.ruby = @orig_ruby if @orig_ruby
|
@@ -410,6 +437,9 @@ class Gem::TestCase < MiniTest::Unit::TestCase
|
|
410
437
|
|
411
438
|
Gem::Specification._clear_load_cache
|
412
439
|
Gem::Specification.unresolved_deps.clear
|
440
|
+
Gem::refresh
|
441
|
+
|
442
|
+
@back_ui.close
|
413
443
|
end
|
414
444
|
|
415
445
|
def common_installer_setup
|
@@ -469,7 +499,7 @@ class Gem::TestCase < MiniTest::Unit::TestCase
|
|
469
499
|
|
470
500
|
gemspec = "#{name}.gemspec"
|
471
501
|
|
472
|
-
open File.join(directory, gemspec), 'w' do |io|
|
502
|
+
File.open File.join(directory, gemspec), 'w' do |io|
|
473
503
|
io.write git_spec.to_ruby
|
474
504
|
end
|
475
505
|
|
@@ -484,7 +514,7 @@ class Gem::TestCase < MiniTest::Unit::TestCase
|
|
484
514
|
|
485
515
|
system @git, 'add', gemspec
|
486
516
|
system @git, 'commit', '-a', '-m', 'a non-empty commit message', '--quiet'
|
487
|
-
head = Gem::Util.popen(
|
517
|
+
head = Gem::Util.popen(@git, 'rev-parse', 'master').strip
|
488
518
|
end
|
489
519
|
|
490
520
|
return name, git_spec.version, directory, head
|
@@ -573,7 +603,7 @@ class Gem::TestCase < MiniTest::Unit::TestCase
|
|
573
603
|
# Reads a Marshal file at +path+
|
574
604
|
|
575
605
|
def read_cache(path)
|
576
|
-
open path.dup.untaint, 'rb' do |io|
|
606
|
+
File.open path.dup.untaint, 'rb' do |io|
|
577
607
|
Marshal.load io.read
|
578
608
|
end
|
579
609
|
end
|
@@ -593,7 +623,7 @@ class Gem::TestCase < MiniTest::Unit::TestCase
|
|
593
623
|
dir = File.dirname path
|
594
624
|
FileUtils.mkdir_p dir unless File.directory? dir
|
595
625
|
|
596
|
-
open path, 'wb' do |io|
|
626
|
+
File.open path, 'wb' do |io|
|
597
627
|
yield io if block_given?
|
598
628
|
end
|
599
629
|
|
@@ -644,11 +674,13 @@ class Gem::TestCase < MiniTest::Unit::TestCase
|
|
644
674
|
end
|
645
675
|
|
646
676
|
##
|
647
|
-
# TODO: remove in RubyGems
|
677
|
+
# TODO: remove in RubyGems 4.0
|
648
678
|
|
649
679
|
def quick_spec name, version = '2' # :nodoc:
|
650
680
|
util_spec name, version
|
651
681
|
end
|
682
|
+
deprecate :quick_spec, :util_spec, 2018, 12
|
683
|
+
|
652
684
|
|
653
685
|
##
|
654
686
|
# Builds a gem from +spec+ and places it in <tt>File.join @gemhome,
|
@@ -708,7 +740,7 @@ class Gem::TestCase < MiniTest::Unit::TestCase
|
|
708
740
|
install_default_specs(*specs)
|
709
741
|
|
710
742
|
specs.each do |spec|
|
711
|
-
open spec.loaded_from, 'w' do |io|
|
743
|
+
File.open spec.loaded_from, 'w' do |io|
|
712
744
|
io.write spec.to_ruby_for_cache
|
713
745
|
end
|
714
746
|
end
|
@@ -737,13 +769,16 @@ class Gem::TestCase < MiniTest::Unit::TestCase
|
|
737
769
|
old_loaded_features = $LOADED_FEATURES.dup
|
738
770
|
yield
|
739
771
|
ensure
|
772
|
+
prefix = File.dirname(__FILE__) + "/"
|
773
|
+
new_features = ($LOADED_FEATURES - old_loaded_features)
|
774
|
+
old_loaded_features.concat(new_features.select {|f| f.rindex(prefix, 0)})
|
740
775
|
$LOADED_FEATURES.replace old_loaded_features
|
741
776
|
end
|
742
777
|
|
743
778
|
##
|
744
779
|
# new_spec is deprecated as it is never used.
|
745
780
|
#
|
746
|
-
# TODO: remove in RubyGems
|
781
|
+
# TODO: remove in RubyGems 4.0
|
747
782
|
|
748
783
|
def new_spec name, version, deps = nil, *files # :nodoc:
|
749
784
|
require 'rubygems/specification'
|
@@ -784,6 +819,8 @@ class Gem::TestCase < MiniTest::Unit::TestCase
|
|
784
819
|
|
785
820
|
spec
|
786
821
|
end
|
822
|
+
# TODO: mark deprecate after replacing util_spec from new_spec
|
823
|
+
# deprecate :new_spec, :none, 2018, 12
|
787
824
|
|
788
825
|
def new_default_spec(name, version, deps = nil, *files)
|
789
826
|
spec = util_spec name, version, deps
|
@@ -1334,7 +1371,7 @@ Also, a list:
|
|
1334
1371
|
end
|
1335
1372
|
|
1336
1373
|
##
|
1337
|
-
# create_gemspec creates gem specification in given +
|
1374
|
+
# create_gemspec creates gem specification in given +directory+ or '.'
|
1338
1375
|
# for the given +name+ and +version+.
|
1339
1376
|
#
|
1340
1377
|
# Yields the +specification+ to the block, if given
|
@@ -1344,7 +1381,7 @@ Also, a list:
|
|
1344
1381
|
yield specification if block_given?
|
1345
1382
|
end
|
1346
1383
|
|
1347
|
-
open File.join(directory, "#{name}.gemspec"), 'w' do |io|
|
1384
|
+
File.open File.join(directory, "#{name}.gemspec"), 'w' do |io|
|
1348
1385
|
io.write vendor_spec.to_ruby
|
1349
1386
|
end
|
1350
1387
|
|
@@ -1498,6 +1535,8 @@ end
|
|
1498
1535
|
begin
|
1499
1536
|
gem 'rdoc'
|
1500
1537
|
require 'rdoc'
|
1538
|
+
|
1539
|
+
require 'rubygems/rdoc'
|
1501
1540
|
rescue LoadError, Gem::LoadError
|
1502
1541
|
end
|
1503
1542
|
|
@@ -1514,3 +1553,4 @@ tmpdirs << (ENV['GEM_PATH'] = Dir.mktmpdir("path"))
|
|
1514
1553
|
pid = $$
|
1515
1554
|
END {tmpdirs.each {|dir| Dir.rmdir(dir)} if $$ == pid}
|
1516
1555
|
Gem.clear_paths
|
1556
|
+
Gem.loaded_specs.clear
|
@@ -64,7 +64,7 @@ class Gem::FakeFetcher
|
|
64
64
|
data.call
|
65
65
|
else
|
66
66
|
if path.to_s =~ /gz$/ and not data.nil? and not data.empty? then
|
67
|
-
data = Gem.gunzip data
|
67
|
+
data = Gem::Util.gunzip data
|
68
68
|
end
|
69
69
|
|
70
70
|
data
|
@@ -346,7 +346,7 @@ class Gem::TestCase::SpecFetcherSetup
|
|
346
346
|
end
|
347
347
|
|
348
348
|
def write_spec spec # :nodoc:
|
349
|
-
open spec.spec_file, 'w' do |io|
|
349
|
+
File.open spec.spec_file, 'w' do |io|
|
350
350
|
io.write spec.to_ruby_for_cache
|
351
351
|
end
|
352
352
|
end
|
data/lib/rubygems/text.rb
CHANGED
@@ -6,13 +6,26 @@ require 'rubygems'
|
|
6
6
|
|
7
7
|
module Gem::Text
|
8
8
|
|
9
|
+
##
|
10
|
+
# Remove any non-printable characters and make the text suitable for
|
11
|
+
# printing.
|
12
|
+
def clean_text(text)
|
13
|
+
text.gsub(/[\000-\b\v-\f\016-\037\177]/, ".".freeze)
|
14
|
+
end
|
15
|
+
|
16
|
+
def truncate_text(text, description, max_length = 100_000)
|
17
|
+
raise ArgumentError, "max_length must be positive" unless max_length > 0
|
18
|
+
return text if text.size <= max_length
|
19
|
+
"Truncating #{description} to #{max_length.to_s.reverse.gsub(/...(?=.)/,'\&,').reverse} characters:\n" + text[0, max_length]
|
20
|
+
end
|
21
|
+
|
9
22
|
##
|
10
23
|
# Wraps +text+ to +wrap+ characters and optionally indents by +indent+
|
11
24
|
# characters
|
12
25
|
|
13
26
|
def format_text(text, wrap, indent=0)
|
14
27
|
result = []
|
15
|
-
work = text
|
28
|
+
work = clean_text(text)
|
16
29
|
|
17
30
|
while work.length > wrap do
|
18
31
|
if work =~ /^(.{0,#{wrap}})[ \n]/ then
|
@@ -5,10 +5,8 @@
|
|
5
5
|
# See LICENSE.txt for permissions.
|
6
6
|
#++
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
rescue LoadError
|
11
|
-
end
|
8
|
+
require 'rubygems/util'
|
9
|
+
require 'rubygems/deprecate'
|
12
10
|
|
13
11
|
##
|
14
12
|
# Module that defines the default UserInteraction. Any class including this
|
@@ -173,6 +171,8 @@ end
|
|
173
171
|
|
174
172
|
class Gem::StreamUI
|
175
173
|
|
174
|
+
extend Gem::Deprecate
|
175
|
+
|
176
176
|
##
|
177
177
|
# The input stream
|
178
178
|
|
@@ -312,12 +312,21 @@ class Gem::StreamUI
|
|
312
312
|
password
|
313
313
|
end
|
314
314
|
|
315
|
-
|
316
|
-
|
317
|
-
|
315
|
+
def require_io_console
|
316
|
+
@require_io_console ||= begin
|
317
|
+
begin
|
318
|
+
require 'io/console'
|
319
|
+
rescue LoadError
|
320
|
+
end
|
321
|
+
true
|
318
322
|
end
|
319
|
-
|
320
|
-
|
323
|
+
end
|
324
|
+
|
325
|
+
def _gets_noecho
|
326
|
+
require_io_console
|
327
|
+
if IO.method_defined?(:noecho) then
|
328
|
+
@ins.noecho {@ins.gets}
|
329
|
+
elsif Gem.win_platform?
|
321
330
|
require "Win32API"
|
322
331
|
password = ''
|
323
332
|
|
@@ -330,9 +339,7 @@ class Gem::StreamUI
|
|
330
339
|
end
|
331
340
|
end
|
332
341
|
password
|
333
|
-
|
334
|
-
else
|
335
|
-
def _gets_noecho
|
342
|
+
else
|
336
343
|
system "stty -echo"
|
337
344
|
begin
|
338
345
|
@ins.gets
|
@@ -380,6 +387,7 @@ class Gem::StreamUI
|
|
380
387
|
def debug(statement)
|
381
388
|
@errs.puts statement
|
382
389
|
end
|
390
|
+
deprecate :debug, :none, 2018, 12
|
383
391
|
|
384
392
|
##
|
385
393
|
# Terminate the application with exit code +status+, running any exit
|
@@ -676,13 +684,8 @@ class Gem::SilentUI < Gem::StreamUI
|
|
676
684
|
def initialize
|
677
685
|
reader, writer = nil, nil
|
678
686
|
|
679
|
-
|
680
|
-
|
681
|
-
writer = File.open('/dev/null', 'w')
|
682
|
-
rescue Errno::ENOENT
|
683
|
-
reader = File.open('nul', 'r')
|
684
|
-
writer = File.open('nul', 'w')
|
685
|
-
end
|
687
|
+
reader = File.open(Gem::Util::NULL_DEVICE, 'r')
|
688
|
+
writer = File.open(Gem::Util::NULL_DEVICE, 'w')
|
686
689
|
|
687
690
|
super reader, writer, writer, false
|
688
691
|
end
|
@@ -701,4 +704,3 @@ class Gem::SilentUI < Gem::StreamUI
|
|
701
704
|
SilentProgressReporter.new(@outs, *args)
|
702
705
|
end
|
703
706
|
end
|
704
|
-
|
@@ -48,9 +48,13 @@ class Gem::Licenses
|
|
48
48
|
BSD-3-Clause-Attribution
|
49
49
|
BSD-3-Clause-Clear
|
50
50
|
BSD-3-Clause-LBNL
|
51
|
+
BSD-3-Clause-No-Nuclear-License
|
52
|
+
BSD-3-Clause-No-Nuclear-License-2014
|
53
|
+
BSD-3-Clause-No-Nuclear-Warranty
|
51
54
|
BSD-4-Clause
|
52
55
|
BSD-4-Clause-UC
|
53
56
|
BSD-Protection
|
57
|
+
BSD-Source-Code
|
54
58
|
BSL-1.0
|
55
59
|
Bahyph
|
56
60
|
Barr
|
@@ -126,6 +130,7 @@ class Gem::Licenses
|
|
126
130
|
Entessa
|
127
131
|
ErlPL-1.1
|
128
132
|
Eurosym
|
133
|
+
FSFAP
|
129
134
|
FSFUL
|
130
135
|
FSFULLR
|
131
136
|
FTL
|
@@ -137,8 +142,18 @@ class Gem::Licenses
|
|
137
142
|
GFDL-1.3
|
138
143
|
GL2PS
|
139
144
|
GPL-1.0
|
145
|
+
GPL-1.0+
|
140
146
|
GPL-2.0
|
147
|
+
GPL-2.0+
|
148
|
+
GPL-2.0-with-GCC-exception
|
149
|
+
GPL-2.0-with-autoconf-exception
|
150
|
+
GPL-2.0-with-bison-exception
|
151
|
+
GPL-2.0-with-classpath-exception
|
152
|
+
GPL-2.0-with-font-exception
|
141
153
|
GPL-3.0
|
154
|
+
GPL-3.0+
|
155
|
+
GPL-3.0-with-GCC-exception
|
156
|
+
GPL-3.0-with-autoconf-exception
|
142
157
|
Giftware
|
143
158
|
Glide
|
144
159
|
Glulxe
|
@@ -152,14 +167,20 @@ class Gem::Licenses
|
|
152
167
|
ISC
|
153
168
|
ImageMagick
|
154
169
|
Imlib2
|
170
|
+
Info-ZIP
|
155
171
|
Intel
|
156
172
|
Intel-ACPI
|
157
173
|
Interbase-1.0
|
158
174
|
JSON
|
159
175
|
JasPer-2.0
|
176
|
+
LAL-1.2
|
177
|
+
LAL-1.3
|
160
178
|
LGPL-2.0
|
179
|
+
LGPL-2.0+
|
161
180
|
LGPL-2.1
|
181
|
+
LGPL-2.1+
|
162
182
|
LGPL-3.0
|
183
|
+
LGPL-3.0+
|
163
184
|
LGPLLR
|
164
185
|
LPL-1.0
|
165
186
|
LPL-1.02
|
@@ -170,6 +191,9 @@ class Gem::Licenses
|
|
170
191
|
LPPL-1.3c
|
171
192
|
Latex2e
|
172
193
|
Leptonica
|
194
|
+
LiLiQ-P-1.1
|
195
|
+
LiLiQ-R-1.1
|
196
|
+
LiLiQ-Rplus-1.1
|
173
197
|
Libpng
|
174
198
|
MIT
|
175
199
|
MIT-CMU
|
@@ -193,6 +217,7 @@ class Gem::Licenses
|
|
193
217
|
NBPL-1.0
|
194
218
|
NCSA
|
195
219
|
NGPL
|
220
|
+
NLOD-1.0
|
196
221
|
NLPL
|
197
222
|
NOSL
|
198
223
|
NPL-1.0
|
@@ -201,11 +226,13 @@ class Gem::Licenses
|
|
201
226
|
NRL
|
202
227
|
NTP
|
203
228
|
Naumen
|
229
|
+
Net-SNMP
|
204
230
|
NetCDF
|
205
231
|
Newsletr
|
206
232
|
Nokia
|
207
233
|
Noweb
|
208
234
|
Nunit
|
235
|
+
OCCT-PL
|
209
236
|
OCLC-2.0
|
210
237
|
ODbL-1.0
|
211
238
|
OFL-1.0
|
@@ -229,6 +256,7 @@ class Gem::Licenses
|
|
229
256
|
OLDAP-2.8
|
230
257
|
OML
|
231
258
|
OPL-1.0
|
259
|
+
OSET-PL-2.1
|
232
260
|
OSL-1.0
|
233
261
|
OSL-1.1
|
234
262
|
OSL-2.0
|
@@ -259,6 +287,7 @@ class Gem::Licenses
|
|
259
287
|
SISSL
|
260
288
|
SISSL-1.2
|
261
289
|
SMLNJ
|
290
|
+
SMPPL
|
262
291
|
SNIA
|
263
292
|
SPL-1.0
|
264
293
|
SWL
|
@@ -269,12 +298,16 @@ class Gem::Licenses
|
|
269
298
|
Spencer-86
|
270
299
|
Spencer-94
|
271
300
|
Spencer-99
|
301
|
+
StandardML-NJ
|
272
302
|
SugarCRM-1.1.3
|
273
303
|
TCL
|
304
|
+
TCP-wrappers
|
274
305
|
TMate
|
275
306
|
TORQUE-1.1
|
276
307
|
TOSL
|
277
308
|
UPL-1.0
|
309
|
+
Unicode-DFS-2015
|
310
|
+
Unicode-DFS-2016
|
278
311
|
Unicode-TOU
|
279
312
|
Unlicense
|
280
313
|
VOSTROM
|
@@ -282,7 +315,9 @@ class Gem::Licenses
|
|
282
315
|
Vim
|
283
316
|
W3C
|
284
317
|
W3C-19980720
|
318
|
+
W3C-20150513
|
285
319
|
WTFPL
|
320
|
+
WXwindows
|
286
321
|
Watcom-1.0
|
287
322
|
Wsuipa
|
288
323
|
X11
|
@@ -302,8 +337,10 @@ class Gem::Licenses
|
|
302
337
|
Zlib
|
303
338
|
bzip2-1.0.5
|
304
339
|
bzip2-1.0.6
|
340
|
+
curl
|
305
341
|
diffmark
|
306
342
|
dvipdfm
|
343
|
+
eCos-2.0
|
307
344
|
eGenix
|
308
345
|
gSOAP-1.3b
|
309
346
|
gnuplot
|
data/lib/rubygems/util.rb
CHANGED
@@ -109,26 +109,16 @@ module Gem::Util
|
|
109
109
|
##
|
110
110
|
# Enumerates the parents of +directory+.
|
111
111
|
|
112
|
-
def self.traverse_parents directory
|
112
|
+
def self.traverse_parents directory, &block
|
113
113
|
return enum_for __method__, directory unless block_given?
|
114
114
|
|
115
115
|
here = File.expand_path directory
|
116
|
-
|
116
|
+
loop do
|
117
|
+
Dir.chdir here, &block rescue Errno::EACCES
|
117
118
|
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
loop do
|
122
|
-
yield here
|
123
|
-
|
124
|
-
Dir.chdir '..'
|
125
|
-
|
126
|
-
return if Dir.pwd == here # toplevel
|
127
|
-
|
128
|
-
here = Dir.pwd
|
129
|
-
end
|
130
|
-
ensure
|
131
|
-
Dir.chdir start
|
119
|
+
new_here = File.expand_path('..', here)
|
120
|
+
return if new_here == here # toplevel
|
121
|
+
here = new_here
|
132
122
|
end
|
133
123
|
end
|
134
124
|
|
data/lib/rubygems/validator.rb
CHANGED
@@ -34,7 +34,7 @@ class Gem::Validator
|
|
34
34
|
# gem_path:: [String] Path to gem file
|
35
35
|
|
36
36
|
def verify_gem_file(gem_path)
|
37
|
-
open gem_path, Gem.binary_mode do |file|
|
37
|
+
File.open gem_path, Gem.binary_mode do |file|
|
38
38
|
gem_data = file.read
|
39
39
|
verify_gem gem_data
|
40
40
|
end
|
@@ -109,7 +109,7 @@ class Gem::Validator
|
|
109
109
|
|
110
110
|
good, gone, unreadable = nil, nil, nil, nil
|
111
111
|
|
112
|
-
open gem_path, Gem.binary_mode do |file|
|
112
|
+
File.open gem_path, Gem.binary_mode do |file|
|
113
113
|
package = Gem::Package.new gem_path
|
114
114
|
|
115
115
|
good, gone = package.contents.partition { |file_name|
|
@@ -134,7 +134,7 @@ class Gem::Validator
|
|
134
134
|
|
135
135
|
source = File.join gem_directory, entry['path']
|
136
136
|
|
137
|
-
open source, Gem.binary_mode do |f|
|
137
|
+
File.open source, Gem.binary_mode do |f|
|
138
138
|
unless f.read == data then
|
139
139
|
errors[gem_name][entry['path']] = "Modified from original"
|
140
140
|
end
|
data/lib/rubygems/version.rb
CHANGED
@@ -170,7 +170,8 @@ class Gem::Version
|
|
170
170
|
# True if the +version+ string matches RubyGems' requirements.
|
171
171
|
|
172
172
|
def self.correct? version
|
173
|
-
version.
|
173
|
+
return false if version.nil?
|
174
|
+
!!(version.to_s =~ ANCHORED_VERSION_PATTERN)
|
174
175
|
end
|
175
176
|
|
176
177
|
##
|
@@ -204,8 +205,12 @@ class Gem::Version
|
|
204
205
|
# series of digits or ASCII letters separated by dots.
|
205
206
|
|
206
207
|
def initialize version
|
207
|
-
|
208
|
-
|
208
|
+
unless self.class.correct?(version)
|
209
|
+
raise ArgumentError, "Malformed version number string #{version}"
|
210
|
+
end
|
211
|
+
|
212
|
+
# If version is an empty string convert it to 0
|
213
|
+
version = 0 if version =~ /\A\s*\Z/
|
209
214
|
|
210
215
|
@version = version.to_s.strip.gsub("-",".pre.")
|
211
216
|
@segments = nil
|
@@ -237,7 +242,7 @@ class Gem::Version
|
|
237
242
|
end
|
238
243
|
|
239
244
|
def hash # :nodoc:
|
240
|
-
|
245
|
+
canonical_segments.hash
|
241
246
|
end
|
242
247
|
|
243
248
|
def init_with coder # :nodoc:
|
@@ -331,7 +336,7 @@ class Gem::Version
|
|
331
336
|
|
332
337
|
def <=> other
|
333
338
|
return unless Gem::Version === other
|
334
|
-
return 0 if @version == other._version
|
339
|
+
return 0 if @version == other._version || canonical_segments == other.canonical_segments
|
335
340
|
|
336
341
|
lhsegments = _segments
|
337
342
|
rhsegments = other._segments
|
@@ -356,6 +361,13 @@ class Gem::Version
|
|
356
361
|
return 0
|
357
362
|
end
|
358
363
|
|
364
|
+
def canonical_segments
|
365
|
+
@canonical_segments ||=
|
366
|
+
_split_segments.map! do |segments|
|
367
|
+
segments.reverse_each.drop_while {|s| s == 0 }.reverse
|
368
|
+
end.reduce(&:concat)
|
369
|
+
end
|
370
|
+
|
359
371
|
protected
|
360
372
|
|
361
373
|
def _version
|
@@ -371,4 +383,11 @@ class Gem::Version
|
|
371
383
|
/^\d+$/ =~ s ? s.to_i : s
|
372
384
|
end.freeze
|
373
385
|
end
|
386
|
+
|
387
|
+
def _split_segments
|
388
|
+
string_start = _segments.index {|s| s.is_a?(String) }
|
389
|
+
string_segments = segments
|
390
|
+
numeric_segments = string_segments.slice!(0, string_start || string_segments.size)
|
391
|
+
return numeric_segments, string_segments
|
392
|
+
end
|
374
393
|
end
|