rubygems-update 3.4.10 → 3.5.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +714 -4
- data/CODE_OF_CONDUCT.md +79 -28
- data/CONTRIBUTING.md +3 -3
- data/Manifest.txt +128 -257
- data/POLICIES.md +82 -13
- data/README.md +1 -3
- data/bundler/CHANGELOG.md +556 -2
- data/bundler/README.md +1 -2
- data/bundler/bundler.gemspec +4 -2
- data/bundler/exe/bundle +5 -22
- 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 +4 -4
- data/bundler/lib/bundler/cli/binstubs.rb +5 -5
- data/bundler/lib/bundler/cli/cache.rb +1 -1
- data/bundler/lib/bundler/cli/check.rb +3 -3
- data/bundler/lib/bundler/cli/common.rb +9 -1
- data/bundler/lib/bundler/cli/config.rb +8 -7
- data/bundler/lib/bundler/cli/console.rb +3 -2
- data/bundler/lib/bundler/cli/doctor.rb +2 -2
- data/bundler/lib/bundler/cli/exec.rb +1 -1
- data/bundler/lib/bundler/cli/fund.rb +1 -1
- data/bundler/lib/bundler/cli/gem.rb +44 -42
- data/bundler/lib/bundler/cli/info.rb +2 -13
- data/bundler/lib/bundler/cli/install.rb +18 -12
- data/bundler/lib/bundler/cli/issue.rb +1 -1
- data/bundler/lib/bundler/cli/lock.rb +33 -29
- data/bundler/lib/bundler/cli/open.rb +5 -7
- data/bundler/lib/bundler/cli/outdated.rb +23 -25
- 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 +2 -2
- data/bundler/lib/bundler/cli/update.rb +6 -5
- data/bundler/lib/bundler/cli.rb +226 -291
- data/bundler/lib/bundler/compact_index_client/cache.rb +55 -60
- data/bundler/lib/bundler/compact_index_client/cache_file.rb +153 -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 +79 -81
- data/bundler/lib/bundler/compact_index_client.rb +58 -80
- data/bundler/lib/bundler/constants.rb +8 -1
- data/bundler/lib/bundler/current_ruby.rb +5 -21
- data/bundler/lib/bundler/definition.rb +341 -180
- data/bundler/lib/bundler/dependency.rb +22 -13
- data/bundler/lib/bundler/digest.rb +2 -2
- data/bundler/lib/bundler/dsl.rb +100 -54
- data/bundler/lib/bundler/endpoint_specification.rb +17 -2
- data/bundler/lib/bundler/env.rb +4 -6
- data/bundler/lib/bundler/environment_preserver.rb +5 -23
- data/bundler/lib/bundler/errors.rb +74 -0
- data/bundler/lib/bundler/feature_flag.rb +0 -1
- data/bundler/lib/bundler/fetcher/base.rb +5 -3
- data/bundler/lib/bundler/fetcher/compact_index.rb +21 -34
- data/bundler/lib/bundler/fetcher/dependency.rb +1 -1
- data/bundler/lib/bundler/fetcher/downloader.rb +15 -11
- 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 +72 -58
- data/bundler/lib/bundler/force_platform.rb +0 -2
- data/bundler/lib/bundler/friendly_errors.rb +6 -6
- data/bundler/lib/bundler/gem_helper.rb +5 -6
- data/bundler/lib/bundler/gem_helpers.rb +21 -4
- data/bundler/lib/bundler/gem_version_promoter.rb +43 -39
- data/bundler/lib/bundler/graph.rb +9 -9
- data/bundler/lib/bundler/index.rb +63 -33
- data/bundler/lib/bundler/injector.rb +6 -8
- data/bundler/lib/bundler/inline.rb +33 -12
- data/bundler/lib/bundler/installer/gem_installer.rb +13 -12
- data/bundler/lib/bundler/installer/parallel_installer.rb +19 -36
- data/bundler/lib/bundler/installer/standalone.rb +16 -6
- data/bundler/lib/bundler/installer.rb +29 -33
- data/bundler/lib/bundler/lazy_specification.rb +31 -17
- data/bundler/lib/bundler/lockfile_generator.rb +10 -1
- data/bundler/lib/bundler/lockfile_parser.rb +110 -45
- data/bundler/lib/bundler/man/bundle-add.1 +29 -41
- data/bundler/lib/bundler/man/bundle-add.1.ronn +37 -14
- data/bundler/lib/bundler/man/bundle-binstubs.1 +4 -16
- data/bundler/lib/bundler/man/bundle-cache.1 +5 -26
- data/bundler/lib/bundler/man/bundle-cache.1.ronn +2 -2
- data/bundler/lib/bundler/man/bundle-check.1 +5 -12
- data/bundler/lib/bundler/man/bundle-check.1.ronn +3 -0
- data/bundler/lib/bundler/man/bundle-clean.1 +3 -10
- data/bundler/lib/bundler/man/bundle-config.1 +21 -217
- data/bundler/lib/bundler/man/bundle-config.1.ronn +9 -9
- data/bundler/lib/bundler/man/bundle-console.1 +4 -22
- data/bundler/lib/bundler/man/bundle-doctor.1 +4 -18
- data/bundler/lib/bundler/man/bundle-exec.1 +13 -74
- data/bundler/lib/bundler/man/bundle-exec.1.ronn +2 -3
- data/bundler/lib/bundler/man/bundle-gem.1 +19 -49
- data/bundler/lib/bundler/man/bundle-gem.1.ronn +11 -0
- data/bundler/lib/bundler/man/bundle-help.1 +3 -7
- data/bundler/lib/bundler/man/bundle-info.1 +5 -11
- data/bundler/lib/bundler/man/bundle-info.1.ronn +3 -3
- data/bundler/lib/bundler/man/bundle-init.1 +3 -12
- data/bundler/lib/bundler/man/bundle-inject.1 +6 -19
- data/bundler/lib/bundler/man/bundle-install.1 +29 -127
- data/bundler/lib/bundler/man/bundle-install.1.ronn +3 -2
- data/bundler/lib/bundler/man/bundle-list.1 +4 -19
- data/bundler/lib/bundler/man/bundle-lock.1 +5 -29
- data/bundler/lib/bundler/man/bundle-open.1 +7 -27
- data/bundler/lib/bundler/man/bundle-outdated.1 +15 -63
- data/bundler/lib/bundler/man/bundle-outdated.1.ronn +12 -8
- data/bundler/lib/bundler/man/bundle-platform.1 +5 -27
- data/bundler/lib/bundler/man/bundle-plugin.1 +24 -47
- data/bundler/lib/bundler/man/bundle-plugin.1.ronn +12 -8
- data/bundler/lib/bundler/man/bundle-pristine.1 +5 -16
- data/bundler/lib/bundler/man/bundle-remove.1 +4 -14
- data/bundler/lib/bundler/man/bundle-show.1 +3 -10
- data/bundler/lib/bundler/man/bundle-update.1 +18 -137
- data/bundler/lib/bundler/man/bundle-version.1 +3 -16
- data/bundler/lib/bundler/man/bundle-viz.1 +4 -16
- data/bundler/lib/bundler/man/bundle.1 +5 -44
- data/bundler/lib/bundler/man/gemfile.5 +43 -294
- data/bundler/lib/bundler/man/gemfile.5.ronn +23 -3
- data/bundler/lib/bundler/match_metadata.rb +4 -0
- data/bundler/lib/bundler/match_platform.rb +1 -1
- data/bundler/lib/bundler/mirror.rb +3 -3
- data/bundler/lib/bundler/plugin/api/source.rb +7 -5
- data/bundler/lib/bundler/plugin/index.rb +9 -1
- data/bundler/lib/bundler/plugin/installer/path.rb +18 -0
- data/bundler/lib/bundler/plugin/installer.rb +37 -17
- data/bundler/lib/bundler/plugin/source_list.rb +4 -4
- data/bundler/lib/bundler/plugin.rb +13 -6
- data/bundler/lib/bundler/remote_specification.rb +4 -0
- data/bundler/lib/bundler/resolver/base.rb +12 -4
- data/bundler/lib/bundler/resolver/candidate.rb +5 -17
- data/bundler/lib/bundler/resolver/incompatibility.rb +1 -1
- data/bundler/lib/bundler/resolver/package.rb +19 -1
- data/bundler/lib/bundler/resolver/spec_group.rb +21 -6
- data/bundler/lib/bundler/resolver.rb +174 -64
- data/bundler/lib/bundler/retry.rb +2 -2
- data/bundler/lib/bundler/ruby_dsl.rb +42 -7
- data/bundler/lib/bundler/ruby_version.rb +18 -5
- data/bundler/lib/bundler/rubygems_ext.rb +173 -71
- data/bundler/lib/bundler/rubygems_gem_installer.rb +56 -57
- data/bundler/lib/bundler/rubygems_integration.rb +35 -112
- data/bundler/lib/bundler/runtime.rb +5 -10
- data/bundler/lib/bundler/safe_marshal.rb +31 -0
- data/bundler/lib/bundler/self_manager.rb +49 -11
- data/bundler/lib/bundler/settings.rb +136 -49
- data/bundler/lib/bundler/setup.rb +10 -1
- data/bundler/lib/bundler/shared_helpers.rb +56 -17
- data/bundler/lib/bundler/source/git/git_proxy.rb +91 -32
- data/bundler/lib/bundler/source/git.rb +108 -39
- data/bundler/lib/bundler/source/metadata.rb +17 -15
- data/bundler/lib/bundler/source/path.rb +10 -20
- data/bundler/lib/bundler/source/rubygems/remote.rb +1 -1
- data/bundler/lib/bundler/source/rubygems.rb +87 -92
- data/bundler/lib/bundler/source.rb +3 -1
- data/bundler/lib/bundler/source_list.rb +26 -6
- data/bundler/lib/bundler/spec_set.rb +112 -30
- data/bundler/lib/bundler/stub_specification.rb +26 -4
- data/bundler/lib/bundler/templates/Executable.bundler +1 -1
- data/bundler/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +77 -29
- data/bundler/lib/bundler/templates/newgem/README.md.tt +7 -3
- data/bundler/lib/bundler/templates/newgem/Rakefile.tt +8 -8
- data/bundler/lib/bundler/templates/newgem/bin/console.tt +0 -4
- data/bundler/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +1 -1
- data/bundler/lib/bundler/templates/newgem/ext/newgem/extconf-c.rb.tt +5 -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 +4 -4
- data/bundler/lib/bundler/templates/newgem/github/workflows/main.yml.tt +1 -1
- data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +5 -3
- 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 +25 -3
- data/bundler/lib/bundler/ui/silent.rb +12 -1
- data/bundler/lib/bundler/uri_credentials_filter.rb +2 -2
- data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +1 -1
- data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +53 -6
- data/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb +9 -21
- data/bundler/lib/bundler/vendor/net-http-persistent/.document +1 -0
- 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/lib/pub_grub/static_package_source.rb +1 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +9 -4
- data/bundler/lib/bundler/vendor/securerandom/.document +1 -0
- data/bundler/lib/bundler/vendor/securerandom/lib/random/formatter.rb +373 -0
- data/bundler/lib/bundler/vendor/securerandom/lib/securerandom.rb +96 -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 +8 -10
- 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 +1 -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 +20 -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 +27 -8
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/options.rb +44 -6
- 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 +26 -150
- 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 +0 -45
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/table_printer.rb +134 -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 +155 -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/lib/uri/common.rb +258 -132
- data/bundler/lib/bundler/vendor/uri/lib/uri/generic.rb +1 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +2 -2
- data/bundler/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +96 -32
- data/bundler/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
- data/bundler/lib/bundler/vendored_net_http.rb +23 -0
- data/bundler/lib/bundler/vendored_persistent.rb +0 -4
- data/bundler/lib/bundler/vendored_securerandom.rb +14 -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 +1 -1
- data/bundler/lib/bundler/vlad.rb +1 -1
- data/bundler/lib/bundler/yaml_serializer.rb +22 -13
- data/bundler/lib/bundler.rb +108 -81
- data/{bin → exe}/gem +2 -0
- data/{bin → exe}/update_rubygems +8 -6
- data/lib/rubygems/available_set.rb +6 -5
- data/lib/rubygems/basic_specification.rb +81 -44
- data/lib/rubygems/bundler_version_finder.rb +6 -6
- data/lib/rubygems/ci_detector.rb +75 -0
- data/lib/rubygems/command.rb +32 -36
- data/lib/rubygems/command_manager.rb +13 -12
- data/lib/rubygems/commands/build_command.rb +5 -13
- data/lib/rubygems/commands/cert_command.rb +6 -6
- data/lib/rubygems/commands/check_command.rb +10 -5
- data/lib/rubygems/commands/cleanup_command.rb +15 -26
- data/lib/rubygems/commands/contents_command.rb +21 -13
- data/lib/rubygems/commands/dependency_command.rb +7 -8
- data/lib/rubygems/commands/environment_command.rb +4 -5
- data/lib/rubygems/commands/exec_command.rb +3 -7
- data/lib/rubygems/commands/fetch_command.rb +17 -2
- data/lib/rubygems/commands/generate_index_command.rb +40 -74
- data/lib/rubygems/commands/help_command.rb +9 -8
- data/lib/rubygems/commands/info_command.rb +2 -2
- data/lib/rubygems/commands/install_command.rb +9 -20
- data/lib/rubygems/commands/list_command.rb +3 -2
- data/lib/rubygems/commands/lock_command.rb +2 -1
- data/lib/rubygems/commands/mirror_command.rb +1 -0
- data/lib/rubygems/commands/open_command.rb +2 -3
- data/lib/rubygems/commands/outdated_command.rb +1 -0
- data/lib/rubygems/commands/owner_command.rb +11 -10
- data/lib/rubygems/commands/pristine_command.rb +41 -29
- data/lib/rubygems/commands/push_command.rb +3 -2
- data/lib/rubygems/commands/query_command.rb +5 -5
- data/lib/rubygems/commands/rdoc_command.rb +4 -10
- data/lib/rubygems/commands/rebuild_command.rb +264 -0
- data/lib/rubygems/commands/search_command.rb +3 -2
- data/lib/rubygems/commands/server_command.rb +1 -0
- data/lib/rubygems/commands/setup_command.rb +41 -39
- data/lib/rubygems/commands/signin_command.rb +1 -0
- data/lib/rubygems/commands/signout_command.rb +1 -0
- data/lib/rubygems/commands/sources_command.rb +15 -14
- data/lib/rubygems/commands/specification_command.rb +16 -11
- data/lib/rubygems/commands/stale_command.rb +3 -2
- data/lib/rubygems/commands/uninstall_command.rb +25 -21
- data/lib/rubygems/commands/unpack_command.rb +12 -13
- data/lib/rubygems/commands/update_command.rb +26 -30
- data/lib/rubygems/commands/which_command.rb +2 -1
- data/lib/rubygems/commands/yank_command.rb +3 -2
- data/lib/rubygems/compatibility.rb +5 -6
- data/lib/rubygems/config_file.rb +95 -30
- data/lib/rubygems/core_ext/kernel_gem.rb +2 -4
- data/lib/rubygems/core_ext/kernel_require.rb +31 -50
- data/lib/rubygems/core_ext/kernel_warn.rb +4 -5
- data/lib/rubygems/core_ext/tcpsocket_init.rb +3 -1
- data/lib/rubygems/defaults.rb +27 -10
- data/lib/rubygems/dependency.rb +25 -30
- data/lib/rubygems/dependency_installer.rb +39 -43
- data/lib/rubygems/dependency_list.rb +3 -2
- data/lib/rubygems/deprecate.rb +80 -75
- data/lib/rubygems/doctor.rb +8 -7
- data/lib/rubygems/errors.rb +6 -8
- data/lib/rubygems/exceptions.rb +15 -5
- data/lib/rubygems/ext/build_error.rb +1 -0
- data/lib/rubygems/ext/builder.rb +24 -18
- data/lib/rubygems/ext/cargo_builder.rb +10 -25
- data/lib/rubygems/ext/configure_builder.rb +1 -0
- data/lib/rubygems/ext/ext_conf_builder.rb +3 -4
- data/lib/rubygems/ext/rake_builder.rb +5 -3
- data/lib/rubygems/ext.rb +1 -0
- data/lib/rubygems/gem_runner.rb +10 -5
- 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 +105 -43
- data/lib/rubygems/gemspec_helpers.rb +19 -0
- data/lib/rubygems/install_default_message.rb +1 -0
- data/lib/rubygems/install_message.rb +1 -0
- data/lib/rubygems/install_update_options.rb +20 -20
- data/lib/rubygems/installer.rb +112 -85
- data/lib/rubygems/installer_uninstaller_utils.rb +0 -2
- data/lib/rubygems/local_remote_options.rb +15 -17
- data/lib/rubygems/name_tuple.rb +8 -9
- data/lib/rubygems/package/digest_io.rb +2 -1
- data/lib/rubygems/package/file_source.rb +1 -0
- data/lib/rubygems/package/io_source.rb +1 -0
- data/lib/rubygems/package/old.rb +3 -2
- data/lib/rubygems/package/source.rb +1 -0
- data/lib/rubygems/package/tar_header.rb +64 -41
- data/lib/rubygems/package/tar_reader/entry.rb +24 -24
- data/lib/rubygems/package/tar_reader.rb +15 -10
- data/lib/rubygems/package/tar_writer.rb +22 -19
- data/lib/rubygems/package.rb +69 -47
- data/lib/rubygems/package_task.rb +3 -2
- data/lib/rubygems/path_support.rb +11 -11
- data/lib/rubygems/platform.rb +73 -50
- data/lib/rubygems/psych_tree.rb +1 -0
- data/lib/rubygems/query_utils.rb +13 -15
- data/lib/rubygems/rdoc.rb +1 -0
- data/lib/rubygems/remote_fetcher.rb +30 -22
- data/lib/rubygems/request/connection_pools.rb +3 -3
- data/lib/rubygems/request/http_pool.rb +1 -0
- data/lib/rubygems/request/https_pool.rb +1 -0
- data/lib/rubygems/request.rb +29 -25
- data/lib/rubygems/request_set/gem_dependency_api.rb +122 -124
- data/lib/rubygems/request_set/lockfile/parser.rb +11 -10
- data/lib/rubygems/request_set/lockfile/tokenizer.rb +22 -12
- data/lib/rubygems/request_set/lockfile.rb +7 -11
- data/lib/rubygems/request_set.rb +11 -9
- data/lib/rubygems/requirement.rb +16 -10
- data/lib/rubygems/resolver/activation_request.rb +5 -8
- data/lib/rubygems/resolver/api_set/gem_parser.rb +7 -3
- data/lib/rubygems/resolver/api_set.rb +16 -9
- data/lib/rubygems/resolver/api_specification.rb +2 -1
- data/lib/rubygems/resolver/best_set.rb +1 -28
- data/lib/rubygems/resolver/composed_set.rb +2 -1
- data/lib/rubygems/resolver/conflict.rb +5 -12
- data/lib/rubygems/resolver/current_set.rb +1 -0
- data/lib/rubygems/resolver/dependency_request.rb +1 -0
- data/lib/rubygems/resolver/git_set.rb +1 -0
- data/lib/rubygems/resolver/git_specification.rb +1 -0
- data/lib/rubygems/resolver/index_set.rb +5 -4
- data/lib/rubygems/resolver/index_specification.rb +3 -2
- data/lib/rubygems/resolver/installed_specification.rb +2 -1
- data/lib/rubygems/resolver/installer_set.rb +9 -7
- data/lib/rubygems/resolver/local_specification.rb +2 -1
- data/lib/rubygems/resolver/lock_set.rb +2 -1
- data/lib/rubygems/resolver/lock_specification.rb +1 -0
- 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 +1 -0
- data/lib/rubygems/resolver/stats.rb +1 -0
- data/lib/rubygems/resolver/vendor_set.rb +1 -0
- data/lib/rubygems/resolver/vendor_specification.rb +1 -0
- data/lib/rubygems/resolver.rb +11 -17
- data/lib/rubygems/s3_uri_signer.rb +13 -11
- data/lib/rubygems/safe_marshal/elements.rb +146 -0
- data/lib/rubygems/safe_marshal/reader.rb +308 -0
- data/lib/rubygems/safe_marshal/visitors/stream_printer.rb +31 -0
- data/lib/rubygems/safe_marshal/visitors/to_ruby.rb +415 -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 +37 -38
- data/lib/rubygems/security/policy.rb +8 -11
- data/lib/rubygems/security/signer.rb +12 -3
- data/lib/rubygems/security/trust_dir.rb +10 -11
- data/lib/rubygems/security.rb +12 -25
- data/lib/rubygems/security_option.rb +2 -1
- data/lib/rubygems/shellwords.rb +3 -0
- data/lib/rubygems/source/git.rb +10 -10
- data/lib/rubygems/source/installed.rb +4 -3
- data/lib/rubygems/source/local.rb +48 -48
- 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 +28 -22
- data/lib/rubygems/source_list.rb +8 -8
- data/lib/rubygems/spec_fetcher.rb +46 -56
- data/lib/rubygems/specification.rb +252 -309
- data/lib/rubygems/specification_policy.rb +120 -67
- data/lib/rubygems/specification_record.rb +212 -0
- data/lib/rubygems/stub_specification.rb +48 -22
- data/lib/rubygems/text.rb +1 -2
- data/lib/rubygems/uninstaller.rb +52 -32
- data/lib/rubygems/update_suggestion.rb +6 -19
- data/lib/rubygems/uri.rb +6 -6
- data/lib/rubygems/uri_formatter.rb +1 -1
- data/lib/rubygems/user_interaction.rb +23 -27
- data/lib/rubygems/util/licenses.rb +297 -35
- data/lib/rubygems/util/list.rb +4 -1
- data/lib/rubygems/util.rb +9 -6
- data/lib/rubygems/validator.rb +11 -10
- data/lib/rubygems/vendor/molinillo/.document +1 -0
- data/lib/rubygems/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +57 -0
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/delegates/specification_provider.rb +11 -11
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/action.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/log.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/set_payload.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/tag.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/vertex.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph.rb +2 -2
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/errors.rb +1 -1
- data/lib/rubygems/vendor/molinillo/lib/molinillo/gem_metadata.rb +6 -0
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/modules/specification_provider.rb +2 -2
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/modules/ui.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/resolution.rb +4 -4
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/resolver.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/state.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo.rb +2 -2
- data/lib/rubygems/vendor/net-http/.document +1 -0
- data/lib/rubygems/vendor/net-http/LICENSE.txt +22 -0
- data/lib/rubygems/vendor/net-http/lib/net/http/backward.rb +40 -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 +425 -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 +2496 -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/LICENSE.txt +22 -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/lib/optparse/uri.rb +7 -0
- data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse.rb +49 -27
- data/lib/rubygems/vendor/resolv/.document +1 -0
- data/lib/rubygems/vendor/resolv/LICENSE.txt +22 -0
- data/lib/rubygems/vendor/resolv/lib/resolv.rb +3442 -0
- data/lib/rubygems/vendor/securerandom/.document +1 -0
- data/lib/rubygems/vendor/securerandom/LICENSE.txt +22 -0
- data/lib/rubygems/vendor/securerandom/lib/random/formatter.rb +373 -0
- data/lib/rubygems/vendor/securerandom/lib/securerandom.rb +96 -0
- data/lib/rubygems/vendor/timeout/.document +1 -0
- data/lib/rubygems/vendor/timeout/LICENSE.txt +22 -0
- data/lib/rubygems/vendor/timeout/lib/timeout.rb +199 -0
- data/lib/rubygems/vendor/tsort/.document +1 -0
- data/lib/rubygems/vendor/tsort/LICENSE.txt +22 -0
- data/lib/rubygems/{tsort → vendor/tsort}/lib/tsort.rb +5 -2
- data/lib/rubygems/vendor/uri/.document +1 -0
- data/lib/rubygems/vendor/uri/LICENSE.txt +22 -0
- data/lib/rubygems/vendor/uri/lib/uri/common.rb +855 -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 +1588 -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 +539 -0
- data/lib/rubygems/vendor/uri/lib/uri/rfc3986_parser.rb +183 -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/lib/rubygems/vendored_molinillo.rb +3 -0
- data/lib/rubygems/vendored_net_http.rb +5 -0
- data/lib/rubygems/vendored_optparse.rb +3 -0
- data/lib/rubygems/vendored_securerandom.rb +4 -0
- data/lib/rubygems/vendored_timeout.rb +5 -0
- data/lib/rubygems/vendored_tsort.rb +3 -0
- data/lib/rubygems/version.rb +38 -31
- data/lib/rubygems/version_option.rb +3 -5
- data/lib/rubygems/yaml_serializer.rb +98 -0
- data/lib/rubygems.rb +99 -72
- data/rubygems-update.gemspec +15 -8
- data/setup.rb +4 -1
- metadata +169 -267
- 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/lib/molinillo/delegates/resolution_state.rb +0 -57
- data/lib/rubygems/resolver/molinillo/lib/molinillo/gem_metadata.rb +0 -6
- data/lib/rubygems/resolver/molinillo.rb +0 -2
- 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/bundler_test_gem.rb +0 -419
- data/test/rubygems/ca_cert.pem +0 -77
- data/test/rubygems/child_cert.pem +0 -19
- data/test/rubygems/child_cert_32.pem +0 -19
- 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/fake_certlib/openssl.rb +0 -8
- 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 -19
- data/test/rubygems/grandchild_cert_32.pem +0 -19
- data/test/rubygems/grandchild_key.pem +0 -27
- data/test/rubygems/helper.rb +0 -1629
- 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 -19
- data/test/rubygems/invalidchild_cert_32.pem +0 -19
- data/test/rubygems/invalidchild_key.pem +0 -27
- data/test/rubygems/package/tar_test_case.rb +0 -174
- data/test/rubygems/packages/Bluebie-legs-0.6.2.gem +0 -0
- 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 -17
- data/test/rubygems/test_gem.rb +0 -1766
- data/test/rubygems/test_gem_available_set.rb +0 -129
- data/test/rubygems/test_gem_bundler_version_finder.rb +0 -126
- data/test/rubygems/test_gem_command.rb +0 -400
- data/test/rubygems/test_gem_command_manager.rb +0 -399
- data/test/rubygems/test_gem_commands_build_command.rb +0 -737
- data/test/rubygems/test_gem_commands_cert_command.rb +0 -865
- 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_exec_command.rb +0 -851
- 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 -69
- data/test/rubygems/test_gem_commands_install_command.rb +0 -1572
- 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 -407
- data/test/rubygems/test_gem_commands_pristine_command.rb +0 -707
- data/test/rubygems/test_gem_commands_push_command.rb +0 -498
- 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 -474
- data/test/rubygems/test_gem_commands_signin_command.rb +0 -258
- data/test/rubygems/test_gem_commands_signout_command.rb +0 -30
- data/test/rubygems/test_gem_commands_sources_command.rb +0 -533
- 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 -521
- 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 -516
- data/test/rubygems/test_gem_dependency.rb +0 -397
- 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 -336
- data/test/rubygems/test_gem_ext_cargo_builder/custom_name/.gitignore +0 -1
- data/test/rubygems/test_gem_ext_cargo_builder/custom_name/custom_name.gemspec +0 -8
- data/test/rubygems/test_gem_ext_cargo_builder/custom_name/ext/custom_name_lib/Cargo.lock +0 -233
- data/test/rubygems/test_gem_ext_cargo_builder/custom_name/ext/custom_name_lib/Cargo.toml +0 -10
- data/test/rubygems/test_gem_ext_cargo_builder/custom_name/ext/custom_name_lib/src/lib.rs +0 -27
- data/test/rubygems/test_gem_ext_cargo_builder/custom_name/lib/custom_name.rb +0 -1
- 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 -247
- 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/rust_ruby_example.gemspec +0 -8
- data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/src/lib.rs +0 -51
- data/test/rubygems/test_gem_ext_cargo_builder.rb +0 -166
- 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 -60
- 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 -229
- data/test/rubygems/test_gem_ext_rake_builder.rb +0 -112
- data/test/rubygems/test_gem_gem_runner.rb +0 -118
- data/test/rubygems/test_gem_gemcutter_utilities.rb +0 -276
- data/test/rubygems/test_gem_impossible_dependencies_error.rb +0 -59
- data/test/rubygems/test_gem_indexer.rb +0 -380
- data/test/rubygems/test_gem_install_update_options.rb +0 -207
- data/test/rubygems/test_gem_installer.rb +0 -2463
- 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 -1190
- 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 -134
- data/test/rubygems/test_gem_package_tar_reader_entry.rb +0 -297
- 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 -496
- 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 -845
- 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 -504
- data/test/rubygems/test_gem_resolver.rb +0 -858
- 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 -319
- 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 -122
- 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 -309
- 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 -3811
- 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_update_suggestion.rb +0 -208
- 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 -302
- data/test/rubygems/test_gem_version_option.rb +0 -164
- data/test/rubygems/test_kernel.rb +0 -123
- 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 -733
- data/test/rubygems/test_rubygems.rb +0 -74
- data/test/rubygems/utilities.rb +0 -393
- 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/tsort → bundler/lib/bundler/vendor/securerandom}/LICENSE.txt +0 -0
- /data/lib/rubygems/{resolver → vendor}/molinillo/LICENSE +0 -0
- /data/lib/rubygems/{optparse → vendor/optparse}/COPYING +0 -0
- /data/lib/rubygems/{optparse → vendor/optparse}/lib/optionparser.rb +0 -0
- /data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/ac.rb +0 -0
- /data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/date.rb +0 -0
- /data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/kwargs.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/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/version.rb +0 -0
@@ -1,215 +1,143 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.
|
4
|
-
.TH "GEMFILE" "5" "February 2023" "" ""
|
5
|
-
.
|
1
|
+
.\" generated with nRonn/v0.11.1
|
2
|
+
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
+
.TH "GEMFILE" "5" "September 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
12
|
.SH "GLOBAL SOURCE"
|
19
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\.
|
20
|
-
.
|
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
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\.
|
33
|
-
.
|
34
21
|
.P
|
35
22
|
To use more than one source of RubyGems, you should use \fI\fBsource\fR block\fR\.
|
36
|
-
.
|
37
23
|
.P
|
38
24
|
A source is checked for gems following the heuristics described in \fISOURCE PRIORITY\fR\.
|
39
|
-
.
|
40
25
|
.P
|
41
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\.
|
42
|
-
.
|
43
27
|
.SS "CREDENTIALS"
|
44
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\.
|
45
|
-
.
|
46
29
|
.IP "" 4
|
47
|
-
.
|
48
30
|
.nf
|
49
|
-
|
50
31
|
bundle config gems\.example\.com user:password
|
51
|
-
.
|
52
32
|
.fi
|
53
|
-
.
|
54
33
|
.IP "" 0
|
55
|
-
.
|
56
34
|
.P
|
57
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\.
|
58
|
-
.
|
59
36
|
.IP "" 4
|
60
|
-
.
|
61
37
|
.nf
|
62
|
-
|
63
38
|
source "https://user:password@gems\.example\.com"
|
64
|
-
.
|
65
39
|
.fi
|
66
|
-
.
|
67
40
|
.IP "" 0
|
68
|
-
.
|
69
41
|
.P
|
70
42
|
Credentials in the source URL will take precedence over credentials set using \fBconfig\fR\.
|
71
|
-
.
|
72
43
|
.SH "RUBY"
|
73
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\.
|
74
|
-
.
|
75
45
|
.SS "VERSION (required)"
|
76
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\.
|
77
|
-
.
|
78
47
|
.IP "" 4
|
79
|
-
.
|
80
48
|
.nf
|
81
|
-
|
82
49
|
ruby "3\.1\.2"
|
83
|
-
.
|
84
50
|
.fi
|
85
|
-
.
|
86
51
|
.IP "" 0
|
87
|
-
.
|
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"
|
57
|
+
.fi
|
58
|
+
.IP "" 0
|
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
|
88
66
|
.SS "ENGINE"
|
89
67
|
Each application \fImay\fR specify a Ruby engine\. If an engine is specified, an engine version \fImust\fR also be specified\.
|
90
|
-
.
|
91
68
|
.P
|
92
|
-
What exactly is an Engine?
|
93
|
-
.
|
69
|
+
What exactly is an Engine?
|
70
|
+
.IP "\(bu" 4
|
71
|
+
A Ruby engine is an implementation of the Ruby language\.
|
94
72
|
.IP "\(bu" 4
|
95
|
-
For background: the reference or original implementation of the Ruby programming language is called Matz
|
96
|
-
.
|
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\.
|
97
74
|
.IP "\(bu" 4
|
98
|
-
Other implementations \fIhttps://www\.ruby\-lang\.org/en/about/\fR of Ruby exist\. Some of the more well\-known implementations include JRuby \
|
99
|
-
.
|
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\.
|
100
76
|
.IP "" 0
|
101
|
-
.
|
102
77
|
.SS "ENGINE VERSION"
|
103
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\.
|
104
|
-
.
|
105
79
|
.IP "" 4
|
106
|
-
.
|
107
80
|
.nf
|
108
|
-
|
109
81
|
ruby "2\.6\.8", engine: "jruby", engine_version: "9\.3\.8\.0"
|
110
|
-
.
|
111
82
|
.fi
|
112
|
-
.
|
113
83
|
.IP "" 0
|
114
|
-
.
|
115
84
|
.SS "PATCHLEVEL"
|
116
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\.
|
117
|
-
.
|
118
86
|
.P
|
119
87
|
This option was implemented in Bundler 1\.4\.0 for Ruby 2\.0 or earlier\.
|
120
|
-
.
|
121
88
|
.IP "" 4
|
122
|
-
.
|
123
89
|
.nf
|
124
|
-
|
125
90
|
ruby "3\.1\.2", patchlevel: "20"
|
126
|
-
.
|
127
91
|
.fi
|
128
|
-
.
|
129
92
|
.IP "" 0
|
130
|
-
.
|
131
93
|
.SH "GEMS"
|
132
94
|
Specify gem requirements using the \fBgem\fR method, with the following arguments\. All parameters are \fBOPTIONAL\fR unless otherwise specified\.
|
133
|
-
.
|
134
95
|
.SS "NAME (required)"
|
135
96
|
For each gem requirement, list a single \fIgem\fR line\.
|
136
|
-
.
|
137
97
|
.IP "" 4
|
138
|
-
.
|
139
98
|
.nf
|
140
|
-
|
141
99
|
gem "nokogiri"
|
142
|
-
.
|
143
100
|
.fi
|
144
|
-
.
|
145
101
|
.IP "" 0
|
146
|
-
.
|
147
102
|
.SS "VERSION"
|
148
103
|
Each \fIgem\fR \fBMAY\fR have one or more version specifiers\.
|
149
|
-
.
|
150
104
|
.IP "" 4
|
151
|
-
.
|
152
105
|
.nf
|
153
|
-
|
154
106
|
gem "nokogiri", ">= 1\.4\.2"
|
155
107
|
gem "RedCloth", ">= 4\.1\.0", "< 4\.2\.0"
|
156
|
-
.
|
157
108
|
.fi
|
158
|
-
.
|
159
109
|
.IP "" 0
|
160
|
-
.
|
161
110
|
.SS "REQUIRE AS"
|
162
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\.
|
163
|
-
.
|
164
112
|
.IP "" 4
|
165
|
-
.
|
166
113
|
.nf
|
167
|
-
|
168
114
|
gem "redis", require: ["redis/connection/hiredis", "redis"]
|
169
115
|
gem "webmock", require: false
|
170
116
|
gem "byebug", require: true
|
171
|
-
.
|
172
117
|
.fi
|
173
|
-
.
|
174
118
|
.IP "" 0
|
175
|
-
.
|
176
119
|
.P
|
177
120
|
The argument defaults to the name of the gem\. For example, these are identical:
|
178
|
-
.
|
179
121
|
.IP "" 4
|
180
|
-
.
|
181
122
|
.nf
|
182
|
-
|
183
123
|
gem "nokogiri"
|
184
124
|
gem "nokogiri", require: "nokogiri"
|
185
125
|
gem "nokogiri", require: true
|
186
|
-
.
|
187
126
|
.fi
|
188
|
-
.
|
189
127
|
.IP "" 0
|
190
|
-
.
|
191
128
|
.SS "GROUPS"
|
192
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\.
|
193
|
-
.
|
194
130
|
.IP "" 4
|
195
|
-
.
|
196
131
|
.nf
|
197
|
-
|
198
132
|
gem "rspec", group: :test
|
199
133
|
gem "wirble", groups: [:development, :test]
|
200
|
-
.
|
201
134
|
.fi
|
202
|
-
.
|
203
135
|
.IP "" 0
|
204
|
-
.
|
205
136
|
.P
|
206
137
|
The Bundler runtime allows its two main methods, \fBBundler\.setup\fR and \fBBundler\.require\fR, to limit their impact to particular groups\.
|
207
|
-
.
|
208
138
|
.IP "" 4
|
209
|
-
.
|
210
139
|
.nf
|
211
|
-
|
212
|
-
# setup adds gems to Ruby\'s load path
|
140
|
+
# setup adds gems to Ruby's load path
|
213
141
|
Bundler\.setup # defaults to all groups
|
214
142
|
require "bundler/setup" # same as Bundler\.setup
|
215
143
|
Bundler\.setup(:default) # only set up the _default_ group
|
@@ -221,429 +149,271 @@ Bundler\.require # defaults to the _default_ group
|
|
221
149
|
Bundler\.require(:default) # identical
|
222
150
|
Bundler\.require(:default, :test) # requires the _default_ and _test_ groups
|
223
151
|
Bundler\.require(:test) # requires the _test_ group
|
224
|
-
.
|
225
152
|
.fi
|
226
|
-
.
|
227
153
|
.IP "" 0
|
228
|
-
.
|
229
154
|
.P
|
230
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\.
|
231
|
-
.
|
232
156
|
.P
|
233
157
|
To specify multiple groups to ignore, specify a list of groups separated by spaces\.
|
234
|
-
.
|
235
158
|
.IP "" 4
|
236
|
-
.
|
237
159
|
.nf
|
238
|
-
|
239
160
|
bundle config set \-\-local without test
|
240
161
|
bundle config set \-\-local without development test
|
241
|
-
.
|
242
162
|
.fi
|
243
|
-
.
|
244
163
|
.IP "" 0
|
245
|
-
.
|
246
164
|
.P
|
247
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)\.
|
248
|
-
.
|
249
166
|
.P
|
250
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\.
|
251
|
-
.
|
252
168
|
.SS "PLATFORMS"
|
253
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\.
|
254
|
-
.
|
255
170
|
.P
|
256
171
|
There are a number of \fBGemfile\fR platforms:
|
257
|
-
.
|
258
172
|
.TP
|
259
173
|
\fBruby\fR
|
260
174
|
C Ruby (MRI), Rubinius, or TruffleRuby, but not Windows
|
261
|
-
.
|
262
175
|
.TP
|
263
176
|
\fBmri\fR
|
264
177
|
C Ruby (MRI) only, but not Windows
|
265
|
-
.
|
266
178
|
.TP
|
267
179
|
\fBwindows\fR
|
268
180
|
Windows C Ruby (MRI), including RubyInstaller 32\-bit and 64\-bit versions
|
269
|
-
.
|
270
181
|
.TP
|
271
182
|
\fBmswin\fR
|
272
183
|
Windows C Ruby (MRI), including RubyInstaller 32\-bit versions
|
273
|
-
.
|
274
184
|
.TP
|
275
185
|
\fBmswin64\fR
|
276
186
|
Windows C Ruby (MRI), including RubyInstaller 64\-bit versions
|
277
|
-
.
|
278
187
|
.TP
|
279
188
|
\fBrbx\fR
|
280
189
|
Rubinius
|
281
|
-
.
|
282
190
|
.TP
|
283
191
|
\fBjruby\fR
|
284
192
|
JRuby
|
285
|
-
.
|
286
193
|
.TP
|
287
194
|
\fBtruffleruby\fR
|
288
195
|
TruffleRuby
|
289
|
-
.
|
290
196
|
.P
|
291
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:
|
292
|
-
.
|
293
198
|
.IP "" 4
|
294
|
-
.
|
295
199
|
.nf
|
296
|
-
|
297
200
|
ruby_31
|
298
|
-
.
|
299
201
|
.fi
|
300
|
-
.
|
301
202
|
.IP "" 0
|
302
|
-
.
|
303
203
|
.P
|
304
204
|
As with groups (above), you may specify one or more platforms:
|
305
|
-
.
|
306
205
|
.IP "" 4
|
307
|
-
.
|
308
206
|
.nf
|
309
|
-
|
310
207
|
gem "weakling", platforms: :jruby
|
311
208
|
gem "ruby\-debug", platforms: :mri_31
|
312
209
|
gem "nokogiri", platforms: [:windows_31, :jruby]
|
313
|
-
.
|
314
210
|
.fi
|
315
|
-
.
|
316
211
|
.IP "" 0
|
317
|
-
.
|
318
212
|
.P
|
319
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\.
|
320
|
-
.
|
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\.
|
321
221
|
.SS "FORCE_RUBY_PLATFORM"
|
322
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:
|
323
|
-
.
|
324
223
|
.IP "" 4
|
325
|
-
.
|
326
224
|
.nf
|
327
|
-
|
328
225
|
gem "ffi", force_ruby_platform: true
|
329
|
-
.
|
330
226
|
.fi
|
331
|
-
.
|
332
227
|
.IP "" 0
|
333
|
-
.
|
334
228
|
.P
|
335
229
|
This can be handy (assuming the pure ruby variant works fine) when:
|
336
|
-
.
|
337
230
|
.IP "\(bu" 4
|
338
|
-
You
|
339
|
-
.
|
231
|
+
You're having issues with the platform specific variant\.
|
340
232
|
.IP "\(bu" 4
|
341
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\.
|
342
|
-
.
|
343
234
|
.IP "" 0
|
344
|
-
.
|
345
235
|
.SS "SOURCE"
|
346
|
-
You can select an alternate RubyGems repository for a gem using the
|
347
|
-
.
|
236
|
+
You can select an alternate RubyGems repository for a gem using the ':source' option\.
|
348
237
|
.IP "" 4
|
349
|
-
.
|
350
238
|
.nf
|
351
|
-
|
352
239
|
gem "some_internal_gem", source: "https://gems\.example\.com"
|
353
|
-
.
|
354
240
|
.fi
|
355
|
-
.
|
356
241
|
.IP "" 0
|
357
|
-
.
|
358
242
|
.P
|
359
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\.
|
360
|
-
.
|
361
244
|
.P
|
362
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\.
|
363
|
-
.
|
364
246
|
.P
|
365
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\.
|
366
|
-
.
|
367
248
|
.P
|
368
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\.
|
369
|
-
.
|
370
250
|
.SS "GIT"
|
371
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:
|
372
|
-
.
|
373
252
|
.TP
|
374
253
|
\fBHTTP(S)\fR
|
375
254
|
gem "rails", git: "https://github\.com/rails/rails\.git"
|
376
|
-
.
|
377
255
|
.TP
|
378
256
|
\fBSSH\fR
|
379
257
|
gem "rails", git: "git@github\.com:rails/rails\.git"
|
380
|
-
.
|
381
258
|
.TP
|
382
259
|
\fBgit\fR
|
383
260
|
gem "rails", git: "git://github\.com/rails/rails\.git"
|
384
|
-
.
|
385
261
|
.P
|
386
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\.
|
387
|
-
.
|
388
263
|
.P
|
389
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\.
|
390
|
-
.
|
391
265
|
.P
|
392
266
|
The \fBgroup\fR, \fBplatforms\fR, and \fBrequire\fR options are available and behave exactly the same as they would for a normal gem\.
|
393
|
-
.
|
394
267
|
.P
|
395
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\.
|
396
|
-
.
|
397
269
|
.P
|
398
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\.
|
399
|
-
.
|
400
271
|
.P
|
401
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\.
|
402
|
-
.
|
403
273
|
.IP "" 4
|
404
|
-
.
|
405
274
|
.nf
|
406
|
-
|
407
275
|
gem "rails", "2\.3\.8", git: "https://github\.com/rails/rails\.git"
|
408
276
|
# bundle install will fail, because the \.gemspec in the rails
|
409
|
-
# repository
|
410
|
-
.
|
277
|
+
# repository's master branch specifies version 3\.0\.0
|
411
278
|
.fi
|
412
|
-
.
|
413
279
|
.IP "" 0
|
414
|
-
.
|
415
280
|
.P
|
416
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\.
|
417
|
-
.
|
418
282
|
.P
|
419
283
|
Git repositories support a number of additional options\.
|
420
|
-
.
|
421
284
|
.TP
|
422
285
|
\fBbranch\fR, \fBtag\fR, and \fBref\fR
|
423
286
|
You \fBMUST\fR only specify at most one of these options\. The default is \fBbranch: "master"\fR\. For example:
|
424
|
-
.
|
425
287
|
.IP
|
426
288
|
gem "rails", git: "https://github\.com/rails/rails\.git", branch: "5\-0\-stable"
|
427
|
-
.
|
428
289
|
.IP
|
429
290
|
gem "rails", git: "https://github\.com/rails/rails\.git", tag: "v5\.0\.0"
|
430
|
-
.
|
431
291
|
.IP
|
432
292
|
gem "rails", git: "https://github\.com/rails/rails\.git", ref: "4aded"
|
433
|
-
.
|
434
293
|
.TP
|
435
294
|
\fBsubmodules\fR
|
436
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
|
437
|
-
.
|
438
296
|
.P
|
439
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\.
|
440
|
-
.
|
441
298
|
.IP "" 4
|
442
|
-
.
|
443
299
|
.nf
|
444
|
-
|
445
300
|
|~rails [git root]
|
446
301
|
| |\-rails\.gemspec [rails gem located here]
|
447
302
|
|~actionpack
|
448
303
|
| |\-actionpack\.gemspec [actionpack gem located here]
|
449
304
|
|~activesupport
|
450
305
|
| |\-activesupport\.gemspec [activesupport gem located here]
|
451
|
-
|
452
|
-
.
|
306
|
+
|\|\.\|\.\|\.
|
453
307
|
.fi
|
454
|
-
.
|
455
308
|
.IP "" 0
|
456
|
-
.
|
457
309
|
.P
|
458
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\.
|
459
|
-
.
|
460
311
|
.SS "GIT SOURCE"
|
461
|
-
A custom git source can be defined via the \fBgit_source\fR method\. Provide the source
|
462
|
-
.
|
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:
|
463
313
|
.IP "" 4
|
464
|
-
.
|
465
314
|
.nf
|
466
|
-
|
467
315
|
git_source(:stash){ |repo_name| "https://stash\.corp\.acme\.pl/#{repo_name}\.git" }
|
468
|
-
gem
|
469
|
-
.
|
316
|
+
gem 'rails', stash: 'forks/rails'
|
470
317
|
.fi
|
471
|
-
.
|
472
318
|
.IP "" 0
|
473
|
-
.
|
474
319
|
.P
|
475
320
|
In addition, if you wish to choose a specific branch:
|
476
|
-
.
|
477
321
|
.IP "" 4
|
478
|
-
.
|
479
322
|
.nf
|
480
|
-
|
481
323
|
gem "rails", stash: "forks/rails", branch: "branch_name"
|
482
|
-
.
|
483
324
|
.fi
|
484
|
-
.
|
485
325
|
.IP "" 0
|
486
|
-
.
|
487
326
|
.SS "GITHUB"
|
488
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\.
|
489
|
-
.
|
490
328
|
.P
|
491
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\.
|
492
|
-
.
|
493
330
|
.IP "" 4
|
494
|
-
.
|
495
331
|
.nf
|
496
|
-
|
497
332
|
gem "rails", github: "rails/rails"
|
498
333
|
gem "rails", github: "rails"
|
499
|
-
.
|
500
334
|
.fi
|
501
|
-
.
|
502
335
|
.IP "" 0
|
503
|
-
.
|
504
336
|
.P
|
505
337
|
Are both equivalent to
|
506
|
-
.
|
507
338
|
.IP "" 4
|
508
|
-
.
|
509
339
|
.nf
|
510
|
-
|
511
340
|
gem "rails", git: "https://github\.com/rails/rails\.git"
|
512
|
-
.
|
513
341
|
.fi
|
514
|
-
.
|
515
342
|
.IP "" 0
|
516
|
-
.
|
517
343
|
.P
|
518
344
|
Since the \fBgithub\fR method is a specialization of \fBgit_source\fR, it accepts a \fB:branch\fR named argument\.
|
519
|
-
.
|
520
345
|
.P
|
521
346
|
You can also directly pass a pull request URL:
|
522
|
-
.
|
523
347
|
.IP "" 4
|
524
|
-
.
|
525
348
|
.nf
|
526
|
-
|
527
349
|
gem "rails", github: "https://github\.com/rails/rails/pull/43753"
|
528
|
-
.
|
529
350
|
.fi
|
530
|
-
.
|
531
351
|
.IP "" 0
|
532
|
-
.
|
533
352
|
.P
|
534
353
|
Which is equivalent to:
|
535
|
-
.
|
536
354
|
.IP "" 4
|
537
|
-
.
|
538
355
|
.nf
|
539
|
-
|
540
356
|
gem "rails", github: "rails/rails", branch: "refs/pull/43753/head"
|
541
|
-
.
|
542
357
|
.fi
|
543
|
-
.
|
544
358
|
.IP "" 0
|
545
|
-
.
|
546
359
|
.SS "GIST"
|
547
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")\.
|
548
|
-
.
|
549
361
|
.IP "" 4
|
550
|
-
.
|
551
362
|
.nf
|
552
|
-
|
553
363
|
gem "the_hatch", gist: "4815162342"
|
554
|
-
.
|
555
364
|
.fi
|
556
|
-
.
|
557
365
|
.IP "" 0
|
558
|
-
.
|
559
366
|
.P
|
560
367
|
Is equivalent to:
|
561
|
-
.
|
562
368
|
.IP "" 4
|
563
|
-
.
|
564
369
|
.nf
|
565
|
-
|
566
370
|
gem "the_hatch", git: "https://gist\.github\.com/4815162342\.git"
|
567
|
-
.
|
568
371
|
.fi
|
569
|
-
.
|
570
372
|
.IP "" 0
|
571
|
-
.
|
572
373
|
.P
|
573
374
|
Since the \fBgist\fR method is a specialization of \fBgit_source\fR, it accepts a \fB:branch\fR named argument\.
|
574
|
-
.
|
575
375
|
.SS "BITBUCKET"
|
576
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\.
|
577
|
-
.
|
578
377
|
.IP "" 4
|
579
|
-
.
|
580
378
|
.nf
|
581
|
-
|
582
379
|
gem "rails", bitbucket: "rails/rails"
|
583
380
|
gem "rails", bitbucket: "rails"
|
584
|
-
.
|
585
381
|
.fi
|
586
|
-
.
|
587
382
|
.IP "" 0
|
588
|
-
.
|
589
383
|
.P
|
590
384
|
Are both equivalent to
|
591
|
-
.
|
592
385
|
.IP "" 4
|
593
|
-
.
|
594
386
|
.nf
|
595
|
-
|
596
387
|
gem "rails", git: "https://rails@bitbucket\.org/rails/rails\.git"
|
597
|
-
.
|
598
388
|
.fi
|
599
|
-
.
|
600
389
|
.IP "" 0
|
601
|
-
.
|
602
390
|
.P
|
603
391
|
Since the \fBbitbucket\fR method is a specialization of \fBgit_source\fR, it accepts a \fB:branch\fR named argument\.
|
604
|
-
.
|
605
392
|
.SS "PATH"
|
606
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\.
|
607
|
-
.
|
608
394
|
.P
|
609
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\.
|
610
|
-
.
|
611
396
|
.P
|
612
397
|
Unlike \fB:git\fR, bundler does not compile C extensions for gems specified as paths\.
|
613
|
-
.
|
614
398
|
.IP "" 4
|
615
|
-
.
|
616
399
|
.nf
|
617
|
-
|
618
400
|
gem "rails", path: "vendor/rails"
|
619
|
-
.
|
620
401
|
.fi
|
621
|
-
.
|
622
402
|
.IP "" 0
|
623
|
-
.
|
624
403
|
.P
|
625
|
-
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
|
626
|
-
.
|
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\.
|
627
405
|
.IP "" 4
|
628
|
-
.
|
629
406
|
.nf
|
630
|
-
|
631
|
-
|
632
|
-
gem
|
633
|
-
gem \'public_ui\'
|
407
|
+
path 'components' do
|
408
|
+
gem 'admin_ui'
|
409
|
+
gem 'public_ui'
|
634
410
|
end
|
635
|
-
.
|
636
411
|
.fi
|
637
|
-
.
|
638
412
|
.IP "" 0
|
639
|
-
.
|
640
413
|
.SH "BLOCK FORM OF SOURCE, GIT, PATH, GROUP and PLATFORMS"
|
641
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\.
|
642
|
-
.
|
643
415
|
.IP "" 4
|
644
|
-
.
|
645
416
|
.nf
|
646
|
-
|
647
417
|
source "https://gems\.example\.com" do
|
648
418
|
gem "some_internal_gem"
|
649
419
|
gem "another_internal_gem"
|
@@ -663,61 +433,40 @@ group :development, optional: true do
|
|
663
433
|
gem "wirble"
|
664
434
|
gem "faker"
|
665
435
|
end
|
666
|
-
.
|
667
436
|
.fi
|
668
|
-
.
|
669
437
|
.IP "" 0
|
670
|
-
.
|
671
438
|
.P
|
672
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\.
|
673
|
-
.
|
674
440
|
.P
|
675
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\.
|
676
|
-
.
|
677
442
|
.P
|
678
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\.
|
679
|
-
.
|
680
444
|
.SH "INSTALL_IF"
|
681
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\.
|
682
|
-
.
|
683
446
|
.IP "" 4
|
684
|
-
.
|
685
447
|
.nf
|
686
|
-
|
687
448
|
install_if \-> { RUBY_PLATFORM =~ /darwin/ } do
|
688
449
|
gem "pasteboard"
|
689
450
|
end
|
690
|
-
.
|
691
451
|
.fi
|
692
|
-
.
|
693
452
|
.IP "" 0
|
694
|
-
.
|
695
453
|
.SH "GEMSPEC"
|
696
|
-
The \fB\.gemspec\fR \
|
697
|
-
.
|
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\.
|
698
455
|
.P
|
699
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\.
|
700
|
-
.
|
701
457
|
.P
|
702
|
-
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:
|
703
|
-
.
|
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\.
|
704
459
|
.P
|
705
|
-
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:
|
706
|
-
.
|
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\.
|
707
461
|
.P
|
708
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\.
|
709
|
-
.
|
710
463
|
.SH "SOURCE PRIORITY"
|
711
464
|
When attempting to locate a gem to satisfy a gem requirement, bundler uses the following priority order:
|
712
|
-
.
|
713
465
|
.IP "1." 4
|
714
466
|
The source explicitly attached to the gem (using \fB:source\fR, \fB:path\fR, or \fB:git\fR)
|
715
|
-
.
|
716
467
|
.IP "2." 4
|
717
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
|
718
|
-
.
|
719
469
|
.IP "3." 4
|
720
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\.
|
721
|
-
.
|
722
471
|
.IP "" 0
|
723
472
|
|