rubygems-update 3.5.5 → 3.6.9
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 +606 -1
- data/CODE_OF_CONDUCT.md +79 -28
- data/Manifest.txt +114 -73
- data/README.md +16 -11
- data/bundler/CHANGELOG.md +506 -6
- data/bundler/README.md +2 -2
- data/bundler/bundler.gemspec +2 -2
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- 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/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 +13 -17
- 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 +14 -5
- 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 +22 -22
- 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.rb +51 -107
- 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 +2 -12
- data/bundler/lib/bundler/compact_index_client.rb +51 -80
- data/bundler/lib/bundler/constants.rb +8 -1
- data/bundler/lib/bundler/current_ruby.rb +23 -33
- data/bundler/lib/bundler/definition.rb +485 -313
- data/bundler/lib/bundler/dependency.rb +92 -46
- data/bundler/lib/bundler/dsl.rb +135 -101
- 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 +3 -6
- data/bundler/lib/bundler/fetcher/compact_index.rb +16 -25
- data/bundler/lib/bundler/fetcher/downloader.rb +1 -1
- data/bundler/lib/bundler/fetcher.rb +14 -7
- data/bundler/lib/bundler/force_platform.rb +0 -2
- data/bundler/lib/bundler/friendly_errors.rb +1 -1
- data/bundler/lib/bundler/gem_helper.rb +1 -1
- data/bundler/lib/bundler/gem_helpers.rb +36 -19
- data/bundler/lib/bundler/gem_version_promoter.rb +42 -40
- 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 +17 -41
- data/bundler/lib/bundler/lazy_specification.rb +117 -46
- data/bundler/lib/bundler/lockfile_generator.rb +1 -1
- data/bundler/lib/bundler/lockfile_parser.rb +18 -7
- 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 +11 -15
- data/bundler/lib/bundler/man/bundle-config.1.ronn +12 -15
- 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 +4 -4
- data/bundler/lib/bundler/man/bundle-doctor.1.ronn +1 -1
- 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 +25 -7
- data/bundler/lib/bundler/man/bundle-gem.1.ronn +38 -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 +12 -4
- data/bundler/lib/bundler/man/bundle-inject.1.ronn +9 -1
- data/bundler/lib/bundler/man/bundle-install.1 +19 -16
- data/bundler/lib/bundler/man/bundle-install.1.ronn +24 -20
- 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 +15 -9
- data/bundler/lib/bundler/man/bundle-update.1.ronn +14 -6
- 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/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 -50
- 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 +282 -125
- data/bundler/lib/bundler/rubygems_gem_installer.rb +40 -5
- data/bundler/lib/bundler/rubygems_integration.rb +29 -67
- data/bundler/lib/bundler/runtime.rb +48 -35
- data/bundler/lib/bundler/self_manager.rb +27 -7
- data/bundler/lib/bundler/settings.rb +32 -21
- data/bundler/lib/bundler/setup.rb +6 -0
- data/bundler/lib/bundler/shared_helpers.rb +39 -21
- data/bundler/lib/bundler/source/gemspec.rb +1 -4
- data/bundler/lib/bundler/source/git/git_proxy.rb +23 -6
- 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 +7 -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 +53 -7
- data/bundler/lib/bundler/spec_set.rb +187 -88
- data/bundler/lib/bundler/stub_specification.rb +29 -2
- 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 +15 -15
- data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +8 -7
- data/bundler/lib/bundler/templates/newgem/rubocop.yml.tt +0 -5
- data/bundler/lib/bundler/ui/shell.rb +24 -2
- 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/lib/net/http/persistent.rb +68 -30
- 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 +1 -1
- data/bundler/lib/bundler/yaml_serializer.rb +12 -7
- data/bundler/lib/bundler.rb +89 -51
- data/{CONTRIBUTING.md → doc/rubygems/CONTRIBUTING.md} +10 -14
- data/{POLICIES.md → doc/rubygems/POLICIES.md} +81 -12
- data/exe/update_rubygems +1 -1
- data/lib/rubygems/basic_specification.rb +43 -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 +30 -17
- 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 +11 -16
- 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 +10 -17
- data/lib/rubygems/config_file.rb +45 -16
- data/lib/rubygems/core_ext/kernel_warn.rb +2 -6
- data/lib/rubygems/defaults.rb +6 -6
- 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 +12 -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 +1 -1
- 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 +31 -40
- 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 +7 -5
- 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 +3 -4
- data/lib/rubygems/request.rb +5 -5
- data/lib/rubygems/request_set/gem_dependency_api.rb +1 -1
- data/lib/rubygems/request_set.rb +1 -1
- 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 +0 -28
- 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/spec_specification.rb +7 -0
- data/lib/rubygems/resolver.rb +7 -7
- data/lib/rubygems/s3_uri_signer.rb +3 -3
- 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 +10 -8
- data/lib/rubygems/source_list.rb +1 -1
- data/lib/rubygems/spec_fetcher.rb +47 -15
- data/lib/rubygems/specification.rb +107 -180
- 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/util/licenses.rb +97 -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 +135 -51
- 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 +117 -49
- data/lib/rubygems/vendor/securerandom/COPYING +56 -0
- data/lib/rubygems/vendor/securerandom/lib/securerandom.rb +102 -0
- data/lib/rubygems/vendor/timeout/.document +1 -0
- data/lib/rubygems/vendor/timeout/COPYING +56 -0
- data/lib/rubygems/{timeout → vendor/timeout}/lib/timeout.rb +10 -11
- data/lib/rubygems/vendor/tsort/.document +1 -0
- data/lib/rubygems/{tsort → vendor/tsort}/lib/tsort.rb +2 -2
- data/lib/rubygems/vendor/uri/.document +1 -0
- 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 +82 -47
- data/rubygems-update.gemspec +11 -6
- data/setup.rb +1 -1
- metadata +131 -86
- data/bundler/lib/bundler/compact_index_client/gem_parser.rb +0 -32
- data/lib/rubygems/net/http.rb +0 -3
- 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/LICENSE.txt +0 -22
- data/lib/rubygems/optparse/lib/optparse/uri.rb +0 -7
- data/lib/rubygems/optparse.rb +0 -3
- data/lib/rubygems/resolv/LICENSE.txt +0 -22
- 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/timeout/LICENSE.txt +0 -22
- data/lib/rubygems/timeout.rb +0 -3
- 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/{lib/rubygems/net-http → bundler/lib/bundler/vendor/securerandom}/.document +0 -0
- /data/{MAINTAINERS.txt → doc/MAINTAINERS.txt} +0 -0
- /data/{bundler → doc/bundler}/UPGRADING.md +0 -0
- /data/{UPGRADING.md → doc/rubygems/UPGRADING.md} +0 -0
- /data/lib/rubygems/{net-protocol → vendor/molinillo}/.document +0 -0
- /data/lib/rubygems/{resolver → vendor}/molinillo/LICENSE +0 -0
- /data/lib/rubygems/{optparse → vendor/net-http}/.document +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/lib/rubygems/{resolv → vendor/net-protocol}/.document +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/{resolver/molinillo → vendor/optparse}/.document +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/lib/rubygems/{timeout → vendor/resolv}/.document +0 -0
- /data/lib/rubygems/{tsort → vendor/securerandom}/.document +0 -0
- /data/{bundler/lib/bundler/vendor/uri → lib/rubygems/vendor/tsort}/LICENSE.txt +0 -0
|
@@ -7,53 +7,72 @@ module Bundler
|
|
|
7
7
|
include Enumerable
|
|
8
8
|
include TSort
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def initialize(specs, incomplete_specs = [])
|
|
10
|
+
def initialize(specs)
|
|
13
11
|
@specs = specs
|
|
14
|
-
@incomplete_specs = incomplete_specs
|
|
15
12
|
end
|
|
16
13
|
|
|
17
|
-
def for(dependencies,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
def for(dependencies, platforms_or_legacy_check = [nil], legacy_platforms = [nil], skips: [])
|
|
15
|
+
platforms = if [true, false].include?(platforms_or_legacy_check)
|
|
16
|
+
Bundler::SharedHelpers.major_deprecation 2,
|
|
17
|
+
"SpecSet#for received a `check` parameter, but that's no longer used and deprecated. " \
|
|
18
|
+
"SpecSet#for always implicitly performs validation. Please remove this parameter",
|
|
19
|
+
print_caller_location: true
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
legacy_platforms
|
|
22
|
+
else
|
|
23
|
+
platforms_or_legacy_check
|
|
24
|
+
end
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
platform = dep[1]
|
|
27
|
-
incomplete = false
|
|
26
|
+
materialize_dependencies(dependencies, platforms, skips: skips)
|
|
28
27
|
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
@materializations.flat_map(&:specs).uniq
|
|
29
|
+
end
|
|
31
30
|
|
|
32
|
-
|
|
31
|
+
def normalize_platforms!(deps, platforms)
|
|
32
|
+
remove_invalid_platforms!(deps, platforms)
|
|
33
|
+
add_extra_platforms!(platforms)
|
|
33
34
|
|
|
34
|
-
|
|
35
|
-
if
|
|
36
|
-
specs.concat(specs_for_dep)
|
|
35
|
+
platforms.map! do |platform|
|
|
36
|
+
next platform if platform == Gem::Platform::RUBY
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
end
|
|
43
|
-
else
|
|
44
|
-
incomplete = true
|
|
38
|
+
begin
|
|
39
|
+
Integer(platform.version)
|
|
40
|
+
rescue ArgumentError, TypeError
|
|
41
|
+
next platform
|
|
45
42
|
end
|
|
46
43
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
less_specific_platform = Gem::Platform.new([platform.cpu, platform.os, nil])
|
|
45
|
+
next platform if incomplete_for_platform?(deps, less_specific_platform)
|
|
46
|
+
|
|
47
|
+
less_specific_platform
|
|
48
|
+
end.uniq!
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def add_originally_invalid_platforms!(platforms, originally_invalid_platforms)
|
|
52
|
+
originally_invalid_platforms.each do |originally_invalid_platform|
|
|
53
|
+
platforms << originally_invalid_platform if complete_platform(originally_invalid_platform)
|
|
50
54
|
end
|
|
55
|
+
end
|
|
51
56
|
|
|
52
|
-
|
|
57
|
+
def remove_invalid_platforms!(deps, platforms, skips: [])
|
|
58
|
+
invalid_platforms = []
|
|
59
|
+
|
|
60
|
+
platforms.reject! do |platform|
|
|
61
|
+
next false if skips.include?(platform)
|
|
62
|
+
|
|
63
|
+
invalid = incomplete_for_platform?(deps, platform)
|
|
64
|
+
invalid_platforms << platform if invalid
|
|
65
|
+
invalid
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
invalid_platforms
|
|
53
69
|
end
|
|
54
70
|
|
|
55
71
|
def add_extra_platforms!(platforms)
|
|
56
|
-
|
|
72
|
+
if @specs.empty?
|
|
73
|
+
platforms.concat([Gem::Platform::RUBY]).uniq
|
|
74
|
+
return
|
|
75
|
+
end
|
|
57
76
|
|
|
58
77
|
new_platforms = all_platforms.select do |platform|
|
|
59
78
|
next if platforms.include?(platform)
|
|
@@ -61,20 +80,13 @@ module Bundler
|
|
|
61
80
|
|
|
62
81
|
complete_platform(platform)
|
|
63
82
|
end
|
|
64
|
-
return
|
|
83
|
+
return if new_platforms.empty?
|
|
65
84
|
|
|
66
85
|
platforms.concat(new_platforms)
|
|
86
|
+
return if new_platforms.include?(Bundler.local_platform)
|
|
67
87
|
|
|
68
|
-
less_specific_platform = new_platforms.find {|platform| platform != Gem::Platform::RUBY && platform === Bundler.local_platform }
|
|
88
|
+
less_specific_platform = new_platforms.find {|platform| platform != Gem::Platform::RUBY && Bundler.local_platform === platform && platform === Bundler.local_platform }
|
|
69
89
|
platforms.delete(Bundler.local_platform) if less_specific_platform
|
|
70
|
-
|
|
71
|
-
platforms
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
def complete_platforms!(platforms)
|
|
75
|
-
platforms.each do |platform|
|
|
76
|
-
complete_platform(platform)
|
|
77
|
-
end
|
|
78
90
|
end
|
|
79
91
|
|
|
80
92
|
def validate_deps(s)
|
|
@@ -94,15 +106,13 @@ module Bundler
|
|
|
94
106
|
end
|
|
95
107
|
|
|
96
108
|
def []=(key, value)
|
|
97
|
-
|
|
109
|
+
delete_by_name(key)
|
|
98
110
|
|
|
99
|
-
|
|
111
|
+
add_spec(value)
|
|
100
112
|
end
|
|
101
113
|
|
|
102
114
|
def delete(specs)
|
|
103
|
-
specs.each {|spec|
|
|
104
|
-
|
|
105
|
-
reset!
|
|
115
|
+
Array(specs).each {|spec| remove_spec(spec) }
|
|
106
116
|
end
|
|
107
117
|
|
|
108
118
|
def sort!
|
|
@@ -118,36 +128,54 @@ module Bundler
|
|
|
118
128
|
end
|
|
119
129
|
|
|
120
130
|
def materialize(deps)
|
|
121
|
-
|
|
131
|
+
materialize_dependencies(deps)
|
|
122
132
|
|
|
123
|
-
SpecSet.new(
|
|
133
|
+
SpecSet.new(materialized_specs)
|
|
124
134
|
end
|
|
125
135
|
|
|
126
136
|
# Materialize for all the specs in the spec set, regardless of what platform they're for
|
|
127
|
-
# This is in contrast to how for does platform filtering (and specifically different from how `materialize` calls `for` only for the current platform)
|
|
128
137
|
# @return [Array<Gem::Specification>]
|
|
129
138
|
def materialized_for_all_platforms
|
|
130
139
|
@specs.map do |s|
|
|
131
140
|
next s unless s.is_a?(LazySpecification)
|
|
132
|
-
s.
|
|
133
|
-
spec = s.materialize_for_installation
|
|
141
|
+
spec = s.materialize_for_cache
|
|
134
142
|
raise GemNotFound, "Could not find #{s.full_name} in any of the sources" unless spec
|
|
135
143
|
spec
|
|
136
144
|
end
|
|
137
145
|
end
|
|
138
146
|
|
|
139
147
|
def incomplete_for_platform?(deps, platform)
|
|
140
|
-
|
|
148
|
+
incomplete_specs_for_platform(deps, platform).any?
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
def incomplete_specs_for_platform(deps, platform)
|
|
152
|
+
return [] if @specs.empty?
|
|
141
153
|
|
|
142
|
-
|
|
154
|
+
validation_set = self.class.new(@specs)
|
|
155
|
+
validation_set.for(deps, [platform])
|
|
156
|
+
validation_set.incomplete_specs
|
|
157
|
+
end
|
|
143
158
|
|
|
144
|
-
|
|
159
|
+
def missing_specs_for(deps)
|
|
160
|
+
materialize_dependencies(deps)
|
|
145
161
|
|
|
146
|
-
|
|
162
|
+
missing_specs
|
|
147
163
|
end
|
|
148
164
|
|
|
149
165
|
def missing_specs
|
|
150
|
-
@
|
|
166
|
+
@materializations.flat_map(&:completely_missing_specs)
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
def partially_missing_specs
|
|
170
|
+
@materializations.flat_map(&:partially_missing_specs)
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
def incomplete_specs
|
|
174
|
+
@materializations.flat_map(&:incomplete_specs)
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
def insecurely_materialized_specs
|
|
178
|
+
materialized_specs.select(&:insecurely_materialized?)
|
|
151
179
|
end
|
|
152
180
|
|
|
153
181
|
def -(other)
|
|
@@ -158,10 +186,20 @@ module Bundler
|
|
|
158
186
|
@specs.detect {|spec| spec.name == name && spec.match_platform(platform) }
|
|
159
187
|
end
|
|
160
188
|
|
|
189
|
+
def specs_with_additional_variants_from(other)
|
|
190
|
+
sorted | additional_variants_from(other)
|
|
191
|
+
end
|
|
192
|
+
|
|
161
193
|
def delete_by_name(name)
|
|
162
194
|
@specs.reject! {|spec| spec.name == name }
|
|
195
|
+
@sorted&.reject! {|spec| spec.name == name }
|
|
196
|
+
return if @lookup.nil?
|
|
163
197
|
|
|
164
|
-
|
|
198
|
+
@lookup[name] = nil
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
def version_for(name)
|
|
202
|
+
exemplary_spec(name)&.version
|
|
165
203
|
end
|
|
166
204
|
|
|
167
205
|
def what_required(spec)
|
|
@@ -195,11 +233,45 @@ module Bundler
|
|
|
195
233
|
lookup.keys
|
|
196
234
|
end
|
|
197
235
|
|
|
236
|
+
def valid?(s)
|
|
237
|
+
s.matches_current_metadata? && valid_dependencies?(s)
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
def to_s
|
|
241
|
+
map(&:full_name).to_s
|
|
242
|
+
end
|
|
243
|
+
|
|
198
244
|
private
|
|
199
245
|
|
|
200
|
-
def
|
|
201
|
-
|
|
202
|
-
|
|
246
|
+
def materialize_dependencies(dependencies, platforms = [nil], skips: [])
|
|
247
|
+
handled = ["bundler"].product(platforms).map {|k| [k, true] }.to_h
|
|
248
|
+
deps = dependencies.product(platforms)
|
|
249
|
+
@materializations = []
|
|
250
|
+
|
|
251
|
+
loop do
|
|
252
|
+
break unless dep = deps.shift
|
|
253
|
+
|
|
254
|
+
dependency = dep[0]
|
|
255
|
+
platform = dep[1]
|
|
256
|
+
name = dependency.name
|
|
257
|
+
|
|
258
|
+
key = [name, platform]
|
|
259
|
+
next if handled.key?(key)
|
|
260
|
+
|
|
261
|
+
handled[key] = true
|
|
262
|
+
|
|
263
|
+
materialization = Materialization.new(dependency, platform, candidates: lookup[name])
|
|
264
|
+
|
|
265
|
+
deps.concat(materialization.dependencies) if materialization.complete?
|
|
266
|
+
|
|
267
|
+
@materializations << materialization unless skips.include?(name)
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
@materializations
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
def materialized_specs
|
|
274
|
+
@materializations.filter_map(&:materialized_spec)
|
|
203
275
|
end
|
|
204
276
|
|
|
205
277
|
def complete_platform(platform)
|
|
@@ -209,7 +281,7 @@ module Bundler
|
|
|
209
281
|
spec = specs.first
|
|
210
282
|
matching_specs = spec.source.specs.search([spec.name, spec.version])
|
|
211
283
|
platform_spec = GemHelpers.select_best_platform_match(matching_specs, platform).find do |s|
|
|
212
|
-
|
|
284
|
+
valid?(s)
|
|
213
285
|
end
|
|
214
286
|
|
|
215
287
|
if platform_spec
|
|
@@ -221,9 +293,7 @@ module Bundler
|
|
|
221
293
|
end
|
|
222
294
|
|
|
223
295
|
if valid_platform && new_specs.any?
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
reset!
|
|
296
|
+
new_specs.each {|spec| add_spec(spec) }
|
|
227
297
|
end
|
|
228
298
|
|
|
229
299
|
valid_platform
|
|
@@ -233,20 +303,28 @@ module Bundler
|
|
|
233
303
|
@specs.flat_map {|spec| spec.source.specs.search([spec.name, spec.version]).map(&:platform) }.uniq
|
|
234
304
|
end
|
|
235
305
|
|
|
306
|
+
def additional_variants_from(other)
|
|
307
|
+
other.select do |other_spec|
|
|
308
|
+
spec = exemplary_spec(other_spec.name)
|
|
309
|
+
next unless spec
|
|
310
|
+
|
|
311
|
+
selected = spec.version == other_spec.version && valid_dependencies?(other_spec)
|
|
312
|
+
other_spec.source = spec.source if selected
|
|
313
|
+
selected
|
|
314
|
+
end
|
|
315
|
+
end
|
|
316
|
+
|
|
236
317
|
def valid_dependencies?(s)
|
|
237
318
|
validate_deps(s) == :valid
|
|
238
319
|
end
|
|
239
320
|
|
|
240
321
|
def sorted
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
" on each other, creating an infinite loop. Please remove either" \
|
|
248
|
-
" gem '#{cgems[0]}' or gem '#{cgems[1]}' and try again."
|
|
249
|
-
end
|
|
322
|
+
@sorted ||= ([@specs.find {|s| s.name == "rake" }] + tsort).compact.uniq
|
|
323
|
+
rescue TSort::Cyclic => error
|
|
324
|
+
cgems = extract_circular_gems(error)
|
|
325
|
+
raise CyclicDependencyError, "Your bundle requires gems that depend" \
|
|
326
|
+
" on each other, creating an infinite loop. Please remove either" \
|
|
327
|
+
" gem '#{cgems[0]}' or gem '#{cgems[1]}' and try again."
|
|
250
328
|
end
|
|
251
329
|
|
|
252
330
|
def extract_circular_gems(error)
|
|
@@ -257,8 +335,7 @@ module Bundler
|
|
|
257
335
|
@lookup ||= begin
|
|
258
336
|
lookup = {}
|
|
259
337
|
@specs.each do |s|
|
|
260
|
-
lookup
|
|
261
|
-
lookup[s.name] << s
|
|
338
|
+
index_spec(lookup, s.name, s)
|
|
262
339
|
end
|
|
263
340
|
lookup
|
|
264
341
|
end
|
|
@@ -269,19 +346,6 @@ module Bundler
|
|
|
269
346
|
@specs.sort_by(&:name).each {|s| yield s }
|
|
270
347
|
end
|
|
271
348
|
|
|
272
|
-
def specs_for_dependency(dep, platform)
|
|
273
|
-
specs_for_name = lookup[dep.name]
|
|
274
|
-
return [] unless specs_for_name
|
|
275
|
-
|
|
276
|
-
matching_specs = if dep.force_ruby_platform
|
|
277
|
-
GemHelpers.force_ruby_platform(specs_for_name)
|
|
278
|
-
else
|
|
279
|
-
GemHelpers.select_best_platform_match(specs_for_name, platform || Bundler.local_platform)
|
|
280
|
-
end
|
|
281
|
-
matching_specs.map!(&:materialize_for_installation).compact! if platform.nil?
|
|
282
|
-
matching_specs
|
|
283
|
-
end
|
|
284
|
-
|
|
285
349
|
def tsort_each_child(s)
|
|
286
350
|
s.dependencies.sort_by(&:name).each do |d|
|
|
287
351
|
next if d.type == :development
|
|
@@ -292,5 +356,40 @@ module Bundler
|
|
|
292
356
|
specs_for_name.each {|s2| yield s2 }
|
|
293
357
|
end
|
|
294
358
|
end
|
|
359
|
+
|
|
360
|
+
def add_spec(spec)
|
|
361
|
+
@specs << spec
|
|
362
|
+
|
|
363
|
+
name = spec.name
|
|
364
|
+
|
|
365
|
+
@sorted&.insert(@sorted.bsearch_index {|s| s.name >= name } || @sorted.size, spec)
|
|
366
|
+
return if @lookup.nil?
|
|
367
|
+
|
|
368
|
+
index_spec(@lookup, name, spec)
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
def remove_spec(spec)
|
|
372
|
+
@specs.delete(spec)
|
|
373
|
+
@sorted&.delete(spec)
|
|
374
|
+
return if @lookup.nil?
|
|
375
|
+
|
|
376
|
+
indexed_specs = @lookup[spec.name]
|
|
377
|
+
return unless indexed_specs
|
|
378
|
+
|
|
379
|
+
if indexed_specs.size > 1
|
|
380
|
+
@lookup[spec.name].delete(spec)
|
|
381
|
+
else
|
|
382
|
+
@lookup[spec.name] = nil
|
|
383
|
+
end
|
|
384
|
+
end
|
|
385
|
+
|
|
386
|
+
def index_spec(hash, key, value)
|
|
387
|
+
hash[key] ||= []
|
|
388
|
+
hash[key] << value
|
|
389
|
+
end
|
|
390
|
+
|
|
391
|
+
def exemplary_spec(name)
|
|
392
|
+
self[name].first
|
|
393
|
+
end
|
|
295
394
|
end
|
|
296
395
|
end
|
|
@@ -9,6 +9,10 @@ module Bundler
|
|
|
9
9
|
spec
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
+
def insecurely_materialized?
|
|
13
|
+
false
|
|
14
|
+
end
|
|
15
|
+
|
|
12
16
|
attr_reader :checksum
|
|
13
17
|
attr_accessor :stub, :ignored
|
|
14
18
|
|
|
@@ -28,6 +32,17 @@ module Bundler
|
|
|
28
32
|
|
|
29
33
|
# @!group Stub Delegates
|
|
30
34
|
|
|
35
|
+
def ignored?
|
|
36
|
+
return @ignored unless @ignored.nil?
|
|
37
|
+
|
|
38
|
+
@ignored = missing_extensions?
|
|
39
|
+
return false unless @ignored
|
|
40
|
+
|
|
41
|
+
warn "Source #{source} is ignoring #{self} because it is missing extensions"
|
|
42
|
+
|
|
43
|
+
true
|
|
44
|
+
end
|
|
45
|
+
|
|
31
46
|
def manually_installed?
|
|
32
47
|
# This is for manually installed gems which are gems that were fixed in place after a
|
|
33
48
|
# failed installation. Once the issue was resolved, the user then manually created
|
|
@@ -45,8 +60,8 @@ module Bundler
|
|
|
45
60
|
true
|
|
46
61
|
end
|
|
47
62
|
|
|
48
|
-
def activated
|
|
49
|
-
stub.activated
|
|
63
|
+
def activated?
|
|
64
|
+
stub.activated?
|
|
50
65
|
end
|
|
51
66
|
|
|
52
67
|
def activated=(activated)
|
|
@@ -77,6 +92,14 @@ module Bundler
|
|
|
77
92
|
stub.full_require_paths
|
|
78
93
|
end
|
|
79
94
|
|
|
95
|
+
def require_paths
|
|
96
|
+
stub.require_paths
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
def base_dir=(path)
|
|
100
|
+
stub.base_dir = path
|
|
101
|
+
end
|
|
102
|
+
|
|
80
103
|
def load_paths
|
|
81
104
|
full_require_paths
|
|
82
105
|
end
|
|
@@ -93,6 +116,10 @@ module Bundler
|
|
|
93
116
|
stub.raw_require_paths
|
|
94
117
|
end
|
|
95
118
|
|
|
119
|
+
def inspect
|
|
120
|
+
"#<#{self.class} @name=\"#{name}\" (#{full_name.delete_prefix("#{name}-")})>"
|
|
121
|
+
end
|
|
122
|
+
|
|
96
123
|
private
|
|
97
124
|
|
|
98
125
|
def _remote_specification
|
|
@@ -2,83 +2,131 @@
|
|
|
2
2
|
|
|
3
3
|
## Our Pledge
|
|
4
4
|
|
|
5
|
-
We as members, contributors, and leaders pledge to make participation in our
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, caste, color, religion, or sexual
|
|
10
|
+
identity and orientation.
|
|
6
11
|
|
|
7
|
-
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
8
14
|
|
|
9
15
|
## Our Standards
|
|
10
16
|
|
|
11
|
-
Examples of behavior that contributes to a positive environment for our
|
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
|
18
|
+
community include:
|
|
12
19
|
|
|
13
20
|
* Demonstrating empathy and kindness toward other people
|
|
14
21
|
* Being respectful of differing opinions, viewpoints, and experiences
|
|
15
22
|
* Giving and gracefully accepting constructive feedback
|
|
16
|
-
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
17
|
-
|
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
+
and learning from the experience
|
|
25
|
+
* Focusing on what is best not just for us as individuals, but for the overall
|
|
26
|
+
community
|
|
18
27
|
|
|
19
28
|
Examples of unacceptable behavior include:
|
|
20
29
|
|
|
21
|
-
* The use of sexualized language or imagery, and sexual attention or
|
|
22
|
-
|
|
30
|
+
* The use of sexualized language or imagery, and sexual attention or advances of
|
|
31
|
+
any kind
|
|
23
32
|
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
24
33
|
* Public or private harassment
|
|
25
|
-
* Publishing others' private information, such as a physical or email
|
|
26
|
-
|
|
34
|
+
* Publishing others' private information, such as a physical or email address,
|
|
35
|
+
without their explicit permission
|
|
27
36
|
* Other conduct which could reasonably be considered inappropriate in a
|
|
28
37
|
professional setting
|
|
29
38
|
|
|
30
39
|
## Enforcement Responsibilities
|
|
31
40
|
|
|
32
|
-
Community leaders are responsible for clarifying and enforcing our standards of
|
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
+
or harmful.
|
|
33
45
|
|
|
34
|
-
Community leaders have the right and responsibility to remove, edit, or reject
|
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
+
decisions when appropriate.
|
|
35
50
|
|
|
36
51
|
## Scope
|
|
37
52
|
|
|
38
|
-
This Code of Conduct applies within all community spaces, and also applies when
|
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
+
an individual is officially representing the community in public spaces.
|
|
55
|
+
Examples of representing our community include using an official email address,
|
|
56
|
+
posting via an official social media account, or acting as an appointed
|
|
57
|
+
representative at an online or offline event.
|
|
39
58
|
|
|
40
59
|
## Enforcement
|
|
41
60
|
|
|
42
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
|
+
reported to the community leaders responsible for enforcement at
|
|
63
|
+
[INSERT CONTACT METHOD].
|
|
64
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
|
43
65
|
|
|
44
|
-
All community leaders are obligated to respect the privacy and security of the
|
|
66
|
+
All community leaders are obligated to respect the privacy and security of the
|
|
67
|
+
reporter of any incident.
|
|
45
68
|
|
|
46
69
|
## Enforcement Guidelines
|
|
47
70
|
|
|
48
|
-
Community leaders will follow these Community Impact Guidelines in determining
|
|
71
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
|
72
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
|
49
73
|
|
|
50
74
|
### 1. Correction
|
|
51
75
|
|
|
52
|
-
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
76
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
77
|
+
unprofessional or unwelcome in the community.
|
|
53
78
|
|
|
54
|
-
**Consequence**: A private, written warning from community leaders, providing
|
|
79
|
+
**Consequence**: A private, written warning from community leaders, providing
|
|
80
|
+
clarity around the nature of the violation and an explanation of why the
|
|
81
|
+
behavior was inappropriate. A public apology may be requested.
|
|
55
82
|
|
|
56
83
|
### 2. Warning
|
|
57
84
|
|
|
58
|
-
**Community Impact**: A violation through a single incident or series of
|
|
85
|
+
**Community Impact**: A violation through a single incident or series of
|
|
86
|
+
actions.
|
|
59
87
|
|
|
60
|
-
**Consequence**: A warning with consequences for continued behavior. No
|
|
88
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
|
89
|
+
interaction with the people involved, including unsolicited interaction with
|
|
90
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
|
91
|
+
includes avoiding interactions in community spaces as well as external channels
|
|
92
|
+
like social media. Violating these terms may lead to a temporary or permanent
|
|
93
|
+
ban.
|
|
61
94
|
|
|
62
95
|
### 3. Temporary Ban
|
|
63
96
|
|
|
64
|
-
**Community Impact**: A serious violation of community standards, including
|
|
97
|
+
**Community Impact**: A serious violation of community standards, including
|
|
98
|
+
sustained inappropriate behavior.
|
|
65
99
|
|
|
66
|
-
**Consequence**: A temporary ban from any sort of interaction or public
|
|
100
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
|
101
|
+
communication with the community for a specified period of time. No public or
|
|
102
|
+
private interaction with the people involved, including unsolicited interaction
|
|
103
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
|
104
|
+
Violating these terms may lead to a permanent ban.
|
|
67
105
|
|
|
68
106
|
### 4. Permanent Ban
|
|
69
107
|
|
|
70
|
-
**Community Impact**: Demonstrating a pattern of violation of community
|
|
108
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
|
109
|
+
standards, including sustained inappropriate behavior, harassment of an
|
|
110
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
|
71
111
|
|
|
72
|
-
**Consequence**: A permanent ban from any sort of public interaction within the
|
|
112
|
+
**Consequence**: A permanent ban from any sort of public interaction within the
|
|
113
|
+
community.
|
|
73
114
|
|
|
74
115
|
## Attribution
|
|
75
116
|
|
|
76
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
77
|
-
available at
|
|
117
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
118
|
+
version 2.1, available at
|
|
119
|
+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
78
120
|
|
|
79
|
-
Community Impact Guidelines were inspired by
|
|
80
|
-
|
|
81
|
-
[homepage]: https://www.contributor-covenant.org
|
|
121
|
+
Community Impact Guidelines were inspired by
|
|
122
|
+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
|
82
123
|
|
|
83
124
|
For answers to common questions about this code of conduct, see the FAQ at
|
|
84
|
-
https://www.contributor-covenant.org/faq. Translations are available at
|
|
125
|
+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
|
126
|
+
[https://www.contributor-covenant.org/translations][translations].
|
|
127
|
+
|
|
128
|
+
[homepage]: https://www.contributor-covenant.org
|
|
129
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
130
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
|
131
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
|
132
|
+
[translations]: https://www.contributor-covenant.org/translations
|
|
@@ -5,13 +5,11 @@ source "https://rubygems.org"
|
|
|
5
5
|
# Specify your gem's dependencies in <%= config[:name] %>.gemspec
|
|
6
6
|
gemspec
|
|
7
7
|
|
|
8
|
+
gem "irb"
|
|
8
9
|
gem "rake", "~> 13.0"
|
|
9
10
|
<%- if config[:ext] -%>
|
|
10
11
|
|
|
11
12
|
gem "rake-compiler"
|
|
12
|
-
<%- if config[:ext] == 'rust' -%>
|
|
13
|
-
gem "rb_sys", "~> 0.9.63"
|
|
14
|
-
<%- end -%>
|
|
15
13
|
<%- end -%>
|
|
16
14
|
<%- if config[:test] -%>
|
|
17
15
|
|
|
@@ -10,11 +10,15 @@ TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_O
|
|
|
10
10
|
|
|
11
11
|
Install the gem and add to the application's Gemfile by executing:
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
```bash
|
|
14
|
+
bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
|
|
15
|
+
```
|
|
14
16
|
|
|
15
17
|
If bundler is not being used to manage dependencies, install the gem by executing:
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
```bash
|
|
20
|
+
gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
|
|
21
|
+
```
|
|
18
22
|
|
|
19
23
|
## Usage
|
|
20
24
|
|
|
@@ -22,7 +26,7 @@ TODO: Write usage instructions here
|
|
|
22
26
|
|
|
23
27
|
## Development
|
|
24
28
|
|
|
25
|
-
After checking out the repo, run `bin/setup` to install dependencies.<% if config[:test] %> Then, run `rake <%= config[:
|
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies.<% if config[:test] %> Then, run `rake <%= config[:test_task] %>` to run the tests.<% end %> You can also run `bin/console` for an interactive prompt that will allow you to experiment.<% if config[:bin] %> Run `bundle exec <%= config[:name] %>` to use the gem in this directory, ignoring other installed copies of this gem.<% end %>
|
|
26
30
|
|
|
27
31
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
28
32
|
<% if config[:git] -%>
|