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
@@ -26,7 +26,7 @@ module Bundler
|
|
26
26
|
if Bundler.feature_flag.update_requires_all_flag?
|
27
27
|
raise InvalidOption, "To update everything, pass the `--all` flag."
|
28
28
|
end
|
29
|
-
SharedHelpers.major_deprecation
|
29
|
+
SharedHelpers.major_deprecation 4, "Pass --all to `bundle update` to update everything"
|
30
30
|
elsif !full_update && options[:all]
|
31
31
|
raise InvalidOption, "Cannot specify --all along with specific options."
|
32
32
|
end
|
@@ -63,7 +63,7 @@ module Bundler
|
|
63
63
|
opts = options.dup
|
64
64
|
opts["update"] = true
|
65
65
|
opts["local"] = options[:local]
|
66
|
-
opts["force"] = options[:redownload]
|
66
|
+
opts["force"] = options[:redownload] if options[:redownload]
|
67
67
|
|
68
68
|
Bundler.settings.set_command_option_if_given :jobs, opts["jobs"]
|
69
69
|
|
@@ -92,7 +92,7 @@ module Bundler
|
|
92
92
|
locked_spec = locked_info[:spec]
|
93
93
|
new_spec = Bundler.definition.specs[name].first
|
94
94
|
unless new_spec
|
95
|
-
unless locked_spec.
|
95
|
+
unless locked_spec.installable_on_platform?(Bundler.local_platform)
|
96
96
|
Bundler.ui.warn "Bundler attempted to update #{name} but it was not considered because it is for a different platform from the current one"
|
97
97
|
end
|
98
98
|
|
data/bundler/lib/bundler/cli.rb
CHANGED
@@ -5,6 +5,7 @@ require_relative "vendored_thor"
|
|
5
5
|
module Bundler
|
6
6
|
class CLI < Thor
|
7
7
|
require_relative "cli/common"
|
8
|
+
require_relative "cli/install"
|
8
9
|
|
9
10
|
package_name "Bundler"
|
10
11
|
|
@@ -64,19 +65,19 @@ module Bundler
|
|
64
65
|
Bundler.reset_settings_and_root!
|
65
66
|
end
|
66
67
|
|
67
|
-
Bundler.
|
68
|
+
Bundler.auto_switch
|
68
69
|
|
69
70
|
Bundler.settings.set_command_option_if_given :retry, options[:retry]
|
70
71
|
|
71
72
|
current_cmd = args.last[:current_command].name
|
72
|
-
auto_install if AUTO_INSTALL_CMDS.include?(current_cmd)
|
73
|
+
Bundler.auto_install if AUTO_INSTALL_CMDS.include?(current_cmd)
|
73
74
|
rescue UnknownArgumentError => e
|
74
75
|
raise InvalidOption, e.message
|
75
76
|
ensure
|
76
77
|
self.options ||= {}
|
77
78
|
unprinted_warnings = Bundler.ui.unprinted_warnings
|
78
79
|
Bundler.ui = UI::Shell.new(options)
|
79
|
-
Bundler.ui.level = "debug" if options[
|
80
|
+
Bundler.ui.level = "debug" if options[:verbose] || Bundler.settings[:verbose]
|
80
81
|
unprinted_warnings.each {|w| Bundler.ui.warn(w) }
|
81
82
|
end
|
82
83
|
|
@@ -109,11 +110,13 @@ module Bundler
|
|
109
110
|
default_task(Bundler.feature_flag.default_cli_command)
|
110
111
|
|
111
112
|
class_option "no-color", type: :boolean, desc: "Disable colorization in output"
|
112
|
-
class_option "retry",
|
113
|
-
|
113
|
+
class_option "retry", type: :numeric, aliases: "-r", banner: "NUM",
|
114
|
+
desc: "Specify the number of times you wish to attempt network commands"
|
114
115
|
class_option "verbose", type: :boolean, desc: "Enable verbose output mode", aliases: "-V"
|
115
116
|
|
116
117
|
def help(cli = nil)
|
118
|
+
cli = self.class.all_aliases[cli] if self.class.all_aliases[cli]
|
119
|
+
|
117
120
|
case cli
|
118
121
|
when "gemfile" then command = "gemfile"
|
119
122
|
when nil then command = "bundle"
|
@@ -127,7 +130,7 @@ module Bundler
|
|
127
130
|
|
128
131
|
if man_pages.include?(command)
|
129
132
|
man_page = man_pages[command]
|
130
|
-
if Bundler.which("man") && !man_path.match?(%r{^file
|
133
|
+
if Bundler.which("man") && !man_path.match?(%r{^(?:file:/.+!|uri:classloader:)/META-INF/jruby.home/.+})
|
131
134
|
Kernel.exec("man", man_page)
|
132
135
|
else
|
133
136
|
puts File.read("#{man_path}/#{File.basename(man_page)}.ronn")
|
@@ -214,30 +217,28 @@ module Bundler
|
|
214
217
|
method_option "full-index", type: :boolean, banner: "Fall back to using the single-file index of all gems"
|
215
218
|
method_option "gemfile", type: :string, banner: "Use the specified gemfile instead of Gemfile"
|
216
219
|
method_option "jobs", aliases: "-j", type: :numeric, banner: "Specify the number of jobs to run in parallel"
|
217
|
-
method_option "local", type: :boolean, banner:
|
220
|
+
method_option "local", type: :boolean, banner: "Do not attempt to fetch gems remotely and use the gem cache instead"
|
218
221
|
method_option "prefer-local", type: :boolean, banner: "Only attempt to fetch gems remotely if not present locally, even if newer versions are available remotely"
|
219
222
|
method_option "no-cache", type: :boolean, banner: "Don't update the existing gem cache."
|
220
|
-
method_option "
|
223
|
+
method_option "force", type: :boolean, aliases: "--redownload", banner: "Force reinstalling every gem, even if already installed"
|
221
224
|
method_option "no-prune", type: :boolean, banner: "Don't remove stale gems from the cache."
|
222
225
|
method_option "path", type: :string, banner: "Specify a different path than the system default ($BUNDLE_PATH or $GEM_HOME).#{" Bundler will remember this value for future installs on this machine" unless Bundler.feature_flag.forget_cli_options?}"
|
223
226
|
method_option "quiet", type: :boolean, banner: "Only output warnings and errors."
|
224
227
|
method_option "shebang", type: :string, banner: "Specify a different shebang executable name than the default (usually 'ruby')"
|
225
228
|
method_option "standalone", type: :array, lazy_default: [], banner: "Make a bundle that can work without the Bundler runtime"
|
226
229
|
method_option "system", type: :boolean, banner: "Install to the system location ($BUNDLE_PATH or $GEM_HOME) even if the bundle was previously installed somewhere else for this application"
|
227
|
-
method_option "trust-policy", alias: "P", type: :string, banner:
|
228
|
-
|
230
|
+
method_option "trust-policy", alias: "P", type: :string, banner: "Gem trust policy (like gem install -P). Must be one of #{Bundler.rubygems.security_policy_keys.join("|")}"
|
231
|
+
method_option "target-rbconfig", type: :string, banner: "Path to rbconfig.rb for the deployment target platform"
|
229
232
|
method_option "without", type: :array, banner: "Exclude gems that are part of the specified named group."
|
230
233
|
method_option "with", type: :array, banner: "Include gems that are part of the specified named group."
|
231
234
|
def install
|
232
|
-
SharedHelpers.major_deprecation(2, "The `--force` option has been renamed to `--redownload`") if ARGV.include?("--force")
|
233
|
-
|
234
235
|
%w[clean deployment frozen no-prune path shebang without with].each do |option|
|
235
236
|
remembered_flag_deprecation(option)
|
236
237
|
end
|
237
238
|
|
238
239
|
print_remembered_flag_deprecation("--system", "path.system", "true") if ARGV.include?("--system")
|
239
240
|
|
240
|
-
|
241
|
+
remembered_flag_deprecation("deployment", negative: true)
|
241
242
|
|
242
243
|
require_relative "cli/install"
|
243
244
|
Bundler.settings.temporary(no_install: false) do
|
@@ -257,21 +258,20 @@ module Bundler
|
|
257
258
|
method_option "gemfile", type: :string, banner: "Use the specified gemfile instead of Gemfile"
|
258
259
|
method_option "group", aliases: "-g", type: :array, banner: "Update a specific group"
|
259
260
|
method_option "jobs", aliases: "-j", type: :numeric, banner: "Specify the number of jobs to run in parallel"
|
260
|
-
method_option "local", type: :boolean, banner:
|
261
|
-
method_option "quiet", type: :boolean, banner:
|
261
|
+
method_option "local", type: :boolean, banner: "Do not attempt to fetch gems remotely and use the gem cache instead"
|
262
|
+
method_option "quiet", type: :boolean, banner: "Only output warnings and errors."
|
262
263
|
method_option "source", type: :array, banner: "Update a specific source (and all gems associated with it)"
|
263
|
-
method_option "
|
264
|
+
method_option "force", type: :boolean, aliases: "--redownload", banner: "Force reinstalling every gem, even if already installed"
|
264
265
|
method_option "ruby", type: :boolean, banner: "Update ruby specified in Gemfile.lock"
|
265
266
|
method_option "bundler", type: :string, lazy_default: "> 0.a", banner: "Update the locked version of bundler"
|
266
|
-
method_option "patch", type: :boolean, banner:
|
267
|
-
method_option "minor", type: :boolean, banner:
|
268
|
-
method_option "major", type: :boolean, banner:
|
267
|
+
method_option "patch", type: :boolean, banner: "Prefer updating only to next patch version"
|
268
|
+
method_option "minor", type: :boolean, banner: "Prefer updating only to next minor version"
|
269
|
+
method_option "major", type: :boolean, banner: "Prefer updating to next major version (default)"
|
269
270
|
method_option "pre", type: :boolean, banner: "Always choose the highest allowed version when updating gems, regardless of prerelease status"
|
270
271
|
method_option "strict", type: :boolean, banner: "Do not allow any gem to be updated past latest --patch | --minor | --major"
|
271
272
|
method_option "conservative", type: :boolean, banner: "Use bundle install conservative update behavior and do not allow shared dependencies to be updated."
|
272
273
|
method_option "all", type: :boolean, banner: "Update everything."
|
273
274
|
def update(*gems)
|
274
|
-
SharedHelpers.major_deprecation(2, "The `--force` option has been renamed to `--redownload`") if ARGV.include?("--force")
|
275
275
|
require_relative "cli/update"
|
276
276
|
Bundler.settings.temporary(no_install: false) do
|
277
277
|
Update.new(options, gems).run
|
@@ -283,10 +283,8 @@ module Bundler
|
|
283
283
|
Show lists the names and versions of all gems that are required by your Gemfile.
|
284
284
|
Calling show with [GEM] will list the exact location of that gem on your machine.
|
285
285
|
D
|
286
|
-
method_option "paths", type: :boolean,
|
287
|
-
|
288
|
-
method_option "outdated", type: :boolean,
|
289
|
-
banner: "Show verbose output including whether gems are outdated."
|
286
|
+
method_option "paths", type: :boolean, banner: "List the paths of all gems that are required by your Gemfile."
|
287
|
+
method_option "outdated", type: :boolean, banner: "Show verbose output including whether gems are outdated."
|
290
288
|
def show(gem_name = nil)
|
291
289
|
if ARGV.include?("--outdated")
|
292
290
|
message = "the `--outdated` flag to `bundle show` was undocumented and will be removed without replacement"
|
@@ -330,6 +328,8 @@ module Bundler
|
|
330
328
|
method_option "all", type: :boolean, banner: "Install binstubs for all gems"
|
331
329
|
method_option "all-platforms", type: :boolean, default: false, banner: "Install binstubs for all platforms"
|
332
330
|
def binstubs(*gems)
|
331
|
+
remembered_flag_deprecation("path", option_name: "bin")
|
332
|
+
|
333
333
|
require_relative "cli/binstubs"
|
334
334
|
Binstubs.new(options, gems).run
|
335
335
|
end
|
@@ -347,6 +347,8 @@ module Bundler
|
|
347
347
|
method_option "github", type: :string
|
348
348
|
method_option "branch", type: :string
|
349
349
|
method_option "ref", type: :string
|
350
|
+
method_option "glob", type: :string, banner: "The location of a dependency's .gemspec, expanded within Ruby (single quotes recommended)"
|
351
|
+
method_option "quiet", type: :boolean, banner: "Only output warnings and errors."
|
350
352
|
method_option "skip-install", type: :boolean, banner: "Adds gem to the Gemfile but does not install it"
|
351
353
|
method_option "optimistic", type: :boolean, banner: "Adds optimistic declaration of version to gem"
|
352
354
|
method_option "strict", type: :boolean, banner: "Adds strict declaration of version to gem"
|
@@ -393,11 +395,9 @@ module Bundler
|
|
393
395
|
end
|
394
396
|
|
395
397
|
desc "cache [OPTIONS]", "Locks and then caches all of the gems into vendor/cache"
|
396
|
-
method_option "all",
|
397
|
-
default: Bundler.feature_flag.cache_all?,
|
398
|
-
banner: "Include all sources (including path and git)."
|
398
|
+
method_option "all", type: :boolean, default: Bundler.feature_flag.cache_all?, banner: "Include all sources (including path and git)."
|
399
399
|
method_option "all-platforms", type: :boolean, banner: "Include gems for all platforms present in the lockfile, not only the current one"
|
400
|
-
method_option "cache-path", type: :string, banner:
|
400
|
+
method_option "cache-path", type: :string, banner: "Specify a different cache path than the default (vendor/cache)."
|
401
401
|
method_option "gemfile", type: :string, banner: "Use the specified gemfile instead of Gemfile"
|
402
402
|
method_option "no-install", type: :boolean, banner: "Don't install the gems, only update the cache."
|
403
403
|
method_option "no-prune", type: :boolean, banner: "Don't remove stale gems from the cache."
|
@@ -413,7 +413,7 @@ module Bundler
|
|
413
413
|
def cache
|
414
414
|
print_remembered_flag_deprecation("--all", "cache_all", "true") if ARGV.include?("--all")
|
415
415
|
|
416
|
-
if
|
416
|
+
if flag_passed?("--path")
|
417
417
|
message =
|
418
418
|
"The `--path` flag is deprecated because its semantics are unclear. " \
|
419
419
|
"Use `bundle config cache_path` to configure the path of your cache of gems, " \
|
@@ -433,8 +433,8 @@ module Bundler
|
|
433
433
|
map aliases_for("cache")
|
434
434
|
|
435
435
|
desc "exec [OPTIONS]", "Run the command in context of the bundle"
|
436
|
-
method_option :keep_file_descriptors, type: :boolean, default: true
|
437
|
-
method_option :gemfile, type: :string, required: false
|
436
|
+
method_option :keep_file_descriptors, type: :boolean, default: true, banner: "Passes all file descriptors to the new processes. Default is true, and setting it to false is deprecated"
|
437
|
+
method_option :gemfile, type: :string, required: false, banner: "Use the specified gemfile instead of Gemfile"
|
438
438
|
long_desc <<-D
|
439
439
|
Exec runs a command, providing it access to the gems in the bundle. While using
|
440
440
|
bundle exec you can require and call the bundled gems as if they were installed
|
@@ -475,25 +475,23 @@ module Bundler
|
|
475
475
|
Open.new(options, name).run
|
476
476
|
end
|
477
477
|
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
Console.new(options, group).run
|
483
|
-
end
|
478
|
+
desc "console [GROUP]", "Opens an IRB session with the bundle pre-loaded"
|
479
|
+
def console(group = nil)
|
480
|
+
require_relative "cli/console"
|
481
|
+
Console.new(options, group).run
|
484
482
|
end
|
485
483
|
|
486
484
|
desc "version", "Prints Bundler version information"
|
487
485
|
def version
|
488
486
|
cli_help = current_command.name == "cli_help"
|
489
487
|
if cli_help || ARGV.include?("version")
|
490
|
-
build_info = " (#{BuildMetadata.
|
488
|
+
build_info = " (#{BuildMetadata.timestamp} commit #{BuildMetadata.git_commit_sha})"
|
491
489
|
end
|
492
490
|
|
493
|
-
if !cli_help && Bundler.feature_flag.
|
494
|
-
Bundler.ui.info "#{Bundler
|
491
|
+
if !cli_help && Bundler.feature_flag.bundler_4_mode?
|
492
|
+
Bundler.ui.info "#{Bundler.verbose_version}#{build_info}"
|
495
493
|
else
|
496
|
-
Bundler.ui.info "Bundler version #{Bundler
|
494
|
+
Bundler.ui.info "Bundler version #{Bundler.verbose_version}#{build_info}"
|
497
495
|
end
|
498
496
|
end
|
499
497
|
|
@@ -513,7 +511,7 @@ module Bundler
|
|
513
511
|
end
|
514
512
|
end
|
515
513
|
|
516
|
-
unless Bundler.feature_flag.
|
514
|
+
unless Bundler.feature_flag.bundler_4_mode?
|
517
515
|
desc "viz [OPTIONS]", "Generates a visual dependency graph", hide: true
|
518
516
|
long_desc <<-D
|
519
517
|
Viz generates a PNG file of the current Gemfile as a dependency graph.
|
@@ -532,52 +530,29 @@ module Bundler
|
|
532
530
|
end
|
533
531
|
end
|
534
532
|
|
535
|
-
old_gem = instance_method(:gem)
|
536
|
-
|
537
533
|
desc "gem NAME [OPTIONS]", "Creates a skeleton for creating a rubygem"
|
538
534
|
method_option :exe, type: :boolean, default: false, aliases: ["--bin", "-b"], desc: "Generate a binary executable for your library."
|
539
535
|
method_option :coc, type: :boolean, desc: "Generate a code of conduct file. Set a default with `bundle config set --global gem.coc true`."
|
540
|
-
method_option :edit, type: :string, aliases: "-e", required: false, banner: "EDITOR",
|
541
|
-
lazy_default: [ENV["BUNDLER_EDITOR"], ENV["VISUAL"], ENV["EDITOR"]].find {|e| !e.nil? && !e.empty? },
|
542
|
-
desc: "Open generated gemspec in the specified editor (defaults to $EDITOR or $BUNDLER_EDITOR)"
|
536
|
+
method_option :edit, type: :string, aliases: "-e", required: false, banner: "EDITOR", lazy_default: [ENV["BUNDLER_EDITOR"], ENV["VISUAL"], ENV["EDITOR"]].find {|e| !e.nil? && !e.empty? }, desc: "Open generated gemspec in the specified editor (defaults to $EDITOR or $BUNDLER_EDITOR)"
|
543
537
|
method_option :ext, type: :string, desc: "Generate the boilerplate for C extension code.", enum: EXTENSIONS
|
544
538
|
method_option :git, type: :boolean, default: true, desc: "Initialize a git repo inside your library."
|
545
539
|
method_option :mit, type: :boolean, desc: "Generate an MIT license file. Set a default with `bundle config set --global gem.mit true`."
|
546
540
|
method_option :rubocop, type: :boolean, desc: "Add rubocop to the generated Rakefile and gemspec. Set a default with `bundle config set --global gem.rubocop true`."
|
547
541
|
method_option :changelog, type: :boolean, desc: "Generate changelog file. Set a default with `bundle config set --global gem.changelog true`."
|
548
|
-
method_option :test, type: :string, lazy_default: Bundler.settings["gem.test"] || "", aliases: "-t", banner: "Use the specified test framework for your library",
|
549
|
-
|
550
|
-
method_option :
|
551
|
-
desc: "Generate CI configuration, either GitHub Actions, GitLab CI or CircleCI. Set a default with `bundle config set --global gem.ci (github|gitlab|circle)`"
|
552
|
-
method_option :linter, type: :string, lazy_default: Bundler.settings["gem.linter"] || "",
|
553
|
-
desc: "Add a linter and code formatter, either RuboCop or Standard. Set a default with `bundle config set --global gem.linter (rubocop|standard)`"
|
542
|
+
method_option :test, type: :string, lazy_default: Bundler.settings["gem.test"] || "", aliases: "-t", banner: "Use the specified test framework for your library", enum: %w[rspec minitest test-unit], desc: "Generate a test directory for your library, either rspec, minitest or test-unit. Set a default with `bundle config set --global gem.test (rspec|minitest|test-unit)`."
|
543
|
+
method_option :ci, type: :string, lazy_default: Bundler.settings["gem.ci"] || "", enum: %w[github gitlab circle], desc: "Generate CI configuration, either GitHub Actions, GitLab CI or CircleCI. Set a default with `bundle config set --global gem.ci (github|gitlab|circle)`"
|
544
|
+
method_option :linter, type: :string, lazy_default: Bundler.settings["gem.linter"] || "", enum: %w[rubocop standard], desc: "Add a linter and code formatter, either RuboCop or Standard. Set a default with `bundle config set --global gem.linter (rubocop|standard)`"
|
554
545
|
method_option :github_username, type: :string, default: Bundler.settings["gem.github_username"], banner: "Set your username on GitHub", desc: "Fill in GitHub username on README so that you don't have to do it manually. Set a default with `bundle config set --global gem.github_username <your_username>`."
|
546
|
+
method_option :bundle, type: :boolean, default: Bundler.settings["gem.bundle"], desc: "Automatically run `bundle install` after creation. Set a default with `bundle config set --global gem.bundle true`"
|
555
547
|
|
556
548
|
def gem(name)
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
def gem_command.run(instance, args = [])
|
561
|
-
arity = 1 # name
|
549
|
+
require_relative "cli/gem"
|
550
|
+
cmd_args = args + [self]
|
551
|
+
cmd_args.unshift(options)
|
562
552
|
|
563
|
-
|
564
|
-
cmd_args = args + [instance]
|
565
|
-
cmd_args.unshift(instance.options)
|
566
|
-
|
567
|
-
cmd = begin
|
568
|
-
Gem.new(*cmd_args)
|
569
|
-
rescue ArgumentError => e
|
570
|
-
instance.class.handle_argument_error(self, e, args, arity)
|
571
|
-
end
|
572
|
-
|
573
|
-
cmd.run
|
574
|
-
end
|
553
|
+
Gem.new(*cmd_args).run
|
575
554
|
end
|
576
555
|
|
577
|
-
undef_method(:gem)
|
578
|
-
define_method(:gem, old_gem)
|
579
|
-
private :gem
|
580
|
-
|
581
556
|
def self.source_root
|
582
557
|
File.expand_path("templates", __dir__)
|
583
558
|
end
|
@@ -598,7 +573,7 @@ module Bundler
|
|
598
573
|
end
|
599
574
|
|
600
575
|
desc "inject GEM VERSION", "Add the named gem, with version requirements, to the resolved Gemfile", hide: true
|
601
|
-
method_option "source", type: :string, banner:
|
576
|
+
method_option "source", type: :string, banner: "Install gem from the given source"
|
602
577
|
method_option "group", type: :string, banner: "Install gem into a bundler group"
|
603
578
|
def inject(name, version)
|
604
579
|
SharedHelpers.major_deprecation 2, "The `inject` command has been replaced by the `add` command"
|
@@ -608,19 +583,21 @@ module Bundler
|
|
608
583
|
|
609
584
|
desc "lock", "Creates a lockfile without installing"
|
610
585
|
method_option "update", type: :array, lazy_default: true, banner: "ignore the existing lockfile, update all gems by default, or update list of given gems"
|
611
|
-
method_option "local", type: :boolean, default: false, banner:
|
612
|
-
method_option "print", type: :boolean, default: false, banner:
|
586
|
+
method_option "local", type: :boolean, default: false, banner: "do not attempt to fetch remote gemspecs and use the local gem cache only"
|
587
|
+
method_option "print", type: :boolean, default: false, banner: "print the lockfile to STDOUT instead of writing to the file system"
|
613
588
|
method_option "gemfile", type: :string, banner: "Use the specified gemfile instead of Gemfile"
|
614
589
|
method_option "lockfile", type: :string, default: nil, banner: "the path the lockfile should be written to"
|
615
590
|
method_option "full-index", type: :boolean, default: false, banner: "Fall back to using the single-file index of all gems"
|
591
|
+
method_option "add-checksums", type: :boolean, default: false, banner: "Adds checksums to the lockfile"
|
616
592
|
method_option "add-platform", type: :array, default: [], banner: "Add a new platform to the lockfile"
|
617
|
-
method_option "remove-platform", type: :array, default: [], banner:
|
618
|
-
method_option "
|
619
|
-
method_option "
|
620
|
-
method_option "
|
593
|
+
method_option "remove-platform", type: :array, default: [], banner: "Remove a platform from the lockfile"
|
594
|
+
method_option "normalize-platforms", type: :boolean, default: false, banner: "Normalize lockfile platforms"
|
595
|
+
method_option "patch", type: :boolean, banner: "If updating, prefer updating only to next patch version"
|
596
|
+
method_option "minor", type: :boolean, banner: "If updating, prefer updating only to next minor version"
|
597
|
+
method_option "major", type: :boolean, banner: "If updating, prefer updating to next major version (default)"
|
621
598
|
method_option "pre", type: :boolean, banner: "If updating, always choose the highest allowed version, regardless of prerelease status"
|
622
599
|
method_option "strict", type: :boolean, banner: "If updating, do not allow any gem to be updated past latest --patch | --minor | --major"
|
623
|
-
method_option "conservative", type: :boolean, banner:
|
600
|
+
method_option "conservative", type: :boolean, banner: "If updating, use bundle install conservative update behavior and do not allow shared dependencies to be updated"
|
624
601
|
method_option "bundler", type: :string, lazy_default: "> 0.a", banner: "Update the locked version of bundler"
|
625
602
|
def lock
|
626
603
|
require_relative "cli/lock"
|
@@ -633,17 +610,8 @@ module Bundler
|
|
633
610
|
end
|
634
611
|
|
635
612
|
desc "doctor [OPTIONS]", "Checks the bundle for common problems"
|
636
|
-
|
637
|
-
|
638
|
-
missing dependencies are detected, Bundler prints them and exits status 1.
|
639
|
-
Otherwise, Bundler prints a success message and exits with a status of 0.
|
640
|
-
D
|
641
|
-
method_option "gemfile", type: :string, banner: "Use the specified gemfile instead of Gemfile"
|
642
|
-
method_option "quiet", type: :boolean, banner: "Only output warnings and errors."
|
643
|
-
def doctor
|
644
|
-
require_relative "cli/doctor"
|
645
|
-
Doctor.new(options).run
|
646
|
-
end
|
613
|
+
require_relative "cli/doctor"
|
614
|
+
subcommand("doctor", Doctor)
|
647
615
|
|
648
616
|
desc "issue", "Learn how to report an issue in Bundler"
|
649
617
|
def issue
|
@@ -682,7 +650,6 @@ module Bundler
|
|
682
650
|
exec_used = args.index {|a| exec_commands.include? a }
|
683
651
|
|
684
652
|
command = args.find {|a| bundler_commands.include? a }
|
685
|
-
command = all_aliases[command] if all_aliases[command]
|
686
653
|
|
687
654
|
if exec_used && help_used
|
688
655
|
if exec_used + help_used == 1
|
@@ -735,26 +702,6 @@ module Bundler
|
|
735
702
|
|
736
703
|
private
|
737
704
|
|
738
|
-
# Automatically invoke `bundle install` and resume if
|
739
|
-
# Bundler.settings[:auto_install] exists. This is set through config cmd
|
740
|
-
# `bundle config set --global auto_install 1`.
|
741
|
-
#
|
742
|
-
# Note that this method `nil`s out the global Definition object, so it
|
743
|
-
# should be called first, before you instantiate anything like an
|
744
|
-
# `Installer` that'll keep a reference to the old one instead.
|
745
|
-
def auto_install
|
746
|
-
return unless Bundler.settings[:auto_install]
|
747
|
-
|
748
|
-
begin
|
749
|
-
Bundler.definition.specs
|
750
|
-
rescue GemNotFound, GitError
|
751
|
-
Bundler.ui.info "Automatically installing missing gems."
|
752
|
-
Bundler.reset!
|
753
|
-
invoke :install, []
|
754
|
-
Bundler.reset!
|
755
|
-
end
|
756
|
-
end
|
757
|
-
|
758
705
|
def current_command
|
759
706
|
_, _, config = @_initializer
|
760
707
|
config[:current_command]
|
@@ -766,14 +713,9 @@ module Bundler
|
|
766
713
|
command_name = cmd.name
|
767
714
|
return if PARSEABLE_COMMANDS.include?(command_name)
|
768
715
|
command = ["bundle", command_name] + args
|
769
|
-
|
770
|
-
options_to_print.delete_if do |k, v|
|
771
|
-
next unless o = cmd.options[k]
|
772
|
-
o.default == v
|
773
|
-
end
|
774
|
-
command << Thor::Options.to_switches(options_to_print.sort_by(&:first)).strip
|
716
|
+
command << Thor::Options.to_switches(options.sort_by(&:first)).strip
|
775
717
|
command.reject!(&:empty?)
|
776
|
-
Bundler.ui.info "Running `#{command * " "}` with bundler #{Bundler
|
718
|
+
Bundler.ui.info "Running `#{command * " "}` with bundler #{Bundler.verbose_version}"
|
777
719
|
end
|
778
720
|
|
779
721
|
def warn_on_outdated_bundler
|
@@ -784,13 +726,10 @@ module Bundler
|
|
784
726
|
|
785
727
|
return unless SharedHelpers.md5_available?
|
786
728
|
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
dependencies("bundler").
|
792
|
-
map {|d| Gem::Version.new(d.first) }.
|
793
|
-
max
|
729
|
+
require_relative "vendored_uri"
|
730
|
+
remote = Source::Rubygems::Remote.new(Gem::URI("https://rubygems.org"))
|
731
|
+
cache_path = Bundler.user_cache.join("compact_index", remote.cache_slug)
|
732
|
+
latest = Bundler::CompactIndexClient.new(cache_path).latest_version("bundler")
|
794
733
|
return unless latest
|
795
734
|
|
796
735
|
current = Gem::Version.new(VERSION)
|
@@ -803,30 +742,17 @@ module Bundler
|
|
803
742
|
nil
|
804
743
|
end
|
805
744
|
|
806
|
-
def
|
807
|
-
positive_name = name.gsub(/\Ano-/, "")
|
808
|
-
option = current_command.options[positive_name]
|
809
|
-
flag_name = "--no-" + option.switch_name.gsub(/\A--/, "")
|
810
|
-
|
811
|
-
flag_deprecation(positive_name, flag_name, option)
|
812
|
-
end
|
813
|
-
|
814
|
-
def remembered_flag_deprecation(name)
|
745
|
+
def remembered_flag_deprecation(name, negative: false, option_name: nil)
|
815
746
|
option = current_command.options[name]
|
816
747
|
flag_name = option.switch_name
|
817
|
-
|
818
|
-
|
819
|
-
end
|
820
|
-
|
821
|
-
def flag_deprecation(name, flag_name, option)
|
822
|
-
name_index = ARGV.find {|arg| flag_name == arg.split("=")[0] }
|
823
|
-
return unless name_index
|
748
|
+
flag_name = "--no-" + flag_name.gsub(/\A--/, "") if negative
|
749
|
+
return unless flag_passed?(flag_name)
|
824
750
|
|
825
751
|
value = options[name]
|
826
752
|
value = value.join(" ").to_s if option.type == :array
|
827
753
|
value = "'#{value}'" unless option.type == :boolean
|
828
754
|
|
829
|
-
print_remembered_flag_deprecation(flag_name, name.tr("-", "_"), value)
|
755
|
+
print_remembered_flag_deprecation(flag_name, option_name || name.tr("-", "_"), value)
|
830
756
|
end
|
831
757
|
|
832
758
|
def print_remembered_flag_deprecation(flag_name, option_name, option_value)
|
@@ -842,5 +768,9 @@ module Bundler
|
|
842
768
|
"#{option_value}`, and stop using this flag"
|
843
769
|
Bundler::SharedHelpers.major_deprecation 2, message, removed_message: removed_message
|
844
770
|
end
|
771
|
+
|
772
|
+
def flag_passed?(name)
|
773
|
+
ARGV.any? {|arg| name == arg.split("=")[0] }
|
774
|
+
end
|
845
775
|
end
|
846
776
|
end
|