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/lib/bundler/source/git.rb
CHANGED
@@ -22,7 +22,7 @@ module Bundler
|
|
22
22
|
@uri = options["uri"] || ""
|
23
23
|
@safe_uri = URICredentialsFilter.credential_filtered_uri(@uri)
|
24
24
|
@branch = options["branch"]
|
25
|
-
@ref = options["ref"] || options["branch"] || options["tag"]
|
25
|
+
@ref = options["ref"] || options["branch"] || options["tag"]
|
26
26
|
@submodules = options["submodules"]
|
27
27
|
@name = options["name"]
|
28
28
|
@version = options["version"].to_s.strip.gsub("-", ".pre.")
|
@@ -42,7 +42,7 @@ module Bundler
|
|
42
42
|
%w[ref branch tag submodules].each do |opt|
|
43
43
|
out << " #{opt}: #{options[opt]}\n" if options[opt]
|
44
44
|
end
|
45
|
-
out << " glob: #{@glob}\n" unless
|
45
|
+
out << " glob: #{@glob}\n" unless default_glob?
|
46
46
|
out << " specs:\n"
|
47
47
|
end
|
48
48
|
|
@@ -60,25 +60,35 @@ module Bundler
|
|
60
60
|
alias_method :==, :eql?
|
61
61
|
|
62
62
|
def to_s
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
63
|
+
begin
|
64
|
+
at = if local?
|
65
|
+
path
|
66
|
+
elsif user_ref = options["ref"]
|
67
|
+
if /\A[a-z0-9]{4,}\z/i.match?(ref)
|
68
|
+
shortref_for_display(user_ref)
|
69
|
+
else
|
70
|
+
user_ref
|
71
|
+
end
|
72
|
+
elsif ref
|
73
|
+
ref
|
68
74
|
else
|
69
|
-
|
75
|
+
current_branch
|
70
76
|
end
|
71
|
-
|
72
|
-
|
77
|
+
|
78
|
+
rev = "at #{at}@#{shortref_for_display(revision)}"
|
79
|
+
rescue GitError
|
80
|
+
""
|
73
81
|
end
|
74
82
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
83
|
+
specifiers = [rev, glob_for_display].compact
|
84
|
+
suffix =
|
85
|
+
if specifiers.any?
|
86
|
+
" (#{specifiers.join(", ")})"
|
87
|
+
else
|
88
|
+
""
|
89
|
+
end
|
80
90
|
|
81
|
-
"#{@safe_uri}
|
91
|
+
"#{@safe_uri}#{suffix}"
|
82
92
|
end
|
83
93
|
|
84
94
|
def name
|
@@ -92,13 +102,7 @@ module Bundler
|
|
92
102
|
@install_path ||= begin
|
93
103
|
git_scope = "#{base_name}-#{shortref_for_path(revision)}"
|
94
104
|
|
95
|
-
|
96
|
-
|
97
|
-
if !path.exist? && Bundler.requires_sudo?
|
98
|
-
Bundler.user_bundle_path.join(Bundler.ruby_scope).join(git_scope)
|
99
|
-
else
|
100
|
-
path
|
101
|
-
end
|
105
|
+
Bundler.install_path.join(git_scope)
|
102
106
|
end
|
103
107
|
end
|
104
108
|
|
@@ -122,7 +126,7 @@ module Bundler
|
|
122
126
|
path = Pathname.new(path)
|
123
127
|
path = path.expand_path(Bundler.root) unless path.relative?
|
124
128
|
|
125
|
-
unless
|
129
|
+
unless branch || Bundler.settings[:disable_local_branch_check]
|
126
130
|
raise GitError, "Cannot use local override for #{name} at #{path} because " \
|
127
131
|
":branch is not specified in Gemfile. Specify a branch or run " \
|
128
132
|
"`bundle config unset local.#{override_for(original_path)}` to remove the local override"
|
@@ -137,16 +141,16 @@ module Bundler
|
|
137
141
|
|
138
142
|
# Create a new git proxy without the cached revision
|
139
143
|
# so the Gemfile.lock always picks up the new revision.
|
140
|
-
@git_proxy = GitProxy.new(path, uri,
|
144
|
+
@git_proxy = GitProxy.new(path, uri, options)
|
141
145
|
|
142
|
-
if
|
146
|
+
if current_branch != branch && !Bundler.settings[:disable_local_branch_check]
|
143
147
|
raise GitError, "Local override for #{name} at #{path} is using branch " \
|
144
|
-
"#{
|
148
|
+
"#{current_branch} but Gemfile specifies #{branch}"
|
145
149
|
end
|
146
150
|
|
147
|
-
changed = cached_revision && cached_revision !=
|
151
|
+
changed = cached_revision && cached_revision != revision
|
148
152
|
|
149
|
-
if changed && !@unlocked && !git_proxy.contains?(cached_revision)
|
153
|
+
if !Bundler.settings[:disable_local_revision_check] && changed && !@unlocked && !git_proxy.contains?(cached_revision)
|
150
154
|
raise GitError, "The Gemfile lock is pointing to revision #{shortref_for_display(cached_revision)} " \
|
151
155
|
"but the current branch in your local override for #{name} does not contain such commit. " \
|
152
156
|
"Please make sure your branch is up to date."
|
@@ -171,7 +175,7 @@ module Bundler
|
|
171
175
|
def install(spec, options = {})
|
172
176
|
force = options[:force]
|
173
177
|
|
174
|
-
print_using_message "Using #{version_message(spec)} from #{self}"
|
178
|
+
print_using_message "Using #{version_message(spec, options[:previous_spec])} from #{self}"
|
175
179
|
|
176
180
|
if (requires_checkout? && !@copied) || force
|
177
181
|
Bundler.ui.debug " * Checking out revision: #{ref}"
|
@@ -209,13 +213,11 @@ module Bundler
|
|
209
213
|
# across different projects, this cache will be shared.
|
210
214
|
# When using local git repos, this is set to the local repo.
|
211
215
|
def cache_path
|
212
|
-
@cache_path ||=
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
end.join("git", git_scope)
|
218
|
-
end
|
216
|
+
@cache_path ||= if Bundler.feature_flag.global_gem_cache?
|
217
|
+
Bundler.user_cache
|
218
|
+
else
|
219
|
+
Bundler.bundle_path.join("cache", "bundler")
|
220
|
+
end.join("git", git_scope)
|
219
221
|
end
|
220
222
|
|
221
223
|
def app_cache_dirname
|
@@ -226,11 +228,19 @@ module Bundler
|
|
226
228
|
git_proxy.revision
|
227
229
|
end
|
228
230
|
|
231
|
+
def current_branch
|
232
|
+
git_proxy.current_branch
|
233
|
+
end
|
234
|
+
|
229
235
|
def allow_git_ops?
|
230
236
|
@allow_remote || @allow_cached
|
231
237
|
end
|
232
238
|
|
233
|
-
|
239
|
+
def local?
|
240
|
+
@local
|
241
|
+
end
|
242
|
+
|
243
|
+
private
|
234
244
|
|
235
245
|
def serialize_gemspecs_in(destination)
|
236
246
|
destination = destination.expand_path(Bundler.root) if destination.relative?
|
@@ -256,10 +266,6 @@ module Bundler
|
|
256
266
|
cached_revision && super
|
257
267
|
end
|
258
268
|
|
259
|
-
def local?
|
260
|
-
@local
|
261
|
-
end
|
262
|
-
|
263
269
|
def requires_checkout?
|
264
270
|
allow_git_ops? && !local? && !cached_revision_checked_out?
|
265
271
|
end
|
@@ -280,8 +286,16 @@ module Bundler
|
|
280
286
|
ref[0..11]
|
281
287
|
end
|
282
288
|
|
289
|
+
def glob_for_display
|
290
|
+
default_glob? ? nil : "glob: #{@glob}"
|
291
|
+
end
|
292
|
+
|
293
|
+
def default_glob?
|
294
|
+
@glob == DEFAULT_GLOB
|
295
|
+
end
|
296
|
+
|
283
297
|
def uri_hash
|
284
|
-
if
|
298
|
+
if %r{^\w+://(\w+@)?}.match?(uri)
|
285
299
|
# Downcase the domain component of the URI
|
286
300
|
# and strip off a trailing slash, if one is present
|
287
301
|
input = Bundler::URI.parse(uri).normalize.to_s.sub(%r{/$}, "")
|
@@ -289,7 +303,9 @@ module Bundler
|
|
289
303
|
# If there is no URI scheme, assume it is an ssh/git URI
|
290
304
|
input = uri
|
291
305
|
end
|
292
|
-
|
306
|
+
# We use SHA1 here for historical reason and to preserve backward compatibility.
|
307
|
+
# But a transition to a simpler mangling algorithm would be welcome.
|
308
|
+
Bundler::Digest.sha1(input)
|
293
309
|
end
|
294
310
|
|
295
311
|
def cached_revision
|
@@ -301,7 +317,7 @@ module Bundler
|
|
301
317
|
end
|
302
318
|
|
303
319
|
def git_proxy
|
304
|
-
@git_proxy ||= GitProxy.new(cache_path, uri,
|
320
|
+
@git_proxy ||= GitProxy.new(cache_path, uri, options, cached_revision, self)
|
305
321
|
end
|
306
322
|
|
307
323
|
def fetch
|
@@ -316,7 +332,7 @@ module Bundler
|
|
316
332
|
|
317
333
|
def load_gemspec(file)
|
318
334
|
stub = Gem::StubSpecification.gemspec_stub(file, install_path.parent, install_path.parent)
|
319
|
-
stub.full_gem_path = Pathname.new(file).dirname.expand_path(root).to_s.tap{|x| x.untaint if RUBY_VERSION < "2.7" }
|
335
|
+
stub.full_gem_path = Pathname.new(file).dirname.expand_path(root).to_s.tap {|x| x.untaint if RUBY_VERSION < "2.7" }
|
320
336
|
StubSpecification.from_stub(stub)
|
321
337
|
end
|
322
338
|
|
@@ -5,7 +5,7 @@ module Bundler
|
|
5
5
|
class Metadata < Source
|
6
6
|
def specs
|
7
7
|
@specs ||= Index.build do |idx|
|
8
|
-
idx << Gem::Specification.new("Ruby\0",
|
8
|
+
idx << Gem::Specification.new("Ruby\0", Gem.ruby_version)
|
9
9
|
idx << Gem::Specification.new("RubyGems\0", Gem::VERSION) do |s|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.default
|
11
11
|
end
|
@@ -15,17 +15,16 @@ module Bundler
|
|
15
15
|
s.version = VERSION
|
16
16
|
s.license = "MIT"
|
17
17
|
s.platform = Gem::Platform::RUBY
|
18
|
-
s.source = self
|
19
18
|
s.authors = ["bundler team"]
|
20
19
|
s.bindir = "exe"
|
21
20
|
s.homepage = "https://bundler.io"
|
22
21
|
s.summary = "The best way to manage your application's dependencies"
|
23
22
|
s.executables = %w[bundle]
|
24
23
|
# can't point to the actual gemspec or else the require paths will be wrong
|
25
|
-
s.loaded_from =
|
24
|
+
s.loaded_from = __dir__
|
26
25
|
end
|
27
26
|
|
28
|
-
if local_spec = Bundler.rubygems.
|
27
|
+
if local_spec = Bundler.rubygems.find_bundler(VERSION)
|
29
28
|
idx << local_spec
|
30
29
|
end
|
31
30
|
|
@@ -33,10 +32,6 @@ module Bundler
|
|
33
32
|
end
|
34
33
|
end
|
35
34
|
|
36
|
-
def cached!; end
|
37
|
-
|
38
|
-
def remote!; end
|
39
|
-
|
40
35
|
def options
|
41
36
|
{}
|
42
37
|
end
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative "../../rubygems_gem_installer"
|
4
|
+
|
3
5
|
module Bundler
|
4
6
|
class Source
|
5
7
|
class Path
|
@@ -16,47 +18,24 @@ module Bundler
|
|
16
18
|
@build_args = options[:build_args] || Bundler.rubygems.build_args
|
17
19
|
@gem_bin_dir = "#{Bundler.rubygems.gem_dir}/bin"
|
18
20
|
@disable_extensions = options[:disable_extensions]
|
19
|
-
|
20
|
-
if Bundler.requires_sudo?
|
21
|
-
@tmp_dir = Bundler.tmp(spec.full_name).to_s
|
22
|
-
@bin_dir = "#{@tmp_dir}/bin"
|
23
|
-
else
|
24
|
-
@bin_dir = @gem_bin_dir
|
25
|
-
end
|
21
|
+
@bin_dir = @gem_bin_dir
|
26
22
|
end
|
27
23
|
|
28
24
|
def post_install
|
29
|
-
|
30
|
-
run_hooks(:pre_install)
|
31
|
-
|
32
|
-
unless @disable_extensions
|
33
|
-
build_extensions
|
34
|
-
run_hooks(:post_build)
|
35
|
-
end
|
36
|
-
|
37
|
-
generate_bin unless spec.executables.nil? || spec.executables.empty?
|
25
|
+
run_hooks(:pre_install)
|
38
26
|
|
39
|
-
|
27
|
+
unless @disable_extensions
|
28
|
+
build_extensions
|
29
|
+
run_hooks(:post_build)
|
40
30
|
end
|
41
|
-
ensure
|
42
|
-
Bundler.rm_rf(@tmp_dir) if Bundler.requires_sudo?
|
43
|
-
end
|
44
|
-
|
45
|
-
private
|
46
31
|
|
47
|
-
|
48
|
-
super
|
32
|
+
generate_bin unless spec.executables.empty?
|
49
33
|
|
50
|
-
|
51
|
-
SharedHelpers.filesystem_access(@gem_bin_dir) do |p|
|
52
|
-
Bundler.mkdir_p(p)
|
53
|
-
end
|
54
|
-
spec.executables.each do |exe|
|
55
|
-
Bundler.sudo "cp -R #{@bin_dir}/#{exe} #{@gem_bin_dir}"
|
56
|
-
end
|
57
|
-
end
|
34
|
+
run_hooks(:post_install)
|
58
35
|
end
|
59
36
|
|
37
|
+
private
|
38
|
+
|
60
39
|
def run_hooks(type)
|
61
40
|
hooks_meth = "#{type}_hooks"
|
62
41
|
return unless Gem.respond_to?(hooks_meth)
|
data/lib/bundler/source/path.rb
CHANGED
@@ -82,7 +82,9 @@ module Bundler
|
|
82
82
|
end
|
83
83
|
|
84
84
|
def install(spec, options = {})
|
85
|
-
|
85
|
+
using_message = "Using #{version_message(spec, options[:previous_spec])} from #{self}"
|
86
|
+
using_message += " and installing its executables" unless spec.executables.empty?
|
87
|
+
print_using_message using_message
|
86
88
|
generate_bin(spec, :disable_extensions => true)
|
87
89
|
nil # no post-install message
|
88
90
|
end
|
@@ -125,14 +127,18 @@ module Bundler
|
|
125
127
|
@expanded_original_path ||= expand(original_path)
|
126
128
|
end
|
127
129
|
|
128
|
-
|
130
|
+
private
|
129
131
|
|
130
132
|
def expanded_path
|
131
133
|
@expanded_path ||= expand(path)
|
132
134
|
end
|
133
135
|
|
134
136
|
def expand(somepath)
|
135
|
-
|
137
|
+
if Bundler.current_ruby.jruby? # TODO: Unify when https://github.com/rubygems/bundler/issues/7598 fixed upstream and all supported jrubies include the fix
|
138
|
+
somepath.expand_path(root_path).expand_path
|
139
|
+
else
|
140
|
+
somepath.expand_path(root_path)
|
141
|
+
end
|
136
142
|
rescue ArgumentError => e
|
137
143
|
Bundler.ui.debug(e)
|
138
144
|
raise PathError, "There was an error while trying to use the path " \
|
@@ -167,7 +173,7 @@ module Bundler
|
|
167
173
|
|
168
174
|
if File.directory?(expanded_path)
|
169
175
|
# We sort depth-first since `<<` will override the earlier-found specs
|
170
|
-
|
176
|
+
Gem::Util.glob_files_in_dir(@glob, expanded_path).sort_by {|p| -p.split(File::SEPARATOR).size }.each do |file|
|
171
177
|
next unless spec = load_gemspec(file)
|
172
178
|
spec.source = self
|
173
179
|
|
@@ -218,13 +224,13 @@ module Bundler
|
|
218
224
|
|
219
225
|
# Some gem authors put absolute paths in their gemspec
|
220
226
|
# and we have to save them from themselves
|
221
|
-
spec.files = spec.files.map do |
|
222
|
-
next
|
223
|
-
next if File.directory?(
|
227
|
+
spec.files = spec.files.map do |path|
|
228
|
+
next path unless /\A#{Pathname::SEPARATOR_PAT}/.match?(path)
|
229
|
+
next if File.directory?(path)
|
224
230
|
begin
|
225
|
-
Pathname.new(
|
231
|
+
Pathname.new(path).relative_path_from(gem_dir).to_s
|
226
232
|
rescue ArgumentError
|
227
|
-
|
233
|
+
path
|
228
234
|
end
|
229
235
|
end.compact
|
230
236
|
|