bundler 2.2.29 → 2.5.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1129 -4
- data/README.md +4 -8
- data/bundler.gemspec +11 -11
- data/exe/bundle +5 -26
- data/exe/bundler +1 -1
- data/lib/bundler/.document +1 -0
- data/lib/bundler/build_metadata.rb +4 -4
- data/lib/bundler/capistrano.rb +1 -1
- data/lib/bundler/checksum.rb +254 -0
- data/lib/bundler/ci_detector.rb +75 -0
- data/lib/bundler/cli/add.rb +4 -4
- data/lib/bundler/cli/binstubs.rb +10 -6
- data/lib/bundler/cli/cache.rb +1 -1
- data/lib/bundler/cli/check.rb +3 -3
- data/lib/bundler/cli/common.rb +13 -3
- data/lib/bundler/cli/config.rb +18 -8
- data/lib/bundler/cli/console.rb +5 -4
- data/lib/bundler/cli/doctor.rb +12 -5
- data/lib/bundler/cli/exec.rb +1 -1
- data/lib/bundler/cli/fund.rb +1 -1
- data/lib/bundler/cli/gem.rb +141 -48
- data/lib/bundler/cli/info.rb +27 -17
- data/lib/bundler/cli/init.rb +6 -2
- data/lib/bundler/cli/install.rb +22 -39
- data/lib/bundler/cli/issue.rb +5 -4
- data/lib/bundler/cli/lock.rb +36 -29
- data/lib/bundler/cli/open.rb +9 -9
- data/lib/bundler/cli/outdated.rb +19 -12
- data/lib/bundler/cli/platform.rb +8 -6
- data/lib/bundler/cli/plugin.rb +9 -15
- data/lib/bundler/cli/pristine.rb +38 -30
- data/lib/bundler/cli/show.rb +3 -3
- data/lib/bundler/cli/update.rb +12 -7
- data/lib/bundler/cli/viz.rb +1 -1
- data/lib/bundler/cli.rb +266 -285
- data/lib/bundler/compact_index_client/cache.rb +53 -67
- data/lib/bundler/compact_index_client/cache_file.rb +153 -0
- data/lib/bundler/compact_index_client/gem_parser.rb +7 -3
- data/lib/bundler/compact_index_client/parser.rb +84 -0
- data/lib/bundler/compact_index_client/updater.rb +83 -76
- data/lib/bundler/compact_index_client.rb +59 -87
- data/lib/bundler/constants.rb +9 -2
- data/lib/bundler/current_ruby.rb +12 -16
- data/lib/bundler/definition.rb +509 -319
- data/lib/bundler/dependency.rb +33 -71
- data/lib/bundler/digest.rb +71 -0
- data/lib/bundler/dsl.rb +88 -69
- data/lib/bundler/endpoint_specification.rb +32 -15
- data/lib/bundler/env.rb +5 -7
- data/lib/bundler/environment_preserver.rb +8 -22
- data/lib/bundler/errors.rb +101 -13
- data/lib/bundler/feature_flag.rb +0 -2
- data/lib/bundler/fetcher/base.rb +11 -11
- data/lib/bundler/fetcher/compact_index.rb +32 -52
- data/lib/bundler/fetcher/dependency.rb +3 -7
- data/lib/bundler/fetcher/downloader.rb +17 -16
- data/lib/bundler/fetcher/gem_remote_fetcher.rb +16 -0
- data/lib/bundler/fetcher/index.rb +2 -29
- data/lib/bundler/fetcher.rb +87 -79
- data/lib/bundler/force_platform.rb +18 -0
- data/lib/bundler/friendly_errors.rb +29 -40
- data/lib/bundler/gem_helper.rb +11 -23
- data/lib/bundler/gem_helpers.rb +30 -6
- data/lib/bundler/gem_version_promoter.rb +68 -109
- data/lib/bundler/graph.rb +9 -9
- data/lib/bundler/index.rb +71 -79
- data/lib/bundler/injector.rb +23 -11
- data/lib/bundler/inline.rb +11 -23
- data/lib/bundler/installer/gem_installer.rb +18 -11
- data/lib/bundler/installer/parallel_installer.rb +17 -65
- data/lib/bundler/installer/standalone.rb +56 -15
- data/lib/bundler/installer.rb +35 -61
- data/lib/bundler/lazy_specification.rb +92 -61
- data/lib/bundler/lockfile_generator.rb +12 -3
- data/lib/bundler/lockfile_parser.rb +137 -70
- data/lib/bundler/man/bundle-add.1 +19 -26
- data/lib/bundler/man/bundle-add.1.ronn +16 -4
- data/lib/bundler/man/bundle-binstubs.1 +4 -16
- data/lib/bundler/man/bundle-cache.1 +9 -24
- data/lib/bundler/man/bundle-cache.1.ronn +9 -2
- data/lib/bundler/man/bundle-check.1 +5 -12
- data/lib/bundler/man/bundle-check.1.ronn +3 -0
- data/lib/bundler/man/bundle-clean.1 +4 -11
- data/lib/bundler/man/bundle-clean.1.ronn +1 -1
- data/lib/bundler/man/bundle-config.1 +47 -224
- data/lib/bundler/man/bundle-config.1.ronn +40 -28
- data/lib/bundler/man/bundle-console.1 +35 -0
- data/lib/bundler/man/bundle-console.1.ronn +44 -0
- data/lib/bundler/man/bundle-doctor.1 +4 -18
- data/lib/bundler/man/bundle-exec.1 +16 -77
- data/lib/bundler/man/bundle-exec.1.ronn +8 -9
- data/lib/bundler/man/bundle-gem.1 +45 -72
- data/lib/bundler/man/bundle-gem.1.ronn +32 -5
- data/lib/bundler/man/bundle-help.1 +9 -0
- data/lib/bundler/man/bundle-help.1.ronn +12 -0
- data/lib/bundler/man/bundle-info.1 +5 -11
- data/lib/bundler/man/bundle-info.1.ronn +3 -3
- data/lib/bundler/man/bundle-init.1 +6 -11
- data/lib/bundler/man/bundle-init.1.ronn +2 -0
- data/lib/bundler/man/bundle-inject.1 +8 -18
- data/lib/bundler/man/bundle-inject.1.ronn +3 -1
- data/lib/bundler/man/bundle-install.1 +32 -155
- data/lib/bundler/man/bundle-install.1.ronn +11 -33
- data/lib/bundler/man/bundle-list.1 +4 -19
- data/lib/bundler/man/bundle-lock.1 +5 -29
- data/lib/bundler/man/bundle-open.1 +18 -18
- data/lib/bundler/man/bundle-open.1.ronn +9 -1
- data/lib/bundler/man/bundle-outdated.1 +17 -72
- data/lib/bundler/man/bundle-outdated.1.ronn +13 -18
- data/lib/bundler/man/bundle-platform.1 +16 -28
- data/lib/bundler/man/bundle-platform.1.ronn +14 -7
- data/lib/bundler/man/bundle-plugin.1 +58 -0
- data/lib/bundler/man/bundle-plugin.1.ronn +63 -0
- data/lib/bundler/man/bundle-pristine.1 +5 -16
- data/lib/bundler/man/bundle-remove.1 +4 -14
- data/lib/bundler/man/bundle-show.1 +3 -10
- data/lib/bundler/man/bundle-update.1 +19 -138
- data/lib/bundler/man/bundle-update.1.ronn +2 -1
- data/lib/bundler/man/bundle-version.1 +22 -0
- data/lib/bundler/man/bundle-version.1.ronn +24 -0
- data/lib/bundler/man/bundle-viz.1 +6 -15
- data/lib/bundler/man/bundle-viz.1.ronn +2 -0
- data/lib/bundler/man/bundle.1 +17 -51
- data/lib/bundler/man/bundle.1.ronn +12 -7
- data/lib/bundler/man/gemfile.5 +130 -346
- data/lib/bundler/man/gemfile.5.ronn +121 -86
- data/lib/bundler/man/index.txt +4 -0
- data/lib/bundler/match_metadata.rb +17 -0
- data/lib/bundler/match_platform.rb +1 -2
- data/lib/bundler/match_remote_metadata.rb +29 -0
- data/lib/bundler/mirror.rb +8 -10
- data/lib/bundler/plugin/api/source.rb +9 -13
- data/lib/bundler/plugin/index.rb +13 -5
- data/lib/bundler/plugin/installer/git.rb +0 -4
- data/lib/bundler/plugin/installer/path.rb +18 -0
- data/lib/bundler/plugin/installer/rubygems.rb +0 -8
- data/lib/bundler/plugin/installer.rb +42 -19
- data/lib/bundler/plugin/source_list.rb +4 -4
- data/lib/bundler/plugin.rb +16 -7
- data/lib/bundler/process_lock.rb +1 -1
- data/lib/bundler/remote_specification.rb +11 -5
- data/lib/bundler/resolver/base.rb +111 -0
- data/lib/bundler/resolver/candidate.rb +82 -0
- data/lib/bundler/resolver/incompatibility.rb +15 -0
- data/lib/bundler/resolver/package.rb +81 -0
- data/lib/bundler/resolver/root.rb +25 -0
- data/lib/bundler/resolver/spec_group.rb +53 -66
- data/lib/bundler/resolver.rb +419 -307
- data/lib/bundler/retry.rb +1 -1
- data/lib/bundler/ruby_dsl.rb +42 -7
- data/lib/bundler/ruby_version.rb +16 -22
- data/lib/bundler/rubygems_ext.rb +250 -64
- data/lib/bundler/rubygems_gem_installer.rb +90 -64
- data/lib/bundler/rubygems_integration.rb +81 -190
- data/lib/bundler/runtime.rb +8 -13
- data/lib/bundler/safe_marshal.rb +31 -0
- data/lib/bundler/self_manager.rb +206 -0
- data/lib/bundler/settings.rb +139 -57
- data/lib/bundler/setup.rb +13 -1
- data/lib/bundler/shared_helpers.rb +67 -36
- data/lib/bundler/source/git/git_proxy.rb +285 -82
- data/lib/bundler/source/git.rb +81 -41
- data/lib/bundler/source/metadata.rb +17 -16
- data/lib/bundler/source/path/installer.rb +1 -22
- data/lib/bundler/source/path.rb +13 -25
- data/lib/bundler/source/rubygems/remote.rb +1 -1
- data/lib/bundler/source/rubygems.rb +164 -234
- data/lib/bundler/source/rubygems_aggregate.rb +1 -1
- data/lib/bundler/source.rb +7 -6
- data/lib/bundler/source_list.rb +40 -32
- data/lib/bundler/source_map.rb +15 -2
- data/lib/bundler/spec_set.rb +156 -46
- data/lib/bundler/stub_specification.rb +18 -5
- data/lib/bundler/templates/Executable +3 -5
- data/lib/bundler/templates/Executable.bundler +7 -12
- data/lib/bundler/templates/Executable.standalone +4 -4
- data/lib/bundler/templates/Gemfile +0 -2
- data/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +77 -29
- data/lib/bundler/templates/newgem/Cargo.toml.tt +7 -0
- data/lib/bundler/templates/newgem/Gemfile.tt +8 -2
- data/lib/bundler/templates/newgem/README.md.tt +7 -11
- data/lib/bundler/templates/newgem/Rakefile.tt +28 -4
- data/lib/bundler/templates/newgem/bin/console.tt +0 -4
- data/lib/bundler/templates/newgem/circleci/config.yml.tt +12 -0
- data/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +15 -0
- data/lib/bundler/templates/newgem/ext/newgem/extconf-c.rb.tt +10 -0
- data/lib/bundler/templates/newgem/ext/newgem/extconf-rust.rb.tt +6 -0
- data/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt +1 -1
- data/lib/bundler/templates/newgem/ext/newgem/src/lib.rs.tt +12 -0
- data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +13 -3
- data/lib/bundler/templates/newgem/gitignore.tt +3 -0
- data/lib/bundler/templates/newgem/gitlab-ci.yml.tt +13 -4
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +25 -17
- data/lib/bundler/templates/newgem/rubocop.yml.tt +0 -5
- data/lib/bundler/templates/newgem/sig/newgem.rbs.tt +8 -0
- data/lib/bundler/templates/newgem/standard.yml.tt +3 -0
- data/lib/bundler/templates/newgem/test/minitest/{newgem_test.rb.tt → test_newgem.rb.tt} +1 -1
- data/lib/bundler/ui/rg_proxy.rb +1 -1
- data/lib/bundler/ui/shell.rb +38 -15
- data/lib/bundler/ui/silent.rb +21 -5
- data/lib/bundler/uri_credentials_filter.rb +2 -2
- data/lib/bundler/uri_normalizer.rb +23 -0
- data/lib/bundler/vendor/.document +1 -0
- data/lib/bundler/vendor/connection_pool/.document +1 -0
- data/lib/bundler/vendor/connection_pool/LICENSE +20 -0
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +19 -21
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +1 -1
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb +56 -0
- data/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +92 -78
- data/lib/bundler/vendor/fileutils/.document +1 -0
- data/lib/bundler/vendor/fileutils/LICENSE.txt +22 -0
- data/lib/bundler/vendor/fileutils/lib/fileutils.rb +1340 -410
- data/lib/bundler/vendor/net-http-persistent/.document +1 -0
- data/lib/bundler/vendor/net-http-persistent/README.rdoc +82 -0
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb +4 -3
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb +23 -11
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb +1 -1
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +57 -57
- data/lib/bundler/vendor/pub_grub/.document +1 -0
- data/lib/bundler/vendor/pub_grub/LICENSE.txt +21 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb +20 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb +189 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb +182 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb +150 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb +43 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/partial_solution.rb +121 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb +45 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb +19 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb +61 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/term.rb +105 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/version.rb +3 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb +129 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb +411 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +248 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb +178 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub.rb +31 -0
- data/lib/bundler/vendor/thor/.document +1 -0
- data/lib/bundler/vendor/thor/LICENSE.md +20 -0
- data/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb +3 -2
- data/lib/bundler/vendor/thor/lib/thor/actions/directory.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +12 -14
- data/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +16 -6
- data/lib/bundler/vendor/thor/lib/thor/actions.rb +21 -17
- data/lib/bundler/vendor/thor/lib/thor/base.rb +140 -14
- data/lib/bundler/vendor/thor/lib/thor/command.rb +13 -4
- data/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +10 -0
- data/lib/bundler/vendor/thor/lib/thor/error.rb +16 -20
- data/lib/bundler/vendor/thor/lib/thor/group.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor/invocation.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor/nested_context.rb +2 -2
- data/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +20 -1
- data/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +33 -17
- data/lib/bundler/vendor/thor/lib/thor/parser/option.rb +27 -8
- data/lib/bundler/vendor/thor/lib/thor/parser/options.rb +63 -7
- data/lib/bundler/vendor/thor/lib/thor/rake_compat.rb +2 -2
- data/lib/bundler/vendor/thor/lib/thor/runner.rb +40 -30
- data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +48 -154
- data/lib/bundler/vendor/thor/lib/thor/shell/color.rb +1 -46
- data/lib/bundler/vendor/thor/lib/thor/shell/column_printer.rb +29 -0
- data/lib/bundler/vendor/thor/lib/thor/shell/html.rb +0 -45
- data/lib/bundler/vendor/thor/lib/thor/shell/table_printer.rb +134 -0
- data/lib/bundler/vendor/thor/lib/thor/shell/terminal.rb +42 -0
- data/lib/bundler/vendor/thor/lib/thor/shell/wrapped_printer.rb +38 -0
- data/lib/bundler/vendor/thor/lib/thor/shell.rb +2 -2
- data/lib/bundler/vendor/thor/lib/thor/util.rb +9 -8
- data/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor.rb +155 -8
- data/lib/bundler/vendor/tsort/.document +1 -0
- data/lib/bundler/vendor/tsort/LICENSE.txt +22 -0
- data/lib/bundler/vendor/tsort/lib/tsort.rb +455 -0
- data/lib/bundler/vendor/uri/.document +1 -0
- data/lib/bundler/vendor/uri/LICENSE.txt +22 -0
- data/lib/bundler/vendor/uri/lib/uri/common.rb +316 -207
- data/lib/bundler/vendor/uri/lib/uri/file.rb +7 -1
- data/lib/bundler/vendor/uri/lib/uri/ftp.rb +2 -2
- data/lib/bundler/vendor/uri/lib/uri/generic.rb +33 -13
- data/lib/bundler/vendor/uri/lib/uri/http.rb +40 -3
- data/lib/bundler/vendor/uri/lib/uri/https.rb +2 -2
- data/lib/bundler/vendor/uri/lib/uri/ldap.rb +2 -2
- data/lib/bundler/vendor/uri/lib/uri/ldaps.rb +2 -1
- data/lib/bundler/vendor/uri/lib/uri/mailto.rb +2 -3
- data/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +16 -23
- data/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +105 -47
- data/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
- data/lib/bundler/vendor/uri/lib/uri/ws.rb +83 -0
- data/lib/bundler/vendor/uri/lib/uri/wss.rb +23 -0
- data/lib/bundler/vendor/uri/lib/uri.rb +3 -3
- data/lib/bundler/vendored_net_http.rb +23 -0
- data/lib/bundler/vendored_persistent.rb +0 -36
- data/lib/bundler/{vendored_molinillo.rb → vendored_pub_grub.rb} +1 -1
- data/lib/bundler/vendored_timeout.rb +12 -0
- data/lib/bundler/{vendored_tmpdir.rb → vendored_tsort.rb} +1 -1
- data/lib/bundler/vendored_uri.rb +18 -1
- data/lib/bundler/version.rb +5 -1
- data/lib/bundler/vlad.rb +1 -1
- data/lib/bundler/worker.rb +7 -9
- data/lib/bundler/yaml_serializer.rb +21 -12
- data/lib/bundler.rb +114 -121
- metadata +87 -41
- data/lib/bundler/dep_proxy.rb +0 -55
- data/lib/bundler/gemdeps.rb +0 -29
- data/lib/bundler/psyched_yaml.rb +0 -22
- data/lib/bundler/templates/gems.rb +0 -8
- data/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt +0 -5
- data/lib/bundler/templates/newgem/travis.yml.tt +0 -6
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/monotonic_time.rb +0 -66
- data/lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +0 -57
- data/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +0 -88
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb +0 -36
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +0 -66
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +0 -62
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +0 -63
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +0 -61
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb +0 -126
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb +0 -46
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +0 -36
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +0 -164
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +0 -255
- data/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +0 -143
- data/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +0 -6
- data/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +0 -112
- data/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb +0 -67
- data/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +0 -839
- data/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb +0 -46
- data/lib/bundler/vendor/molinillo/lib/molinillo/state.rb +0 -58
- data/lib/bundler/vendor/molinillo/lib/molinillo.rb +0 -11
- data/lib/bundler/vendor/tmpdir/lib/tmpdir.rb +0 -154
- data/lib/bundler/version_ranges.rb +0 -122
data/lib/bundler/cli/install.rb
CHANGED
@@ -12,7 +12,9 @@ module Bundler
|
|
12
12
|
|
13
13
|
warn_if_root
|
14
14
|
|
15
|
-
Bundler
|
15
|
+
Bundler.self_manager.install_locked_bundler_and_restart_with_it_if_needed
|
16
|
+
|
17
|
+
Bundler::SharedHelpers.set_env "RB_USER_INSTALL", "1" if Gem.freebsd_platform?
|
16
18
|
|
17
19
|
# Disable color in deployment mode
|
18
20
|
Bundler.ui.shell = Thor::Shell::Basic.new if options[:deployment]
|
@@ -26,8 +28,8 @@ module Bundler
|
|
26
28
|
flag = "--deployment flag" if options[:deployment]
|
27
29
|
flag ||= "--frozen flag" if options[:frozen]
|
28
30
|
flag ||= "deployment setting"
|
29
|
-
raise ProductionError, "The #{flag} requires a
|
30
|
-
"sure you have checked your #{
|
31
|
+
raise ProductionError, "The #{flag} requires a lockfile. Please make " \
|
32
|
+
"sure you have checked your #{SharedHelpers.relative_lockfile_path} into version control " \
|
31
33
|
"before deploying."
|
32
34
|
end
|
33
35
|
|
@@ -49,7 +51,8 @@ module Bundler
|
|
49
51
|
|
50
52
|
if options["binstubs"]
|
51
53
|
Bundler::SharedHelpers.major_deprecation 2,
|
52
|
-
"The --binstubs option will be removed in favor of `bundle binstubs --all`"
|
54
|
+
"The --binstubs option will be removed in favor of `bundle binstubs --all`",
|
55
|
+
removed_message: "The --binstubs option have been removed in favor of `bundle binstubs --all`"
|
53
56
|
end
|
54
57
|
|
55
58
|
Plugin.gemfile_install(Bundler.default_gemfile) if Bundler.feature_flag.plugins?
|
@@ -59,7 +62,7 @@ module Bundler
|
|
59
62
|
|
60
63
|
installer = Installer.install(Bundler.root, definition, options)
|
61
64
|
|
62
|
-
Bundler.settings.temporary(:
|
65
|
+
Bundler.settings.temporary(cache_all_platforms: options[:local] ? false : Bundler.settings[:cache_all_platforms]) do
|
63
66
|
Bundler.load.cache(nil, options[:local]) if Bundler.app_cache.exist? && !options["no-cache"] && !Bundler.frozen_bundle?
|
64
67
|
end
|
65
68
|
|
@@ -92,9 +95,8 @@ module Bundler
|
|
92
95
|
|
93
96
|
def warn_if_root
|
94
97
|
return if Bundler.settings[:silence_root_warning] || Gem.win_platform? || !Process.uid.zero?
|
95
|
-
Bundler.ui.warn "Don't run Bundler as root.
|
96
|
-
|
97
|
-
"application for all non-root users on this machine.", :wrap => true
|
98
|
+
Bundler.ui.warn "Don't run Bundler as root. Installing your bundle as root " \
|
99
|
+
"will break this application for all non-root users on this machine.", wrap: true
|
98
100
|
end
|
99
101
|
|
100
102
|
def dependencies_count_for(definition)
|
@@ -133,46 +135,27 @@ module Bundler
|
|
133
135
|
end
|
134
136
|
|
135
137
|
def normalize_groups
|
136
|
-
options[:with] &&= options[:with].join(":").tr(" ", ":").split(":")
|
137
|
-
options[:without] &&= options[:without].join(":").tr(" ", ":").split(":")
|
138
|
-
|
139
138
|
check_for_group_conflicts_in_cli_options
|
140
139
|
|
141
|
-
|
142
|
-
Bundler.settings.set_command_option :without, nil
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
with -= options[:without] if options[:without]
|
147
|
-
|
148
|
-
without = options.fetch(:without, [])
|
149
|
-
without |= Bundler.settings[:without].map(&:to_s)
|
150
|
-
without -= options[:with] if options[:with]
|
151
|
-
|
152
|
-
options[:with] = with
|
153
|
-
options[:without] = without
|
154
|
-
|
155
|
-
unless Bundler.settings[:without] == options[:without] && Bundler.settings[:with] == options[:with]
|
156
|
-
# need to nil them out first to get around validation for backwards compatibility
|
157
|
-
Bundler.settings.set_command_option :without, nil
|
158
|
-
Bundler.settings.set_command_option :with, nil
|
159
|
-
Bundler.settings.set_command_option :without, options[:without] - options[:with]
|
160
|
-
Bundler.settings.set_command_option :with, options[:with]
|
161
|
-
end
|
140
|
+
# need to nil them out first to get around validation for backwards compatibility
|
141
|
+
Bundler.settings.set_command_option :without, nil
|
142
|
+
Bundler.settings.set_command_option :with, nil
|
143
|
+
Bundler.settings.set_command_option :without, options[:without]
|
144
|
+
Bundler.settings.set_command_option :with, options[:with]
|
162
145
|
end
|
163
146
|
|
164
147
|
def normalize_settings
|
165
148
|
Bundler.settings.set_command_option :path, nil if options[:system]
|
166
|
-
Bundler.settings.temporary(:path_relative_to_cwd => false) do
|
167
|
-
Bundler.settings.set_command_option :path, "vendor/bundle" if Bundler.settings[:deployment] && Bundler.settings[:path].nil?
|
168
|
-
end
|
169
149
|
Bundler.settings.set_command_option_if_given :path, options[:path]
|
170
|
-
|
171
|
-
|
150
|
+
|
151
|
+
if options["standalone"] && Bundler.settings[:path].nil? && !options["local"]
|
152
|
+
Bundler.settings.temporary(path_relative_to_cwd: false) do
|
153
|
+
Bundler.settings.set_command_option :path, "bundle"
|
154
|
+
end
|
172
155
|
end
|
173
156
|
|
174
157
|
bin_option = options["binstubs"]
|
175
|
-
bin_option = nil if bin_option
|
158
|
+
bin_option = nil if bin_option&.empty?
|
176
159
|
Bundler.settings.set_command_option :bin, bin_option if options["binstubs"]
|
177
160
|
|
178
161
|
Bundler.settings.set_command_option_if_given :shebang, options["shebang"]
|
@@ -185,7 +168,7 @@ module Bundler
|
|
185
168
|
|
186
169
|
Bundler.settings.set_command_option_if_given :clean, options["clean"]
|
187
170
|
|
188
|
-
normalize_groups
|
171
|
+
normalize_groups if options[:without] || options[:with]
|
189
172
|
|
190
173
|
options[:force] = options[:redownload]
|
191
174
|
end
|
data/lib/bundler/cli/issue.rb
CHANGED
@@ -5,7 +5,7 @@ require "rbconfig"
|
|
5
5
|
module Bundler
|
6
6
|
class CLI::Issue
|
7
7
|
def run
|
8
|
-
Bundler.ui.info
|
8
|
+
Bundler.ui.info <<~EOS
|
9
9
|
Did you find an issue with Bundler? Before filing a new issue,
|
10
10
|
be sure to check out these resources:
|
11
11
|
|
@@ -20,9 +20,10 @@ module Bundler
|
|
20
20
|
|
21
21
|
Hopefully the troubleshooting steps above resolved your problem! If things
|
22
22
|
still aren't working the way you expect them to, please let us know so
|
23
|
-
that we can diagnose and help fix the problem you're having
|
24
|
-
|
25
|
-
https://github.com/rubygems/rubygems/
|
23
|
+
that we can diagnose and help fix the problem you're having, by filling
|
24
|
+
in the new issue form located at
|
25
|
+
https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md,
|
26
|
+
and copy and pasting the information below.
|
26
27
|
|
27
28
|
EOS
|
28
29
|
|
data/lib/bundler/cli/lock.rb
CHANGED
@@ -15,53 +15,60 @@ module Bundler
|
|
15
15
|
end
|
16
16
|
|
17
17
|
print = options[:print]
|
18
|
-
|
19
|
-
Bundler.ui =
|
18
|
+
previous_ui_level = Bundler.ui.level
|
19
|
+
Bundler.ui.level = "silent" if print
|
20
20
|
|
21
21
|
Bundler::Fetcher.disable_endpoint = options["full-index"]
|
22
22
|
|
23
23
|
update = options[:update]
|
24
24
|
conservative = options[:conservative]
|
25
|
+
bundler = options[:bundler]
|
25
26
|
|
26
27
|
if update.is_a?(Array) # unlocking specific gems
|
27
28
|
Bundler::CLI::Common.ensure_all_gems_in_lockfile!(update)
|
28
|
-
update = { :
|
29
|
-
elsif update
|
30
|
-
update = { :
|
29
|
+
update = { gems: update, conservative: conservative }
|
30
|
+
elsif update && conservative
|
31
|
+
update = { conservative: conservative }
|
32
|
+
elsif update && bundler
|
33
|
+
update = { bundler: bundler }
|
31
34
|
end
|
32
|
-
definition = Bundler.definition(update)
|
33
35
|
|
34
|
-
|
36
|
+
file = options[:lockfile]
|
37
|
+
file = file ? Pathname.new(file).expand_path : Bundler.default_lockfile
|
35
38
|
|
36
|
-
|
37
|
-
definition.
|
38
|
-
|
39
|
+
Bundler.settings.temporary(frozen: false) do
|
40
|
+
definition = Bundler.definition(update, file)
|
41
|
+
|
42
|
+
Bundler::CLI::Common.configure_gem_version_promoter(definition, options) if options[:update]
|
39
43
|
|
40
|
-
|
41
|
-
|
42
|
-
if platform.to_s == "unknown"
|
43
|
-
Bundler.ui.warn "The platform `#{platform_string}` is unknown to RubyGems " \
|
44
|
-
"and adding it will likely lead to resolution errors"
|
44
|
+
options["remove-platform"].each do |platform|
|
45
|
+
definition.remove_platform(platform)
|
45
46
|
end
|
46
|
-
definition.add_platform(platform)
|
47
|
-
end
|
48
47
|
|
49
|
-
|
50
|
-
|
51
|
-
|
48
|
+
options["add-platform"].each do |platform_string|
|
49
|
+
platform = Gem::Platform.new(platform_string)
|
50
|
+
if platform.to_s == "unknown"
|
51
|
+
Bundler.ui.warn "The platform `#{platform_string}` is unknown to RubyGems " \
|
52
|
+
"and adding it will likely lead to resolution errors"
|
53
|
+
end
|
54
|
+
definition.add_platform(platform)
|
55
|
+
end
|
56
|
+
|
57
|
+
if definition.platforms.empty?
|
58
|
+
raise InvalidOption, "Removing all platforms from the bundle is not allowed"
|
59
|
+
end
|
52
60
|
|
53
|
-
|
61
|
+
definition.resolve_remotely! unless options[:local]
|
54
62
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
definition.lock(file)
|
63
|
+
if print
|
64
|
+
puts definition.to_lock
|
65
|
+
else
|
66
|
+
puts "Writing lockfile to #{file}"
|
67
|
+
definition.lock
|
68
|
+
end
|
62
69
|
end
|
63
70
|
|
64
|
-
Bundler.ui =
|
71
|
+
Bundler.ui.level = previous_ui_level
|
65
72
|
end
|
66
73
|
end
|
67
74
|
end
|
data/lib/bundler/cli/open.rb
CHANGED
@@ -2,27 +2,27 @@
|
|
2
2
|
|
3
3
|
module Bundler
|
4
4
|
class CLI::Open
|
5
|
-
attr_reader :options, :name
|
5
|
+
attr_reader :options, :name, :path
|
6
6
|
def initialize(options, name)
|
7
7
|
@options = options
|
8
8
|
@name = name
|
9
|
+
@path = options[:path] unless options[:path].nil?
|
9
10
|
end
|
10
11
|
|
11
12
|
def run
|
13
|
+
raise InvalidOption, "Cannot specify `--path` option without a value" if !@path.nil? && @path.empty?
|
12
14
|
editor = [ENV["BUNDLER_EDITOR"], ENV["VISUAL"], ENV["EDITOR"]].find {|e| !e.nil? && !e.empty? }
|
13
15
|
return Bundler.ui.info("To open a bundled gem, set $EDITOR or $BUNDLER_EDITOR") unless editor
|
14
16
|
return unless spec = Bundler::CLI::Common.select_spec(name, :regex_match)
|
15
17
|
if spec.default_gem?
|
16
18
|
Bundler.ui.info "Unable to open #{name} because it's a default gem, so the directory it would normally be installed to does not exist."
|
17
19
|
else
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
end || Bundler.ui.info("Could not run '#{command.join(" ")}'")
|
25
|
-
end
|
20
|
+
root_path = spec.full_gem_path
|
21
|
+
require "shellwords"
|
22
|
+
command = Shellwords.split(editor) << File.join([root_path, path].compact)
|
23
|
+
Bundler.with_original_env do
|
24
|
+
system(*command, { chdir: root_path })
|
25
|
+
end || Bundler.ui.info("Could not run '#{command.join(" ")}'")
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
data/lib/bundler/cli/outdated.rb
CHANGED
@@ -41,12 +41,12 @@ module Bundler
|
|
41
41
|
# We're doing a full update
|
42
42
|
Bundler.definition(true)
|
43
43
|
else
|
44
|
-
Bundler.definition(:
|
44
|
+
Bundler.definition(gems: gems, sources: sources)
|
45
45
|
end
|
46
46
|
|
47
47
|
Bundler::CLI::Common.configure_gem_version_promoter(
|
48
48
|
Bundler.definition,
|
49
|
-
options
|
49
|
+
options.merge(strict: @strict)
|
50
50
|
)
|
51
51
|
|
52
52
|
definition_resolution = proc do
|
@@ -90,10 +90,10 @@ module Bundler
|
|
90
90
|
end
|
91
91
|
|
92
92
|
outdated_gems << {
|
93
|
-
:
|
94
|
-
:
|
95
|
-
:
|
96
|
-
:
|
93
|
+
active_spec: active_spec,
|
94
|
+
current_spec: current_spec,
|
95
|
+
dependency: dependency,
|
96
|
+
groups: groups,
|
97
97
|
}
|
98
98
|
end
|
99
99
|
|
@@ -111,9 +111,7 @@ module Bundler
|
|
111
111
|
end.compact
|
112
112
|
|
113
113
|
if options[:parseable]
|
114
|
-
relevant_outdated_gems
|
115
|
-
print_gems(gems)
|
116
|
-
end
|
114
|
+
print_gems(relevant_outdated_gems)
|
117
115
|
else
|
118
116
|
print_gems_table(relevant_outdated_gems)
|
119
117
|
end
|
@@ -129,6 +127,12 @@ module Bundler
|
|
129
127
|
|
130
128
|
private
|
131
129
|
|
130
|
+
def loaded_from_for(spec)
|
131
|
+
return unless spec.respond_to?(:loaded_from)
|
132
|
+
|
133
|
+
spec.loaded_from
|
134
|
+
end
|
135
|
+
|
132
136
|
def groups_text(group_text, groups)
|
133
137
|
"#{group_text}#{groups.split(",").size > 1 ? "s" : ""} \"#{groups}\""
|
134
138
|
end
|
@@ -184,10 +188,13 @@ module Bundler
|
|
184
188
|
|
185
189
|
def print_gem(current_spec, active_spec, dependency, groups)
|
186
190
|
spec_version = "#{active_spec.version}#{active_spec.git_version}"
|
187
|
-
|
191
|
+
if Bundler.ui.debug?
|
192
|
+
loaded_from = loaded_from_for(active_spec)
|
193
|
+
spec_version += " (from #{loaded_from})" if loaded_from
|
194
|
+
end
|
188
195
|
current_version = "#{current_spec.version}#{current_spec.git_version}"
|
189
196
|
|
190
|
-
if dependency
|
197
|
+
if dependency&.specific?
|
191
198
|
dependency_version = %(, requested #{dependency.requirement})
|
192
199
|
end
|
193
200
|
|
@@ -211,7 +218,7 @@ module Bundler
|
|
211
218
|
dependency = dependency.requirement if dependency
|
212
219
|
|
213
220
|
ret_val = [active_spec.name, current_version, spec_version, dependency.to_s, groups.to_s]
|
214
|
-
ret_val << active_spec.
|
221
|
+
ret_val << loaded_from_for(active_spec).to_s if Bundler.ui.debug?
|
215
222
|
ret_val
|
216
223
|
end
|
217
224
|
|
data/lib/bundler/cli/platform.rb
CHANGED
@@ -8,12 +8,12 @@ module Bundler
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def run
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
locked_ruby_version || gemfile_ruby_version]
|
11
|
+
ruby_version = if Bundler.locked_gems
|
12
|
+
Bundler.locked_gems.ruby_version&.gsub(/p\d+\Z/, "")
|
13
|
+
else
|
14
|
+
Bundler.definition.ruby_version&.single_version_string
|
16
15
|
end
|
16
|
+
|
17
17
|
output = []
|
18
18
|
|
19
19
|
if options[:ruby]
|
@@ -23,7 +23,9 @@ module Bundler
|
|
23
23
|
output << "No ruby version specified"
|
24
24
|
end
|
25
25
|
else
|
26
|
-
|
26
|
+
platforms = Bundler.definition.platforms.map {|p| "* #{p}" }
|
27
|
+
|
28
|
+
output << "Your platform is: #{Gem::Platform.local}"
|
27
29
|
output << "Your app has gems that work on these platforms:\n#{platforms.join("\n")}"
|
28
30
|
|
29
31
|
if ruby_version
|
data/lib/bundler/cli/plugin.rb
CHANGED
@@ -5,20 +5,15 @@ module Bundler
|
|
5
5
|
class CLI::Plugin < Thor
|
6
6
|
desc "install PLUGINS", "Install the plugin from the source"
|
7
7
|
long_desc <<-D
|
8
|
-
Install plugins either from the rubygems source provided (with --source option)
|
8
|
+
Install plugins either from the rubygems source provided (with --source option), from a git source provided with --git, or a local path provided with --path. If no sources are provided, it uses Gem.sources
|
9
9
|
D
|
10
|
-
method_option "source", :
|
11
|
-
|
12
|
-
method_option "
|
13
|
-
|
14
|
-
method_option "
|
15
|
-
|
16
|
-
method_option "
|
17
|
-
"Path of the local git repo to fetch from"
|
18
|
-
method_option "branch", :type => :string, :default => nil, :banner =>
|
19
|
-
"The git branch to checkout"
|
20
|
-
method_option "ref", :type => :string, :default => nil, :banner =>
|
21
|
-
"The git revision to check out"
|
10
|
+
method_option "source", type: :string, default: nil, banner: "URL of the RubyGems source to fetch the plugin from"
|
11
|
+
method_option "version", type: :string, default: nil, banner: "The version of the plugin to fetch"
|
12
|
+
method_option "git", type: :string, default: nil, banner: "URL of the git repo to fetch from"
|
13
|
+
method_option "local_git", type: :string, default: nil, banner: "Path of the local git repo to fetch from (deprecated)"
|
14
|
+
method_option "branch", type: :string, default: nil, banner: "The git branch to checkout"
|
15
|
+
method_option "ref", type: :string, default: nil, banner: "The git revision to check out"
|
16
|
+
method_option "path", type: :string, default: nil, banner: "Path of a local gem to directly use"
|
22
17
|
def install(*plugins)
|
23
18
|
Bundler::Plugin.install(plugins, options)
|
24
19
|
end
|
@@ -27,8 +22,7 @@ module Bundler
|
|
27
22
|
long_desc <<-D
|
28
23
|
Uninstall given list of plugins. To uninstall all the plugins, use -all option.
|
29
24
|
D
|
30
|
-
method_option "all", :
|
31
|
-
"Uninstall all the installed plugins. If no plugin is installed, then it does nothing."
|
25
|
+
method_option "all", type: :boolean, default: nil, banner: "Uninstall all the installed plugins. If no plugin is installed, then it does nothing."
|
32
26
|
def uninstall(*plugins)
|
33
27
|
Bundler::Plugin.uninstall(plugins, options)
|
34
28
|
end
|
data/lib/bundler/cli/pristine.rb
CHANGED
@@ -12,40 +12,48 @@ module Bundler
|
|
12
12
|
definition.validate_runtime!
|
13
13
|
installer = Bundler::Installer.new(Bundler.root, definition)
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
15
|
+
ProcessLock.lock do
|
16
|
+
installed_specs = definition.specs.reject do |spec|
|
17
|
+
next if spec.name == "bundler" # Source::Rubygems doesn't install bundler
|
18
|
+
next if !@gems.empty? && !@gems.include?(spec.name)
|
19
|
+
|
20
|
+
gem_name = "#{spec.name} (#{spec.version}#{spec.git_version})"
|
21
|
+
gem_name += " (#{spec.platform})" if !spec.platform.nil? && spec.platform != Gem::Platform::RUBY
|
22
|
+
|
23
|
+
case source = spec.source
|
24
|
+
when Source::Rubygems
|
25
|
+
cached_gem = spec.cache_file
|
26
|
+
unless File.exist?(cached_gem)
|
27
|
+
Bundler.ui.error("Failed to pristine #{gem_name}. Cached gem #{cached_gem} does not exist.")
|
28
|
+
next
|
29
|
+
end
|
30
|
+
|
31
|
+
FileUtils.rm_rf spec.full_gem_path
|
32
|
+
when Source::Git
|
33
|
+
if source.local?
|
34
|
+
Bundler.ui.warn("Cannot pristine #{gem_name}. Gem is locally overridden.")
|
35
|
+
next
|
36
|
+
end
|
37
|
+
|
38
|
+
source.remote!
|
39
|
+
if extension_cache_path = source.extension_cache_path(spec)
|
40
|
+
FileUtils.rm_rf extension_cache_path
|
41
|
+
end
|
42
|
+
FileUtils.rm_rf spec.extension_dir
|
43
|
+
FileUtils.rm_rf spec.full_gem_path
|
44
|
+
else
|
45
|
+
Bundler.ui.warn("Cannot pristine #{gem_name}. Gem is sourced from local path.")
|
27
46
|
next
|
28
47
|
end
|
29
48
|
|
30
|
-
|
31
|
-
|
32
|
-
if source.local?
|
33
|
-
Bundler.ui.warn("Cannot pristine #{gem_name}. Gem is locally overridden.")
|
34
|
-
next
|
35
|
-
end
|
49
|
+
true
|
50
|
+
end.map(&:name)
|
36
51
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
FileUtils.rm_rf spec.full_gem_path
|
43
|
-
else
|
44
|
-
Bundler.ui.warn("Cannot pristine #{gem_name}. Gem is sourced from local path.")
|
45
|
-
next
|
46
|
-
end
|
47
|
-
|
48
|
-
Bundler::GemInstaller.new(spec, installer, false, 0, true).install_from_spec
|
52
|
+
jobs = installer.send(:installation_parallelization, {})
|
53
|
+
pristine_count = definition.specs.count - installed_specs.count
|
54
|
+
# allow a pristining a single gem to skip the parallel worker
|
55
|
+
jobs = [jobs, pristine_count].min
|
56
|
+
ParallelInstaller.call(installer, definition.specs, jobs, false, true, skip: installed_specs)
|
49
57
|
end
|
50
58
|
end
|
51
59
|
end
|
data/lib/bundler/cli/show.rb
CHANGED
@@ -18,7 +18,7 @@ module Bundler
|
|
18
18
|
|
19
19
|
if gem_name
|
20
20
|
if gem_name == "bundler"
|
21
|
-
path = File.expand_path("
|
21
|
+
path = File.expand_path("../../..", __dir__)
|
22
22
|
else
|
23
23
|
spec = Bundler::CLI::Common.select_spec(gem_name, :regex_match)
|
24
24
|
return unless spec
|
@@ -40,8 +40,8 @@ module Bundler
|
|
40
40
|
desc = " * #{s.name} (#{s.version}#{s.git_version})"
|
41
41
|
if @verbose
|
42
42
|
latest = latest_specs.find {|l| l.name == s.name }
|
43
|
-
Bundler.ui.info
|
44
|
-
#{desc}
|
43
|
+
Bundler.ui.info <<~END
|
44
|
+
#{desc.lstrip}
|
45
45
|
\tSummary: #{s.summary || "No description available."}
|
46
46
|
\tHomepage: #{s.homepage || "No website available."}
|
47
47
|
\tStatus: #{outdated?(s, latest) ? "Outdated - #{s.version} < #{latest.version}" : "Up to date"}
|
data/lib/bundler/cli/update.rb
CHANGED
@@ -11,12 +11,16 @@ module Bundler
|
|
11
11
|
def run
|
12
12
|
Bundler.ui.level = "warn" if options[:quiet]
|
13
13
|
|
14
|
+
update_bundler = options[:bundler]
|
15
|
+
|
16
|
+
Bundler.self_manager.update_bundler_and_restart_with_it_if_needed(update_bundler) if update_bundler
|
17
|
+
|
14
18
|
Plugin.gemfile_install(Bundler.default_gemfile) if Bundler.feature_flag.plugins?
|
15
19
|
|
16
20
|
sources = Array(options[:source])
|
17
21
|
groups = Array(options[:group]).map(&:to_sym)
|
18
22
|
|
19
|
-
full_update = gems.empty? && sources.empty? && groups.empty? && !options[:ruby] && !
|
23
|
+
full_update = gems.empty? && sources.empty? && groups.empty? && !options[:ruby] && !update_bundler
|
20
24
|
|
21
25
|
if full_update && !options[:all]
|
22
26
|
if Bundler.feature_flag.update_requires_all_flag?
|
@@ -31,7 +35,7 @@ module Bundler
|
|
31
35
|
|
32
36
|
if full_update
|
33
37
|
if conservative
|
34
|
-
Bundler.definition(:
|
38
|
+
Bundler.definition(conservative: conservative)
|
35
39
|
else
|
36
40
|
Bundler.definition(true)
|
37
41
|
end
|
@@ -47,9 +51,9 @@ module Bundler
|
|
47
51
|
gems.concat(deps.map(&:name))
|
48
52
|
end
|
49
53
|
|
50
|
-
Bundler.definition(:
|
51
|
-
:
|
52
|
-
:
|
54
|
+
Bundler.definition(gems: gems, sources: sources, ruby: options[:ruby],
|
55
|
+
conservative: conservative,
|
56
|
+
bundler: update_bundler)
|
53
57
|
end
|
54
58
|
|
55
59
|
Bundler::CLI::Common.configure_gem_version_promoter(Bundler.definition, options)
|
@@ -59,6 +63,7 @@ module Bundler
|
|
59
63
|
opts = options.dup
|
60
64
|
opts["update"] = true
|
61
65
|
opts["local"] = options[:local]
|
66
|
+
opts["force"] = options[:redownload]
|
62
67
|
|
63
68
|
Bundler.settings.set_command_option_if_given :jobs, opts["jobs"]
|
64
69
|
|
@@ -66,7 +71,7 @@ module Bundler
|
|
66
71
|
|
67
72
|
if locked_gems = Bundler.definition.locked_gems
|
68
73
|
previous_locked_info = locked_gems.specs.reduce({}) do |h, s|
|
69
|
-
h[s.name] = { :
|
74
|
+
h[s.name] = { spec: s, version: s.version, source: s.source.identifier }
|
70
75
|
h
|
71
76
|
end
|
72
77
|
end
|
@@ -95,7 +100,7 @@ module Bundler
|
|
95
100
|
end
|
96
101
|
|
97
102
|
locked_source = locked_info[:source]
|
98
|
-
new_source = new_spec.source.
|
103
|
+
new_source = new_spec.source.identifier
|
99
104
|
next if locked_source != new_source
|
100
105
|
|
101
106
|
new_version = new_spec.version
|
data/lib/bundler/cli/viz.rb
CHANGED
@@ -23,7 +23,7 @@ module Bundler
|
|
23
23
|
Bundler.ui.warn "Make sure you have the graphviz ruby gem. You can install it with:"
|
24
24
|
Bundler.ui.warn "`gem install ruby-graphviz`"
|
25
25
|
rescue StandardError => e
|
26
|
-
raise unless e.message
|
26
|
+
raise unless e.message.to_s.include?("GraphViz not installed or dot not in PATH")
|
27
27
|
Bundler.ui.error e.message
|
28
28
|
Bundler.ui.warn "Please install GraphViz. On a Mac with Homebrew, you can run `brew install graphviz`."
|
29
29
|
end
|