rubygems-update 3.1.6 → 3.2.0.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CODE_OF_CONDUCT.md +55 -19
- data/CONTRIBUTING.md +1 -2
- data/History.txt +122 -14
- data/Manifest.txt +13 -25
- data/POLICIES.md +2 -9
- data/README.md +1 -1
- data/Rakefile +31 -33
- data/bin/update_rubygems +1 -1
- data/bundler/CHANGELOG.md +806 -741
- data/bundler/README.md +6 -8
- data/bundler/UPGRADING.md +16 -30
- data/bundler/bundler.gemspec +3 -3
- data/bundler/exe/bundle +3 -0
- data/bundler/lib/bundler.rb +15 -4
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli.rb +32 -11
- data/bundler/lib/bundler/cli/console.rb +1 -1
- data/bundler/lib/bundler/cli/gem.rb +83 -10
- data/bundler/lib/bundler/cli/info.rb +13 -3
- data/bundler/lib/bundler/cli/init.rb +1 -1
- data/bundler/lib/bundler/cli/install.rb +5 -14
- data/bundler/lib/bundler/cli/issue.rb +2 -2
- data/bundler/lib/bundler/cli/list.rb +11 -9
- data/bundler/lib/bundler/cli/outdated.rb +88 -65
- data/bundler/lib/bundler/cli/plugin.rb +10 -0
- data/bundler/lib/bundler/cli/pristine.rb +5 -0
- data/bundler/lib/bundler/definition.rb +32 -32
- data/bundler/lib/bundler/dependency.rb +0 -9
- data/bundler/lib/bundler/dsl.rb +1 -5
- data/bundler/lib/bundler/environment_preserver.rb +26 -2
- data/bundler/lib/bundler/errors.rb +1 -0
- data/bundler/lib/bundler/feature_flag.rb +0 -2
- data/bundler/lib/bundler/fetcher.rb +1 -0
- data/bundler/lib/bundler/friendly_errors.rb +4 -10
- data/bundler/lib/bundler/gem_helper.rb +17 -10
- data/bundler/lib/bundler/gem_version_promoter.rb +1 -1
- data/bundler/lib/bundler/injector.rb +14 -3
- data/bundler/lib/bundler/inline.rb +1 -1
- data/bundler/lib/bundler/installer.rb +29 -28
- data/bundler/lib/bundler/installer/gem_installer.rb +2 -2
- data/bundler/lib/bundler/installer/parallel_installer.rb +9 -9
- data/bundler/lib/bundler/lazy_specification.rb +16 -3
- data/bundler/lib/bundler/plugin.rb +26 -0
- data/bundler/lib/bundler/plugin/index.rb +9 -0
- data/bundler/lib/bundler/psyched_yaml.rb +0 -15
- data/bundler/lib/bundler/remote_specification.rb +4 -1
- data/bundler/lib/bundler/resolver.rb +31 -8
- data/bundler/lib/bundler/resolver/spec_group.rb +26 -5
- data/bundler/lib/bundler/rubygems_ext.rb +7 -8
- data/bundler/lib/bundler/rubygems_gem_installer.rb +1 -7
- data/bundler/lib/bundler/rubygems_integration.rb +3 -48
- data/bundler/lib/bundler/runtime.rb +2 -12
- data/bundler/lib/bundler/settings.rb +0 -3
- data/bundler/lib/bundler/shared_helpers.rb +1 -1
- data/bundler/lib/bundler/source/git.rb +4 -4
- data/bundler/lib/bundler/source/git/git_proxy.rb +53 -58
- data/bundler/lib/bundler/source/path.rb +5 -1
- data/bundler/lib/bundler/source/path/installer.rb +7 -9
- data/bundler/lib/bundler/source/rubygems.rb +11 -14
- data/bundler/lib/bundler/stub_specification.rb +16 -4
- data/bundler/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +57 -47
- data/bundler/lib/bundler/templates/newgem/Gemfile.tt +9 -1
- data/bundler/lib/bundler/templates/newgem/Rakefile.tt +19 -5
- data/bundler/lib/bundler/templates/newgem/bin/console.tt +2 -0
- data/bundler/lib/bundler/templates/newgem/circleci/config.yml.tt +13 -0
- data/bundler/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt +2 -0
- data/bundler/lib/bundler/templates/newgem/github/workflows/main.yml.tt +18 -0
- data/bundler/lib/bundler/templates/newgem/gitlab-ci.yml.tt +9 -0
- data/bundler/lib/bundler/templates/newgem/lib/newgem.rb.tt +2 -0
- data/bundler/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +2 -0
- data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +6 -4
- data/bundler/lib/bundler/templates/newgem/rubocop.yml.tt +10 -0
- data/bundler/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +2 -0
- data/bundler/lib/bundler/templates/newgem/spec/spec_helper.rb.tt +2 -0
- data/bundler/lib/bundler/templates/newgem/test/{newgem_test.rb.tt → minitest/newgem_test.rb.tt} +2 -0
- data/bundler/lib/bundler/templates/newgem/test/{test_helper.rb.tt → minitest/test_helper.rb.tt} +2 -0
- data/bundler/lib/bundler/templates/newgem/test/test-unit/newgem_test.rb.tt +15 -0
- data/bundler/lib/bundler/templates/newgem/test/test-unit/test_helper.rb.tt +6 -0
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +75 -189
- data/bundler/lib/bundler/vendor/thor/lib/thor.rb +0 -7
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb +2 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/base.rb +9 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
- data/bundler/lib/bundler/version.rb +1 -1
- data/bundler/man/bundle-add.1 +1 -1
- data/bundler/man/bundle-add.1.txt +15 -15
- data/bundler/man/bundle-binstubs.1 +1 -1
- data/bundler/man/bundle-binstubs.1.txt +10 -10
- data/bundler/man/bundle-cache.1 +1 -1
- data/bundler/man/bundle-cache.1.txt +15 -15
- data/bundler/man/bundle-check.1 +1 -1
- data/bundler/man/bundle-check.1.txt +8 -8
- data/bundler/man/bundle-clean.1 +1 -1
- data/bundler/man/bundle-clean.1.txt +6 -6
- data/bundler/man/bundle-config.1 +3 -9
- data/bundler/man/bundle-config.1.txt +271 -272
- data/bundler/man/bundle-config.ronn +5 -9
- data/bundler/man/bundle-doctor.1 +1 -1
- data/bundler/man/bundle-doctor.1.txt +9 -9
- data/bundler/man/bundle-exec.1 +1 -1
- data/bundler/man/bundle-exec.1.txt +84 -81
- data/bundler/man/bundle-gem.1 +25 -3
- data/bundler/man/bundle-gem.1.txt +65 -39
- data/bundler/man/bundle-gem.ronn +30 -7
- data/bundler/man/bundle-info.1 +1 -1
- data/bundler/man/bundle-info.1.txt +2 -2
- data/bundler/man/bundle-init.1 +1 -1
- data/bundler/man/bundle-init.1.txt +9 -9
- data/bundler/man/bundle-inject.1 +1 -1
- data/bundler/man/bundle-inject.1.txt +4 -4
- data/bundler/man/bundle-install.1 +1 -1
- data/bundler/man/bundle-install.1.txt +169 -169
- data/bundler/man/bundle-list.1 +7 -7
- data/bundler/man/bundle-list.1.txt +12 -11
- data/bundler/man/bundle-list.ronn +6 -6
- data/bundler/man/bundle-lock.1 +1 -1
- data/bundler/man/bundle-lock.1.txt +28 -28
- data/bundler/man/bundle-open.1 +1 -1
- data/bundler/man/bundle-open.1.txt +3 -3
- data/bundler/man/bundle-outdated.1 +1 -1
- data/bundler/man/bundle-outdated.1.txt +34 -34
- data/bundler/man/bundle-platform.1 +1 -1
- data/bundler/man/bundle-platform.1.txt +16 -16
- data/bundler/man/bundle-pristine.1 +1 -1
- data/bundler/man/bundle-pristine.1.txt +8 -8
- data/bundler/man/bundle-remove.1 +1 -1
- data/bundler/man/bundle-remove.1.txt +9 -9
- data/bundler/man/bundle-show.1 +1 -1
- data/bundler/man/bundle-show.1.txt +8 -8
- data/bundler/man/bundle-update.1 +1 -1
- data/bundler/man/bundle-update.1.txt +149 -148
- data/bundler/man/bundle-viz.1 +1 -1
- data/bundler/man/bundle-viz.1.txt +11 -11
- data/bundler/man/bundle.1 +1 -1
- data/bundler/man/bundle.1.txt +31 -31
- data/bundler/man/gemfile.5 +1 -1
- data/bundler/man/gemfile.5.txt +218 -216
- data/lib/rubygems.rb +68 -148
- data/lib/rubygems/available_set.rb +4 -4
- data/lib/rubygems/basic_specification.rb +11 -5
- data/lib/rubygems/bundler_version_finder.rb +14 -9
- data/lib/rubygems/command.rb +16 -14
- data/lib/rubygems/command_manager.rb +4 -3
- data/lib/rubygems/commands/cert_command.rb +1 -1
- data/lib/rubygems/commands/cleanup_command.rb +3 -3
- data/lib/rubygems/commands/contents_command.rb +4 -4
- data/lib/rubygems/commands/dependency_command.rb +6 -6
- data/lib/rubygems/commands/fetch_command.rb +2 -2
- data/lib/rubygems/commands/help_command.rb +1 -1
- data/lib/rubygems/commands/info_command.rb +9 -4
- data/lib/rubygems/commands/install_command.rb +3 -3
- data/lib/rubygems/commands/list_command.rb +9 -6
- data/lib/rubygems/commands/lock_command.rb +1 -1
- data/lib/rubygems/commands/open_command.rb +0 -2
- data/lib/rubygems/commands/pristine_command.rb +10 -2
- data/lib/rubygems/commands/push_command.rb +4 -42
- data/lib/rubygems/commands/query_command.rb +7 -352
- data/lib/rubygems/commands/search_command.rb +8 -6
- data/lib/rubygems/commands/setup_command.rb +128 -32
- data/lib/rubygems/commands/specification_command.rb +2 -2
- data/lib/rubygems/commands/stale_command.rb +1 -1
- data/lib/rubygems/commands/uninstall_command.rb +1 -1
- data/lib/rubygems/commands/unpack_command.rb +1 -1
- data/lib/rubygems/commands/update_command.rb +40 -10
- data/lib/rubygems/config_file.rb +11 -2
- data/lib/rubygems/core_ext/kernel_require.rb +2 -2
- data/lib/rubygems/defaults.rb +99 -5
- data/lib/rubygems/dependency.rb +2 -5
- data/lib/rubygems/dependency_installer.rb +1 -73
- data/lib/rubygems/dependency_list.rb +7 -7
- data/lib/rubygems/deprecate.rb +46 -1
- data/lib/rubygems/doctor.rb +4 -2
- data/lib/rubygems/errors.rb +3 -2
- data/lib/rubygems/exceptions.rb +2 -13
- data/lib/rubygems/ext.rb +6 -6
- data/lib/rubygems/ext/build_error.rb +2 -0
- data/lib/rubygems/ext/builder.rb +1 -1
- data/lib/rubygems/ext/cmake_builder.rb +1 -1
- data/lib/rubygems/ext/ext_conf_builder.rb +6 -7
- data/lib/rubygems/gem_runner.rb +3 -8
- data/lib/rubygems/gemcutter_utilities.rb +1 -1
- data/lib/rubygems/indexer.rb +1 -19
- data/lib/rubygems/install_update_options.rb +5 -5
- data/lib/rubygems/installer.rb +45 -42
- data/lib/rubygems/installer_test_case.rb +19 -2
- data/lib/rubygems/installer_uninstaller_utils.rb +24 -0
- data/lib/rubygems/local_remote_options.rb +1 -1
- data/lib/rubygems/name_tuple.rb +2 -4
- data/lib/rubygems/package.rb +8 -13
- data/lib/rubygems/package/old.rb +1 -1
- data/lib/rubygems/package/tar_header.rb +3 -3
- data/lib/rubygems/package/tar_reader.rb +0 -1
- data/lib/rubygems/package/tar_reader/entry.rb +0 -1
- data/lib/rubygems/package/tar_test_case.rb +1 -1
- data/lib/rubygems/package/tar_writer.rb +2 -6
- data/lib/rubygems/package_task.rb +1 -5
- data/lib/rubygems/path_support.rb +1 -1
- data/lib/rubygems/platform.rb +3 -3
- data/lib/rubygems/query_utils.rb +362 -0
- data/lib/rubygems/rdoc.rb +0 -12
- data/lib/rubygems/remote_fetcher.rb +5 -19
- data/lib/rubygems/request/connection_pools.rb +1 -1
- data/lib/rubygems/request_set.rb +5 -5
- data/lib/rubygems/request_set/gem_dependency_api.rb +1 -1
- data/lib/rubygems/request_set/lockfile.rb +8 -8
- data/lib/rubygems/request_set/lockfile/tokenizer.rb +1 -1
- data/lib/rubygems/requirement.rb +14 -15
- data/lib/rubygems/resolver.rb +7 -8
- data/lib/rubygems/resolver/api_set.rb +3 -3
- data/lib/rubygems/resolver/composed_set.rb +3 -3
- data/lib/rubygems/resolver/conflict.rb +1 -1
- data/lib/rubygems/resolver/index_set.rb +1 -1
- data/lib/rubygems/resolver/installer_set.rb +3 -3
- data/lib/rubygems/resolver/lock_set.rb +1 -1
- data/lib/rubygems/safe_yaml.rb +4 -4
- data/lib/rubygems/security.rb +25 -25
- data/lib/rubygems/security/policy.rb +3 -3
- data/lib/rubygems/security/signer.rb +4 -4
- data/lib/rubygems/security/trust_dir.rb +1 -1
- data/lib/rubygems/server.rb +8 -8
- data/lib/rubygems/source/git.rb +7 -6
- data/lib/rubygems/source/local.rb +2 -2
- data/lib/rubygems/source_list.rb +4 -5
- data/lib/rubygems/spec_fetcher.rb +18 -15
- data/lib/rubygems/specification.rb +79 -104
- data/lib/rubygems/specification_policy.rb +79 -27
- data/lib/rubygems/ssl_certs/{rubygems.org → index.rubygems.org}/GlobalSignRootCA.pem +0 -0
- data/lib/rubygems/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem +23 -0
- data/lib/rubygems/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem +25 -0
- data/lib/rubygems/test_case.rb +63 -83
- data/lib/rubygems/test_utilities.rb +6 -6
- data/lib/rubygems/uninstaller.rb +35 -14
- data/lib/rubygems/user_interaction.rb +1 -10
- data/lib/rubygems/util.rb +10 -2
- data/lib/rubygems/util/licenses.rb +4 -4
- data/lib/rubygems/validator.rb +1 -1
- data/lib/rubygems/version.rb +4 -4
- data/rubygems-update.gemspec +2 -2
- data/setup.rb +2 -7
- data/test/rubygems/specifications/bar-0.0.2.gemspec +0 -2
- data/test/rubygems/specifications/rubyforge-0.0.1.gemspec +0 -2
- data/test/rubygems/test_bundled_ca.rb +4 -12
- data/test/rubygems/test_deprecate.rb +43 -4
- data/test/rubygems/test_gem.rb +79 -74
- data/test/rubygems/test_gem_available_set.rb +3 -3
- data/test/rubygems/test_gem_bundler_version_finder.rb +19 -1
- data/test/rubygems/test_gem_command.rb +24 -3
- data/test/rubygems/test_gem_command_manager.rb +37 -4
- data/test/rubygems/test_gem_commands_build_command.rb +7 -2
- data/test/rubygems/test_gem_commands_cert_command.rb +2 -2
- data/test/rubygems/test_gem_commands_cleanup_command.rb +1 -1
- data/test/rubygems/test_gem_commands_contents_command.rb +48 -15
- data/test/rubygems/test_gem_commands_environment_command.rb +21 -21
- data/test/rubygems/test_gem_commands_generate_index_command.rb +1 -5
- data/test/rubygems/test_gem_commands_info_command.rb +6 -6
- data/test/rubygems/test_gem_commands_install_command.rb +31 -31
- data/test/rubygems/test_gem_commands_mirror.rb +1 -1
- data/test/rubygems/test_gem_commands_open_command.rb +4 -4
- data/test/rubygems/test_gem_commands_owner_command.rb +11 -3
- data/test/rubygems/test_gem_commands_pristine_command.rb +41 -8
- data/test/rubygems/test_gem_commands_push_command.rb +7 -2
- data/test/rubygems/test_gem_commands_query_command.rb +9 -5
- data/test/rubygems/test_gem_commands_setup_command.rb +160 -108
- data/test/rubygems/test_gem_commands_signin_command.rb +6 -4
- data/test/rubygems/test_gem_commands_signout_command.rb +0 -5
- data/test/rubygems/test_gem_commands_specification_command.rb +18 -18
- data/test/rubygems/test_gem_commands_uninstall_command.rb +1 -1
- data/test/rubygems/test_gem_commands_update_command.rb +68 -5
- data/test/rubygems/test_gem_commands_which_command.rb +3 -3
- data/test/rubygems/test_gem_commands_yank_command.rb +14 -6
- data/test/rubygems/test_gem_config_file.rb +7 -10
- data/test/rubygems/test_gem_dependency_installer.rb +52 -189
- data/test/rubygems/test_gem_dependency_list.rb +8 -8
- data/test/rubygems/test_gem_dependency_resolution_error.rb +1 -1
- data/test/rubygems/test_gem_doctor.rb +28 -0
- data/test/rubygems/test_gem_ext_builder.rb +14 -25
- data/test/rubygems/test_gem_ext_cmake_builder.rb +13 -12
- data/test/rubygems/test_gem_ext_configure_builder.rb +1 -9
- data/test/rubygems/test_gem_ext_ext_conf_builder.rb +0 -1
- data/test/rubygems/test_gem_ext_rake_builder.rb +9 -9
- data/test/rubygems/test_gem_gem_runner.rb +42 -0
- data/test/rubygems/test_gem_gemcutter_utilities.rb +5 -0
- data/test/rubygems/test_gem_indexer.rb +9 -13
- data/test/rubygems/test_gem_installer.rb +149 -45
- data/test/rubygems/test_gem_package.rb +13 -12
- data/test/rubygems/test_gem_package_tar_header.rb +19 -0
- data/test/rubygems/test_gem_package_tar_writer.rb +3 -3
- data/test/rubygems/test_gem_package_task.rb +46 -11
- data/test/rubygems/test_gem_remote_fetcher.rb +152 -190
- data/test/rubygems/test_gem_request.rb +11 -11
- data/test/rubygems/test_gem_request_set.rb +20 -20
- data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +3 -3
- data/test/rubygems/test_gem_request_set_lockfile_parser.rb +9 -9
- data/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb +118 -118
- data/test/rubygems/test_gem_requirement.rb +2 -2
- data/test/rubygems/test_gem_resolver.rb +6 -6
- data/test/rubygems/test_gem_resolver_api_set.rb +3 -3
- data/test/rubygems/test_gem_resolver_best_set.rb +2 -2
- data/test/rubygems/test_gem_resolver_index_set.rb +2 -2
- data/test/rubygems/test_gem_resolver_installer_set.rb +7 -7
- data/test/rubygems/test_gem_resolver_lock_set.rb +3 -3
- data/test/rubygems/test_gem_security.rb +20 -20
- data/test/rubygems/test_gem_security_policy.rb +5 -8
- data/test/rubygems/test_gem_security_signer.rb +8 -8
- data/test/rubygems/test_gem_security_trust_dir.rb +2 -2
- data/test/rubygems/test_gem_server.rb +10 -10
- data/test/rubygems/test_gem_source.rb +12 -14
- data/test/rubygems/test_gem_source_git.rb +12 -11
- data/test/rubygems/test_gem_source_installed.rb +7 -7
- data/test/rubygems/test_gem_source_local.rb +8 -8
- data/test/rubygems/test_gem_source_lock.rb +10 -10
- data/test/rubygems/test_gem_source_specific_file.rb +7 -7
- data/test/rubygems/test_gem_source_vendor.rb +7 -7
- data/test/rubygems/test_gem_spec_fetcher.rb +11 -2
- data/test/rubygems/test_gem_specification.rb +143 -113
- data/test/rubygems/test_gem_stream_ui.rb +3 -1
- data/test/rubygems/test_gem_text.rb +1 -1
- data/test/rubygems/test_gem_uninstaller.rb +134 -10
- data/test/rubygems/test_gem_util.rb +7 -5
- data/test/rubygems/test_gem_version.rb +1 -1
- data/test/rubygems/test_kernel.rb +10 -12
- data/test/rubygems/test_project_sanity.rb +8 -1
- data/test/rubygems/test_require.rb +141 -43
- metadata +32 -45
- data/.bundle/config +0 -2
- data/.rubocop.yml +0 -91
- data/Gemfile +0 -8
- data/Gemfile.lock +0 -43
- data/bundler/CODE_OF_CONDUCT.md +0 -136
- data/lib/rubygems/source_local.rb +0 -7
- data/lib/rubygems/source_specific_file.rb +0 -6
- data/lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA_R3.pem +0 -21
- data/lib/ubygems.rb +0 -14
- data/tmp/.keep +0 -0
- data/util/CL2notes +0 -55
- data/util/bisect +0 -10
- data/util/ci.sh +0 -62
- data/util/cops/deprecations.rb +0 -52
- data/util/create_certs.rb +0 -171
- data/util/create_certs.sh +0 -27
- data/util/create_encrypted_key.rb +0 -16
- data/util/generate_spdx_license_list.rb +0 -63
- data/util/patch_with_prs.rb +0 -77
- data/util/rubocop +0 -8
- data/util/update_bundled_ca_certificates.rb +0 -137
- data/util/update_changelog.rb +0 -64
data/bundler/man/bundle-viz.1
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
BUNDLE-VIZ(1)
|
1
|
+
BUNDLE-VIZ(1) BUNDLE-VIZ(1)
|
2
2
|
|
3
3
|
|
4
4
|
|
@@ -10,30 +10,30 @@ SYNOPSIS
|
|
10
10
|
[--without=GROUP GROUP]
|
11
11
|
|
12
12
|
DESCRIPTION
|
13
|
-
viz generates a PNG file of the
|
13
|
+
viz generates a PNG file of the current Gemfile(5) as a dependency
|
14
14
|
graph. viz requires the ruby-graphviz gem (and its dependencies).
|
15
15
|
|
16
|
-
The associated
|
17
|
-
|
16
|
+
The associated gems must also be installed via bundle install(1)
|
17
|
+
bundle-install.1.html.
|
18
18
|
|
19
19
|
OPTIONS
|
20
20
|
--file, -f
|
21
|
-
|
21
|
+
The name to use for the generated file. See --format option
|
22
22
|
|
23
23
|
--format, -F
|
24
|
-
|
25
|
-
|
24
|
+
This is output format option. Supported format is png, jpg, svg,
|
25
|
+
dot ...
|
26
26
|
|
27
27
|
--requirements, -R
|
28
|
-
|
28
|
+
Set to show the version of each required dependency.
|
29
29
|
|
30
30
|
--version, -v
|
31
|
-
|
31
|
+
Set to show each gem version.
|
32
32
|
|
33
33
|
--without, -W
|
34
|
-
|
34
|
+
Exclude gems that are part of the specified named group.
|
35
35
|
|
36
36
|
|
37
37
|
|
38
38
|
|
39
|
-
|
39
|
+
July 2020 BUNDLE-VIZ(1)
|
data/bundler/man/bundle.1
CHANGED
data/bundler/man/bundle.1.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
BUNDLE(1)
|
1
|
+
BUNDLE(1) BUNDLE(1)
|
2
2
|
|
3
3
|
|
4
4
|
|
@@ -9,7 +9,7 @@ SYNOPSIS
|
|
9
9
|
bundle COMMAND [--no-color] [--verbose] [ARGS]
|
10
10
|
|
11
11
|
DESCRIPTION
|
12
|
-
Bundler
|
12
|
+
Bundler manages an application's dependencies through its entire life
|
13
13
|
across many machines systematically and repeatably.
|
14
14
|
|
15
15
|
See the bundler website https://bundler.io for information on getting
|
@@ -17,87 +17,87 @@ DESCRIPTION
|
|
17
17
|
|
18
18
|
OPTIONS
|
19
19
|
--no-color
|
20
|
-
|
20
|
+
Print all output without color
|
21
21
|
|
22
22
|
--retry, -r
|
23
|
-
|
23
|
+
Specify the number of times you wish to attempt network commands
|
24
24
|
|
25
25
|
--verbose, -V
|
26
|
-
|
26
|
+
Print out additional logging information
|
27
27
|
|
28
28
|
BUNDLE COMMANDS
|
29
29
|
We divide bundle subcommands into primary commands and utilities:
|
30
30
|
|
31
31
|
PRIMARY COMMANDS
|
32
32
|
bundle install(1) bundle-install.1.html
|
33
|
-
|
33
|
+
Install the gems specified by the Gemfile or Gemfile.lock
|
34
34
|
|
35
35
|
bundle update(1) bundle-update.1.html
|
36
|
-
|
36
|
+
Update dependencies to their latest versions
|
37
37
|
|
38
38
|
bundle package(1) bundle-package.1.html
|
39
|
-
|
40
|
-
|
39
|
+
Package the .gem files required by your application into the
|
40
|
+
vendor/cache directory
|
41
41
|
|
42
42
|
bundle exec(1) bundle-exec.1.html
|
43
|
-
|
43
|
+
Execute a script in the current bundle
|
44
44
|
|
45
45
|
bundle config(1) bundle-config.1.html
|
46
|
-
|
46
|
+
Specify and read configuration options for Bundler
|
47
47
|
|
48
48
|
bundle help(1)
|
49
|
-
|
49
|
+
Display detailed help for each subcommand
|
50
50
|
|
51
51
|
UTILITIES
|
52
52
|
bundle add(1) bundle-add.1.html
|
53
|
-
|
53
|
+
Add the named gem to the Gemfile and run bundle install
|
54
54
|
|
55
55
|
bundle binstubs(1) bundle-binstubs.1.html
|
56
|
-
|
56
|
+
Generate binstubs for executables in a gem
|
57
57
|
|
58
58
|
bundle check(1) bundle-check.1.html
|
59
|
-
|
60
|
-
|
59
|
+
Determine whether the requirements for your application are
|
60
|
+
installed and available to Bundler
|
61
61
|
|
62
62
|
bundle show(1) bundle-show.1.html
|
63
|
-
|
63
|
+
Show the source location of a particular gem in the bundle
|
64
64
|
|
65
65
|
bundle outdated(1) bundle-outdated.1.html
|
66
|
-
|
66
|
+
Show all of the outdated gems in the current bundle
|
67
67
|
|
68
68
|
bundle console(1)
|
69
|
-
|
69
|
+
Start an IRB session in the current bundle
|
70
70
|
|
71
71
|
bundle open(1) bundle-open.1.html
|
72
|
-
|
72
|
+
Open an installed gem in the editor
|
73
73
|
|
74
74
|
bundle lock(1) bundle-lock.1.html
|
75
|
-
|
75
|
+
Generate a lockfile for your dependencies
|
76
76
|
|
77
77
|
bundle viz(1) bundle-viz.1.html
|
78
|
-
|
78
|
+
Generate a visual representation of your dependencies
|
79
79
|
|
80
80
|
bundle init(1) bundle-init.1.html
|
81
|
-
|
81
|
+
Generate a simple Gemfile, placed in the current directory
|
82
82
|
|
83
83
|
bundle gem(1) bundle-gem.1.html
|
84
|
-
|
84
|
+
Create a simple gem, suitable for development with Bundler
|
85
85
|
|
86
86
|
bundle platform(1) bundle-platform.1.html
|
87
|
-
|
87
|
+
Display platform compatibility information
|
88
88
|
|
89
89
|
bundle clean(1) bundle-clean.1.html
|
90
|
-
|
90
|
+
Clean up unused gems in your Bundler directory
|
91
91
|
|
92
92
|
bundle doctor(1) bundle-doctor.1.html
|
93
|
-
|
93
|
+
Display warnings about common problems
|
94
94
|
|
95
95
|
bundle remove(1) bundle-remove.1.html
|
96
|
-
|
96
|
+
Removes gems from the Gemfile
|
97
97
|
|
98
98
|
PLUGINS
|
99
|
-
When running
|
100
|
-
|
99
|
+
When running a command that isn't listed in PRIMARY COMMANDS or
|
100
|
+
UTILITIES, Bundler will try to find an executable on your path named
|
101
101
|
bundler-<command> and execute it, passing down any extra arguments to
|
102
102
|
it.
|
103
103
|
|
@@ -113,4 +113,4 @@ OBSOLETE
|
|
113
113
|
|
114
114
|
|
115
115
|
|
116
|
-
|
116
|
+
July 2020 BUNDLE(1)
|
data/bundler/man/gemfile.5
CHANGED
data/bundler/man/gemfile.5.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
GEMFILE(5)
|
1
|
+
GEMFILE(5) GEMFILE(5)
|
2
2
|
|
3
3
|
|
4
4
|
|
@@ -9,21 +9,21 @@ SYNOPSIS
|
|
9
9
|
A Gemfile describes the gem dependencies required to execute associated
|
10
10
|
Ruby code.
|
11
11
|
|
12
|
-
Place
|
13
|
-
|
14
|
-
the same directory as the Rakefile.
|
12
|
+
Place the Gemfile in the root of the directory containing the
|
13
|
+
associated code. For instance, in a Rails application, place the
|
14
|
+
Gemfile in the same directory as the Rakefile.
|
15
15
|
|
16
16
|
SYNTAX
|
17
17
|
A Gemfile is evaluated as Ruby code, in a context which makes available
|
18
18
|
a number of methods used to describe the gem requirements.
|
19
19
|
|
20
20
|
GLOBAL SOURCES
|
21
|
-
At
|
22
|
-
|
21
|
+
At the top of the Gemfile, add a line for the Rubygems source that
|
22
|
+
contains the gems listed in the Gemfile.
|
23
23
|
|
24
24
|
|
25
25
|
|
26
|
-
|
26
|
+
source "https://rubygems.org"
|
27
27
|
|
28
28
|
|
29
29
|
|
@@ -31,24 +31,24 @@ GLOBAL SOURCES
|
|
31
31
|
global source lines. Each of these sources MUST be a valid Rubygems
|
32
32
|
repository.
|
33
33
|
|
34
|
-
Sources are checked for gems following
|
34
|
+
Sources are checked for gems following the heuristics described in
|
35
35
|
SOURCE PRIORITY. If a gem is found in more than one global source,
|
36
36
|
Bundler will print a warning after installing the gem indicating which
|
37
|
-
source was
|
38
|
-
|
39
|
-
non-standard
|
40
|
-
option or a source block.
|
37
|
+
source was used, and listing the other sources where the gem is
|
38
|
+
available. A specific source can be selected for gems that need to use
|
39
|
+
a non-standard repository, suppressing this warning, by using the
|
40
|
+
:source option or a source block.
|
41
41
|
|
42
42
|
CREDENTIALS
|
43
43
|
Some gem sources require a username and password. Use bundle config(1)
|
44
44
|
bundle-config.1.html to set the username and password for any of the
|
45
|
-
sources that need it. The command must be run once on
|
45
|
+
sources that need it. The command must be run once on each computer
|
46
46
|
that will install the Gemfile, but this keeps the credentials from
|
47
47
|
being stored in plain text in version control.
|
48
48
|
|
49
49
|
|
50
50
|
|
51
|
-
|
51
|
+
bundle config gems.example.com user:password
|
52
52
|
|
53
53
|
|
54
54
|
|
@@ -57,7 +57,7 @@ GLOBAL SOURCES
|
|
57
57
|
|
58
58
|
|
59
59
|
|
60
|
-
|
60
|
+
source "https://user:password@gems.example.com"
|
61
61
|
|
62
62
|
|
63
63
|
|
@@ -71,13 +71,13 @@ RUBY
|
|
71
71
|
|
72
72
|
VERSION (required)
|
73
73
|
The version of Ruby that your application requires. If your application
|
74
|
-
requires
|
75
|
-
|
76
|
-
with.
|
74
|
+
requires an alternate Ruby engine, such as JRuby, Rubinius or
|
75
|
+
TruffleRuby, this should be the Ruby version that the engine is
|
76
|
+
compatible with.
|
77
77
|
|
78
78
|
|
79
79
|
|
80
|
-
|
80
|
+
ruby "1.9.3"
|
81
81
|
|
82
82
|
|
83
83
|
|
@@ -88,29 +88,29 @@ RUBY
|
|
88
88
|
What exactly is an Engine? - A Ruby engine is an implementation of the
|
89
89
|
Ruby language.
|
90
90
|
|
91
|
-
o For
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
91
|
+
o For background: the reference or original implementation of the
|
92
|
+
Ruby programming language is called Matz's Ruby Interpreter
|
93
|
+
https://en.wikipedia.org/wiki/Ruby_MRI, or MRI for short. This is
|
94
|
+
named after Ruby creator Yukihiro Matsumoto, also known as Matz.
|
95
|
+
MRI is also known as CRuby, because it is written in C. MRI is the
|
96
|
+
most widely used Ruby engine.
|
97
97
|
|
98
98
|
o Other implementations https://www.ruby-lang.org/en/about/ of Ruby
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
99
|
+
exist. Some of the more well-known implementations include Rubinius
|
100
|
+
https://rubinius.com/, and JRuby http://jruby.org/. Rubinius is an
|
101
|
+
alternative implementation of Ruby written in Ruby. JRuby is an
|
102
|
+
implementation of Ruby on the JVM, short for Java Virtual Machine.
|
103
103
|
|
104
104
|
|
105
105
|
|
106
106
|
ENGINE VERSION
|
107
|
-
Each application may specify
|
108
|
-
|
109
|
-
"ruby" the engine version specified must match the Ruby version.
|
107
|
+
Each application may specify a Ruby engine version. If an engine
|
108
|
+
version is specified, an engine must also be specified. If the engine
|
109
|
+
is "ruby" the engine version specified must match the Ruby version.
|
110
110
|
|
111
111
|
|
112
112
|
|
113
|
-
|
113
|
+
ruby "1.8.7", :engine => "jruby", :engine_version => "1.6.7"
|
114
114
|
|
115
115
|
|
116
116
|
|
@@ -119,20 +119,20 @@ RUBY
|
|
119
119
|
|
120
120
|
|
121
121
|
|
122
|
-
|
122
|
+
ruby "2.0.0", :patchlevel => "247"
|
123
123
|
|
124
124
|
|
125
125
|
|
126
126
|
GEMS
|
127
|
-
Specify gem requirements using
|
128
|
-
|
127
|
+
Specify gem requirements using the gem method, with the following
|
128
|
+
arguments. All parameters are OPTIONAL unless otherwise specified.
|
129
129
|
|
130
130
|
NAME (required)
|
131
131
|
For each gem requirement, list a single gem line.
|
132
132
|
|
133
133
|
|
134
134
|
|
135
|
-
|
135
|
+
gem "nokogiri"
|
136
136
|
|
137
137
|
|
138
138
|
|
@@ -141,22 +141,22 @@ GEMS
|
|
141
141
|
|
142
142
|
|
143
143
|
|
144
|
-
|
145
|
-
|
144
|
+
gem "nokogiri", ">= 1.4.2"
|
145
|
+
gem "RedCloth", ">= 4.1.0", "< 4.2.0"
|
146
146
|
|
147
147
|
|
148
148
|
|
149
149
|
REQUIRE AS
|
150
150
|
Each gem MAY specify files that should be used when autorequiring via
|
151
151
|
Bundler.require. You may pass an array with multiple files or true if
|
152
|
-
file you want
|
152
|
+
file you want required has same name as gem or false to prevent any
|
153
153
|
file from being autorequired.
|
154
154
|
|
155
155
|
|
156
156
|
|
157
|
-
|
158
|
-
|
159
|
-
|
157
|
+
gem "redis", :require => ["redis/connection/hiredis", "redis"]
|
158
|
+
gem "webmock", :require => false
|
159
|
+
gem "byebug", :require => true
|
160
160
|
|
161
161
|
|
162
162
|
|
@@ -165,21 +165,21 @@ GEMS
|
|
165
165
|
|
166
166
|
|
167
167
|
|
168
|
-
|
169
|
-
|
170
|
-
|
168
|
+
gem "nokogiri"
|
169
|
+
gem "nokogiri", :require => "nokogiri"
|
170
|
+
gem "nokogiri", :require => true
|
171
171
|
|
172
172
|
|
173
173
|
|
174
174
|
GROUPS
|
175
|
-
Each gem MAY specify
|
175
|
+
Each gem MAY specify membership in one or more groups. Any gem that
|
176
176
|
does not specify membership in any group is placed in the default
|
177
177
|
group.
|
178
178
|
|
179
179
|
|
180
180
|
|
181
|
-
|
182
|
-
|
181
|
+
gem "rspec", :group => :test
|
182
|
+
gem "wirble", :groups => [:development, :test]
|
183
183
|
|
184
184
|
|
185
185
|
|
@@ -188,47 +188,47 @@ GEMS
|
|
188
188
|
|
189
189
|
|
190
190
|
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
191
|
+
# setup adds gems to Ruby's load path
|
192
|
+
Bundler.setup # defaults to all groups
|
193
|
+
require "bundler/setup" # same as Bundler.setup
|
194
|
+
Bundler.setup(:default) # only set up the _default_ group
|
195
|
+
Bundler.setup(:test) # only set up the _test_ group (but `not` _default_)
|
196
|
+
Bundler.setup(:default, :test) # set up the _default_ and _test_ groups, but no others
|
197
197
|
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
198
|
+
# require requires all of the gems in the specified groups
|
199
|
+
Bundler.require # defaults to the _default_ group
|
200
|
+
Bundler.require(:default) # identical
|
201
|
+
Bundler.require(:default, :test) # requires the _default_ and _test_ groups
|
202
|
+
Bundler.require(:test) # requires the _test_ group
|
203
203
|
|
204
204
|
|
205
205
|
|
206
|
-
The Bundler CLI allows you to specify
|
207
|
-
|
206
|
+
The Bundler CLI allows you to specify a list of groups whose gems
|
207
|
+
bundle install should not install with the without configuration.
|
208
208
|
|
209
|
-
To specify multiple groups
|
210
|
-
|
209
|
+
To specify multiple groups to ignore, specify a list of groups
|
210
|
+
separated by spaces.
|
211
211
|
|
212
212
|
|
213
213
|
|
214
|
-
|
215
|
-
|
214
|
+
bundle config set without test
|
215
|
+
bundle config set without development test
|
216
216
|
|
217
217
|
|
218
218
|
|
219
219
|
Also, calling Bundler.setup with no parameters, or calling require
|
220
|
-
"bundler/setup"
|
220
|
+
"bundler/setup" will setup all groups except for the ones you excluded
|
221
221
|
via --without (since they are not available).
|
222
222
|
|
223
223
|
Note that on bundle install, bundler downloads and evaluates all gems,
|
224
224
|
in order to create a single canonical list of all of the required gems
|
225
|
-
and their dependencies. This
|
226
|
-
|
225
|
+
and their dependencies. This means that you cannot list different
|
226
|
+
versions of the same gems in different groups. For more details, see
|
227
227
|
Understanding Bundler https://bundler.io/rationale.html.
|
228
228
|
|
229
229
|
PLATFORMS
|
230
|
-
If a gem should only be
|
231
|
-
|
230
|
+
If a gem should only be used in a particular platform or set of
|
231
|
+
platforms, you can specify them. Platforms are essentially identical to
|
232
232
|
groups, except that you do not need to use the --without install-time
|
233
233
|
flag to exclude groups of gems for other platforms.
|
234
234
|
|
@@ -241,27 +241,27 @@ GEMS
|
|
241
241
|
mingw Windows 32 bit 'mingw32' platform (aka RubyInstaller)
|
242
242
|
|
243
243
|
x64_mingw
|
244
|
-
|
244
|
+
Windows 64 bit 'mingw32' platform (aka RubyInstaller x64)
|
245
245
|
|
246
246
|
rbx Rubinius
|
247
247
|
|
248
248
|
jruby JRuby
|
249
249
|
|
250
250
|
truffleruby
|
251
|
-
|
251
|
+
TruffleRuby
|
252
252
|
|
253
253
|
mswin Windows
|
254
254
|
|
255
|
-
You can restrict further by
|
255
|
+
You can restrict further by platform and version for all platforms
|
256
256
|
except for rbx, jruby, truffleruby and mswin.
|
257
257
|
|
258
|
-
To specify a version in addition to
|
259
|
-
|
260
|
-
a gem should only be used on platforms with Ruby 2.3, use:
|
258
|
+
To specify a version in addition to a platform, append the version
|
259
|
+
number without the delimiter to the platform. For example, to specify
|
260
|
+
that a gem should only be used on platforms with Ruby 2.3, use:
|
261
261
|
|
262
262
|
|
263
263
|
|
264
|
-
|
264
|
+
ruby_23
|
265
265
|
|
266
266
|
|
267
267
|
|
@@ -274,19 +274,19 @@ GEMS
|
|
274
274
|
mingw 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6
|
275
275
|
|
276
276
|
x64_mingw
|
277
|
-
|
277
|
+
2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6
|
278
278
|
|
279
279
|
As with groups, you can specify one or more platforms:
|
280
280
|
|
281
281
|
|
282
282
|
|
283
|
-
|
284
|
-
|
285
|
-
|
283
|
+
gem "weakling", :platforms => :jruby
|
284
|
+
gem "ruby-debug", :platforms => :mri_18
|
285
|
+
gem "nokogiri", :platforms => [:mri_18, :jruby]
|
286
286
|
|
287
287
|
|
288
288
|
|
289
|
-
All operations involving groups (bundle install
|
289
|
+
All operations involving groups (bundle install bundle-install.1.html,
|
290
290
|
Bundler.setup, Bundler.require) behave exactly the same as if any
|
291
291
|
groups not matching the current platform were explicitly excluded.
|
292
292
|
|
@@ -296,7 +296,7 @@ GEMS
|
|
296
296
|
|
297
297
|
|
298
298
|
|
299
|
-
|
299
|
+
gem "some_internal_gem", :source => "https://gems.example.com"
|
300
300
|
|
301
301
|
|
302
302
|
|
@@ -314,7 +314,7 @@ GEMS
|
|
314
314
|
|
315
315
|
Using the :source option for an individual gem will also make that
|
316
316
|
source available as a possible global source for any other gems which
|
317
|
-
do not
|
317
|
+
do not specify explicit sources. Thus, when adding gems with explicit
|
318
318
|
sources, it is recommended that you also ensure all other gems in the
|
319
319
|
Gemfile are using explicit sources.
|
320
320
|
|
@@ -324,7 +324,7 @@ GEMS
|
|
324
324
|
several protocols:
|
325
325
|
|
326
326
|
HTTP(S)
|
327
|
-
|
327
|
+
gem "rails", :git => "https://github.com/rails/rails.git"
|
328
328
|
|
329
329
|
SSH gem "rails", :git => "git@github.com:rails/rails.git"
|
330
330
|
|
@@ -333,95 +333,95 @@ GEMS
|
|
333
333
|
If using SSH, the user that you use to run bundle install MUST have the
|
334
334
|
appropriate keys available in their $HOME/.ssh.
|
335
335
|
|
336
|
-
NOTE: http:// and git:// URLs should be avoided
|
336
|
+
NOTE: http:// and git:// URLs should be avoided if at all possible.
|
337
337
|
These protocols are unauthenticated, so a man-in-the-middle attacker
|
338
338
|
can deliver malicious code and compromise your system. HTTPS and SSH
|
339
339
|
are strongly preferred.
|
340
340
|
|
341
|
-
The group, platforms,
|
341
|
+
The group, platforms, and require options are available and behave
|
342
342
|
exactly the same as they would for a normal gem.
|
343
343
|
|
344
|
-
A git repository SHOULD have at least one file,
|
344
|
+
A git repository SHOULD have at least one file, at the root of the
|
345
345
|
directory containing the gem, with the extension .gemspec. This file
|
346
346
|
MUST contain a valid gem specification, as expected by the gem build
|
347
347
|
command.
|
348
348
|
|
349
349
|
If a git repository does not have a .gemspec, bundler will attempt to
|
350
350
|
create one, but it will not contain any dependencies, executables, or C
|
351
|
-
extension compilation instructions.
|
352
|
-
|
351
|
+
extension compilation instructions. As a result, it may fail to
|
352
|
+
properly integrate into your application.
|
353
353
|
|
354
354
|
If a git repository does have a .gemspec for the gem you attached it
|
355
355
|
to, a version specifier, if provided, means that the git repository is
|
356
|
-
only valid if the .gemspec specifies a version
|
356
|
+
only valid if the .gemspec specifies a version matching the version
|
357
357
|
specifier. If not, bundler will print a warning.
|
358
358
|
|
359
359
|
|
360
360
|
|
361
|
-
|
362
|
-
|
363
|
-
|
361
|
+
gem "rails", "2.3.8", :git => "https://github.com/rails/rails.git"
|
362
|
+
# bundle install will fail, because the .gemspec in the rails
|
363
|
+
# repository's master branch specifies version 3.0.0
|
364
364
|
|
365
365
|
|
366
366
|
|
367
367
|
If a git repository does not have a .gemspec for the gem you attached
|
368
|
-
it to, a version specifier MUST be
|
369
|
-
|
368
|
+
it to, a version specifier MUST be provided. Bundler will use this
|
369
|
+
version in the simple .gemspec it creates.
|
370
370
|
|
371
371
|
Git repositories support a number of additional options.
|
372
372
|
|
373
373
|
branch, tag, and ref
|
374
|
-
|
375
|
-
|
374
|
+
You MUST only specify at most one of these options. The default
|
375
|
+
is :branch => "master". For example:
|
376
376
|
|
377
|
-
|
378
|
-
|
377
|
+
gem "rails", :git => "https://github.com/rails/rails.git",
|
378
|
+
:branch => "5-0-stable"
|
379
379
|
|
380
|
-
|
381
|
-
|
380
|
+
gem "rails", :git => "https://github.com/rails/rails.git", :tag
|
381
|
+
=> "v5.0.0"
|
382
382
|
|
383
|
-
|
384
|
-
|
383
|
+
gem "rails", :git => "https://github.com/rails/rails.git", :ref
|
384
|
+
=> "4aded"
|
385
385
|
|
386
386
|
submodules
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
387
|
+
For reference, a git submodule
|
388
|
+
https://git-scm.com/book/en/v2/Git-Tools-Submodules lets you
|
389
|
+
have another git repository within a subfolder of your
|
390
|
+
repository. Specify :submodules => true to cause bundler to
|
391
|
+
expand any submodules included in the git repository
|
392
392
|
|
393
|
-
If
|
394
|
-
|
395
|
-
|
393
|
+
If a git repository contains multiple .gemspecs, each .gemspec
|
394
|
+
represents a gem located at the same place in the file system as the
|
395
|
+
.gemspec.
|
396
396
|
|
397
397
|
|
398
398
|
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
399
|
+
|~rails [git root]
|
400
|
+
| |-rails.gemspec [rails gem located here]
|
401
|
+
|~actionpack
|
402
|
+
| |-actionpack.gemspec [actionpack gem located here]
|
403
|
+
|~activesupport
|
404
|
+
| |-activesupport.gemspec [activesupport gem located here]
|
405
|
+
|...
|
406
406
|
|
407
407
|
|
408
408
|
|
409
409
|
To install a gem located in a git repository, bundler changes to the
|
410
410
|
directory containing the gemspec, runs gem build name.gemspec and then
|
411
411
|
installs the resulting gem. The gem build command, which comes standard
|
412
|
-
with Rubygems, evaluates the .gemspec in the context of
|
412
|
+
with Rubygems, evaluates the .gemspec in the context of the directory
|
413
413
|
in which it is located.
|
414
414
|
|
415
415
|
GIT SOURCE
|
416
416
|
A custom git source can be defined via the git_source method. Provide
|
417
|
-
the source's name as an argument, and a block which receives a
|
418
|
-
argument and interpolates it
|
417
|
+
the source's name as an argument, and a block which receives a single
|
418
|
+
argument and interpolates it into a string to return the full repo
|
419
419
|
address:
|
420
420
|
|
421
421
|
|
422
422
|
|
423
|
-
|
424
|
-
|
423
|
+
git_source(:stash){ |repo_name| "https://stash.corp.acme.pl/#{repo_name}.git" }
|
424
|
+
gem 'rails', :stash => 'forks/rails'
|
425
425
|
|
426
426
|
|
427
427
|
|
@@ -429,25 +429,25 @@ GEMS
|
|
429
429
|
|
430
430
|
|
431
431
|
|
432
|
-
|
432
|
+
gem "rails", :stash => "forks/rails", :branch => "branch_name"
|
433
433
|
|
434
434
|
|
435
435
|
|
436
436
|
GITHUB
|
437
|
-
NOTE: This shorthand should be avoided
|
438
|
-
|
439
|
-
|
437
|
+
NOTE: This shorthand should be avoided until Bundler 2.0, since it
|
438
|
+
currently expands to an insecure git:// URL. This allows a
|
439
|
+
man-in-the-middle attacker to compromise your system.
|
440
440
|
|
441
|
-
If the git repository you want to
|
442
|
-
|
443
|
-
and repository name (without
|
444
|
-
slash.
|
445
|
-
omit one.
|
441
|
+
If the git repository you want to use is hosted on GitHub and is
|
442
|
+
public, you can use the :github shorthand to specify the github
|
443
|
+
username and repository name (without the trailing ".git"), separated
|
444
|
+
by a slash. If both the username and repository name are the same, you
|
445
|
+
can omit one.
|
446
446
|
|
447
447
|
|
448
448
|
|
449
|
-
|
450
|
-
|
449
|
+
gem "rails", :github => "rails/rails"
|
450
|
+
gem "rails", :github => "rails"
|
451
451
|
|
452
452
|
|
453
453
|
|
@@ -455,7 +455,7 @@ GEMS
|
|
455
455
|
|
456
456
|
|
457
457
|
|
458
|
-
|
458
|
+
gem "rails", :git => "git://github.com/rails/rails.git"
|
459
459
|
|
460
460
|
|
461
461
|
|
@@ -469,7 +469,7 @@ GEMS
|
|
469
469
|
|
470
470
|
|
471
471
|
|
472
|
-
|
472
|
+
gem "the_hatch", :gist => "4815162342"
|
473
473
|
|
474
474
|
|
475
475
|
|
@@ -477,7 +477,7 @@ GEMS
|
|
477
477
|
|
478
478
|
|
479
479
|
|
480
|
-
|
480
|
+
gem "the_hatch", :git => "https://gist.github.com/4815162342.git"
|
481
481
|
|
482
482
|
|
483
483
|
|
@@ -485,16 +485,16 @@ GEMS
|
|
485
485
|
:branch named argument.
|
486
486
|
|
487
487
|
BITBUCKET
|
488
|
-
If the git repository you want to use is hosted
|
489
|
-
public,
|
488
|
+
If the git repository you want to use is hosted on Bitbucket and is
|
489
|
+
public, you can use the :bitbucket shorthand to specify the bitbucket
|
490
490
|
username and repository name (without the trailing ".git"), separated
|
491
491
|
by a slash. If both the username and repository name are the same, you
|
492
492
|
can omit one.
|
493
493
|
|
494
494
|
|
495
495
|
|
496
|
-
|
497
|
-
|
496
|
+
gem "rails", :bitbucket => "rails/rails"
|
497
|
+
gem "rails", :bitbucket => "rails"
|
498
498
|
|
499
499
|
|
500
500
|
|
@@ -502,19 +502,19 @@ GEMS
|
|
502
502
|
|
503
503
|
|
504
504
|
|
505
|
-
|
505
|
+
gem "rails", :git => "https://rails@bitbucket.org/rails/rails.git"
|
506
506
|
|
507
507
|
|
508
508
|
|
509
|
-
Since the bitbucket method is
|
509
|
+
Since the bitbucket method is a specialization of git_source, it
|
510
510
|
accepts a :branch named argument.
|
511
511
|
|
512
512
|
PATH
|
513
513
|
You can specify that a gem is located in a particular location on the
|
514
|
-
file system. Relative paths are
|
515
|
-
|
514
|
+
file system. Relative paths are resolved relative to the directory
|
515
|
+
containing the Gemfile.
|
516
516
|
|
517
|
-
Similar
|
517
|
+
Similar to the semantics of the :git option, the :path option requires
|
518
518
|
that the directory in question either contains a .gemspec for the gem,
|
519
519
|
or that you specify an explicit version that bundler should use.
|
520
520
|
|
@@ -523,20 +523,21 @@ GEMS
|
|
523
523
|
|
524
524
|
|
525
525
|
|
526
|
-
|
526
|
+
gem "rails", :path => "vendor/rails"
|
527
527
|
|
528
528
|
|
529
529
|
|
530
|
-
If you would
|
531
|
-
|
532
|
-
files.
|
530
|
+
If you would like to use multiple local gems directly from the
|
531
|
+
filesystem, you can set a global path option to the path containing the
|
532
|
+
gem's files. This will automatically load gemspec files from
|
533
|
+
subdirectories.
|
533
534
|
|
534
535
|
|
535
536
|
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
537
|
+
path 'components' do
|
538
|
+
gem 'admin_ui'
|
539
|
+
gem 'public_ui'
|
540
|
+
end
|
540
541
|
|
541
542
|
|
542
543
|
|
@@ -546,104 +547,105 @@ BLOCK FORM OF SOURCE, GIT, PATH, GROUP and PLATFORMS
|
|
546
547
|
|
547
548
|
|
548
549
|
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
550
|
+
source "https://gems.example.com" do
|
551
|
+
gem "some_internal_gem"
|
552
|
+
gem "another_internal_gem"
|
553
|
+
end
|
553
554
|
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
555
|
+
git "https://github.com/rails/rails.git" do
|
556
|
+
gem "activesupport"
|
557
|
+
gem "actionpack"
|
558
|
+
end
|
558
559
|
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
560
|
+
platforms :ruby do
|
561
|
+
gem "ruby-debug"
|
562
|
+
gem "sqlite3"
|
563
|
+
end
|
563
564
|
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
565
|
+
group :development, :optional => true do
|
566
|
+
gem "wirble"
|
567
|
+
gem "faker"
|
568
|
+
end
|
568
569
|
|
569
570
|
|
570
571
|
|
571
|
-
In
|
572
|
-
to
|
572
|
+
In the case of the group block form the :optional option can be given
|
573
|
+
to prevent a group from being installed unless listed in the --with
|
573
574
|
option given to the bundle install command.
|
574
575
|
|
575
|
-
In
|
576
|
-
|
577
|
-
block will inherit those options.
|
576
|
+
In the case of the git block form, the :ref, :branch, :tag, and
|
577
|
+
:submodules options may be passed to the git method, and all gems in
|
578
|
+
the block will inherit those options.
|
578
579
|
|
579
|
-
The
|
580
|
-
available
|
581
|
-
specify explicit sources. Thus, when
|
582
|
-
|
583
|
-
explicit
|
584
|
-
individual gems.
|
580
|
+
The presence of a source block in a Gemfile also makes that source
|
581
|
+
available as a possible global source for any other gems which do not
|
582
|
+
specify explicit sources. Thus, when defining source blocks, it is
|
583
|
+
recommended that you also ensure all other gems in the Gemfile are
|
584
|
+
using explicit sources, either via source blocks or :source directives
|
585
|
+
on individual gems.
|
585
586
|
|
586
587
|
INSTALL_IF
|
587
|
-
The
|
588
|
-
lambda.
|
588
|
+
The install_if method allows gems to be installed based on a proc or
|
589
|
+
lambda. This is especially useful for optional gems that can only be
|
589
590
|
used if certain software is installed or some other conditions are met.
|
590
591
|
|
591
592
|
|
592
593
|
|
593
|
-
|
594
|
-
|
595
|
-
|
594
|
+
install_if -> { RUBY_PLATFORM =~ /darwin/ } do
|
595
|
+
gem "pasteboard"
|
596
|
+
end
|
596
597
|
|
597
598
|
|
598
599
|
|
599
600
|
GEMSPEC
|
600
|
-
The
|
601
|
+
The .gemspec http://guides.rubygems.org/specification-reference/ file
|
601
602
|
is where you provide metadata about your gem to Rubygems. Some required
|
602
|
-
Gemspec
|
603
|
-
gem.
|
603
|
+
Gemspec attributes include the name, description, and homepage of your
|
604
|
+
gem. This is also where you specify the dependencies your gem needs to
|
604
605
|
run.
|
605
606
|
|
606
607
|
If you wish to use Bundler to help install dependencies for a gem while
|
607
|
-
it is
|
608
|
-
|
608
|
+
it is being developed, use the gemspec method to pull in the
|
609
|
+
dependencies listed in the .gemspec file.
|
609
610
|
|
610
611
|
The gemspec method adds any runtime dependencies as gem requirements in
|
611
|
-
the
|
612
|
-
requirements
|
613
|
-
|
614
|
-
this
|
615
|
-
if
|
616
|
-
load path manually or require project files via relative
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
612
|
+
the default group. It also adds development dependencies as gem
|
613
|
+
requirements in the development group. Finally, it adds a gem
|
614
|
+
requirement on your project (:path => '.'). In conjunction with
|
615
|
+
Bundler.setup, this allows you to require project files in your test
|
616
|
+
code as you would if the project were installed as a gem; you need not
|
617
|
+
manipulate the load path manually or require project files via relative
|
618
|
+
paths.
|
619
|
+
|
620
|
+
The gemspec method supports optional :path, :glob, :name, and
|
621
|
+
:development_group options, which control where bundler looks for the
|
622
|
+
.gemspec, the glob it uses to look for the gemspec (defaults to:
|
623
|
+
"{,,/*}.gemspec"), what named .gemspec it uses (if more than one is
|
624
|
+
present), and which group development dependencies are included in.
|
625
|
+
|
626
|
+
When a gemspec dependency encounters version conflicts during
|
627
|
+
resolution, the local version under development will always be selected
|
628
|
+
-- even if there are remote versions that better match other
|
629
|
+
requirements for the gemspec gem.
|
628
630
|
|
629
631
|
SOURCE PRIORITY
|
630
632
|
When attempting to locate a gem to satisfy a gem requirement, bundler
|
631
633
|
uses the following priority order:
|
632
634
|
|
633
635
|
1. The source explicitly attached to the gem (using :source, :path, or
|
634
|
-
|
636
|
+
:git)
|
635
637
|
|
636
638
|
2. For implicit gems (dependencies of explicit gems), any source, git,
|
637
|
-
|
638
|
-
|
639
|
-
|
639
|
+
or path repository declared on the parent. This results in bundler
|
640
|
+
prioritizing the ActiveSupport gem from the Rails git repository
|
641
|
+
over ones from rubygems.org
|
640
642
|
|
641
643
|
3. The sources specified via global source lines, searching each
|
642
|
-
|
644
|
+
source in your Gemfile from last added to first added.
|
643
645
|
|
644
646
|
|
645
647
|
|
646
648
|
|
647
649
|
|
648
650
|
|
649
|
-
|
651
|
+
July 2020 GEMFILE(5)
|