bundler 2.2.33 → 2.4.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (263) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +682 -1
  3. data/README.md +3 -6
  4. data/bundler.gemspec +8 -10
  5. data/exe/bundle +12 -24
  6. data/exe/bundler +1 -1
  7. data/lib/bundler/.document +1 -0
  8. data/lib/bundler/build_metadata.rb +3 -3
  9. data/lib/bundler/cli/add.rb +1 -1
  10. data/lib/bundler/cli/binstubs.rb +5 -1
  11. data/lib/bundler/cli/check.rb +1 -1
  12. data/lib/bundler/cli/common.rb +4 -2
  13. data/lib/bundler/cli/config.rb +10 -1
  14. data/lib/bundler/cli/console.rb +2 -2
  15. data/lib/bundler/cli/doctor.rb +7 -1
  16. data/lib/bundler/cli/gem.rb +73 -41
  17. data/lib/bundler/cli/info.rb +11 -2
  18. data/lib/bundler/cli/init.rb +6 -2
  19. data/lib/bundler/cli/install.rb +15 -33
  20. data/lib/bundler/cli/lock.rb +8 -5
  21. data/lib/bundler/cli/open.rb +6 -4
  22. data/lib/bundler/cli/outdated.rb +13 -6
  23. data/lib/bundler/cli/platform.rb +2 -2
  24. data/lib/bundler/cli/show.rb +1 -1
  25. data/lib/bundler/cli/update.rb +6 -2
  26. data/lib/bundler/cli/viz.rb +1 -1
  27. data/lib/bundler/cli.rb +63 -20
  28. data/lib/bundler/compact_index_client/cache.rb +1 -10
  29. data/lib/bundler/compact_index_client/updater.rb +53 -39
  30. data/lib/bundler/compact_index_client.rb +0 -6
  31. data/lib/bundler/constants.rb +1 -1
  32. data/lib/bundler/current_ruby.rb +18 -6
  33. data/lib/bundler/definition.rb +289 -165
  34. data/lib/bundler/dependency.rb +24 -71
  35. data/lib/bundler/digest.rb +1 -1
  36. data/lib/bundler/dsl.rb +13 -45
  37. data/lib/bundler/endpoint_specification.rb +15 -13
  38. data/lib/bundler/env.rb +2 -2
  39. data/lib/bundler/environment_preserver.rb +3 -2
  40. data/lib/bundler/errors.rb +15 -15
  41. data/lib/bundler/feature_flag.rb +0 -2
  42. data/lib/bundler/fetcher/base.rb +6 -8
  43. data/lib/bundler/fetcher/compact_index.rb +18 -25
  44. data/lib/bundler/fetcher/dependency.rb +2 -6
  45. data/lib/bundler/fetcher/downloader.rb +2 -5
  46. data/lib/bundler/fetcher/index.rb +0 -26
  47. data/lib/bundler/fetcher.rb +22 -29
  48. data/lib/bundler/force_platform.rb +18 -0
  49. data/lib/bundler/friendly_errors.rb +21 -7
  50. data/lib/bundler/gem_helper.rb +2 -2
  51. data/lib/bundler/gem_helpers.rb +9 -2
  52. data/lib/bundler/gem_version_promoter.rb +53 -98
  53. data/lib/bundler/graph.rb +3 -3
  54. data/lib/bundler/index.rb +13 -51
  55. data/lib/bundler/injector.rb +18 -4
  56. data/lib/bundler/inline.rb +9 -21
  57. data/lib/bundler/installer/gem_installer.rb +13 -5
  58. data/lib/bundler/installer/parallel_installer.rb +3 -33
  59. data/lib/bundler/installer/standalone.rb +42 -11
  60. data/lib/bundler/installer.rb +21 -45
  61. data/lib/bundler/lazy_specification.rb +55 -54
  62. data/lib/bundler/lockfile_generator.rb +3 -3
  63. data/lib/bundler/lockfile_parser.rb +29 -27
  64. data/lib/bundler/man/bundle-add.1 +21 -5
  65. data/lib/bundler/man/bundle-add.1.ronn +16 -4
  66. data/lib/bundler/man/bundle-binstubs.1 +1 -1
  67. data/lib/bundler/man/bundle-cache.1 +9 -3
  68. data/lib/bundler/man/bundle-cache.1.ronn +9 -2
  69. data/lib/bundler/man/bundle-check.1 +1 -1
  70. data/lib/bundler/man/bundle-clean.1 +2 -2
  71. data/lib/bundler/man/bundle-clean.1.ronn +1 -1
  72. data/lib/bundler/man/bundle-config.1 +32 -16
  73. data/lib/bundler/man/bundle-config.1.ronn +29 -20
  74. data/lib/bundler/man/bundle-console.1 +53 -0
  75. data/lib/bundler/man/bundle-console.1.ronn +44 -0
  76. data/lib/bundler/man/bundle-doctor.1 +1 -1
  77. data/lib/bundler/man/bundle-exec.1 +6 -6
  78. data/lib/bundler/man/bundle-exec.1.ronn +6 -6
  79. data/lib/bundler/man/bundle-gem.1 +27 -37
  80. data/lib/bundler/man/bundle-gem.1.ronn +5 -5
  81. data/lib/bundler/man/bundle-help.1 +13 -0
  82. data/lib/bundler/man/bundle-help.1.ronn +12 -0
  83. data/lib/bundler/man/bundle-info.1 +1 -1
  84. data/lib/bundler/man/bundle-init.1 +5 -1
  85. data/lib/bundler/man/bundle-init.1.ronn +2 -0
  86. data/lib/bundler/man/bundle-inject.1 +5 -2
  87. data/lib/bundler/man/bundle-inject.1.ronn +3 -1
  88. data/lib/bundler/man/bundle-install.1 +6 -31
  89. data/lib/bundler/man/bundle-install.1.ronn +8 -31
  90. data/lib/bundler/man/bundle-list.1 +1 -1
  91. data/lib/bundler/man/bundle-lock.1 +1 -1
  92. data/lib/bundler/man/bundle-open.1 +22 -2
  93. data/lib/bundler/man/bundle-open.1.ronn +9 -1
  94. data/lib/bundler/man/bundle-outdated.1 +15 -18
  95. data/lib/bundler/man/bundle-outdated.1.ronn +13 -19
  96. data/lib/bundler/man/bundle-platform.1 +16 -6
  97. data/lib/bundler/man/bundle-platform.1.ronn +14 -7
  98. data/lib/bundler/man/bundle-plugin.1 +81 -0
  99. data/lib/bundler/man/bundle-plugin.1.ronn +59 -0
  100. data/lib/bundler/man/bundle-pristine.1 +1 -1
  101. data/lib/bundler/man/bundle-remove.1 +1 -1
  102. data/lib/bundler/man/bundle-show.1 +1 -1
  103. data/lib/bundler/man/bundle-update.1 +2 -2
  104. data/lib/bundler/man/bundle-update.1.ronn +2 -1
  105. data/lib/bundler/man/bundle-version.1 +35 -0
  106. data/lib/bundler/man/bundle-version.1.ronn +24 -0
  107. data/lib/bundler/man/bundle-viz.1 +4 -1
  108. data/lib/bundler/man/bundle-viz.1.ronn +2 -0
  109. data/lib/bundler/man/bundle.1 +15 -10
  110. data/lib/bundler/man/bundle.1.ronn +12 -7
  111. data/lib/bundler/man/gemfile.5 +94 -83
  112. data/lib/bundler/man/gemfile.5.ronn +100 -87
  113. data/lib/bundler/man/index.txt +4 -0
  114. data/lib/bundler/match_metadata.rb +13 -0
  115. data/lib/bundler/match_platform.rb +0 -1
  116. data/lib/bundler/match_remote_metadata.rb +29 -0
  117. data/lib/bundler/mirror.rb +5 -7
  118. data/lib/bundler/plugin/api/source.rb +3 -9
  119. data/lib/bundler/plugin/index.rb +4 -4
  120. data/lib/bundler/plugin/installer/git.rb +0 -4
  121. data/lib/bundler/plugin/installer/rubygems.rb +0 -8
  122. data/lib/bundler/plugin/installer.rb +6 -3
  123. data/lib/bundler/plugin.rb +3 -1
  124. data/lib/bundler/process_lock.rb +1 -1
  125. data/lib/bundler/remote_specification.rb +7 -5
  126. data/lib/bundler/resolver/base.rb +107 -0
  127. data/lib/bundler/resolver/candidate.rb +94 -0
  128. data/lib/bundler/resolver/incompatibility.rb +15 -0
  129. data/lib/bundler/resolver/package.rb +72 -0
  130. data/lib/bundler/resolver/root.rb +25 -0
  131. data/lib/bundler/resolver/spec_group.rb +43 -71
  132. data/lib/bundler/resolver.rb +342 -302
  133. data/lib/bundler/ruby_dsl.rb +1 -1
  134. data/lib/bundler/ruby_version.rb +6 -19
  135. data/lib/bundler/rubygems_ext.rb +149 -28
  136. data/lib/bundler/rubygems_gem_installer.rb +32 -20
  137. data/lib/bundler/rubygems_integration.rb +24 -95
  138. data/lib/bundler/runtime.rb +2 -7
  139. data/lib/bundler/safe_marshal.rb +31 -0
  140. data/lib/bundler/self_manager.rb +168 -0
  141. data/lib/bundler/settings.rb +7 -12
  142. data/lib/bundler/setup.rb +4 -1
  143. data/lib/bundler/shared_helpers.rb +15 -22
  144. data/lib/bundler/source/git/git_proxy.rb +237 -74
  145. data/lib/bundler/source/git.rb +54 -38
  146. data/lib/bundler/source/metadata.rb +3 -4
  147. data/lib/bundler/source/path/installer.rb +1 -22
  148. data/lib/bundler/source/path.rb +7 -7
  149. data/lib/bundler/source/rubygems.rb +85 -128
  150. data/lib/bundler/source.rb +4 -5
  151. data/lib/bundler/source_list.rb +12 -2
  152. data/lib/bundler/source_map.rb +15 -2
  153. data/lib/bundler/spec_set.rb +62 -34
  154. data/lib/bundler/stub_specification.rb +5 -3
  155. data/lib/bundler/templates/Executable +3 -5
  156. data/lib/bundler/templates/Executable.bundler +6 -11
  157. data/lib/bundler/templates/Executable.standalone +4 -4
  158. data/lib/bundler/templates/Gemfile +0 -2
  159. data/lib/bundler/templates/newgem/Cargo.toml.tt +7 -0
  160. data/lib/bundler/templates/newgem/Gemfile.tt +3 -0
  161. data/lib/bundler/templates/newgem/README.md.tt +7 -11
  162. data/lib/bundler/templates/newgem/Rakefile.tt +22 -2
  163. data/lib/bundler/templates/newgem/bin/console.tt +0 -4
  164. data/lib/bundler/templates/newgem/circleci/config.yml.tt +12 -0
  165. data/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +15 -0
  166. data/lib/bundler/templates/newgem/ext/newgem/extconf-c.rb.tt +10 -0
  167. data/lib/bundler/templates/newgem/ext/newgem/extconf-rust.rb.tt +6 -0
  168. data/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt +1 -1
  169. data/lib/bundler/templates/newgem/ext/newgem/src/lib.rs.tt +12 -0
  170. data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +11 -1
  171. data/lib/bundler/templates/newgem/gitignore.tt +3 -0
  172. data/lib/bundler/templates/newgem/gitlab-ci.yml.tt +13 -4
  173. data/lib/bundler/templates/newgem/newgem.gemspec.tt +11 -4
  174. data/lib/bundler/templates/newgem/standard.yml.tt +1 -0
  175. data/lib/bundler/templates/newgem/test/minitest/{newgem_test.rb.tt → test_newgem.rb.tt} +1 -1
  176. data/lib/bundler/ui/shell.rb +36 -13
  177. data/lib/bundler/ui/silent.rb +21 -5
  178. data/lib/bundler/uri_normalizer.rb +23 -0
  179. data/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +3 -3
  180. data/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb +0 -1
  181. data/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +3 -1
  182. data/lib/bundler/vendor/fileutils/lib/fileutils.rb +1351 -409
  183. data/lib/bundler/vendor/net-http-persistent/README.rdoc +1 -1
  184. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +1 -1
  185. data/lib/bundler/vendor/pub_grub/LICENSE.txt +21 -0
  186. data/lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb +20 -0
  187. data/lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb +189 -0
  188. data/lib/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb +182 -0
  189. data/lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb +150 -0
  190. data/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb +43 -0
  191. data/lib/bundler/vendor/pub_grub/lib/pub_grub/partial_solution.rb +121 -0
  192. data/lib/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb +45 -0
  193. data/lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb +19 -0
  194. data/lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb +60 -0
  195. data/lib/bundler/vendor/pub_grub/lib/pub_grub/term.rb +105 -0
  196. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version.rb +3 -0
  197. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb +129 -0
  198. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb +411 -0
  199. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +248 -0
  200. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb +178 -0
  201. data/lib/bundler/vendor/pub_grub/lib/pub_grub.rb +31 -0
  202. data/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +6 -6
  203. data/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +1 -2
  204. data/lib/bundler/vendor/thor/lib/thor/actions.rb +6 -2
  205. data/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +6 -0
  206. data/lib/bundler/vendor/thor/lib/thor/error.rb +9 -4
  207. data/lib/bundler/vendor/thor/lib/thor/parser/options.rb +19 -1
  208. data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +23 -5
  209. data/lib/bundler/vendor/thor/lib/thor/shell.rb +1 -1
  210. data/lib/bundler/vendor/thor/lib/thor/util.rb +1 -1
  211. data/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
  212. data/lib/bundler/vendor/tsort/lib/tsort.rb +318 -319
  213. data/lib/bundler/vendor/uri/lib/uri/common.rb +76 -91
  214. data/lib/bundler/vendor/uri/lib/uri/file.rb +7 -1
  215. data/lib/bundler/vendor/uri/lib/uri/ftp.rb +2 -2
  216. data/lib/bundler/vendor/uri/lib/uri/generic.rb +32 -13
  217. data/lib/bundler/vendor/uri/lib/uri/http.rb +40 -3
  218. data/lib/bundler/vendor/uri/lib/uri/https.rb +2 -2
  219. data/lib/bundler/vendor/uri/lib/uri/ldap.rb +2 -2
  220. data/lib/bundler/vendor/uri/lib/uri/ldaps.rb +2 -1
  221. data/lib/bundler/vendor/uri/lib/uri/mailto.rb +2 -3
  222. data/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +16 -23
  223. data/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +12 -18
  224. data/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
  225. data/lib/bundler/vendor/uri/lib/uri/ws.rb +83 -0
  226. data/lib/bundler/vendor/uri/lib/uri/wss.rb +23 -0
  227. data/lib/bundler/vendor/uri/lib/uri.rb +3 -3
  228. data/lib/bundler/vendored_persistent.rb +1 -33
  229. data/lib/bundler/{vendored_tmpdir.rb → vendored_pub_grub.rb} +1 -1
  230. data/lib/bundler/version.rb +5 -1
  231. data/lib/bundler/worker.rb +5 -7
  232. data/lib/bundler.rb +47 -82
  233. metadata +52 -38
  234. data/lib/bundler/dep_proxy.rb +0 -55
  235. data/lib/bundler/gemdeps.rb +0 -29
  236. data/lib/bundler/psyched_yaml.rb +0 -22
  237. data/lib/bundler/templates/gems.rb +0 -8
  238. data/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt +0 -5
  239. data/lib/bundler/templates/newgem/travis.yml.tt +0 -6
  240. data/lib/bundler/vendor/molinillo/LICENSE +0 -9
  241. data/lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +0 -57
  242. data/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +0 -88
  243. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb +0 -36
  244. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +0 -66
  245. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +0 -62
  246. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +0 -63
  247. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +0 -61
  248. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb +0 -126
  249. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb +0 -46
  250. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +0 -36
  251. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +0 -164
  252. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +0 -255
  253. data/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +0 -143
  254. data/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +0 -6
  255. data/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +0 -112
  256. data/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb +0 -67
  257. data/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +0 -839
  258. data/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb +0 -46
  259. data/lib/bundler/vendor/molinillo/lib/molinillo/state.rb +0 -58
  260. data/lib/bundler/vendor/molinillo/lib/molinillo.rb +0 -11
  261. data/lib/bundler/vendor/tmpdir/lib/tmpdir.rb +0 -154
  262. data/lib/bundler/vendored_molinillo.rb +0 -4
  263. data/lib/bundler/version_ranges.rb +0 -122
@@ -36,9 +36,9 @@ We divide `bundle` subcommands into primary commands and utilities:
36
36
  * [`bundle update(1)`](bundle-update.1.html):
37
37
  Update dependencies to their latest versions
38
38
 
39
- * [`bundle package(1)`](bundle-package.1.html):
39
+ * [`bundle cache(1)`](bundle-cache.1.html):
40
40
  Package the .gem files required by your application into the
41
- `vendor/cache` directory
41
+ `vendor/cache` directory (aliases: `bundle package`, `bundle pack`)
42
42
 
43
43
  * [`bundle exec(1)`](bundle-exec.1.html):
44
44
  Execute a script in the current bundle
@@ -46,7 +46,7 @@ We divide `bundle` subcommands into primary commands and utilities:
46
46
  * [`bundle config(1)`](bundle-config.1.html):
47
47
  Specify and read configuration options for Bundler
48
48
 
49
- * `bundle help(1)`:
49
+ * [`bundle help(1)`](bundle-help.1.html):
50
50
  Display detailed help for each subcommand
51
51
 
52
52
  ## UTILITIES
@@ -67,7 +67,7 @@ We divide `bundle` subcommands into primary commands and utilities:
67
67
  * [`bundle outdated(1)`](bundle-outdated.1.html):
68
68
  Show all of the outdated gems in the current bundle
69
69
 
70
- * `bundle console(1)`:
70
+ * `bundle console(1)` (deprecated):
71
71
  Start an IRB session in the current bundle
72
72
 
73
73
  * [`bundle open(1)`](bundle-open.1.html):
@@ -76,7 +76,7 @@ We divide `bundle` subcommands into primary commands and utilities:
76
76
  * [`bundle lock(1)`](bundle-lock.1.html):
77
77
  Generate a lockfile for your dependencies
78
78
 
79
- * [`bundle viz(1)`](bundle-viz.1.html):
79
+ * [`bundle viz(1)`](bundle-viz.1.html) (deprecated):
80
80
  Generate a visual representation of your dependencies
81
81
 
82
82
  * [`bundle init(1)`](bundle-init.1.html):
@@ -97,6 +97,12 @@ We divide `bundle` subcommands into primary commands and utilities:
97
97
  * [`bundle remove(1)`](bundle-remove.1.html):
98
98
  Removes gems from the Gemfile
99
99
 
100
+ * [`bundle plugin(1)`](bundle-plugin.1.html):
101
+ Manage Bundler plugins
102
+
103
+ * [`bundle version(1)`](bundle-version.1.html):
104
+ Prints Bundler version information
105
+
100
106
  ## PLUGINS
101
107
 
102
108
  When running a command that isn't listed in PRIMARY COMMANDS or UTILITIES,
@@ -107,5 +113,4 @@ and execute it, passing down any extra arguments to it.
107
113
 
108
114
  These commands are obsolete and should no longer be used:
109
115
 
110
- * `bundle cache(1)`
111
- * `bundle show(1)`
116
+ * `bundle inject(1)`
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "GEMFILE" "5" "December 2021" "" ""
4
+ .TH "GEMFILE" "5" "July 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
@@ -15,8 +15,8 @@ Place the \fBGemfile\fR in the root of the directory containing the associated c
15
15
  .SH "SYNTAX"
16
16
  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
17
  .
18
- .SH "GLOBAL SOURCES"
19
- At the top of the \fBGemfile\fR, add a line for the \fBRubygems\fR source that contains the gems listed in the \fBGemfile\fR\.
18
+ .SH "GLOBAL SOURCE"
19
+ 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
20
  .
21
21
  .IP "" 4
22
22
  .
@@ -29,10 +29,16 @@ source "https://rubygems\.org"
29
29
  .IP "" 0
30
30
  .
31
31
  .P
32
- It is possible, but not recommended as of Bundler 1\.7, to add multiple global \fBsource\fR lines\. Each of these \fBsource\fRs \fBMUST\fR be a valid Rubygems repository\.
32
+ 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
33
  .
34
34
  .P
35
- Sources are checked for gems following the heuristics described in \fISOURCE PRIORITY\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 a \fI\fBsource\fR block\fR\.
35
+ To use more than one source of RubyGems, you should use \fI\fBsource\fR block\fR\.
36
+ .
37
+ .P
38
+ A source is checked for gems following the heuristics described in \fISOURCE PRIORITY\fR\.
39
+ .
40
+ .P
41
+ \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\.
36
42
  .
37
43
  .SS "CREDENTIALS"
38
44
  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\.
@@ -67,13 +73,13 @@ Credentials in the source URL will take precedence over credentials set using \f
67
73
  If your application requires a specific Ruby version or engine, specify your requirements using the \fBruby\fR method, with the following arguments\. All parameters are \fBOPTIONAL\fR unless otherwise specified\.
68
74
  .
69
75
  .SS "VERSION (required)"
70
- The version of Ruby that your application requires\. If your application requires an alternate Ruby engine, such as JRuby, Rubinius or TruffleRuby, this should be the Ruby version that the engine is compatible with\.
76
+ 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\.
71
77
  .
72
78
  .IP "" 4
73
79
  .
74
80
  .nf
75
81
 
76
- ruby "1\.9\.3"
82
+ ruby "3\.1\.2"
77
83
  .
78
84
  .fi
79
85
  .
@@ -89,7 +95,7 @@ What exactly is an Engine? \- A Ruby engine is an implementation of the Ruby lan
89
95
  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\.
90
96
  .
91
97
  .IP "\(bu" 4
92
- Other implementations \fIhttps://www\.ruby\-lang\.org/en/about/\fR of Ruby exist\. Some of the more well\-known implementations include Rubinius \fIhttps://rubinius\.com/\fR, and JRuby \fIhttp://jruby\.org/\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\.
98
+ Other implementations \fIhttps://www\.ruby\-lang\.org/en/about/\fR of Ruby exist\. Some of the more well\-known implementations include JRuby \fIhttp://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\.
93
99
  .
94
100
  .IP "" 0
95
101
  .
@@ -100,20 +106,23 @@ Each application \fImay\fR specify a Ruby engine version\. If an engine version
100
106
  .
101
107
  .nf
102
108
 
103
- ruby "1\.8\.7", :engine => "jruby", :engine_version => "1\.6\.7"
109
+ ruby "2\.6\.8", engine: "jruby", engine_version: "9\.3\.8\.0"
104
110
  .
105
111
  .fi
106
112
  .
107
113
  .IP "" 0
108
114
  .
109
115
  .SS "PATCHLEVEL"
110
- Each application \fImay\fR specify a Ruby patchlevel\.
116
+ 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
+ .P
119
+ This option was implemented in Bundler 1\.4\.0 for Ruby 2\.0 or earlier\.
111
120
  .
112
121
  .IP "" 4
113
122
  .
114
123
  .nf
115
124
 
116
- ruby "2\.0\.0", :patchlevel => "247"
125
+ ruby "3\.1\.2", patchlevel: "20"
117
126
  .
118
127
  .fi
119
128
  .
@@ -156,9 +165,9 @@ Each \fIgem\fR \fBMAY\fR specify files that should be used when autorequiring vi
156
165
  .
157
166
  .nf
158
167
 
159
- gem "redis", :require => ["redis/connection/hiredis", "redis"]
160
- gem "webmock", :require => false
161
- gem "byebug", :require => true
168
+ gem "redis", require: ["redis/connection/hiredis", "redis"]
169
+ gem "webmock", require: false
170
+ gem "byebug", require: true
162
171
  .
163
172
  .fi
164
173
  .
@@ -172,8 +181,8 @@ The argument defaults to the name of the gem\. For example, these are identical:
172
181
  .nf
173
182
 
174
183
  gem "nokogiri"
175
- gem "nokogiri", :require => "nokogiri"
176
- gem "nokogiri", :require => true
184
+ gem "nokogiri", require: "nokogiri"
185
+ gem "nokogiri", require: true
177
186
  .
178
187
  .fi
179
188
  .
@@ -186,8 +195,8 @@ Each \fIgem\fR \fBMAY\fR specify membership in one or more groups\. Any \fIgem\f
186
195
  .
187
196
  .nf
188
197
 
189
- gem "rspec", :group => :test
190
- gem "wirble", :groups => [:development, :test]
198
+ gem "rspec", group: :test
199
+ gem "wirble", groups: [:development, :test]
191
200
  .
192
201
  .fi
193
202
  .
@@ -248,19 +257,23 @@ There are a number of \fBGemfile\fR platforms:
248
257
  .
249
258
  .TP
250
259
  \fBruby\fR
251
- C Ruby (MRI), Rubinius or TruffleRuby, but \fBNOT\fR Windows
260
+ C Ruby (MRI), Rubinius, or TruffleRuby, but not Windows
252
261
  .
253
262
  .TP
254
263
  \fBmri\fR
255
- Same as \fIruby\fR, but only C Ruby (MRI)
264
+ C Ruby (MRI) only, but not Windows
265
+ .
266
+ .TP
267
+ \fBwindows\fR
268
+ Windows C Ruby (MRI), including RubyInstaller 32\-bit and 64\-bit versions
256
269
  .
257
270
  .TP
258
- \fBmingw\fR
259
- Windows 32 bit \'mingw32\' platform (aka RubyInstaller)
271
+ \fBmswin\fR
272
+ Windows C Ruby (MRI), including RubyInstaller 32\-bit versions
260
273
  .
261
274
  .TP
262
- \fBx64_mingw\fR
263
- Windows 64 bit \'mingw32\' platform (aka RubyInstaller x64)
275
+ \fBmswin64\fR
276
+ Windows C Ruby (MRI), including RubyInstaller 64\-bit versions
264
277
  .
265
278
  .TP
266
279
  \fBrbx\fR
@@ -274,84 +287,82 @@ JRuby
274
287
  \fBtruffleruby\fR
275
288
  TruffleRuby
276
289
  .
277
- .TP
278
- \fBmswin\fR
279
- Windows
280
- .
281
- .P
282
- You can restrict further by platform and version for all platforms \fIexcept\fR for \fBrbx\fR, \fBjruby\fR, \fBtruffleruby\fR and \fBmswin\fR\.
283
- .
284
290
  .P
285
- To specify a version in addition to a platform, append the version number without the delimiter to the platform\. For example, to specify that a gem should only be used on platforms with Ruby 2\.3, use:
291
+ 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:
286
292
  .
287
293
  .IP "" 4
288
294
  .
289
295
  .nf
290
296
 
291
- ruby_23
297
+ ruby_31
292
298
  .
293
299
  .fi
294
300
  .
295
301
  .IP "" 0
296
302
  .
297
303
  .P
298
- The full list of platforms and supported versions includes:
304
+ As with groups (above), you may specify one or more platforms:
299
305
  .
300
- .TP
301
- \fBruby\fR
302
- 1\.8, 1\.9, 2\.0, 2\.1, 2\.2, 2\.3, 2\.4, 2\.5, 2\.6
306
+ .IP "" 4
303
307
  .
304
- .TP
305
- \fBmri\fR
306
- 1\.8, 1\.9, 2\.0, 2\.1, 2\.2, 2\.3, 2\.4, 2\.5, 2\.6
308
+ .nf
309
+
310
+ gem "weakling", platforms: :jruby
311
+ gem "ruby\-debug", platforms: :mri_31
312
+ gem "nokogiri", platforms: [:windows_31, :jruby]
307
313
  .
308
- .TP
309
- \fBmingw\fR
310
- 1\.8, 1\.9, 2\.0, 2\.1, 2\.2, 2\.3, 2\.4, 2\.5, 2\.6
314
+ .fi
311
315
  .
312
- .TP
313
- \fBx64_mingw\fR
314
- 2\.0, 2\.1, 2\.2, 2\.3, 2\.4, 2\.5, 2\.6
316
+ .IP "" 0
315
317
  .
316
318
  .P
317
- As with groups, you can specify one or more platforms:
319
+ 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
+ .
321
+ .SS "FORCE_RUBY_PLATFORM"
322
+ 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:
318
323
  .
319
324
  .IP "" 4
320
325
  .
321
326
  .nf
322
327
 
323
- gem "weakling", :platforms => :jruby
324
- gem "ruby\-debug", :platforms => :mri_18
325
- gem "nokogiri", :platforms => [:mri_18, :jruby]
328
+ gem "ffi", force_ruby_platform: true
326
329
  .
327
330
  .fi
328
331
  .
329
332
  .IP "" 0
330
333
  .
331
334
  .P
332
- 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\.
335
+ This can be handy (assuming the pure ruby variant works fine) when:
336
+ .
337
+ .IP "\(bu" 4
338
+ You\'re having issues with the platform specific variant\.
339
+ .
340
+ .IP "\(bu" 4
341
+ 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
+ .IP "" 0
333
344
  .
334
345
  .SS "SOURCE"
335
- You can select an alternate Rubygems repository for a gem using the \':source\' option\.
346
+ You can select an alternate RubyGems repository for a gem using the \':source\' option\.
336
347
  .
337
348
  .IP "" 4
338
349
  .
339
350
  .nf
340
351
 
341
- gem "some_internal_gem", :source => "https://gems\.example\.com"
352
+ gem "some_internal_gem", source: "https://gems\.example\.com"
342
353
  .
343
354
  .fi
344
355
  .
345
356
  .IP "" 0
346
357
  .
347
358
  .P
348
- This forces the gem to be loaded from this source and ignores any global sources declared at the top level of the file\. If the gem does not exist in this source, it will not be installed\.
359
+ 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\.
349
360
  .
350
361
  .P
351
- 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 global sources using the ordering described in \fISOURCE PRIORITY\fR\.
362
+ 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\.
352
363
  .
353
364
  .P
354
- Selecting a specific source repository this way also suppresses the ambiguous gem warning described above in \fIGLOBAL SOURCES (#source)\fR\.
365
+ \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\.
355
366
  .
356
367
  .P
357
368
  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\.
@@ -361,15 +372,15 @@ If necessary, you can specify that a gem is located at a particular git reposito
361
372
  .
362
373
  .TP
363
374
  \fBHTTP(S)\fR
364
- gem "rails", :git => "https://github\.com/rails/rails\.git"
375
+ gem "rails", git: "https://github\.com/rails/rails\.git"
365
376
  .
366
377
  .TP
367
378
  \fBSSH\fR
368
- gem "rails", :git => "git@github\.com:rails/rails\.git"
379
+ gem "rails", git: "git@github\.com:rails/rails\.git"
369
380
  .
370
381
  .TP
371
382
  \fBgit\fR
372
- gem "rails", :git => "git://github\.com/rails/rails\.git"
383
+ gem "rails", git: "git://github\.com/rails/rails\.git"
373
384
  .
374
385
  .P
375
386
  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\.
@@ -393,7 +404,7 @@ If a git repository does have a \fB\.gemspec\fR for the gem you attached it to,
393
404
  .
394
405
  .nf
395
406
 
396
- gem "rails", "2\.3\.8", :git => "https://github\.com/rails/rails\.git"
407
+ gem "rails", "2\.3\.8", git: "https://github\.com/rails/rails\.git"
397
408
  # bundle install will fail, because the \.gemspec in the rails
398
409
  # repository\'s master branch specifies version 3\.0\.0
399
410
  .
@@ -409,20 +420,20 @@ Git repositories support a number of additional options\.
409
420
  .
410
421
  .TP
411
422
  \fBbranch\fR, \fBtag\fR, and \fBref\fR
412
- You \fBMUST\fR only specify at most one of these options\. The default is \fB:branch => "master"\fR\. For example:
423
+ You \fBMUST\fR only specify at most one of these options\. The default is \fBbranch: "master"\fR\. For example:
413
424
  .
414
425
  .IP
415
- gem "rails", :git => "https://github\.com/rails/rails\.git", :branch => "5\-0\-stable"
426
+ gem "rails", git: "https://github\.com/rails/rails\.git", branch: "5\-0\-stable"
416
427
  .
417
428
  .IP
418
- gem "rails", :git => "https://github\.com/rails/rails\.git", :tag => "v5\.0\.0"
429
+ gem "rails", git: "https://github\.com/rails/rails\.git", tag: "v5\.0\.0"
419
430
  .
420
431
  .IP
421
- gem "rails", :git => "https://github\.com/rails/rails\.git", :ref => "4aded"
432
+ gem "rails", git: "https://github\.com/rails/rails\.git", ref: "4aded"
422
433
  .
423
434
  .TP
424
435
  \fBsubmodules\fR
425
- 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 \fB:submodules => true\fR to cause bundler to expand any submodules included in the git repository
436
+ 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
426
437
  .
427
438
  .P
428
439
  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\.
@@ -454,7 +465,7 @@ A custom git source can be defined via the \fBgit_source\fR method\. Provide the
454
465
  .nf
455
466
 
456
467
  git_source(:stash){ |repo_name| "https://stash\.corp\.acme\.pl/#{repo_name}\.git" }
457
- gem \'rails\', :stash => \'forks/rails\'
468
+ gem \'rails\', stash: \'forks/rails\'
458
469
  .
459
470
  .fi
460
471
  .
@@ -467,7 +478,7 @@ In addition, if you wish to choose a specific branch:
467
478
  .
468
479
  .nf
469
480
 
470
- gem "rails", :stash => "forks/rails", :branch => "branch_name"
481
+ gem "rails", stash: "forks/rails", branch: "branch_name"
471
482
  .
472
483
  .fi
473
484
  .
@@ -483,8 +494,8 @@ If the git repository you want to use is hosted on GitHub and is public, you can
483
494
  .
484
495
  .nf
485
496
 
486
- gem "rails", :github => "rails/rails"
487
- gem "rails", :github => "rails"
497
+ gem "rails", github: "rails/rails"
498
+ gem "rails", github: "rails"
488
499
  .
489
500
  .fi
490
501
  .
@@ -497,7 +508,7 @@ Are both equivalent to
497
508
  .
498
509
  .nf
499
510
 
500
- gem "rails", :git => "git://github\.com/rails/rails\.git"
511
+ gem "rails", git: "https://github\.com/rails/rails\.git"
501
512
  .
502
513
  .fi
503
514
  .
@@ -513,7 +524,7 @@ You can also directly pass a pull request URL:
513
524
  .
514
525
  .nf
515
526
 
516
- gem "rails", :github => "https://github\.com/rails/rails/pull/43753"
527
+ gem "rails", github: "https://github\.com/rails/rails/pull/43753"
517
528
  .
518
529
  .fi
519
530
  .
@@ -526,20 +537,20 @@ Which is equivalent to:
526
537
  .
527
538
  .nf
528
539
 
529
- gem "rails", :github => "rails/rails", branch: "refs/pull/43753/head"
540
+ gem "rails", github: "rails/rails", branch: "refs/pull/43753/head"
530
541
  .
531
542
  .fi
532
543
  .
533
544
  .IP "" 0
534
545
  .
535
546
  .SS "GIST"
536
- 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")\.
547
+ 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")\.
537
548
  .
538
549
  .IP "" 4
539
550
  .
540
551
  .nf
541
552
 
542
- gem "the_hatch", :gist => "4815162342"
553
+ gem "the_hatch", gist: "4815162342"
543
554
  .
544
555
  .fi
545
556
  .
@@ -552,7 +563,7 @@ Is equivalent to:
552
563
  .
553
564
  .nf
554
565
 
555
- gem "the_hatch", :git => "https://gist\.github\.com/4815162342\.git"
566
+ gem "the_hatch", git: "https://gist\.github\.com/4815162342\.git"
556
567
  .
557
568
  .fi
558
569
  .
@@ -568,8 +579,8 @@ If the git repository you want to use is hosted on Bitbucket and is public, you
568
579
  .
569
580
  .nf
570
581
 
571
- gem "rails", :bitbucket => "rails/rails"
572
- gem "rails", :bitbucket => "rails"
582
+ gem "rails", bitbucket: "rails/rails"
583
+ gem "rails", bitbucket: "rails"
573
584
  .
574
585
  .fi
575
586
  .
@@ -582,7 +593,7 @@ Are both equivalent to
582
593
  .
583
594
  .nf
584
595
 
585
- gem "rails", :git => "https://rails@bitbucket\.org/rails/rails\.git"
596
+ gem "rails", git: "https://rails@bitbucket\.org/rails/rails\.git"
586
597
  .
587
598
  .fi
588
599
  .
@@ -604,7 +615,7 @@ Unlike \fB:git\fR, bundler does not compile C extensions for gems specified as p
604
615
  .
605
616
  .nf
606
617
 
607
- gem "rails", :path => "vendor/rails"
618
+ gem "rails", path: "vendor/rails"
608
619
  .
609
620
  .fi
610
621
  .
@@ -648,7 +659,7 @@ platforms :ruby do
648
659
  gem "sqlite3"
649
660
  end
650
661
 
651
- group :development, :optional => true do
662
+ group :development, optional: true do
652
663
  gem "wirble"
653
664
  gem "faker"
654
665
  end
@@ -688,10 +699,10 @@ The \fB\.gemspec\fR \fIhttp://guides\.rubygems\.org/specification\-reference/\fR
688
699
  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\.
689
700
  .
690
701
  .P
691
- 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 (\fB:path => \'\.\'\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\.
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: \'\.\'\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\.
692
703
  .
693
704
  .P
694
- 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: "{,\fI,\fR/*}\.gemspec"), what named \fB\.gemspec\fR it uses (if more than one is present), and which group development dependencies are included in\.
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: \fB{,*,*/*}\.gemspec\fR), what named \fB\.gemspec\fR it uses (if more than one is present), and which group development dependencies are included in\.
695
706
  .
696
707
  .P
697
708
  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\.
@@ -706,7 +717,7 @@ The source explicitly attached to the gem (using \fB:source\fR, \fB:path\fR, or
706
717
  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
707
718
  .
708
719
  .IP "3." 4
709
- The sources specified via global \fBsource\fR lines, searching each source in your \fBGemfile\fR from last added to first added\.
720
+ 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\.
710
721
  .
711
722
  .IP "" 0
712
723