bundler-plus 4.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +5670 -0
- data/LICENSE.md +22 -0
- data/README.md +58 -0
- data/bundler.gemspec +46 -0
- data/exe/bundle +29 -0
- data/exe/bundler +4 -0
- data/lib/bundler/.document +1 -0
- data/lib/bundler/build_metadata.rb +44 -0
- data/lib/bundler/capistrano.rb +4 -0
- data/lib/bundler/checksum.rb +270 -0
- data/lib/bundler/ci_detector.rb +75 -0
- data/lib/bundler/cli/add.rb +62 -0
- data/lib/bundler/cli/binstubs.rb +57 -0
- data/lib/bundler/cli/cache.rb +32 -0
- data/lib/bundler/cli/check.rb +40 -0
- data/lib/bundler/cli/clean.rb +25 -0
- data/lib/bundler/cli/common.rb +161 -0
- data/lib/bundler/cli/config.rb +208 -0
- data/lib/bundler/cli/console.rb +47 -0
- data/lib/bundler/cli/doctor/diagnose.rb +167 -0
- data/lib/bundler/cli/doctor/ssl.rb +249 -0
- data/lib/bundler/cli/doctor.rb +33 -0
- data/lib/bundler/cli/exec.rb +114 -0
- data/lib/bundler/cli/fund.rb +36 -0
- data/lib/bundler/cli/gem.rb +493 -0
- data/lib/bundler/cli/info.rb +83 -0
- data/lib/bundler/cli/init.rb +51 -0
- data/lib/bundler/cli/install.rb +127 -0
- data/lib/bundler/cli/issue.rb +41 -0
- data/lib/bundler/cli/list.rb +97 -0
- data/lib/bundler/cli/lock.rb +94 -0
- data/lib/bundler/cli/open.rb +29 -0
- data/lib/bundler/cli/outdated.rb +337 -0
- data/lib/bundler/cli/platform.rb +48 -0
- data/lib/bundler/cli/plugin.rb +39 -0
- data/lib/bundler/cli/pristine.rb +64 -0
- data/lib/bundler/cli/remove.rb +17 -0
- data/lib/bundler/cli/show.rb +71 -0
- data/lib/bundler/cli/update.rb +125 -0
- data/lib/bundler/cli.rb +829 -0
- data/lib/bundler/compact_index_client/cache.rb +96 -0
- data/lib/bundler/compact_index_client/cache_file.rb +148 -0
- data/lib/bundler/compact_index_client/parser.rb +87 -0
- data/lib/bundler/compact_index_client/updater.rb +105 -0
- data/lib/bundler/compact_index_client.rb +92 -0
- data/lib/bundler/constants.rb +14 -0
- data/lib/bundler/current_ruby.rb +94 -0
- data/lib/bundler/definition.rb +1304 -0
- data/lib/bundler/dependency.rb +151 -0
- data/lib/bundler/deployment.rb +6 -0
- data/lib/bundler/deprecate.rb +44 -0
- data/lib/bundler/digest.rb +71 -0
- data/lib/bundler/dsl.rb +642 -0
- data/lib/bundler/endpoint_specification.rb +184 -0
- data/lib/bundler/env.rb +148 -0
- data/lib/bundler/environment_preserver.rb +69 -0
- data/lib/bundler/errors.rb +277 -0
- data/lib/bundler/feature_flag.rb +20 -0
- data/lib/bundler/fetcher/base.rb +55 -0
- data/lib/bundler/fetcher/compact_index.rb +133 -0
- data/lib/bundler/fetcher/dependency.rb +85 -0
- data/lib/bundler/fetcher/downloader.rb +116 -0
- data/lib/bundler/fetcher/gem_remote_fetcher.rb +24 -0
- data/lib/bundler/fetcher/index.rb +25 -0
- data/lib/bundler/fetcher.rb +365 -0
- data/lib/bundler/force_platform.rb +16 -0
- data/lib/bundler/friendly_errors.rb +127 -0
- data/lib/bundler/gem_helper.rb +237 -0
- data/lib/bundler/gem_tasks.rb +7 -0
- data/lib/bundler/gem_version_promoter.rb +147 -0
- data/lib/bundler/index.rb +203 -0
- data/lib/bundler/injector.rb +284 -0
- data/lib/bundler/inline.rb +106 -0
- data/lib/bundler/installer/gem_installer.rb +88 -0
- data/lib/bundler/installer/parallel_installer.rb +280 -0
- data/lib/bundler/installer/standalone.rb +113 -0
- data/lib/bundler/installer.rb +241 -0
- data/lib/bundler/lazy_specification.rb +270 -0
- data/lib/bundler/lockfile_generator.rb +119 -0
- data/lib/bundler/lockfile_parser.rb +328 -0
- data/lib/bundler/man/.document +1 -0
- data/lib/bundler/man/bundle-add.1 +79 -0
- data/lib/bundler/man/bundle-add.1.ronn +92 -0
- data/lib/bundler/man/bundle-binstubs.1 +30 -0
- data/lib/bundler/man/bundle-binstubs.1.ronn +42 -0
- data/lib/bundler/man/bundle-cache.1 +56 -0
- data/lib/bundler/man/bundle-cache.1.ronn +95 -0
- data/lib/bundler/man/bundle-check.1 +21 -0
- data/lib/bundler/man/bundle-check.1.ronn +26 -0
- data/lib/bundler/man/bundle-clean.1 +17 -0
- data/lib/bundler/man/bundle-clean.1.ronn +18 -0
- data/lib/bundler/man/bundle-config.1 +339 -0
- data/lib/bundler/man/bundle-config.1.ronn +455 -0
- 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 +69 -0
- data/lib/bundler/man/bundle-doctor.1.ronn +77 -0
- 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 +104 -0
- data/lib/bundler/man/bundle-exec.1.ronn +150 -0
- 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 +107 -0
- data/lib/bundler/man/bundle-gem.1.ronn +150 -0
- 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 +17 -0
- data/lib/bundler/man/bundle-info.1.ronn +21 -0
- data/lib/bundler/man/bundle-init.1 +20 -0
- data/lib/bundler/man/bundle-init.1.ronn +32 -0
- data/lib/bundler/man/bundle-install.1 +178 -0
- data/lib/bundler/man/bundle-install.1.ronn +314 -0
- 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 +40 -0
- data/lib/bundler/man/bundle-list.1.ronn +41 -0
- data/lib/bundler/man/bundle-lock.1 +75 -0
- data/lib/bundler/man/bundle-lock.1.ronn +115 -0
- data/lib/bundler/man/bundle-open.1 +32 -0
- data/lib/bundler/man/bundle-open.1.ronn +28 -0
- data/lib/bundler/man/bundle-outdated.1 +106 -0
- data/lib/bundler/man/bundle-outdated.1.ronn +117 -0
- data/lib/bundler/man/bundle-platform.1 +49 -0
- data/lib/bundler/man/bundle-platform.1.ronn +49 -0
- data/lib/bundler/man/bundle-plugin.1 +76 -0
- data/lib/bundler/man/bundle-plugin.1.ronn +84 -0
- data/lib/bundler/man/bundle-pristine.1 +23 -0
- data/lib/bundler/man/bundle-pristine.1.ronn +34 -0
- data/lib/bundler/man/bundle-remove.1 +15 -0
- data/lib/bundler/man/bundle-remove.1.ronn +16 -0
- data/lib/bundler/man/bundle-show.1 +16 -0
- data/lib/bundler/man/bundle-show.1.ronn +21 -0
- data/lib/bundler/man/bundle-update.1 +284 -0
- data/lib/bundler/man/bundle-update.1.ronn +367 -0
- data/lib/bundler/man/bundle-version.1 +22 -0
- data/lib/bundler/man/bundle-version.1.ronn +24 -0
- data/lib/bundler/man/bundle.1 +93 -0
- data/lib/bundler/man/bundle.1.ronn +107 -0
- data/lib/bundler/man/gemfile.5 +503 -0
- data/lib/bundler/man/gemfile.5.ronn +586 -0
- data/lib/bundler/man/index.txt +31 -0
- data/lib/bundler/match_metadata.rb +30 -0
- data/lib/bundler/match_platform.rb +42 -0
- data/lib/bundler/match_remote_metadata.rb +29 -0
- data/lib/bundler/materialization.rb +59 -0
- data/lib/bundler/mirror.rb +221 -0
- data/lib/bundler/plugin/api/source.rb +330 -0
- data/lib/bundler/plugin/api.rb +81 -0
- data/lib/bundler/plugin/dsl.rb +53 -0
- data/lib/bundler/plugin/events.rb +85 -0
- data/lib/bundler/plugin/index.rb +203 -0
- data/lib/bundler/plugin/installer/git.rb +34 -0
- data/lib/bundler/plugin/installer/path.rb +26 -0
- data/lib/bundler/plugin/installer/rubygems.rb +19 -0
- data/lib/bundler/plugin/installer.rb +123 -0
- data/lib/bundler/plugin/source_list.rb +31 -0
- data/lib/bundler/plugin/unloaded_source.rb +25 -0
- data/lib/bundler/plugin.rb +387 -0
- data/lib/bundler/process_lock.rb +20 -0
- data/lib/bundler/remote_specification.rb +126 -0
- data/lib/bundler/resolver/base.rb +127 -0
- data/lib/bundler/resolver/candidate.rb +85 -0
- data/lib/bundler/resolver/incompatibility.rb +15 -0
- data/lib/bundler/resolver/package.rb +95 -0
- data/lib/bundler/resolver/root.rb +25 -0
- data/lib/bundler/resolver/spec_group.rb +74 -0
- data/lib/bundler/resolver/strategy.rb +43 -0
- data/lib/bundler/resolver.rb +603 -0
- data/lib/bundler/retry.rb +92 -0
- data/lib/bundler/ruby_dsl.rb +67 -0
- data/lib/bundler/ruby_version.rb +135 -0
- data/lib/bundler/rubygems_ext.rb +503 -0
- data/lib/bundler/rubygems_gem_installer.rb +206 -0
- data/lib/bundler/rubygems_integration.rb +456 -0
- data/lib/bundler/runtime.rb +331 -0
- data/lib/bundler/safe_marshal.rb +31 -0
- data/lib/bundler/self_manager.rb +197 -0
- data/lib/bundler/settings/validator.rb +86 -0
- data/lib/bundler/settings.rb +585 -0
- data/lib/bundler/setup.rb +39 -0
- data/lib/bundler/shared_helpers.rb +392 -0
- data/lib/bundler/source/gemspec.rb +19 -0
- data/lib/bundler/source/git/git_proxy.rb +509 -0
- data/lib/bundler/source/git.rb +451 -0
- data/lib/bundler/source/metadata.rb +67 -0
- data/lib/bundler/source/path/installer.rb +53 -0
- data/lib/bundler/source/path.rb +256 -0
- data/lib/bundler/source/rubygems/remote.rb +86 -0
- data/lib/bundler/source/rubygems.rb +606 -0
- data/lib/bundler/source/rubygems_aggregate.rb +71 -0
- data/lib/bundler/source.rb +120 -0
- data/lib/bundler/source_list.rb +240 -0
- data/lib/bundler/source_map.rb +72 -0
- data/lib/bundler/spec_set.rb +390 -0
- data/lib/bundler/stub_specification.rb +147 -0
- data/lib/bundler/templates/.document +1 -0
- data/lib/bundler/templates/Executable +16 -0
- data/lib/bundler/templates/Executable.standalone +14 -0
- data/lib/bundler/templates/Gemfile +5 -0
- data/lib/bundler/templates/newgem/CHANGELOG.md.tt +5 -0
- data/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +10 -0
- data/lib/bundler/templates/newgem/Cargo.toml.tt +13 -0
- data/lib/bundler/templates/newgem/Gemfile.tt +24 -0
- data/lib/bundler/templates/newgem/LICENSE.txt.tt +21 -0
- data/lib/bundler/templates/newgem/README.md.tt +49 -0
- data/lib/bundler/templates/newgem/Rakefile.tt +72 -0
- data/lib/bundler/templates/newgem/bin/console.tt +11 -0
- data/lib/bundler/templates/newgem/bin/setup.tt +8 -0
- data/lib/bundler/templates/newgem/circleci/config.yml.tt +37 -0
- data/lib/bundler/templates/newgem/exe/newgem.tt +3 -0
- data/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +22 -0
- data/lib/bundler/templates/newgem/ext/newgem/build.rs.tt +5 -0
- data/lib/bundler/templates/newgem/ext/newgem/extconf-c.rb.tt +10 -0
- data/lib/bundler/templates/newgem/ext/newgem/extconf-go.rb.tt +11 -0
- data/lib/bundler/templates/newgem/ext/newgem/extconf-rust.rb.tt +6 -0
- data/lib/bundler/templates/newgem/ext/newgem/go.mod.tt +5 -0
- data/lib/bundler/templates/newgem/ext/newgem/newgem-go.c.tt +2 -0
- data/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt +9 -0
- data/lib/bundler/templates/newgem/ext/newgem/newgem.go.tt +31 -0
- data/lib/bundler/templates/newgem/ext/newgem/newgem.h.tt +6 -0
- data/lib/bundler/templates/newgem/ext/newgem/src/lib.rs.tt +23 -0
- data/lib/bundler/templates/newgem/github/workflows/build-gems.yml.tt +69 -0
- data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +48 -0
- data/lib/bundler/templates/newgem/gitignore.tt +23 -0
- data/lib/bundler/templates/newgem/gitlab-ci.yml.tt +27 -0
- data/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +9 -0
- data/lib/bundler/templates/newgem/lib/newgem.rb.tt +15 -0
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +58 -0
- data/lib/bundler/templates/newgem/rspec.tt +3 -0
- data/lib/bundler/templates/newgem/rubocop.yml.tt +8 -0
- data/lib/bundler/templates/newgem/sig/newgem.rbs.tt +8 -0
- data/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +19 -0
- data/lib/bundler/templates/newgem/spec/spec_helper.rb.tt +15 -0
- data/lib/bundler/templates/newgem/standard.yml.tt +3 -0
- data/lib/bundler/templates/newgem/test/minitest/test_helper.rb.tt +6 -0
- data/lib/bundler/templates/newgem/test/minitest/test_newgem.rb.tt +19 -0
- 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/rg_proxy.rb +19 -0
- data/lib/bundler/ui/shell.rb +191 -0
- data/lib/bundler/ui/silent.rb +96 -0
- data/lib/bundler/ui.rb +9 -0
- data/lib/bundler/uri_credentials_filter.rb +43 -0
- data/lib/bundler/uri_normalizer.rb +23 -0
- 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 +227 -0
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +3 -0
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb +56 -0
- data/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +230 -0
- data/lib/bundler/vendor/fileutils/COPYING +56 -0
- data/lib/bundler/vendor/fileutils/lib/fileutils.rb +2701 -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 +41 -0
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb +65 -0
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb +80 -0
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +1153 -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 +169 -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/strategy.rb +42 -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 +423 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +236 -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/COPYING +56 -0
- data/lib/bundler/vendor/securerandom/lib/securerandom.rb +102 -0
- data/lib/bundler/vendor/thor/LICENSE.md +20 -0
- data/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb +105 -0
- data/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb +61 -0
- data/lib/bundler/vendor/thor/lib/thor/actions/directory.rb +108 -0
- data/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +143 -0
- data/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +407 -0
- data/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +130 -0
- data/lib/bundler/vendor/thor/lib/thor/actions.rb +340 -0
- data/lib/bundler/vendor/thor/lib/thor/base.rb +825 -0
- data/lib/bundler/vendor/thor/lib/thor/command.rb +151 -0
- data/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +107 -0
- data/lib/bundler/vendor/thor/lib/thor/error.rb +106 -0
- data/lib/bundler/vendor/thor/lib/thor/group.rb +292 -0
- data/lib/bundler/vendor/thor/lib/thor/invocation.rb +178 -0
- data/lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb +37 -0
- data/lib/bundler/vendor/thor/lib/thor/line_editor/readline.rb +88 -0
- data/lib/bundler/vendor/thor/lib/thor/line_editor.rb +17 -0
- data/lib/bundler/vendor/thor/lib/thor/nested_context.rb +29 -0
- data/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +86 -0
- data/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +195 -0
- data/lib/bundler/vendor/thor/lib/thor/parser/option.rb +178 -0
- data/lib/bundler/vendor/thor/lib/thor/parser/options.rb +294 -0
- data/lib/bundler/vendor/thor/lib/thor/parser.rb +4 -0
- data/lib/bundler/vendor/thor/lib/thor/rake_compat.rb +72 -0
- data/lib/bundler/vendor/thor/lib/thor/runner.rb +335 -0
- data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +384 -0
- data/lib/bundler/vendor/thor/lib/thor/shell/color.rb +112 -0
- data/lib/bundler/vendor/thor/lib/thor/shell/column_printer.rb +29 -0
- data/lib/bundler/vendor/thor/lib/thor/shell/html.rb +81 -0
- 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 +81 -0
- data/lib/bundler/vendor/thor/lib/thor/util.rb +285 -0
- data/lib/bundler/vendor/thor/lib/thor/version.rb +3 -0
- data/lib/bundler/vendor/thor/lib/thor.rb +674 -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/COPYING +56 -0
- data/lib/bundler/vendor/uri/lib/uri/common.rb +922 -0
- data/lib/bundler/vendor/uri/lib/uri/file.rb +100 -0
- data/lib/bundler/vendor/uri/lib/uri/ftp.rb +267 -0
- data/lib/bundler/vendor/uri/lib/uri/generic.rb +1592 -0
- data/lib/bundler/vendor/uri/lib/uri/http.rb +137 -0
- data/lib/bundler/vendor/uri/lib/uri/https.rb +23 -0
- data/lib/bundler/vendor/uri/lib/uri/ldap.rb +261 -0
- data/lib/bundler/vendor/uri/lib/uri/ldaps.rb +22 -0
- data/lib/bundler/vendor/uri/lib/uri/mailto.rb +293 -0
- data/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +547 -0
- data/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +206 -0
- data/lib/bundler/vendor/uri/lib/uri/version.rb +6 -0
- 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 +104 -0
- data/lib/bundler/vendored_fileutils.rb +4 -0
- data/lib/bundler/vendored_net_http.rb +23 -0
- data/lib/bundler/vendored_persistent.rb +11 -0
- data/lib/bundler/vendored_pub_grub.rb +4 -0
- data/lib/bundler/vendored_securerandom.rb +12 -0
- data/lib/bundler/vendored_thor.rb +8 -0
- data/lib/bundler/vendored_timeout.rb +12 -0
- data/lib/bundler/vendored_tsort.rb +4 -0
- data/lib/bundler/vendored_uri.rb +21 -0
- data/lib/bundler/version.rb +21 -0
- data/lib/bundler/vlad.rb +4 -0
- data/lib/bundler/worker.rb +125 -0
- data/lib/bundler/yaml_serializer.rb +98 -0
- data/lib/bundler.rb +691 -0
- metadata +409 -0
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Bundler
|
|
4
|
+
class Source
|
|
5
|
+
class Path < Source
|
|
6
|
+
autoload :Installer, File.expand_path("path/installer", __dir__)
|
|
7
|
+
|
|
8
|
+
attr_reader :path, :options, :root_path, :original_path
|
|
9
|
+
attr_writer :name
|
|
10
|
+
attr_accessor :version
|
|
11
|
+
|
|
12
|
+
protected :original_path
|
|
13
|
+
|
|
14
|
+
DEFAULT_GLOB = "{,*,*/*}.gemspec"
|
|
15
|
+
|
|
16
|
+
def initialize(options)
|
|
17
|
+
@checksum_store = Checksum::Store.new
|
|
18
|
+
@options = options.dup
|
|
19
|
+
@glob = options["glob"] || DEFAULT_GLOB
|
|
20
|
+
|
|
21
|
+
@root_path = options["root_path"] || root
|
|
22
|
+
|
|
23
|
+
if options["path"]
|
|
24
|
+
@path = Pathname.new(options["path"])
|
|
25
|
+
expanded_path = expand(@path)
|
|
26
|
+
@path = if @path.relative?
|
|
27
|
+
expanded_path.relative_path_from(File.expand_path(root_path))
|
|
28
|
+
else
|
|
29
|
+
expanded_path
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
@name = options["name"]
|
|
34
|
+
@version = options["version"]
|
|
35
|
+
|
|
36
|
+
# Stores the original path. If at any point we move to the
|
|
37
|
+
# cached directory, we still have the original path to copy from.
|
|
38
|
+
@original_path = @path
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def self.from_lock(options)
|
|
42
|
+
new(options.merge("path" => options.delete("remote")))
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def to_lock
|
|
46
|
+
out = String.new("PATH\n")
|
|
47
|
+
out << " remote: #{lockfile_path}\n"
|
|
48
|
+
out << " glob: #{@glob}\n" unless @glob == DEFAULT_GLOB
|
|
49
|
+
out << " specs:\n"
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def to_s
|
|
53
|
+
"source at `#{@path}`"
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
alias_method :identifier, :to_s
|
|
57
|
+
|
|
58
|
+
alias_method :to_gemfile, :path
|
|
59
|
+
|
|
60
|
+
def hash
|
|
61
|
+
[self.class, expanded_path, version].hash
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def eql?(other)
|
|
65
|
+
[Gemspec, Path].include?(other.class) &&
|
|
66
|
+
expanded_original_path == other.expanded_original_path &&
|
|
67
|
+
version == other.version
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
alias_method :==, :eql?
|
|
71
|
+
|
|
72
|
+
def name
|
|
73
|
+
File.basename(expanded_path.to_s)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def install(spec, options = {})
|
|
77
|
+
using_message = "Using #{version_message(spec, options[:previous_spec])} from #{self}"
|
|
78
|
+
using_message += " and installing its executables" unless spec.executables.empty?
|
|
79
|
+
print_using_message using_message
|
|
80
|
+
generate_bin(spec, disable_extensions: true)
|
|
81
|
+
nil # no post-install message
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
def cache(spec, custom_path = nil)
|
|
85
|
+
app_cache_path = app_cache_path(custom_path)
|
|
86
|
+
return unless Bundler.settings[:cache_all]
|
|
87
|
+
return if expand(@original_path).to_s.index(root_path.to_s + "/") == 0
|
|
88
|
+
|
|
89
|
+
unless @original_path.exist?
|
|
90
|
+
raise GemNotFound, "Can't cache gem #{version_message(spec)} because #{self} is missing!"
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
FileUtils.rm_rf(app_cache_path)
|
|
94
|
+
FileUtils.cp_r("#{@original_path}/.", app_cache_path)
|
|
95
|
+
FileUtils.touch(app_cache_path.join(".bundlecache"))
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
def local_specs(*)
|
|
99
|
+
@local_specs ||= load_spec_files
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
def specs
|
|
103
|
+
if has_app_cache?
|
|
104
|
+
@path = app_cache_path
|
|
105
|
+
@expanded_path = nil # Invalidate
|
|
106
|
+
end
|
|
107
|
+
local_specs
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
def app_cache_dirname
|
|
111
|
+
name
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
def root
|
|
115
|
+
Bundler.root
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
def expanded_original_path
|
|
119
|
+
@expanded_original_path ||= expand(original_path)
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
private
|
|
123
|
+
|
|
124
|
+
def expanded_path
|
|
125
|
+
@expanded_path ||= expand(path)
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
def expand(somepath)
|
|
129
|
+
somepath.expand_path(root_path)
|
|
130
|
+
rescue ArgumentError => e
|
|
131
|
+
Bundler.ui.debug(e)
|
|
132
|
+
raise PathError, "There was an error while trying to use the path " \
|
|
133
|
+
"`#{somepath}`.\nThe error message was: #{e.message}."
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
def lockfile_path
|
|
137
|
+
return relative_path(original_path) if original_path.absolute?
|
|
138
|
+
expand(original_path).relative_path_from(root)
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
def app_cache_path(custom_path = nil)
|
|
142
|
+
@app_cache_path ||= Bundler.app_cache(custom_path).join(app_cache_dirname)
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
def has_app_cache?
|
|
146
|
+
SharedHelpers.in_bundle? && app_cache_path.exist?
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
def load_gemspec(file)
|
|
150
|
+
return unless spec = Bundler.load_gemspec(file)
|
|
151
|
+
spec.installed_by_version = Gem::VERSION
|
|
152
|
+
spec
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
def validate_spec(spec)
|
|
156
|
+
Bundler.rubygems.validate(spec)
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
def load_spec_files
|
|
160
|
+
index = Index.new
|
|
161
|
+
|
|
162
|
+
if File.directory?(expanded_path)
|
|
163
|
+
# We sort depth-first since `<<` will override the earlier-found specs
|
|
164
|
+
Gem::Util.glob_files_in_dir(@glob, expanded_path).sort_by {|p| -p.split(File::SEPARATOR).size }.each do |file|
|
|
165
|
+
next unless spec = load_gemspec(file)
|
|
166
|
+
spec.source = self
|
|
167
|
+
|
|
168
|
+
# The ignore attribute is for ignoring installed gems that don't
|
|
169
|
+
# have extensions correctly compiled for activation. In the case of
|
|
170
|
+
# path sources, there's a single version of each gem in the path
|
|
171
|
+
# source available to Bundler, so we always certainly want to
|
|
172
|
+
# consider that for activation and never makes sense to ignore it.
|
|
173
|
+
spec.ignored = false
|
|
174
|
+
|
|
175
|
+
# Validation causes extension_dir to be calculated, which depends
|
|
176
|
+
# on #source, so we validate here instead of load_gemspec
|
|
177
|
+
validate_spec(spec)
|
|
178
|
+
index << spec
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
if index.empty? && @name && @version
|
|
182
|
+
index << Gem::Specification.new do |s|
|
|
183
|
+
s.name = @name
|
|
184
|
+
s.source = self
|
|
185
|
+
s.version = Gem::Version.new(@version)
|
|
186
|
+
s.platform = Gem::Platform::RUBY
|
|
187
|
+
s.summary = "Fake gemspec for #{@name}"
|
|
188
|
+
s.relative_loaded_from = "#{@name}.gemspec"
|
|
189
|
+
s.authors = ["no one"]
|
|
190
|
+
if expanded_path.join("bin").exist?
|
|
191
|
+
executables = expanded_path.join("bin").children
|
|
192
|
+
executables.reject! {|p| File.directory?(p) }
|
|
193
|
+
s.executables = executables.map {|c| c.basename.to_s }
|
|
194
|
+
end
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
else
|
|
198
|
+
message = String.new("The path `#{expanded_path}` ")
|
|
199
|
+
message << if File.exist?(expanded_path)
|
|
200
|
+
"is not a directory."
|
|
201
|
+
else
|
|
202
|
+
"does not exist."
|
|
203
|
+
end
|
|
204
|
+
raise PathError, message
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
index
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
def relative_path(path = self.path)
|
|
211
|
+
if path.to_s.start_with?(root_path.to_s)
|
|
212
|
+
return path.relative_path_from(root_path)
|
|
213
|
+
end
|
|
214
|
+
path
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
def generate_bin(spec, options = {})
|
|
218
|
+
gem_dir = Pathname.new(spec.full_gem_path)
|
|
219
|
+
|
|
220
|
+
# Some gem authors put absolute paths in their gemspec
|
|
221
|
+
# and we have to save them from themselves
|
|
222
|
+
spec.files = spec.files.filter_map do |path|
|
|
223
|
+
pathname = Pathname.new(path)
|
|
224
|
+
next path unless pathname.absolute?
|
|
225
|
+
next if File.directory?(path)
|
|
226
|
+
begin
|
|
227
|
+
pathname.relative_path_from(gem_dir).to_s
|
|
228
|
+
rescue ArgumentError
|
|
229
|
+
path
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
installer = Path::Installer.new(
|
|
234
|
+
spec,
|
|
235
|
+
env_shebang: false,
|
|
236
|
+
disable_extensions: options[:disable_extensions],
|
|
237
|
+
build_args: options[:build_args],
|
|
238
|
+
bundler_extension_cache_path: extension_cache_path(spec)
|
|
239
|
+
)
|
|
240
|
+
installer.post_install
|
|
241
|
+
rescue Gem::InvalidSpecificationException => e
|
|
242
|
+
Bundler.ui.warn "\n#{spec.name} at #{spec.full_gem_path} did not have a valid gemspec.\n" \
|
|
243
|
+
"This prevents bundler from installing bins or native extensions, but " \
|
|
244
|
+
"that may not affect its functionality."
|
|
245
|
+
|
|
246
|
+
if !spec.extensions.empty? && !spec.email.empty?
|
|
247
|
+
Bundler.ui.warn "If you need to use this package without installing it from a gem " \
|
|
248
|
+
"repository, please contact #{spec.email} and ask them " \
|
|
249
|
+
"to modify their .gemspec so it can work with `gem build`."
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
Bundler.ui.warn "The validation message from RubyGems was:\n #{e.message}"
|
|
253
|
+
end
|
|
254
|
+
end
|
|
255
|
+
end
|
|
256
|
+
end
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Bundler
|
|
4
|
+
class Source
|
|
5
|
+
class Rubygems
|
|
6
|
+
class Remote
|
|
7
|
+
attr_reader :uri, :anonymized_uri, :original_uri, :cooldown
|
|
8
|
+
|
|
9
|
+
def initialize(uri, cooldown: nil)
|
|
10
|
+
orig_uri = uri
|
|
11
|
+
uri = Bundler.settings.mirror_for(uri)
|
|
12
|
+
@original_uri = orig_uri if orig_uri != uri
|
|
13
|
+
fallback_auth = Bundler.settings.credentials_for(uri)
|
|
14
|
+
|
|
15
|
+
@uri = apply_auth(uri, fallback_auth).freeze
|
|
16
|
+
@anonymized_uri = remove_auth(@uri).freeze
|
|
17
|
+
@cooldown = cooldown
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# Returns the cooldown days that apply to this remote, resolving the
|
|
21
|
+
# precedence CLI > config > Gemfile per-source. Returns nil if no
|
|
22
|
+
# cooldown applies.
|
|
23
|
+
def effective_cooldown
|
|
24
|
+
override = Bundler.settings[:cooldown]
|
|
25
|
+
return override if override
|
|
26
|
+
@cooldown
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
MAX_CACHE_SLUG_HOST_SIZE = 255 - 1 - 32 # 255 minus dot minus MD5 length
|
|
30
|
+
private_constant :MAX_CACHE_SLUG_HOST_SIZE
|
|
31
|
+
|
|
32
|
+
# @return [String] A slug suitable for use as a cache key for this
|
|
33
|
+
# remote.
|
|
34
|
+
#
|
|
35
|
+
def cache_slug
|
|
36
|
+
@cache_slug ||= begin
|
|
37
|
+
return nil unless SharedHelpers.md5_available?
|
|
38
|
+
|
|
39
|
+
cache_uri = original_uri || uri
|
|
40
|
+
|
|
41
|
+
host = cache_uri.to_s.start_with?("file://") ? nil : cache_uri.host
|
|
42
|
+
|
|
43
|
+
uri_parts = [host, cache_uri.user, cache_uri.port, cache_uri.path]
|
|
44
|
+
uri_parts.compact!
|
|
45
|
+
uri_digest = SharedHelpers.digest(:MD5).hexdigest(uri_parts.join("."))
|
|
46
|
+
|
|
47
|
+
uri_parts.pop
|
|
48
|
+
host_parts = uri_parts.join(".")
|
|
49
|
+
return uri_digest if host_parts.empty?
|
|
50
|
+
|
|
51
|
+
shortened_host_parts = host_parts[0...MAX_CACHE_SLUG_HOST_SIZE]
|
|
52
|
+
[shortened_host_parts, uri_digest].join(".")
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def to_s
|
|
57
|
+
"rubygems remote at #{anonymized_uri}"
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
private
|
|
61
|
+
|
|
62
|
+
def apply_auth(uri, auth)
|
|
63
|
+
if auth && uri.userinfo.nil?
|
|
64
|
+
uri = uri.dup
|
|
65
|
+
uri.userinfo = auth
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
uri
|
|
69
|
+
rescue Gem::URI::InvalidComponentError
|
|
70
|
+
error_message = "Please CGI escape your usernames and passwords before " \
|
|
71
|
+
"setting them for authentication."
|
|
72
|
+
raise HTTPError.new(error_message)
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def remove_auth(uri)
|
|
76
|
+
if uri.userinfo
|
|
77
|
+
uri = uri.dup
|
|
78
|
+
uri.user = uri.password = nil
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
uri
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|