rubygems-update 3.6.9 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +853 -790
  3. data/CONTRIBUTING.md +9 -0
  4. data/Manifest.txt +4 -21
  5. data/README.md +1 -1
  6. data/SECURITY.md +7 -0
  7. data/bundler/CHANGELOG.md +1093 -1033
  8. data/bundler/README.md +7 -7
  9. data/bundler/bundler.gemspec +2 -2
  10. data/bundler/lib/bundler/build_metadata.rb +10 -11
  11. data/bundler/lib/bundler/cli/common.rb +1 -1
  12. data/bundler/lib/bundler/cli/config.rb +2 -2
  13. data/bundler/lib/bundler/cli/gem.rb +62 -30
  14. data/bundler/lib/bundler/cli/install.rb +4 -4
  15. data/bundler/lib/bundler/cli/outdated.rb +1 -1
  16. data/bundler/lib/bundler/cli/update.rb +2 -2
  17. data/bundler/lib/bundler/cli.rb +10 -14
  18. data/bundler/lib/bundler/compact_index_client.rb +1 -5
  19. data/bundler/lib/bundler/current_ruby.rb +27 -3
  20. data/bundler/lib/bundler/definition.rb +21 -22
  21. data/bundler/lib/bundler/dependency.rb +1 -1
  22. data/bundler/lib/bundler/dsl.rb +33 -23
  23. data/bundler/lib/bundler/feature_flag.rb +15 -12
  24. data/bundler/lib/bundler/fetcher/dependency.rb +2 -1
  25. data/bundler/lib/bundler/fetcher/downloader.rb +33 -7
  26. data/bundler/lib/bundler/fetcher.rb +49 -19
  27. data/bundler/lib/bundler/friendly_errors.rb +2 -1
  28. data/bundler/lib/bundler/index.rb +7 -2
  29. data/bundler/lib/bundler/installer.rb +5 -4
  30. data/bundler/lib/bundler/lazy_specification.rb +9 -7
  31. data/bundler/lib/bundler/lockfile_parser.rb +21 -5
  32. data/bundler/lib/bundler/man/bundle-add.1 +1 -1
  33. data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
  34. data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
  35. data/bundler/lib/bundler/man/bundle-check.1 +1 -1
  36. data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
  37. data/bundler/lib/bundler/man/bundle-config.1 +172 -126
  38. data/bundler/lib/bundler/man/bundle-config.1.ronn +91 -91
  39. data/bundler/lib/bundler/man/bundle-console.1 +1 -1
  40. data/bundler/lib/bundler/man/bundle-doctor.1 +43 -4
  41. data/bundler/lib/bundler/man/bundle-doctor.1.ronn +48 -4
  42. data/bundler/lib/bundler/man/bundle-env.1 +1 -1
  43. data/bundler/lib/bundler/man/bundle-exec.1 +1 -1
  44. data/bundler/lib/bundler/man/bundle-fund.1 +1 -1
  45. data/bundler/lib/bundler/man/bundle-gem.1 +67 -44
  46. data/bundler/lib/bundler/man/bundle-gem.1.ronn +8 -4
  47. data/bundler/lib/bundler/man/bundle-help.1 +1 -1
  48. data/bundler/lib/bundler/man/bundle-info.1 +1 -1
  49. data/bundler/lib/bundler/man/bundle-init.1 +1 -1
  50. data/bundler/lib/bundler/man/bundle-inject.1 +2 -2
  51. data/bundler/lib/bundler/man/bundle-inject.1.ronn +1 -1
  52. data/bundler/lib/bundler/man/bundle-install.1 +1 -1
  53. data/bundler/lib/bundler/man/bundle-issue.1 +1 -1
  54. data/bundler/lib/bundler/man/bundle-licenses.1 +1 -1
  55. data/bundler/lib/bundler/man/bundle-list.1 +1 -1
  56. data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
  57. data/bundler/lib/bundler/man/bundle-open.1 +1 -1
  58. data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
  59. data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
  60. data/bundler/lib/bundler/man/bundle-plugin.1 +1 -1
  61. data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
  62. data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
  63. data/bundler/lib/bundler/man/bundle-show.1 +1 -1
  64. data/bundler/lib/bundler/man/bundle-update.1 +1 -1
  65. data/bundler/lib/bundler/man/bundle-version.1 +1 -1
  66. data/bundler/lib/bundler/man/bundle-viz.1 +1 -1
  67. data/bundler/lib/bundler/man/bundle.1 +1 -1
  68. data/bundler/lib/bundler/man/gemfile.5 +1 -1
  69. data/bundler/lib/bundler/match_platform.rb +31 -12
  70. data/bundler/lib/bundler/materialization.rb +2 -2
  71. data/bundler/lib/bundler/resolver/package.rb +1 -1
  72. data/bundler/lib/bundler/resolver.rb +1 -3
  73. data/bundler/lib/bundler/rubygems_ext.rb +116 -120
  74. data/bundler/lib/bundler/rubygems_integration.rb +11 -6
  75. data/bundler/lib/bundler/runtime.rb +1 -1
  76. data/bundler/lib/bundler/self_manager.rb +32 -42
  77. data/bundler/lib/bundler/settings/validator.rb +0 -23
  78. data/bundler/lib/bundler/settings.rb +4 -6
  79. data/bundler/lib/bundler/shared_helpers.rb +6 -4
  80. data/bundler/lib/bundler/source/git/git_proxy.rb +3 -3
  81. data/bundler/lib/bundler/source/path.rb +7 -0
  82. data/bundler/lib/bundler/source_list.rb +1 -5
  83. data/bundler/lib/bundler/source_map.rb +1 -1
  84. data/bundler/lib/bundler/spec_set.rb +7 -3
  85. data/bundler/lib/bundler/templates/Executable +0 -11
  86. data/bundler/lib/bundler/templates/newgem/github/workflows/main.yml.tt +2 -0
  87. data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +6 -5
  88. data/bundler/lib/bundler/ui/shell.rb +2 -2
  89. data/bundler/lib/bundler/vendor/net-http-persistent/README.rdoc +1 -1
  90. data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb +2 -1
  91. data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +81 -42
  92. data/bundler/lib/bundler/version.rb +10 -2
  93. data/bundler/lib/bundler/worker.rb +1 -1
  94. data/bundler/lib/bundler.rb +14 -12
  95. data/doc/bundler/UPGRADING.md +137 -127
  96. data/doc/rubygems/CONTRIBUTING.md +1 -1
  97. data/lib/rubygems/basic_specification.rb +7 -0
  98. data/lib/rubygems/commands/pristine_command.rb +9 -12
  99. data/lib/rubygems/commands/setup_command.rb +2 -2
  100. data/lib/rubygems/core_ext/kernel_require.rb +5 -2
  101. data/lib/rubygems/ext/cargo_builder.rb +4 -0
  102. data/lib/rubygems/gemcutter_utilities/webauthn_listener.rb +10 -3
  103. data/lib/rubygems/gemcutter_utilities.rb +1 -1
  104. data/lib/rubygems/installer.rb +45 -50
  105. data/lib/rubygems/platform.rb +142 -39
  106. data/lib/rubygems/remote_fetcher.rb +3 -3
  107. data/lib/rubygems/request_set.rb +3 -6
  108. data/lib/rubygems/resolver/best_set.rb +1 -1
  109. data/lib/rubygems/resolver/source_set.rb +1 -1
  110. data/lib/rubygems/resolver.rb +1 -1
  111. data/lib/rubygems/s3_uri_signer.rb +5 -3
  112. data/lib/rubygems/source.rb +28 -22
  113. data/lib/rubygems/specification.rb +2 -2
  114. data/lib/rubygems/uri_formatter.rb +2 -1
  115. data/lib/rubygems/util/licenses.rb +21 -0
  116. data/lib/rubygems/vendor/net-http/lib/net/http.rb +14 -19
  117. data/lib/rubygems/vendor/resolv/lib/resolv.rb +50 -22
  118. data/lib/rubygems.rb +65 -7
  119. data/rubygems-update.gemspec +2 -2
  120. data/setup.rb +1 -1
  121. metadata +7 -24
  122. data/bundler/lib/bundler/gem_helpers.rb +0 -144
  123. data/bundler/lib/bundler/templates/Executable.bundler +0 -109
  124. data/bundler/lib/bundler/vendor/fileutils/.document +0 -1
  125. data/bundler/lib/bundler/vendor/net-http-persistent/.document +0 -1
  126. data/bundler/lib/bundler/vendor/pub_grub/.document +0 -1
  127. data/bundler/lib/bundler/vendor/securerandom/.document +0 -1
  128. data/bundler/lib/bundler/vendor/thor/.document +0 -1
  129. data/bundler/lib/bundler/vendor/tsort/.document +0 -1
  130. data/bundler/lib/bundler/vendor/uri/.document +0 -1
  131. data/lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA.pem +0 -21
  132. data/lib/rubygems/vendor/molinillo/.document +0 -1
  133. data/lib/rubygems/vendor/net-http/.document +0 -1
  134. data/lib/rubygems/vendor/net-protocol/.document +0 -1
  135. data/lib/rubygems/vendor/optparse/.document +0 -1
  136. data/lib/rubygems/vendor/resolv/.document +0 -1
  137. data/lib/rubygems/vendor/securerandom/.document +0 -1
  138. data/lib/rubygems/vendor/timeout/.document +0 -1
  139. data/lib/rubygems/vendor/tsort/.document +0 -1
  140. data/lib/rubygems/vendor/uri/.document +0 -1
  141. /data/lib/rubygems/ssl_certs/rubygems.org/{GlobalSignRootCA_R3.pem → GlobalSign.pem} +0 -0
  142. /data/{bundler/lib/bundler/vendor/connection_pool → lib/rubygems/vendor}/.document +0 -0
@@ -1,14 +1,21 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-DOCTOR" "1" "March 2025" ""
3
+ .TH "BUNDLE\-DOCTOR" "1" "July 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-doctor\fR \- Checks the bundle for common problems
6
6
  .SH "SYNOPSIS"
7
- \fBbundle doctor\fR [\-\-quiet] [\-\-gemfile=GEMFILE]
7
+ \fBbundle doctor [diagnose]\fR [\-\-quiet] [\-\-gemfile=GEMFILE] [\-\-ssl]
8
+ .br
9
+ \fBbundle doctor ssl\fR [\-\-host=HOST] [\-\-tls\-version=VERSION] [\-\-verify\-mode=MODE]
10
+ .br
11
+ \fBbundle doctor\fR help [COMMAND]
8
12
  .SH "DESCRIPTION"
13
+ You can diagnose common Bundler problems with this command such as checking gem environment or SSL/TLS issue\.
14
+ .SH "SUB\-COMMANDS"
15
+ .SS "diagnose (default command)"
9
16
  Checks your Gemfile and gem environment for common problems\. If issues are detected, Bundler prints them and exits status 1\. Otherwise, Bundler prints a success message and exits status 0\.
10
17
  .P
11
- Examples of common problems caught by bundle\-doctor include:
18
+ Examples of common problems caught include:
12
19
  .IP "\(bu" 4
13
20
  Invalid Bundler settings
14
21
  .IP "\(bu" 4
@@ -20,11 +27,43 @@ Uninstalled gems
20
27
  .IP "\(bu" 4
21
28
  Missing dependencies
22
29
  .IP "" 0
23
- .SH "OPTIONS"
30
+ .P
31
+ \fBOPTIONS\fR
24
32
  .TP
25
33
  \fB\-\-quiet\fR
26
34
  Only output warnings and errors\.
27
35
  .TP
28
36
  \fB\-\-gemfile=GEMFILE\fR
29
37
  The location of the Gemfile(5) which Bundler should use\. This defaults to a Gemfile(5) in the current working directory\. In general, Bundler will assume that the location of the Gemfile(5) is also the project's root and will try to find \fBGemfile\.lock\fR and \fBvendor/cache\fR relative to this location\.
38
+ .TP
39
+ \fB\-\-ssl\fR
40
+ Diagnose common SSL problems when connecting to https://rubygems\.org\.
41
+ .IP
42
+ This flag runs the \fBbundle doctor ssl\fR subcommand with default values underneath\.
43
+ .SS "ssl"
44
+ If you've experienced issues related to SSL certificates and/or TLS versions while connecting to https://rubygems\.org, this command can help troubleshoot common problems\. The diagnostic will perform a few checks such as:
45
+ .IP "\(bu" 4
46
+ Verify the Ruby OpenSSL version installed on your system\.
47
+ .IP "\(bu" 4
48
+ Check the OpenSSL library version used for compilation\.
49
+ .IP "\(bu" 4
50
+ Ensure CA certificates are correctly setup on your machine\.
51
+ .IP "\(bu" 4
52
+ Open a TLS connection and verify the outcome\.
53
+ .IP "" 0
54
+ .P
55
+ \fBOPTIONS\fR
56
+ .TP
57
+ \fB\-\-host=HOST\fR
58
+ Perform the diagnostic on HOST\. Defaults to \fBrubygems\.org\fR\.
59
+ .TP
60
+ \fB\-\-tls\-version=VERSION\fR
61
+ Specify the TLS version when opening the connection to HOST\.
62
+ .IP
63
+ Accepted values are: \fB1\.1\fR or \fB1\.2\fR\.
64
+ .TP
65
+ \fB\-\-verify\-mode=MODE\fR
66
+ Specify the TLS verify mode when opening the connection to HOST\. Defaults to \fBSSL_VERIFY_PEER\fR\.
67
+ .IP
68
+ Accepted values are: \fBCLIENT_ONCE\fR, \fBFAIL_IF_NO_PEER_CERT\fR, \fBNONE\fR, \fBPEER\fR\.
30
69
 
@@ -3,16 +3,27 @@ bundle-doctor(1) -- Checks the bundle for common problems
3
3
 
4
4
  ## SYNOPSIS
5
5
 
6
- `bundle doctor` [--quiet]
7
- [--gemfile=GEMFILE]
6
+ `bundle doctor [diagnose]` [--quiet]
7
+ [--gemfile=GEMFILE]
8
+ [--ssl]<br>
9
+ `bundle doctor ssl` [--host=HOST]
10
+ [--tls-version=VERSION]
11
+ [--verify-mode=MODE]<br>
12
+ `bundle doctor` help [COMMAND]
8
13
 
9
14
  ## DESCRIPTION
10
15
 
16
+ You can diagnose common Bundler problems with this command such as checking gem environment or SSL/TLS issue.
17
+
18
+ ## SUB-COMMANDS
19
+
20
+ ### diagnose (default command)
21
+
11
22
  Checks your Gemfile and gem environment for common problems. If issues
12
23
  are detected, Bundler prints them and exits status 1. Otherwise,
13
24
  Bundler prints a success message and exits status 0.
14
25
 
15
- Examples of common problems caught by bundle-doctor include:
26
+ Examples of common problems caught include:
16
27
 
17
28
  * Invalid Bundler settings
18
29
  * Mismatched Ruby versions
@@ -20,7 +31,7 @@ Examples of common problems caught by bundle-doctor include:
20
31
  * Uninstalled gems
21
32
  * Missing dependencies
22
33
 
23
- ## OPTIONS
34
+ **OPTIONS**
24
35
 
25
36
  * `--quiet`:
26
37
  Only output warnings and errors.
@@ -31,3 +42,36 @@ Examples of common problems caught by bundle-doctor include:
31
42
  will assume that the location of the Gemfile(5) is also the project's
32
43
  root and will try to find `Gemfile.lock` and `vendor/cache` relative
33
44
  to this location.
45
+
46
+ * `--ssl`:
47
+ Diagnose common SSL problems when connecting to https://rubygems.org.
48
+
49
+ This flag runs the `bundle doctor ssl` subcommand with default values
50
+ underneath.
51
+
52
+ ### ssl
53
+
54
+ If you've experienced issues related to SSL certificates and/or TLS versions while connecting
55
+ to https://rubygems.org, this command can help troubleshoot common problems.
56
+ The diagnostic will perform a few checks such as:
57
+
58
+ * Verify the Ruby OpenSSL version installed on your system.
59
+ * Check the OpenSSL library version used for compilation.
60
+ * Ensure CA certificates are correctly setup on your machine.
61
+ * Open a TLS connection and verify the outcome.
62
+
63
+ **OPTIONS**
64
+
65
+ * `--host=HOST`:
66
+ Perform the diagnostic on HOST. Defaults to `rubygems.org`.
67
+
68
+ * `--tls-version=VERSION`:
69
+ Specify the TLS version when opening the connection to HOST.
70
+
71
+ Accepted values are: `1.1` or `1.2`.
72
+
73
+ * `--verify-mode=MODE`:
74
+ Specify the TLS verify mode when opening the connection to HOST.
75
+ Defaults to `SSL_VERIFY_PEER`.
76
+
77
+ Accepted values are: `CLIENT_ONCE`, `FAIL_IF_NO_PEER_CERT`, `NONE`, `PEER`.
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-ENV" "1" "March 2025" ""
3
+ .TH "BUNDLE\-ENV" "1" "July 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-env\fR \- Print information about the environment Bundler is running under
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-EXEC" "1" "March 2025" ""
3
+ .TH "BUNDLE\-EXEC" "1" "July 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-exec\fR \- Execute a command in the context of the bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-FUND" "1" "March 2025" ""
3
+ .TH "BUNDLE\-FUND" "1" "July 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-fund\fR \- Lists information about gems seeking funding assistance
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-GEM" "1" "March 2025" ""
3
+ .TH "BUNDLE\-GEM" "1" "July 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-gem\fR \- Generate a project skeleton for creating a rubygem
6
6
  .SH "SYNOPSIS"
@@ -19,67 +19,90 @@ The generated project skeleton can be customized with OPTIONS, as explained belo
19
19
  \fBgem\.test\fR
20
20
  .IP "" 0
21
21
  .SH "OPTIONS"
22
- .IP "\(bu" 4
23
- \fB\-\-exe\fR, \fB\-\-bin\fR, \fB\-b\fR: Specify that Bundler should create a binary executable (as \fBexe/GEM_NAME\fR) in the generated rubygem project\. This binary will also be added to the \fBGEM_NAME\.gemspec\fR manifest\. This behavior is disabled by default\.
24
- .IP "\(bu" 4
25
- \fB\-\-no\-exe\fR: Do not create a binary (overrides \fB\-\-exe\fR specified in the global config)\.
26
- .IP "\(bu" 4
27
- \fB\-\-coc\fR: Add a \fBCODE_OF_CONDUCT\.md\fR file to the root of the generated project\. If this option is unspecified, an interactive prompt will be displayed and the answer will be saved in Bundler's global config for future \fBbundle gem\fR use\.
28
- .IP "\(bu" 4
29
- \fB\-\-no\-coc\fR: Do not create a \fBCODE_OF_CONDUCT\.md\fR (overrides \fB\-\-coc\fR specified in the global config)\.
30
- .IP "\(bu" 4
31
- \fB\-\-changelog\fR Add a \fBCHANGELOG\.md\fR file to the root of the generated project\. If this option is unspecified, an interactive prompt will be displayed and the answer will be saved in Bundler's global config for future \fBbundle gem\fR use\.
32
- .IP "\(bu" 4
33
- \fB\-\-no\-changelog\fR: Do not create a \fBCHANGELOG\.md\fR (overrides \fB\-\-changelog\fR specified in the global config)\.
34
- .IP "\(bu" 4
35
- \fB\-\-ext=c\fR, \fB\-\-ext=rust\fR: Add boilerplate for C or Rust (currently magnus \fIhttps://docs\.rs/magnus\fR based) extension code to the generated project\. This behavior is disabled by default\.
36
- .IP "\(bu" 4
37
- \fB\-\-no\-ext\fR: Do not add extension code (overrides \fB\-\-ext\fR specified in the global config)\.
38
- .IP "\(bu" 4
39
- \fB\-\-git\fR: Initialize a git repo inside your library\.
40
- .IP "\(bu" 4
41
- \fB\-\-github\-username=GITHUB_USERNAME\fR: Fill in GitHub username on README so that you don't have to do it manually\. Set a default with \fBbundle config set \-\-global gem\.github_username <your_username>\fR\.
42
- .IP "\(bu" 4
43
- \fB\-\-mit\fR: Add an MIT license to a \fBLICENSE\.txt\fR file in the root of the generated project\. Your name from the global git config is used for the copyright statement\. If this option is unspecified, an interactive prompt will be displayed and the answer will be saved in Bundler's global config for future \fBbundle gem\fR use\.
44
- .IP "\(bu" 4
45
- \fB\-\-no\-mit\fR: Do not create a \fBLICENSE\.txt\fR (overrides \fB\-\-mit\fR specified in the global config)\.
46
- .IP "\(bu" 4
47
- \fB\-t\fR, \fB\-\-test=minitest\fR, \fB\-\-test=rspec\fR, \fB\-\-test=test\-unit\fR: Specify the test framework that Bundler should use when generating the project\. Acceptable values are \fBminitest\fR, \fBrspec\fR and \fBtest\-unit\fR\. The \fBGEM_NAME\.gemspec\fR will be configured and a skeleton test/spec directory will be created based on this option\. Given no option is specified:
22
+ .TP
23
+ \fB\-\-exe\fR, \fB\-\-bin\fR, \fB\-b\fR
24
+ Specify that Bundler should create a binary executable (as \fBexe/GEM_NAME\fR) in the generated rubygem project\. This binary will also be added to the \fBGEM_NAME\.gemspec\fR manifest\. This behavior is disabled by default\.
25
+ .TP
26
+ \fB\-\-no\-exe\fR
27
+ Do not create a binary (overrides \fB\-\-exe\fR specified in the global config)\.
28
+ .TP
29
+ \fB\-\-coc\fR
30
+ Add a \fBCODE_OF_CONDUCT\.md\fR file to the root of the generated project\. If this option is unspecified, an interactive prompt will be displayed and the answer will be saved in Bundler's global config for future \fBbundle gem\fR use\.
31
+ .TP
32
+ \fB\-\-no\-coc\fR
33
+ Do not create a \fBCODE_OF_CONDUCT\.md\fR (overrides \fB\-\-coc\fR specified in the global config)\.
34
+ .TP
35
+ \fB\-\-changelog\fR
36
+ Add a \fBCHANGELOG\.md\fR file to the root of the generated project\. If this option is unspecified, an interactive prompt will be displayed and the answer will be saved in Bundler's global config for future \fBbundle gem\fR use\. Update the default with \fBbundle config set \-\-global gem\.changelog <true|false>\fR\.
37
+ .TP
38
+ \fB\-\-no\-changelog\fR
39
+ Do not create a \fBCHANGELOG\.md\fR (overrides \fB\-\-changelog\fR specified in the global config)\.
40
+ .TP
41
+ \fB\-\-ext=c\fR, \fB\-\-ext=rust\fR
42
+ Add boilerplate for C or Rust (currently magnus \fIhttps://docs\.rs/magnus\fR based) extension code to the generated project\. This behavior is disabled by default\.
43
+ .TP
44
+ \fB\-\-no\-ext\fR
45
+ Do not add extension code (overrides \fB\-\-ext\fR specified in the global config)\.
46
+ .TP
47
+ \fB\-\-git\fR
48
+ Initialize a git repo inside your library\.
49
+ .TP
50
+ \fB\-\-github\-username=GITHUB_USERNAME\fR
51
+ Fill in GitHub username on README so that you don't have to do it manually\. Set a default with \fBbundle config set \-\-global gem\.github_username <your_username>\fR\.
52
+ .TP
53
+ \fB\-\-mit\fR
54
+ Add an MIT license to a \fBLICENSE\.txt\fR file in the root of the generated project\. Your name from the global git config is used for the copyright statement\. If this option is unspecified, an interactive prompt will be displayed and the answer will be saved in Bundler's global config for future \fBbundle gem\fR use\.
55
+ .TP
56
+ \fB\-\-no\-mit\fR
57
+ Do not create a \fBLICENSE\.txt\fR (overrides \fB\-\-mit\fR specified in the global config)\.
58
+ .TP
59
+ \fB\-t\fR, \fB\-\-test=minitest\fR, \fB\-\-test=rspec\fR, \fB\-\-test=test\-unit\fR
60
+ Specify the test framework that Bundler should use when generating the project\. Acceptable values are \fBminitest\fR, \fBrspec\fR and \fBtest\-unit\fR\. The \fBGEM_NAME\.gemspec\fR will be configured and a skeleton test/spec directory will be created based on this option\. Given no option is specified:
48
61
  .IP
49
62
  When Bundler is configured to generate tests, this defaults to Bundler's global config setting \fBgem\.test\fR\.
50
63
  .IP
51
64
  When Bundler is configured to not generate tests, an interactive prompt will be displayed and the answer will be used for the current rubygem project\.
52
65
  .IP
53
66
  When Bundler is unconfigured, an interactive prompt will be displayed and the answer will be saved in Bundler's global config for future \fBbundle gem\fR use\.
54
- .IP "\(bu" 4
55
- \fB\-\-no\-test\fR: Do not use a test framework (overrides \fB\-\-test\fR specified in the global config)\.
56
- .IP "\(bu" 4
57
- \fB\-\-changelog\fR: Generate changelog file\. Set a default with \fBbundle config set \-\-global gem\.changelog true\fR\.
58
- .IP "\(bu" 4
59
- \fB\-\-ci\fR, \fB\-\-ci=circle\fR, \fB\-\-ci=github\fR, \fB\-\-ci=gitlab\fR: Specify the continuous integration service that Bundler should use when generating the project\. Acceptable values are \fBgithub\fR, \fBgitlab\fR and \fBcircle\fR\. A configuration file will be generated in the project directory\. Given no option is specified:
67
+ .TP
68
+ \fB\-\-no\-test\fR
69
+ Do not use a test framework (overrides \fB\-\-test\fR specified in the global config)\.
70
+ .TP
71
+ \fB\-\-ci\fR, \fB\-\-ci=circle\fR, \fB\-\-ci=github\fR, \fB\-\-ci=gitlab\fR
72
+ Specify the continuous integration service that Bundler should use when generating the project\. Acceptable values are \fBgithub\fR, \fBgitlab\fR and \fBcircle\fR\. A configuration file will be generated in the project directory\. Given no option is specified:
60
73
  .IP
61
74
  When Bundler is configured to generate CI files, this defaults to Bundler's global config setting \fBgem\.ci\fR\.
62
75
  .IP
63
76
  When Bundler is configured to not generate CI files, an interactive prompt will be displayed and the answer will be used for the current rubygem project\.
64
77
  .IP
65
78
  When Bundler is unconfigured, an interactive prompt will be displayed and the answer will be saved in Bundler's global config for future \fBbundle gem\fR use\.
66
- .IP "\(bu" 4
67
- \fB\-\-no\-ci\fR: Do not use a continuous integration service (overrides \fB\-\-ci\fR specified in the global config)\.
68
- .IP "\(bu" 4
69
- \fB\-\-linter\fR, \fB\-\-linter=rubocop\fR, \fB\-\-linter=standard\fR: Specify the linter and code formatter that Bundler should add to the project's development dependencies\. Acceptable values are \fBrubocop\fR and \fBstandard\fR\. A configuration file will be generated in the project directory\. Given no option is specified:
79
+ .TP
80
+ \fB\-\-no\-ci\fR
81
+ Do not use a continuous integration service (overrides \fB\-\-ci\fR specified in the global config)\.
82
+ .TP
83
+ \fB\-\-linter\fR, \fB\-\-linter=rubocop\fR, \fB\-\-linter=standard\fR
84
+ Specify the linter and code formatter that Bundler should add to the project's development dependencies\. Acceptable values are \fBrubocop\fR and \fBstandard\fR\. A configuration file will be generated in the project directory\. Given no option is specified:
70
85
  .IP
71
86
  When Bundler is configured to add a linter, this defaults to Bundler's global config setting \fBgem\.linter\fR\.
72
87
  .IP
73
88
  When Bundler is configured not to add a linter, an interactive prompt will be displayed and the answer will be used for the current rubygem project\.
74
89
  .IP
75
90
  When Bundler is unconfigured, an interactive prompt will be displayed and the answer will be saved in Bundler's global config for future \fBbundle gem\fR use\.
76
- .IP "\(bu" 4
77
- \fB\-\-no\-linter\fR: Do not add a linter (overrides \fB\-\-linter\fR specified in the global config)\.
78
- .IP "\(bu" 4
79
- \fB\-\-rubocop\fR: Add rubocop to the generated Rakefile and gemspec\. Set a default with \fBbundle config set \-\-global gem\.rubocop true\fR\.
80
- .IP "\(bu" 4
81
- \fB\-\-edit=EDIT\fR, \fB\-e=EDIT\fR: Open the resulting GEM_NAME\.gemspec in EDIT, or the default editor if not specified\. The default is \fB$BUNDLER_EDITOR\fR, \fB$VISUAL\fR, or \fB$EDITOR\fR\.
82
- .IP "" 0
91
+ .TP
92
+ \fB\-\-no\-linter\fR
93
+ Do not add a linter (overrides \fB\-\-linter\fR specified in the global config)\.
94
+ .TP
95
+ \fB\-\-rubocop\fR
96
+ Add rubocop to the generated Rakefile and gemspec\. Set a default with \fBbundle config set \-\-global gem\.rubocop true\fR\.
97
+ .TP
98
+ \fB\-\-edit=EDIT\fR, \fB\-e=EDIT\fR
99
+ Open the resulting GEM_NAME\.gemspec in EDIT, or the default editor if not specified\. The default is \fB$BUNDLER_EDITOR\fR, \fB$VISUAL\fR, or \fB$EDITOR\fR\.
100
+ .TP
101
+ \fB\-\-bundle\fR
102
+ Run \fBbundle install\fR after creating the gem\.
103
+ .TP
104
+ \fB\-\-no\-bundle\fR
105
+ Do not run \fBbundle install\fR after creating the gem\.
83
106
  .SH "SEE ALSO"
84
107
  .IP "\(bu" 4
85
108
  bundle config(1) \fIbundle\-config\.1\.html\fR
@@ -41,10 +41,11 @@ configuration file using the following names:
41
41
  Do not create a `CODE_OF_CONDUCT.md` (overrides `--coc` specified in the
42
42
  global config).
43
43
 
44
- * `--changelog`
44
+ * `--changelog`:
45
45
  Add a `CHANGELOG.md` file to the root of the generated project. If
46
46
  this option is unspecified, an interactive prompt will be displayed and the
47
47
  answer will be saved in Bundler's global config for future `bundle gem` use.
48
+ Update the default with `bundle config set --global gem.changelog <true|false>`.
48
49
 
49
50
  * `--no-changelog`:
50
51
  Do not create a `CHANGELOG.md` (overrides `--changelog` specified in the
@@ -95,9 +96,6 @@ configuration file using the following names:
95
96
  Do not use a test framework (overrides `--test` specified in the global
96
97
  config).
97
98
 
98
- * `--changelog`:
99
- Generate changelog file. Set a default with `bundle config set --global gem.changelog true`.
100
-
101
99
  * `--ci`, `--ci=circle`, `--ci=github`, `--ci=gitlab`:
102
100
  Specify the continuous integration service that Bundler should use when
103
101
  generating the project. Acceptable values are `github`, `gitlab`
@@ -144,6 +142,12 @@ configuration file using the following names:
144
142
  Open the resulting GEM_NAME.gemspec in EDIT, or the default editor if not
145
143
  specified. The default is `$BUNDLER_EDITOR`, `$VISUAL`, or `$EDITOR`.
146
144
 
145
+ * `--bundle`:
146
+ Run `bundle install` after creating the gem.
147
+
148
+ * `--no-bundle`:
149
+ Do not run `bundle install` after creating the gem.
150
+
147
151
  ## SEE ALSO
148
152
 
149
153
  * [bundle config(1)](bundle-config.1.html)
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-HELP" "1" "March 2025" ""
3
+ .TH "BUNDLE\-HELP" "1" "July 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-help\fR \- Displays detailed help for each subcommand
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-INFO" "1" "March 2025" ""
3
+ .TH "BUNDLE\-INFO" "1" "July 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-info\fR \- Show information for the given gem in your bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-INIT" "1" "March 2025" ""
3
+ .TH "BUNDLE\-INIT" "1" "July 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-init\fR \- Generates a Gemfile into the current working directory
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-INJECT" "1" "March 2025" ""
3
+ .TH "BUNDLE\-INJECT" "1" "July 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-inject\fR \- Add named gem(s) with version requirements to Gemfile
6
6
  .SH "SYNOPSIS"
@@ -20,7 +20,7 @@ bundle inject 'rack' '> 0'
20
20
  .P
21
21
  This will inject the 'rack' gem with a version greater than 0 in your [\fBGemfile(5)\fR][Gemfile(5)] and Gemfile\.lock\.
22
22
  .P
23
- The \fBbundle inject\fR command was deprecated in Bundler 2\.1 and will be removed in Bundler 3\.0\.
23
+ The \fBbundle inject\fR command was deprecated in Bundler 2\.1 and will be removed in Bundler 4\.0\.
24
24
  .SH "OPTIONS"
25
25
  .TP
26
26
  \fB\-\-source=SOURCE\fR
@@ -21,7 +21,7 @@ Example:
21
21
  This will inject the 'rack' gem with a version greater than 0 in your
22
22
  [`Gemfile(5)`][Gemfile(5)] and Gemfile.lock.
23
23
 
24
- The `bundle inject` command was deprecated in Bundler 2.1 and will be removed in Bundler 3.0.
24
+ The `bundle inject` command was deprecated in Bundler 2.1 and will be removed in Bundler 4.0.
25
25
 
26
26
  ## OPTIONS
27
27
 
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-INSTALL" "1" "March 2025" ""
3
+ .TH "BUNDLE\-INSTALL" "1" "July 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-ISSUE" "1" "March 2025" ""
3
+ .TH "BUNDLE\-ISSUE" "1" "July 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-issue\fR \- Get help reporting Bundler issues
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-LICENSES" "1" "March 2025" ""
3
+ .TH "BUNDLE\-LICENSES" "1" "July 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-licenses\fR \- Print the license of all gems in the bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-LIST" "1" "March 2025" ""
3
+ .TH "BUNDLE\-LIST" "1" "July 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-list\fR \- List all the gems in the bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-LOCK" "1" "March 2025" ""
3
+ .TH "BUNDLE\-LOCK" "1" "July 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-lock\fR \- Creates / Updates a lockfile without installing
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-OPEN" "1" "March 2025" ""
3
+ .TH "BUNDLE\-OPEN" "1" "July 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-open\fR \- Opens the source directory for a gem in your bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-OUTDATED" "1" "March 2025" ""
3
+ .TH "BUNDLE\-OUTDATED" "1" "July 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-outdated\fR \- List installed gems with newer versions available
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-PLATFORM" "1" "March 2025" ""
3
+ .TH "BUNDLE\-PLATFORM" "1" "July 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-platform\fR \- Displays platform compatibility information
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-PLUGIN" "1" "March 2025" ""
3
+ .TH "BUNDLE\-PLUGIN" "1" "July 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-plugin\fR \- Manage Bundler plugins
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-PRISTINE" "1" "March 2025" ""
3
+ .TH "BUNDLE\-PRISTINE" "1" "July 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-pristine\fR \- Restores installed gems to their pristine condition
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-REMOVE" "1" "March 2025" ""
3
+ .TH "BUNDLE\-REMOVE" "1" "July 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-remove\fR \- Removes gems from the Gemfile
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-SHOW" "1" "March 2025" ""
3
+ .TH "BUNDLE\-SHOW" "1" "July 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-UPDATE" "1" "March 2025" ""
3
+ .TH "BUNDLE\-UPDATE" "1" "July 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-update\fR \- Update your gems to the latest available versions
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-VERSION" "1" "March 2025" ""
3
+ .TH "BUNDLE\-VERSION" "1" "July 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-version\fR \- Prints Bundler version information
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-VIZ" "1" "March 2025" ""
3
+ .TH "BUNDLE\-VIZ" "1" "July 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-viz\fR \- Generates a visual dependency graph for your Gemfile
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE" "1" "March 2025" ""
3
+ .TH "BUNDLE" "1" "July 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\fR \- Ruby Dependency Management
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "GEMFILE" "5" "March 2025" ""
3
+ .TH "GEMFILE" "5" "July 2025" ""
4
4
  .SH "NAME"
5
5
  \fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
6
6
  .SH "SYNOPSIS"
@@ -1,23 +1,42 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "gem_helpers"
4
-
5
3
  module Bundler
6
4
  module MatchPlatform
7
- include GemHelpers
5
+ def installable_on_platform?(target_platform) # :nodoc:
6
+ return true if [Gem::Platform::RUBY, nil, target_platform].include?(platform)
7
+ return true if Gem::Platform.new(platform) === target_platform
8
8
 
9
- def match_platform(p)
10
- MatchPlatform.platforms_match?(platform, p)
9
+ false
11
10
  end
12
11
 
13
- def self.platforms_match?(gemspec_platform, local_platform)
14
- return true if gemspec_platform.nil?
15
- return true if gemspec_platform == Gem::Platform::RUBY
16
- return true if local_platform == gemspec_platform
17
- gemspec_platform = Gem::Platform.new(gemspec_platform)
18
- return true if gemspec_platform === local_platform
12
+ def self.select_best_platform_match(specs, platform, force_ruby: false, prefer_locked: false)
13
+ matching = select_all_platform_match(specs, platform, force_ruby: force_ruby, prefer_locked: prefer_locked)
19
14
 
20
- false
15
+ Gem::Platform.sort_and_filter_best_platform_match(matching, platform)
16
+ end
17
+
18
+ def self.select_best_local_platform_match(specs, force_ruby: false)
19
+ local = Bundler.local_platform
20
+ matching = select_all_platform_match(specs, local, force_ruby: force_ruby).filter_map(&:materialized_for_installation)
21
+
22
+ Gem::Platform.sort_best_platform_match(matching, local)
23
+ end
24
+
25
+ def self.select_all_platform_match(specs, platform, force_ruby: false, prefer_locked: false)
26
+ matching = specs.select {|spec| spec.installable_on_platform?(force_ruby ? Gem::Platform::RUBY : platform) }
27
+
28
+ specs.each(&:force_ruby_platform!) if force_ruby
29
+
30
+ if prefer_locked
31
+ locked_originally = matching.select {|spec| spec.is_a?(::Bundler::LazySpecification) }
32
+ return locked_originally if locked_originally.any?
33
+ end
34
+
35
+ matching
36
+ end
37
+
38
+ def self.generic_local_platform_is_ruby?
39
+ Bundler.generic_local_platform == Gem::Platform::RUBY
21
40
  end
22
41
  end
23
42
  end
@@ -22,9 +22,9 @@ module Bundler
22
22
  @specs ||= if @candidates.nil?
23
23
  []
24
24
  elsif platform
25
- GemHelpers.select_best_platform_match(@candidates, platform, force_ruby: dep.force_ruby_platform)
25
+ MatchPlatform.select_best_platform_match(@candidates, platform, force_ruby: dep.force_ruby_platform)
26
26
  else
27
- GemHelpers.select_best_local_platform_match(@candidates, force_ruby: dep.force_ruby_platform || dep.default_force_ruby_platform)
27
+ MatchPlatform.select_best_local_platform_match(@candidates, force_ruby: dep.force_ruby_platform || dep.default_force_ruby_platform)
28
28
  end
29
29
  end
30
30