bundler 2.2.27 → 2.6.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 +1328 -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 +7 -5
- data/lib/bundler/cli/binstubs.rb +10 -6
- data/lib/bundler/cli/cache.rb +1 -1
- data/lib/bundler/cli/check.rb +4 -4
- data/lib/bundler/cli/common.rb +13 -3
- data/lib/bundler/cli/config.rb +18 -8
- data/lib/bundler/cli/console.rb +2 -5
- data/lib/bundler/cli/doctor.rb +16 -9
- data/lib/bundler/cli/exec.rb +2 -1
- data/lib/bundler/cli/fund.rb +1 -1
- data/lib/bundler/cli/gem.rb +153 -40
- data/lib/bundler/cli/info.rb +27 -17
- data/lib/bundler/cli/init.rb +6 -2
- data/lib/bundler/cli/inject.rb +1 -1
- data/lib/bundler/cli/install.rb +34 -42
- data/lib/bundler/cli/issue.rb +5 -4
- data/lib/bundler/cli/lock.rb +54 -28
- data/lib/bundler/cli/open.rb +9 -9
- data/lib/bundler/cli/outdated.rb +34 -29
- 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/remove.rb +1 -2
- data/lib/bundler/cli/show.rb +5 -5
- data/lib/bundler/cli/update.rb +12 -7
- data/lib/bundler/cli/viz.rb +1 -1
- data/lib/bundler/cli.rb +265 -313
- data/lib/bundler/compact_index_client/cache.rb +53 -67
- data/lib/bundler/compact_index_client/cache_file.rb +148 -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 +73 -77
- 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 +604 -347
- data/lib/bundler/dependency.rb +33 -71
- data/lib/bundler/digest.rb +71 -0
- data/lib/bundler/dsl.rb +136 -102
- data/lib/bundler/endpoint_specification.rb +42 -16
- data/lib/bundler/env.rb +5 -7
- data/lib/bundler/environment_preserver.rb +8 -22
- data/lib/bundler/errors.rb +113 -13
- data/lib/bundler/feature_flag.rb +1 -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 +98 -83
- data/lib/bundler/force_platform.rb +16 -0
- data/lib/bundler/friendly_errors.rb +29 -40
- data/lib/bundler/gem_helper.rb +12 -24
- data/lib/bundler/gem_helpers.rb +47 -7
- 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 +25 -13
- data/lib/bundler/inline.rb +41 -28
- data/lib/bundler/installer/gem_installer.rb +22 -13
- data/lib/bundler/installer/parallel_installer.rb +19 -66
- data/lib/bundler/installer/standalone.rb +58 -17
- data/lib/bundler/installer.rb +31 -93
- data/lib/bundler/lazy_specification.rb +151 -72
- data/lib/bundler/lockfile_generator.rb +13 -4
- data/lib/bundler/lockfile_parser.rb +146 -71
- data/lib/bundler/man/bundle-add.1 +54 -44
- data/lib/bundler/man/bundle-add.1.ronn +62 -21
- data/lib/bundler/man/bundle-binstubs.1 +10 -19
- data/lib/bundler/man/bundle-binstubs.1.ronn +6 -3
- data/lib/bundler/man/bundle-cache.1 +38 -25
- data/lib/bundler/man/bundle-cache.1.ronn +40 -4
- data/lib/bundler/man/bundle-check.1 +7 -14
- data/lib/bundler/man/bundle-check.1.ronn +7 -2
- 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 +48 -227
- data/lib/bundler/man/bundle-config.1.ronn +41 -34
- data/lib/bundler/man/bundle-console.1 +33 -0
- data/lib/bundler/man/bundle-console.1.ronn +39 -0
- data/lib/bundler/man/bundle-doctor.1 +5 -19
- data/lib/bundler/man/bundle-doctor.1.ronn +1 -1
- data/lib/bundler/man/bundle-env.1 +9 -0
- data/lib/bundler/man/bundle-env.1.ronn +10 -0
- data/lib/bundler/man/bundle-exec.1 +20 -78
- data/lib/bundler/man/bundle-exec.1.ronn +12 -10
- data/lib/bundler/man/bundle-fund.1 +22 -0
- data/lib/bundler/man/bundle-fund.1.ronn +25 -0
- data/lib/bundler/man/bundle-gem.1 +57 -72
- data/lib/bundler/man/bundle-gem.1.ronn +57 -9
- 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 +8 -11
- data/lib/bundler/man/bundle-info.1.ronn +9 -5
- data/lib/bundler/man/bundle-init.1 +7 -12
- data/lib/bundler/man/bundle-init.1.ronn +4 -1
- data/lib/bundler/man/bundle-inject.1 +17 -19
- data/lib/bundler/man/bundle-inject.1.ronn +12 -2
- data/lib/bundler/man/bundle-install.1 +43 -163
- data/lib/bundler/man/bundle-install.1.ronn +33 -51
- data/lib/bundler/man/bundle-issue.1 +45 -0
- data/lib/bundler/man/bundle-issue.1.ronn +37 -0
- data/lib/bundler/man/bundle-licenses.1 +9 -0
- data/lib/bundler/man/bundle-licenses.1.ronn +10 -0
- data/lib/bundler/man/bundle-list.1 +4 -19
- data/lib/bundler/man/bundle-list.1.ronn +4 -1
- data/lib/bundler/man/bundle-lock.1 +25 -34
- data/lib/bundler/man/bundle-lock.1.ronn +25 -4
- data/lib/bundler/man/bundle-open.1 +18 -18
- data/lib/bundler/man/bundle-open.1.ronn +10 -1
- data/lib/bundler/man/bundle-outdated.1 +23 -75
- data/lib/bundler/man/bundle-outdated.1.ronn +21 -22
- 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-pristine.1.ronn +1 -1
- data/lib/bundler/man/bundle-remove.1 +4 -14
- data/lib/bundler/man/bundle-remove.1.ronn +1 -1
- data/lib/bundler/man/bundle-show.1 +7 -11
- data/lib/bundler/man/bundle-show.1.ronn +4 -0
- data/lib/bundler/man/bundle-update.1 +31 -144
- data/lib/bundler/man/bundle-update.1.ronn +16 -7
- 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 +9 -18
- data/lib/bundler/man/bundle-viz.1.ronn +9 -3
- data/lib/bundler/man/bundle.1 +17 -51
- data/lib/bundler/man/bundle.1.ronn +12 -7
- data/lib/bundler/man/gemfile.5 +132 -346
- data/lib/bundler/man/gemfile.5.ronn +127 -86
- data/lib/bundler/man/index.txt +8 -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/materialization.rb +59 -0
- data/lib/bundler/mirror.rb +8 -10
- data/lib/bundler/plugin/api/source.rb +11 -14
- data/lib/bundler/plugin/events.rb +24 -0
- 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 +43 -20
- data/lib/bundler/plugin/source_list.rb +4 -4
- data/lib/bundler/plugin.rb +35 -7
- data/lib/bundler/process_lock.rb +10 -14
- data/lib/bundler/remote_specification.rb +17 -6
- data/lib/bundler/resolver/base.rb +117 -0
- data/lib/bundler/resolver/candidate.rb +82 -0
- data/lib/bundler/resolver/incompatibility.rb +15 -0
- data/lib/bundler/resolver/package.rb +90 -0
- data/lib/bundler/resolver/root.rb +25 -0
- data/lib/bundler/resolver/spec_group.rb +54 -66
- data/lib/bundler/resolver.rb +440 -306
- data/lib/bundler/retry.rb +2 -2
- data/lib/bundler/ruby_dsl.rb +42 -7
- data/lib/bundler/ruby_version.rb +22 -22
- data/lib/bundler/rubygems_ext.rb +323 -84
- data/lib/bundler/rubygems_gem_installer.rb +93 -65
- data/lib/bundler/rubygems_integration.rb +89 -237
- data/lib/bundler/runtime.rb +30 -20
- data/lib/bundler/safe_marshal.rb +31 -0
- data/lib/bundler/self_manager.rb +205 -0
- data/lib/bundler/settings.rb +145 -58
- data/lib/bundler/setup.rb +13 -1
- data/lib/bundler/shared_helpers.rb +94 -51
- data/lib/bundler/source/git/git_proxy.rb +283 -82
- data/lib/bundler/source/git.rb +187 -78
- data/lib/bundler/source/metadata.rb +16 -16
- data/lib/bundler/source/path/installer.rb +1 -22
- data/lib/bundler/source/path.rb +17 -27
- data/lib/bundler/source/rubygems/remote.rb +1 -1
- data/lib/bundler/source/rubygems.rb +165 -245
- data/lib/bundler/source/rubygems_aggregate.rb +1 -1
- data/lib/bundler/source.rb +7 -6
- data/lib/bundler/source_list.rb +41 -33
- data/lib/bundler/source_map.rb +15 -2
- data/lib/bundler/spec_set.rb +193 -58
- data/lib/bundler/stub_specification.rb +39 -7
- 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 +5 -2
- data/lib/bundler/templates/newgem/README.md.tt +12 -12
- 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 +20 -10
- 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 +26 -18
- 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 +61 -16
- data/lib/bundler/ui/silent.rb +33 -6
- data/lib/bundler/uri_credentials_filter.rb +3 -3
- 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/COPYING +56 -0
- data/lib/bundler/vendor/fileutils/lib/fileutils.rb +1350 -418
- 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 +102 -64
- 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/securerandom/.document +1 -0
- data/lib/bundler/vendor/securerandom/COPYING +56 -0
- data/lib/bundler/vendor/securerandom/lib/securerandom.rb +102 -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 +15 -19
- 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 +12 -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 +17 -1
- data/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +33 -17
- data/lib/bundler/vendor/thor/lib/thor/parser/option.rb +28 -9
- data/lib/bundler/vendor/thor/lib/thor/parser/options.rb +65 -8
- 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 +56 -162
- 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 +1 -46
- data/lib/bundler/vendor/thor/lib/thor/shell/table_printer.rb +118 -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 +166 -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/COPYING +56 -0
- data/lib/bundler/vendor/uri/lib/uri/common.rb +351 -219
- data/lib/bundler/vendor/uri/lib/uri/file.rb +10 -4
- data/lib/bundler/vendor/uri/lib/uri/ftp.rb +3 -3
- data/lib/bundler/vendor/uri/lib/uri/generic.rb +49 -39
- 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 +26 -26
- data/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +131 -50
- 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 +12 -12
- 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_securerandom.rb +12 -0
- 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 +22 -13
- data/lib/bundler.rb +176 -151
- metadata +98 -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/source.rb
CHANGED
@@ -11,17 +11,18 @@ module Bundler
|
|
11
11
|
|
12
12
|
attr_accessor :dependency_names
|
13
13
|
|
14
|
+
attr_reader :checksum_store
|
15
|
+
|
14
16
|
def unmet_deps
|
15
17
|
specs.unmet_dependency_names
|
16
18
|
end
|
17
19
|
|
18
|
-
def version_message(spec)
|
20
|
+
def version_message(spec, locked_spec = nil)
|
19
21
|
message = "#{spec.name} #{spec.version}"
|
20
22
|
message += " (#{spec.platform})" if spec.platform != Gem::Platform::RUBY && !spec.platform.nil?
|
21
23
|
|
22
|
-
if
|
23
|
-
|
24
|
-
locked_spec_version = locked_spec.version if locked_spec
|
24
|
+
if locked_spec
|
25
|
+
locked_spec_version = locked_spec.version
|
25
26
|
if locked_spec_version && spec.version != locked_spec_version
|
26
27
|
message += Bundler.ui.add_color(" (was #{locked_spec_version})", version_color(spec.version, locked_spec_version))
|
27
28
|
end
|
@@ -67,7 +68,7 @@ module Bundler
|
|
67
68
|
"#<#{self.class}:0x#{object_id} #{self}>"
|
68
69
|
end
|
69
70
|
|
70
|
-
def
|
71
|
+
def identifier
|
71
72
|
to_s
|
72
73
|
end
|
73
74
|
|
@@ -101,7 +102,7 @@ module Bundler
|
|
101
102
|
end
|
102
103
|
|
103
104
|
def print_using_message(message)
|
104
|
-
if !message.include?("(was ")
|
105
|
+
if !message.include?("(was ")
|
105
106
|
Bundler.ui.debug message
|
106
107
|
else
|
107
108
|
Bundler.ui.info message
|
data/lib/bundler/source_list.rb
CHANGED
@@ -22,6 +22,7 @@ module Bundler
|
|
22
22
|
@metadata_source = Source::Metadata.new
|
23
23
|
|
24
24
|
@merged_gem_lockfile_sections = false
|
25
|
+
@local_mode = true
|
25
26
|
end
|
26
27
|
|
27
28
|
def merged_gem_lockfile_sections?
|
@@ -73,6 +74,10 @@ module Bundler
|
|
73
74
|
global_rubygems_source
|
74
75
|
end
|
75
76
|
|
77
|
+
def local_mode?
|
78
|
+
@local_mode
|
79
|
+
end
|
80
|
+
|
76
81
|
def default_source
|
77
82
|
global_path_source || global_rubygems_source
|
78
83
|
end
|
@@ -86,7 +91,7 @@ module Bundler
|
|
86
91
|
end
|
87
92
|
|
88
93
|
def rubygems_remotes
|
89
|
-
rubygems_sources.
|
94
|
+
rubygems_sources.flat_map(&:remotes).uniq
|
90
95
|
end
|
91
96
|
|
92
97
|
def all_sources
|
@@ -98,7 +103,7 @@ module Bundler
|
|
98
103
|
end
|
99
104
|
|
100
105
|
def get(source)
|
101
|
-
source_list_for(source).find {|s|
|
106
|
+
source_list_for(source).find {|s| equivalent_source?(source, s) }
|
102
107
|
end
|
103
108
|
|
104
109
|
def lock_sources
|
@@ -106,14 +111,14 @@ module Bundler
|
|
106
111
|
end
|
107
112
|
|
108
113
|
def lock_other_sources
|
109
|
-
(path_sources + git_sources + plugin_sources).sort_by(&:
|
114
|
+
(path_sources + git_sources + plugin_sources).sort_by(&:identifier)
|
110
115
|
end
|
111
116
|
|
112
117
|
def lock_rubygems_sources
|
113
118
|
if merged_gem_lockfile_sections?
|
114
119
|
[combine_rubygems_sources]
|
115
120
|
else
|
116
|
-
rubygems_sources.sort_by(&:
|
121
|
+
rubygems_sources.sort_by(&:identifier)
|
117
122
|
end
|
118
123
|
end
|
119
124
|
|
@@ -140,11 +145,17 @@ module Bundler
|
|
140
145
|
all_sources.each(&:local_only!)
|
141
146
|
end
|
142
147
|
|
148
|
+
def local!
|
149
|
+
all_sources.each(&:local!)
|
150
|
+
end
|
151
|
+
|
143
152
|
def cached!
|
144
153
|
all_sources.each(&:cached!)
|
145
154
|
end
|
146
155
|
|
147
156
|
def remote!
|
157
|
+
@local_mode = false
|
158
|
+
|
148
159
|
all_sources.each(&:remote!)
|
149
160
|
end
|
150
161
|
|
@@ -157,23 +168,42 @@ module Bundler
|
|
157
168
|
end
|
158
169
|
|
159
170
|
def map_sources(replacement_sources)
|
160
|
-
|
171
|
+
rubygems = @rubygems_sources.map do |source|
|
172
|
+
replace_rubygems_source(replacement_sources, source) || source
|
173
|
+
end
|
174
|
+
|
175
|
+
git, plugin = [@git_sources, @plugin_sources].map do |sources|
|
161
176
|
sources.map do |source|
|
162
177
|
replacement_sources.find {|s| s == source } || source
|
163
178
|
end
|
164
179
|
end
|
180
|
+
|
181
|
+
path = @path_sources.map do |source|
|
182
|
+
replacement_sources.find {|s| s == (source.is_a?(Source::Gemspec) ? source.as_path_source : source) } || source
|
183
|
+
end
|
184
|
+
|
185
|
+
[rubygems, path, git, plugin]
|
165
186
|
end
|
166
187
|
|
167
188
|
def global_replacement_source(replacement_sources)
|
168
|
-
replacement_source = replacement_sources
|
189
|
+
replacement_source = replace_rubygems_source(replacement_sources, global_rubygems_source)
|
169
190
|
return global_rubygems_source unless replacement_source
|
170
191
|
|
171
192
|
replacement_source.local!
|
172
193
|
replacement_source
|
173
194
|
end
|
174
195
|
|
196
|
+
def replace_rubygems_source(replacement_sources, gemfile_source)
|
197
|
+
replacement_source = replacement_sources.find {|s| s == gemfile_source }
|
198
|
+
return unless replacement_source
|
199
|
+
|
200
|
+
# locked sources never include credentials so always prefer remotes from the gemfile
|
201
|
+
replacement_source.remotes = gemfile_source.remotes
|
202
|
+
replacement_source
|
203
|
+
end
|
204
|
+
|
175
205
|
def different_sources?(lock_sources, replacement_sources)
|
176
|
-
!
|
206
|
+
!equivalent_sources?(lock_sources, replacement_sources)
|
177
207
|
end
|
178
208
|
|
179
209
|
def rubygems_aggregate_class
|
@@ -202,7 +232,7 @@ module Bundler
|
|
202
232
|
def warn_on_git_protocol(source)
|
203
233
|
return if Bundler.settings["git.allow_insecure"]
|
204
234
|
|
205
|
-
if source.uri
|
235
|
+
if /^git\:/.match?(source.uri)
|
206
236
|
Bundler.ui.warn "The git source `#{source.uri}` uses the `git` protocol, " \
|
207
237
|
"which transmits data without encryption. Disable this warning with " \
|
208
238
|
"`bundle config set --local git.allow_insecure true`, or switch to the `https` " \
|
@@ -210,34 +240,12 @@ module Bundler
|
|
210
240
|
end
|
211
241
|
end
|
212
242
|
|
213
|
-
def equal_sources?(lock_sources, replacement_sources)
|
214
|
-
lock_sources.sort_by(&:to_s) == replacement_sources.sort_by(&:to_s)
|
215
|
-
end
|
216
|
-
|
217
|
-
def equal_source?(source, other_source)
|
218
|
-
return source.include?(other_source) if source.is_a?(Source::Rubygems) && other_source.is_a?(Source::Rubygems)
|
219
|
-
|
220
|
-
source == other_source
|
221
|
-
end
|
222
|
-
|
223
|
-
def equivalent_source?(source, other_source)
|
224
|
-
return false unless Bundler.settings[:allow_deployment_source_credential_changes] && source.is_a?(Source::Rubygems)
|
225
|
-
|
226
|
-
equivalent_rubygems_sources?([source], [other_source])
|
227
|
-
end
|
228
|
-
|
229
243
|
def equivalent_sources?(lock_sources, replacement_sources)
|
230
|
-
|
231
|
-
|
232
|
-
lock_rubygems_sources, lock_other_sources = lock_sources.partition {|s| s.is_a?(Source::Rubygems) }
|
233
|
-
replacement_rubygems_sources, replacement_other_sources = replacement_sources.partition {|s| s.is_a?(Source::Rubygems) }
|
234
|
-
|
235
|
-
equivalent_rubygems_sources?(lock_rubygems_sources, replacement_rubygems_sources) && equal_sources?(lock_other_sources, replacement_other_sources)
|
244
|
+
lock_sources.sort_by(&:identifier) == replacement_sources.sort_by(&:identifier)
|
236
245
|
end
|
237
246
|
|
238
|
-
def
|
239
|
-
|
240
|
-
lock_sources.all? {|s| s.equivalent_remotes?(actual_remotes) }
|
247
|
+
def equivalent_source?(source, other_source)
|
248
|
+
source == other_source
|
241
249
|
end
|
242
250
|
end
|
243
251
|
end
|
data/lib/bundler/source_map.rb
CHANGED
@@ -2,11 +2,12 @@
|
|
2
2
|
|
3
3
|
module Bundler
|
4
4
|
class SourceMap
|
5
|
-
attr_reader :sources, :dependencies
|
5
|
+
attr_reader :sources, :dependencies, :locked_specs
|
6
6
|
|
7
|
-
def initialize(sources, dependencies)
|
7
|
+
def initialize(sources, dependencies, locked_specs)
|
8
8
|
@sources = sources
|
9
9
|
@dependencies = dependencies
|
10
|
+
@locked_specs = locked_specs
|
10
11
|
end
|
11
12
|
|
12
13
|
def pinned_spec_names(skip = nil)
|
@@ -54,5 +55,17 @@ module Bundler
|
|
54
55
|
requirements
|
55
56
|
end
|
56
57
|
end
|
58
|
+
|
59
|
+
def locked_requirements
|
60
|
+
@locked_requirements ||= begin
|
61
|
+
requirements = {}
|
62
|
+
locked_specs.each do |locked_spec|
|
63
|
+
source = locked_spec.source
|
64
|
+
source.add_dependency_names(locked_spec.name)
|
65
|
+
requirements[locked_spec.name] = source
|
66
|
+
end
|
67
|
+
requirements
|
68
|
+
end
|
69
|
+
end
|
57
70
|
end
|
58
71
|
end
|
data/lib/bundler/spec_set.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require_relative "vendored_tsort"
|
4
4
|
|
5
5
|
module Bundler
|
6
6
|
class SpecSet
|
@@ -11,47 +11,87 @@ module Bundler
|
|
11
11
|
@specs = specs
|
12
12
|
end
|
13
13
|
|
14
|
-
def for(dependencies,
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
def for(dependencies, platforms_or_legacy_check = [nil], legacy_platforms = [nil], skips: [])
|
15
|
+
platforms = if [true, false].include?(platforms_or_legacy_check)
|
16
|
+
Bundler::SharedHelpers.major_deprecation 2,
|
17
|
+
"SpecSet#for received a `check` parameter, but that's no longer used and deprecated. " \
|
18
|
+
"SpecSet#for always implicitly performs validation. Please remove this parameter",
|
19
|
+
print_caller_location: true
|
18
20
|
|
19
|
-
|
20
|
-
|
21
|
-
|
21
|
+
legacy_platforms
|
22
|
+
else
|
23
|
+
platforms_or_legacy_check
|
24
|
+
end
|
25
|
+
|
26
|
+
materialize_dependencies(dependencies, platforms, skips: skips)
|
22
27
|
|
23
|
-
|
28
|
+
@materializations.flat_map(&:specs).uniq
|
29
|
+
end
|
24
30
|
|
25
|
-
|
26
|
-
|
27
|
-
match_current_platform ? specs += specs_for_dep : specs |= specs_for_dep
|
31
|
+
def normalize_platforms!(deps, platforms)
|
32
|
+
complete_platforms = add_extra_platforms!(platforms)
|
28
33
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
34
|
+
complete_platforms.map do |platform|
|
35
|
+
next platform if platform == Gem::Platform::RUBY
|
36
|
+
|
37
|
+
begin
|
38
|
+
Integer(platform.version)
|
39
|
+
rescue ArgumentError, TypeError
|
40
|
+
next platform
|
36
41
|
end
|
42
|
+
|
43
|
+
less_specific_platform = Gem::Platform.new([platform.cpu, platform.os, nil])
|
44
|
+
next platform if incomplete_for_platform?(deps, less_specific_platform)
|
45
|
+
|
46
|
+
less_specific_platform
|
47
|
+
end.uniq
|
48
|
+
end
|
49
|
+
|
50
|
+
def add_extra_platforms!(platforms)
|
51
|
+
return platforms.concat([Gem::Platform::RUBY]).uniq if @specs.empty?
|
52
|
+
|
53
|
+
new_platforms = all_platforms.select do |platform|
|
54
|
+
next if platforms.include?(platform)
|
55
|
+
next unless GemHelpers.generic(platform) == Gem::Platform::RUBY
|
56
|
+
|
57
|
+
complete_platform(platform)
|
37
58
|
end
|
59
|
+
return platforms if new_platforms.empty?
|
60
|
+
|
61
|
+
platforms.concat(new_platforms)
|
62
|
+
|
63
|
+
less_specific_platform = new_platforms.find {|platform| platform != Gem::Platform::RUBY && Bundler.local_platform === platform && platform === Bundler.local_platform }
|
64
|
+
platforms.delete(Bundler.local_platform) if less_specific_platform
|
65
|
+
|
66
|
+
platforms
|
67
|
+
end
|
38
68
|
|
39
|
-
|
40
|
-
|
69
|
+
def validate_deps(s)
|
70
|
+
s.runtime_dependencies.each do |dep|
|
71
|
+
next if dep.name == "bundler"
|
72
|
+
|
73
|
+
return :missing unless names.include?(dep.name)
|
74
|
+
return :invalid if none? {|spec| dep.matches_spec?(spec) }
|
41
75
|
end
|
42
76
|
|
43
|
-
|
77
|
+
:valid
|
44
78
|
end
|
45
79
|
|
46
80
|
def [](key)
|
47
81
|
key = key.name if key.respond_to?(:name)
|
48
|
-
lookup[key]
|
82
|
+
lookup[key]&.reverse || []
|
49
83
|
end
|
50
84
|
|
51
85
|
def []=(key, value)
|
52
86
|
@specs << value
|
53
|
-
|
54
|
-
|
87
|
+
|
88
|
+
reset!
|
89
|
+
end
|
90
|
+
|
91
|
+
def delete(specs)
|
92
|
+
Array(specs).each {|spec| @specs.delete(spec) }
|
93
|
+
|
94
|
+
reset!
|
55
95
|
end
|
56
96
|
|
57
97
|
def sort!
|
@@ -67,50 +107,70 @@ module Bundler
|
|
67
107
|
end
|
68
108
|
|
69
109
|
def materialize(deps)
|
70
|
-
|
110
|
+
materialize_dependencies(deps)
|
71
111
|
|
72
|
-
|
73
|
-
next s unless s.is_a?(LazySpecification)
|
74
|
-
s.source.local!
|
75
|
-
s.__materialize__ || s
|
76
|
-
end
|
77
|
-
SpecSet.new(materialized)
|
112
|
+
SpecSet.new(materialized_specs)
|
78
113
|
end
|
79
114
|
|
80
115
|
# Materialize for all the specs in the spec set, regardless of what platform they're for
|
81
|
-
# This is in contrast to how for does platform filtering (and specifically different from how `materialize` calls `for` only for the current platform)
|
82
116
|
# @return [Array<Gem::Specification>]
|
83
117
|
def materialized_for_all_platforms
|
84
118
|
@specs.map do |s|
|
85
119
|
next s unless s.is_a?(LazySpecification)
|
86
|
-
s.source.local!
|
87
120
|
s.source.remote!
|
88
|
-
spec = s.
|
121
|
+
spec = s.materialize_strictly
|
89
122
|
raise GemNotFound, "Could not find #{s.full_name} in any of the sources" unless spec
|
90
123
|
spec
|
91
124
|
end
|
92
125
|
end
|
93
126
|
|
127
|
+
def incomplete_for_platform?(deps, platform)
|
128
|
+
return false if @specs.empty?
|
129
|
+
|
130
|
+
validation_set = self.class.new(@specs)
|
131
|
+
validation_set.for(deps, [platform])
|
132
|
+
|
133
|
+
validation_set.incomplete_specs.any?
|
134
|
+
end
|
135
|
+
|
136
|
+
def missing_specs_for(dependencies)
|
137
|
+
materialize_dependencies(dependencies)
|
138
|
+
|
139
|
+
missing_specs
|
140
|
+
end
|
141
|
+
|
94
142
|
def missing_specs
|
95
|
-
@
|
143
|
+
@materializations.flat_map(&:completely_missing_specs)
|
96
144
|
end
|
97
145
|
|
98
|
-
def
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
146
|
+
def partially_missing_specs
|
147
|
+
@materializations.flat_map(&:partially_missing_specs)
|
148
|
+
end
|
149
|
+
|
150
|
+
def incomplete_specs
|
151
|
+
@materializations.flat_map(&:incomplete_specs)
|
152
|
+
end
|
153
|
+
|
154
|
+
def insecurely_materialized_specs
|
155
|
+
materialized_specs.select(&:insecurely_materialized?)
|
156
|
+
end
|
157
|
+
|
158
|
+
def -(other)
|
159
|
+
SpecSet.new(to_a - other.to_a)
|
106
160
|
end
|
107
161
|
|
108
162
|
def find_by_name_and_platform(name, platform)
|
109
163
|
@specs.detect {|spec| spec.name == name && spec.match_platform(platform) }
|
110
164
|
end
|
111
165
|
|
166
|
+
def delete_by_name(name)
|
167
|
+
@specs.reject! {|spec| spec.name == name }
|
168
|
+
|
169
|
+
reset!
|
170
|
+
end
|
171
|
+
|
112
172
|
def what_required(spec)
|
113
|
-
unless req = find {|s| s.
|
173
|
+
unless req = find {|s| s.runtime_dependencies.any? {|d| d.name == spec.name } }
|
114
174
|
return [spec]
|
115
175
|
end
|
116
176
|
what_required(req) << spec
|
@@ -136,8 +196,87 @@ module Bundler
|
|
136
196
|
sorted.each(&b)
|
137
197
|
end
|
138
198
|
|
199
|
+
def names
|
200
|
+
lookup.keys
|
201
|
+
end
|
202
|
+
|
203
|
+
def valid?(s)
|
204
|
+
s.matches_current_metadata? && valid_dependencies?(s)
|
205
|
+
end
|
206
|
+
|
139
207
|
private
|
140
208
|
|
209
|
+
def materialize_dependencies(dependencies, platforms = [nil], skips: [])
|
210
|
+
handled = ["bundler"].product(platforms).map {|k| [k, true] }.to_h
|
211
|
+
deps = dependencies.product(platforms)
|
212
|
+
@materializations = []
|
213
|
+
|
214
|
+
loop do
|
215
|
+
break unless dep = deps.shift
|
216
|
+
|
217
|
+
dependency = dep[0]
|
218
|
+
platform = dep[1]
|
219
|
+
name = dependency.name
|
220
|
+
|
221
|
+
key = [name, platform]
|
222
|
+
next if handled.key?(key)
|
223
|
+
|
224
|
+
handled[key] = true
|
225
|
+
|
226
|
+
materialization = Materialization.new(dependency, platform, candidates: lookup[name])
|
227
|
+
|
228
|
+
deps.concat(materialization.dependencies) if materialization.complete?
|
229
|
+
|
230
|
+
@materializations << materialization unless skips.include?(name)
|
231
|
+
end
|
232
|
+
|
233
|
+
@materializations
|
234
|
+
end
|
235
|
+
|
236
|
+
def materialized_specs
|
237
|
+
@materializations.filter_map(&:materialized_spec)
|
238
|
+
end
|
239
|
+
|
240
|
+
def reset!
|
241
|
+
@sorted = nil
|
242
|
+
@lookup = nil
|
243
|
+
end
|
244
|
+
|
245
|
+
def complete_platform(platform)
|
246
|
+
new_specs = []
|
247
|
+
|
248
|
+
valid_platform = lookup.all? do |_, specs|
|
249
|
+
spec = specs.first
|
250
|
+
matching_specs = spec.source.specs.search([spec.name, spec.version])
|
251
|
+
platform_spec = GemHelpers.select_best_platform_match(matching_specs, platform).find do |s|
|
252
|
+
valid?(s)
|
253
|
+
end
|
254
|
+
|
255
|
+
if platform_spec
|
256
|
+
new_specs << LazySpecification.from_spec(platform_spec) unless specs.include?(platform_spec)
|
257
|
+
true
|
258
|
+
else
|
259
|
+
false
|
260
|
+
end
|
261
|
+
end
|
262
|
+
|
263
|
+
if valid_platform && new_specs.any?
|
264
|
+
@specs.concat(new_specs)
|
265
|
+
|
266
|
+
reset!
|
267
|
+
end
|
268
|
+
|
269
|
+
valid_platform
|
270
|
+
end
|
271
|
+
|
272
|
+
def all_platforms
|
273
|
+
@specs.flat_map {|spec| spec.source.specs.search([spec.name, spec.version]).map(&:platform) }.uniq
|
274
|
+
end
|
275
|
+
|
276
|
+
def valid_dependencies?(s)
|
277
|
+
validate_deps(s) == :valid
|
278
|
+
end
|
279
|
+
|
141
280
|
def sorted
|
142
281
|
rake = @specs.find {|s| s.name == "rake" }
|
143
282
|
begin
|
@@ -146,7 +285,7 @@ module Bundler
|
|
146
285
|
cgems = extract_circular_gems(error)
|
147
286
|
raise CyclicDependencyError, "Your bundle requires gems that depend" \
|
148
287
|
" on each other, creating an infinite loop. Please remove either" \
|
149
|
-
" gem '#{cgems[
|
288
|
+
" gem '#{cgems[0]}' or gem '#{cgems[1]}' and try again."
|
150
289
|
end
|
151
290
|
end
|
152
291
|
|
@@ -156,8 +295,9 @@ module Bundler
|
|
156
295
|
|
157
296
|
def lookup
|
158
297
|
@lookup ||= begin
|
159
|
-
lookup =
|
160
|
-
|
298
|
+
lookup = {}
|
299
|
+
@specs.each do |s|
|
300
|
+
lookup[s.name] ||= []
|
161
301
|
lookup[s.name] << s
|
162
302
|
end
|
163
303
|
lookup
|
@@ -169,19 +309,14 @@ module Bundler
|
|
169
309
|
@specs.sort_by(&:name).each {|s| yield s }
|
170
310
|
end
|
171
311
|
|
172
|
-
def spec_for_dependency(dep, match_current_platform)
|
173
|
-
specs_for_platforms = lookup[dep.name]
|
174
|
-
if match_current_platform
|
175
|
-
GemHelpers.select_best_platform_match(specs_for_platforms.select{|s| Gem::Platform.match_spec?(s) }, Bundler.local_platform)
|
176
|
-
else
|
177
|
-
GemHelpers.select_best_platform_match(specs_for_platforms, dep.__platform)
|
178
|
-
end
|
179
|
-
end
|
180
|
-
|
181
312
|
def tsort_each_child(s)
|
182
313
|
s.dependencies.sort_by(&:name).each do |d|
|
183
314
|
next if d.type == :development
|
184
|
-
|
315
|
+
|
316
|
+
specs_for_name = lookup[d.name]
|
317
|
+
next unless specs_for_name
|
318
|
+
|
319
|
+
specs_for_name.each {|s2| yield s2 }
|
185
320
|
end
|
186
321
|
end
|
187
322
|
end
|
@@ -9,6 +9,11 @@ module Bundler
|
|
9
9
|
spec
|
10
10
|
end
|
11
11
|
|
12
|
+
def insecurely_materialized?
|
13
|
+
false
|
14
|
+
end
|
15
|
+
|
16
|
+
attr_reader :checksum
|
12
17
|
attr_accessor :stub, :ignored
|
13
18
|
|
14
19
|
def source=(source)
|
@@ -16,7 +21,8 @@ module Bundler
|
|
16
21
|
# Stub has no concept of source, which means that extension_dir may be wrong
|
17
22
|
# This is the case for git-based gems. So, instead manually assign the extension dir
|
18
23
|
return unless source.respond_to?(:extension_dir_name)
|
19
|
-
|
24
|
+
unique_extension_dir = [source.extension_dir_name, File.basename(full_gem_path)].uniq.join("-")
|
25
|
+
path = File.join(stub.extensions_dir, unique_extension_dir)
|
20
26
|
stub.extension_dir = File.expand_path(path)
|
21
27
|
end
|
22
28
|
|
@@ -26,6 +32,17 @@ module Bundler
|
|
26
32
|
|
27
33
|
# @!group Stub Delegates
|
28
34
|
|
35
|
+
def ignored?
|
36
|
+
return @ignored unless @ignored.nil?
|
37
|
+
|
38
|
+
@ignored = missing_extensions?
|
39
|
+
return false unless @ignored
|
40
|
+
|
41
|
+
warn "Source #{source} is ignoring #{self} because it is missing extensions"
|
42
|
+
|
43
|
+
true
|
44
|
+
end
|
45
|
+
|
29
46
|
def manually_installed?
|
30
47
|
# This is for manually installed gems which are gems that were fixed in place after a
|
31
48
|
# failed installation. Once the issue was resolved, the user then manually created
|
@@ -43,8 +60,8 @@ module Bundler
|
|
43
60
|
true
|
44
61
|
end
|
45
62
|
|
46
|
-
def activated
|
47
|
-
stub.activated
|
63
|
+
def activated?
|
64
|
+
stub.activated?
|
48
65
|
end
|
49
66
|
|
50
67
|
def activated=(activated)
|
@@ -56,7 +73,7 @@ module Bundler
|
|
56
73
|
end
|
57
74
|
|
58
75
|
def gem_build_complete_path
|
59
|
-
|
76
|
+
stub.gem_build_complete_path
|
60
77
|
end
|
61
78
|
|
62
79
|
def default_gem?
|
@@ -64,15 +81,25 @@ module Bundler
|
|
64
81
|
end
|
65
82
|
|
66
83
|
def full_gem_path
|
67
|
-
|
68
|
-
|
69
|
-
|
84
|
+
stub.full_gem_path
|
85
|
+
end
|
86
|
+
|
87
|
+
def full_gem_path=(path)
|
88
|
+
stub.full_gem_path = path
|
70
89
|
end
|
71
90
|
|
72
91
|
def full_require_paths
|
73
92
|
stub.full_require_paths
|
74
93
|
end
|
75
94
|
|
95
|
+
def require_paths
|
96
|
+
stub.require_paths
|
97
|
+
end
|
98
|
+
|
99
|
+
def base_dir=(path)
|
100
|
+
stub.base_dir = path
|
101
|
+
end
|
102
|
+
|
76
103
|
def load_paths
|
77
104
|
full_require_paths
|
78
105
|
end
|
@@ -89,6 +116,10 @@ module Bundler
|
|
89
116
|
stub.raw_require_paths
|
90
117
|
end
|
91
118
|
|
119
|
+
def inspect
|
120
|
+
"#<#{self.class} @name=\"#{name}\" (#{full_name.delete_prefix("#{name}-")})>"
|
121
|
+
end
|
122
|
+
|
92
123
|
private
|
93
124
|
|
94
125
|
def _remote_specification
|
@@ -106,6 +137,7 @@ module Bundler
|
|
106
137
|
end
|
107
138
|
|
108
139
|
rs.source = source
|
140
|
+
rs.base_dir = stub.base_dir
|
109
141
|
|
110
142
|
rs
|
111
143
|
end
|