rubygems-update 3.0.6 → 3.2.14
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/{History.txt → CHANGELOG.md} +1100 -436
- data/CODE_OF_CONDUCT.md +55 -19
- data/CONTRIBUTING.md +37 -10
- data/MAINTAINERS.txt +1 -6
- data/Manifest.txt +104 -64
- data/POLICIES.md +6 -12
- data/README.md +6 -6
- data/Rakefile +121 -111
- data/bin/gem +0 -6
- data/bin/update_rubygems +2 -2
- data/bundler/CHANGELOG.md +1788 -1251
- data/bundler/LICENSE.md +18 -19
- data/bundler/README.md +9 -10
- data/bundler/UPGRADING.md +215 -0
- data/bundler/bundler.gemspec +9 -26
- data/bundler/exe/bundle +22 -3
- data/bundler/lib/bundler.rb +233 -94
- data/bundler/lib/bundler/build_metadata.rb +5 -13
- data/bundler/lib/bundler/capistrano.rb +4 -4
- data/bundler/lib/bundler/cli.rb +221 -148
- data/bundler/lib/bundler/cli/add.rb +28 -16
- data/bundler/lib/bundler/cli/binstubs.rb +6 -2
- data/bundler/lib/bundler/cli/cache.rb +24 -17
- data/bundler/lib/bundler/cli/clean.rb +1 -1
- data/bundler/lib/bundler/cli/common.rb +25 -12
- data/bundler/lib/bundler/cli/config.rb +161 -86
- data/bundler/lib/bundler/cli/console.rb +1 -1
- data/bundler/lib/bundler/cli/doctor.rb +5 -5
- data/bundler/lib/bundler/cli/exec.rb +8 -20
- data/bundler/lib/bundler/cli/fund.rb +36 -0
- data/bundler/lib/bundler/cli/gem.rb +125 -32
- data/bundler/lib/bundler/cli/info.rb +29 -6
- data/bundler/lib/bundler/cli/init.rb +2 -2
- data/bundler/lib/bundler/cli/inject.rb +1 -1
- data/bundler/lib/bundler/cli/install.rb +27 -23
- data/bundler/lib/bundler/cli/issue.rb +5 -5
- data/bundler/lib/bundler/cli/list.rb +12 -10
- data/bundler/lib/bundler/cli/open.rb +10 -6
- data/bundler/lib/bundler/cli/outdated.rb +134 -109
- data/bundler/lib/bundler/cli/plugin.rb +19 -2
- data/bundler/lib/bundler/cli/pristine.rb +6 -1
- data/bundler/lib/bundler/cli/show.rb +2 -2
- data/bundler/lib/bundler/cli/update.rb +34 -12
- data/bundler/lib/bundler/compact_index_client.rb +26 -10
- data/bundler/lib/bundler/compact_index_client/cache.rb +6 -14
- data/bundler/lib/bundler/compact_index_client/gem_parser.rb +28 -0
- data/bundler/lib/bundler/compact_index_client/updater.rb +8 -20
- data/bundler/lib/bundler/current_ruby.rb +9 -7
- data/bundler/lib/bundler/definition.rb +133 -132
- data/bundler/lib/bundler/dep_proxy.rb +16 -9
- data/bundler/lib/bundler/dependency.rb +19 -14
- data/bundler/lib/bundler/deployment.rb +1 -1
- data/bundler/lib/bundler/dsl.rb +54 -71
- data/bundler/lib/bundler/endpoint_specification.rb +1 -1
- data/bundler/lib/bundler/env.rb +9 -14
- data/bundler/lib/bundler/environment_preserver.rb +26 -3
- data/bundler/lib/bundler/errors.rb +1 -0
- data/bundler/lib/bundler/feature_flag.rb +19 -34
- data/bundler/lib/bundler/fetcher.rb +19 -16
- data/bundler/lib/bundler/fetcher/base.rb +1 -1
- data/bundler/lib/bundler/fetcher/compact_index.rb +27 -13
- data/bundler/lib/bundler/fetcher/dependency.rb +1 -1
- data/bundler/lib/bundler/fetcher/downloader.rb +6 -3
- data/bundler/lib/bundler/fetcher/index.rb +8 -7
- data/bundler/lib/bundler/friendly_errors.rb +27 -19
- data/bundler/lib/bundler/gem_helper.rb +68 -37
- data/bundler/lib/bundler/gem_helpers.rb +38 -29
- data/bundler/lib/bundler/gem_tasks.rb +1 -1
- data/bundler/lib/bundler/gem_version_promoter.rb +5 -5
- data/bundler/lib/bundler/graph.rb +3 -3
- data/bundler/lib/bundler/index.rb +12 -7
- data/bundler/lib/bundler/injector.rb +32 -12
- data/bundler/lib/bundler/inline.rb +41 -30
- data/bundler/lib/bundler/installer.rb +41 -60
- data/bundler/lib/bundler/installer/gem_installer.rb +8 -4
- data/bundler/lib/bundler/installer/parallel_installer.rb +20 -26
- data/bundler/lib/bundler/installer/standalone.rb +18 -4
- data/bundler/lib/bundler/lazy_specification.rb +41 -27
- data/bundler/lib/bundler/lockfile_generator.rb +1 -1
- data/bundler/lib/bundler/lockfile_parser.rb +16 -33
- data/bundler/lib/bundler/{ssl_certs → man}/.document +0 -0
- data/bundler/lib/bundler/man/bundle-add.1 +66 -0
- data/bundler/{man/bundle-add.ronn → lib/bundler/man/bundle-add.1.ronn} +7 -1
- data/bundler/lib/bundler/man/bundle-binstubs.1 +42 -0
- data/bundler/{man/bundle-binstubs.ronn → lib/bundler/man/bundle-binstubs.1.ronn} +3 -5
- data/bundler/lib/bundler/man/bundle-cache.1 +55 -0
- data/bundler/{man/bundle-package.ronn → lib/bundler/man/bundle-cache.1.ronn} +15 -15
- data/bundler/lib/bundler/man/bundle-check.1 +31 -0
- data/bundler/{man/bundle-check.ronn → lib/bundler/man/bundle-check.1.ronn} +0 -0
- data/bundler/lib/bundler/man/bundle-clean.1 +24 -0
- data/bundler/{man/bundle-clean.ronn → lib/bundler/man/bundle-clean.1.ronn} +0 -0
- data/bundler/lib/bundler/man/bundle-config.1 +488 -0
- data/bundler/{man/bundle-config.ronn → lib/bundler/man/bundle-config.1.ronn} +59 -67
- data/bundler/lib/bundler/man/bundle-doctor.1 +44 -0
- data/bundler/{man/bundle-doctor.ronn → lib/bundler/man/bundle-doctor.1.ronn} +0 -0
- data/bundler/lib/bundler/man/bundle-exec.1 +165 -0
- data/bundler/{man/bundle-exec.ronn → lib/bundler/man/bundle-exec.1.ronn} +1 -1
- data/bundler/lib/bundler/man/bundle-gem.1 +102 -0
- data/bundler/{man/bundle-gem.ronn → lib/bundler/man/bundle-gem.1.ronn} +30 -7
- data/bundler/lib/bundler/man/bundle-info.1 +20 -0
- data/bundler/{man/bundle-info.ronn → lib/bundler/man/bundle-info.1.ronn} +0 -0
- data/bundler/lib/bundler/man/bundle-init.1 +25 -0
- data/bundler/{man/bundle-init.ronn → lib/bundler/man/bundle-init.1.ronn} +1 -1
- data/bundler/lib/bundler/man/bundle-inject.1 +33 -0
- data/bundler/{man/bundle-inject.ronn → lib/bundler/man/bundle-inject.1.ronn} +0 -0
- data/bundler/lib/bundler/man/bundle-install.1 +338 -0
- data/bundler/{man/bundle-install.ronn → lib/bundler/man/bundle-install.1.ronn} +34 -7
- data/bundler/lib/bundler/man/bundle-list.1 +50 -0
- data/bundler/{man/bundle-list.ronn → lib/bundler/man/bundle-list.1.ronn} +6 -6
- data/bundler/lib/bundler/man/bundle-lock.1 +84 -0
- data/bundler/{man/bundle-lock.ronn → lib/bundler/man/bundle-lock.1.ronn} +0 -0
- data/bundler/lib/bundler/man/bundle-open.1 +32 -0
- data/bundler/{man/bundle-open.ronn → lib/bundler/man/bundle-open.1.ronn} +0 -0
- data/bundler/lib/bundler/man/bundle-outdated.1 +155 -0
- data/bundler/{man/bundle-outdated.ronn → lib/bundler/man/bundle-outdated.1.ronn} +0 -0
- data/bundler/lib/bundler/man/bundle-platform.1 +61 -0
- data/bundler/{man/bundle-platform.ronn → lib/bundler/man/bundle-platform.1.ronn} +0 -0
- data/bundler/lib/bundler/man/bundle-pristine.1 +34 -0
- data/bundler/{man/bundle-pristine.ronn → lib/bundler/man/bundle-pristine.1.ronn} +0 -0
- data/bundler/lib/bundler/man/bundle-remove.1 +31 -0
- data/bundler/{man/bundle-remove.ronn → lib/bundler/man/bundle-remove.1.ronn} +0 -0
- data/bundler/lib/bundler/man/bundle-show.1 +23 -0
- data/bundler/{man/bundle-show.ronn → lib/bundler/man/bundle-show.1.ronn} +0 -0
- data/bundler/lib/bundler/man/bundle-update.1 +394 -0
- data/bundler/{man/bundle-update.ronn → lib/bundler/man/bundle-update.1.ronn} +3 -3
- data/bundler/lib/bundler/man/bundle-viz.1 +39 -0
- data/bundler/{man/bundle-viz.ronn → lib/bundler/man/bundle-viz.1.ronn} +0 -0
- data/bundler/lib/bundler/man/bundle.1 +136 -0
- data/bundler/{man/bundle.ronn → lib/bundler/man/bundle.1.ronn} +2 -2
- data/bundler/lib/bundler/man/gemfile.5 +686 -0
- data/bundler/{man → lib/bundler/man}/gemfile.5.ronn +16 -20
- data/bundler/lib/bundler/man/index.txt +25 -0
- data/bundler/lib/bundler/match_platform.rb +1 -1
- data/bundler/lib/bundler/mirror.rb +5 -5
- data/bundler/lib/bundler/plugin.rb +75 -36
- data/bundler/lib/bundler/plugin/api.rb +1 -1
- data/bundler/lib/bundler/plugin/api/source.rb +12 -7
- data/bundler/lib/bundler/plugin/dsl.rb +1 -1
- data/bundler/lib/bundler/plugin/index.rb +24 -4
- data/bundler/lib/bundler/plugin/installer.rb +33 -22
- data/bundler/lib/bundler/plugin/installer/rubygems.rb +1 -1
- data/bundler/lib/bundler/plugin/source_list.rb +5 -1
- data/bundler/lib/bundler/psyched_yaml.rb +0 -15
- data/bundler/lib/bundler/remote_specification.rb +5 -4
- data/bundler/lib/bundler/resolver.rb +191 -87
- data/bundler/lib/bundler/resolver/spec_group.rb +76 -48
- data/bundler/lib/bundler/retry.rb +3 -3
- data/bundler/lib/bundler/ruby_version.rb +5 -20
- data/bundler/lib/bundler/rubygems_ext.rb +76 -72
- data/bundler/lib/bundler/rubygems_gem_installer.rb +47 -13
- data/bundler/lib/bundler/rubygems_integration.rb +159 -444
- data/bundler/lib/bundler/runtime.rb +6 -23
- data/bundler/lib/bundler/settings.rb +67 -93
- data/bundler/lib/bundler/setup.rb +11 -12
- data/bundler/lib/bundler/shared_helpers.rb +54 -80
- data/bundler/lib/bundler/similarity_detector.rb +3 -3
- data/bundler/lib/bundler/source.rb +12 -6
- data/bundler/lib/bundler/source/git.rb +47 -38
- data/bundler/lib/bundler/source/git/git_proxy.rb +101 -102
- data/bundler/lib/bundler/source/metadata.rb +7 -6
- data/bundler/lib/bundler/source/path.rb +20 -11
- data/bundler/lib/bundler/source/path/installer.rb +10 -10
- data/bundler/lib/bundler/source/rubygems.rb +56 -29
- data/bundler/lib/bundler/source/rubygems/remote.rb +3 -4
- data/bundler/lib/bundler/source_list.rb +32 -30
- data/bundler/lib/bundler/spec_set.rb +37 -25
- data/bundler/lib/bundler/stub_specification.rb +40 -34
- data/bundler/lib/bundler/templates/Executable.bundler +23 -14
- data/bundler/lib/bundler/templates/newgem/CHANGELOG.md.tt +5 -0
- data/bundler/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +57 -47
- data/bundler/lib/bundler/templates/newgem/Gemfile.tt +16 -2
- data/bundler/lib/bundler/templates/newgem/README.md.tt +7 -5
- data/bundler/lib/bundler/templates/newgem/Rakefile.tt +19 -5
- data/bundler/lib/bundler/templates/newgem/bin/console.tt +1 -0
- data/bundler/lib/bundler/templates/newgem/circleci/config.yml.tt +13 -0
- data/bundler/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt +2 -0
- data/bundler/lib/bundler/templates/newgem/github/workflows/main.yml.tt +18 -0
- data/bundler/lib/bundler/templates/newgem/gitlab-ci.yml.tt +9 -0
- data/bundler/lib/bundler/templates/newgem/lib/newgem.rb.tt +4 -2
- data/bundler/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +2 -0
- data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +18 -31
- data/bundler/lib/bundler/templates/newgem/rubocop.yml.tt +13 -0
- data/bundler/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +2 -0
- data/bundler/lib/bundler/templates/newgem/spec/spec_helper.rb.tt +2 -1
- data/bundler/lib/bundler/templates/newgem/test/{newgem_test.rb.tt → minitest/newgem_test.rb.tt} +2 -0
- data/bundler/lib/bundler/templates/newgem/test/minitest/test_helper.rb.tt +6 -0
- data/bundler/lib/bundler/templates/newgem/test/test-unit/newgem_test.rb.tt +15 -0
- data/bundler/lib/bundler/templates/newgem/test/test-unit/test_helper.rb.tt +6 -0
- data/bundler/lib/bundler/templates/newgem/travis.yml.tt +0 -1
- data/bundler/lib/bundler/ui.rb +3 -3
- data/bundler/lib/bundler/ui/rg_proxy.rb +1 -1
- data/bundler/lib/bundler/ui/shell.rb +7 -11
- data/bundler/lib/bundler/uri_credentials_filter.rb +10 -4
- data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +161 -0
- data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/monotonic_time.rb +66 -0
- data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +176 -0
- data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +3 -0
- data/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb +273 -147
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo.rb +5 -6
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +7 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +36 -4
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +1 -1
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +1 -1
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +1 -1
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +1 -1
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb +6 -6
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb +1 -1
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +3 -3
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +39 -11
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +4 -4
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +1 -1
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +11 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +53 -51
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb +2 -2
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +302 -462
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb +40 -0
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb +53 -0
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb +79 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor.rb +16 -9
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions.rb +28 -13
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb +3 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/directory.rb +7 -17
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +20 -9
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +19 -8
- data/bundler/lib/bundler/vendor/thor/lib/thor/base.rb +63 -43
- data/bundler/lib/bundler/vendor/thor/lib/thor/command.rb +21 -14
- data/bundler/lib/bundler/vendor/thor/lib/thor/error.rb +78 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/group.rb +3 -3
- data/bundler/lib/bundler/vendor/thor/lib/thor/invocation.rb +1 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/line_editor.rb +2 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/line_editor/readline.rb +6 -6
- data/bundler/lib/bundler/vendor/thor/lib/thor/nested_context.rb +29 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser.rb +4 -4
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +7 -3
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/option.rb +20 -7
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/options.rb +21 -5
- data/bundler/lib/bundler/vendor/thor/lib/thor/rake_compat.rb +1 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/runner.rb +15 -14
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell.rb +4 -4
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +65 -8
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/color.rb +10 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/html.rb +3 -3
- data/bundler/lib/bundler/vendor/thor/lib/thor/util.rb +18 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
- data/bundler/lib/bundler/vendor/tmpdir/lib/tmpdir.rb +154 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri.rb +104 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/common.rb +744 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/file.rb +94 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/ftp.rb +267 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/generic.rb +1568 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/http.rb +88 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/https.rb +23 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/ldap.rb +261 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/ldaps.rb +21 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/mailto.rb +294 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +546 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +125 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/version.rb +6 -0
- data/bundler/lib/bundler/vendored_fileutils.rb +1 -6
- data/bundler/lib/bundler/vendored_molinillo.rb +1 -1
- data/bundler/lib/bundler/vendored_persistent.rb +7 -12
- data/bundler/lib/bundler/vendored_thor.rb +2 -2
- data/bundler/lib/bundler/vendored_tmpdir.rb +4 -0
- data/bundler/lib/bundler/vendored_uri.rb +4 -0
- data/bundler/lib/bundler/version.rb +1 -20
- data/bundler/lib/bundler/version_ranges.rb +51 -5
- data/bundler/lib/bundler/vlad.rb +2 -2
- data/bundler/lib/bundler/worker.rb +2 -4
- data/bundler/lib/bundler/yaml_serializer.rb +3 -4
- data/lib/rubygems.rb +198 -222
- data/lib/rubygems/available_set.rb +4 -5
- data/lib/rubygems/basic_specification.rb +32 -19
- data/lib/rubygems/bundler_version_finder.rb +19 -9
- data/lib/rubygems/command.rb +73 -21
- data/lib/rubygems/command_manager.rb +5 -12
- data/lib/rubygems/commands/build_command.rb +51 -18
- data/lib/rubygems/commands/cert_command.rb +2 -11
- data/lib/rubygems/commands/check_command.rb +0 -2
- data/lib/rubygems/commands/cleanup_command.rb +17 -13
- data/lib/rubygems/commands/contents_command.rb +7 -9
- data/lib/rubygems/commands/dependency_command.rb +9 -10
- data/lib/rubygems/commands/environment_command.rb +1 -6
- data/lib/rubygems/commands/fetch_command.rb +2 -4
- data/lib/rubygems/commands/generate_index_command.rb +3 -2
- data/lib/rubygems/commands/help_command.rb +4 -4
- data/lib/rubygems/commands/info_command.rb +9 -4
- data/lib/rubygems/commands/install_command.rb +12 -54
- data/lib/rubygems/commands/list_command.rb +8 -7
- data/lib/rubygems/commands/lock_command.rb +3 -5
- data/lib/rubygems/commands/mirror_command.rb +0 -1
- data/lib/rubygems/commands/open_command.rb +1 -4
- data/lib/rubygems/commands/outdated_command.rb +0 -1
- data/lib/rubygems/commands/owner_command.rb +10 -10
- data/lib/rubygems/commands/pristine_command.rb +13 -9
- data/lib/rubygems/commands/push_command.rb +12 -51
- data/lib/rubygems/commands/query_command.rb +14 -330
- data/lib/rubygems/commands/rdoc_command.rb +0 -1
- data/lib/rubygems/commands/search_command.rb +7 -7
- data/lib/rubygems/commands/server_command.rb +3 -1
- data/lib/rubygems/commands/setup_command.rb +143 -101
- data/lib/rubygems/commands/signin_command.rb +0 -1
- data/lib/rubygems/commands/signout_command.rb +0 -2
- data/lib/rubygems/commands/sources_command.rb +22 -6
- data/lib/rubygems/commands/specification_command.rb +8 -3
- data/lib/rubygems/commands/stale_command.rb +1 -1
- data/lib/rubygems/commands/uninstall_command.rb +2 -3
- data/lib/rubygems/commands/unpack_command.rb +3 -32
- data/lib/rubygems/commands/update_command.rb +73 -28
- data/lib/rubygems/commands/which_command.rb +0 -1
- data/lib/rubygems/commands/yank_command.rb +10 -7
- data/lib/rubygems/compatibility.rb +4 -4
- data/lib/rubygems/config_file.rb +48 -27
- data/lib/rubygems/core_ext/kernel_gem.rb +7 -6
- data/lib/rubygems/core_ext/kernel_require.rb +44 -6
- data/lib/rubygems/core_ext/kernel_warn.rb +22 -13
- data/lib/rubygems/core_ext/tcpsocket_init.rb +52 -0
- data/lib/rubygems/defaults.rb +110 -23
- data/lib/rubygems/dependency.rb +28 -14
- data/lib/rubygems/dependency_installer.rb +11 -166
- data/lib/rubygems/dependency_list.rb +17 -18
- data/lib/rubygems/deprecate.rb +51 -6
- data/lib/rubygems/doctor.rb +4 -4
- data/lib/rubygems/errors.rb +5 -7
- data/lib/rubygems/exceptions.rb +2 -24
- data/lib/rubygems/ext.rb +6 -6
- data/lib/rubygems/ext/build_error.rb +2 -0
- data/lib/rubygems/ext/builder.rb +45 -82
- data/lib/rubygems/ext/cmake_builder.rb +6 -7
- data/lib/rubygems/ext/configure_builder.rb +5 -8
- data/lib/rubygems/ext/ext_conf_builder.rb +27 -23
- data/lib/rubygems/ext/rake_builder.rb +4 -6
- data/lib/rubygems/gem_runner.rb +3 -10
- data/lib/rubygems/gemcutter_utilities.rb +111 -37
- data/lib/rubygems/indexer.rb +9 -26
- data/lib/rubygems/install_update_options.rb +7 -7
- data/lib/rubygems/installer.rb +91 -98
- data/lib/rubygems/installer_test_case.rb +104 -42
- data/lib/rubygems/installer_uninstaller_utils.rb +29 -0
- data/lib/rubygems/local_remote_options.rb +1 -1
- data/lib/rubygems/mock_gem_ui.rb +1 -4
- data/lib/rubygems/name_tuple.rb +4 -7
- data/lib/rubygems/openssl.rb +7 -0
- data/lib/rubygems/package.rb +49 -32
- data/lib/rubygems/package/digest_io.rb +0 -2
- data/lib/rubygems/package/file_source.rb +0 -2
- data/lib/rubygems/package/io_source.rb +0 -2
- data/lib/rubygems/package/old.rb +1 -3
- data/lib/rubygems/package/tar_header.rb +4 -6
- data/lib/rubygems/package/tar_reader.rb +15 -12
- data/lib/rubygems/package/tar_reader/entry.rb +0 -3
- data/lib/rubygems/package/tar_test_case.rb +2 -4
- data/lib/rubygems/package/tar_writer.rb +6 -16
- data/lib/rubygems/package_task.rb +1 -7
- data/lib/rubygems/path_support.rb +2 -2
- data/lib/rubygems/platform.rb +22 -16
- data/lib/rubygems/query_utils.rb +353 -0
- data/lib/rubygems/rdoc.rb +0 -12
- data/lib/rubygems/remote_fetcher.rb +33 -59
- data/lib/rubygems/request.rb +11 -14
- data/lib/rubygems/request/connection_pools.rb +3 -7
- data/lib/rubygems/request/http_pool.rb +0 -1
- data/lib/rubygems/request_set.rb +10 -23
- data/lib/rubygems/request_set/gem_dependency_api.rb +9 -11
- data/lib/rubygems/request_set/lockfile.rb +13 -12
- data/lib/rubygems/request_set/lockfile/parser.rb +2 -2
- data/lib/rubygems/request_set/lockfile/tokenizer.rb +1 -1
- data/lib/rubygems/requirement.rb +36 -35
- data/lib/rubygems/resolver.rb +20 -16
- data/lib/rubygems/resolver/activation_request.rb +27 -51
- data/lib/rubygems/resolver/api_set.rb +31 -24
- data/lib/rubygems/resolver/api_set/gem_parser.rb +20 -0
- data/lib/rubygems/resolver/api_specification.rb +24 -10
- data/lib/rubygems/resolver/best_set.rb +4 -6
- data/lib/rubygems/resolver/composed_set.rb +3 -5
- data/lib/rubygems/resolver/conflict.rb +2 -9
- data/lib/rubygems/resolver/current_set.rb +0 -2
- data/lib/rubygems/resolver/dependency_request.rb +1 -3
- data/lib/rubygems/resolver/git_set.rb +0 -2
- data/lib/rubygems/resolver/git_specification.rb +0 -2
- data/lib/rubygems/resolver/index_set.rb +1 -3
- data/lib/rubygems/resolver/index_specification.rb +32 -2
- data/lib/rubygems/resolver/installed_specification.rb +0 -2
- data/lib/rubygems/resolver/installer_set.rb +63 -16
- data/lib/rubygems/resolver/local_specification.rb +0 -2
- data/lib/rubygems/resolver/lock_set.rb +3 -5
- data/lib/rubygems/resolver/lock_specification.rb +2 -4
- data/lib/rubygems/resolver/molinillo/lib/molinillo.rb +6 -5
- data/lib/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb +7 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb +8 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb +39 -6
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/action.rb +1 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +2 -1
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +2 -1
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +2 -1
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +2 -1
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb +7 -6
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/set_payload.rb +2 -1
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/tag.rb +4 -3
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb +51 -12
- data/lib/rubygems/resolver/molinillo/lib/molinillo/errors.rb +76 -8
- data/lib/rubygems/resolver/molinillo/lib/molinillo/gem_metadata.rb +2 -1
- data/lib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb +12 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/modules/ui.rb +3 -1
- data/lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb +510 -165
- data/lib/rubygems/resolver/molinillo/lib/molinillo/resolver.rb +3 -2
- data/lib/rubygems/resolver/molinillo/lib/molinillo/state.rb +8 -4
- data/lib/rubygems/resolver/requirement_list.rb +0 -1
- data/lib/rubygems/resolver/set.rb +0 -2
- data/lib/rubygems/resolver/source_set.rb +0 -2
- data/lib/rubygems/resolver/spec_specification.rb +14 -2
- data/lib/rubygems/resolver/specification.rb +13 -2
- data/lib/rubygems/resolver/vendor_set.rb +0 -2
- data/lib/rubygems/resolver/vendor_specification.rb +0 -2
- data/lib/rubygems/s3_uri_signer.rb +15 -13
- data/lib/rubygems/safe_yaml.rb +4 -4
- data/lib/rubygems/security.rb +27 -34
- data/lib/rubygems/security/policy.rb +4 -8
- data/lib/rubygems/security/signer.rb +8 -9
- data/lib/rubygems/security/trust_dir.rb +1 -3
- data/lib/rubygems/server.rb +20 -16
- data/lib/rubygems/source.rb +30 -13
- data/lib/rubygems/source/git.rb +7 -8
- data/lib/rubygems/source/installed.rb +0 -2
- data/lib/rubygems/source/local.rb +2 -4
- data/lib/rubygems/source/lock.rb +0 -2
- data/lib/rubygems/source/specific_file.rb +0 -2
- data/lib/rubygems/source/vendor.rb +0 -2
- data/lib/rubygems/source_list.rb +6 -6
- data/lib/rubygems/spec_fetcher.rb +22 -34
- data/lib/rubygems/specification.rb +207 -278
- data/lib/rubygems/specification_policy.rb +135 -57
- data/{bundler/lib/bundler/ssl_certs/index.rubygems.org → lib/rubygems/ssl_certs/rubygems.org}/GlobalSignRootCA.pem +0 -0
- data/lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA_R3.pem +21 -0
- data/lib/rubygems/stub_specification.rb +4 -5
- data/lib/rubygems/test_case.rb +221 -341
- data/lib/rubygems/test_utilities.rb +22 -18
- data/lib/rubygems/text.rb +2 -3
- data/lib/rubygems/uninstaller.rb +49 -30
- data/lib/rubygems/uri_formatter.rb +2 -4
- data/lib/rubygems/uri_parser.rb +34 -0
- data/lib/rubygems/uri_parsing.rb +23 -0
- data/lib/rubygems/user_interaction.rb +3 -20
- data/lib/rubygems/util.rb +20 -44
- data/lib/rubygems/util/licenses.rb +400 -400
- data/lib/rubygems/validator.rb +9 -31
- data/lib/rubygems/version.rb +29 -21
- data/lib/rubygems/version_option.rb +6 -0
- data/rubygems-update.gemspec +4 -11
- data/setup.rb +2 -7
- data/test/rubygems/data/null-required-ruby-version.gemspec.rz +0 -0
- data/test/rubygems/data/null-required-rubygems-version.gemspec.rz +0 -0
- data/test/rubygems/rubygems/commands/crash_command.rb +0 -2
- data/test/rubygems/rubygems_plugin.rb +0 -2
- data/test/rubygems/specifications/bar-0.0.2.gemspec +0 -2
- data/test/rubygems/specifications/rubyforge-0.0.1.gemspec +12 -0
- data/test/rubygems/test_bundled_ca.rb +42 -45
- data/test/rubygems/test_config.rb +0 -2
- data/test/rubygems/test_deprecate.rb +41 -5
- data/test/rubygems/test_gem.rb +405 -236
- data/test/rubygems/test_gem_available_set.rb +5 -6
- data/test/rubygems/test_gem_bundler_version_finder.rb +20 -2
- data/test/rubygems/test_gem_command.rb +144 -9
- data/test/rubygems/test_gem_command_manager.rb +40 -17
- data/test/rubygems/test_gem_commands_build_command.rb +386 -13
- data/test/rubygems/test_gem_commands_cert_command.rb +18 -6
- data/test/rubygems/test_gem_commands_check_command.rb +0 -2
- data/test/rubygems/test_gem_commands_cleanup_command.rb +35 -10
- data/test/rubygems/test_gem_commands_contents_command.rb +50 -19
- data/test/rubygems/test_gem_commands_dependency_command.rb +1 -3
- data/test/rubygems/test_gem_commands_environment_command.rb +21 -33
- data/test/rubygems/test_gem_commands_fetch_command.rb +0 -2
- data/test/rubygems/test_gem_commands_generate_index_command.rb +32 -2
- data/test/rubygems/test_gem_commands_help_command.rb +16 -8
- data/test/rubygems/test_gem_commands_info_command.rb +6 -7
- data/test/rubygems/test_gem_commands_install_command.rb +368 -34
- data/test/rubygems/test_gem_commands_list_command.rb +0 -2
- data/test/rubygems/test_gem_commands_lock_command.rb +0 -2
- data/test/rubygems/test_gem_commands_mirror.rb +1 -2
- data/test/rubygems/test_gem_commands_open_command.rb +4 -6
- data/test/rubygems/test_gem_commands_outdated_command.rb +18 -1
- data/test/rubygems/test_gem_commands_owner_command.rb +62 -9
- data/test/rubygems/test_gem_commands_pristine_command.rb +148 -16
- data/test/rubygems/test_gem_commands_push_command.rb +94 -21
- data/test/rubygems/test_gem_commands_query_command.rb +35 -10
- data/test/rubygems/test_gem_commands_search_command.rb +0 -2
- data/test/rubygems/test_gem_commands_server_command.rb +6 -4
- data/test/rubygems/test_gem_commands_setup_command.rb +228 -128
- data/test/rubygems/test_gem_commands_signin_command.rb +36 -11
- data/test/rubygems/test_gem_commands_signout_command.rb +0 -7
- data/test/rubygems/test_gem_commands_sources_command.rb +193 -9
- data/test/rubygems/test_gem_commands_specification_command.rb +46 -20
- data/test/rubygems/test_gem_commands_stale_command.rb +0 -2
- data/test/rubygems/test_gem_commands_uninstall_command.rb +108 -52
- data/test/rubygems/test_gem_commands_unpack_command.rb +0 -2
- data/test/rubygems/test_gem_commands_update_command.rb +201 -29
- data/test/rubygems/test_gem_commands_which_command.rb +3 -5
- data/test/rubygems/test_gem_commands_yank_command.rb +86 -5
- data/test/rubygems/test_gem_config_file.rb +25 -13
- data/test/rubygems/test_gem_dependency.rb +6 -2
- data/test/rubygems/test_gem_dependency_installer.rb +169 -252
- data/test/rubygems/test_gem_dependency_list.rb +31 -26
- data/test/rubygems/test_gem_dependency_resolution_error.rb +1 -3
- data/test/rubygems/test_gem_doctor.rb +28 -2
- data/test/rubygems/test_gem_ext_builder.rb +51 -44
- data/test/rubygems/test_gem_ext_cmake_builder.rb +16 -23
- data/test/rubygems/test_gem_ext_configure_builder.rb +6 -14
- data/test/rubygems/test_gem_ext_ext_conf_builder.rb +21 -29
- data/test/rubygems/test_gem_ext_rake_builder.rb +39 -22
- data/test/rubygems/test_gem_gem_runner.rb +47 -2
- data/test/rubygems/test_gem_gemcutter_utilities.rb +16 -13
- data/test/rubygems/test_gem_impossible_dependencies_error.rb +0 -2
- data/test/rubygems/test_gem_indexer.rb +40 -55
- data/test/rubygems/test_gem_install_update_options.rb +45 -21
- data/test/rubygems/test_gem_installer.rb +661 -338
- data/test/rubygems/test_gem_local_remote_options.rb +0 -2
- data/test/rubygems/test_gem_name_tuple.rb +0 -2
- data/test/rubygems/test_gem_package.rb +132 -45
- data/test/rubygems/test_gem_package_old.rb +56 -55
- data/test/rubygems/test_gem_package_tar_header.rb +18 -1
- data/test/rubygems/test_gem_package_tar_reader.rb +0 -2
- data/test/rubygems/test_gem_package_tar_reader_entry.rb +6 -7
- data/test/rubygems/test_gem_package_tar_writer.rb +20 -12
- data/test/rubygems/test_gem_package_task.rb +46 -13
- data/test/rubygems/test_gem_path_support.rb +17 -13
- data/test/rubygems/test_gem_platform.rb +74 -7
- data/test/rubygems/test_gem_rdoc.rb +0 -1
- data/test/rubygems/test_gem_remote_fetcher.rb +223 -209
- data/test/rubygems/test_gem_request.rb +30 -19
- data/test/rubygems/test_gem_request_connection_pools.rb +2 -2
- data/test/rubygems/test_gem_request_set.rb +104 -29
- data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +4 -6
- data/test/rubygems/test_gem_request_set_lockfile.rb +4 -5
- data/test/rubygems/test_gem_request_set_lockfile_parser.rb +9 -10
- data/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb +118 -118
- data/test/rubygems/test_gem_requirement.rb +50 -4
- data/test/rubygems/test_gem_resolver.rb +73 -31
- data/test/rubygems/test_gem_resolver_activation_request.rb +3 -34
- data/test/rubygems/test_gem_resolver_api_set.rb +60 -59
- data/test/rubygems/test_gem_resolver_api_specification.rb +3 -5
- data/test/rubygems/test_gem_resolver_best_set.rb +27 -6
- data/test/rubygems/test_gem_resolver_composed_set.rb +0 -2
- data/test/rubygems/test_gem_resolver_conflict.rb +1 -7
- data/test/rubygems/test_gem_resolver_dependency_request.rb +0 -2
- data/test/rubygems/test_gem_resolver_git_set.rb +0 -2
- data/test/rubygems/test_gem_resolver_git_specification.rb +1 -2
- data/test/rubygems/test_gem_resolver_index_set.rb +2 -4
- data/test/rubygems/test_gem_resolver_index_specification.rb +7 -4
- data/test/rubygems/test_gem_resolver_installed_specification.rb +0 -3
- data/test/rubygems/test_gem_resolver_installer_set.rb +10 -10
- data/test/rubygems/test_gem_resolver_local_specification.rb +0 -2
- data/test/rubygems/test_gem_resolver_lock_set.rb +3 -5
- data/test/rubygems/test_gem_resolver_lock_specification.rb +0 -2
- data/test/rubygems/test_gem_resolver_requirement_list.rb +0 -2
- data/test/rubygems/test_gem_resolver_specification.rb +0 -2
- data/test/rubygems/test_gem_resolver_vendor_set.rb +1 -3
- data/test/rubygems/test_gem_resolver_vendor_specification.rb +0 -2
- data/test/rubygems/test_gem_security.rb +27 -25
- data/test/rubygems/test_gem_security_policy.rb +7 -12
- data/test/rubygems/test_gem_security_signer.rb +11 -12
- data/test/rubygems/test_gem_security_trust_dir.rb +4 -6
- data/test/rubygems/test_gem_server.rb +13 -12
- data/test/rubygems/test_gem_silent_ui.rb +0 -1
- data/test/rubygems/test_gem_source.rb +32 -17
- data/test/rubygems/test_gem_source_fetch_problem.rb +0 -1
- data/test/rubygems/test_gem_source_git.rb +12 -18
- data/test/rubygems/test_gem_source_installed.rb +11 -13
- data/test/rubygems/test_gem_source_list.rb +1 -1
- data/test/rubygems/test_gem_source_local.rb +8 -9
- data/test/rubygems/test_gem_source_lock.rb +17 -19
- data/test/rubygems/test_gem_source_specific_file.rb +9 -10
- data/test/rubygems/test_gem_source_subpath_problem.rb +49 -0
- data/test/rubygems/test_gem_source_vendor.rb +7 -9
- data/test/rubygems/test_gem_spec_fetcher.rb +11 -4
- data/test/rubygems/test_gem_specification.rb +363 -245
- data/test/rubygems/test_gem_stream_ui.rb +3 -1
- data/test/rubygems/test_gem_stub_specification.rb +6 -7
- data/test/rubygems/test_gem_text.rb +1 -2
- data/test/rubygems/test_gem_uninstaller.rb +165 -22
- data/test/rubygems/test_gem_unsatisfiable_dependency_error.rb +0 -2
- data/test/rubygems/test_gem_uri_formatter.rb +0 -2
- data/test/rubygems/test_gem_util.rb +17 -15
- data/test/rubygems/test_gem_validator.rb +4 -7
- data/test/rubygems/test_gem_version.rb +23 -10
- data/test/rubygems/test_gem_version_option.rb +1 -3
- data/test/rubygems/test_kernel.rb +25 -9
- data/test/rubygems/test_project_sanity.rb +20 -0
- data/test/rubygems/test_remote_fetch_error.rb +1 -2
- data/test/rubygems/test_require.rb +394 -56
- data/test/test_changelog_generator.rb +17 -0
- metadata +109 -155
- data/.rubocop.yml +0 -67
- data/.travis.yml +0 -38
- data/appveyor.yml +0 -43
- data/bundler/CODE_OF_CONDUCT.md +0 -42
- data/bundler/CONTRIBUTING.md +0 -17
- data/bundler/exe/bundle_ruby +0 -60
- data/bundler/lib/bundler/cli/package.rb +0 -49
- data/bundler/lib/bundler/compatibility_guard.rb +0 -14
- data/bundler/lib/bundler/gem_remote_fetcher.rb +0 -43
- data/bundler/lib/bundler/ssl_certs/certificate_manager.rb +0 -66
- data/bundler/lib/bundler/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem +0 -23
- data/bundler/lib/bundler/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem +0 -25
- data/bundler/lib/bundler/templates/newgem/test/test_helper.rb.tt +0 -4
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/compatibility.rb +0 -26
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/faster.rb +0 -27
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/ssl_reuse.rb +0 -129
- data/bundler/lib/bundler/vendor/thor/lib/thor/core_ext/io_binary_read.rb +0 -12
- data/bundler/lib/bundler/vendor/thor/lib/thor/core_ext/ordered_hash.rb +0 -129
- data/lib/rubygems/source_local.rb +0 -7
- data/lib/rubygems/source_specific_file.rb +0 -6
- data/lib/rubygems/ssl_certs/index.rubygems.org/GlobalSignRootCA.pem +0 -21
- data/lib/rubygems/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem +0 -23
- data/lib/rubygems/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem +0 -25
- data/lib/ubygems.rb +0 -14
- data/util/CL2notes +0 -55
- data/util/ci +0 -82
- data/util/cops/deprecations.rb +0 -52
- data/util/create_certs.rb +0 -171
- data/util/create_certs.sh +0 -27
- data/util/create_encrypted_key.rb +0 -16
- data/util/generate_spdx_license_list.rb +0 -61
- data/util/patch_with_prs.rb +0 -77
- data/util/rubocop +0 -8
- data/util/update_bundled_ca_certificates.rb +0 -139
- data/util/update_changelog.rb +0 -67
@@ -4,9 +4,9 @@ module Bundler
|
|
4
4
|
# Represents metadata from when the Bundler gem was built.
|
5
5
|
module BuildMetadata
|
6
6
|
# begin ivars
|
7
|
-
@built_at = "
|
8
|
-
@git_commit_sha = "
|
9
|
-
@release =
|
7
|
+
@built_at = "2021-03-08".freeze
|
8
|
+
@git_commit_sha = "3a169d80c1".freeze
|
9
|
+
@release = true
|
10
10
|
# end ivars
|
11
11
|
|
12
12
|
# A hash representation of the build metadata.
|
@@ -25,23 +25,15 @@ module Bundler
|
|
25
25
|
|
26
26
|
# The SHA for the git commit the bundler gem was built from.
|
27
27
|
def self.git_commit_sha
|
28
|
-
return @git_commit_sha if
|
28
|
+
return @git_commit_sha if instance_variable_defined? :@git_commit_sha
|
29
29
|
|
30
30
|
# If Bundler has been installed without its .git directory and without a
|
31
31
|
# commit instance variable then we can't determine its commits SHA.
|
32
|
-
git_dir = File.join(File.expand_path("
|
32
|
+
git_dir = File.join(File.expand_path("../../../..", __FILE__), ".git")
|
33
33
|
if File.directory?(git_dir)
|
34
34
|
return @git_commit_sha = Dir.chdir(git_dir) { `git rev-parse --short HEAD`.strip.freeze }
|
35
35
|
end
|
36
36
|
|
37
|
-
# If Bundler is a submodule in RubyGems, get the submodule commit
|
38
|
-
git_sub_dir = File.join(File.expand_path("../../../..", __FILE__), ".git")
|
39
|
-
if File.directory?(git_sub_dir)
|
40
|
-
return @git_commit_sha = Dir.chdir(git_sub_dir) do
|
41
|
-
`git ls-tree --abbrev=8 HEAD bundler`.split(/\s/).fetch(2, "").strip.freeze
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
37
|
@git_commit_sha ||= "unknown"
|
46
38
|
end
|
47
39
|
|
@@ -1,18 +1,18 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require_relative "shared_helpers"
|
4
4
|
Bundler::SharedHelpers.major_deprecation 2,
|
5
|
-
"The Bundler task for Capistrano. Please use
|
5
|
+
"The Bundler task for Capistrano. Please use https://github.com/capistrano/bundler"
|
6
6
|
|
7
7
|
# Capistrano task for Bundler.
|
8
8
|
#
|
9
9
|
# Add "require 'bundler/capistrano'" in your Capistrano deploy.rb, and
|
10
10
|
# Bundler will be activated after each new deployment.
|
11
|
-
|
11
|
+
require_relative "deployment"
|
12
12
|
require "capistrano/version"
|
13
13
|
|
14
14
|
if defined?(Capistrano::Version) && Gem::Version.new(Capistrano::Version).release >= Gem::Version.new("3.0")
|
15
|
-
raise "For Capistrano 3.x integration, please use
|
15
|
+
raise "For Capistrano 3.x integration, please use https://github.com/capistrano/bundler"
|
16
16
|
end
|
17
17
|
|
18
18
|
Capistrano::Configuration.instance(:must_exist).load do
|
data/bundler/lib/bundler/cli.rb
CHANGED
@@ -1,24 +1,27 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
require "bundler/vendored_thor"
|
3
|
+
require_relative "vendored_thor"
|
5
4
|
|
6
5
|
module Bundler
|
7
6
|
class CLI < Thor
|
8
|
-
|
7
|
+
require_relative "cli/common"
|
9
8
|
|
10
9
|
package_name "Bundler"
|
11
10
|
|
12
11
|
AUTO_INSTALL_CMDS = %w[show binstubs outdated exec open console licenses clean].freeze
|
13
|
-
PARSEABLE_COMMANDS = %w[
|
14
|
-
|
15
|
-
|
12
|
+
PARSEABLE_COMMANDS = %w[check config help exec platform show version].freeze
|
13
|
+
|
14
|
+
COMMAND_ALIASES = {
|
15
|
+
"check" => "c",
|
16
|
+
"install" => "i",
|
17
|
+
"list" => "ls",
|
18
|
+
"exec" => ["e", "ex", "exe"],
|
19
|
+
"cache" => ["package", "pack"],
|
20
|
+
"version" => ["-v", "--version"],
|
21
|
+
}.freeze
|
16
22
|
|
17
23
|
def self.start(*)
|
18
24
|
super
|
19
|
-
rescue Exception => e
|
20
|
-
Bundler.ui = UI::Shell.new
|
21
|
-
raise e
|
22
25
|
ensure
|
23
26
|
Bundler::SharedHelpers.print_major_deprecations!
|
24
27
|
end
|
@@ -30,13 +33,31 @@ module Bundler
|
|
30
33
|
end
|
31
34
|
end
|
32
35
|
|
36
|
+
def self.all_aliases
|
37
|
+
@all_aliases ||= begin
|
38
|
+
command_aliases = {}
|
39
|
+
|
40
|
+
COMMAND_ALIASES.each do |name, aliases|
|
41
|
+
Array(aliases).each do |one_alias|
|
42
|
+
command_aliases[one_alias] = name
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
command_aliases
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def self.aliases_for(command_name)
|
51
|
+
COMMAND_ALIASES.select {|k, _| k == command_name }.invert
|
52
|
+
end
|
53
|
+
|
33
54
|
def initialize(*args)
|
34
55
|
super
|
35
56
|
|
36
57
|
custom_gemfile = options[:gemfile] || Bundler.settings[:gemfile]
|
37
58
|
if custom_gemfile && !custom_gemfile.empty?
|
38
59
|
Bundler::SharedHelpers.set_env "BUNDLE_GEMFILE", File.expand_path(custom_gemfile)
|
39
|
-
Bundler.
|
60
|
+
Bundler.reset_settings_and_root!
|
40
61
|
end
|
41
62
|
|
42
63
|
Bundler.settings.set_command_option_if_given :retry, options[:retry]
|
@@ -61,11 +82,6 @@ module Bundler
|
|
61
82
|
end
|
62
83
|
end
|
63
84
|
|
64
|
-
def self.deprecated_option(*args, &blk)
|
65
|
-
return if Bundler.feature_flag.forget_cli_options?
|
66
|
-
method_option(*args, &blk)
|
67
|
-
end
|
68
|
-
|
69
85
|
check_unknown_options!(:except => [:config, :exec])
|
70
86
|
stop_on_unknown_option! :exec
|
71
87
|
|
@@ -74,9 +90,7 @@ module Bundler
|
|
74
90
|
version
|
75
91
|
Bundler.ui.info "\n"
|
76
92
|
|
77
|
-
primary_commands = ["install", "update",
|
78
|
-
Bundler.feature_flag.cache_command_is_package? ? "cache" : "package",
|
79
|
-
"exec", "config", "help"]
|
93
|
+
primary_commands = ["install", "update", "cache", "exec", "config", "help"]
|
80
94
|
|
81
95
|
list = self.class.printable_commands(true)
|
82
96
|
by_name = list.group_by {|name, _message| name.match(/^bundle (\w+)/)[1] }
|
@@ -108,16 +122,17 @@ module Bundler
|
|
108
122
|
else command = "bundle-#{cli}"
|
109
123
|
end
|
110
124
|
|
111
|
-
man_path
|
112
|
-
man_pages = Hash[Dir.glob(File.join(man_path, "*")).grep(/.*\.\d*\Z/).collect do |f|
|
125
|
+
man_path = File.expand_path("man", __dir__)
|
126
|
+
man_pages = Hash[Dir.glob(File.join(man_path, "**", "*")).grep(/.*\.\d*\Z/).collect do |f|
|
113
127
|
[File.basename(f, ".*"), f]
|
114
128
|
end]
|
115
129
|
|
116
130
|
if man_pages.include?(command)
|
131
|
+
man_page = man_pages[command]
|
117
132
|
if Bundler.which("man") && man_path !~ %r{^file:/.+!/META-INF/jruby.home/.+}
|
118
|
-
Kernel.exec "man #{
|
133
|
+
Kernel.exec "man #{man_page}"
|
119
134
|
else
|
120
|
-
puts File.read("#{man_path}/#{File.basename(
|
135
|
+
puts File.read("#{man_path}/#{File.basename(man_page)}.ronn")
|
121
136
|
end
|
122
137
|
elsif command_path = Bundler.which("bundler-#{cli}")
|
123
138
|
Kernel.exec(command_path, "--help")
|
@@ -142,9 +157,9 @@ module Bundler
|
|
142
157
|
Gemfile to a gem with a gemspec, the --gemspec option will automatically add each
|
143
158
|
dependency listed in the gemspec file to the newly created Gemfile.
|
144
159
|
D
|
145
|
-
|
160
|
+
method_option "gemspec", :type => :string, :banner => "Use the specified .gemspec to create the Gemfile"
|
146
161
|
def init
|
147
|
-
|
162
|
+
require_relative "cli/init"
|
148
163
|
Init.new(options.dup).run
|
149
164
|
end
|
150
165
|
|
@@ -160,12 +175,15 @@ module Bundler
|
|
160
175
|
"Use the specified gemfile instead of Gemfile"
|
161
176
|
method_option "path", :type => :string, :banner =>
|
162
177
|
"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?}"
|
163
|
-
map "c" => "check"
|
164
178
|
def check
|
165
|
-
|
179
|
+
remembered_flag_deprecation("path")
|
180
|
+
|
181
|
+
require_relative "cli/check"
|
166
182
|
Check.new(options).run
|
167
183
|
end
|
168
184
|
|
185
|
+
map aliases_for("check")
|
186
|
+
|
169
187
|
desc "remove [GEM [GEM ...]]", "Removes gems from the Gemfile"
|
170
188
|
long_desc <<-D
|
171
189
|
Removes the given gems from the Gemfile while ensuring that the resulting Gemfile is still valid. If the gem is not found, Bundler prints a error message and if gem could not be removed due to any reason Bundler will display a warning.
|
@@ -173,7 +191,7 @@ module Bundler
|
|
173
191
|
method_option "install", :type => :boolean, :banner =>
|
174
192
|
"Runs 'bundle install' after removing the gems from the Gemfile"
|
175
193
|
def remove(*gems)
|
176
|
-
|
194
|
+
require_relative "cli/remove"
|
177
195
|
Remove.new(gems, options).run
|
178
196
|
end
|
179
197
|
|
@@ -188,13 +206,13 @@ module Bundler
|
|
188
206
|
|
189
207
|
If the bundle has already been installed, bundler will tell you so and then exit.
|
190
208
|
D
|
191
|
-
|
209
|
+
method_option "binstubs", :type => :string, :lazy_default => "bin", :banner =>
|
192
210
|
"Generate bin stubs for bundled gems to ./bin"
|
193
|
-
|
211
|
+
method_option "clean", :type => :boolean, :banner =>
|
194
212
|
"Run bundle clean automatically after install"
|
195
|
-
|
213
|
+
method_option "deployment", :type => :boolean, :banner =>
|
196
214
|
"Install using defaults tuned for deployment environments"
|
197
|
-
|
215
|
+
method_option "frozen", :type => :boolean, :banner =>
|
198
216
|
"Do not allow the Gemfile.lock to be updated after this install"
|
199
217
|
method_option "full-index", :type => :boolean, :banner =>
|
200
218
|
"Fall back to using the single-file index of all gems"
|
@@ -204,38 +222,46 @@ module Bundler
|
|
204
222
|
"Specify the number of jobs to run in parallel"
|
205
223
|
method_option "local", :type => :boolean, :banner =>
|
206
224
|
"Do not attempt to fetch gems remotely and use the gem cache instead"
|
207
|
-
|
225
|
+
method_option "no-cache", :type => :boolean, :banner =>
|
208
226
|
"Don't update the existing gem cache."
|
209
227
|
method_option "redownload", :type => :boolean, :aliases => "--force", :banner =>
|
210
228
|
"Force downloading every gem."
|
211
|
-
|
229
|
+
method_option "no-prune", :type => :boolean, :banner =>
|
212
230
|
"Don't remove stale gems from the cache."
|
213
|
-
|
214
|
-
"Specify a different path than the system default ($BUNDLE_PATH or $GEM_HOME)
|
231
|
+
method_option "path", :type => :string, :banner =>
|
232
|
+
"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?}"
|
215
233
|
method_option "quiet", :type => :boolean, :banner =>
|
216
234
|
"Only output warnings and errors."
|
217
|
-
|
235
|
+
method_option "shebang", :type => :string, :banner =>
|
218
236
|
"Specify a different shebang executable name than the default (usually 'ruby')"
|
219
237
|
method_option "standalone", :type => :array, :lazy_default => [], :banner =>
|
220
238
|
"Make a bundle that can work without the Bundler runtime"
|
221
|
-
|
239
|
+
method_option "system", :type => :boolean, :banner =>
|
222
240
|
"Install to the system location ($BUNDLE_PATH or $GEM_HOME) even if the bundle was previously installed somewhere else for this application"
|
223
241
|
method_option "trust-policy", :alias => "P", :type => :string, :banner =>
|
224
242
|
"Gem trust policy (like gem install -P). Must be one of " +
|
225
243
|
Bundler.rubygems.security_policy_keys.join("|")
|
226
|
-
|
244
|
+
method_option "without", :type => :array, :banner =>
|
227
245
|
"Exclude gems that are part of the specified named group."
|
228
|
-
|
246
|
+
method_option "with", :type => :array, :banner =>
|
229
247
|
"Include gems that are part of the specified named group."
|
230
|
-
map "i" => "install"
|
231
248
|
def install
|
232
249
|
SharedHelpers.major_deprecation(2, "The `--force` option has been renamed to `--redownload`") if ARGV.include?("--force")
|
233
|
-
|
250
|
+
|
251
|
+
%w[clean deployment frozen no-prune path shebang system without with].each do |option|
|
252
|
+
remembered_flag_deprecation(option)
|
253
|
+
end
|
254
|
+
|
255
|
+
remembered_negative_flag_deprecation("no-deployment")
|
256
|
+
|
257
|
+
require_relative "cli/install"
|
234
258
|
Bundler.settings.temporary(:no_install => false) do
|
235
259
|
Install.new(options.dup).run
|
236
260
|
end
|
237
261
|
end
|
238
262
|
|
263
|
+
map aliases_for("install")
|
264
|
+
|
239
265
|
desc "update [OPTIONS]", "Update the current environment"
|
240
266
|
long_desc <<-D
|
241
267
|
Update will install the newest versions of the gems listed in the Gemfile. Use
|
@@ -276,60 +302,63 @@ module Bundler
|
|
276
302
|
"Update everything."
|
277
303
|
def update(*gems)
|
278
304
|
SharedHelpers.major_deprecation(2, "The `--force` option has been renamed to `--redownload`") if ARGV.include?("--force")
|
279
|
-
|
280
|
-
|
305
|
+
require_relative "cli/update"
|
306
|
+
Bundler.settings.temporary(:no_install => false) do
|
307
|
+
Update.new(options, gems).run
|
308
|
+
end
|
281
309
|
end
|
282
310
|
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
311
|
+
unless Bundler.feature_flag.bundler_3_mode?
|
312
|
+
desc "show GEM [OPTIONS]", "Shows all gems that are part of the bundle, or the path to a given gem"
|
313
|
+
long_desc <<-D
|
314
|
+
Show lists the names and versions of all gems that are required by your Gemfile.
|
315
|
+
Calling show with [GEM] will list the exact location of that gem on your machine.
|
316
|
+
D
|
317
|
+
method_option "paths", :type => :boolean,
|
318
|
+
:banner => "List the paths of all gems that are required by your Gemfile."
|
319
|
+
method_option "outdated", :type => :boolean,
|
320
|
+
:banner => "Show verbose output including whether gems are outdated."
|
321
|
+
def show(gem_name = nil)
|
322
|
+
if ARGV[0] == "show"
|
323
|
+
rest = ARGV[1..-1]
|
324
|
+
|
325
|
+
if flag = rest.find{|arg| ["--verbose", "--outdated"].include?(arg) }
|
326
|
+
Bundler::SharedHelpers.major_deprecation(2, "the `#{flag}` flag to `bundle show` was undocumented and will be removed without replacement")
|
327
|
+
else
|
328
|
+
new_command = rest.find {|arg| !arg.start_with?("--") } ? "info" : "list"
|
329
|
+
|
330
|
+
new_arguments = rest.map do |arg|
|
331
|
+
next arg if arg != "--paths"
|
332
|
+
next "--path" if new_command == "info"
|
333
|
+
end
|
334
|
+
|
335
|
+
old_argv = ARGV.join(" ")
|
336
|
+
new_argv = [new_command, *new_arguments.compact].join(" ")
|
337
|
+
|
338
|
+
Bundler::SharedHelpers.major_deprecation(2, "use `bundle #{new_argv}` instead of `bundle #{old_argv}`")
|
339
|
+
end
|
301
340
|
end
|
302
|
-
|
303
|
-
|
304
|
-
new_argv = [new_command, *new_arguments.compact].join(" ")
|
305
|
-
|
306
|
-
Bundler::SharedHelpers.major_deprecation(2, "use `bundle #{new_argv}` instead of `bundle #{old_argv}`")
|
307
|
-
end
|
308
|
-
require "bundler/cli/show"
|
309
|
-
Show.new(options, gem_name).run
|
310
|
-
end
|
311
|
-
# TODO: 2.0 remove `bundle show`
|
312
|
-
|
313
|
-
if Bundler.feature_flag.list_command?
|
314
|
-
desc "list", "List all gems in the bundle"
|
315
|
-
method_option "name-only", :type => :boolean, :banner => "print only the gem names"
|
316
|
-
method_option "only-group", :type => :string, :banner => "print gems from a particular group"
|
317
|
-
method_option "without-group", :type => :string, :banner => "print all gems expect from a group"
|
318
|
-
method_option "paths", :type => :boolean, :banner => "print the path to each gem in the bundle"
|
319
|
-
def list
|
320
|
-
require "bundler/cli/list"
|
321
|
-
List.new(options).run
|
341
|
+
require_relative "cli/show"
|
342
|
+
Show.new(options, gem_name).run
|
322
343
|
end
|
344
|
+
end
|
323
345
|
|
324
|
-
|
325
|
-
|
326
|
-
|
346
|
+
desc "list", "List all gems in the bundle"
|
347
|
+
method_option "name-only", :type => :boolean, :banner => "print only the gem names"
|
348
|
+
method_option "only-group", :type => :array, :default => [], :banner => "print gems from a given set of groups"
|
349
|
+
method_option "without-group", :type => :array, :default => [], :banner => "print all gems except from a given set of groups"
|
350
|
+
method_option "paths", :type => :boolean, :banner => "print the path to each gem in the bundle"
|
351
|
+
def list
|
352
|
+
require_relative "cli/list"
|
353
|
+
List.new(options).run
|
327
354
|
end
|
328
355
|
|
356
|
+
map aliases_for("list")
|
357
|
+
|
329
358
|
desc "info GEM [OPTIONS]", "Show information for the given gem"
|
330
359
|
method_option "path", :type => :boolean, :banner => "Print full path to gem"
|
331
360
|
def info(gem_name)
|
332
|
-
|
361
|
+
require_relative "cli/info"
|
333
362
|
Info.new(options, gem_name).run
|
334
363
|
end
|
335
364
|
|
@@ -349,8 +378,10 @@ module Bundler
|
|
349
378
|
"Make binstubs that can work without the Bundler runtime"
|
350
379
|
method_option "all", :type => :boolean, :banner =>
|
351
380
|
"Install binstubs for all gems"
|
381
|
+
method_option "all-platforms", :type => :boolean, :default => false, :banner =>
|
382
|
+
"Install binstubs for all platforms"
|
352
383
|
def binstubs(*gems)
|
353
|
-
|
384
|
+
require_relative "cli/binstubs"
|
354
385
|
Binstubs.new(options, gems).run
|
355
386
|
end
|
356
387
|
|
@@ -361,12 +392,14 @@ module Bundler
|
|
361
392
|
method_option "version", :aliases => "-v", :type => :string
|
362
393
|
method_option "group", :aliases => "-g", :type => :string
|
363
394
|
method_option "source", :aliases => "-s", :type => :string
|
395
|
+
method_option "git", :type => :string
|
396
|
+
method_option "branch", :type => :string
|
364
397
|
method_option "skip-install", :type => :boolean, :banner =>
|
365
398
|
"Adds gem to the Gemfile but does not install it"
|
366
399
|
method_option "optimistic", :type => :boolean, :banner => "Adds optimistic declaration of version to gem"
|
367
400
|
method_option "strict", :type => :boolean, :banner => "Adds strict declaration of version to gem"
|
368
401
|
def add(*gems)
|
369
|
-
|
402
|
+
require_relative "cli/add"
|
370
403
|
Add.new(options.dup, gems).run
|
371
404
|
end
|
372
405
|
|
@@ -386,9 +419,10 @@ module Bundler
|
|
386
419
|
"Do not attempt to fetch gems remotely and use the gem cache instead"
|
387
420
|
method_option "pre", :type => :boolean, :banner => "Check for newer pre-release gems"
|
388
421
|
method_option "source", :type => :array, :banner => "Check against a specific source"
|
389
|
-
|
422
|
+
strict_is_update = Bundler.feature_flag.forget_cli_options?
|
423
|
+
method_option "filter-strict", :type => :boolean, :aliases => strict_is_update ? [] : %w[--strict], :banner =>
|
390
424
|
"Only list newer versions allowed by your Gemfile requirements"
|
391
|
-
method_option "update-strict", :type => :boolean, :banner =>
|
425
|
+
method_option "update-strict", :type => :boolean, :aliases => strict_is_update ? %w[--strict] : [], :banner =>
|
392
426
|
"Strict conservative resolution, do not allow any gem to be updated past latest --patch | --minor | --major"
|
393
427
|
method_option "minor", :type => :boolean, :banner => "Prefer updating only to next minor version"
|
394
428
|
method_option "major", :type => :boolean, :banner => "Prefer updating to next major version (default)"
|
@@ -401,53 +435,51 @@ module Bundler
|
|
401
435
|
method_option "only-explicit", :type => :boolean, :banner =>
|
402
436
|
"Only list gems specified in your Gemfile, not their dependencies"
|
403
437
|
def outdated(*gems)
|
404
|
-
|
438
|
+
require_relative "cli/outdated"
|
405
439
|
Outdated.new(options, gems).run
|
406
440
|
end
|
407
441
|
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
:banner => "Include all sources (including path and git)."
|
415
|
-
end
|
416
|
-
method_option "all-platforms", :type => :boolean, :banner => "Include gems for all platforms present in the lockfile, not only the current one"
|
417
|
-
method_option "no-prune", :type => :boolean, :banner => "Don't remove stale gems from the cache."
|
418
|
-
def cache
|
419
|
-
require "bundler/cli/cache"
|
420
|
-
Cache.new(options).run
|
421
|
-
end
|
442
|
+
desc "fund [OPTIONS]", "Lists information about gems seeking funding assistance"
|
443
|
+
method_option "group", :aliases => "-g", :type => :array, :banner =>
|
444
|
+
"Fetch funding information for a specific group"
|
445
|
+
def fund
|
446
|
+
require_relative "cli/fund"
|
447
|
+
Fund.new(options).run
|
422
448
|
end
|
423
449
|
|
424
|
-
desc "
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
end
|
450
|
+
desc "cache [OPTIONS]", "Locks and then caches all of the gems into vendor/cache"
|
451
|
+
method_option "all", :type => :boolean,
|
452
|
+
:default => Bundler.feature_flag.cache_all?,
|
453
|
+
:banner => "Include all sources (including path and git)."
|
429
454
|
method_option "all-platforms", :type => :boolean, :banner => "Include gems for all platforms present in the lockfile, not only the current one"
|
430
455
|
method_option "cache-path", :type => :string, :banner =>
|
431
456
|
"Specify a different cache path than the default (vendor/cache)."
|
432
457
|
method_option "gemfile", :type => :string, :banner => "Use the specified gemfile instead of Gemfile"
|
433
|
-
method_option "no-install", :type => :boolean, :banner => "Don't install the gems, only the
|
458
|
+
method_option "no-install", :type => :boolean, :banner => "Don't install the gems, only update the cache."
|
434
459
|
method_option "no-prune", :type => :boolean, :banner => "Don't remove stale gems from the cache."
|
435
460
|
method_option "path", :type => :string, :banner =>
|
436
|
-
"Specify a different path than the system default ($BUNDLE_PATH or $GEM_HOME)
|
461
|
+
"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?}"
|
437
462
|
method_option "quiet", :type => :boolean, :banner => "Only output warnings and errors."
|
438
463
|
method_option "frozen", :type => :boolean, :banner =>
|
439
|
-
"Do not allow the Gemfile.lock to be updated after this
|
464
|
+
"Do not allow the Gemfile.lock to be updated after this bundle cache operation's install"
|
440
465
|
long_desc <<-D
|
441
|
-
The
|
466
|
+
The cache command will copy the .gem files for every gem in the bundle into the
|
442
467
|
directory ./vendor/cache. If you then check that directory into your source
|
443
468
|
control repository, others who check out your source will be able to install the
|
444
469
|
bundle without having to download any additional gems.
|
445
470
|
D
|
446
|
-
def
|
447
|
-
|
448
|
-
|
471
|
+
def cache
|
472
|
+
SharedHelpers.major_deprecation 2,
|
473
|
+
"The `--all` flag is deprecated because it relies on being " \
|
474
|
+
"remembered across bundler invocations, which bundler will no longer " \
|
475
|
+
"do in future versions. Instead please use `bundle config set cache_all true`, " \
|
476
|
+
"and stop using this flag" if ARGV.include?("--all")
|
477
|
+
|
478
|
+
require_relative "cli/cache"
|
479
|
+
Cache.new(options).run
|
449
480
|
end
|
450
|
-
|
481
|
+
|
482
|
+
map aliases_for("cache")
|
451
483
|
|
452
484
|
desc "exec [OPTIONS]", "Run the command in context of the bundle"
|
453
485
|
method_option :keep_file_descriptors, :type => :boolean, :default => false
|
@@ -457,12 +489,13 @@ module Bundler
|
|
457
489
|
bundle exec you can require and call the bundled gems as if they were installed
|
458
490
|
into the system wide RubyGems repository.
|
459
491
|
D
|
460
|
-
map "e" => "exec"
|
461
492
|
def exec(*args)
|
462
|
-
|
493
|
+
require_relative "cli/exec"
|
463
494
|
Exec.new(options, args).run
|
464
495
|
end
|
465
496
|
|
497
|
+
map aliases_for("exec")
|
498
|
+
|
466
499
|
desc "config NAME [VALUE]", "Retrieve or set a configuration value"
|
467
500
|
long_desc <<-D
|
468
501
|
Retrieves or sets a configuration value. If only one parameter is provided, retrieve the value. If two parameters are provided, replace the
|
@@ -475,22 +508,19 @@ module Bundler
|
|
475
508
|
will show the current value, as well as any superceded values and
|
476
509
|
where they were specified.
|
477
510
|
D
|
478
|
-
|
479
|
-
|
480
|
-
require "bundler/cli/config"
|
481
|
-
Config.new(options, args, self).run
|
482
|
-
end
|
511
|
+
require_relative "cli/config"
|
512
|
+
subcommand "config", Config
|
483
513
|
|
484
514
|
desc "open GEM", "Opens the source directory of the given bundled gem"
|
485
515
|
def open(name)
|
486
|
-
|
516
|
+
require_relative "cli/open"
|
487
517
|
Open.new(options, name).run
|
488
518
|
end
|
489
519
|
|
490
|
-
|
520
|
+
unless Bundler.feature_flag.bundler_3_mode?
|
491
521
|
desc "console [GROUP]", "Opens an IRB session with the bundle pre-loaded"
|
492
522
|
def console(group = nil)
|
493
|
-
|
523
|
+
require_relative "cli/console"
|
494
524
|
Console.new(options, group).run
|
495
525
|
end
|
496
526
|
end
|
@@ -508,7 +538,8 @@ module Bundler
|
|
508
538
|
Bundler.ui.info "Bundler version #{Bundler::VERSION}#{build_info}"
|
509
539
|
end
|
510
540
|
end
|
511
|
-
|
541
|
+
|
542
|
+
map aliases_for("version")
|
512
543
|
|
513
544
|
desc "licenses", "Prints the license of all gems in the bundle"
|
514
545
|
def licenses
|
@@ -524,7 +555,7 @@ module Bundler
|
|
524
555
|
end
|
525
556
|
end
|
526
557
|
|
527
|
-
|
558
|
+
unless Bundler.feature_flag.bundler_3_mode?
|
528
559
|
desc "viz [OPTIONS]", "Generates a visual dependency graph", :hide => true
|
529
560
|
long_desc <<-D
|
530
561
|
Viz generates a PNG file of the current Gemfile as a dependency graph.
|
@@ -538,7 +569,7 @@ module Bundler
|
|
538
569
|
method_option :without, :type => :array, :default => [], :aliases => "-W", :banner => "GROUP[ GROUP...]", :desc => "Exclude gems that are part of the specified named group."
|
539
570
|
def viz
|
540
571
|
SharedHelpers.major_deprecation 2, "The `viz` command has been moved to the `bundle-viz` gem, see https://github.com/bundler/bundler-viz"
|
541
|
-
|
572
|
+
require_relative "cli/viz"
|
542
573
|
Viz.new(options.dup).run
|
543
574
|
end
|
544
575
|
end
|
@@ -547,14 +578,20 @@ module Bundler
|
|
547
578
|
|
548
579
|
desc "gem NAME [OPTIONS]", "Creates a skeleton for creating a rubygem"
|
549
580
|
method_option :exe, :type => :boolean, :default => false, :aliases => ["--bin", "-b"], :desc => "Generate a binary executable for your library."
|
550
|
-
method_option :coc, :type => :boolean, :desc => "Generate a code of conduct file. Set a default with `bundle config gem.coc true`."
|
581
|
+
method_option :coc, :type => :boolean, :desc => "Generate a code of conduct file. Set a default with `bundle config set --global gem.coc true`."
|
551
582
|
method_option :edit, :type => :string, :aliases => "-e", :required => false, :banner => "EDITOR",
|
552
583
|
:lazy_default => [ENV["BUNDLER_EDITOR"], ENV["VISUAL"], ENV["EDITOR"]].find {|e| !e.nil? && !e.empty? },
|
553
584
|
:desc => "Open generated gemspec in the specified editor (defaults to $EDITOR or $BUNDLER_EDITOR)"
|
554
585
|
method_option :ext, :type => :boolean, :default => false, :desc => "Generate the boilerplate for C extension code"
|
555
|
-
method_option :
|
556
|
-
method_option :
|
557
|
-
|
586
|
+
method_option :git, :type => :boolean, :default => true, :desc => "Initialize a git repo inside your library."
|
587
|
+
method_option :mit, :type => :boolean, :desc => "Generate an MIT license file. Set a default with `bundle config set --global gem.mit true`."
|
588
|
+
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`."
|
589
|
+
method_option :changelog, :type => :boolean, :desc => "Generate changelog file. Set a default with `bundle config set --global gem.changelog true`."
|
590
|
+
method_option :test, :type => :string, :lazy_default => Bundler.settings["gem.test"] || "", :aliases => "-t", :banner => "Use the specified test framework for your library",
|
591
|
+
: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)`."
|
592
|
+
method_option :ci, :type => :string, :lazy_default => Bundler.settings["gem.ci"] || "",
|
593
|
+
:desc => "Generate CI configuration, either GitHub Actions, Travis CI, GitLab CI or CircleCI. Set a default with `bundle config set --global gem.ci (github|travis|gitlab|circle)`"
|
594
|
+
|
558
595
|
def gem(name)
|
559
596
|
end
|
560
597
|
|
@@ -562,7 +599,7 @@ module Bundler
|
|
562
599
|
def gem_command.run(instance, args = [])
|
563
600
|
arity = 1 # name
|
564
601
|
|
565
|
-
|
602
|
+
require_relative "cli/gem"
|
566
603
|
cmd_args = args + [instance]
|
567
604
|
cmd_args.unshift(instance.options)
|
568
605
|
|
@@ -590,7 +627,7 @@ module Bundler
|
|
590
627
|
method_option "force", :type => :boolean, :default => false, :banner =>
|
591
628
|
"Forces clean even if --path is not set"
|
592
629
|
def clean
|
593
|
-
|
630
|
+
require_relative "cli/clean"
|
594
631
|
Clean.new(options.dup).run
|
595
632
|
end
|
596
633
|
|
@@ -598,7 +635,7 @@ module Bundler
|
|
598
635
|
method_option "ruby", :type => :boolean, :default => false, :banner =>
|
599
636
|
"only display ruby related platform information"
|
600
637
|
def platform
|
601
|
-
|
638
|
+
require_relative "cli/platform"
|
602
639
|
Platform.new(options).run
|
603
640
|
end
|
604
641
|
|
@@ -609,7 +646,7 @@ module Bundler
|
|
609
646
|
"Install gem into a bundler group"
|
610
647
|
def inject(name, version)
|
611
648
|
SharedHelpers.major_deprecation 2, "The `inject` command has been replaced by the `add` command"
|
612
|
-
|
649
|
+
require_relative "cli/inject"
|
613
650
|
Inject.new(options.dup, name, version).run
|
614
651
|
end
|
615
652
|
|
@@ -620,6 +657,8 @@ module Bundler
|
|
620
657
|
"do not attempt to fetch remote gemspecs and use the local gem cache only"
|
621
658
|
method_option "print", :type => :boolean, :default => false, :banner =>
|
622
659
|
"print the lockfile to STDOUT instead of writing to the file system"
|
660
|
+
method_option "gemfile", :type => :string, :banner =>
|
661
|
+
"Use the specified gemfile instead of Gemfile"
|
623
662
|
method_option "lockfile", :type => :string, :default => nil, :banner =>
|
624
663
|
"the path the lockfile should be written to"
|
625
664
|
method_option "full-index", :type => :boolean, :default => false, :banner =>
|
@@ -639,7 +678,7 @@ module Bundler
|
|
639
678
|
method_option "conservative", :type => :boolean, :banner =>
|
640
679
|
"If updating, use bundle install conservative update behavior and do not allow shared dependencies to be updated"
|
641
680
|
def lock
|
642
|
-
|
681
|
+
require_relative "cli/lock"
|
643
682
|
Lock.new(options).run
|
644
683
|
end
|
645
684
|
|
@@ -659,13 +698,13 @@ module Bundler
|
|
659
698
|
method_option "quiet", :type => :boolean, :banner =>
|
660
699
|
"Only output warnings and errors."
|
661
700
|
def doctor
|
662
|
-
|
701
|
+
require_relative "cli/doctor"
|
663
702
|
Doctor.new(options).run
|
664
703
|
end
|
665
704
|
|
666
705
|
desc "issue", "Learn how to report an issue in Bundler"
|
667
706
|
def issue
|
668
|
-
|
707
|
+
require_relative "cli/issue"
|
669
708
|
Issue.new.run
|
670
709
|
end
|
671
710
|
|
@@ -676,12 +715,12 @@ module Bundler
|
|
676
715
|
checkout --force`.
|
677
716
|
D
|
678
717
|
def pristine(*gems)
|
679
|
-
|
718
|
+
require_relative "cli/pristine"
|
680
719
|
Pristine.new(gems).run
|
681
720
|
end
|
682
721
|
|
683
722
|
if Bundler.feature_flag.plugins?
|
684
|
-
|
723
|
+
require_relative "cli/plugin"
|
685
724
|
desc "plugin", "Manage the bundler plugins"
|
686
725
|
subcommand "plugin", Plugin
|
687
726
|
end
|
@@ -689,12 +728,17 @@ module Bundler
|
|
689
728
|
# Reformat the arguments passed to bundle that include a --help flag
|
690
729
|
# into the corresponding `bundle help #{command}` call
|
691
730
|
def self.reformatted_help_args(args)
|
692
|
-
bundler_commands =
|
731
|
+
bundler_commands = (COMMAND_ALIASES.keys + COMMAND_ALIASES.values).flatten
|
732
|
+
|
693
733
|
help_flags = %w[--help -h]
|
694
|
-
exec_commands =
|
734
|
+
exec_commands = ["exec"] + COMMAND_ALIASES["exec"]
|
735
|
+
|
695
736
|
help_used = args.index {|a| help_flags.include? a }
|
696
737
|
exec_used = args.index {|a| exec_commands.include? a }
|
738
|
+
|
697
739
|
command = args.find {|a| bundler_commands.include? a }
|
740
|
+
command = all_aliases[command] if all_aliases[command]
|
741
|
+
|
698
742
|
if exec_used && help_used
|
699
743
|
if exec_used + help_used == 1
|
700
744
|
%w[help exec]
|
@@ -710,11 +754,11 @@ module Bundler
|
|
710
754
|
end
|
711
755
|
end
|
712
756
|
|
713
|
-
|
757
|
+
private
|
714
758
|
|
715
759
|
# Automatically invoke `bundle install` and resume if
|
716
760
|
# Bundler.settings[:auto_install] exists. This is set through config cmd
|
717
|
-
# `bundle config auto_install 1`.
|
761
|
+
# `bundle config set --global auto_install 1`.
|
718
762
|
#
|
719
763
|
# Note that this method `nil`s out the global Definition object, so it
|
720
764
|
# should be called first, before you instantiate anything like an
|
@@ -762,7 +806,7 @@ module Bundler
|
|
762
806
|
return unless SharedHelpers.md5_available?
|
763
807
|
|
764
808
|
latest = Fetcher::CompactIndex.
|
765
|
-
new(nil, Source::Rubygems::Remote.new(URI("https://rubygems.org")), nil).
|
809
|
+
new(nil, Source::Rubygems::Remote.new(Bundler::URI("https://rubygems.org")), nil).
|
766
810
|
send(:compact_index_client).
|
767
811
|
instance_variable_get(:@cache).
|
768
812
|
dependencies("bundler").
|
@@ -786,5 +830,34 @@ module Bundler
|
|
786
830
|
rescue RuntimeError
|
787
831
|
nil
|
788
832
|
end
|
833
|
+
|
834
|
+
def remembered_negative_flag_deprecation(name)
|
835
|
+
positive_name = name.gsub(/\Ano-/, "")
|
836
|
+
option = current_command.options[positive_name]
|
837
|
+
flag_name = "--no-" + option.switch_name.gsub(/\A--/, "")
|
838
|
+
|
839
|
+
flag_deprecation(positive_name, flag_name, option)
|
840
|
+
end
|
841
|
+
|
842
|
+
def remembered_flag_deprecation(name)
|
843
|
+
option = current_command.options[name]
|
844
|
+
flag_name = option.switch_name
|
845
|
+
|
846
|
+
flag_deprecation(name, flag_name, option)
|
847
|
+
end
|
848
|
+
|
849
|
+
def flag_deprecation(name, flag_name, option)
|
850
|
+
name_index = ARGV.find {|arg| flag_name == arg.split("=")[0] }
|
851
|
+
return unless name_index
|
852
|
+
|
853
|
+
value = options[name]
|
854
|
+
value = value.join(" ").to_s if option.type == :array
|
855
|
+
|
856
|
+
Bundler::SharedHelpers.major_deprecation 2,
|
857
|
+
"The `#{flag_name}` flag is deprecated because it relies on being " \
|
858
|
+
"remembered across bundler invocations, which bundler will no longer " \
|
859
|
+
"do in future versions. Instead please use `bundle config set --local #{name.tr("-", "_")} " \
|
860
|
+
"'#{value}'`, and stop using this flag"
|
861
|
+
end
|
789
862
|
end
|
790
863
|
end
|