rubygems-update 3.3.18 → 3.6.2
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 +4 -4
- data/CHANGELOG.md +2182 -1067
- data/CODE_OF_CONDUCT.md +79 -28
- data/Manifest.txt +184 -290
- data/README.md +35 -19
- data/bundler/CHANGELOG.md +1003 -3
- data/bundler/README.md +3 -7
- data/bundler/bundler.gemspec +11 -11
- data/bundler/exe/bundle +5 -25
- data/bundler/lib/bundler/build_metadata.rb +3 -3
- data/bundler/lib/bundler/capistrano.rb +1 -1
- data/bundler/lib/bundler/checksum.rb +254 -0
- data/bundler/lib/bundler/ci_detector.rb +75 -0
- data/bundler/lib/bundler/cli/add.rb +7 -5
- data/bundler/lib/bundler/cli/binstubs.rb +10 -6
- data/bundler/lib/bundler/cli/cache.rb +1 -1
- data/bundler/lib/bundler/cli/check.rb +4 -4
- data/bundler/lib/bundler/cli/common.rb +11 -1
- data/bundler/lib/bundler/cli/config.rb +8 -7
- data/bundler/lib/bundler/cli/console.rb +2 -5
- data/bundler/lib/bundler/cli/doctor.rb +10 -12
- data/bundler/lib/bundler/cli/exec.rb +2 -1
- data/bundler/lib/bundler/cli/fund.rb +1 -1
- data/bundler/lib/bundler/cli/gem.rb +77 -53
- data/bundler/lib/bundler/cli/info.rb +4 -15
- data/bundler/lib/bundler/cli/init.rb +6 -2
- data/bundler/lib/bundler/cli/inject.rb +1 -1
- data/bundler/lib/bundler/cli/install.rb +27 -15
- data/bundler/lib/bundler/cli/issue.rb +1 -1
- data/bundler/lib/bundler/cli/lock.rb +54 -28
- data/bundler/lib/bundler/cli/open.rb +9 -9
- data/bundler/lib/bundler/cli/outdated.rb +34 -29
- data/bundler/lib/bundler/cli/platform.rb +7 -5
- data/bundler/lib/bundler/cli/plugin.rb +9 -15
- data/bundler/lib/bundler/cli/pristine.rb +38 -30
- data/bundler/lib/bundler/cli/show.rb +4 -4
- data/bundler/lib/bundler/cli/update.rb +6 -5
- data/bundler/lib/bundler/cli/viz.rb +1 -1
- data/bundler/lib/bundler/cli.rb +258 -307
- data/bundler/lib/bundler/compact_index_client/cache.rb +55 -60
- data/bundler/lib/bundler/compact_index_client/cache_file.rb +148 -0
- data/bundler/lib/bundler/compact_index_client/gem_parser.rb +7 -3
- data/bundler/lib/bundler/compact_index_client/parser.rb +84 -0
- data/bundler/lib/bundler/compact_index_client/updater.rb +71 -83
- data/bundler/lib/bundler/compact_index_client.rb +58 -80
- data/bundler/lib/bundler/constants.rb +9 -2
- data/bundler/lib/bundler/current_ruby.rb +11 -16
- data/bundler/lib/bundler/definition.rb +547 -228
- data/bundler/lib/bundler/dependency.rb +30 -87
- data/bundler/lib/bundler/digest.rb +3 -3
- data/bundler/lib/bundler/dsl.rb +115 -65
- data/bundler/lib/bundler/endpoint_specification.rb +27 -14
- data/bundler/lib/bundler/env.rb +5 -7
- data/bundler/lib/bundler/environment_preserver.rb +8 -25
- data/bundler/lib/bundler/errors.rb +85 -11
- data/bundler/lib/bundler/feature_flag.rb +1 -2
- data/bundler/lib/bundler/fetcher/base.rb +5 -3
- data/bundler/lib/bundler/fetcher/compact_index.rb +28 -43
- data/bundler/lib/bundler/fetcher/dependency.rb +3 -7
- data/bundler/lib/bundler/fetcher/downloader.rb +17 -16
- data/bundler/lib/bundler/fetcher/gem_remote_fetcher.rb +16 -0
- data/bundler/lib/bundler/fetcher/index.rb +2 -3
- data/bundler/lib/bundler/fetcher.rb +91 -74
- data/bundler/lib/bundler/force_platform.rb +16 -0
- data/bundler/lib/bundler/friendly_errors.rb +6 -9
- data/bundler/lib/bundler/gem_helper.rb +5 -6
- data/bundler/lib/bundler/gem_helpers.rb +45 -7
- data/bundler/lib/bundler/gem_version_promoter.rb +68 -109
- data/bundler/lib/bundler/graph.rb +9 -9
- data/bundler/lib/bundler/index.rb +69 -73
- data/bundler/lib/bundler/injector.rb +12 -13
- data/bundler/lib/bundler/inline.rb +40 -17
- data/bundler/lib/bundler/installer/gem_installer.rb +13 -12
- data/bundler/lib/bundler/installer/parallel_installer.rb +19 -66
- data/bundler/lib/bundler/installer/standalone.rb +29 -15
- data/bundler/lib/bundler/installer.rb +27 -77
- data/bundler/lib/bundler/lazy_specification.rb +134 -71
- data/bundler/lib/bundler/lockfile_generator.rb +13 -4
- data/bundler/lib/bundler/lockfile_parser.rb +134 -61
- data/bundler/lib/bundler/man/bundle-add.1 +46 -48
- data/bundler/lib/bundler/man/bundle-add.1.ronn +54 -22
- data/bundler/lib/bundler/man/bundle-binstubs.1 +10 -19
- data/bundler/lib/bundler/man/bundle-binstubs.1.ronn +6 -3
- data/bundler/lib/bundler/man/bundle-cache.1 +38 -25
- data/bundler/lib/bundler/man/bundle-cache.1.ronn +40 -4
- data/bundler/lib/bundler/man/bundle-check.1 +7 -14
- data/bundler/lib/bundler/man/bundle-check.1.ronn +7 -2
- data/bundler/lib/bundler/man/bundle-clean.1 +4 -11
- data/bundler/lib/bundler/man/bundle-clean.1.ronn +1 -1
- data/bundler/lib/bundler/man/bundle-config.1 +41 -220
- data/bundler/lib/bundler/man/bundle-config.1.ronn +27 -22
- data/bundler/lib/bundler/man/bundle-console.1 +33 -0
- data/bundler/lib/bundler/man/bundle-console.1.ronn +39 -0
- data/bundler/lib/bundler/man/bundle-doctor.1 +5 -19
- data/bundler/lib/bundler/man/bundle-doctor.1.ronn +1 -1
- data/bundler/lib/bundler/man/bundle-env.1 +9 -0
- data/bundler/lib/bundler/man/bundle-env.1.ronn +10 -0
- data/bundler/lib/bundler/man/bundle-exec.1 +20 -78
- data/bundler/lib/bundler/man/bundle-exec.1.ronn +12 -10
- data/bundler/lib/bundler/man/bundle-fund.1 +22 -0
- data/bundler/lib/bundler/man/bundle-fund.1.ronn +25 -0
- data/bundler/lib/bundler/man/bundle-gem.1 +53 -81
- data/bundler/lib/bundler/man/bundle-gem.1.ronn +41 -9
- data/bundler/lib/bundler/man/bundle-help.1 +9 -0
- data/bundler/lib/bundler/man/bundle-help.1.ronn +12 -0
- data/bundler/lib/bundler/man/bundle-info.1 +8 -11
- data/bundler/lib/bundler/man/bundle-info.1.ronn +9 -5
- data/bundler/lib/bundler/man/bundle-init.1 +7 -12
- data/bundler/lib/bundler/man/bundle-init.1.ronn +4 -1
- data/bundler/lib/bundler/man/bundle-inject.1 +17 -19
- data/bundler/lib/bundler/man/bundle-inject.1.ronn +12 -2
- data/bundler/lib/bundler/man/bundle-install.1 +42 -162
- data/bundler/lib/bundler/man/bundle-install.1.ronn +31 -49
- data/bundler/lib/bundler/man/bundle-issue.1 +45 -0
- data/bundler/lib/bundler/man/bundle-issue.1.ronn +37 -0
- data/bundler/lib/bundler/man/bundle-licenses.1 +9 -0
- data/bundler/lib/bundler/man/bundle-licenses.1.ronn +10 -0
- data/bundler/lib/bundler/man/bundle-list.1 +4 -19
- data/bundler/lib/bundler/man/bundle-list.1.ronn +4 -1
- data/bundler/lib/bundler/man/bundle-lock.1 +25 -34
- data/bundler/lib/bundler/man/bundle-lock.1.ronn +25 -4
- data/bundler/lib/bundler/man/bundle-open.1 +18 -18
- data/bundler/lib/bundler/man/bundle-open.1.ronn +10 -1
- data/bundler/lib/bundler/man/bundle-outdated.1 +22 -67
- data/bundler/lib/bundler/man/bundle-outdated.1.ronn +20 -12
- data/bundler/lib/bundler/man/bundle-platform.1 +16 -28
- data/bundler/lib/bundler/man/bundle-platform.1.ronn +14 -7
- data/bundler/lib/bundler/man/bundle-plugin.1 +58 -0
- data/bundler/lib/bundler/man/bundle-plugin.1.ronn +63 -0
- data/bundler/lib/bundler/man/bundle-pristine.1 +5 -16
- data/bundler/lib/bundler/man/bundle-pristine.1.ronn +1 -1
- data/bundler/lib/bundler/man/bundle-remove.1 +4 -14
- data/bundler/lib/bundler/man/bundle-remove.1.ronn +1 -1
- data/bundler/lib/bundler/man/bundle-show.1 +7 -11
- data/bundler/lib/bundler/man/bundle-show.1.ronn +4 -0
- data/bundler/lib/bundler/man/bundle-update.1 +30 -143
- data/bundler/lib/bundler/man/bundle-update.1.ronn +14 -6
- data/bundler/lib/bundler/man/bundle-version.1 +22 -0
- data/bundler/lib/bundler/man/bundle-version.1.ronn +24 -0
- data/bundler/lib/bundler/man/bundle-viz.1 +9 -18
- data/bundler/lib/bundler/man/bundle-viz.1.ronn +9 -3
- data/bundler/lib/bundler/man/bundle.1 +17 -51
- data/bundler/lib/bundler/man/bundle.1.ronn +12 -7
- data/bundler/lib/bundler/man/gemfile.5 +77 -341
- data/bundler/lib/bundler/man/gemfile.5.ronn +73 -54
- data/bundler/lib/bundler/man/index.txt +8 -0
- data/bundler/lib/bundler/match_metadata.rb +17 -0
- data/bundler/lib/bundler/match_platform.rb +1 -1
- data/bundler/lib/bundler/match_remote_metadata.rb +29 -0
- data/bundler/lib/bundler/materialization.rb +59 -0
- data/bundler/lib/bundler/mirror.rb +8 -10
- data/bundler/lib/bundler/plugin/api/source.rb +7 -5
- data/bundler/lib/bundler/plugin/events.rb +24 -0
- data/bundler/lib/bundler/plugin/index.rb +13 -5
- data/bundler/lib/bundler/plugin/installer/path.rb +18 -0
- data/bundler/lib/bundler/plugin/installer/rubygems.rb +0 -4
- data/bundler/lib/bundler/plugin/installer.rb +42 -19
- data/bundler/lib/bundler/plugin/source_list.rb +4 -4
- data/bundler/lib/bundler/plugin.rb +35 -7
- data/bundler/lib/bundler/process_lock.rb +10 -14
- data/bundler/lib/bundler/remote_specification.rb +17 -13
- data/bundler/lib/bundler/resolver/base.rb +117 -0
- data/bundler/lib/bundler/resolver/candidate.rb +82 -0
- data/bundler/lib/bundler/resolver/incompatibility.rb +15 -0
- data/bundler/lib/bundler/resolver/package.rb +90 -0
- data/bundler/lib/bundler/resolver/root.rb +25 -0
- data/bundler/lib/bundler/resolver/spec_group.rb +54 -67
- data/bundler/lib/bundler/resolver.rb +432 -329
- data/bundler/lib/bundler/retry.rb +2 -2
- data/bundler/lib/bundler/ruby_dsl.rb +42 -7
- data/bundler/lib/bundler/ruby_version.rb +23 -10
- data/bundler/lib/bundler/rubygems_ext.rb +286 -81
- data/bundler/lib/bundler/rubygems_gem_installer.rb +77 -68
- data/bundler/lib/bundler/rubygems_integration.rb +57 -155
- data/bundler/lib/bundler/runtime.rb +28 -17
- data/bundler/lib/bundler/safe_marshal.rb +31 -0
- data/bundler/lib/bundler/self_manager.rb +50 -12
- data/bundler/lib/bundler/settings.rb +144 -58
- data/bundler/lib/bundler/setup.rb +13 -1
- data/bundler/lib/bundler/shared_helpers.rb +87 -36
- data/bundler/lib/bundler/source/git/git_proxy.rb +278 -80
- data/bundler/lib/bundler/source/git.rb +161 -68
- data/bundler/lib/bundler/source/metadata.rb +16 -16
- data/bundler/lib/bundler/source/path/installer.rb +1 -22
- data/bundler/lib/bundler/source/path.rb +16 -26
- data/bundler/lib/bundler/source/rubygems/remote.rb +1 -1
- data/bundler/lib/bundler/source/rubygems.rb +94 -154
- data/bundler/lib/bundler/source.rb +3 -1
- data/bundler/lib/bundler/source_list.rb +34 -4
- data/bundler/lib/bundler/spec_set.rb +195 -65
- data/bundler/lib/bundler/stub_specification.rb +34 -4
- data/bundler/lib/bundler/templates/Executable +1 -1
- data/bundler/lib/bundler/templates/Executable.bundler +6 -11
- data/bundler/lib/bundler/templates/Executable.standalone +2 -0
- data/bundler/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +77 -29
- data/bundler/lib/bundler/templates/newgem/Cargo.toml.tt +7 -0
- data/bundler/lib/bundler/templates/newgem/README.md.tt +11 -5
- data/bundler/lib/bundler/templates/newgem/Rakefile.tt +19 -8
- data/bundler/lib/bundler/templates/newgem/bin/console.tt +0 -4
- data/bundler/lib/bundler/templates/newgem/circleci/config.yml.tt +12 -0
- data/bundler/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +15 -0
- data/bundler/lib/bundler/templates/newgem/ext/newgem/extconf-c.rb.tt +10 -0
- data/bundler/lib/bundler/templates/newgem/ext/newgem/extconf-rust.rb.tt +6 -0
- data/bundler/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt +1 -1
- data/bundler/lib/bundler/templates/newgem/ext/newgem/src/lib.rs.tt +12 -0
- data/bundler/lib/bundler/templates/newgem/github/workflows/main.yml.tt +18 -8
- data/bundler/lib/bundler/templates/newgem/gitignore.tt +3 -0
- data/bundler/lib/bundler/templates/newgem/gitlab-ci.yml.tt +13 -4
- data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +12 -4
- data/bundler/lib/bundler/templates/newgem/rubocop.yml.tt +0 -5
- data/bundler/lib/bundler/templates/newgem/standard.yml.tt +1 -1
- data/bundler/lib/bundler/ui/rg_proxy.rb +1 -1
- data/bundler/lib/bundler/ui/shell.rb +60 -15
- data/bundler/lib/bundler/ui/silent.rb +33 -6
- data/bundler/lib/bundler/uri_credentials_filter.rb +3 -3
- data/bundler/lib/bundler/uri_normalizer.rb +23 -0
- data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +3 -3
- data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +1 -1
- data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb +0 -1
- data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +56 -7
- data/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb +1350 -418
- data/bundler/lib/bundler/vendor/net-http-persistent/.document +1 -0
- data/bundler/lib/bundler/vendor/net-http-persistent/README.rdoc +1 -1
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb +4 -3
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb +23 -11
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb +1 -1
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +102 -64
- data/bundler/lib/bundler/vendor/pub_grub/.document +1 -0
- data/bundler/lib/bundler/vendor/pub_grub/LICENSE.txt +21 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb +20 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb +189 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb +182 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb +150 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb +43 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/partial_solution.rb +121 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb +45 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb +19 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb +61 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/term.rb +105 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version.rb +3 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb +129 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb +411 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +248 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb +178 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub.rb +31 -0
- data/bundler/lib/bundler/vendor/securerandom/.document +1 -0
- data/bundler/lib/bundler/vendor/securerandom/COPYING +56 -0
- data/bundler/lib/bundler/vendor/securerandom/lib/securerandom.rb +102 -0
- data/bundler/lib/bundler/vendor/thor/.document +1 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb +3 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/directory.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +11 -15
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +15 -4
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions.rb +15 -15
- data/bundler/lib/bundler/vendor/thor/lib/thor/base.rb +140 -14
- data/bundler/lib/bundler/vendor/thor/lib/thor/command.rb +13 -4
- data/bundler/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +4 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/error.rb +16 -25
- data/bundler/lib/bundler/vendor/thor/lib/thor/group.rb +12 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/invocation.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/nested_context.rb +2 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +17 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +33 -17
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/option.rb +28 -9
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/options.rb +46 -7
- data/bundler/lib/bundler/vendor/thor/lib/thor/rake_compat.rb +2 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/runner.rb +40 -30
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +35 -159
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/color.rb +1 -46
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/column_printer.rb +29 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/html.rb +1 -46
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/table_printer.rb +118 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/terminal.rb +42 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/wrapped_printer.rb +38 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/util.rb +8 -7
- data/bundler/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor.rb +166 -8
- data/bundler/lib/bundler/vendor/tsort/.document +1 -0
- data/bundler/lib/bundler/vendor/tsort/lib/tsort.rb +3 -0
- data/bundler/lib/bundler/vendor/uri/.document +1 -0
- data/bundler/lib/bundler/vendor/uri/COPYING +56 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/common.rb +343 -148
- data/bundler/lib/bundler/vendor/uri/lib/uri/file.rb +10 -4
- data/bundler/lib/bundler/vendor/uri/lib/uri/ftp.rb +3 -2
- data/bundler/lib/bundler/vendor/uri/lib/uri/generic.rb +44 -33
- data/bundler/lib/bundler/vendor/uri/lib/uri/http.rb +40 -2
- data/bundler/lib/bundler/vendor/uri/lib/uri/https.rb +2 -1
- data/bundler/lib/bundler/vendor/uri/lib/uri/ldap.rb +1 -1
- data/bundler/lib/bundler/vendor/uri/lib/uri/ldaps.rb +2 -1
- data/bundler/lib/bundler/vendor/uri/lib/uri/mailto.rb +2 -2
- data/bundler/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +25 -12
- data/bundler/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +130 -38
- data/bundler/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
- data/bundler/lib/bundler/vendor/uri/lib/uri/ws.rb +1 -2
- data/bundler/lib/bundler/vendor/uri/lib/uri/wss.rb +2 -1
- data/bundler/lib/bundler/vendor/uri/lib/uri.rb +12 -11
- data/bundler/lib/bundler/vendored_net_http.rb +23 -0
- data/bundler/lib/bundler/vendored_persistent.rb +0 -36
- data/bundler/lib/bundler/{vendored_tmpdir.rb → vendored_pub_grub.rb} +1 -1
- data/bundler/lib/bundler/vendored_securerandom.rb +12 -0
- data/bundler/lib/bundler/vendored_timeout.rb +12 -0
- data/bundler/lib/bundler/vendored_uri.rb +18 -1
- data/bundler/lib/bundler/version.rb +5 -1
- data/bundler/lib/bundler/vlad.rb +1 -1
- data/bundler/lib/bundler/worker.rb +5 -7
- data/bundler/lib/bundler/yaml_serializer.rb +22 -13
- data/bundler/lib/bundler.rb +155 -148
- data/{bundler → doc/bundler}/UPGRADING.md +11 -4
- data/{CONTRIBUTING.md → doc/rubygems/CONTRIBUTING.md} +40 -17
- data/doc/rubygems/POLICIES.md +204 -0
- data/{test/rubygems/fake_certlib/openssl.rb → exe/gem} +5 -1
- data/{bin → exe}/update_rubygems +12 -10
- data/lib/rubygems/available_set.rb +8 -7
- data/lib/rubygems/basic_specification.rb +90 -52
- data/lib/rubygems/bundler_version_finder.rb +6 -6
- data/lib/rubygems/ci_detector.rb +75 -0
- data/lib/rubygems/command.rb +68 -64
- data/lib/rubygems/command_manager.rb +39 -24
- data/lib/rubygems/commands/build_command.rb +14 -19
- data/lib/rubygems/commands/cert_command.rb +39 -39
- data/lib/rubygems/commands/check_command.rb +30 -25
- data/lib/rubygems/commands/cleanup_command.rb +32 -43
- data/lib/rubygems/commands/contents_command.rb +33 -25
- data/lib/rubygems/commands/dependency_command.rb +22 -23
- data/lib/rubygems/commands/environment_command.rb +8 -9
- data/lib/rubygems/commands/exec_command.rb +247 -0
- data/lib/rubygems/commands/fetch_command.rb +25 -10
- data/lib/rubygems/commands/generate_index_command.rb +40 -74
- data/lib/rubygems/commands/help_command.rb +15 -14
- data/lib/rubygems/commands/info_command.rb +5 -5
- data/lib/rubygems/commands/install_command.rb +31 -38
- data/lib/rubygems/commands/list_command.rb +6 -5
- data/lib/rubygems/commands/lock_command.rb +6 -5
- data/lib/rubygems/commands/mirror_command.rb +4 -3
- data/lib/rubygems/commands/open_command.rb +11 -12
- data/lib/rubygems/commands/outdated_command.rb +6 -5
- data/lib/rubygems/commands/owner_command.rb +23 -22
- data/lib/rubygems/commands/pristine_command.rb +83 -62
- data/lib/rubygems/commands/push_command.rb +38 -13
- data/lib/rubygems/commands/query_command.rb +11 -11
- data/lib/rubygems/commands/rdoc_command.rb +23 -28
- data/lib/rubygems/commands/rebuild_command.rb +262 -0
- data/lib/rubygems/commands/search_command.rb +6 -5
- data/lib/rubygems/commands/server_command.rb +4 -3
- data/lib/rubygems/commands/setup_command.rb +137 -154
- data/lib/rubygems/commands/signin_command.rb +10 -9
- data/lib/rubygems/commands/signout_command.rb +8 -7
- data/lib/rubygems/commands/sources_command.rb +34 -33
- data/lib/rubygems/commands/specification_command.rb +25 -20
- data/lib/rubygems/commands/stale_command.rb +5 -4
- data/lib/rubygems/commands/uninstall_command.rb +66 -59
- data/lib/rubygems/commands/unpack_command.rb +23 -30
- data/lib/rubygems/commands/update_command.rb +62 -94
- data/lib/rubygems/commands/which_command.rb +9 -8
- data/lib/rubygems/commands/yank_command.rb +14 -13
- data/lib/rubygems/compatibility.rb +5 -6
- data/lib/rubygems/config_file.rb +160 -50
- data/lib/rubygems/core_ext/kernel_gem.rb +3 -10
- data/lib/rubygems/core_ext/kernel_require.rb +88 -114
- data/lib/rubygems/core_ext/kernel_warn.rb +30 -39
- data/lib/rubygems/core_ext/tcpsocket_init.rb +4 -2
- data/lib/rubygems/defaults.rb +53 -22
- data/lib/rubygems/dependency.rb +34 -36
- data/lib/rubygems/dependency_installer.rb +52 -56
- data/lib/rubygems/dependency_list.rb +8 -7
- data/lib/rubygems/deprecate.rb +80 -75
- data/lib/rubygems/doctor.rb +23 -22
- data/lib/rubygems/errors.rb +6 -8
- data/lib/rubygems/exceptions.rb +20 -18
- data/lib/rubygems/ext/build_error.rb +2 -1
- data/lib/rubygems/ext/builder.rb +56 -32
- data/lib/rubygems/ext/cargo_builder/link_flag_converter.rb +9 -5
- data/lib/rubygems/ext/cargo_builder.rb +158 -131
- data/lib/rubygems/ext/cmake_builder.rb +9 -4
- data/lib/rubygems/ext/configure_builder.rb +9 -3
- data/lib/rubygems/ext/ext_conf_builder.rb +19 -15
- data/lib/rubygems/ext/rake_builder.rb +14 -7
- data/lib/rubygems/ext.rb +8 -7
- data/lib/rubygems/gem_runner.rb +23 -9
- data/lib/rubygems/gemcutter_utilities/webauthn_listener/response.rb +163 -0
- data/lib/rubygems/gemcutter_utilities/webauthn_listener.rb +105 -0
- data/lib/rubygems/gemcutter_utilities/webauthn_poller.rb +80 -0
- data/lib/rubygems/gemcutter_utilities.rb +141 -63
- data/lib/rubygems/gemspec_helpers.rb +19 -0
- data/lib/rubygems/install_default_message.rb +3 -2
- data/lib/rubygems/install_message.rb +3 -2
- data/lib/rubygems/install_update_options.rb +72 -67
- data/lib/rubygems/installer.rb +148 -130
- data/lib/rubygems/installer_uninstaller_utils.rb +2 -4
- data/lib/rubygems/local_remote_options.rb +24 -28
- data/lib/rubygems/name_tuple.rb +10 -11
- data/lib/rubygems/package/digest_io.rb +2 -1
- data/lib/rubygems/package/file_source.rb +3 -2
- data/lib/rubygems/package/io_source.rb +1 -0
- data/lib/rubygems/package/old.rb +11 -10
- data/lib/rubygems/package/source.rb +1 -0
- data/lib/rubygems/package/tar_header.rb +125 -91
- data/lib/rubygems/package/tar_reader/entry.rb +106 -29
- data/lib/rubygems/package/tar_reader.rb +16 -39
- data/lib/rubygems/package/tar_writer.rb +29 -26
- data/lib/rubygems/package.rb +122 -84
- data/lib/rubygems/package_task.rb +7 -6
- data/lib/rubygems/path_support.rb +11 -11
- data/lib/rubygems/platform.rb +119 -70
- data/lib/rubygems/psych_tree.rb +6 -1
- data/lib/rubygems/query_utils.rb +46 -48
- data/lib/rubygems/rdoc.rb +13 -3
- data/lib/rubygems/remote_fetcher.rb +47 -39
- data/lib/rubygems/request/connection_pools.rb +6 -6
- data/lib/rubygems/request/http_pool.rb +2 -1
- data/lib/rubygems/request/https_pool.rb +1 -0
- data/lib/rubygems/request.rb +48 -44
- data/lib/rubygems/request_set/gem_dependency_api.rb +141 -144
- data/lib/rubygems/request_set/lockfile/parser.rb +31 -30
- data/lib/rubygems/request_set/lockfile/tokenizer.rb +24 -14
- data/lib/rubygems/request_set/lockfile.rb +11 -15
- data/lib/rubygems/request_set.rb +25 -23
- data/lib/rubygems/requirement.rb +30 -27
- data/lib/rubygems/resolver/activation_request.rb +7 -10
- data/lib/rubygems/resolver/api_set/gem_parser.rb +7 -3
- data/lib/rubygems/resolver/api_set.rb +20 -13
- data/lib/rubygems/resolver/api_specification.rb +8 -7
- data/lib/rubygems/resolver/best_set.rb +5 -32
- data/lib/rubygems/resolver/composed_set.rb +4 -3
- data/lib/rubygems/resolver/conflict.rb +14 -21
- data/lib/rubygems/resolver/current_set.rb +1 -0
- data/lib/rubygems/resolver/dependency_request.rb +3 -2
- data/lib/rubygems/resolver/git_set.rb +2 -2
- data/lib/rubygems/resolver/git_specification.rb +7 -6
- data/lib/rubygems/resolver/index_set.rb +10 -9
- data/lib/rubygems/resolver/index_specification.rb +8 -6
- data/lib/rubygems/resolver/installed_specification.rb +6 -5
- data/lib/rubygems/resolver/installer_set.rb +19 -22
- data/lib/rubygems/resolver/local_specification.rb +4 -3
- data/lib/rubygems/resolver/lock_set.rb +6 -5
- data/lib/rubygems/resolver/lock_specification.rb +5 -4
- data/lib/rubygems/resolver/requirement_list.rb +1 -0
- data/lib/rubygems/resolver/set.rb +1 -0
- data/lib/rubygems/resolver/source_set.rb +2 -0
- data/lib/rubygems/resolver/spec_specification.rb +8 -0
- data/lib/rubygems/resolver/specification.rb +2 -1
- data/lib/rubygems/resolver/stats.rb +2 -1
- data/lib/rubygems/resolver/vendor_set.rb +2 -1
- data/lib/rubygems/resolver/vendor_specification.rb +4 -3
- data/lib/rubygems/resolver.rb +51 -57
- data/lib/rubygems/s3_uri_signer.rb +18 -16
- data/lib/rubygems/safe_marshal/elements.rb +146 -0
- data/lib/rubygems/safe_marshal/reader.rb +325 -0
- data/lib/rubygems/safe_marshal/visitors/stream_printer.rb +31 -0
- data/lib/rubygems/safe_marshal/visitors/to_ruby.rb +428 -0
- data/lib/rubygems/safe_marshal/visitors/visitor.rb +74 -0
- data/lib/rubygems/safe_marshal.rb +74 -0
- data/lib/rubygems/safe_yaml.rb +14 -26
- data/lib/rubygems/security/policies.rb +48 -49
- data/lib/rubygems/security/policy.rb +25 -28
- data/lib/rubygems/security/signer.rb +16 -7
- data/lib/rubygems/security/trust_dir.rb +12 -13
- data/lib/rubygems/security.rb +40 -66
- data/lib/rubygems/security_option.rb +7 -6
- data/lib/rubygems/shellwords.rb +3 -0
- data/lib/rubygems/source/git.rb +34 -31
- data/lib/rubygems/source/installed.rb +4 -3
- data/lib/rubygems/source/local.rb +49 -49
- data/lib/rubygems/source/lock.rb +2 -3
- data/lib/rubygems/source/specific_file.rb +6 -4
- data/lib/rubygems/source/vendor.rb +1 -2
- data/lib/rubygems/source.rb +37 -31
- data/lib/rubygems/source_list.rb +8 -8
- data/lib/rubygems/spec_fetcher.rb +95 -66
- data/lib/rubygems/specification.rb +342 -404
- data/lib/rubygems/specification_policy.rb +147 -75
- data/lib/rubygems/specification_record.rb +212 -0
- data/lib/rubygems/stub_specification.rb +56 -30
- data/lib/rubygems/target_rbconfig.rb +50 -0
- data/lib/rubygems/text.rb +3 -4
- data/lib/rubygems/uninstaller.rb +67 -48
- data/lib/rubygems/update_suggestion.rb +56 -0
- data/lib/rubygems/uri.rb +10 -10
- data/lib/rubygems/uri_formatter.rb +2 -2
- data/lib/rubygems/user_interaction.rb +50 -40
- data/lib/rubygems/util/licenses.rb +310 -39
- data/lib/rubygems/util/list.rb +4 -1
- data/lib/rubygems/util.rb +19 -20
- data/lib/rubygems/validator.rb +15 -14
- data/lib/rubygems/vendor/molinillo/.document +1 -0
- data/lib/rubygems/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +57 -0
- data/{bundler/lib/bundler → lib/rubygems}/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +11 -11
- data/{bundler/lib/bundler → lib/rubygems}/vendor/molinillo/lib/molinillo/dependency_graph/action.rb +1 -1
- data/{bundler/lib/bundler → lib/rubygems}/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +1 -1
- data/{bundler/lib/bundler → lib/rubygems}/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +1 -1
- data/{bundler/lib/bundler → lib/rubygems}/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +1 -1
- data/{bundler/lib/bundler → lib/rubygems}/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +1 -1
- data/{bundler/lib/bundler → lib/rubygems}/vendor/molinillo/lib/molinillo/dependency_graph/log.rb +1 -1
- data/{bundler/lib/bundler → lib/rubygems}/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb +1 -1
- data/{bundler/lib/bundler → lib/rubygems}/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +1 -1
- data/{bundler/lib/bundler → lib/rubygems}/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +1 -1
- data/{bundler/lib/bundler → lib/rubygems}/vendor/molinillo/lib/molinillo/dependency_graph.rb +3 -3
- data/{bundler/lib/bundler → lib/rubygems}/vendor/molinillo/lib/molinillo/errors.rb +1 -1
- data/lib/rubygems/vendor/molinillo/lib/molinillo/gem_metadata.rb +6 -0
- data/{bundler/lib/bundler → lib/rubygems}/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +2 -2
- data/{bundler/lib/bundler → lib/rubygems}/vendor/molinillo/lib/molinillo/modules/ui.rb +1 -1
- data/{bundler/lib/bundler → lib/rubygems}/vendor/molinillo/lib/molinillo/resolution.rb +4 -4
- data/{bundler/lib/bundler → lib/rubygems}/vendor/molinillo/lib/molinillo/resolver.rb +1 -1
- data/{bundler/lib/bundler → lib/rubygems}/vendor/molinillo/lib/molinillo/state.rb +1 -1
- data/{bundler/lib/bundler → lib/rubygems}/vendor/molinillo/lib/molinillo.rb +2 -2
- data/lib/rubygems/vendor/net-http/.document +1 -0
- data/lib/rubygems/vendor/net-http/COPYING +56 -0
- data/lib/rubygems/vendor/net-http/lib/net/http/exceptions.rb +34 -0
- data/lib/rubygems/vendor/net-http/lib/net/http/generic_request.rb +414 -0
- data/lib/rubygems/vendor/net-http/lib/net/http/header.rb +981 -0
- data/lib/rubygems/vendor/net-http/lib/net/http/proxy_delta.rb +17 -0
- data/lib/rubygems/vendor/net-http/lib/net/http/request.rb +88 -0
- data/lib/rubygems/vendor/net-http/lib/net/http/requests.rb +430 -0
- data/lib/rubygems/vendor/net-http/lib/net/http/response.rb +738 -0
- data/lib/rubygems/vendor/net-http/lib/net/http/responses.rb +1174 -0
- data/lib/rubygems/vendor/net-http/lib/net/http/status.rb +84 -0
- data/lib/rubygems/vendor/net-http/lib/net/http.rb +2580 -0
- data/lib/rubygems/vendor/net-http/lib/net/https.rb +23 -0
- data/lib/rubygems/vendor/net-protocol/.document +1 -0
- data/lib/rubygems/vendor/net-protocol/lib/net/protocol.rb +544 -0
- data/lib/rubygems/vendor/optparse/.document +1 -0
- data/lib/rubygems/vendor/optparse/COPYING +56 -0
- data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/ac.rb +16 -0
- data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/kwargs.rb +8 -3
- data/lib/rubygems/vendor/optparse/lib/optparse/uri.rb +7 -0
- data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/version.rb +9 -0
- data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse.rb +206 -83
- data/lib/rubygems/vendor/resolv/.document +1 -0
- data/lib/rubygems/vendor/resolv/COPYING +56 -0
- data/lib/rubygems/vendor/resolv/lib/resolv.rb +3455 -0
- data/lib/rubygems/vendor/securerandom/.document +1 -0
- data/lib/rubygems/vendor/securerandom/COPYING +56 -0
- data/lib/rubygems/vendor/securerandom/lib/securerandom.rb +102 -0
- data/lib/rubygems/vendor/timeout/.document +1 -0
- data/lib/rubygems/vendor/timeout/COPYING +56 -0
- data/lib/rubygems/vendor/timeout/lib/timeout.rb +198 -0
- data/lib/rubygems/vendor/tsort/.document +1 -0
- data/lib/rubygems/vendor/tsort/lib/tsort.rb +455 -0
- data/lib/rubygems/vendor/uri/.document +1 -0
- data/lib/rubygems/vendor/uri/COPYING +56 -0
- data/lib/rubygems/vendor/uri/lib/uri/common.rb +876 -0
- data/lib/rubygems/vendor/uri/lib/uri/file.rb +100 -0
- data/lib/rubygems/vendor/uri/lib/uri/ftp.rb +267 -0
- data/lib/rubygems/vendor/uri/lib/uri/generic.rb +1578 -0
- data/lib/rubygems/vendor/uri/lib/uri/http.rb +125 -0
- data/lib/rubygems/vendor/uri/lib/uri/https.rb +23 -0
- data/lib/rubygems/vendor/uri/lib/uri/ldap.rb +261 -0
- data/lib/rubygems/vendor/uri/lib/uri/ldaps.rb +22 -0
- data/lib/rubygems/vendor/uri/lib/uri/mailto.rb +293 -0
- data/lib/rubygems/vendor/uri/lib/uri/rfc2396_parser.rb +546 -0
- data/lib/rubygems/vendor/uri/lib/uri/rfc3986_parser.rb +206 -0
- data/lib/rubygems/vendor/uri/lib/uri/version.rb +6 -0
- data/lib/rubygems/vendor/uri/lib/uri/ws.rb +83 -0
- data/lib/rubygems/vendor/uri/lib/uri/wss.rb +23 -0
- data/lib/rubygems/vendor/uri/lib/uri.rb +104 -0
- data/{bundler/lib/bundler → lib/rubygems}/vendored_molinillo.rb +0 -1
- data/lib/rubygems/vendored_net_http.rb +5 -0
- data/lib/rubygems/vendored_optparse.rb +3 -0
- data/lib/rubygems/vendored_securerandom.rb +3 -0
- data/lib/rubygems/vendored_timeout.rb +5 -0
- data/lib/rubygems/vendored_tsort.rb +3 -0
- data/lib/rubygems/version.rb +57 -45
- data/lib/rubygems/version_option.rb +6 -8
- data/lib/rubygems/yaml_serializer.rb +98 -0
- data/lib/rubygems.rb +191 -133
- data/rubygems-update.gemspec +16 -9
- data/setup.rb +12 -9
- metadata +233 -307
- data/POLICIES.md +0 -100
- data/bin/gem +0 -13
- data/bundler/lib/bundler/dep_proxy.rb +0 -55
- data/bundler/lib/bundler/templates/gems.rb +0 -5
- data/bundler/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt +0 -5
- data/bundler/lib/bundler/templates/newgem/travis.yml.tt +0 -6
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +0 -57
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +0 -6
- data/bundler/lib/bundler/vendor/tmpdir/lib/tmpdir.rb +0 -154
- data/bundler/lib/bundler/version_ranges.rb +0 -122
- data/lib/rubygems/indexer.rb +0 -427
- data/lib/rubygems/mock_gem_ui.rb +0 -85
- data/lib/rubygems/optparse/lib/optparse/uri.rb +0 -7
- data/lib/rubygems/optparse.rb +0 -3
- data/lib/rubygems/resolver/molinillo/LICENSE +0 -9
- data/lib/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb +0 -57
- data/lib/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb +0 -88
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/action.rb +0 -36
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +0 -66
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +0 -62
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +0 -63
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +0 -61
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb +0 -126
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/set_payload.rb +0 -46
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/tag.rb +0 -36
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb +0 -164
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb +0 -255
- data/lib/rubygems/resolver/molinillo/lib/molinillo/errors.rb +0 -143
- data/lib/rubygems/resolver/molinillo/lib/molinillo/gem_metadata.rb +0 -6
- data/lib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb +0 -112
- data/lib/rubygems/resolver/molinillo/lib/molinillo/modules/ui.rb +0 -67
- data/lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb +0 -839
- data/lib/rubygems/resolver/molinillo/lib/molinillo/resolver.rb +0 -46
- data/lib/rubygems/resolver/molinillo/lib/molinillo/state.rb +0 -58
- data/lib/rubygems/resolver/molinillo/lib/molinillo.rb +0 -11
- data/lib/rubygems/resolver/molinillo.rb +0 -2
- data/lib/rubygems/tsort/LICENSE.txt +0 -22
- data/lib/rubygems/tsort/lib/tsort.rb +0 -454
- data/lib/rubygems/tsort.rb +0 -3
- data/test/rubygems/alternate_cert.pem +0 -19
- data/test/rubygems/alternate_cert_32.pem +0 -19
- data/test/rubygems/alternate_key.pem +0 -27
- data/test/rubygems/bad_rake.rb +0 -2
- data/test/rubygems/ca_cert.pem +0 -77
- data/test/rubygems/child_cert.pem +0 -20
- data/test/rubygems/child_cert_32.pem +0 -20
- data/test/rubygems/child_key.pem +0 -27
- data/test/rubygems/client.pem +0 -107
- data/test/rubygems/data/excon-0.7.7.gemspec.rz +0 -0
- data/test/rubygems/data/gem-private_key.pem +0 -27
- data/test/rubygems/data/gem-public_cert.pem +0 -20
- data/test/rubygems/data/null-required-ruby-version.gemspec.rz +0 -0
- data/test/rubygems/data/null-required-rubygems-version.gemspec.rz +0 -0
- data/test/rubygems/data/pry-0.4.7.gemspec.rz +0 -0
- data/test/rubygems/encrypted_private_key.pem +0 -30
- data/test/rubygems/expired_cert.pem +0 -19
- data/test/rubygems/foo/discover.rb +0 -1
- data/test/rubygems/future_cert.pem +0 -19
- data/test/rubygems/future_cert_32.pem +0 -19
- data/test/rubygems/good_rake.rb +0 -2
- data/test/rubygems/grandchild_cert.pem +0 -20
- data/test/rubygems/grandchild_cert_32.pem +0 -20
- data/test/rubygems/grandchild_key.pem +0 -27
- data/test/rubygems/helper.rb +0 -1622
- data/test/rubygems/installer_test_case.rb +0 -247
- data/test/rubygems/invalid_client.pem +0 -49
- data/test/rubygems/invalid_issuer_cert.pem +0 -20
- data/test/rubygems/invalid_issuer_cert_32.pem +0 -20
- data/test/rubygems/invalid_key.pem +0 -27
- data/test/rubygems/invalid_signer_cert.pem +0 -19
- data/test/rubygems/invalid_signer_cert_32.pem +0 -19
- data/test/rubygems/invalidchild_cert.pem +0 -20
- data/test/rubygems/invalidchild_cert_32.pem +0 -20
- data/test/rubygems/invalidchild_key.pem +0 -27
- data/test/rubygems/package/tar_test_case.rb +0 -139
- data/test/rubygems/packages/ascii_binder-0.1.10.1.gem +0 -0
- data/test/rubygems/packages/ill-formatted-platform-1.0.0.10.gem +0 -0
- data/test/rubygems/plugin/exception/rubygems_plugin.rb +0 -3
- data/test/rubygems/plugin/load/rubygems_plugin.rb +0 -4
- data/test/rubygems/plugin/standarderror/rubygems_plugin.rb +0 -3
- data/test/rubygems/private3072_key.pem +0 -40
- data/test/rubygems/private_ec_key.pem +0 -9
- data/test/rubygems/private_key.pem +0 -27
- data/test/rubygems/public3072_cert.pem +0 -25
- data/test/rubygems/public_cert.pem +0 -20
- data/test/rubygems/public_cert_32.pem +0 -19
- data/test/rubygems/public_key.pem +0 -9
- data/test/rubygems/rubygems/commands/crash_command.rb +0 -4
- data/test/rubygems/rubygems_plugin.rb +0 -23
- data/test/rubygems/sff/discover.rb +0 -1
- data/test/rubygems/simple_gem.rb +0 -67
- data/test/rubygems/specifications/bar-0.0.2.gemspec +0 -7
- data/test/rubygems/specifications/foo-0.0.1-x86-mswin32.gemspec +0 -0
- data/test/rubygems/specifications/rubyforge-0.0.1.gemspec +0 -12
- data/test/rubygems/ssl_cert.pem +0 -80
- data/test/rubygems/ssl_key.pem +0 -27
- data/test/rubygems/test_bundled_ca.rb +0 -60
- data/test/rubygems/test_config.rb +0 -27
- data/test/rubygems/test_deprecate.rb +0 -157
- data/test/rubygems/test_exit.rb +0 -11
- data/test/rubygems/test_gem.rb +0 -2112
- data/test/rubygems/test_gem_available_set.rb +0 -129
- data/test/rubygems/test_gem_bundler_version_finder.rb +0 -125
- data/test/rubygems/test_gem_command.rb +0 -400
- data/test/rubygems/test_gem_command_manager.rb +0 -334
- data/test/rubygems/test_gem_commands_build_command.rb +0 -727
- data/test/rubygems/test_gem_commands_cert_command.rb +0 -867
- data/test/rubygems/test_gem_commands_check_command.rb +0 -67
- data/test/rubygems/test_gem_commands_cleanup_command.rb +0 -291
- data/test/rubygems/test_gem_commands_contents_command.rb +0 -270
- data/test/rubygems/test_gem_commands_dependency_command.rb +0 -227
- data/test/rubygems/test_gem_commands_environment_command.rb +0 -167
- data/test/rubygems/test_gem_commands_fetch_command.rb +0 -257
- data/test/rubygems/test_gem_commands_generate_index_command.rb +0 -80
- data/test/rubygems/test_gem_commands_help_command.rb +0 -93
- data/test/rubygems/test_gem_commands_info_command.rb +0 -43
- data/test/rubygems/test_gem_commands_install_command.rb +0 -1553
- data/test/rubygems/test_gem_commands_list_command.rb +0 -32
- data/test/rubygems/test_gem_commands_lock_command.rb +0 -66
- data/test/rubygems/test_gem_commands_mirror.rb +0 -19
- data/test/rubygems/test_gem_commands_open_command.rb +0 -97
- data/test/rubygems/test_gem_commands_outdated_command.rb +0 -49
- data/test/rubygems/test_gem_commands_owner_command.rb +0 -326
- data/test/rubygems/test_gem_commands_pristine_command.rb +0 -659
- data/test/rubygems/test_gem_commands_push_command.rb +0 -477
- data/test/rubygems/test_gem_commands_query_command.rb +0 -857
- data/test/rubygems/test_gem_commands_search_command.rb +0 -15
- data/test/rubygems/test_gem_commands_server_command.rb +0 -19
- data/test/rubygems/test_gem_commands_setup_command.rb +0 -447
- data/test/rubygems/test_gem_commands_signin_command.rb +0 -219
- data/test/rubygems/test_gem_commands_signout_command.rb +0 -30
- data/test/rubygems/test_gem_commands_sources_command.rb +0 -534
- data/test/rubygems/test_gem_commands_specification_command.rb +0 -276
- data/test/rubygems/test_gem_commands_stale_command.rb +0 -42
- data/test/rubygems/test_gem_commands_uninstall_command.rb +0 -504
- data/test/rubygems/test_gem_commands_unpack_command.rb +0 -223
- data/test/rubygems/test_gem_commands_update_command.rb +0 -835
- data/test/rubygems/test_gem_commands_which_command.rb +0 -84
- data/test/rubygems/test_gem_commands_yank_command.rb +0 -180
- data/test/rubygems/test_gem_config_file.rb +0 -504
- data/test/rubygems/test_gem_dependency.rb +0 -395
- data/test/rubygems/test_gem_dependency_installer.rb +0 -1155
- data/test/rubygems/test_gem_dependency_list.rb +0 -264
- data/test/rubygems/test_gem_dependency_resolution_error.rb +0 -26
- data/test/rubygems/test_gem_doctor.rb +0 -194
- data/test/rubygems/test_gem_ext_builder.rb +0 -338
- data/test/rubygems/test_gem_ext_cargo_builder/custom_name/.gitignore +0 -1
- data/test/rubygems/test_gem_ext_cargo_builder/custom_name/Cargo.lock +0 -243
- data/test/rubygems/test_gem_ext_cargo_builder/custom_name/Cargo.toml +0 -10
- data/test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb +0 -21
- data/test/rubygems/test_gem_ext_cargo_builder/custom_name/custom_name.gemspec +0 -10
- data/test/rubygems/test_gem_ext_cargo_builder/custom_name/src/lib.rs +0 -27
- data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/.gitignore +0 -1
- data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.lock +0 -243
- data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.toml +0 -10
- data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/build.rb +0 -21
- data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/rust_ruby_example.gemspec +0 -8
- data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/src/lib.rs +0 -39
- data/test/rubygems/test_gem_ext_cargo_builder.rb +0 -178
- data/test/rubygems/test_gem_ext_cargo_builder_link_flag_converter.rb +0 -33
- data/test/rubygems/test_gem_ext_cargo_builder_unit.rb +0 -75
- data/test/rubygems/test_gem_ext_cmake_builder.rb +0 -83
- data/test/rubygems/test_gem_ext_configure_builder.rb +0 -79
- data/test/rubygems/test_gem_ext_ext_conf_builder.rb +0 -230
- data/test/rubygems/test_gem_ext_rake_builder.rb +0 -112
- data/test/rubygems/test_gem_gem_runner.rb +0 -113
- data/test/rubygems/test_gem_gemcutter_utilities.rb +0 -272
- data/test/rubygems/test_gem_impossible_dependencies_error.rb +0 -59
- data/test/rubygems/test_gem_indexer.rb +0 -361
- data/test/rubygems/test_gem_install_update_options.rb +0 -207
- data/test/rubygems/test_gem_installer.rb +0 -2394
- data/test/rubygems/test_gem_local_remote_options.rb +0 -132
- data/test/rubygems/test_gem_name_tuple.rb +0 -42
- data/test/rubygems/test_gem_package.rb +0 -1178
- data/test/rubygems/test_gem_package_old.rb +0 -90
- data/test/rubygems/test_gem_package_tar_header.rb +0 -225
- data/test/rubygems/test_gem_package_tar_reader.rb +0 -87
- data/test/rubygems/test_gem_package_tar_reader_entry.rb +0 -152
- data/test/rubygems/test_gem_package_tar_writer.rb +0 -330
- data/test/rubygems/test_gem_package_task.rb +0 -117
- data/test/rubygems/test_gem_path_support.rb +0 -138
- data/test/rubygems/test_gem_platform.rb +0 -391
- data/test/rubygems/test_gem_rdoc.rb +0 -136
- data/test/rubygems/test_gem_remote_fetcher.rb +0 -1226
- data/test/rubygems/test_gem_request.rb +0 -541
- data/test/rubygems/test_gem_request_connection_pools.rb +0 -150
- data/test/rubygems/test_gem_request_set.rb +0 -671
- data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +0 -847
- data/test/rubygems/test_gem_request_set_lockfile.rb +0 -468
- data/test/rubygems/test_gem_request_set_lockfile_parser.rb +0 -543
- data/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb +0 -306
- data/test/rubygems/test_gem_requirement.rb +0 -498
- data/test/rubygems/test_gem_resolver.rb +0 -791
- data/test/rubygems/test_gem_resolver_activation_request.rb +0 -42
- data/test/rubygems/test_gem_resolver_api_set.rb +0 -209
- data/test/rubygems/test_gem_resolver_api_specification.rb +0 -166
- data/test/rubygems/test_gem_resolver_best_set.rb +0 -158
- data/test/rubygems/test_gem_resolver_composed_set.rb +0 -43
- data/test/rubygems/test_gem_resolver_conflict.rb +0 -81
- data/test/rubygems/test_gem_resolver_dependency_request.rb +0 -82
- data/test/rubygems/test_gem_resolver_git_set.rb +0 -187
- data/test/rubygems/test_gem_resolver_git_specification.rb +0 -113
- data/test/rubygems/test_gem_resolver_index_set.rb +0 -87
- data/test/rubygems/test_gem_resolver_index_specification.rb +0 -92
- data/test/rubygems/test_gem_resolver_installed_specification.rb +0 -46
- data/test/rubygems/test_gem_resolver_installer_set.rb +0 -275
- data/test/rubygems/test_gem_resolver_local_specification.rb +0 -43
- data/test/rubygems/test_gem_resolver_lock_set.rb +0 -61
- data/test/rubygems/test_gem_resolver_lock_specification.rb +0 -97
- data/test/rubygems/test_gem_resolver_requirement_list.rb +0 -18
- data/test/rubygems/test_gem_resolver_specification.rb +0 -62
- data/test/rubygems/test_gem_resolver_vendor_set.rb +0 -81
- data/test/rubygems/test_gem_resolver_vendor_specification.rb +0 -81
- data/test/rubygems/test_gem_security.rb +0 -340
- data/test/rubygems/test_gem_security_policy.rb +0 -535
- data/test/rubygems/test_gem_security_signer.rb +0 -217
- data/test/rubygems/test_gem_security_trust_dir.rb +0 -98
- data/test/rubygems/test_gem_silent_ui.rb +0 -116
- data/test/rubygems/test_gem_source.rb +0 -253
- data/test/rubygems/test_gem_source_fetch_problem.rb +0 -36
- data/test/rubygems/test_gem_source_git.rb +0 -303
- data/test/rubygems/test_gem_source_installed.rb +0 -34
- data/test/rubygems/test_gem_source_list.rb +0 -118
- data/test/rubygems/test_gem_source_local.rb +0 -106
- data/test/rubygems/test_gem_source_lock.rb +0 -112
- data/test/rubygems/test_gem_source_specific_file.rb +0 -75
- data/test/rubygems/test_gem_source_subpath_problem.rb +0 -49
- data/test/rubygems/test_gem_source_vendor.rb +0 -29
- data/test/rubygems/test_gem_spec_fetcher.rb +0 -337
- data/test/rubygems/test_gem_specification.rb +0 -3756
- data/test/rubygems/test_gem_stream_ui.rb +0 -224
- data/test/rubygems/test_gem_stub_specification.rb +0 -277
- data/test/rubygems/test_gem_text.rb +0 -102
- data/test/rubygems/test_gem_uninstaller.rb +0 -674
- data/test/rubygems/test_gem_unsatisfiable_dependency_error.rb +0 -30
- data/test/rubygems/test_gem_uri.rb +0 -39
- data/test/rubygems/test_gem_uri_formatter.rb +0 -26
- data/test/rubygems/test_gem_util.rb +0 -90
- data/test/rubygems/test_gem_validator.rb +0 -42
- data/test/rubygems/test_gem_version.rb +0 -295
- data/test/rubygems/test_gem_version_option.rb +0 -164
- data/test/rubygems/test_kernel.rb +0 -129
- data/test/rubygems/test_project_sanity.rb +0 -20
- data/test/rubygems/test_remote_fetch_error.rb +0 -19
- data/test/rubygems/test_require.rb +0 -719
- data/test/rubygems/test_rubygems.rb +0 -74
- data/test/rubygems/utilities.rb +0 -371
- data/test/rubygems/wrong_key_cert.pem +0 -19
- data/test/rubygems/wrong_key_cert_32.pem +0 -19
- data/test/test_changelog_generator.rb +0 -17
- /data/{lib/rubygems/optparse → bundler/lib/bundler/vendor/connection_pool}/.document +0 -0
- /data/{lib/rubygems/tsort → bundler/lib/bundler/vendor/fileutils}/.document +0 -0
- /data/{lib/rubygems/optparse → bundler/lib/bundler/vendor/fileutils}/COPYING +0 -0
- /data/{MAINTAINERS.txt → doc/MAINTAINERS.txt} +0 -0
- /data/{UPGRADING.md → doc/rubygems/UPGRADING.md} +0 -0
- /data/{bundler/lib/bundler → lib/rubygems}/vendor/molinillo/LICENSE +0 -0
- /data/{bundler/lib/bundler/vendor/fileutils → lib/rubygems/vendor/net-protocol}/LICENSE.txt +0 -0
- /data/lib/rubygems/{optparse → vendor/optparse}/lib/optionparser.rb +0 -0
- /data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/date.rb +0 -0
- /data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/shellwords.rb +0 -0
- /data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/time.rb +0 -0
- /data/{bundler/lib/bundler/vendor/uri → lib/rubygems/vendor/tsort}/LICENSE.txt +0 -0
@@ -1,206 +1,143 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.
|
4
|
-
.TH "GEMFILE" "5" "June 2022" "" ""
|
5
|
-
.
|
1
|
+
.\" generated with nRonn/v0.11.1
|
2
|
+
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
+
.TH "GEMFILE" "5" "December 2024" ""
|
6
4
|
.SH "NAME"
|
7
5
|
\fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
|
8
|
-
.
|
9
6
|
.SH "SYNOPSIS"
|
10
7
|
A \fBGemfile\fR describes the gem dependencies required to execute associated Ruby code\.
|
11
|
-
.
|
12
8
|
.P
|
13
9
|
Place the \fBGemfile\fR in the root of the directory containing the associated code\. For instance, in a Rails application, place the \fBGemfile\fR in the same directory as the \fBRakefile\fR\.
|
14
|
-
.
|
15
10
|
.SH "SYNTAX"
|
16
11
|
A \fBGemfile\fR is evaluated as Ruby code, in a context which makes available a number of methods used to describe the gem requirements\.
|
17
|
-
.
|
18
|
-
|
19
|
-
At the top of the \fBGemfile\fR, add a line for the \fBRubygems\fR source that contains the gems listed in the \fBGemfile\fR\.
|
20
|
-
.
|
12
|
+
.SH "GLOBAL SOURCE"
|
13
|
+
At the top of the \fBGemfile\fR, add a single line for the \fBRubyGems\fR source that contains the gems listed in the \fBGemfile\fR\.
|
21
14
|
.IP "" 4
|
22
|
-
.
|
23
15
|
.nf
|
24
|
-
|
25
16
|
source "https://rubygems\.org"
|
26
|
-
.
|
27
17
|
.fi
|
28
|
-
.
|
29
18
|
.IP "" 0
|
30
|
-
.
|
31
19
|
.P
|
32
|
-
|
33
|
-
.
|
20
|
+
You can add only one global source\. In Bundler 1\.13, adding multiple global sources was deprecated\. The \fBsource\fR \fBMUST\fR be a valid RubyGems repository\.
|
21
|
+
.P
|
22
|
+
To use more than one source of RubyGems, you should use \fI\fBsource\fR block\fR\.
|
34
23
|
.P
|
35
|
-
|
36
|
-
.
|
24
|
+
A source is checked for gems following the heuristics described in \fISOURCE PRIORITY\fR\.
|
25
|
+
.P
|
26
|
+
\fBNote about a behavior of the feature deprecated in Bundler 1\.13\fR: If a gem is found in more than one global source, Bundler will print a warning after installing the gem indicating which source was used, and listing the other sources where the gem is available\. A specific source can be selected for gems that need to use a non\-standard repository, suppressing this warning, by using the \fI\fB:source\fR option\fR or \fBsource\fR block\.
|
37
27
|
.SS "CREDENTIALS"
|
38
28
|
Some gem sources require a username and password\. Use bundle config(1) \fIbundle\-config\.1\.html\fR to set the username and password for any of the sources that need it\. The command must be run once on each computer that will install the Gemfile, but this keeps the credentials from being stored in plain text in version control\.
|
39
|
-
.
|
40
29
|
.IP "" 4
|
41
|
-
.
|
42
30
|
.nf
|
43
|
-
|
44
31
|
bundle config gems\.example\.com user:password
|
45
|
-
.
|
46
32
|
.fi
|
47
|
-
.
|
48
33
|
.IP "" 0
|
49
|
-
.
|
50
34
|
.P
|
51
35
|
For some sources, like a company Gemfury account, it may be easier to include the credentials in the Gemfile as part of the source URL\.
|
52
|
-
.
|
53
36
|
.IP "" 4
|
54
|
-
.
|
55
37
|
.nf
|
56
|
-
|
57
38
|
source "https://user:password@gems\.example\.com"
|
58
|
-
.
|
59
39
|
.fi
|
60
|
-
.
|
61
40
|
.IP "" 0
|
62
|
-
.
|
63
41
|
.P
|
64
42
|
Credentials in the source URL will take precedence over credentials set using \fBconfig\fR\.
|
65
|
-
.
|
66
43
|
.SH "RUBY"
|
67
44
|
If your application requires a specific Ruby version or engine, specify your requirements using the \fBruby\fR method, with the following arguments\. All parameters are \fBOPTIONAL\fR unless otherwise specified\.
|
68
|
-
.
|
69
45
|
.SS "VERSION (required)"
|
70
|
-
The version of Ruby that your application requires\. If your application requires an alternate Ruby engine, such as JRuby,
|
71
|
-
.
|
46
|
+
The version of Ruby that your application requires\. If your application requires an alternate Ruby engine, such as JRuby, TruffleRuby, etc\., this should be the Ruby version that the engine is compatible with\.
|
72
47
|
.IP "" 4
|
73
|
-
.
|
74
48
|
.nf
|
75
|
-
|
76
|
-
|
77
|
-
.
|
49
|
+
ruby "3\.1\.2"
|
50
|
+
.fi
|
51
|
+
.IP "" 0
|
52
|
+
.P
|
53
|
+
If you wish to derive your Ruby version from a version file (ie \.ruby\-version), you can use the \fBfile\fR option instead\.
|
54
|
+
.IP "" 4
|
55
|
+
.nf
|
56
|
+
ruby file: "\.ruby\-version"
|
78
57
|
.fi
|
79
|
-
.
|
80
58
|
.IP "" 0
|
81
|
-
.
|
59
|
+
.P
|
60
|
+
The version file should conform to any of the following formats:
|
61
|
+
.IP "\(bu" 4
|
62
|
+
\fB3\.1\.2\fR (\.ruby\-version)
|
63
|
+
.IP "\(bu" 4
|
64
|
+
\fBruby 3\.1\.2\fR (\.tool\-versions, read: https://asdf\-vm\.com/manage/configuration\.html#tool\-versions)
|
65
|
+
.IP "" 0
|
82
66
|
.SS "ENGINE"
|
83
67
|
Each application \fImay\fR specify a Ruby engine\. If an engine is specified, an engine version \fImust\fR also be specified\.
|
84
|
-
.
|
85
68
|
.P
|
86
|
-
What exactly is an Engine?
|
87
|
-
.
|
69
|
+
What exactly is an Engine?
|
70
|
+
.IP "\(bu" 4
|
71
|
+
A Ruby engine is an implementation of the Ruby language\.
|
88
72
|
.IP "\(bu" 4
|
89
|
-
For background: the reference or original implementation of the Ruby programming language is called Matz
|
90
|
-
.
|
73
|
+
For background: the reference or original implementation of the Ruby programming language is called Matz's Ruby Interpreter \fIhttps://en\.wikipedia\.org/wiki/Ruby_MRI\fR, or MRI for short\. This is named after Ruby creator Yukihiro Matsumoto, also known as Matz\. MRI is also known as CRuby, because it is written in C\. MRI is the most widely used Ruby engine\.
|
91
74
|
.IP "\(bu" 4
|
92
|
-
Other implementations \fIhttps://www\.ruby\-lang\.org/en/about/\fR of Ruby exist\. Some of the more well\-known implementations include
|
93
|
-
.
|
75
|
+
Other implementations \fIhttps://www\.ruby\-lang\.org/en/about/\fR of Ruby exist\. Some of the more well\-known implementations include JRuby \fIhttps://www\.jruby\.org/\fR and TruffleRuby \fIhttps://www\.graalvm\.org/ruby/\fR\. Rubinius is an alternative implementation of Ruby written in Ruby\. JRuby is an implementation of Ruby on the JVM, short for Java Virtual Machine\. TruffleRuby is a Ruby implementation on the GraalVM, a language toolkit built on the JVM\.
|
94
76
|
.IP "" 0
|
95
|
-
.
|
96
77
|
.SS "ENGINE VERSION"
|
97
78
|
Each application \fImay\fR specify a Ruby engine version\. If an engine version is specified, an engine \fImust\fR also be specified\. If the engine is "ruby" the engine version specified \fImust\fR match the Ruby version\.
|
98
|
-
.
|
99
79
|
.IP "" 4
|
100
|
-
.
|
101
80
|
.nf
|
102
|
-
|
103
|
-
ruby "1\.8\.7", engine: "jruby", engine_version: "1\.6\.7"
|
104
|
-
.
|
81
|
+
ruby "2\.6\.8", engine: "jruby", engine_version: "9\.3\.8\.0"
|
105
82
|
.fi
|
106
|
-
.
|
107
83
|
.IP "" 0
|
108
|
-
.
|
109
84
|
.SS "PATCHLEVEL"
|
110
|
-
Each application \fImay\fR specify a Ruby patchlevel\.
|
111
|
-
.
|
85
|
+
Each application \fImay\fR specify a Ruby patchlevel\. Specifying the patchlevel has been meaningless since Ruby 2\.1\.0 was released as the patchlevel is now uniquely determined by a combination of major, minor, and teeny version numbers\.
|
86
|
+
.P
|
87
|
+
This option was implemented in Bundler 1\.4\.0 for Ruby 2\.0 or earlier\.
|
112
88
|
.IP "" 4
|
113
|
-
.
|
114
89
|
.nf
|
115
|
-
|
116
|
-
ruby "2\.0\.0", patchlevel: "247"
|
117
|
-
.
|
90
|
+
ruby "3\.1\.2", patchlevel: "20"
|
118
91
|
.fi
|
119
|
-
.
|
120
92
|
.IP "" 0
|
121
|
-
.
|
122
93
|
.SH "GEMS"
|
123
94
|
Specify gem requirements using the \fBgem\fR method, with the following arguments\. All parameters are \fBOPTIONAL\fR unless otherwise specified\.
|
124
|
-
.
|
125
95
|
.SS "NAME (required)"
|
126
96
|
For each gem requirement, list a single \fIgem\fR line\.
|
127
|
-
.
|
128
97
|
.IP "" 4
|
129
|
-
.
|
130
98
|
.nf
|
131
|
-
|
132
99
|
gem "nokogiri"
|
133
|
-
.
|
134
100
|
.fi
|
135
|
-
.
|
136
101
|
.IP "" 0
|
137
|
-
.
|
138
102
|
.SS "VERSION"
|
139
103
|
Each \fIgem\fR \fBMAY\fR have one or more version specifiers\.
|
140
|
-
.
|
141
104
|
.IP "" 4
|
142
|
-
.
|
143
105
|
.nf
|
144
|
-
|
145
106
|
gem "nokogiri", ">= 1\.4\.2"
|
146
107
|
gem "RedCloth", ">= 4\.1\.0", "< 4\.2\.0"
|
147
|
-
.
|
148
108
|
.fi
|
149
|
-
.
|
150
109
|
.IP "" 0
|
151
|
-
.
|
152
110
|
.SS "REQUIRE AS"
|
153
111
|
Each \fIgem\fR \fBMAY\fR specify files that should be used when autorequiring via \fBBundler\.require\fR\. You may pass an array with multiple files or \fBtrue\fR if the file you want \fBrequired\fR has the same name as \fIgem\fR or \fBfalse\fR to prevent any file from being autorequired\.
|
154
|
-
.
|
155
112
|
.IP "" 4
|
156
|
-
.
|
157
113
|
.nf
|
158
|
-
|
159
114
|
gem "redis", require: ["redis/connection/hiredis", "redis"]
|
160
115
|
gem "webmock", require: false
|
161
116
|
gem "byebug", require: true
|
162
|
-
.
|
163
117
|
.fi
|
164
|
-
.
|
165
118
|
.IP "" 0
|
166
|
-
.
|
167
119
|
.P
|
168
120
|
The argument defaults to the name of the gem\. For example, these are identical:
|
169
|
-
.
|
170
121
|
.IP "" 4
|
171
|
-
.
|
172
122
|
.nf
|
173
|
-
|
174
123
|
gem "nokogiri"
|
175
124
|
gem "nokogiri", require: "nokogiri"
|
176
125
|
gem "nokogiri", require: true
|
177
|
-
.
|
178
126
|
.fi
|
179
|
-
.
|
180
127
|
.IP "" 0
|
181
|
-
.
|
182
128
|
.SS "GROUPS"
|
183
129
|
Each \fIgem\fR \fBMAY\fR specify membership in one or more groups\. Any \fIgem\fR that does not specify membership in any group is placed in the \fBdefault\fR group\.
|
184
|
-
.
|
185
130
|
.IP "" 4
|
186
|
-
.
|
187
131
|
.nf
|
188
|
-
|
189
132
|
gem "rspec", group: :test
|
190
133
|
gem "wirble", groups: [:development, :test]
|
191
|
-
.
|
192
134
|
.fi
|
193
|
-
.
|
194
135
|
.IP "" 0
|
195
|
-
.
|
196
136
|
.P
|
197
137
|
The Bundler runtime allows its two main methods, \fBBundler\.setup\fR and \fBBundler\.require\fR, to limit their impact to particular groups\.
|
198
|
-
.
|
199
138
|
.IP "" 4
|
200
|
-
.
|
201
139
|
.nf
|
202
|
-
|
203
|
-
# setup adds gems to Ruby\'s load path
|
140
|
+
# setup adds gems to Ruby's load path
|
204
141
|
Bundler\.setup # defaults to all groups
|
205
142
|
require "bundler/setup" # same as Bundler\.setup
|
206
143
|
Bundler\.setup(:default) # only set up the _default_ group
|
@@ -212,451 +149,271 @@ Bundler\.require # defaults to the _default_ group
|
|
212
149
|
Bundler\.require(:default) # identical
|
213
150
|
Bundler\.require(:default, :test) # requires the _default_ and _test_ groups
|
214
151
|
Bundler\.require(:test) # requires the _test_ group
|
215
|
-
.
|
216
152
|
.fi
|
217
|
-
.
|
218
153
|
.IP "" 0
|
219
|
-
.
|
220
154
|
.P
|
221
155
|
The Bundler CLI allows you to specify a list of groups whose gems \fBbundle install\fR should not install with the \fBwithout\fR configuration\.
|
222
|
-
.
|
223
156
|
.P
|
224
157
|
To specify multiple groups to ignore, specify a list of groups separated by spaces\.
|
225
|
-
.
|
226
158
|
.IP "" 4
|
227
|
-
.
|
228
159
|
.nf
|
229
|
-
|
230
160
|
bundle config set \-\-local without test
|
231
161
|
bundle config set \-\-local without development test
|
232
|
-
.
|
233
162
|
.fi
|
234
|
-
.
|
235
163
|
.IP "" 0
|
236
|
-
.
|
237
164
|
.P
|
238
165
|
Also, calling \fBBundler\.setup\fR with no parameters, or calling \fBrequire "bundler/setup"\fR will setup all groups except for the ones you excluded via \fB\-\-without\fR (since they are not available)\.
|
239
|
-
.
|
240
166
|
.P
|
241
167
|
Note that on \fBbundle install\fR, bundler downloads and evaluates all gems, in order to create a single canonical list of all of the required gems and their dependencies\. This means that you cannot list different versions of the same gems in different groups\. For more details, see Understanding Bundler \fIhttps://bundler\.io/rationale\.html\fR\.
|
242
|
-
.
|
243
168
|
.SS "PLATFORMS"
|
244
169
|
If a gem should only be used in a particular platform or set of platforms, you can specify them\. Platforms are essentially identical to groups, except that you do not need to use the \fB\-\-without\fR install\-time flag to exclude groups of gems for other platforms\.
|
245
|
-
.
|
246
170
|
.P
|
247
171
|
There are a number of \fBGemfile\fR platforms:
|
248
|
-
.
|
249
172
|
.TP
|
250
173
|
\fBruby\fR
|
251
|
-
C Ruby (MRI), Rubinius or TruffleRuby, but
|
252
|
-
.
|
174
|
+
C Ruby (MRI), Rubinius, or TruffleRuby, but not Windows
|
253
175
|
.TP
|
254
176
|
\fBmri\fR
|
255
|
-
|
256
|
-
.
|
177
|
+
C Ruby (MRI) only, but not Windows
|
257
178
|
.TP
|
258
|
-
\
|
259
|
-
Windows 32
|
260
|
-
.
|
179
|
+
\fBwindows\fR
|
180
|
+
Windows C Ruby (MRI), including RubyInstaller 32\-bit and 64\-bit versions
|
181
|
+
.TP
|
182
|
+
\fBmswin\fR
|
183
|
+
Windows C Ruby (MRI), including RubyInstaller 32\-bit versions
|
261
184
|
.TP
|
262
|
-
\
|
263
|
-
Windows
|
264
|
-
.
|
185
|
+
\fBmswin64\fR
|
186
|
+
Windows C Ruby (MRI), including RubyInstaller 64\-bit versions
|
265
187
|
.TP
|
266
188
|
\fBrbx\fR
|
267
189
|
Rubinius
|
268
|
-
.
|
269
190
|
.TP
|
270
191
|
\fBjruby\fR
|
271
192
|
JRuby
|
272
|
-
.
|
273
193
|
.TP
|
274
194
|
\fBtruffleruby\fR
|
275
195
|
TruffleRuby
|
276
|
-
.
|
277
|
-
.TP
|
278
|
-
\fBmswin\fR
|
279
|
-
Windows
|
280
|
-
.
|
281
196
|
.P
|
282
|
-
|
283
|
-
.
|
284
|
-
.P
|
285
|
-
To specify a version in addition to a platform, append the version number without the delimiter to the platform\. For example, to specify that a gem should only be used on platforms with Ruby 2\.3, use:
|
286
|
-
.
|
197
|
+
On platforms \fBruby\fR, \fBmri\fR, \fBmswin\fR, \fBmswin64\fR, and \fBwindows\fR, you may additionally specify a version by appending the major and minor version numbers without a delimiter\. For example, to specify that a gem should only be used on platform \fBruby\fR version 3\.1, use:
|
287
198
|
.IP "" 4
|
288
|
-
.
|
289
199
|
.nf
|
290
|
-
|
291
|
-
ruby_23
|
292
|
-
.
|
200
|
+
ruby_31
|
293
201
|
.fi
|
294
|
-
.
|
295
202
|
.IP "" 0
|
296
|
-
.
|
297
203
|
.P
|
298
|
-
|
299
|
-
.
|
300
|
-
.TP
|
301
|
-
\fBruby\fR
|
302
|
-
1\.8, 1\.9, 2\.0, 2\.1, 2\.2, 2\.3, 2\.4, 2\.5, 2\.6
|
303
|
-
.
|
304
|
-
.TP
|
305
|
-
\fBmri\fR
|
306
|
-
1\.8, 1\.9, 2\.0, 2\.1, 2\.2, 2\.3, 2\.4, 2\.5, 2\.6
|
307
|
-
.
|
308
|
-
.TP
|
309
|
-
\fBmingw\fR
|
310
|
-
1\.8, 1\.9, 2\.0, 2\.1, 2\.2, 2\.3, 2\.4, 2\.5, 2\.6
|
311
|
-
.
|
312
|
-
.TP
|
313
|
-
\fBx64_mingw\fR
|
314
|
-
2\.0, 2\.1, 2\.2, 2\.3, 2\.4, 2\.5, 2\.6
|
315
|
-
.
|
316
|
-
.P
|
317
|
-
As with groups, you can specify one or more platforms:
|
318
|
-
.
|
204
|
+
As with groups (above), you may specify one or more platforms:
|
319
205
|
.IP "" 4
|
320
|
-
.
|
321
206
|
.nf
|
322
|
-
|
323
207
|
gem "weakling", platforms: :jruby
|
324
|
-
gem "ruby\-debug", platforms: :
|
325
|
-
gem "nokogiri", platforms: [:
|
326
|
-
.
|
208
|
+
gem "ruby\-debug", platforms: :mri_31
|
209
|
+
gem "nokogiri", platforms: [:windows_31, :jruby]
|
327
210
|
.fi
|
328
|
-
.
|
329
211
|
.IP "" 0
|
330
|
-
.
|
331
212
|
.P
|
332
213
|
All operations involving groups (\fBbundle install\fR \fIbundle\-install\.1\.html\fR, \fBBundler\.setup\fR, \fBBundler\.require\fR) behave exactly the same as if any groups not matching the current platform were explicitly excluded\.
|
333
|
-
.
|
214
|
+
.P
|
215
|
+
The following platform values are deprecated and should be replaced with \fBwindows\fR:
|
216
|
+
.IP "\(bu" 4
|
217
|
+
\fBmswin\fR, \fBmswin64\fR, \fBmingw32\fR, \fBx64_mingw\fR
|
218
|
+
.IP "" 0
|
219
|
+
.P
|
220
|
+
Note that, while unfortunately using the same terminology, the values of this option are different from the values that \fBbundle lock \-\-add\-platform\fR can take\. The values of this option are more closer to "Ruby Implementation" while the values that \fBbundle lock \-\-add\-platform\fR understands are more related to OS and architecture of the different systems where your lockfile will be used\.
|
334
221
|
.SS "FORCE_RUBY_PLATFORM"
|
335
222
|
If you always want the pure ruby variant of a gem to be chosen over platform specific variants, you can use the \fBforce_ruby_platform\fR option:
|
336
|
-
.
|
337
223
|
.IP "" 4
|
338
|
-
.
|
339
224
|
.nf
|
340
|
-
|
341
225
|
gem "ffi", force_ruby_platform: true
|
342
|
-
.
|
343
226
|
.fi
|
344
|
-
.
|
345
227
|
.IP "" 0
|
346
|
-
.
|
347
228
|
.P
|
348
229
|
This can be handy (assuming the pure ruby variant works fine) when:
|
349
|
-
.
|
350
230
|
.IP "\(bu" 4
|
351
|
-
You
|
352
|
-
.
|
231
|
+
You're having issues with the platform specific variant\.
|
353
232
|
.IP "\(bu" 4
|
354
233
|
The platform specific variant does not yet support a newer ruby (and thus has a \fBrequired_ruby_version\fR upper bound), but you still want your Gemfile{\.lock} files to resolve under that ruby\.
|
355
|
-
.
|
356
234
|
.IP "" 0
|
357
|
-
.
|
358
235
|
.SS "SOURCE"
|
359
|
-
You can select an alternate
|
360
|
-
.
|
236
|
+
You can select an alternate RubyGems repository for a gem using the ':source' option\.
|
361
237
|
.IP "" 4
|
362
|
-
.
|
363
238
|
.nf
|
364
|
-
|
365
239
|
gem "some_internal_gem", source: "https://gems\.example\.com"
|
366
|
-
.
|
367
240
|
.fi
|
368
|
-
.
|
369
241
|
.IP "" 0
|
370
|
-
.
|
371
242
|
.P
|
372
|
-
This forces the gem to be loaded from this source and ignores
|
373
|
-
.
|
243
|
+
This forces the gem to be loaded from this source and ignores the global source declared at the top level of the file\. If the gem does not exist in this source, it will not be installed\.
|
374
244
|
.P
|
375
|
-
Bundler will search for child dependencies of this gem by first looking in the source selected for the parent, but if they are not found there, it will fall back on
|
376
|
-
.
|
245
|
+
Bundler will search for child dependencies of this gem by first looking in the source selected for the parent, but if they are not found there, it will fall back on the global source\.
|
377
246
|
.P
|
378
|
-
Selecting a specific source repository this way also suppresses the ambiguous gem warning described above in \fIGLOBAL
|
379
|
-
.
|
247
|
+
\fBNote about a behavior of the feature deprecated in Bundler 1\.13\fR: Selecting a specific source repository this way also suppresses the ambiguous gem warning described above in \fIGLOBAL SOURCE\fR\.
|
380
248
|
.P
|
381
249
|
Using the \fB:source\fR option for an individual gem will also make that source available as a possible global source for any other gems which do not specify explicit sources\. Thus, when adding gems with explicit sources, it is recommended that you also ensure all other gems in the Gemfile are using explicit sources\.
|
382
|
-
.
|
383
250
|
.SS "GIT"
|
384
251
|
If necessary, you can specify that a gem is located at a particular git repository using the \fB:git\fR parameter\. The repository can be accessed via several protocols:
|
385
|
-
.
|
386
252
|
.TP
|
387
253
|
\fBHTTP(S)\fR
|
388
254
|
gem "rails", git: "https://github\.com/rails/rails\.git"
|
389
|
-
.
|
390
255
|
.TP
|
391
256
|
\fBSSH\fR
|
392
257
|
gem "rails", git: "git@github\.com:rails/rails\.git"
|
393
|
-
.
|
394
258
|
.TP
|
395
259
|
\fBgit\fR
|
396
260
|
gem "rails", git: "git://github\.com/rails/rails\.git"
|
397
|
-
.
|
398
261
|
.P
|
399
262
|
If using SSH, the user that you use to run \fBbundle install\fR \fBMUST\fR have the appropriate keys available in their \fB$HOME/\.ssh\fR\.
|
400
|
-
.
|
401
263
|
.P
|
402
264
|
\fBNOTE\fR: \fBhttp://\fR and \fBgit://\fR URLs should be avoided if at all possible\. These protocols are unauthenticated, so a man\-in\-the\-middle attacker can deliver malicious code and compromise your system\. HTTPS and SSH are strongly preferred\.
|
403
|
-
.
|
404
265
|
.P
|
405
266
|
The \fBgroup\fR, \fBplatforms\fR, and \fBrequire\fR options are available and behave exactly the same as they would for a normal gem\.
|
406
|
-
.
|
407
267
|
.P
|
408
268
|
A git repository \fBSHOULD\fR have at least one file, at the root of the directory containing the gem, with the extension \fB\.gemspec\fR\. This file \fBMUST\fR contain a valid gem specification, as expected by the \fBgem build\fR command\.
|
409
|
-
.
|
410
269
|
.P
|
411
270
|
If a git repository does not have a \fB\.gemspec\fR, bundler will attempt to create one, but it will not contain any dependencies, executables, or C extension compilation instructions\. As a result, it may fail to properly integrate into your application\.
|
412
|
-
.
|
413
271
|
.P
|
414
272
|
If a git repository does have a \fB\.gemspec\fR for the gem you attached it to, a version specifier, if provided, means that the git repository is only valid if the \fB\.gemspec\fR specifies a version matching the version specifier\. If not, bundler will print a warning\.
|
415
|
-
.
|
416
273
|
.IP "" 4
|
417
|
-
.
|
418
274
|
.nf
|
419
|
-
|
420
275
|
gem "rails", "2\.3\.8", git: "https://github\.com/rails/rails\.git"
|
421
276
|
# bundle install will fail, because the \.gemspec in the rails
|
422
|
-
# repository
|
423
|
-
.
|
277
|
+
# repository's master branch specifies version 3\.0\.0
|
424
278
|
.fi
|
425
|
-
.
|
426
279
|
.IP "" 0
|
427
|
-
.
|
428
280
|
.P
|
429
281
|
If a git repository does \fBnot\fR have a \fB\.gemspec\fR for the gem you attached it to, a version specifier \fBMUST\fR be provided\. Bundler will use this version in the simple \fB\.gemspec\fR it creates\.
|
430
|
-
.
|
431
282
|
.P
|
432
283
|
Git repositories support a number of additional options\.
|
433
|
-
.
|
434
284
|
.TP
|
435
285
|
\fBbranch\fR, \fBtag\fR, and \fBref\fR
|
436
286
|
You \fBMUST\fR only specify at most one of these options\. The default is \fBbranch: "master"\fR\. For example:
|
437
|
-
.
|
438
287
|
.IP
|
439
288
|
gem "rails", git: "https://github\.com/rails/rails\.git", branch: "5\-0\-stable"
|
440
|
-
.
|
441
289
|
.IP
|
442
290
|
gem "rails", git: "https://github\.com/rails/rails\.git", tag: "v5\.0\.0"
|
443
|
-
.
|
444
291
|
.IP
|
445
292
|
gem "rails", git: "https://github\.com/rails/rails\.git", ref: "4aded"
|
446
|
-
.
|
447
293
|
.TP
|
448
294
|
\fBsubmodules\fR
|
449
295
|
For reference, a git submodule \fIhttps://git\-scm\.com/book/en/v2/Git\-Tools\-Submodules\fR lets you have another git repository within a subfolder of your repository\. Specify \fBsubmodules: true\fR to cause bundler to expand any submodules included in the git repository
|
450
|
-
.
|
451
296
|
.P
|
452
297
|
If a git repository contains multiple \fB\.gemspecs\fR, each \fB\.gemspec\fR represents a gem located at the same place in the file system as the \fB\.gemspec\fR\.
|
453
|
-
.
|
454
298
|
.IP "" 4
|
455
|
-
.
|
456
299
|
.nf
|
457
|
-
|
458
300
|
|~rails [git root]
|
459
301
|
| |\-rails\.gemspec [rails gem located here]
|
460
302
|
|~actionpack
|
461
303
|
| |\-actionpack\.gemspec [actionpack gem located here]
|
462
304
|
|~activesupport
|
463
305
|
| |\-activesupport\.gemspec [activesupport gem located here]
|
464
|
-
|
465
|
-
.
|
306
|
+
|\|\.\|\.\|\.
|
466
307
|
.fi
|
467
|
-
.
|
468
308
|
.IP "" 0
|
469
|
-
.
|
470
309
|
.P
|
471
310
|
To install a gem located in a git repository, bundler changes to the directory containing the gemspec, runs \fBgem build name\.gemspec\fR and then installs the resulting gem\. The \fBgem build\fR command, which comes standard with Rubygems, evaluates the \fB\.gemspec\fR in the context of the directory in which it is located\.
|
472
|
-
.
|
473
311
|
.SS "GIT SOURCE"
|
474
|
-
A custom git source can be defined via the \fBgit_source\fR method\. Provide the source
|
475
|
-
.
|
312
|
+
A custom git source can be defined via the \fBgit_source\fR method\. Provide the source's name as an argument, and a block which receives a single argument and interpolates it into a string to return the full repo address:
|
476
313
|
.IP "" 4
|
477
|
-
.
|
478
314
|
.nf
|
479
|
-
|
480
315
|
git_source(:stash){ |repo_name| "https://stash\.corp\.acme\.pl/#{repo_name}\.git" }
|
481
|
-
gem
|
482
|
-
.
|
316
|
+
gem 'rails', stash: 'forks/rails'
|
483
317
|
.fi
|
484
|
-
.
|
485
318
|
.IP "" 0
|
486
|
-
.
|
487
319
|
.P
|
488
320
|
In addition, if you wish to choose a specific branch:
|
489
|
-
.
|
490
321
|
.IP "" 4
|
491
|
-
.
|
492
322
|
.nf
|
493
|
-
|
494
323
|
gem "rails", stash: "forks/rails", branch: "branch_name"
|
495
|
-
.
|
496
324
|
.fi
|
497
|
-
.
|
498
325
|
.IP "" 0
|
499
|
-
.
|
500
326
|
.SS "GITHUB"
|
501
327
|
\fBNOTE\fR: This shorthand should be avoided until Bundler 2\.0, since it currently expands to an insecure \fBgit://\fR URL\. This allows a man\-in\-the\-middle attacker to compromise your system\.
|
502
|
-
.
|
503
328
|
.P
|
504
329
|
If the git repository you want to use is hosted on GitHub and is public, you can use the :github shorthand to specify the github username and repository name (without the trailing "\.git"), separated by a slash\. If both the username and repository name are the same, you can omit one\.
|
505
|
-
.
|
506
330
|
.IP "" 4
|
507
|
-
.
|
508
331
|
.nf
|
509
|
-
|
510
332
|
gem "rails", github: "rails/rails"
|
511
333
|
gem "rails", github: "rails"
|
512
|
-
.
|
513
334
|
.fi
|
514
|
-
.
|
515
335
|
.IP "" 0
|
516
|
-
.
|
517
336
|
.P
|
518
337
|
Are both equivalent to
|
519
|
-
.
|
520
338
|
.IP "" 4
|
521
|
-
.
|
522
339
|
.nf
|
523
|
-
|
524
|
-
gem "rails", git: "git://github\.com/rails/rails\.git"
|
525
|
-
.
|
340
|
+
gem "rails", git: "https://github\.com/rails/rails\.git"
|
526
341
|
.fi
|
527
|
-
.
|
528
342
|
.IP "" 0
|
529
|
-
.
|
530
343
|
.P
|
531
344
|
Since the \fBgithub\fR method is a specialization of \fBgit_source\fR, it accepts a \fB:branch\fR named argument\.
|
532
|
-
.
|
533
345
|
.P
|
534
346
|
You can also directly pass a pull request URL:
|
535
|
-
.
|
536
347
|
.IP "" 4
|
537
|
-
.
|
538
348
|
.nf
|
539
|
-
|
540
349
|
gem "rails", github: "https://github\.com/rails/rails/pull/43753"
|
541
|
-
.
|
542
350
|
.fi
|
543
|
-
.
|
544
351
|
.IP "" 0
|
545
|
-
.
|
546
352
|
.P
|
547
353
|
Which is equivalent to:
|
548
|
-
.
|
549
354
|
.IP "" 4
|
550
|
-
.
|
551
355
|
.nf
|
552
|
-
|
553
356
|
gem "rails", github: "rails/rails", branch: "refs/pull/43753/head"
|
554
|
-
.
|
555
357
|
.fi
|
556
|
-
.
|
557
358
|
.IP "" 0
|
558
|
-
.
|
559
359
|
.SS "GIST"
|
560
360
|
If the git repository you want to use is hosted as a GitHub Gist and is public, you can use the :gist shorthand to specify the gist identifier (without the trailing "\.git")\.
|
561
|
-
.
|
562
361
|
.IP "" 4
|
563
|
-
.
|
564
362
|
.nf
|
565
|
-
|
566
363
|
gem "the_hatch", gist: "4815162342"
|
567
|
-
.
|
568
364
|
.fi
|
569
|
-
.
|
570
365
|
.IP "" 0
|
571
|
-
.
|
572
366
|
.P
|
573
367
|
Is equivalent to:
|
574
|
-
.
|
575
368
|
.IP "" 4
|
576
|
-
.
|
577
369
|
.nf
|
578
|
-
|
579
370
|
gem "the_hatch", git: "https://gist\.github\.com/4815162342\.git"
|
580
|
-
.
|
581
371
|
.fi
|
582
|
-
.
|
583
372
|
.IP "" 0
|
584
|
-
.
|
585
373
|
.P
|
586
374
|
Since the \fBgist\fR method is a specialization of \fBgit_source\fR, it accepts a \fB:branch\fR named argument\.
|
587
|
-
.
|
588
375
|
.SS "BITBUCKET"
|
589
376
|
If the git repository you want to use is hosted on Bitbucket and is public, you can use the :bitbucket shorthand to specify the bitbucket username and repository name (without the trailing "\.git"), separated by a slash\. If both the username and repository name are the same, you can omit one\.
|
590
|
-
.
|
591
377
|
.IP "" 4
|
592
|
-
.
|
593
378
|
.nf
|
594
|
-
|
595
379
|
gem "rails", bitbucket: "rails/rails"
|
596
380
|
gem "rails", bitbucket: "rails"
|
597
|
-
.
|
598
381
|
.fi
|
599
|
-
.
|
600
382
|
.IP "" 0
|
601
|
-
.
|
602
383
|
.P
|
603
384
|
Are both equivalent to
|
604
|
-
.
|
605
385
|
.IP "" 4
|
606
|
-
.
|
607
386
|
.nf
|
608
|
-
|
609
387
|
gem "rails", git: "https://rails@bitbucket\.org/rails/rails\.git"
|
610
|
-
.
|
611
388
|
.fi
|
612
|
-
.
|
613
389
|
.IP "" 0
|
614
|
-
.
|
615
390
|
.P
|
616
391
|
Since the \fBbitbucket\fR method is a specialization of \fBgit_source\fR, it accepts a \fB:branch\fR named argument\.
|
617
|
-
.
|
618
392
|
.SS "PATH"
|
619
393
|
You can specify that a gem is located in a particular location on the file system\. Relative paths are resolved relative to the directory containing the \fBGemfile\fR\.
|
620
|
-
.
|
621
394
|
.P
|
622
395
|
Similar to the semantics of the \fB:git\fR option, the \fB:path\fR option requires that the directory in question either contains a \fB\.gemspec\fR for the gem, or that you specify an explicit version that bundler should use\.
|
623
|
-
.
|
624
396
|
.P
|
625
397
|
Unlike \fB:git\fR, bundler does not compile C extensions for gems specified as paths\.
|
626
|
-
.
|
627
398
|
.IP "" 4
|
628
|
-
.
|
629
399
|
.nf
|
630
|
-
|
631
400
|
gem "rails", path: "vendor/rails"
|
632
|
-
.
|
633
401
|
.fi
|
634
|
-
.
|
635
402
|
.IP "" 0
|
636
|
-
.
|
637
403
|
.P
|
638
|
-
If you would like to use multiple local gems directly from the filesystem, you can set a global \fBpath\fR option to the path containing the gem
|
639
|
-
.
|
404
|
+
If you would like to use multiple local gems directly from the filesystem, you can set a global \fBpath\fR option to the path containing the gem's files\. This will automatically load gemspec files from subdirectories\.
|
640
405
|
.IP "" 4
|
641
|
-
.
|
642
406
|
.nf
|
643
|
-
|
644
|
-
|
645
|
-
gem
|
646
|
-
gem \'public_ui\'
|
407
|
+
path 'components' do
|
408
|
+
gem 'admin_ui'
|
409
|
+
gem 'public_ui'
|
647
410
|
end
|
648
|
-
.
|
649
411
|
.fi
|
650
|
-
.
|
651
412
|
.IP "" 0
|
652
|
-
.
|
653
413
|
.SH "BLOCK FORM OF SOURCE, GIT, PATH, GROUP and PLATFORMS"
|
654
414
|
The \fB:source\fR, \fB:git\fR, \fB:path\fR, \fB:group\fR, and \fB:platforms\fR options may be applied to a group of gems by using block form\.
|
655
|
-
.
|
656
415
|
.IP "" 4
|
657
|
-
.
|
658
416
|
.nf
|
659
|
-
|
660
417
|
source "https://gems\.example\.com" do
|
661
418
|
gem "some_internal_gem"
|
662
419
|
gem "another_internal_gem"
|
@@ -676,61 +433,40 @@ group :development, optional: true do
|
|
676
433
|
gem "wirble"
|
677
434
|
gem "faker"
|
678
435
|
end
|
679
|
-
.
|
680
436
|
.fi
|
681
|
-
.
|
682
437
|
.IP "" 0
|
683
|
-
.
|
684
438
|
.P
|
685
439
|
In the case of the group block form the :optional option can be given to prevent a group from being installed unless listed in the \fB\-\-with\fR option given to the \fBbundle install\fR command\.
|
686
|
-
.
|
687
440
|
.P
|
688
441
|
In the case of the \fBgit\fR block form, the \fB:ref\fR, \fB:branch\fR, \fB:tag\fR, and \fB:submodules\fR options may be passed to the \fBgit\fR method, and all gems in the block will inherit those options\.
|
689
|
-
.
|
690
442
|
.P
|
691
443
|
The presence of a \fBsource\fR block in a Gemfile also makes that source available as a possible global source for any other gems which do not specify explicit sources\. Thus, when defining source blocks, it is recommended that you also ensure all other gems in the Gemfile are using explicit sources, either via source blocks or \fB:source\fR directives on individual gems\.
|
692
|
-
.
|
693
444
|
.SH "INSTALL_IF"
|
694
445
|
The \fBinstall_if\fR method allows gems to be installed based on a proc or lambda\. This is especially useful for optional gems that can only be used if certain software is installed or some other conditions are met\.
|
695
|
-
.
|
696
446
|
.IP "" 4
|
697
|
-
.
|
698
447
|
.nf
|
699
|
-
|
700
448
|
install_if \-> { RUBY_PLATFORM =~ /darwin/ } do
|
701
449
|
gem "pasteboard"
|
702
450
|
end
|
703
|
-
.
|
704
451
|
.fi
|
705
|
-
.
|
706
452
|
.IP "" 0
|
707
|
-
.
|
708
453
|
.SH "GEMSPEC"
|
709
|
-
The \fB\.gemspec\fR \
|
710
|
-
.
|
454
|
+
The \fB\.gemspec\fR \fIhttps://guides\.rubygems\.org/specification\-reference/\fR file is where you provide metadata about your gem to Rubygems\. Some required Gemspec attributes include the name, description, and homepage of your gem\. This is also where you specify the dependencies your gem needs to run\.
|
711
455
|
.P
|
712
456
|
If you wish to use Bundler to help install dependencies for a gem while it is being developed, use the \fBgemspec\fR method to pull in the dependencies listed in the \fB\.gemspec\fR file\.
|
713
|
-
.
|
714
457
|
.P
|
715
|
-
The \fBgemspec\fR method adds any runtime dependencies as gem requirements in the default group\. It also adds development dependencies as gem requirements in the \fBdevelopment\fR group\. Finally, it adds a gem requirement on your project (\fBpath:
|
716
|
-
.
|
458
|
+
The \fBgemspec\fR method adds any runtime dependencies as gem requirements in the default group\. It also adds development dependencies as gem requirements in the \fBdevelopment\fR group\. Finally, it adds a gem requirement on your project (\fBpath: '\.'\fR)\. In conjunction with \fBBundler\.setup\fR, this allows you to require project files in your test code as you would if the project were installed as a gem; you need not manipulate the load path manually or require project files via relative paths\.
|
717
459
|
.P
|
718
|
-
The \fBgemspec\fR method supports optional \fB:path\fR, \fB:glob\fR, \fB:name\fR, and \fB:development_group\fR options, which control where bundler looks for the \fB\.gemspec\fR, the glob it uses to look for the gemspec (defaults to:
|
719
|
-
.
|
460
|
+
The \fBgemspec\fR method supports optional \fB:path\fR, \fB:glob\fR, \fB:name\fR, and \fB:development_group\fR options, which control where bundler looks for the \fB\.gemspec\fR, the glob it uses to look for the gemspec (defaults to: \fB{,*,*/*}\.gemspec\fR), what named \fB\.gemspec\fR it uses (if more than one is present), and which group development dependencies are included in\.
|
720
461
|
.P
|
721
462
|
When a \fBgemspec\fR dependency encounters version conflicts during resolution, the local version under development will always be selected \-\- even if there are remote versions that better match other requirements for the \fBgemspec\fR gem\.
|
722
|
-
.
|
723
463
|
.SH "SOURCE PRIORITY"
|
724
464
|
When attempting to locate a gem to satisfy a gem requirement, bundler uses the following priority order:
|
725
|
-
.
|
726
465
|
.IP "1." 4
|
727
466
|
The source explicitly attached to the gem (using \fB:source\fR, \fB:path\fR, or \fB:git\fR)
|
728
|
-
.
|
729
467
|
.IP "2." 4
|
730
468
|
For implicit gems (dependencies of explicit gems), any source, git, or path repository declared on the parent\. This results in bundler prioritizing the ActiveSupport gem from the Rails git repository over ones from \fBrubygems\.org\fR
|
731
|
-
.
|
732
469
|
.IP "3." 4
|
733
|
-
|
734
|
-
.
|
470
|
+
If neither of the above conditions are met, the global source will be used\. If multiple global sources are specified, they will be prioritized from last to first, but this is deprecated since Bundler 1\.13, so Bundler prints a warning and will abort with an error in the future\.
|
735
471
|
.IP "" 0
|
736
472
|
|