bundler 2.1.4 → 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2468 -1430
- data/README.md +8 -10
- data/bundler.gemspec +10 -13
- data/exe/bundle +7 -8
- data/exe/bundler +1 -1
- data/lib/bundler/.document +1 -0
- data/lib/bundler/build_metadata.rb +3 -11
- data/lib/bundler/cli/add.rb +2 -2
- data/lib/bundler/cli/binstubs.rb +6 -2
- data/lib/bundler/cli/cache.rb +3 -8
- data/lib/bundler/cli/check.rb +5 -3
- data/lib/bundler/cli/clean.rb +1 -1
- data/lib/bundler/cli/common.rb +32 -3
- data/lib/bundler/cli/config.rb +10 -1
- data/lib/bundler/cli/console.rb +3 -3
- data/lib/bundler/cli/doctor.rb +23 -6
- data/lib/bundler/cli/exec.rb +5 -10
- data/lib/bundler/cli/fund.rb +36 -0
- data/lib/bundler/cli/gem.rb +258 -45
- data/lib/bundler/cli/info.rb +38 -6
- data/lib/bundler/cli/init.rb +7 -3
- data/lib/bundler/cli/inject.rb +1 -1
- data/lib/bundler/cli/install.rb +27 -57
- data/lib/bundler/cli/issue.rb +5 -4
- data/lib/bundler/cli/list.rb +19 -11
- data/lib/bundler/cli/lock.rb +11 -4
- data/lib/bundler/cli/open.rb +1 -2
- data/lib/bundler/cli/outdated.rb +106 -79
- data/lib/bundler/cli/platform.rb +2 -2
- data/lib/bundler/cli/plugin.rb +10 -0
- data/lib/bundler/cli/pristine.rb +5 -0
- data/lib/bundler/cli/remove.rb +1 -2
- data/lib/bundler/cli/show.rb +2 -2
- data/lib/bundler/cli/update.rb +20 -9
- data/lib/bundler/cli/viz.rb +1 -1
- data/lib/bundler/cli.rb +149 -85
- data/lib/bundler/compact_index_client/cache.rb +7 -24
- data/lib/bundler/compact_index_client/gem_parser.rb +28 -0
- data/lib/bundler/compact_index_client/updater.rb +56 -51
- data/lib/bundler/compact_index_client.rb +3 -9
- data/lib/bundler/constants.rb +1 -1
- data/lib/bundler/current_ruby.rb +17 -6
- data/lib/bundler/definition.rb +343 -440
- data/lib/bundler/dependency.rb +23 -77
- data/lib/bundler/digest.rb +71 -0
- data/lib/bundler/dsl.rb +77 -85
- data/lib/bundler/endpoint_specification.rb +20 -14
- data/lib/bundler/env.rb +3 -3
- data/lib/bundler/environment_preserver.rb +30 -2
- data/lib/bundler/errors.rb +31 -14
- data/lib/bundler/feature_flag.rb +0 -9
- data/lib/bundler/fetcher/base.rb +7 -9
- data/lib/bundler/fetcher/compact_index.rb +20 -27
- data/lib/bundler/fetcher/dependency.rb +1 -1
- data/lib/bundler/fetcher/downloader.rb +11 -11
- data/lib/bundler/fetcher/index.rb +2 -30
- data/lib/bundler/fetcher.rb +24 -29
- data/lib/bundler/force_platform.rb +18 -0
- data/lib/bundler/friendly_errors.rb +45 -49
- data/lib/bundler/gem_helper.rb +53 -31
- data/lib/bundler/gem_helpers.rb +42 -24
- data/lib/bundler/gem_version_promoter.rb +54 -99
- data/lib/bundler/graph.rb +4 -4
- data/lib/bundler/index.rb +14 -52
- data/lib/bundler/injector.rb +40 -8
- data/lib/bundler/inline.rb +6 -15
- data/lib/bundler/installer/gem_installer.rb +19 -24
- data/lib/bundler/installer/parallel_installer.rb +32 -42
- data/lib/bundler/installer/standalone.rb +58 -11
- data/lib/bundler/installer.rb +47 -87
- data/lib/bundler/lazy_specification.rb +76 -35
- data/lib/bundler/lockfile_generator.rb +3 -3
- data/lib/bundler/lockfile_parser.rb +24 -49
- data/lib/bundler/man/.document +1 -0
- data/{man → lib/bundler/man}/bundle-add.1 +21 -5
- data/{man/bundle-add.ronn → lib/bundler/man/bundle-add.1.ronn} +16 -4
- data/{man → lib/bundler/man}/bundle-binstubs.1 +5 -3
- data/{man/bundle-binstubs.ronn → lib/bundler/man/bundle-binstubs.1.ronn} +2 -4
- data/{man → lib/bundler/man}/bundle-cache.1 +7 -1
- data/{man/bundle-cache.ronn → lib/bundler/man/bundle-cache.1.ronn} +7 -0
- data/{man → lib/bundler/man}/bundle-check.1 +1 -1
- data/{man → lib/bundler/man}/bundle-clean.1 +2 -2
- data/{man/bundle-clean.ronn → lib/bundler/man/bundle-clean.1.ronn} +1 -1
- data/{man → lib/bundler/man}/bundle-config.1 +65 -47
- data/{man/bundle-config.ronn → lib/bundler/man/bundle-config.1.ronn} +74 -65
- data/lib/bundler/man/bundle-console.1 +53 -0
- data/lib/bundler/man/bundle-console.1.ronn +44 -0
- data/{man → lib/bundler/man}/bundle-doctor.1 +1 -1
- data/{man → lib/bundler/man}/bundle-exec.1 +2 -2
- data/{man/bundle-exec.ronn → lib/bundler/man/bundle-exec.1.ronn} +1 -1
- data/lib/bundler/man/bundle-gem.1 +105 -0
- data/lib/bundler/man/bundle-gem.1.ronn +117 -0
- data/lib/bundler/man/bundle-help.1 +13 -0
- data/lib/bundler/man/bundle-help.1.ronn +12 -0
- data/{man → lib/bundler/man}/bundle-info.1 +1 -1
- data/{man → lib/bundler/man}/bundle-init.1 +1 -1
- data/{man → lib/bundler/man}/bundle-inject.1 +5 -2
- data/{man/bundle-inject.ronn → lib/bundler/man/bundle-inject.1.ronn} +3 -1
- data/{man → lib/bundler/man}/bundle-install.1 +35 -33
- data/{man/bundle-install.ronn → lib/bundler/man/bundle-install.1.ronn} +33 -34
- data/{man → lib/bundler/man}/bundle-list.1 +7 -7
- data/{man/bundle-list.ronn → lib/bundler/man/bundle-list.1.ronn} +6 -6
- data/{man → lib/bundler/man}/bundle-lock.1 +1 -1
- data/{man → lib/bundler/man}/bundle-open.1 +1 -1
- data/{man → lib/bundler/man}/bundle-outdated.1 +3 -10
- data/{man/bundle-outdated.ronn → lib/bundler/man/bundle-outdated.1.ronn} +1 -10
- data/{man → lib/bundler/man}/bundle-platform.1 +16 -6
- data/{man/bundle-platform.ronn → lib/bundler/man/bundle-platform.1.ronn} +14 -7
- data/lib/bundler/man/bundle-plugin.1 +81 -0
- data/lib/bundler/man/bundle-plugin.1.ronn +59 -0
- data/{man → lib/bundler/man}/bundle-pristine.1 +1 -1
- data/{man → lib/bundler/man}/bundle-remove.1 +1 -1
- data/{man → lib/bundler/man}/bundle-show.1 +1 -1
- data/{man → lib/bundler/man}/bundle-update.1 +5 -5
- data/{man/bundle-update.ronn → lib/bundler/man/bundle-update.1.ronn} +5 -4
- data/lib/bundler/man/bundle-version.1 +35 -0
- data/lib/bundler/man/bundle-version.1.ronn +24 -0
- data/{man → lib/bundler/man}/bundle-viz.1 +4 -1
- data/{man/bundle-viz.ronn → lib/bundler/man/bundle-viz.1.ronn} +2 -0
- data/{man → lib/bundler/man}/bundle.1 +15 -10
- data/{man/bundle.ronn → lib/bundler/man/bundle.1.ronn} +12 -7
- data/{man → lib/bundler/man}/gemfile.5 +120 -83
- data/{man → lib/bundler/man}/gemfile.5.ronn +109 -88
- data/{man → lib/bundler/man}/index.txt +4 -0
- data/lib/bundler/match_metadata.rb +13 -0
- data/lib/bundler/match_platform.rb +0 -1
- data/lib/bundler/match_remote_metadata.rb +29 -0
- data/lib/bundler/mirror.rb +7 -9
- data/lib/bundler/plugin/api/source.rb +25 -9
- data/lib/bundler/plugin/dsl.rb +1 -1
- data/lib/bundler/plugin/index.rb +17 -5
- data/lib/bundler/plugin/installer/git.rb +0 -4
- data/lib/bundler/plugin/installer/rubygems.rb +1 -9
- data/lib/bundler/plugin/installer.rb +11 -11
- data/lib/bundler/plugin/source_list.rb +5 -1
- data/lib/bundler/plugin.rb +58 -11
- data/lib/bundler/process_lock.rb +1 -1
- data/lib/bundler/remote_specification.rb +15 -6
- data/lib/bundler/resolver/base.rb +46 -0
- data/lib/bundler/resolver/candidate.rb +92 -0
- data/lib/bundler/resolver/incompatibility.rb +15 -0
- data/lib/bundler/resolver/package.rb +63 -0
- data/lib/bundler/resolver/root.rb +25 -0
- data/lib/bundler/resolver/spec_group.rb +49 -74
- data/lib/bundler/resolver.rb +320 -344
- data/lib/bundler/retry.rb +2 -2
- data/lib/bundler/ruby_dsl.rb +1 -1
- data/lib/bundler/ruby_version.rb +6 -19
- data/lib/bundler/rubygems_ext.rb +231 -32
- data/lib/bundler/rubygems_gem_installer.rb +89 -16
- data/lib/bundler/rubygems_integration.rb +72 -162
- data/lib/bundler/runtime.rb +23 -31
- data/lib/bundler/self_manager.rb +168 -0
- data/lib/bundler/settings.rb +145 -72
- data/lib/bundler/setup.rb +2 -2
- data/lib/bundler/shared_helpers.rb +19 -34
- data/lib/bundler/similarity_detector.rb +1 -1
- data/lib/bundler/source/git/git_proxy.rb +244 -114
- data/lib/bundler/source/git.rb +62 -46
- data/lib/bundler/source/metadata.rb +3 -8
- data/lib/bundler/source/path/installer.rb +11 -32
- data/lib/bundler/source/path.rb +15 -9
- data/lib/bundler/source/rubygems/remote.rb +1 -1
- data/lib/bundler/source/rubygems.rb +167 -199
- data/lib/bundler/source/rubygems_aggregate.rb +68 -0
- data/lib/bundler/source.rb +25 -5
- data/lib/bundler/source_list.rb +112 -64
- data/lib/bundler/source_map.rb +71 -0
- data/lib/bundler/spec_set.rb +64 -61
- data/lib/bundler/stub_specification.rb +30 -10
- data/lib/bundler/templates/Executable +3 -5
- data/lib/bundler/templates/Executable.bundler +10 -15
- data/lib/bundler/templates/Executable.standalone +4 -4
- data/lib/bundler/templates/Gemfile +0 -2
- data/lib/bundler/templates/gems.rb +0 -3
- data/lib/bundler/templates/newgem/CHANGELOG.md.tt +5 -0
- data/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +57 -47
- data/lib/bundler/templates/newgem/Cargo.toml.tt +7 -0
- data/lib/bundler/templates/newgem/Gemfile.tt +15 -1
- data/lib/bundler/templates/newgem/README.md.tt +13 -16
- data/lib/bundler/templates/newgem/Rakefile.tt +33 -5
- data/lib/bundler/templates/newgem/bin/console.tt +1 -0
- data/lib/bundler/templates/newgem/circleci/config.yml.tt +25 -0
- data/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +15 -0
- data/lib/bundler/templates/newgem/ext/newgem/{extconf.rb.tt → extconf-c.rb.tt} +2 -0
- data/lib/bundler/templates/newgem/ext/newgem/extconf-rust.rb.tt +6 -0
- data/lib/bundler/templates/newgem/ext/newgem/src/lib.rs.tt +12 -0
- data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +37 -0
- data/lib/bundler/templates/newgem/gitignore.tt +3 -0
- data/lib/bundler/templates/newgem/gitlab-ci.yml.tt +18 -0
- data/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +2 -0
- data/lib/bundler/templates/newgem/lib/newgem.rb.tt +4 -2
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +34 -18
- data/lib/bundler/templates/newgem/rubocop.yml.tt +13 -0
- data/lib/bundler/templates/newgem/sig/newgem.rbs.tt +8 -0
- data/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +2 -0
- data/lib/bundler/templates/newgem/spec/spec_helper.rb.tt +2 -1
- data/lib/bundler/templates/newgem/standard.yml.tt +3 -0
- data/lib/bundler/templates/newgem/test/{test_helper.rb.tt → minitest/test_helper.rb.tt} +2 -0
- data/lib/bundler/templates/newgem/test/{newgem_test.rb.tt → minitest/test_newgem.rb.tt} +3 -1
- data/lib/bundler/templates/newgem/test/test-unit/newgem_test.rb.tt +15 -0
- data/lib/bundler/templates/newgem/test/test-unit/test_helper.rb.tt +6 -0
- data/lib/bundler/ui/shell.rb +37 -14
- data/lib/bundler/ui/silent.rb +21 -5
- data/lib/bundler/uri_credentials_filter.rb +3 -1
- data/lib/bundler/vendor/.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 +41 -74
- data/lib/bundler/vendor/fileutils/LICENSE.txt +22 -0
- data/lib/bundler/vendor/fileutils/lib/fileutils.rb +1350 -408
- data/lib/bundler/vendor/net-http-persistent/README.rdoc +82 -0
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +82 -189
- 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 +151 -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 +53 -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 +124 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb +409 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +240 -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/LICENSE.md +20 -0
- data/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb +2 -1
- data/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +9 -7
- data/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +1 -2
- data/lib/bundler/vendor/thor/lib/thor/actions.rb +7 -3
- data/lib/bundler/vendor/thor/lib/thor/base.rb +9 -0
- data/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +6 -0
- data/lib/bundler/vendor/thor/lib/thor/error.rb +10 -5
- data/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +5 -1
- data/lib/bundler/vendor/thor/lib/thor/parser/options.rb +28 -9
- data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +28 -7
- data/lib/bundler/vendor/thor/lib/thor/shell/color.rb +5 -1
- data/lib/bundler/vendor/thor/lib/thor/shell.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor/util.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor.rb +5 -13
- data/lib/bundler/vendor/tsort/LICENSE.txt +22 -0
- data/lib/bundler/vendor/tsort/lib/tsort.rb +452 -0
- data/lib/bundler/vendor/uri/LICENSE.txt +22 -0
- data/lib/bundler/vendor/uri/lib/uri/common.rb +76 -91
- 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 +32 -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 +14 -21
- data/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +11 -17
- 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_persistent.rb +1 -40
- data/lib/bundler/{vendored_molinillo.rb → vendored_pub_grub.rb} +1 -1
- data/lib/bundler/vendored_tsort.rb +4 -0
- data/lib/bundler/version.rb +5 -1
- data/lib/bundler/worker.rb +25 -12
- data/lib/bundler/yaml_serializer.rb +1 -1
- data/lib/bundler.rb +95 -108
- metadata +132 -118
- data/lib/bundler/dep_proxy.rb +0 -48
- data/lib/bundler/gemdeps.rb +0 -29
- data/lib/bundler/psyched_yaml.rb +0 -37
- 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/compatibility.rb +0 -26
- 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 -81
- 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 -158
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +0 -223
- 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 -101
- data/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb +0 -67
- data/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +0 -837
- 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 -12
- data/lib/bundler/version_ranges.rb +0 -122
- data/man/bundle-add.1.txt +0 -58
- data/man/bundle-binstubs.1.txt +0 -48
- data/man/bundle-cache.1.txt +0 -78
- data/man/bundle-check.1.txt +0 -33
- data/man/bundle-clean.1.txt +0 -26
- data/man/bundle-config.1.txt +0 -528
- data/man/bundle-doctor.1.txt +0 -44
- data/man/bundle-exec.1.txt +0 -178
- data/man/bundle-gem.1 +0 -80
- data/man/bundle-gem.1.txt +0 -91
- data/man/bundle-gem.ronn +0 -78
- data/man/bundle-info.1.txt +0 -21
- data/man/bundle-init.1.txt +0 -34
- data/man/bundle-inject.1.txt +0 -32
- data/man/bundle-install.1.txt +0 -401
- data/man/bundle-list.1.txt +0 -43
- data/man/bundle-lock.1.txt +0 -93
- data/man/bundle-open.1.txt +0 -29
- data/man/bundle-outdated.1.txt +0 -131
- data/man/bundle-platform.1.txt +0 -57
- data/man/bundle-pristine.1.txt +0 -44
- data/man/bundle-remove.1.txt +0 -34
- data/man/bundle-show.1.txt +0 -27
- data/man/bundle-update.1.txt +0 -390
- data/man/bundle-viz.1.txt +0 -39
- data/man/bundle.1.txt +0 -116
- data/man/gemfile.5.txt +0 -649
- /data/{man/bundle-check.ronn → lib/bundler/man/bundle-check.1.ronn} +0 -0
- /data/{man/bundle-doctor.ronn → lib/bundler/man/bundle-doctor.1.ronn} +0 -0
- /data/{man/bundle-info.ronn → lib/bundler/man/bundle-info.1.ronn} +0 -0
- /data/{man/bundle-init.ronn → lib/bundler/man/bundle-init.1.ronn} +0 -0
- /data/{man/bundle-lock.ronn → lib/bundler/man/bundle-lock.1.ronn} +0 -0
- /data/{man/bundle-open.ronn → lib/bundler/man/bundle-open.1.ronn} +0 -0
- /data/{man/bundle-pristine.ronn → lib/bundler/man/bundle-pristine.1.ronn} +0 -0
- /data/{man/bundle-remove.ronn → lib/bundler/man/bundle-remove.1.ronn} +0 -0
- /data/{man/bundle-show.ronn → lib/bundler/man/bundle-show.1.ronn} +0 -0
data/README.md
CHANGED
@@ -1,7 +1,5 @@
|
|
1
|
-
[![Version
|
2
|
-
[![
|
3
|
-
[![Inline docs ](https://inch-ci.org/github/bundler/bundler.svg?style=flat)](https://inch-ci.org/github/bundler/bundler)
|
4
|
-
[![Slack ](https://bundler-slackin.herokuapp.com/badge.svg)](https://bundler-slackin.herokuapp.com)
|
1
|
+
[![Version ](https://img.shields.io/gem/v/bundler.svg?style=flat)](https://rubygems.org/gems/bundler)
|
2
|
+
[![Slack ](https://bundler-slackin.herokuapp.com/badge.svg)](https://bundler-slackin.herokuapp.com)
|
5
3
|
|
6
4
|
# Bundler: a gem to bundle gems
|
7
5
|
|
@@ -34,19 +32,19 @@ See [bundler.io](https://bundler.io) for the full documentation.
|
|
34
32
|
|
35
33
|
For help with common problems, see [TROUBLESHOOTING](doc/TROUBLESHOOTING.md).
|
36
34
|
|
37
|
-
Still stuck? Try [filing an issue](
|
35
|
+
Still stuck? Try [filing an issue](https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md).
|
38
36
|
|
39
37
|
### Other questions
|
40
38
|
|
41
39
|
To see what has changed in recent versions of Bundler, see the [CHANGELOG](CHANGELOG.md).
|
42
40
|
|
43
|
-
To get in touch with the Bundler core team and other Bundler users, please
|
41
|
+
To get in touch with the Bundler core team and other Bundler users, please join [the Bundler slack](https://slack.bundler.io).
|
44
42
|
|
45
43
|
### Contributing
|
46
44
|
|
47
|
-
If you'd like to contribute to Bundler, that's awesome, and we <3 you. We've put together [the Bundler contributor guide](https://github.com/
|
45
|
+
If you'd like to contribute to Bundler, that's awesome, and we <3 you. We've put together [the Bundler contributor guide](https://github.com/rubygems/rubygems/blob/master/bundler/doc/contributing/README.md) with all of the information you need to get started.
|
48
46
|
|
49
|
-
If you'd like to request a substantial change to Bundler or
|
47
|
+
If you'd like to request a substantial change to Bundler or its documentation, refer to the [Bundler RFC process](https://github.com/rubygems/rfcs) for more information.
|
50
48
|
|
51
49
|
While some Bundler contributors are compensated by Ruby Together, the project maintainers make decisions independent of Ruby Together. As a project, we welcome contributions regardless of the author's affiliation with Ruby Together.
|
52
50
|
|
@@ -57,8 +55,8 @@ While some Bundler contributors are compensated by Ruby Together, the project ma
|
|
57
55
|
|
58
56
|
### Code of Conduct
|
59
57
|
|
60
|
-
Everyone interacting in the Bundler project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow the [Bundler code of conduct](https://github.com/
|
58
|
+
Everyone interacting in the Bundler project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow the [Bundler code of conduct](https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md).
|
61
59
|
|
62
60
|
### License
|
63
61
|
|
64
|
-
Bundler is available under an [MIT License](https://github.com/
|
62
|
+
Bundler is available under an [MIT License](https://github.com/rubygems/rubygems/blob/master/bundler/LICENSE.md).
|
data/bundler.gemspec
CHANGED
@@ -22,25 +22,22 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.summary = "The best way to manage your application's dependencies"
|
23
23
|
s.description = "Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably"
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
}
|
32
|
-
end
|
25
|
+
s.metadata = {
|
26
|
+
"bug_tracker_uri" => "https://github.com/rubygems/rubygems/issues?q=is%3Aopen+is%3Aissue+label%3ABundler",
|
27
|
+
"changelog_uri" => "https://github.com/rubygems/rubygems/blob/master/bundler/CHANGELOG.md",
|
28
|
+
"homepage_uri" => "https://bundler.io/",
|
29
|
+
"source_code_uri" => "https://github.com/rubygems/rubygems/tree/master/bundler",
|
30
|
+
}
|
33
31
|
|
34
|
-
s.required_ruby_version = ">= 2.
|
35
|
-
s.required_rubygems_version = ">=
|
32
|
+
s.required_ruby_version = ">= 2.6.0"
|
33
|
+
s.required_rubygems_version = ">= 3.0.1"
|
36
34
|
|
37
|
-
s.files = Dir.glob("{
|
35
|
+
s.files = Dir.glob("lib/bundler{.rb,/**/*}", File::FNM_DOTMATCH).reject {|f| File.directory?(f) }
|
38
36
|
|
39
|
-
# Include the CHANGELOG.md, LICENSE.md, README.md manually
|
40
|
-
s.files += %w[CHANGELOG.md LICENSE.md README.md]
|
41
37
|
# include the gemspec itself because warbler breaks w/o it
|
42
38
|
s.files += %w[bundler.gemspec]
|
43
39
|
|
40
|
+
s.files += %w[CHANGELOG.md LICENSE.md README.md]
|
44
41
|
s.bindir = "exe"
|
45
42
|
s.executables = %w[bundle bundler]
|
46
43
|
s.require_paths = ["lib"]
|
data/exe/bundle
CHANGED
@@ -15,14 +15,13 @@ else
|
|
15
15
|
require "bundler"
|
16
16
|
end
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
abort(err)
|
18
|
+
if Gem.rubygems_version < Gem::Version.new("3.2.3") && Gem.ruby_version < Gem::Version.new("2.7.a") && !ENV["BUNDLER_NO_OLD_RUBYGEMS_WARNING"]
|
19
|
+
Bundler.ui.warn \
|
20
|
+
"Your RubyGems version (#{Gem::VERSION}) has a bug that prevents " \
|
21
|
+
"`required_ruby_version` from working for Bundler. Any scripts that use " \
|
22
|
+
"`gem install bundler` will break as soon as Bundler drops support for " \
|
23
|
+
"your Ruby version. Please upgrade RubyGems to avoid future breakage " \
|
24
|
+
"and silence this warning by running `gem update --system 3.2.3`"
|
26
25
|
end
|
27
26
|
|
28
27
|
if File.exist?(base_path)
|
data/exe/bundler
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
# not in RDoc
|
@@ -4,8 +4,8 @@ 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 = "
|
7
|
+
@built_at = "2022-12-24".freeze
|
8
|
+
@git_commit_sha = "f3175f033c".freeze
|
9
9
|
@release = true
|
10
10
|
# end ivars
|
11
11
|
|
@@ -29,19 +29,11 @@ module Bundler
|
|
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.
|
32
|
+
git_dir = File.expand_path("../../../.git", __dir__)
|
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
|
|
data/lib/bundler/cli/add.rb
CHANGED
@@ -17,7 +17,7 @@ module Bundler
|
|
17
17
|
perform_bundle_install unless options["skip-install"]
|
18
18
|
end
|
19
19
|
|
20
|
-
|
20
|
+
private
|
21
21
|
|
22
22
|
def perform_bundle_install
|
23
23
|
Installer.install(Bundler.root, Bundler.definition)
|
@@ -40,7 +40,7 @@ module Bundler
|
|
40
40
|
raise InvalidOption, "Please specify gems to add." if gems.empty?
|
41
41
|
|
42
42
|
version.to_a.each do |v|
|
43
|
-
raise InvalidOption, "Invalid gem requirement pattern '#{v}'" unless Gem::Requirement::PATTERN
|
43
|
+
raise InvalidOption, "Invalid gem requirement pattern '#{v}'" unless Gem::Requirement::PATTERN.match?(v.to_s)
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|
data/lib/bundler/cli/binstubs.rb
CHANGED
@@ -16,7 +16,11 @@ module Bundler
|
|
16
16
|
Bundler.settings.set_command_option_if_given :shebang, options["shebang"]
|
17
17
|
installer = Installer.new(Bundler.root, Bundler.definition)
|
18
18
|
|
19
|
-
installer_opts = {
|
19
|
+
installer_opts = {
|
20
|
+
:force => options[:force],
|
21
|
+
:binstubs_cmd => true,
|
22
|
+
:all_platforms => options["all-platforms"],
|
23
|
+
}
|
20
24
|
|
21
25
|
if options[:all]
|
22
26
|
raise InvalidOption, "Cannot specify --all with specific gems" unless gems.empty?
|
@@ -38,7 +42,7 @@ module Bundler
|
|
38
42
|
if options[:standalone]
|
39
43
|
next Bundler.ui.warn("Sorry, Bundler can only be run via RubyGems.") if gem_name == "bundler"
|
40
44
|
Bundler.settings.temporary(:path => (Bundler.settings[:path] || Bundler.root)) do
|
41
|
-
installer.generate_standalone_bundler_executable_stubs(spec)
|
45
|
+
installer.generate_standalone_bundler_executable_stubs(spec, installer_opts)
|
42
46
|
end
|
43
47
|
else
|
44
48
|
installer.generate_bundler_executable_stubs(spec, installer_opts)
|
data/lib/bundler/cli/cache.rb
CHANGED
@@ -9,7 +9,7 @@ module Bundler
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def run
|
12
|
-
Bundler.ui.level = "
|
12
|
+
Bundler.ui.level = "warn" if options[:quiet]
|
13
13
|
Bundler.settings.set_command_option_if_given :path, options[:path]
|
14
14
|
Bundler.settings.set_command_option_if_given :cache_path, options["cache-path"]
|
15
15
|
|
@@ -24,12 +24,13 @@ module Bundler
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
-
|
27
|
+
private
|
28
28
|
|
29
29
|
def install
|
30
30
|
require_relative "install"
|
31
31
|
options = self.options.dup
|
32
32
|
options["local"] = false if Bundler.settings[:cache_all_platforms]
|
33
|
+
options["no-cache"] = true
|
33
34
|
Bundler::CLI::Install.new(options).run
|
34
35
|
end
|
35
36
|
|
@@ -37,12 +38,6 @@ module Bundler
|
|
37
38
|
all = options.fetch(:all, Bundler.feature_flag.cache_all? || nil)
|
38
39
|
|
39
40
|
Bundler.settings.set_command_option_if_given :cache_all, all
|
40
|
-
|
41
|
-
if Bundler.definition.has_local_dependencies? && !Bundler.feature_flag.cache_all?
|
42
|
-
Bundler.ui.warn "Your Gemfile contains path and git dependencies. If you want " \
|
43
|
-
"to cache them as well, please pass the --all flag. This will be the default " \
|
44
|
-
"on Bundler 3.0."
|
45
|
-
end
|
46
41
|
end
|
47
42
|
end
|
48
43
|
end
|
data/lib/bundler/cli/check.rb
CHANGED
@@ -11,11 +11,13 @@ module Bundler
|
|
11
11
|
def run
|
12
12
|
Bundler.settings.set_command_option_if_given :path, options[:path]
|
13
13
|
|
14
|
+
definition = Bundler.definition
|
15
|
+
definition.validate_runtime!
|
16
|
+
|
14
17
|
begin
|
15
|
-
definition
|
16
|
-
definition.validate_runtime!
|
18
|
+
definition.resolve_only_locally!
|
17
19
|
not_installed = definition.missing_specs
|
18
|
-
rescue GemNotFound,
|
20
|
+
rescue GemNotFound, SolveFailure
|
19
21
|
Bundler.ui.error "Bundler can't satisfy your Gemfile's dependencies."
|
20
22
|
Bundler.ui.warn "Install missing gems with `bundle install`."
|
21
23
|
exit 1
|
data/lib/bundler/cli/clean.rb
CHANGED
data/lib/bundler/cli/common.rb
CHANGED
@@ -14,6 +14,21 @@ module Bundler
|
|
14
14
|
Bundler.ui.info msg
|
15
15
|
end
|
16
16
|
|
17
|
+
def self.output_fund_metadata_summary
|
18
|
+
return if Bundler.settings["ignore_funding_requests"]
|
19
|
+
definition = Bundler.definition
|
20
|
+
current_dependencies = definition.requested_dependencies
|
21
|
+
current_specs = definition.specs
|
22
|
+
|
23
|
+
count = current_dependencies.count {|dep| current_specs[dep.name].first.metadata.key?("funding_uri") }
|
24
|
+
|
25
|
+
return if count.zero?
|
26
|
+
|
27
|
+
intro = count > 1 ? "#{count} installed gems you directly depend on are" : "#{count} installed gem you directly depend on is"
|
28
|
+
message = "#{intro} looking for funding.\n Run `bundle fund` for details"
|
29
|
+
Bundler.ui.info message
|
30
|
+
end
|
31
|
+
|
17
32
|
def self.output_without_groups_message(command)
|
18
33
|
return if Bundler.settings[:without].empty?
|
19
34
|
Bundler.ui.confirm without_groups_message(command)
|
@@ -22,10 +37,15 @@ module Bundler
|
|
22
37
|
def self.without_groups_message(command)
|
23
38
|
command_in_past_tense = command == :install ? "installed" : "updated"
|
24
39
|
groups = Bundler.settings[:without]
|
40
|
+
"Gems in the #{verbalize_groups(groups)} were not #{command_in_past_tense}."
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.verbalize_groups(groups)
|
44
|
+
groups.map! {|g| "'#{g}'" }
|
25
45
|
group_list = [groups[0...-1].join(", "), groups[-1..-1]].
|
26
46
|
reject {|s| s.to_s.empty? }.join(" and ")
|
27
47
|
group_str = groups.size == 1 ? "group" : "groups"
|
28
|
-
"
|
48
|
+
"#{group_str} #{group_list}"
|
29
49
|
end
|
30
50
|
|
31
51
|
def self.select_spec(name, regex_match = nil)
|
@@ -39,7 +59,13 @@ module Bundler
|
|
39
59
|
|
40
60
|
case specs.count
|
41
61
|
when 0
|
42
|
-
|
62
|
+
dep_in_other_group = Bundler.definition.current_dependencies.find {|dep|dep.name == name }
|
63
|
+
|
64
|
+
if dep_in_other_group
|
65
|
+
raise GemNotFound, "Could not find gem '#{name}', because it's in the #{verbalize_groups(dep_in_other_group.groups)}, configured to be ignored."
|
66
|
+
else
|
67
|
+
raise GemNotFound, gem_not_found_message(name, Bundler.definition.dependencies)
|
68
|
+
end
|
43
69
|
when 1
|
44
70
|
specs.first
|
45
71
|
else
|
@@ -69,6 +95,8 @@ module Bundler
|
|
69
95
|
end
|
70
96
|
|
71
97
|
def self.ensure_all_gems_in_lockfile!(names, locked_gems = Bundler.locked_gems)
|
98
|
+
return unless locked_gems
|
99
|
+
|
72
100
|
locked_names = locked_gems.specs.map(&:name).uniq
|
73
101
|
names.-(locked_names).each do |g|
|
74
102
|
raise GemNotFound, gem_not_found_message(g, locked_names)
|
@@ -82,7 +110,8 @@ module Bundler
|
|
82
110
|
|
83
111
|
definition.gem_version_promoter.tap do |gvp|
|
84
112
|
gvp.level = patch_level.first || :major
|
85
|
-
gvp.strict = options[:strict] || options["
|
113
|
+
gvp.strict = options[:strict] || options["filter-strict"]
|
114
|
+
gvp.pre = options[:pre]
|
86
115
|
end
|
87
116
|
end
|
88
117
|
|
data/lib/bundler/cli/config.rb
CHANGED
@@ -180,7 +180,7 @@ module Bundler
|
|
180
180
|
scopes = %w[global local].select {|s| options[s] }
|
181
181
|
case scopes.size
|
182
182
|
when 0
|
183
|
-
@scope = "global"
|
183
|
+
@scope = inside_app? ? "local" : "global"
|
184
184
|
@explicit_scope = false
|
185
185
|
when 1
|
186
186
|
@scope = scopes.first
|
@@ -189,6 +189,15 @@ module Bundler
|
|
189
189
|
"The options #{scopes.join " and "} were specified. Please only use one of the switches at a time."
|
190
190
|
end
|
191
191
|
end
|
192
|
+
|
193
|
+
private
|
194
|
+
|
195
|
+
def inside_app?
|
196
|
+
Bundler.root
|
197
|
+
true
|
198
|
+
rescue GemfileNotFound
|
199
|
+
false
|
200
|
+
end
|
192
201
|
end
|
193
202
|
end
|
194
203
|
end
|
data/lib/bundler/cli/console.rb
CHANGED
@@ -12,7 +12,7 @@ module Bundler
|
|
12
12
|
Bundler::SharedHelpers.major_deprecation 2, "bundle console will be replaced " \
|
13
13
|
"by `bin/console` generated by `bundle gem <name>`"
|
14
14
|
|
15
|
-
group ? Bundler.require(:default, *group.split.map!(&:to_sym)) : Bundler.require
|
15
|
+
group ? Bundler.require(:default, *group.split(" ").map!(&:to_sym)) : Bundler.require
|
16
16
|
ARGV.clear
|
17
17
|
|
18
18
|
console = get_console(Bundler.settings[:console] || "irb")
|
@@ -30,9 +30,9 @@ module Bundler
|
|
30
30
|
|
31
31
|
def get_constant(name)
|
32
32
|
const_name = {
|
33
|
-
"pry"
|
33
|
+
"pry" => :Pry,
|
34
34
|
"ripl" => :Ripl,
|
35
|
-
"irb"
|
35
|
+
"irb" => :IRB,
|
36
36
|
}[name]
|
37
37
|
Object.const_get(const_name)
|
38
38
|
rescue NameError
|
data/lib/bundler/cli/doctor.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "rbconfig"
|
4
|
+
require "shellwords"
|
5
|
+
require "fiddle"
|
4
6
|
|
5
7
|
module Bundler
|
6
8
|
class CLI::Doctor
|
@@ -22,14 +24,14 @@ module Bundler
|
|
22
24
|
end
|
23
25
|
|
24
26
|
def dylibs_darwin(path)
|
25
|
-
output = `/usr/bin/otool -L
|
27
|
+
output = `/usr/bin/otool -L #{path.shellescape}`.chomp
|
26
28
|
dylibs = output.split("\n")[1..-1].map {|l| l.match(DARWIN_REGEX).captures[0] }.uniq
|
27
29
|
# ignore @rpath and friends
|
28
30
|
dylibs.reject {|dylib| dylib.start_with? "@" }
|
29
31
|
end
|
30
32
|
|
31
33
|
def dylibs_ldd(path)
|
32
|
-
output = `/usr/bin/ldd
|
34
|
+
output = `/usr/bin/ldd #{path.shellescape}`.chomp
|
33
35
|
output.split("\n").map do |l|
|
34
36
|
match = l.match(LDD_REGEX)
|
35
37
|
next if match.nil?
|
@@ -61,7 +63,7 @@ module Bundler
|
|
61
63
|
end
|
62
64
|
|
63
65
|
def run
|
64
|
-
Bundler.ui.level = "
|
66
|
+
Bundler.ui.level = "warn" if options[:quiet]
|
65
67
|
Bundler.settings.validate!
|
66
68
|
check!
|
67
69
|
|
@@ -70,7 +72,12 @@ module Bundler
|
|
70
72
|
|
71
73
|
definition.specs.each do |spec|
|
72
74
|
bundles_for_gem(spec).each do |bundle|
|
73
|
-
bad_paths = dylibs(bundle).select
|
75
|
+
bad_paths = dylibs(bundle).select do |f|
|
76
|
+
Fiddle.dlopen(f)
|
77
|
+
false
|
78
|
+
rescue Fiddle::DLError
|
79
|
+
true
|
80
|
+
end
|
74
81
|
if bad_paths.any?
|
75
82
|
broken_links[spec] ||= []
|
76
83
|
broken_links[spec].concat(bad_paths)
|
@@ -93,15 +100,18 @@ module Bundler
|
|
93
100
|
end
|
94
101
|
end
|
95
102
|
|
96
|
-
|
103
|
+
private
|
97
104
|
|
98
105
|
def check_home_permissions
|
99
106
|
require "find"
|
100
107
|
files_not_readable_or_writable = []
|
101
108
|
files_not_rw_and_owned_by_different_user = []
|
102
109
|
files_not_owned_by_current_user_but_still_rw = []
|
110
|
+
broken_symlinks = []
|
103
111
|
Find.find(Bundler.bundle_path.to_s).each do |f|
|
104
|
-
if !File.
|
112
|
+
if !File.exist?(f)
|
113
|
+
broken_symlinks << f
|
114
|
+
elsif !File.writable?(f) || !File.readable?(f)
|
105
115
|
if File.stat(f).uid != Process.uid
|
106
116
|
files_not_rw_and_owned_by_different_user << f
|
107
117
|
else
|
@@ -113,6 +123,13 @@ module Bundler
|
|
113
123
|
end
|
114
124
|
|
115
125
|
ok = true
|
126
|
+
|
127
|
+
if broken_symlinks.any?
|
128
|
+
Bundler.ui.warn "Broken links exist in the Bundler home. Please report them to the offending gem's upstream repo. These files are:\n - #{broken_symlinks.join("\n - ")}"
|
129
|
+
|
130
|
+
ok = false
|
131
|
+
end
|
132
|
+
|
116
133
|
if files_not_owned_by_current_user_but_still_rw.any?
|
117
134
|
Bundler.ui.warn "Files exist in the Bundler home that are owned by another " \
|
118
135
|
"user, but are still readable/writable. These files are:\n - #{files_not_owned_by_current_user_but_still_rw.join("\n - ")}"
|
data/lib/bundler/cli/exec.rb
CHANGED
@@ -12,12 +12,7 @@ module Bundler
|
|
12
12
|
@options = options
|
13
13
|
@cmd = args.shift
|
14
14
|
@args = args
|
15
|
-
|
16
|
-
if !Bundler.current_ruby.jruby?
|
17
|
-
@args << { :close_others => !options.keep_file_descriptors? }
|
18
|
-
elsif options.keep_file_descriptors?
|
19
|
-
Bundler.ui.warn "Ruby version #{RUBY_VERSION} defaults to keeping non-standard file descriptors on Kernel#exec."
|
20
|
-
end
|
15
|
+
@args << { :close_others => !options.keep_file_descriptors? } unless Bundler.current_ruby.jruby?
|
21
16
|
end
|
22
17
|
|
23
18
|
def run
|
@@ -34,7 +29,7 @@ module Bundler
|
|
34
29
|
end
|
35
30
|
end
|
36
31
|
|
37
|
-
|
32
|
+
private
|
38
33
|
|
39
34
|
def validate_cmd!
|
40
35
|
return unless cmd.nil?
|
@@ -63,10 +58,10 @@ module Bundler
|
|
63
58
|
Kernel.load(file)
|
64
59
|
rescue SystemExit, SignalException
|
65
60
|
raise
|
66
|
-
rescue Exception
|
61
|
+
rescue Exception # rubocop:disable Lint/RescueException
|
67
62
|
Bundler.ui.error "bundler: failed to load command: #{cmd} (#{file})"
|
68
|
-
|
69
|
-
|
63
|
+
Bundler::FriendlyErrors.disable!
|
64
|
+
raise
|
70
65
|
end
|
71
66
|
|
72
67
|
def process_title(file, args)
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Bundler
|
4
|
+
class CLI::Fund
|
5
|
+
attr_reader :options
|
6
|
+
|
7
|
+
def initialize(options)
|
8
|
+
@options = options
|
9
|
+
end
|
10
|
+
|
11
|
+
def run
|
12
|
+
Bundler.definition.validate_runtime!
|
13
|
+
|
14
|
+
groups = Array(options[:group]).map(&:to_sym)
|
15
|
+
|
16
|
+
deps = if groups.any?
|
17
|
+
Bundler.definition.dependencies_for(groups)
|
18
|
+
else
|
19
|
+
Bundler.definition.current_dependencies
|
20
|
+
end
|
21
|
+
|
22
|
+
fund_info = deps.each_with_object([]) do |dep, arr|
|
23
|
+
spec = Bundler.definition.specs[dep.name].first
|
24
|
+
if spec.metadata.key?("funding_uri")
|
25
|
+
arr << "* #{spec.name} (#{spec.version})\n Funding: #{spec.metadata["funding_uri"]}"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
if fund_info.empty?
|
30
|
+
Bundler.ui.info "None of the installed gems you directly depend on are looking for funding."
|
31
|
+
else
|
32
|
+
Bundler.ui.info fund_info.join("\n")
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|