rubygems-update 3.5.3 → 3.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1410 -686
- data/CODE_OF_CONDUCT.md +79 -28
- data/CONTRIBUTING.md +4 -226
- data/Manifest.txt +107 -83
- data/README.md +16 -11
- data/SECURITY.md +7 -0
- data/bundler/CHANGELOG.md +1525 -931
- data/bundler/README.md +9 -9
- data/bundler/bundler.gemspec +2 -2
- data/bundler/lib/bundler/build_metadata.rb +10 -11
- data/bundler/lib/bundler/checksum.rb +22 -12
- data/bundler/lib/bundler/cli/add.rb +3 -1
- data/bundler/lib/bundler/cli/binstubs.rb +1 -1
- data/bundler/lib/bundler/cli/check.rb +3 -3
- data/bundler/lib/bundler/cli/common.rb +1 -1
- data/bundler/lib/bundler/cli/config.rb +2 -2
- data/bundler/lib/bundler/cli/console.rb +8 -10
- data/bundler/lib/bundler/cli/doctor/diagnose.rb +167 -0
- data/bundler/lib/bundler/cli/doctor/ssl.rb +249 -0
- data/bundler/lib/bundler/cli/doctor.rb +27 -151
- data/bundler/lib/bundler/cli/exec.rb +1 -0
- data/bundler/lib/bundler/cli/fund.rb +1 -1
- data/bundler/lib/bundler/cli/gem.rb +74 -46
- data/bundler/lib/bundler/cli/info.rb +6 -6
- data/bundler/lib/bundler/cli/inject.rb +3 -3
- data/bundler/lib/bundler/cli/install.rb +19 -10
- data/bundler/lib/bundler/cli/issue.rb +3 -3
- data/bundler/lib/bundler/cli/lock.rb +32 -11
- data/bundler/lib/bundler/cli/outdated.rb +23 -23
- data/bundler/lib/bundler/cli/plugin.rb +3 -2
- data/bundler/lib/bundler/cli/pristine.rb +1 -1
- data/bundler/lib/bundler/cli/show.rb +3 -3
- data/bundler/lib/bundler/cli/update.rb +3 -3
- data/bundler/lib/bundler/cli.rb +75 -145
- data/bundler/lib/bundler/compact_index_client/cache.rb +48 -73
- data/bundler/lib/bundler/compact_index_client/cache_file.rb +0 -5
- data/bundler/lib/bundler/compact_index_client/parser.rb +84 -0
- data/bundler/lib/bundler/compact_index_client/updater.rb +6 -16
- data/bundler/lib/bundler/compact_index_client.rb +52 -85
- data/bundler/lib/bundler/constants.rb +8 -1
- data/bundler/lib/bundler/current_ruby.rb +48 -34
- data/bundler/lib/bundler/definition.rb +501 -328
- data/bundler/lib/bundler/dependency.rb +93 -47
- data/bundler/lib/bundler/dsl.rb +147 -103
- data/bundler/lib/bundler/endpoint_specification.rb +30 -3
- data/bundler/lib/bundler/env.rb +1 -1
- data/bundler/lib/bundler/environment_preserver.rb +5 -23
- data/bundler/lib/bundler/errors.rb +53 -5
- data/bundler/lib/bundler/feature_flag.rb +18 -18
- data/bundler/lib/bundler/fetcher/compact_index.rb +16 -25
- data/bundler/lib/bundler/fetcher/dependency.rb +2 -1
- data/bundler/lib/bundler/fetcher/downloader.rb +34 -8
- data/bundler/lib/bundler/fetcher.rb +63 -26
- data/bundler/lib/bundler/force_platform.rb +0 -2
- data/bundler/lib/bundler/friendly_errors.rb +3 -2
- data/bundler/lib/bundler/gem_helper.rb +1 -1
- data/bundler/lib/bundler/gem_version_promoter.rb +42 -40
- data/bundler/lib/bundler/index.rb +7 -2
- data/bundler/lib/bundler/injector.rb +14 -16
- data/bundler/lib/bundler/inline.rb +42 -17
- data/bundler/lib/bundler/installer/gem_installer.rb +4 -3
- data/bundler/lib/bundler/installer/parallel_installer.rb +3 -2
- data/bundler/lib/bundler/installer/standalone.rb +2 -5
- data/bundler/lib/bundler/installer.rb +22 -45
- data/bundler/lib/bundler/lazy_specification.rb +121 -48
- data/bundler/lib/bundler/lockfile_generator.rb +1 -1
- data/bundler/lib/bundler/lockfile_parser.rb +36 -9
- data/bundler/lib/bundler/man/bundle-add.1 +44 -27
- data/bundler/lib/bundler/man/bundle-add.1.ronn +52 -23
- data/bundler/lib/bundler/man/bundle-binstubs.1 +9 -6
- data/bundler/lib/bundler/man/bundle-binstubs.1.ronn +6 -3
- data/bundler/lib/bundler/man/bundle-cache.1 +32 -4
- data/bundler/lib/bundler/man/bundle-cache.1.ronn +31 -2
- data/bundler/lib/bundler/man/bundle-check.1 +7 -5
- data/bundler/lib/bundler/man/bundle-check.1.ronn +7 -2
- data/bundler/lib/bundler/man/bundle-clean.1 +3 -3
- data/bundler/lib/bundler/man/bundle-config.1 +180 -138
- data/bundler/lib/bundler/man/bundle-config.1.ronn +96 -99
- data/bundler/lib/bundler/man/bundle-console.1 +4 -6
- data/bundler/lib/bundler/man/bundle-console.1.ronn +2 -7
- data/bundler/lib/bundler/man/bundle-doctor.1 +46 -7
- data/bundler/lib/bundler/man/bundle-doctor.1.ronn +49 -5
- data/bundler/lib/bundler/man/bundle-env.1 +9 -0
- data/bundler/lib/bundler/man/bundle-env.1.ronn +10 -0
- data/bundler/lib/bundler/man/bundle-exec.1 +9 -6
- data/bundler/lib/bundler/man/bundle-exec.1.ronn +6 -3
- data/bundler/lib/bundler/man/bundle-fund.1 +22 -0
- data/bundler/lib/bundler/man/bundle-fund.1.ronn +25 -0
- data/bundler/lib/bundler/man/bundle-gem.1 +69 -28
- data/bundler/lib/bundler/man/bundle-gem.1.ronn +42 -6
- data/bundler/lib/bundler/man/bundle-help.1 +3 -3
- data/bundler/lib/bundler/man/bundle-info.1 +7 -4
- data/bundler/lib/bundler/man/bundle-info.1.ronn +6 -2
- data/bundler/lib/bundler/man/bundle-init.1 +5 -5
- data/bundler/lib/bundler/man/bundle-init.1.ronn +3 -2
- data/bundler/lib/bundler/man/bundle-inject.1 +13 -5
- data/bundler/lib/bundler/man/bundle-inject.1.ronn +10 -2
- data/bundler/lib/bundler/man/bundle-install.1 +20 -17
- data/bundler/lib/bundler/man/bundle-install.1.ronn +26 -23
- data/bundler/lib/bundler/man/bundle-issue.1 +45 -0
- data/bundler/lib/bundler/man/bundle-issue.1.ronn +37 -0
- data/bundler/lib/bundler/man/bundle-licenses.1 +9 -0
- data/bundler/lib/bundler/man/bundle-licenses.1.ronn +10 -0
- data/bundler/lib/bundler/man/bundle-list.1 +3 -3
- data/bundler/lib/bundler/man/bundle-list.1.ronn +4 -1
- data/bundler/lib/bundler/man/bundle-lock.1 +23 -8
- data/bundler/lib/bundler/man/bundle-lock.1.ronn +25 -4
- data/bundler/lib/bundler/man/bundle-open.1 +4 -4
- data/bundler/lib/bundler/man/bundle-open.1.ronn +2 -1
- data/bundler/lib/bundler/man/bundle-outdated.1 +10 -7
- data/bundler/lib/bundler/man/bundle-outdated.1.ronn +8 -4
- data/bundler/lib/bundler/man/bundle-platform.1 +3 -3
- data/bundler/lib/bundler/man/bundle-plugin.1 +9 -6
- data/bundler/lib/bundler/man/bundle-plugin.1.ronn +7 -3
- data/bundler/lib/bundler/man/bundle-pristine.1 +3 -3
- data/bundler/lib/bundler/man/bundle-pristine.1.ronn +1 -1
- data/bundler/lib/bundler/man/bundle-remove.1 +3 -3
- data/bundler/lib/bundler/man/bundle-remove.1.ronn +1 -1
- data/bundler/lib/bundler/man/bundle-show.1 +7 -4
- data/bundler/lib/bundler/man/bundle-show.1.ronn +4 -0
- data/bundler/lib/bundler/man/bundle-update.1 +17 -11
- data/bundler/lib/bundler/man/bundle-update.1.ronn +17 -9
- data/bundler/lib/bundler/man/bundle-version.1 +3 -3
- data/bundler/lib/bundler/man/bundle-viz.1 +6 -6
- data/bundler/lib/bundler/man/bundle-viz.1.ronn +7 -3
- data/bundler/lib/bundler/man/bundle.1 +3 -3
- data/bundler/lib/bundler/man/gemfile.5 +7 -5
- data/bundler/lib/bundler/man/gemfile.5.ronn +8 -2
- data/bundler/lib/bundler/man/index.txt +4 -0
- data/bundler/lib/bundler/match_metadata.rb +13 -0
- data/bundler/lib/bundler/match_platform.rb +31 -12
- data/bundler/lib/bundler/materialization.rb +59 -0
- data/bundler/lib/bundler/mirror.rb +3 -3
- data/bundler/lib/bundler/plugin/api/source.rb +5 -4
- data/bundler/lib/bundler/plugin/events.rb +24 -0
- data/bundler/lib/bundler/plugin/index.rb +5 -1
- data/bundler/lib/bundler/plugin/installer/path.rb +26 -0
- data/bundler/lib/bundler/plugin/installer.rb +37 -17
- data/bundler/lib/bundler/plugin/source_list.rb +4 -4
- data/bundler/lib/bundler/plugin.rb +21 -2
- data/bundler/lib/bundler/process_lock.rb +10 -14
- data/bundler/lib/bundler/remote_specification.rb +6 -1
- data/bundler/lib/bundler/resolver/base.rb +14 -3
- data/bundler/lib/bundler/resolver/candidate.rb +18 -27
- data/bundler/lib/bundler/resolver/package.rb +20 -3
- data/bundler/lib/bundler/resolver/spec_group.rb +22 -27
- data/bundler/lib/bundler/resolver/strategy.rb +40 -0
- data/bundler/lib/bundler/resolver.rb +114 -52
- data/bundler/lib/bundler/retry.rb +1 -1
- data/bundler/lib/bundler/ruby_dsl.rb +12 -3
- data/bundler/lib/bundler/ruby_version.rb +7 -1
- data/bundler/lib/bundler/rubygems_ext.rb +303 -150
- data/bundler/lib/bundler/rubygems_gem_installer.rb +40 -5
- data/bundler/lib/bundler/rubygems_integration.rb +40 -73
- data/bundler/lib/bundler/runtime.rb +48 -35
- data/bundler/lib/bundler/self_manager.rb +36 -26
- data/bundler/lib/bundler/settings/validator.rb +0 -23
- data/bundler/lib/bundler/settings.rb +36 -27
- data/bundler/lib/bundler/setup.rb +6 -0
- data/bundler/lib/bundler/shared_helpers.rb +45 -25
- data/bundler/lib/bundler/source/gemspec.rb +1 -4
- data/bundler/lib/bundler/source/git/git_proxy.rb +26 -9
- data/bundler/lib/bundler/source/git.rb +113 -41
- data/bundler/lib/bundler/source/metadata.rb +4 -3
- data/bundler/lib/bundler/source/path.rb +14 -18
- data/bundler/lib/bundler/source/rubygems/remote.rb +12 -4
- data/bundler/lib/bundler/source/rubygems.rb +54 -48
- data/bundler/lib/bundler/source.rb +2 -0
- data/bundler/lib/bundler/source_list.rb +54 -12
- data/bundler/lib/bundler/source_map.rb +1 -1
- data/bundler/lib/bundler/spec_set.rb +227 -103
- data/bundler/lib/bundler/stub_specification.rb +29 -2
- data/bundler/lib/bundler/templates/Executable +0 -11
- data/bundler/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +77 -29
- data/bundler/lib/bundler/templates/newgem/Gemfile.tt +1 -3
- data/bundler/lib/bundler/templates/newgem/README.md.tt +7 -3
- data/bundler/lib/bundler/templates/newgem/github/workflows/main.yml.tt +17 -15
- data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +14 -12
- data/bundler/lib/bundler/templates/newgem/rubocop.yml.tt +0 -5
- data/bundler/lib/bundler/ui/shell.rb +26 -4
- data/bundler/lib/bundler/ui/silent.rb +12 -1
- data/bundler/lib/bundler/uri_credentials_filter.rb +3 -3
- data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +53 -3
- data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +1 -1
- data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +11 -0
- data/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb +15 -13
- data/bundler/lib/bundler/vendor/net-http-persistent/README.rdoc +1 -1
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb +2 -1
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +134 -57
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb +4 -24
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb +1 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/strategy.rb +42 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb +20 -8
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +17 -29
- data/bundler/lib/bundler/vendor/securerandom/COPYING +56 -0
- data/bundler/lib/bundler/vendor/securerandom/lib/securerandom.rb +102 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +3 -5
- data/bundler/lib/bundler/vendor/thor/lib/thor/group.rb +11 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +1 -4
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/option.rb +2 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/options.rb +2 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +9 -9
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/html.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/table_printer.rb +5 -21
- 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/vendor/thor/lib/thor.rb +11 -0
- data/bundler/lib/bundler/vendor/uri/COPYING +56 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/common.rb +43 -16
- data/bundler/lib/bundler/vendor/uri/lib/uri/file.rb +3 -3
- data/bundler/lib/bundler/vendor/uri/lib/uri/ftp.rb +1 -1
- data/bundler/lib/bundler/vendor/uri/lib/uri/generic.rb +28 -37
- data/bundler/lib/bundler/vendor/uri/lib/uri/http.rb +2 -2
- data/bundler/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +16 -9
- data/bundler/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +26 -3
- data/bundler/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
- data/bundler/lib/bundler/vendor/uri/lib/uri.rb +9 -9
- data/bundler/lib/bundler/vendored_net_http.rb +20 -5
- data/bundler/lib/bundler/vendored_securerandom.rb +12 -0
- data/bundler/lib/bundler/vendored_timeout.rb +7 -3
- data/bundler/lib/bundler/vendored_uri.rb +18 -1
- data/bundler/lib/bundler/version.rb +10 -2
- data/bundler/lib/bundler/worker.rb +1 -1
- data/bundler/lib/bundler/yaml_serializer.rb +12 -7
- data/bundler/lib/bundler.rb +101 -61
- data/{bundler → doc/bundler}/UPGRADING.md +132 -127
- data/doc/rubygems/CONTRIBUTING.md +227 -0
- data/{POLICIES.md → doc/rubygems/POLICIES.md} +86 -17
- data/exe/update_rubygems +1 -1
- data/lib/rubygems/basic_specification.rb +50 -10
- data/lib/rubygems/bundler_version_finder.rb +1 -1
- data/lib/rubygems/command.rb +1 -4
- data/lib/rubygems/command_manager.rb +5 -6
- data/lib/rubygems/commands/build_command.rb +2 -11
- data/lib/rubygems/commands/cleanup_command.rb +3 -13
- data/lib/rubygems/commands/contents_command.rb +17 -10
- data/lib/rubygems/commands/environment_command.rb +5 -0
- data/lib/rubygems/commands/exec_command.rb +18 -11
- data/lib/rubygems/commands/fetch_command.rb +14 -0
- data/lib/rubygems/commands/help_command.rb +2 -2
- data/lib/rubygems/commands/install_command.rb +0 -4
- data/lib/rubygems/commands/pristine_command.rb +29 -19
- data/lib/rubygems/commands/push_command.rb +31 -6
- data/lib/rubygems/commands/rdoc_command.rb +3 -10
- data/lib/rubygems/commands/rebuild_command.rb +262 -0
- data/lib/rubygems/commands/setup_command.rb +13 -18
- data/lib/rubygems/commands/sources_command.rb +2 -2
- data/lib/rubygems/commands/uninstall_command.rb +9 -4
- data/lib/rubygems/commands/unpack_command.rb +0 -6
- data/lib/rubygems/commands/update_command.rb +13 -22
- data/lib/rubygems/config_file.rb +45 -16
- data/lib/rubygems/core_ext/kernel_require.rb +15 -3
- data/lib/rubygems/core_ext/kernel_warn.rb +2 -6
- data/lib/rubygems/defaults.rb +7 -7
- data/lib/rubygems/dependency.rb +12 -16
- data/lib/rubygems/dependency_list.rb +1 -1
- data/lib/rubygems/deprecate.rb +79 -77
- data/lib/rubygems/errors.rb +2 -1
- data/lib/rubygems/exceptions.rb +2 -9
- data/lib/rubygems/ext/builder.rb +21 -8
- data/lib/rubygems/ext/cargo_builder.rb +16 -26
- data/lib/rubygems/ext/cmake_builder.rb +7 -2
- data/lib/rubygems/ext/configure_builder.rb +7 -2
- data/lib/rubygems/ext/ext_conf_builder.rb +9 -5
- data/lib/rubygems/ext/rake_builder.rb +7 -4
- data/lib/rubygems/gem_runner.rb +9 -0
- data/lib/rubygems/gemcutter_utilities/webauthn_listener.rb +11 -4
- data/lib/rubygems/gemcutter_utilities/webauthn_poller.rb +3 -1
- data/lib/rubygems/gemcutter_utilities.rb +52 -26
- data/lib/rubygems/gemspec_helpers.rb +19 -0
- data/lib/rubygems/install_update_options.rb +5 -0
- data/lib/rubygems/installer.rb +76 -90
- data/lib/rubygems/local_remote_options.rb +8 -8
- data/lib/rubygems/package/tar_header.rb +31 -4
- data/lib/rubygems/package/tar_reader/entry.rb +1 -5
- data/lib/rubygems/package/tar_writer.rb +5 -4
- data/lib/rubygems/package.rb +13 -8
- data/lib/rubygems/platform.rb +148 -43
- data/lib/rubygems/psych_tree.rb +4 -0
- data/lib/rubygems/query_utils.rb +2 -2
- data/lib/rubygems/rdoc.rb +16 -3
- data/lib/rubygems/remote_fetcher.rb +6 -7
- data/lib/rubygems/request.rb +5 -5
- data/lib/rubygems/request_set/gem_dependency_api.rb +1 -1
- data/lib/rubygems/request_set.rb +4 -7
- data/lib/rubygems/requirement.rb +16 -12
- data/lib/rubygems/resolver/activation_request.rb +1 -1
- data/lib/rubygems/resolver/api_set/gem_parser.rb +2 -5
- data/lib/rubygems/resolver/api_set.rb +13 -8
- data/lib/rubygems/resolver/best_set.rb +1 -29
- data/lib/rubygems/resolver/composed_set.rb +3 -3
- data/lib/rubygems/resolver/git_set.rb +0 -1
- data/lib/rubygems/resolver/index_set.rb +2 -2
- data/lib/rubygems/resolver/source_set.rb +1 -1
- data/lib/rubygems/resolver/spec_specification.rb +7 -0
- data/lib/rubygems/resolver.rb +8 -8
- data/lib/rubygems/s3_uri_signer.rb +8 -6
- data/lib/rubygems/safe_marshal/reader.rb +31 -14
- data/lib/rubygems/safe_marshal/visitors/to_ruby.rb +29 -16
- data/lib/rubygems/safe_yaml.rb +10 -1
- data/lib/rubygems/security.rb +1 -1
- data/lib/rubygems/source/git.rb +22 -17
- data/lib/rubygems/source/installed.rb +3 -1
- data/lib/rubygems/source/local.rb +8 -4
- data/lib/rubygems/source/specific_file.rb +5 -3
- data/lib/rubygems/source.rb +37 -29
- data/lib/rubygems/source_list.rb +1 -1
- data/lib/rubygems/spec_fetcher.rb +47 -15
- data/lib/rubygems/specification.rb +110 -183
- data/lib/rubygems/specification_policy.rb +33 -13
- data/lib/rubygems/specification_record.rb +212 -0
- data/lib/rubygems/stub_specification.rb +32 -10
- data/lib/rubygems/target_rbconfig.rb +50 -0
- data/lib/rubygems/uninstaller.rb +42 -22
- data/lib/rubygems/uri.rb +6 -6
- data/lib/rubygems/uri_formatter.rb +2 -1
- data/lib/rubygems/util/licenses.rb +118 -1
- data/lib/rubygems/util.rb +1 -1
- data/lib/rubygems/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +57 -0
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/delegates/specification_provider.rb +11 -11
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/action.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/log.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/set_payload.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/tag.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/vertex.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph.rb +2 -2
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/errors.rb +1 -1
- data/lib/rubygems/vendor/molinillo/lib/molinillo/gem_metadata.rb +6 -0
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/modules/specification_provider.rb +2 -2
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/modules/ui.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/resolution.rb +4 -4
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/resolver.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/state.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo.rb +2 -2
- data/lib/rubygems/vendor/net-http/COPYING +56 -0
- data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/generic_request.rb +9 -9
- data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/header.rb +3 -3
- data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/request.rb +3 -3
- data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/requests.rb +35 -30
- data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/response.rb +2 -2
- data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/responses.rb +6 -6
- data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/status.rb +1 -1
- data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http.rb +149 -70
- data/lib/rubygems/{net-http → vendor/net-http}/lib/net/https.rb +1 -1
- data/lib/rubygems/vendor/optparse/COPYING +56 -0
- data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/ac.rb +16 -0
- data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/kwargs.rb +8 -3
- data/lib/rubygems/vendor/optparse/lib/optparse/uri.rb +7 -0
- data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/version.rb +9 -0
- data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse.rb +158 -62
- data/lib/rubygems/vendor/resolv/COPYING +56 -0
- data/lib/rubygems/{resolv → vendor/resolv}/lib/resolv.rb +165 -69
- data/lib/rubygems/vendor/securerandom/COPYING +56 -0
- data/lib/rubygems/vendor/securerandom/lib/securerandom.rb +102 -0
- data/lib/rubygems/vendor/timeout/COPYING +56 -0
- data/lib/rubygems/{timeout → vendor/timeout}/lib/timeout.rb +10 -11
- data/lib/rubygems/{tsort → vendor/tsort}/lib/tsort.rb +2 -2
- data/lib/rubygems/vendor/uri/COPYING +56 -0
- data/lib/rubygems/vendor/uri/lib/uri/common.rb +880 -0
- data/lib/rubygems/vendor/uri/lib/uri/file.rb +100 -0
- data/lib/rubygems/vendor/uri/lib/uri/ftp.rb +267 -0
- data/lib/rubygems/vendor/uri/lib/uri/generic.rb +1579 -0
- data/lib/rubygems/vendor/uri/lib/uri/http.rb +125 -0
- data/lib/rubygems/vendor/uri/lib/uri/https.rb +23 -0
- data/lib/rubygems/vendor/uri/lib/uri/ldap.rb +261 -0
- data/lib/rubygems/vendor/uri/lib/uri/ldaps.rb +22 -0
- data/lib/rubygems/vendor/uri/lib/uri/mailto.rb +293 -0
- data/lib/rubygems/vendor/uri/lib/uri/rfc2396_parser.rb +546 -0
- data/lib/rubygems/vendor/uri/lib/uri/rfc3986_parser.rb +206 -0
- data/lib/rubygems/vendor/uri/lib/uri/version.rb +6 -0
- data/lib/rubygems/vendor/uri/lib/uri/ws.rb +83 -0
- data/lib/rubygems/vendor/uri/lib/uri/wss.rb +23 -0
- data/lib/rubygems/vendor/uri/lib/uri.rb +104 -0
- data/lib/rubygems/vendored_molinillo.rb +3 -0
- data/lib/rubygems/vendored_net_http.rb +5 -0
- data/lib/rubygems/vendored_optparse.rb +3 -0
- data/lib/rubygems/vendored_securerandom.rb +3 -0
- data/lib/rubygems/vendored_timeout.rb +5 -0
- data/lib/rubygems/vendored_tsort.rb +3 -0
- data/lib/rubygems/version.rb +26 -9
- data/lib/rubygems/yaml_serializer.rb +12 -7
- data/lib/rubygems.rb +160 -53
- data/rubygems-update.gemspec +11 -6
- data/setup.rb +1 -1
- metadata +124 -96
- data/bundler/lib/bundler/compact_index_client/gem_parser.rb +0 -32
- data/bundler/lib/bundler/gem_helpers.rb +0 -127
- data/bundler/lib/bundler/templates/Executable.bundler +0 -109
- data/bundler/lib/bundler/vendor/fileutils/.document +0 -1
- data/bundler/lib/bundler/vendor/net-http-persistent/.document +0 -1
- data/bundler/lib/bundler/vendor/pub_grub/.document +0 -1
- data/bundler/lib/bundler/vendor/thor/.document +0 -1
- data/bundler/lib/bundler/vendor/tsort/.document +0 -1
- data/bundler/lib/bundler/vendor/uri/.document +0 -1
- data/lib/rubygems/net/http.rb +0 -3
- data/lib/rubygems/net-http/.document +0 -1
- data/lib/rubygems/net-http/LICENSE.txt +0 -22
- data/lib/rubygems/net-http/lib/net/http/backward.rb +0 -40
- data/lib/rubygems/net-protocol/.document +0 -1
- data/lib/rubygems/net-protocol/LICENSE.txt +0 -22
- data/lib/rubygems/optparse/.document +0 -1
- data/lib/rubygems/optparse/lib/optparse/uri.rb +0 -7
- data/lib/rubygems/optparse.rb +0 -3
- data/lib/rubygems/resolv/.document +0 -1
- data/lib/rubygems/resolv/LICENSE.txt +0 -22
- data/lib/rubygems/resolver/molinillo/.document +0 -1
- data/lib/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb +0 -57
- data/lib/rubygems/resolver/molinillo/lib/molinillo/gem_metadata.rb +0 -6
- data/lib/rubygems/resolver/molinillo.rb +0 -3
- data/lib/rubygems/shellwords.rb +0 -3
- data/lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA.pem +0 -21
- data/lib/rubygems/timeout/.document +0 -1
- data/lib/rubygems/timeout/LICENSE.txt +0 -22
- data/lib/rubygems/timeout.rb +0 -3
- data/lib/rubygems/tsort/.document +0 -1
- data/lib/rubygems/tsort/LICENSE.txt +0 -22
- data/lib/rubygems/tsort.rb +0 -3
- /data/{lib/rubygems/optparse → bundler/lib/bundler/vendor/fileutils}/COPYING +0 -0
- /data/{MAINTAINERS.txt → doc/MAINTAINERS.txt} +0 -0
- /data/{UPGRADING.md → doc/rubygems/UPGRADING.md} +0 -0
- /data/lib/rubygems/ssl_certs/rubygems.org/{GlobalSignRootCA_R3.pem → GlobalSign.pem} +0 -0
- /data/{bundler/lib/bundler/vendor/connection_pool → lib/rubygems/vendor}/.document +0 -0
- /data/lib/rubygems/{resolver → vendor}/molinillo/LICENSE +0 -0
- /data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/exceptions.rb +0 -0
- /data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/proxy_delta.rb +0 -0
- /data/{bundler/lib/bundler/vendor/fileutils → lib/rubygems/vendor/net-protocol}/LICENSE.txt +0 -0
- /data/lib/rubygems/{net-protocol → vendor/net-protocol}/lib/net/protocol.rb +0 -0
- /data/lib/rubygems/{optparse → vendor/optparse}/lib/optionparser.rb +0 -0
- /data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/date.rb +0 -0
- /data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/shellwords.rb +0 -0
- /data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/time.rb +0 -0
- /data/{bundler/lib/bundler/vendor/uri → lib/rubygems/vendor/tsort}/LICENSE.txt +0 -0
@@ -0,0 +1,227 @@
|
|
1
|
+
# How to contribute
|
2
|
+
|
3
|
+
Community involvement is essential to RubyGems. We want to keep it as easy as
|
4
|
+
possible to contribute changes. There are a few guidelines that we need
|
5
|
+
contributors to follow to reduce the time it takes to get changes merged in.
|
6
|
+
|
7
|
+
## Guidelines
|
8
|
+
|
9
|
+
1. New features should be coupled with tests.
|
10
|
+
|
11
|
+
2. Ensure that your code blends well with ours:
|
12
|
+
* No trailing whitespace
|
13
|
+
* Match indentation (two spaces)
|
14
|
+
* Match coding style (run `bin/rake rubocop`)
|
15
|
+
|
16
|
+
3. If any new files are added or existing files removed in a commit or PR,
|
17
|
+
please update the `Manifest.txt` accordingly. This can be done by running
|
18
|
+
`bin/rake update_manifest`
|
19
|
+
|
20
|
+
4. Don't modify the history file or version number.
|
21
|
+
|
22
|
+
5. If you have any questions, Feel free to join us on Slack, you can register
|
23
|
+
by signing up at http://slack.bundler.io or file an issue here:
|
24
|
+
http://github.com/rubygems/rubygems/issues
|
25
|
+
|
26
|
+
|
27
|
+
For more information and ideas on how to contribute to RubyGems ecosystem, see
|
28
|
+
here: https://guides.rubygems.org/contributing/
|
29
|
+
|
30
|
+
## Getting Started
|
31
|
+
|
32
|
+
### Installing dependencies
|
33
|
+
|
34
|
+
bin/rake setup
|
35
|
+
|
36
|
+
> **NOTE**: If the above fails with permission related errors, you're most
|
37
|
+
> likely using a global Ruby installation (like the one packaged by your OS),
|
38
|
+
> which sets `GEM_HOME` to a location regular users can't write to. Consider
|
39
|
+
> using a Ruby version manager like [RVM](https://github.com/rvm/rvm),
|
40
|
+
> [rbenv](https://github.com/rbenv/rbenv),
|
41
|
+
> [chruby](https://github.com/postmodern/chruby) or [asdf](https://github.com/asdf-vm/asdf-ruby). These will install Ruby to a
|
42
|
+
> location regular users can write to, so you won't run into permission issues.
|
43
|
+
> Alternatively, consider setting `GEM_HOME` environment variable to a writable
|
44
|
+
> location with something like `export GEM_HOME=/tmp/rubygems.gems` and try
|
45
|
+
> again.
|
46
|
+
|
47
|
+
### Manually trying your local changes
|
48
|
+
|
49
|
+
To run commands like `gem install` from the repo:
|
50
|
+
|
51
|
+
ruby -Ilib exe/gem install
|
52
|
+
|
53
|
+
To run commands like `bundle install` from the repo:
|
54
|
+
|
55
|
+
bundler/bin/bundle install
|
56
|
+
|
57
|
+
### Running Tests
|
58
|
+
|
59
|
+
To run the entire test suite you can use:
|
60
|
+
|
61
|
+
bin/rake test
|
62
|
+
|
63
|
+
To run an individual test file located for example in `test/rubygems/test_deprecate.rb` you can use:
|
64
|
+
|
65
|
+
ruby -Ilib:test:bundler/lib test/rubygems/test_deprecate.rb
|
66
|
+
|
67
|
+
And to run an individual test method named `test_default` within a test file, you can use:
|
68
|
+
|
69
|
+
ruby -Ilib:test:bundler/lib test/rubygems/test_deprecate.rb -n /test_default/
|
70
|
+
|
71
|
+
### Running bundler tests
|
72
|
+
|
73
|
+
To run the entire bundler test suite in parallel (it takes a while), run the following from the `bundler/` subfolder:
|
74
|
+
|
75
|
+
bin/parallel_rspec
|
76
|
+
|
77
|
+
There are some realworld higher level specs run in CI, but not run by `bin/parallel_rspec`. You can run those with:
|
78
|
+
|
79
|
+
bin/rake spec:realworld
|
80
|
+
|
81
|
+
To run an individual test file location for example in `spec/install/gems/standalone_spec.rb` you can use the following from the `bundler/` subfolder:
|
82
|
+
|
83
|
+
bin/rspec spec/install/gems/standalone_spec.rb
|
84
|
+
|
85
|
+
### Checking code style
|
86
|
+
|
87
|
+
You can check compliance with our code style with
|
88
|
+
|
89
|
+
bin/rake rubocop
|
90
|
+
|
91
|
+
Optionally you can configure git hooks with to check this before every commit with
|
92
|
+
|
93
|
+
bin/rake git_hooks
|
94
|
+
|
95
|
+
For more information, check [SETUP.md](../bundler/development/SETUP.md) and [DEBUGGING.md](../bundler/development/DEBUGGING.md).
|
96
|
+
|
97
|
+
## Issues
|
98
|
+
|
99
|
+
RubyGems uses labels to track all issues and pull requests. In order to
|
100
|
+
provide guidance to the community this is documentation of how labels are used
|
101
|
+
in the rubygems repository.
|
102
|
+
|
103
|
+
### Contribution
|
104
|
+
|
105
|
+
These labels are made to guide contributors to issue/pull requests that they
|
106
|
+
can help with.
|
107
|
+
|
108
|
+
* **good first issue** - The issue described here is considered a good option
|
109
|
+
for a new contributor. We encourage new contributors though to work on
|
110
|
+
whichever issue they find most interesting, the ones labeled here as just
|
111
|
+
estimated to have a reasonable level of complexity for someone new to the
|
112
|
+
code base.
|
113
|
+
* **help wanted** - The issue has not been claimed for work, and is awaiting
|
114
|
+
willing volunteers!
|
115
|
+
|
116
|
+
|
117
|
+
### Type
|
118
|
+
|
119
|
+
Issues might have a light green `type: *` label, which describes the type of
|
120
|
+
the issue.
|
121
|
+
|
122
|
+
* **bug report** - An issue describing a bug in rubygems. This would be
|
123
|
+
something that is broken, confusing, unexpected behavior etc.
|
124
|
+
* **feature request** - An issue describing a request for a new feature or
|
125
|
+
enhancement.
|
126
|
+
* **question** - An issue that is a more of a question than a call for
|
127
|
+
specific changes in the codebase.
|
128
|
+
* **cleanup** - An issue that proposes cleanups to the code base without
|
129
|
+
fixing a bug or implementing a feature.
|
130
|
+
* **major bump** - This issue request requires a major version bump
|
131
|
+
* **administrative** - This issue relates to administrative tasks that need
|
132
|
+
to take place as it relates to rubygems
|
133
|
+
* **documentation** - This issue relates to improving the documentation for
|
134
|
+
in this repo. Note that much of the rubygems documentation is here:
|
135
|
+
https://github.com/rubygems/guides
|
136
|
+
|
137
|
+
Pull request might have a light orange `rubygems: *` or a light blue `bundler:
|
138
|
+
*` label which describes the pull request according to the following criteria:
|
139
|
+
|
140
|
+
* **security fix** - A pull request that fixes a security issue.
|
141
|
+
* **breaking change** - A pull request including any change that requires a
|
142
|
+
major version bump.
|
143
|
+
* **major enhancement** - A pull request including a backwards compatible
|
144
|
+
change worth a special mention in the changelog
|
145
|
+
* **deprecation** - A pull request that introduces a deprecation.
|
146
|
+
* **feature** - A pull request implementing a feature request.
|
147
|
+
* **deprecation** - A pull request that implements a performance improvement.
|
148
|
+
* **documentation** - A pull request introducing documentation improvements
|
149
|
+
worth mentioning to end users.
|
150
|
+
* **minor enhancements** - A pull request introducing small but user visible changes.
|
151
|
+
* **bug fix** - A pull request that fixes a bug report.
|
152
|
+
|
153
|
+
In the case of `bundler`, these labels are set by maintainers on PRs and have
|
154
|
+
special importance because they are used to automatically build the changelog.
|
155
|
+
|
156
|
+
### Workflow / Status
|
157
|
+
|
158
|
+
The light yellow `status: *` labels that indicate the state of an issue,
|
159
|
+
where it is in the process from being submitted to being closed. These are
|
160
|
+
listed in rough progression order from submitted to closed.
|
161
|
+
|
162
|
+
* **triage** - This is an issue or pull request that needs to be properly
|
163
|
+
labeled by a maintainer.
|
164
|
+
* **confirmed** - This issue/pull request has been accepted as valid, but is
|
165
|
+
not yet immediately ready for work.
|
166
|
+
* **ready** - An issue that is available for collaboration. This issue
|
167
|
+
should have existing discussion on the problem, and a description of how
|
168
|
+
to go about solving it.
|
169
|
+
* **working** - An issue that has a specific individual assigned to and
|
170
|
+
planning to do work on it.
|
171
|
+
* **user feedback required** - The issue/pull request is blocked pending
|
172
|
+
more feedback from an end user
|
173
|
+
* **blocked / backlog** - the issue/pull request is currently unable to move
|
174
|
+
forward because of some specific reason, generally this will be a reason
|
175
|
+
that is outside RubyGems or needs feedback from some specific individual
|
176
|
+
or group, and it may be a while before something it is resolved.
|
177
|
+
|
178
|
+
|
179
|
+
### Closed Reason
|
180
|
+
|
181
|
+
Reasons are why an issue / pull request was closed without being worked on or
|
182
|
+
accepted. There should also be more detailed information in the comments. The
|
183
|
+
closed reason labels are maroon `closed: *`.
|
184
|
+
|
185
|
+
* **duplicate** - This is a duplicate of an existing bug. The comments must
|
186
|
+
reference the existing issue.
|
187
|
+
* **abandoned** - This is an issue/pull request that has aged off, is no
|
188
|
+
longer applicable or similar.
|
189
|
+
* **declined** - An issue that won't be fixed/implemented or a pull request
|
190
|
+
that is not accepted.
|
191
|
+
* **deprecated** - An issue/pull request that no longer applies to the
|
192
|
+
actively maintained codebase.
|
193
|
+
* **discussion** - An issue/pull that is no longer about a concrete change,
|
194
|
+
and is instead being used for discussion.
|
195
|
+
|
196
|
+
|
197
|
+
### Categories
|
198
|
+
|
199
|
+
These are aspects of the codebase, or what general area the issue or pull
|
200
|
+
request pertains too. Not all issues will have a category. All categorized
|
201
|
+
issues have a blue `category: *` label.
|
202
|
+
|
203
|
+
* **gemspec** - related to the gem specification itself
|
204
|
+
* **API** - related to the public supported rubygems API. This is the code
|
205
|
+
API, not a network related API.
|
206
|
+
* **command** - related to something in `Gem::Commands`
|
207
|
+
* **install** - related to gem installations
|
208
|
+
* **documentation** - related to updating / fixing / clarifying
|
209
|
+
documentation or guides
|
210
|
+
|
211
|
+
|
212
|
+
### Platforms
|
213
|
+
|
214
|
+
If an issue or pull request pertains to only one platform, then it should have
|
215
|
+
an appropriate purple `platform: *` label. Current platform labels:
|
216
|
+
**windows**, **java**, **osx**, **linux**
|
217
|
+
|
218
|
+
### Git
|
219
|
+
|
220
|
+
Please sign your commits. Although not required in order for you to contribute,
|
221
|
+
it ensures that any code submitted by you wasn't altered while you were
|
222
|
+
transferring it, and proves that it was you who submitted it and not someone
|
223
|
+
else.
|
224
|
+
|
225
|
+
Please see https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work or
|
226
|
+
https://help.github.com/en/articles/signing-commits for details on how to
|
227
|
+
to generate a signature and automatically sign your commits.
|
@@ -65,6 +65,59 @@ Bundler:
|
|
65
65
|
have to work on weekends.
|
66
66
|
* Continue with the regular release process below.
|
67
67
|
|
68
|
+
### Branching
|
69
|
+
|
70
|
+
Bundler releases are synchronized with rubygems releases at the moment. That
|
71
|
+
means that releases for both share the same stable branch, and they should
|
72
|
+
generally happen together.
|
73
|
+
|
74
|
+
The current conventional naming for stable branches is `x+1.y`, where `x.y` is
|
75
|
+
the version of `bundler` that will be released. This is because `rubygems-x+1.y`
|
76
|
+
will be released at the same time.
|
77
|
+
|
78
|
+
For example, `rubygems-3.2.0` and `bundler-2.2.0` were both released from the
|
79
|
+
`3.2` stable branch.
|
80
|
+
|
81
|
+
Once a stable branch has been cut from `master`, changes for that minor release
|
82
|
+
series are only made _intentionally_, via patch releases. That is to say,
|
83
|
+
changes to `master` by default _won't_ make their way into the current stable
|
84
|
+
branch, and development on `master` will be targeting the next minor
|
85
|
+
or major release.
|
86
|
+
|
87
|
+
There is a `bin/rake prepare_release[<target_rubygems_version>]` rake task
|
88
|
+
that helps with creating a release. It takes a single argument, the _exact
|
89
|
+
rubygems release_ being made (e.g. `3.2.3` when releasing bundler `2.2.3`).
|
90
|
+
This task checks out the appropriate stable branch (`3.2`, for example), grabs
|
91
|
+
all merged but unreleased PRs from both bundler & rubygems from GitHub that are
|
92
|
+
compatible with the target release level, and then cherry-picks those changes
|
93
|
+
(and only those changes) to a new branch based off the stable branch. Then bumps
|
94
|
+
the version in all version files, synchronizes both changelogs to include all
|
95
|
+
backported changes and commits that change on top of the cherry-picks.
|
96
|
+
|
97
|
+
Note that this task requires all user facing pull requests to be tagged with
|
98
|
+
specific labels. See [Merging a PR](../bundler/playbooks/MERGING_A_PR.md) for details.
|
99
|
+
|
100
|
+
Also note that when this task cherry-picks, it cherry-picks the merge commits
|
101
|
+
using the following command:
|
102
|
+
|
103
|
+
```bash
|
104
|
+
$ git cherry-pick -m 1 MERGE_COMMIT_SHAS
|
105
|
+
```
|
106
|
+
|
107
|
+
For example, for PR [#5029](https://github.com/rubygems/bundler/pull/5029), we
|
108
|
+
cherry picked commit [dd6aef9](https://github.com/rubygems/bundler/commit/dd6aef97a5f2e7173f406267256a8c319d6134ab),
|
109
|
+
not [4fe9291](https://github.com/rubygems/bundler/commit/4fe92919f51e3463f0aad6fa833ab68044311f03)
|
110
|
+
using:
|
111
|
+
|
112
|
+
```bash
|
113
|
+
$ git cherry-pick -m 1 dd6aef9
|
114
|
+
```
|
115
|
+
|
116
|
+
After running the task, you'll have a release branch ready to be merged into the
|
117
|
+
stable branch. You'll want to open a PR from this branch into the stable branch
|
118
|
+
and provided CI is green, you can go ahead, merge the PR and run release tasks
|
119
|
+
as specified below from the updated stable branch.
|
120
|
+
|
68
121
|
### Automatic changelog and backport generation
|
69
122
|
|
70
123
|
PR labels and titles are used to automatically generate changelogs for patch and
|
@@ -79,41 +132,57 @@ changelog.
|
|
79
132
|
If PRs don't have a proper label, they won't be backported to patch releases.
|
80
133
|
|
81
134
|
If you want a PR to be backported to a patch level release, but don't want to
|
82
|
-
include it in the changelog, you can use the special `rubygems:
|
83
|
-
`bundler:
|
84
|
-
generates conflicts that are solved by backporting another PR
|
85
|
-
visible changes. You can use these special labels to also backport
|
86
|
-
and not get any conflicts.
|
135
|
+
include it in the changelog, you can use the special `rubygems: skip changelog`
|
136
|
+
and `bundler: skip changelog` labels. For example, this is useful when
|
137
|
+
backporting a PR generates conflicts that are solved by backporting another PR
|
138
|
+
with no user visible changes. You can use these special labels to also backport
|
139
|
+
the other PR and not get any conflicts.
|
140
|
+
|
141
|
+
### Breaking changes
|
142
|
+
|
143
|
+
Bundler cares a lot about preserving compatibility. As a result, changes that
|
144
|
+
break backwards compatibility should (whenever this is possible) include a feature
|
145
|
+
release that is backwards compatible, and issue warnings for all options and
|
146
|
+
behaviors that will change.
|
147
|
+
|
148
|
+
We only release major breaking changes when incrementing the _major_ version of
|
149
|
+
Bundler and RubyGems. However, experience shows that almost every single part of
|
150
|
+
Bundler and RubyGems is depended on by someone in ways hard to anticipate. So if
|
151
|
+
we were strict about breaking changes we'd need to hold on from making progress
|
152
|
+
a lot, or continuously increment the major version, emptying "really major"
|
153
|
+
versions from their meaning. Because of this, we also may release "small"
|
154
|
+
breaking changes in minor releases. "Small" here means that we expect them to
|
155
|
+
affect only very few users in rare cases.
|
87
156
|
|
88
157
|
### Steps for patch releases
|
89
158
|
|
90
159
|
* Confirm all PRs that you want backported are properly tagged with `rubygems:
|
91
160
|
<type>` or `bundler: <type>` labels at GitHub.
|
92
|
-
* Run `rake prepare_release[<
|
93
|
-
stable branch with the backports included in the release, and
|
94
|
-
changelogs and version bumps. It will also create a PR to merge
|
95
|
-
changelogs into master.
|
161
|
+
* Run `bin/rake prepare_release[<target_rubygems_version>]`. This will create
|
162
|
+
a PR to the stable branch with the backports included in the release, and
|
163
|
+
proper changelogs and version bumps. It will also create a PR to merge
|
164
|
+
release changelogs into master.
|
96
165
|
* Once CI passes, merge the release PR, switch to the stable branch and pull
|
97
166
|
the PR just merged.
|
98
|
-
* Release `bundler` with `rake bundler:release`.
|
99
|
-
* Release `rubygems` with `rake release`.
|
167
|
+
* Release `bundler` with `bin/rake bundler:release`.
|
168
|
+
* Release `rubygems` with `bin/rake release`.
|
100
169
|
|
101
170
|
### Steps for minor and major releases
|
102
171
|
|
103
172
|
* Confirm all PRs that you want listed in changelogs are properly tagged with
|
104
173
|
`rubygems: <type>` or `bundler: <type>` labels at GitHub.
|
105
|
-
* Run `rake prepare_release[<
|
106
|
-
branch off the master branch, and create a PR to it with the
|
107
|
-
bumps and changelogs. It will also create a PR to merge
|
108
|
-
into master.
|
174
|
+
* Run `bin/rake prepare_release[<target_rubygems_version>]`. This will create
|
175
|
+
a new stable branch off the master branch, and create a PR to it with the
|
176
|
+
proper version bumps and changelogs. It will also create a PR to merge
|
177
|
+
release changelogs into master.
|
109
178
|
* Replace the stable branch in the workflows with the new stable branch, and
|
110
179
|
push that change to the release PR.
|
111
180
|
* Replace version numbers with the next ".dev" version, and push that change
|
112
181
|
to the master PR.
|
113
182
|
* Once CI passes, merge the release PR, switch to the stable branch and pull
|
114
183
|
the PR just merged.
|
115
|
-
* Release `bundler` with `rake bundler:release`.
|
116
|
-
* Release `rubygems` with `rake release`.
|
184
|
+
* Release `bundler` with `bin/rake bundler:release`.
|
185
|
+
* Release `rubygems` with `bin/rake release`.
|
117
186
|
|
118
187
|
## Committer Access
|
119
188
|
|
data/exe/update_rubygems
CHANGED
@@ -71,11 +71,7 @@ class Gem::BasicSpecification
|
|
71
71
|
# Return true if this spec can require +file+.
|
72
72
|
|
73
73
|
def contains_requirable_file?(file)
|
74
|
-
if
|
75
|
-
return false
|
76
|
-
elsif missing_extensions?
|
77
|
-
@ignored = true
|
78
|
-
|
74
|
+
if ignored?
|
79
75
|
if platform == Gem::Platform::RUBY || Gem::Platform.local === platform
|
80
76
|
warn "Ignoring #{full_name} because its extensions are not built. " \
|
81
77
|
"Try: gem pristine #{name} --version #{version}"
|
@@ -93,11 +89,34 @@ class Gem::BasicSpecification
|
|
93
89
|
end
|
94
90
|
end
|
95
91
|
|
92
|
+
##
|
93
|
+
# Return true if this spec should be ignored because it's missing extensions.
|
94
|
+
|
95
|
+
def ignored?
|
96
|
+
return @ignored unless @ignored.nil?
|
97
|
+
|
98
|
+
@ignored = missing_extensions?
|
99
|
+
end
|
100
|
+
|
96
101
|
def default_gem?
|
97
|
-
loaded_from &&
|
102
|
+
!loaded_from.nil? &&
|
98
103
|
File.dirname(loaded_from) == Gem.default_specifications_dir
|
99
104
|
end
|
100
105
|
|
106
|
+
##
|
107
|
+
# Regular gems take precedence over default gems
|
108
|
+
|
109
|
+
def default_gem_priority
|
110
|
+
default_gem? ? 1 : -1
|
111
|
+
end
|
112
|
+
|
113
|
+
##
|
114
|
+
# Gems higher up in +gem_path+ take precedence
|
115
|
+
|
116
|
+
def base_dir_priority(gem_path)
|
117
|
+
gem_path.index(base_dir) || gem_path.size
|
118
|
+
end
|
119
|
+
|
101
120
|
##
|
102
121
|
# Returns full path to the directory where gem's extensions are installed.
|
103
122
|
|
@@ -115,7 +134,6 @@ class Gem::BasicSpecification
|
|
115
134
|
end
|
116
135
|
|
117
136
|
def find_full_gem_path # :nodoc:
|
118
|
-
# TODO: also, shouldn't it default to full_name if it hasn't been written?
|
119
137
|
File.expand_path File.join(gems_dir, full_name)
|
120
138
|
end
|
121
139
|
|
@@ -123,10 +141,10 @@ class Gem::BasicSpecification
|
|
123
141
|
|
124
142
|
##
|
125
143
|
# The full path to the gem (install path + full name).
|
144
|
+
#
|
145
|
+
# TODO: This is duplicated with #gem_dir. Eventually either of them should be deprecated.
|
126
146
|
|
127
147
|
def full_gem_path
|
128
|
-
# TODO: This is a heavily used method by gems, so we'll need
|
129
|
-
# to aleast just alias it to #gem_dir rather than remove it.
|
130
148
|
@full_gem_path ||= find_full_gem_path
|
131
149
|
end
|
132
150
|
|
@@ -143,6 +161,19 @@ class Gem::BasicSpecification
|
|
143
161
|
end
|
144
162
|
end
|
145
163
|
|
164
|
+
##
|
165
|
+
# Returns the full name of this Gem (see `Gem::BasicSpecification#full_name`).
|
166
|
+
# Information about where the gem is installed is also included if not
|
167
|
+
# installed in the default GEM_HOME.
|
168
|
+
|
169
|
+
def full_name_with_location
|
170
|
+
if base_dir != Gem.dir
|
171
|
+
"#{full_name} in #{base_dir}"
|
172
|
+
else
|
173
|
+
full_name
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
146
177
|
##
|
147
178
|
# Full paths in the gem to add to <code>$LOAD_PATH</code> when this gem is
|
148
179
|
# activated.
|
@@ -189,9 +220,11 @@ class Gem::BasicSpecification
|
|
189
220
|
##
|
190
221
|
# Returns the full path to this spec's gem directory.
|
191
222
|
# eg: /usr/local/lib/ruby/1.8/gems/mygem-1.0
|
223
|
+
#
|
224
|
+
# TODO: This is duplicated with #full_gem_path. Eventually either of them should be deprecated.
|
192
225
|
|
193
226
|
def gem_dir
|
194
|
-
@gem_dir ||=
|
227
|
+
@gem_dir ||= find_full_gem_path
|
195
228
|
end
|
196
229
|
|
197
230
|
##
|
@@ -223,6 +256,13 @@ class Gem::BasicSpecification
|
|
223
256
|
raise NotImplementedError
|
224
257
|
end
|
225
258
|
|
259
|
+
def installable_on_platform?(target_platform) # :nodoc:
|
260
|
+
return true if [Gem::Platform::RUBY, nil, target_platform].include?(platform)
|
261
|
+
return true if Gem::Platform.new(platform) === target_platform
|
262
|
+
|
263
|
+
false
|
264
|
+
end
|
265
|
+
|
226
266
|
def raw_require_paths # :nodoc:
|
227
267
|
raise NotImplementedError
|
228
268
|
end
|
@@ -21,7 +21,7 @@ module Gem::BundlerVersionFinder
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def self.bundle_update_bundler_version
|
24
|
-
return unless File.basename($0)
|
24
|
+
return unless ["bundle", "bundler"].include? File.basename($0)
|
25
25
|
return unless "update".start_with?(ARGV.first || " ")
|
26
26
|
bundler_version = nil
|
27
27
|
update_index = nil
|
data/lib/rubygems/command.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
# See LICENSE.txt for permissions.
|
7
7
|
#++
|
8
8
|
|
9
|
-
require_relative "
|
9
|
+
require_relative "vendored_optparse"
|
10
10
|
require_relative "requirement"
|
11
11
|
require_relative "user_interaction"
|
12
12
|
|
@@ -650,9 +650,6 @@ RubyGems is a package manager for Ruby.
|
|
650
650
|
gem help platforms gem platforms guide
|
651
651
|
gem help <COMMAND> show help on COMMAND
|
652
652
|
(e.g. 'gem help install')
|
653
|
-
gem server present a web page at
|
654
|
-
http://localhost:8808/
|
655
|
-
with info about installed gems
|
656
653
|
Further information:
|
657
654
|
https://guides.rubygems.org
|
658
655
|
HELP
|
@@ -60,6 +60,7 @@ class Gem::CommandManager
|
|
60
60
|
:push,
|
61
61
|
:query,
|
62
62
|
:rdoc,
|
63
|
+
:rebuild,
|
63
64
|
:search,
|
64
65
|
:server,
|
65
66
|
:signin,
|
@@ -106,7 +107,7 @@ class Gem::CommandManager
|
|
106
107
|
# Register all the subcommands supported by the gem command.
|
107
108
|
|
108
109
|
def initialize
|
109
|
-
require_relative "
|
110
|
+
require_relative "vendored_timeout"
|
110
111
|
@commands = {}
|
111
112
|
|
112
113
|
BUILTIN_COMMANDS.each do |name|
|
@@ -229,18 +230,16 @@ class Gem::CommandManager
|
|
229
230
|
def load_and_instantiate(command_name)
|
230
231
|
command_name = command_name.to_s
|
231
232
|
const_name = command_name.capitalize.gsub(/_(.)/) { $1.upcase } << "Command"
|
232
|
-
load_error = nil
|
233
233
|
|
234
234
|
begin
|
235
235
|
begin
|
236
236
|
require "rubygems/commands/#{command_name}_command"
|
237
|
-
rescue LoadError
|
238
|
-
|
237
|
+
rescue LoadError
|
238
|
+
# it may have been defined from a rubygems_plugin.rb file
|
239
239
|
end
|
240
|
+
|
240
241
|
Gem::Commands.const_get(const_name).new
|
241
242
|
rescue StandardError => e
|
242
|
-
e = load_error if load_error
|
243
|
-
|
244
243
|
alert_error clean_text("Loading command: #{command_name} (#{e.class})\n\t#{e}")
|
245
244
|
ui.backtrace e
|
246
245
|
end
|
@@ -1,11 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "../command"
|
4
|
+
require_relative "../gemspec_helpers"
|
4
5
|
require_relative "../package"
|
5
6
|
require_relative "../version_option"
|
6
7
|
|
7
8
|
class Gem::Commands::BuildCommand < Gem::Command
|
8
9
|
include Gem::VersionOption
|
10
|
+
include Gem::GemspecHelpers
|
9
11
|
|
10
12
|
def initialize
|
11
13
|
super "build", "Build a gem from a gemspec"
|
@@ -75,17 +77,6 @@ Gems can be saved to a specified filename with the output option:
|
|
75
77
|
|
76
78
|
private
|
77
79
|
|
78
|
-
def find_gemspec(glob = "*.gemspec")
|
79
|
-
gemspecs = Dir.glob(glob).sort
|
80
|
-
|
81
|
-
if gemspecs.size > 1
|
82
|
-
alert_error "Multiple gemspecs found: #{gemspecs}, please specify one"
|
83
|
-
terminate_interaction(1)
|
84
|
-
end
|
85
|
-
|
86
|
-
gemspecs.first
|
87
|
-
end
|
88
|
-
|
89
80
|
def build_gem
|
90
81
|
gemspec = resolve_gem_name
|
91
82
|
|
@@ -38,8 +38,6 @@ class Gem::Commands::CleanupCommand < Gem::Command
|
|
38
38
|
@default_gems = []
|
39
39
|
@full = nil
|
40
40
|
@gems_to_cleanup = nil
|
41
|
-
@original_home = nil
|
42
|
-
@original_path = nil
|
43
41
|
@primary_gems = nil
|
44
42
|
end
|
45
43
|
|
@@ -95,9 +93,6 @@ If no gems are named all gems in GEM_HOME are cleaned.
|
|
95
93
|
end
|
96
94
|
|
97
95
|
def clean_gems
|
98
|
-
@original_home = Gem.dir
|
99
|
-
@original_path = Gem.path
|
100
|
-
|
101
96
|
get_primary_gems
|
102
97
|
get_candidate_gems
|
103
98
|
get_gems_to_cleanup
|
@@ -112,17 +107,15 @@ If no gems are named all gems in GEM_HOME are cleaned.
|
|
112
107
|
deps.reverse_each do |spec|
|
113
108
|
uninstall_dep spec
|
114
109
|
end
|
115
|
-
|
116
|
-
Gem::Specification.reset
|
117
110
|
end
|
118
111
|
|
119
112
|
def get_candidate_gems
|
120
113
|
@candidate_gems = if options[:args].empty?
|
121
114
|
Gem::Specification.to_a
|
122
115
|
else
|
123
|
-
options[:args].
|
116
|
+
options[:args].flat_map do |gem_name|
|
124
117
|
Gem::Specification.find_all_by_name gem_name
|
125
|
-
end
|
118
|
+
end
|
126
119
|
end
|
127
120
|
end
|
128
121
|
|
@@ -133,7 +126,7 @@ If no gems are named all gems in GEM_HOME are cleaned.
|
|
133
126
|
|
134
127
|
default_gems, gems_to_cleanup = gems_to_cleanup.partition(&:default_gem?)
|
135
128
|
|
136
|
-
uninstall_from = options[:user_install] ? Gem.user_dir :
|
129
|
+
uninstall_from = options[:user_install] ? Gem.user_dir : Gem.dir
|
137
130
|
|
138
131
|
gems_to_cleanup = gems_to_cleanup.select do |spec|
|
139
132
|
spec.base_dir == uninstall_from
|
@@ -181,8 +174,5 @@ If no gems are named all gems in GEM_HOME are cleaned.
|
|
181
174
|
say "Unable to uninstall #{spec.full_name}:"
|
182
175
|
say "\t#{e.class}: #{e.message}"
|
183
176
|
end
|
184
|
-
ensure
|
185
|
-
# Restore path Gem::Uninstaller may have changed
|
186
|
-
Gem.use_paths @original_home, *@original_path
|
187
177
|
end
|
188
178
|
end
|
@@ -102,15 +102,22 @@ prefix or only the files that are requireable.
|
|
102
102
|
end
|
103
103
|
|
104
104
|
def files_in_default_gem(spec)
|
105
|
-
spec.files.
|
106
|
-
|
107
|
-
|
108
|
-
# $' is POSTMATCH
|
109
|
-
[RbConfig::CONFIG["bindir"], $']
|
110
|
-
when /\.so\z/
|
111
|
-
[RbConfig::CONFIG["archdir"], file]
|
105
|
+
spec.files.filter_map do |file|
|
106
|
+
if file.start_with?("#{spec.bindir}/")
|
107
|
+
[RbConfig::CONFIG["bindir"], file.delete_prefix("#{spec.bindir}/")]
|
112
108
|
else
|
113
|
-
|
109
|
+
gem spec.name, spec.version
|
110
|
+
|
111
|
+
require_path = spec.require_paths.find do |path|
|
112
|
+
file.start_with?("#{path}/")
|
113
|
+
end
|
114
|
+
|
115
|
+
requirable_part = file.delete_prefix("#{require_path}/")
|
116
|
+
|
117
|
+
resolve = $LOAD_PATH.resolve_feature_path(requirable_part)&.last
|
118
|
+
next unless resolve
|
119
|
+
|
120
|
+
[resolve.delete_suffix(requirable_part), requirable_part]
|
114
121
|
end
|
115
122
|
end
|
116
123
|
end
|
@@ -182,8 +189,8 @@ prefix or only the files that are requireable.
|
|
182
189
|
end
|
183
190
|
|
184
191
|
def specification_directories # :nodoc:
|
185
|
-
options[:specdirs].
|
192
|
+
options[:specdirs].flat_map do |i|
|
186
193
|
[i, File.join(i, "specifications")]
|
187
|
-
end
|
194
|
+
end
|
188
195
|
end
|
189
196
|
end
|