bundler 2.2.27 → 2.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (353) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1328 -4
  3. data/README.md +4 -8
  4. data/bundler.gemspec +11 -11
  5. data/exe/bundle +5 -26
  6. data/exe/bundler +1 -1
  7. data/lib/bundler/.document +1 -0
  8. data/lib/bundler/build_metadata.rb +4 -4
  9. data/lib/bundler/capistrano.rb +1 -1
  10. data/lib/bundler/checksum.rb +254 -0
  11. data/lib/bundler/ci_detector.rb +75 -0
  12. data/lib/bundler/cli/add.rb +7 -5
  13. data/lib/bundler/cli/binstubs.rb +10 -6
  14. data/lib/bundler/cli/cache.rb +1 -1
  15. data/lib/bundler/cli/check.rb +4 -4
  16. data/lib/bundler/cli/common.rb +13 -3
  17. data/lib/bundler/cli/config.rb +18 -8
  18. data/lib/bundler/cli/console.rb +2 -5
  19. data/lib/bundler/cli/doctor.rb +16 -9
  20. data/lib/bundler/cli/exec.rb +2 -1
  21. data/lib/bundler/cli/fund.rb +1 -1
  22. data/lib/bundler/cli/gem.rb +153 -40
  23. data/lib/bundler/cli/info.rb +27 -17
  24. data/lib/bundler/cli/init.rb +6 -2
  25. data/lib/bundler/cli/inject.rb +1 -1
  26. data/lib/bundler/cli/install.rb +34 -42
  27. data/lib/bundler/cli/issue.rb +5 -4
  28. data/lib/bundler/cli/lock.rb +54 -28
  29. data/lib/bundler/cli/open.rb +9 -9
  30. data/lib/bundler/cli/outdated.rb +34 -29
  31. data/lib/bundler/cli/platform.rb +8 -6
  32. data/lib/bundler/cli/plugin.rb +9 -15
  33. data/lib/bundler/cli/pristine.rb +38 -30
  34. data/lib/bundler/cli/remove.rb +1 -2
  35. data/lib/bundler/cli/show.rb +5 -5
  36. data/lib/bundler/cli/update.rb +12 -7
  37. data/lib/bundler/cli/viz.rb +1 -1
  38. data/lib/bundler/cli.rb +265 -313
  39. data/lib/bundler/compact_index_client/cache.rb +53 -67
  40. data/lib/bundler/compact_index_client/cache_file.rb +148 -0
  41. data/lib/bundler/compact_index_client/gem_parser.rb +7 -3
  42. data/lib/bundler/compact_index_client/parser.rb +84 -0
  43. data/lib/bundler/compact_index_client/updater.rb +73 -77
  44. data/lib/bundler/compact_index_client.rb +59 -87
  45. data/lib/bundler/constants.rb +9 -2
  46. data/lib/bundler/current_ruby.rb +12 -16
  47. data/lib/bundler/definition.rb +604 -347
  48. data/lib/bundler/dependency.rb +33 -71
  49. data/lib/bundler/digest.rb +71 -0
  50. data/lib/bundler/dsl.rb +136 -102
  51. data/lib/bundler/endpoint_specification.rb +42 -16
  52. data/lib/bundler/env.rb +5 -7
  53. data/lib/bundler/environment_preserver.rb +8 -22
  54. data/lib/bundler/errors.rb +113 -13
  55. data/lib/bundler/feature_flag.rb +1 -2
  56. data/lib/bundler/fetcher/base.rb +11 -11
  57. data/lib/bundler/fetcher/compact_index.rb +32 -52
  58. data/lib/bundler/fetcher/dependency.rb +3 -7
  59. data/lib/bundler/fetcher/downloader.rb +17 -16
  60. data/lib/bundler/fetcher/gem_remote_fetcher.rb +16 -0
  61. data/lib/bundler/fetcher/index.rb +2 -29
  62. data/lib/bundler/fetcher.rb +98 -83
  63. data/lib/bundler/force_platform.rb +16 -0
  64. data/lib/bundler/friendly_errors.rb +29 -40
  65. data/lib/bundler/gem_helper.rb +12 -24
  66. data/lib/bundler/gem_helpers.rb +47 -7
  67. data/lib/bundler/gem_version_promoter.rb +68 -109
  68. data/lib/bundler/graph.rb +9 -9
  69. data/lib/bundler/index.rb +71 -79
  70. data/lib/bundler/injector.rb +25 -13
  71. data/lib/bundler/inline.rb +41 -28
  72. data/lib/bundler/installer/gem_installer.rb +22 -13
  73. data/lib/bundler/installer/parallel_installer.rb +19 -66
  74. data/lib/bundler/installer/standalone.rb +58 -17
  75. data/lib/bundler/installer.rb +31 -93
  76. data/lib/bundler/lazy_specification.rb +151 -72
  77. data/lib/bundler/lockfile_generator.rb +13 -4
  78. data/lib/bundler/lockfile_parser.rb +146 -71
  79. data/lib/bundler/man/bundle-add.1 +54 -44
  80. data/lib/bundler/man/bundle-add.1.ronn +62 -21
  81. data/lib/bundler/man/bundle-binstubs.1 +10 -19
  82. data/lib/bundler/man/bundle-binstubs.1.ronn +6 -3
  83. data/lib/bundler/man/bundle-cache.1 +38 -25
  84. data/lib/bundler/man/bundle-cache.1.ronn +40 -4
  85. data/lib/bundler/man/bundle-check.1 +7 -14
  86. data/lib/bundler/man/bundle-check.1.ronn +7 -2
  87. data/lib/bundler/man/bundle-clean.1 +4 -11
  88. data/lib/bundler/man/bundle-clean.1.ronn +1 -1
  89. data/lib/bundler/man/bundle-config.1 +48 -227
  90. data/lib/bundler/man/bundle-config.1.ronn +41 -34
  91. data/lib/bundler/man/bundle-console.1 +33 -0
  92. data/lib/bundler/man/bundle-console.1.ronn +39 -0
  93. data/lib/bundler/man/bundle-doctor.1 +5 -19
  94. data/lib/bundler/man/bundle-doctor.1.ronn +1 -1
  95. data/lib/bundler/man/bundle-env.1 +9 -0
  96. data/lib/bundler/man/bundle-env.1.ronn +10 -0
  97. data/lib/bundler/man/bundle-exec.1 +20 -78
  98. data/lib/bundler/man/bundle-exec.1.ronn +12 -10
  99. data/lib/bundler/man/bundle-fund.1 +22 -0
  100. data/lib/bundler/man/bundle-fund.1.ronn +25 -0
  101. data/lib/bundler/man/bundle-gem.1 +57 -72
  102. data/lib/bundler/man/bundle-gem.1.ronn +57 -9
  103. data/lib/bundler/man/bundle-help.1 +9 -0
  104. data/lib/bundler/man/bundle-help.1.ronn +12 -0
  105. data/lib/bundler/man/bundle-info.1 +8 -11
  106. data/lib/bundler/man/bundle-info.1.ronn +9 -5
  107. data/lib/bundler/man/bundle-init.1 +7 -12
  108. data/lib/bundler/man/bundle-init.1.ronn +4 -1
  109. data/lib/bundler/man/bundle-inject.1 +17 -19
  110. data/lib/bundler/man/bundle-inject.1.ronn +12 -2
  111. data/lib/bundler/man/bundle-install.1 +43 -163
  112. data/lib/bundler/man/bundle-install.1.ronn +33 -51
  113. data/lib/bundler/man/bundle-issue.1 +45 -0
  114. data/lib/bundler/man/bundle-issue.1.ronn +37 -0
  115. data/lib/bundler/man/bundle-licenses.1 +9 -0
  116. data/lib/bundler/man/bundle-licenses.1.ronn +10 -0
  117. data/lib/bundler/man/bundle-list.1 +4 -19
  118. data/lib/bundler/man/bundle-list.1.ronn +4 -1
  119. data/lib/bundler/man/bundle-lock.1 +25 -34
  120. data/lib/bundler/man/bundle-lock.1.ronn +25 -4
  121. data/lib/bundler/man/bundle-open.1 +18 -18
  122. data/lib/bundler/man/bundle-open.1.ronn +10 -1
  123. data/lib/bundler/man/bundle-outdated.1 +23 -75
  124. data/lib/bundler/man/bundle-outdated.1.ronn +21 -22
  125. data/lib/bundler/man/bundle-platform.1 +16 -28
  126. data/lib/bundler/man/bundle-platform.1.ronn +14 -7
  127. data/lib/bundler/man/bundle-plugin.1 +58 -0
  128. data/lib/bundler/man/bundle-plugin.1.ronn +63 -0
  129. data/lib/bundler/man/bundle-pristine.1 +5 -16
  130. data/lib/bundler/man/bundle-pristine.1.ronn +1 -1
  131. data/lib/bundler/man/bundle-remove.1 +4 -14
  132. data/lib/bundler/man/bundle-remove.1.ronn +1 -1
  133. data/lib/bundler/man/bundle-show.1 +7 -11
  134. data/lib/bundler/man/bundle-show.1.ronn +4 -0
  135. data/lib/bundler/man/bundle-update.1 +31 -144
  136. data/lib/bundler/man/bundle-update.1.ronn +16 -7
  137. data/lib/bundler/man/bundle-version.1 +22 -0
  138. data/lib/bundler/man/bundle-version.1.ronn +24 -0
  139. data/lib/bundler/man/bundle-viz.1 +9 -18
  140. data/lib/bundler/man/bundle-viz.1.ronn +9 -3
  141. data/lib/bundler/man/bundle.1 +17 -51
  142. data/lib/bundler/man/bundle.1.ronn +12 -7
  143. data/lib/bundler/man/gemfile.5 +132 -346
  144. data/lib/bundler/man/gemfile.5.ronn +127 -86
  145. data/lib/bundler/man/index.txt +8 -0
  146. data/lib/bundler/match_metadata.rb +17 -0
  147. data/lib/bundler/match_platform.rb +1 -2
  148. data/lib/bundler/match_remote_metadata.rb +29 -0
  149. data/lib/bundler/materialization.rb +59 -0
  150. data/lib/bundler/mirror.rb +8 -10
  151. data/lib/bundler/plugin/api/source.rb +11 -14
  152. data/lib/bundler/plugin/events.rb +24 -0
  153. data/lib/bundler/plugin/index.rb +13 -5
  154. data/lib/bundler/plugin/installer/git.rb +0 -4
  155. data/lib/bundler/plugin/installer/path.rb +18 -0
  156. data/lib/bundler/plugin/installer/rubygems.rb +0 -8
  157. data/lib/bundler/plugin/installer.rb +43 -20
  158. data/lib/bundler/plugin/source_list.rb +4 -4
  159. data/lib/bundler/plugin.rb +35 -7
  160. data/lib/bundler/process_lock.rb +10 -14
  161. data/lib/bundler/remote_specification.rb +17 -6
  162. data/lib/bundler/resolver/base.rb +117 -0
  163. data/lib/bundler/resolver/candidate.rb +82 -0
  164. data/lib/bundler/resolver/incompatibility.rb +15 -0
  165. data/lib/bundler/resolver/package.rb +90 -0
  166. data/lib/bundler/resolver/root.rb +25 -0
  167. data/lib/bundler/resolver/spec_group.rb +54 -66
  168. data/lib/bundler/resolver.rb +440 -306
  169. data/lib/bundler/retry.rb +2 -2
  170. data/lib/bundler/ruby_dsl.rb +42 -7
  171. data/lib/bundler/ruby_version.rb +22 -22
  172. data/lib/bundler/rubygems_ext.rb +323 -84
  173. data/lib/bundler/rubygems_gem_installer.rb +93 -65
  174. data/lib/bundler/rubygems_integration.rb +89 -237
  175. data/lib/bundler/runtime.rb +30 -20
  176. data/lib/bundler/safe_marshal.rb +31 -0
  177. data/lib/bundler/self_manager.rb +205 -0
  178. data/lib/bundler/settings.rb +145 -58
  179. data/lib/bundler/setup.rb +13 -1
  180. data/lib/bundler/shared_helpers.rb +94 -51
  181. data/lib/bundler/source/git/git_proxy.rb +283 -82
  182. data/lib/bundler/source/git.rb +187 -78
  183. data/lib/bundler/source/metadata.rb +16 -16
  184. data/lib/bundler/source/path/installer.rb +1 -22
  185. data/lib/bundler/source/path.rb +17 -27
  186. data/lib/bundler/source/rubygems/remote.rb +1 -1
  187. data/lib/bundler/source/rubygems.rb +165 -245
  188. data/lib/bundler/source/rubygems_aggregate.rb +1 -1
  189. data/lib/bundler/source.rb +7 -6
  190. data/lib/bundler/source_list.rb +41 -33
  191. data/lib/bundler/source_map.rb +15 -2
  192. data/lib/bundler/spec_set.rb +193 -58
  193. data/lib/bundler/stub_specification.rb +39 -7
  194. data/lib/bundler/templates/Executable +3 -5
  195. data/lib/bundler/templates/Executable.bundler +7 -12
  196. data/lib/bundler/templates/Executable.standalone +4 -4
  197. data/lib/bundler/templates/Gemfile +0 -2
  198. data/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +77 -29
  199. data/lib/bundler/templates/newgem/Cargo.toml.tt +7 -0
  200. data/lib/bundler/templates/newgem/Gemfile.tt +5 -2
  201. data/lib/bundler/templates/newgem/README.md.tt +12 -12
  202. data/lib/bundler/templates/newgem/Rakefile.tt +28 -4
  203. data/lib/bundler/templates/newgem/bin/console.tt +0 -4
  204. data/lib/bundler/templates/newgem/circleci/config.yml.tt +12 -0
  205. data/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +15 -0
  206. data/lib/bundler/templates/newgem/ext/newgem/extconf-c.rb.tt +10 -0
  207. data/lib/bundler/templates/newgem/ext/newgem/extconf-rust.rb.tt +6 -0
  208. data/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt +1 -1
  209. data/lib/bundler/templates/newgem/ext/newgem/src/lib.rs.tt +12 -0
  210. data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +20 -10
  211. data/lib/bundler/templates/newgem/gitignore.tt +3 -0
  212. data/lib/bundler/templates/newgem/gitlab-ci.yml.tt +13 -4
  213. data/lib/bundler/templates/newgem/newgem.gemspec.tt +26 -18
  214. data/lib/bundler/templates/newgem/rubocop.yml.tt +0 -5
  215. data/lib/bundler/templates/newgem/sig/newgem.rbs.tt +8 -0
  216. data/lib/bundler/templates/newgem/standard.yml.tt +3 -0
  217. data/lib/bundler/templates/newgem/test/minitest/{newgem_test.rb.tt → test_newgem.rb.tt} +1 -1
  218. data/lib/bundler/ui/rg_proxy.rb +1 -1
  219. data/lib/bundler/ui/shell.rb +61 -16
  220. data/lib/bundler/ui/silent.rb +33 -6
  221. data/lib/bundler/uri_credentials_filter.rb +3 -3
  222. data/lib/bundler/uri_normalizer.rb +23 -0
  223. data/lib/bundler/vendor/.document +1 -0
  224. data/lib/bundler/vendor/connection_pool/.document +1 -0
  225. data/lib/bundler/vendor/connection_pool/LICENSE +20 -0
  226. data/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +19 -21
  227. data/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +1 -1
  228. data/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb +56 -0
  229. data/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +92 -78
  230. data/lib/bundler/vendor/fileutils/.document +1 -0
  231. data/lib/bundler/vendor/fileutils/COPYING +56 -0
  232. data/lib/bundler/vendor/fileutils/lib/fileutils.rb +1350 -418
  233. data/lib/bundler/vendor/net-http-persistent/.document +1 -0
  234. data/lib/bundler/vendor/net-http-persistent/README.rdoc +82 -0
  235. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb +4 -3
  236. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb +23 -11
  237. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb +1 -1
  238. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +102 -64
  239. data/lib/bundler/vendor/pub_grub/.document +1 -0
  240. data/lib/bundler/vendor/pub_grub/LICENSE.txt +21 -0
  241. data/lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb +20 -0
  242. data/lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb +189 -0
  243. data/lib/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb +182 -0
  244. data/lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb +150 -0
  245. data/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb +43 -0
  246. data/lib/bundler/vendor/pub_grub/lib/pub_grub/partial_solution.rb +121 -0
  247. data/lib/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb +45 -0
  248. data/lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb +19 -0
  249. data/lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb +61 -0
  250. data/lib/bundler/vendor/pub_grub/lib/pub_grub/term.rb +105 -0
  251. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version.rb +3 -0
  252. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb +129 -0
  253. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb +411 -0
  254. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +248 -0
  255. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb +178 -0
  256. data/lib/bundler/vendor/pub_grub/lib/pub_grub.rb +31 -0
  257. data/lib/bundler/vendor/securerandom/.document +1 -0
  258. data/lib/bundler/vendor/securerandom/COPYING +56 -0
  259. data/lib/bundler/vendor/securerandom/lib/securerandom.rb +102 -0
  260. data/lib/bundler/vendor/thor/.document +1 -0
  261. data/lib/bundler/vendor/thor/LICENSE.md +20 -0
  262. data/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb +3 -2
  263. data/lib/bundler/vendor/thor/lib/thor/actions/directory.rb +1 -1
  264. data/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +1 -1
  265. data/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +15 -19
  266. data/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +16 -6
  267. data/lib/bundler/vendor/thor/lib/thor/actions.rb +21 -17
  268. data/lib/bundler/vendor/thor/lib/thor/base.rb +140 -14
  269. data/lib/bundler/vendor/thor/lib/thor/command.rb +13 -4
  270. data/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +10 -0
  271. data/lib/bundler/vendor/thor/lib/thor/error.rb +16 -20
  272. data/lib/bundler/vendor/thor/lib/thor/group.rb +12 -1
  273. data/lib/bundler/vendor/thor/lib/thor/invocation.rb +1 -1
  274. data/lib/bundler/vendor/thor/lib/thor/nested_context.rb +2 -2
  275. data/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +17 -1
  276. data/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +33 -17
  277. data/lib/bundler/vendor/thor/lib/thor/parser/option.rb +28 -9
  278. data/lib/bundler/vendor/thor/lib/thor/parser/options.rb +65 -8
  279. data/lib/bundler/vendor/thor/lib/thor/rake_compat.rb +2 -2
  280. data/lib/bundler/vendor/thor/lib/thor/runner.rb +40 -30
  281. data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +56 -162
  282. data/lib/bundler/vendor/thor/lib/thor/shell/color.rb +1 -46
  283. data/lib/bundler/vendor/thor/lib/thor/shell/column_printer.rb +29 -0
  284. data/lib/bundler/vendor/thor/lib/thor/shell/html.rb +1 -46
  285. data/lib/bundler/vendor/thor/lib/thor/shell/table_printer.rb +118 -0
  286. data/lib/bundler/vendor/thor/lib/thor/shell/terminal.rb +42 -0
  287. data/lib/bundler/vendor/thor/lib/thor/shell/wrapped_printer.rb +38 -0
  288. data/lib/bundler/vendor/thor/lib/thor/shell.rb +2 -2
  289. data/lib/bundler/vendor/thor/lib/thor/util.rb +9 -8
  290. data/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
  291. data/lib/bundler/vendor/thor/lib/thor.rb +166 -8
  292. data/lib/bundler/vendor/tsort/.document +1 -0
  293. data/lib/bundler/vendor/tsort/LICENSE.txt +22 -0
  294. data/lib/bundler/vendor/tsort/lib/tsort.rb +455 -0
  295. data/lib/bundler/vendor/uri/.document +1 -0
  296. data/lib/bundler/vendor/uri/COPYING +56 -0
  297. data/lib/bundler/vendor/uri/lib/uri/common.rb +351 -219
  298. data/lib/bundler/vendor/uri/lib/uri/file.rb +10 -4
  299. data/lib/bundler/vendor/uri/lib/uri/ftp.rb +3 -3
  300. data/lib/bundler/vendor/uri/lib/uri/generic.rb +49 -39
  301. data/lib/bundler/vendor/uri/lib/uri/http.rb +40 -3
  302. data/lib/bundler/vendor/uri/lib/uri/https.rb +2 -2
  303. data/lib/bundler/vendor/uri/lib/uri/ldap.rb +2 -2
  304. data/lib/bundler/vendor/uri/lib/uri/ldaps.rb +2 -1
  305. data/lib/bundler/vendor/uri/lib/uri/mailto.rb +2 -3
  306. data/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +26 -26
  307. data/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +131 -50
  308. data/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
  309. data/lib/bundler/vendor/uri/lib/uri/ws.rb +83 -0
  310. data/lib/bundler/vendor/uri/lib/uri/wss.rb +23 -0
  311. data/lib/bundler/vendor/uri/lib/uri.rb +12 -12
  312. data/lib/bundler/vendored_net_http.rb +23 -0
  313. data/lib/bundler/vendored_persistent.rb +0 -36
  314. data/lib/bundler/{vendored_molinillo.rb → vendored_pub_grub.rb} +1 -1
  315. data/lib/bundler/vendored_securerandom.rb +12 -0
  316. data/lib/bundler/vendored_timeout.rb +12 -0
  317. data/lib/bundler/{vendored_tmpdir.rb → vendored_tsort.rb} +1 -1
  318. data/lib/bundler/vendored_uri.rb +18 -1
  319. data/lib/bundler/version.rb +5 -1
  320. data/lib/bundler/vlad.rb +1 -1
  321. data/lib/bundler/worker.rb +7 -9
  322. data/lib/bundler/yaml_serializer.rb +22 -13
  323. data/lib/bundler.rb +176 -151
  324. metadata +98 -41
  325. data/lib/bundler/dep_proxy.rb +0 -55
  326. data/lib/bundler/gemdeps.rb +0 -29
  327. data/lib/bundler/psyched_yaml.rb +0 -22
  328. data/lib/bundler/templates/gems.rb +0 -8
  329. data/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt +0 -5
  330. data/lib/bundler/templates/newgem/travis.yml.tt +0 -6
  331. data/lib/bundler/vendor/connection_pool/lib/connection_pool/monotonic_time.rb +0 -66
  332. data/lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +0 -57
  333. data/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +0 -88
  334. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb +0 -36
  335. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +0 -66
  336. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +0 -62
  337. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +0 -63
  338. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +0 -61
  339. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb +0 -126
  340. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb +0 -46
  341. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +0 -36
  342. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +0 -164
  343. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +0 -255
  344. data/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +0 -143
  345. data/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +0 -6
  346. data/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +0 -112
  347. data/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb +0 -67
  348. data/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +0 -839
  349. data/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb +0 -46
  350. data/lib/bundler/vendor/molinillo/lib/molinillo/state.rb +0 -58
  351. data/lib/bundler/vendor/molinillo/lib/molinillo.rb +0 -11
  352. data/lib/bundler/vendor/tmpdir/lib/tmpdir.rb +0 -154
  353. data/lib/bundler/version_ranges.rb +0 -122
@@ -1,206 +1,143 @@
1
- .\" generated with Ronn/v0.7.3
2
- .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
- .
4
- .TH "GEMFILE" "5" "June 2021" "" ""
5
- .
1
+ .\" generated with nRonn/v0.11.1
2
+ .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
+ .TH "GEMFILE" "5" "December 2024" ""
6
4
  .SH "NAME"
7
5
  \fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
8
- .
9
6
  .SH "SYNOPSIS"
10
7
  A \fBGemfile\fR describes the gem dependencies required to execute associated Ruby code\.
11
- .
12
8
  .P
13
9
  Place the \fBGemfile\fR in the root of the directory containing the associated code\. For instance, in a Rails application, place the \fBGemfile\fR in the same directory as the \fBRakefile\fR\.
14
- .
15
10
  .SH "SYNTAX"
16
11
  A \fBGemfile\fR is evaluated as Ruby code, in a context which makes available a number of methods used to describe the gem requirements\.
17
- .
18
- .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\.
20
- .
12
+ .SH "GLOBAL SOURCE"
13
+ At the top of the \fBGemfile\fR, add a single line for the \fBRubyGems\fR source that contains the gems listed in the \fBGemfile\fR\.
21
14
  .IP "" 4
22
- .
23
15
  .nf
24
-
25
16
  source "https://rubygems\.org"
26
- .
27
17
  .fi
28
- .
29
18
  .IP "" 0
30
- .
31
19
  .P
32
- 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\.
33
- .
20
+ You can add only one global source\. In Bundler 1\.13, adding multiple global sources was deprecated\. The \fBsource\fR \fBMUST\fR be a valid RubyGems repository\.
21
+ .P
22
+ To use more than one source of RubyGems, you should use \fI\fBsource\fR block\fR\.
23
+ .P
24
+ A source is checked for gems following the heuristics described in \fISOURCE PRIORITY\fR\.
34
25
  .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\.
36
- .
26
+ \fBNote about a behavior of the feature deprecated in Bundler 1\.13\fR: If a gem is found in more than one global source, Bundler will print a warning after installing the gem indicating which source was used, and listing the other sources where the gem is available\. A specific source can be selected for gems that need to use a non\-standard repository, suppressing this warning, by using the \fI\fB:source\fR option\fR or \fBsource\fR block\.
37
27
  .SS "CREDENTIALS"
38
28
  Some gem sources require a username and password\. Use bundle config(1) \fIbundle\-config\.1\.html\fR to set the username and password for any of the sources that need it\. The command must be run once on each computer that will install the Gemfile, but this keeps the credentials from being stored in plain text in version control\.
39
- .
40
29
  .IP "" 4
41
- .
42
30
  .nf
43
-
44
31
  bundle config gems\.example\.com user:password
45
- .
46
32
  .fi
47
- .
48
33
  .IP "" 0
49
- .
50
34
  .P
51
35
  For some sources, like a company Gemfury account, it may be easier to include the credentials in the Gemfile as part of the source URL\.
52
- .
53
36
  .IP "" 4
54
- .
55
37
  .nf
56
-
57
38
  source "https://user:password@gems\.example\.com"
58
- .
59
39
  .fi
60
- .
61
40
  .IP "" 0
62
- .
63
41
  .P
64
42
  Credentials in the source URL will take precedence over credentials set using \fBconfig\fR\.
65
- .
66
43
  .SH "RUBY"
67
44
  If your application requires a specific Ruby version or engine, specify your requirements using the \fBruby\fR method, with the following arguments\. All parameters are \fBOPTIONAL\fR unless otherwise specified\.
68
- .
69
45
  .SS "VERSION (required)"
70
- The version of Ruby that your application requires\. If your application requires an alternate Ruby engine, such as JRuby, Rubinius or TruffleRuby, this should be the Ruby version that the engine is compatible with\.
71
- .
46
+ The version of Ruby that your application requires\. If your application requires an alternate Ruby engine, such as JRuby, TruffleRuby, etc\., this should be the Ruby version that the engine is compatible with\.
72
47
  .IP "" 4
73
- .
74
48
  .nf
75
-
76
- ruby "1\.9\.3"
77
- .
49
+ ruby "3\.1\.2"
78
50
  .fi
79
- .
80
51
  .IP "" 0
81
- .
52
+ .P
53
+ If you wish to derive your Ruby version from a version file (ie \.ruby\-version), you can use the \fBfile\fR option instead\.
54
+ .IP "" 4
55
+ .nf
56
+ ruby file: "\.ruby\-version"
57
+ .fi
58
+ .IP "" 0
59
+ .P
60
+ The version file should conform to any of the following formats:
61
+ .IP "\(bu" 4
62
+ \fB3\.1\.2\fR (\.ruby\-version)
63
+ .IP "\(bu" 4
64
+ \fBruby 3\.1\.2\fR (\.tool\-versions, read: https://asdf\-vm\.com/manage/configuration\.html#tool\-versions)
65
+ .IP "" 0
82
66
  .SS "ENGINE"
83
67
  Each application \fImay\fR specify a Ruby engine\. If an engine is specified, an engine version \fImust\fR also be specified\.
84
- .
85
68
  .P
86
- What exactly is an Engine? \- A Ruby engine is an implementation of the Ruby language\.
87
- .
69
+ What exactly is an Engine?
88
70
  .IP "\(bu" 4
89
- 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
- .
71
+ A Ruby engine is an implementation of the Ruby language\.
91
72
  .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\.
93
- .
73
+ For background: the reference or original implementation of the Ruby programming language is called Matz's Ruby Interpreter \fIhttps://en\.wikipedia\.org/wiki/Ruby_MRI\fR, or MRI for short\. This is named after Ruby creator Yukihiro Matsumoto, also known as Matz\. MRI is also known as CRuby, because it is written in C\. MRI is the most widely used Ruby engine\.
74
+ .IP "\(bu" 4
75
+ Other implementations \fIhttps://www\.ruby\-lang\.org/en/about/\fR of Ruby exist\. Some of the more well\-known implementations include JRuby \fIhttps://www\.jruby\.org/\fR and TruffleRuby \fIhttps://www\.graalvm\.org/ruby/\fR\. Rubinius is an alternative implementation of Ruby written in Ruby\. JRuby is an implementation of Ruby on the JVM, short for Java Virtual Machine\. TruffleRuby is a Ruby implementation on the GraalVM, a language toolkit built on the JVM\.
94
76
  .IP "" 0
95
- .
96
77
  .SS "ENGINE VERSION"
97
78
  Each application \fImay\fR specify a Ruby engine version\. If an engine version is specified, an engine \fImust\fR also be specified\. If the engine is "ruby" the engine version specified \fImust\fR match the Ruby version\.
98
- .
99
79
  .IP "" 4
100
- .
101
80
  .nf
102
-
103
- ruby "1\.8\.7", :engine => "jruby", :engine_version => "1\.6\.7"
104
- .
81
+ ruby "2\.6\.8", engine: "jruby", engine_version: "9\.3\.8\.0"
105
82
  .fi
106
- .
107
83
  .IP "" 0
108
- .
109
84
  .SS "PATCHLEVEL"
110
- Each application \fImay\fR specify a Ruby patchlevel\.
111
- .
85
+ Each application \fImay\fR specify a Ruby patchlevel\. Specifying the patchlevel has been meaningless since Ruby 2\.1\.0 was released as the patchlevel is now uniquely determined by a combination of major, minor, and teeny version numbers\.
86
+ .P
87
+ This option was implemented in Bundler 1\.4\.0 for Ruby 2\.0 or earlier\.
112
88
  .IP "" 4
113
- .
114
89
  .nf
115
-
116
- ruby "2\.0\.0", :patchlevel => "247"
117
- .
90
+ ruby "3\.1\.2", patchlevel: "20"
118
91
  .fi
119
- .
120
92
  .IP "" 0
121
- .
122
93
  .SH "GEMS"
123
94
  Specify gem requirements using the \fBgem\fR method, with the following arguments\. All parameters are \fBOPTIONAL\fR unless otherwise specified\.
124
- .
125
95
  .SS "NAME (required)"
126
96
  For each gem requirement, list a single \fIgem\fR line\.
127
- .
128
97
  .IP "" 4
129
- .
130
98
  .nf
131
-
132
99
  gem "nokogiri"
133
- .
134
100
  .fi
135
- .
136
101
  .IP "" 0
137
- .
138
102
  .SS "VERSION"
139
103
  Each \fIgem\fR \fBMAY\fR have one or more version specifiers\.
140
- .
141
104
  .IP "" 4
142
- .
143
105
  .nf
144
-
145
106
  gem "nokogiri", ">= 1\.4\.2"
146
107
  gem "RedCloth", ">= 4\.1\.0", "< 4\.2\.0"
147
- .
148
108
  .fi
149
- .
150
109
  .IP "" 0
151
- .
152
110
  .SS "REQUIRE AS"
153
111
  Each \fIgem\fR \fBMAY\fR specify files that should be used when autorequiring via \fBBundler\.require\fR\. You may pass an array with multiple files or \fBtrue\fR if the file you want \fBrequired\fR has the same name as \fIgem\fR or \fBfalse\fR to prevent any file from being autorequired\.
154
- .
155
112
  .IP "" 4
156
- .
157
113
  .nf
158
-
159
- gem "redis", :require => ["redis/connection/hiredis", "redis"]
160
- gem "webmock", :require => false
161
- gem "byebug", :require => true
162
- .
114
+ gem "redis", require: ["redis/connection/hiredis", "redis"]
115
+ gem "webmock", require: false
116
+ gem "byebug", require: true
163
117
  .fi
164
- .
165
118
  .IP "" 0
166
- .
167
119
  .P
168
120
  The argument defaults to the name of the gem\. For example, these are identical:
169
- .
170
121
  .IP "" 4
171
- .
172
122
  .nf
173
-
174
123
  gem "nokogiri"
175
- gem "nokogiri", :require => "nokogiri"
176
- gem "nokogiri", :require => true
177
- .
124
+ gem "nokogiri", require: "nokogiri"
125
+ gem "nokogiri", require: true
178
126
  .fi
179
- .
180
127
  .IP "" 0
181
- .
182
128
  .SS "GROUPS"
183
129
  Each \fIgem\fR \fBMAY\fR specify membership in one or more groups\. Any \fIgem\fR that does not specify membership in any group is placed in the \fBdefault\fR group\.
184
- .
185
130
  .IP "" 4
186
- .
187
131
  .nf
188
-
189
- gem "rspec", :group => :test
190
- gem "wirble", :groups => [:development, :test]
191
- .
132
+ gem "rspec", group: :test
133
+ gem "wirble", groups: [:development, :test]
192
134
  .fi
193
- .
194
135
  .IP "" 0
195
- .
196
136
  .P
197
137
  The Bundler runtime allows its two main methods, \fBBundler\.setup\fR and \fBBundler\.require\fR, to limit their impact to particular groups\.
198
- .
199
138
  .IP "" 4
200
- .
201
139
  .nf
202
-
203
- # setup adds gems to Ruby\'s load path
140
+ # setup adds gems to Ruby's load path
204
141
  Bundler\.setup # defaults to all groups
205
142
  require "bundler/setup" # same as Bundler\.setup
206
143
  Bundler\.setup(:default) # only set up the _default_ group
@@ -212,401 +149,271 @@ Bundler\.require # defaults to the _default_ group
212
149
  Bundler\.require(:default) # identical
213
150
  Bundler\.require(:default, :test) # requires the _default_ and _test_ groups
214
151
  Bundler\.require(:test) # requires the _test_ group
215
- .
216
152
  .fi
217
- .
218
153
  .IP "" 0
219
- .
220
154
  .P
221
155
  The Bundler CLI allows you to specify a list of groups whose gems \fBbundle install\fR should not install with the \fBwithout\fR configuration\.
222
- .
223
156
  .P
224
157
  To specify multiple groups to ignore, specify a list of groups separated by spaces\.
225
- .
226
158
  .IP "" 4
227
- .
228
159
  .nf
229
-
230
160
  bundle config set \-\-local without test
231
161
  bundle config set \-\-local without development test
232
- .
233
162
  .fi
234
- .
235
163
  .IP "" 0
236
- .
237
164
  .P
238
165
  Also, calling \fBBundler\.setup\fR with no parameters, or calling \fBrequire "bundler/setup"\fR will setup all groups except for the ones you excluded via \fB\-\-without\fR (since they are not available)\.
239
- .
240
166
  .P
241
167
  Note that on \fBbundle install\fR, bundler downloads and evaluates all gems, in order to create a single canonical list of all of the required gems and their dependencies\. This means that you cannot list different versions of the same gems in different groups\. For more details, see Understanding Bundler \fIhttps://bundler\.io/rationale\.html\fR\.
242
- .
243
168
  .SS "PLATFORMS"
244
169
  If a gem should only be used in a particular platform or set of platforms, you can specify them\. Platforms are essentially identical to groups, except that you do not need to use the \fB\-\-without\fR install\-time flag to exclude groups of gems for other platforms\.
245
- .
246
170
  .P
247
171
  There are a number of \fBGemfile\fR platforms:
248
- .
249
172
  .TP
250
173
  \fBruby\fR
251
- C Ruby (MRI), Rubinius or TruffleRuby, but \fBNOT\fR Windows
252
- .
174
+ C Ruby (MRI), Rubinius, or TruffleRuby, but not Windows
253
175
  .TP
254
176
  \fBmri\fR
255
- Same as \fIruby\fR, but only C Ruby (MRI)
256
- .
177
+ C Ruby (MRI) only, but not Windows
257
178
  .TP
258
- \fBmingw\fR
259
- Windows 32 bit \'mingw32\' platform (aka RubyInstaller)
260
- .
179
+ \fBwindows\fR
180
+ Windows C Ruby (MRI), including RubyInstaller 32\-bit and 64\-bit versions
261
181
  .TP
262
- \fBx64_mingw\fR
263
- Windows 64 bit \'mingw32\' platform (aka RubyInstaller x64)
264
- .
182
+ \fBmswin\fR
183
+ Windows C Ruby (MRI), including RubyInstaller 32\-bit versions
184
+ .TP
185
+ \fBmswin64\fR
186
+ Windows C Ruby (MRI), including RubyInstaller 64\-bit versions
265
187
  .TP
266
188
  \fBrbx\fR
267
189
  Rubinius
268
- .
269
190
  .TP
270
191
  \fBjruby\fR
271
192
  JRuby
272
- .
273
193
  .TP
274
194
  \fBtruffleruby\fR
275
195
  TruffleRuby
276
- .
277
- .TP
278
- \fBmswin\fR
279
- Windows
280
- .
281
196
  .P
282
- You can restrict further by platform and version for all platforms \fIexcept\fR for \fBrbx\fR, \fBjruby\fR, \fBtruffleruby\fR and \fBmswin\fR\.
283
- .
197
+ On platforms \fBruby\fR, \fBmri\fR, \fBmswin\fR, \fBmswin64\fR, and \fBwindows\fR, you may additionally specify a version by appending the major and minor version numbers without a delimiter\. For example, to specify that a gem should only be used on platform \fBruby\fR version 3\.1, use:
198
+ .IP "" 4
199
+ .nf
200
+ ruby_31
201
+ .fi
202
+ .IP "" 0
284
203
  .P
285
- To specify a version in addition to a platform, append the version number without the delimiter to the platform\. For example, to specify that a gem should only be used on platforms with Ruby 2\.3, use:
286
- .
204
+ As with groups (above), you may specify one or more platforms:
287
205
  .IP "" 4
288
- .
289
206
  .nf
290
-
291
- ruby_23
292
- .
207
+ gem "weakling", platforms: :jruby
208
+ gem "ruby\-debug", platforms: :mri_31
209
+ gem "nokogiri", platforms: [:windows_31, :jruby]
293
210
  .fi
294
- .
295
211
  .IP "" 0
296
- .
297
212
  .P
298
- The full list of platforms and supported versions includes:
299
- .
300
- .TP
301
- \fBruby\fR
302
- 1\.8, 1\.9, 2\.0, 2\.1, 2\.2, 2\.3, 2\.4, 2\.5, 2\.6
303
- .
304
- .TP
305
- \fBmri\fR
306
- 1\.8, 1\.9, 2\.0, 2\.1, 2\.2, 2\.3, 2\.4, 2\.5, 2\.6
307
- .
308
- .TP
309
- \fBmingw\fR
310
- 1\.8, 1\.9, 2\.0, 2\.1, 2\.2, 2\.3, 2\.4, 2\.5, 2\.6
311
- .
312
- .TP
313
- \fBx64_mingw\fR
314
- 2\.0, 2\.1, 2\.2, 2\.3, 2\.4, 2\.5, 2\.6
315
- .
213
+ All operations involving groups (\fBbundle install\fR \fIbundle\-install\.1\.html\fR, \fBBundler\.setup\fR, \fBBundler\.require\fR) behave exactly the same as if any groups not matching the current platform were explicitly excluded\.
214
+ .P
215
+ The following platform values are deprecated and should be replaced with \fBwindows\fR:
216
+ .IP "\(bu" 4
217
+ \fBmswin\fR, \fBmswin64\fR, \fBmingw32\fR, \fBx64_mingw\fR
218
+ .IP "" 0
316
219
  .P
317
- As with groups, you can specify one or more platforms:
318
- .
220
+ Note that, while unfortunately using the same terminology, the values of this option are different from the values that \fBbundle lock \-\-add\-platform\fR can take\. The values of this option are more closer to "Ruby Implementation" while the values that \fBbundle lock \-\-add\-platform\fR understands are more related to OS and architecture of the different systems where your lockfile will be used\.
221
+ .SS "FORCE_RUBY_PLATFORM"
222
+ If you always want the pure ruby variant of a gem to be chosen over platform specific variants, you can use the \fBforce_ruby_platform\fR option:
319
223
  .IP "" 4
320
- .
321
224
  .nf
322
-
323
- gem "weakling", :platforms => :jruby
324
- gem "ruby\-debug", :platforms => :mri_18
325
- gem "nokogiri", :platforms => [:mri_18, :jruby]
326
- .
225
+ gem "ffi", force_ruby_platform: true
327
226
  .fi
328
- .
329
227
  .IP "" 0
330
- .
331
228
  .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\.
333
- .
229
+ This can be handy (assuming the pure ruby variant works fine) when:
230
+ .IP "\(bu" 4
231
+ You're having issues with the platform specific variant\.
232
+ .IP "\(bu" 4
233
+ The platform specific variant does not yet support a newer ruby (and thus has a \fBrequired_ruby_version\fR upper bound), but you still want your Gemfile{\.lock} files to resolve under that ruby\.
234
+ .IP "" 0
334
235
  .SS "SOURCE"
335
- You can select an alternate Rubygems repository for a gem using the \':source\' option\.
336
- .
236
+ You can select an alternate RubyGems repository for a gem using the ':source' option\.
337
237
  .IP "" 4
338
- .
339
238
  .nf
340
-
341
- gem "some_internal_gem", :source => "https://gems\.example\.com"
342
- .
239
+ gem "some_internal_gem", source: "https://gems\.example\.com"
343
240
  .fi
344
- .
345
241
  .IP "" 0
346
- .
347
242
  .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\.
349
- .
243
+ This forces the gem to be loaded from this source and ignores the global source declared at the top level of the file\. If the gem does not exist in this source, it will not be installed\.
350
244
  .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\.
352
- .
245
+ Bundler will search for child dependencies of this gem by first looking in the source selected for the parent, but if they are not found there, it will fall back on the global source\.
353
246
  .P
354
- Selecting a specific source repository this way also suppresses the ambiguous gem warning described above in \fIGLOBAL SOURCES (#source)\fR\.
355
- .
247
+ \fBNote about a behavior of the feature deprecated in Bundler 1\.13\fR: Selecting a specific source repository this way also suppresses the ambiguous gem warning described above in \fIGLOBAL SOURCE\fR\.
356
248
  .P
357
249
  Using the \fB:source\fR option for an individual gem will also make that source available as a possible global source for any other gems which do not specify explicit sources\. Thus, when adding gems with explicit sources, it is recommended that you also ensure all other gems in the Gemfile are using explicit sources\.
358
- .
359
250
  .SS "GIT"
360
251
  If necessary, you can specify that a gem is located at a particular git repository using the \fB:git\fR parameter\. The repository can be accessed via several protocols:
361
- .
362
252
  .TP
363
253
  \fBHTTP(S)\fR
364
- gem "rails", :git => "https://github\.com/rails/rails\.git"
365
- .
254
+ gem "rails", git: "https://github\.com/rails/rails\.git"
366
255
  .TP
367
256
  \fBSSH\fR
368
- gem "rails", :git => "git@github\.com:rails/rails\.git"
369
- .
257
+ gem "rails", git: "git@github\.com:rails/rails\.git"
370
258
  .TP
371
259
  \fBgit\fR
372
- gem "rails", :git => "git://github\.com/rails/rails\.git"
373
- .
260
+ gem "rails", git: "git://github\.com/rails/rails\.git"
374
261
  .P
375
262
  If using SSH, the user that you use to run \fBbundle install\fR \fBMUST\fR have the appropriate keys available in their \fB$HOME/\.ssh\fR\.
376
- .
377
263
  .P
378
264
  \fBNOTE\fR: \fBhttp://\fR and \fBgit://\fR URLs should be avoided if at all possible\. These protocols are unauthenticated, so a man\-in\-the\-middle attacker can deliver malicious code and compromise your system\. HTTPS and SSH are strongly preferred\.
379
- .
380
265
  .P
381
266
  The \fBgroup\fR, \fBplatforms\fR, and \fBrequire\fR options are available and behave exactly the same as they would for a normal gem\.
382
- .
383
267
  .P
384
268
  A git repository \fBSHOULD\fR have at least one file, at the root of the directory containing the gem, with the extension \fB\.gemspec\fR\. This file \fBMUST\fR contain a valid gem specification, as expected by the \fBgem build\fR command\.
385
- .
386
269
  .P
387
270
  If a git repository does not have a \fB\.gemspec\fR, bundler will attempt to create one, but it will not contain any dependencies, executables, or C extension compilation instructions\. As a result, it may fail to properly integrate into your application\.
388
- .
389
271
  .P
390
272
  If a git repository does have a \fB\.gemspec\fR for the gem you attached it to, a version specifier, if provided, means that the git repository is only valid if the \fB\.gemspec\fR specifies a version matching the version specifier\. If not, bundler will print a warning\.
391
- .
392
273
  .IP "" 4
393
- .
394
274
  .nf
395
-
396
- gem "rails", "2\.3\.8", :git => "https://github\.com/rails/rails\.git"
275
+ gem "rails", "2\.3\.8", git: "https://github\.com/rails/rails\.git"
397
276
  # bundle install will fail, because the \.gemspec in the rails
398
- # repository\'s master branch specifies version 3\.0\.0
399
- .
277
+ # repository's master branch specifies version 3\.0\.0
400
278
  .fi
401
- .
402
279
  .IP "" 0
403
- .
404
280
  .P
405
281
  If a git repository does \fBnot\fR have a \fB\.gemspec\fR for the gem you attached it to, a version specifier \fBMUST\fR be provided\. Bundler will use this version in the simple \fB\.gemspec\fR it creates\.
406
- .
407
282
  .P
408
283
  Git repositories support a number of additional options\.
409
- .
410
284
  .TP
411
285
  \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:
413
- .
286
+ You \fBMUST\fR only specify at most one of these options\. The default is \fBbranch: "master"\fR\. For example:
414
287
  .IP
415
- gem "rails", :git => "https://github\.com/rails/rails\.git", :branch => "5\-0\-stable"
416
- .
288
+ gem "rails", git: "https://github\.com/rails/rails\.git", branch: "5\-0\-stable"
417
289
  .IP
418
- gem "rails", :git => "https://github\.com/rails/rails\.git", :tag => "v5\.0\.0"
419
- .
290
+ gem "rails", git: "https://github\.com/rails/rails\.git", tag: "v5\.0\.0"
420
291
  .IP
421
- gem "rails", :git => "https://github\.com/rails/rails\.git", :ref => "4aded"
422
- .
292
+ gem "rails", git: "https://github\.com/rails/rails\.git", ref: "4aded"
423
293
  .TP
424
294
  \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
426
- .
295
+ For reference, a git submodule \fIhttps://git\-scm\.com/book/en/v2/Git\-Tools\-Submodules\fR lets you have another git repository within a subfolder of your repository\. Specify \fBsubmodules: true\fR to cause bundler to expand any submodules included in the git repository
427
296
  .P
428
297
  If a git repository contains multiple \fB\.gemspecs\fR, each \fB\.gemspec\fR represents a gem located at the same place in the file system as the \fB\.gemspec\fR\.
429
- .
430
298
  .IP "" 4
431
- .
432
299
  .nf
433
-
434
300
  |~rails [git root]
435
301
  | |\-rails\.gemspec [rails gem located here]
436
302
  |~actionpack
437
303
  | |\-actionpack\.gemspec [actionpack gem located here]
438
304
  |~activesupport
439
305
  | |\-activesupport\.gemspec [activesupport gem located here]
440
- |\.\.\.
441
- .
306
+ |\|\.\|\.\|\.
442
307
  .fi
443
- .
444
308
  .IP "" 0
445
- .
446
309
  .P
447
310
  To install a gem located in a git repository, bundler changes to the directory containing the gemspec, runs \fBgem build name\.gemspec\fR and then installs the resulting gem\. The \fBgem build\fR command, which comes standard with Rubygems, evaluates the \fB\.gemspec\fR in the context of the directory in which it is located\.
448
- .
449
311
  .SS "GIT SOURCE"
450
- A custom git source can be defined via the \fBgit_source\fR method\. Provide the source\'s name as an argument, and a block which receives a single argument and interpolates it into a string to return the full repo address:
451
- .
312
+ A custom git source can be defined via the \fBgit_source\fR method\. Provide the source's name as an argument, and a block which receives a single argument and interpolates it into a string to return the full repo address:
452
313
  .IP "" 4
453
- .
454
314
  .nf
455
-
456
315
  git_source(:stash){ |repo_name| "https://stash\.corp\.acme\.pl/#{repo_name}\.git" }
457
- gem \'rails\', :stash => \'forks/rails\'
458
- .
316
+ gem 'rails', stash: 'forks/rails'
459
317
  .fi
460
- .
461
318
  .IP "" 0
462
- .
463
319
  .P
464
320
  In addition, if you wish to choose a specific branch:
465
- .
466
321
  .IP "" 4
467
- .
468
322
  .nf
469
-
470
- gem "rails", :stash => "forks/rails", :branch => "branch_name"
471
- .
323
+ gem "rails", stash: "forks/rails", branch: "branch_name"
472
324
  .fi
473
- .
474
325
  .IP "" 0
475
- .
476
326
  .SS "GITHUB"
477
327
  \fBNOTE\fR: This shorthand should be avoided until Bundler 2\.0, since it currently expands to an insecure \fBgit://\fR URL\. This allows a man\-in\-the\-middle attacker to compromise your system\.
478
- .
479
328
  .P
480
329
  If the git repository you want to use is hosted on GitHub and is public, you can use the :github shorthand to specify the github username and repository name (without the trailing "\.git"), separated by a slash\. If both the username and repository name are the same, you can omit one\.
481
- .
482
330
  .IP "" 4
483
- .
484
331
  .nf
485
-
486
- gem "rails", :github => "rails/rails"
487
- gem "rails", :github => "rails"
488
- .
332
+ gem "rails", github: "rails/rails"
333
+ gem "rails", github: "rails"
489
334
  .fi
490
- .
491
335
  .IP "" 0
492
- .
493
336
  .P
494
337
  Are both equivalent to
495
- .
496
338
  .IP "" 4
497
- .
498
339
  .nf
499
-
500
- gem "rails", :git => "git://github\.com/rails/rails\.git"
501
- .
340
+ gem "rails", git: "https://github\.com/rails/rails\.git"
502
341
  .fi
503
- .
504
342
  .IP "" 0
505
- .
506
343
  .P
507
344
  Since the \fBgithub\fR method is a specialization of \fBgit_source\fR, it accepts a \fB:branch\fR named argument\.
508
- .
345
+ .P
346
+ You can also directly pass a pull request URL:
347
+ .IP "" 4
348
+ .nf
349
+ gem "rails", github: "https://github\.com/rails/rails/pull/43753"
350
+ .fi
351
+ .IP "" 0
352
+ .P
353
+ Which is equivalent to:
354
+ .IP "" 4
355
+ .nf
356
+ gem "rails", github: "rails/rails", branch: "refs/pull/43753/head"
357
+ .fi
358
+ .IP "" 0
509
359
  .SS "GIST"
510
- 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")\.
511
- .
360
+ If the git repository you want to use is hosted as a GitHub Gist and is public, you can use the :gist shorthand to specify the gist identifier (without the trailing "\.git")\.
512
361
  .IP "" 4
513
- .
514
362
  .nf
515
-
516
- gem "the_hatch", :gist => "4815162342"
517
- .
363
+ gem "the_hatch", gist: "4815162342"
518
364
  .fi
519
- .
520
365
  .IP "" 0
521
- .
522
366
  .P
523
367
  Is equivalent to:
524
- .
525
368
  .IP "" 4
526
- .
527
369
  .nf
528
-
529
- gem "the_hatch", :git => "https://gist\.github\.com/4815162342\.git"
530
- .
370
+ gem "the_hatch", git: "https://gist\.github\.com/4815162342\.git"
531
371
  .fi
532
- .
533
372
  .IP "" 0
534
- .
535
373
  .P
536
374
  Since the \fBgist\fR method is a specialization of \fBgit_source\fR, it accepts a \fB:branch\fR named argument\.
537
- .
538
375
  .SS "BITBUCKET"
539
376
  If the git repository you want to use is hosted on Bitbucket and is public, you can use the :bitbucket shorthand to specify the bitbucket username and repository name (without the trailing "\.git"), separated by a slash\. If both the username and repository name are the same, you can omit one\.
540
- .
541
377
  .IP "" 4
542
- .
543
378
  .nf
544
-
545
- gem "rails", :bitbucket => "rails/rails"
546
- gem "rails", :bitbucket => "rails"
547
- .
379
+ gem "rails", bitbucket: "rails/rails"
380
+ gem "rails", bitbucket: "rails"
548
381
  .fi
549
- .
550
382
  .IP "" 0
551
- .
552
383
  .P
553
384
  Are both equivalent to
554
- .
555
385
  .IP "" 4
556
- .
557
386
  .nf
558
-
559
- gem "rails", :git => "https://rails@bitbucket\.org/rails/rails\.git"
560
- .
387
+ gem "rails", git: "https://rails@bitbucket\.org/rails/rails\.git"
561
388
  .fi
562
- .
563
389
  .IP "" 0
564
- .
565
390
  .P
566
391
  Since the \fBbitbucket\fR method is a specialization of \fBgit_source\fR, it accepts a \fB:branch\fR named argument\.
567
- .
568
392
  .SS "PATH"
569
393
  You can specify that a gem is located in a particular location on the file system\. Relative paths are resolved relative to the directory containing the \fBGemfile\fR\.
570
- .
571
394
  .P
572
395
  Similar to the semantics of the \fB:git\fR option, the \fB:path\fR option requires that the directory in question either contains a \fB\.gemspec\fR for the gem, or that you specify an explicit version that bundler should use\.
573
- .
574
396
  .P
575
397
  Unlike \fB:git\fR, bundler does not compile C extensions for gems specified as paths\.
576
- .
577
398
  .IP "" 4
578
- .
579
399
  .nf
580
-
581
- gem "rails", :path => "vendor/rails"
582
- .
400
+ gem "rails", path: "vendor/rails"
583
401
  .fi
584
- .
585
402
  .IP "" 0
586
- .
587
403
  .P
588
- If you would like to use multiple local gems directly from the filesystem, you can set a global \fBpath\fR option to the path containing the gem\'s files\. This will automatically load gemspec files from subdirectories\.
589
- .
404
+ If you would like to use multiple local gems directly from the filesystem, you can set a global \fBpath\fR option to the path containing the gem's files\. This will automatically load gemspec files from subdirectories\.
590
405
  .IP "" 4
591
- .
592
406
  .nf
593
-
594
- path \'components\' do
595
- gem \'admin_ui\'
596
- gem \'public_ui\'
407
+ path 'components' do
408
+ gem 'admin_ui'
409
+ gem 'public_ui'
597
410
  end
598
- .
599
411
  .fi
600
- .
601
412
  .IP "" 0
602
- .
603
413
  .SH "BLOCK FORM OF SOURCE, GIT, PATH, GROUP and PLATFORMS"
604
414
  The \fB:source\fR, \fB:git\fR, \fB:path\fR, \fB:group\fR, and \fB:platforms\fR options may be applied to a group of gems by using block form\.
605
- .
606
415
  .IP "" 4
607
- .
608
416
  .nf
609
-
610
417
  source "https://gems\.example\.com" do
611
418
  gem "some_internal_gem"
612
419
  gem "another_internal_gem"
@@ -622,65 +429,44 @@ platforms :ruby do
622
429
  gem "sqlite3"
623
430
  end
624
431
 
625
- group :development, :optional => true do
432
+ group :development, optional: true do
626
433
  gem "wirble"
627
434
  gem "faker"
628
435
  end
629
- .
630
436
  .fi
631
- .
632
437
  .IP "" 0
633
- .
634
438
  .P
635
439
  In the case of the group block form the :optional option can be given to prevent a group from being installed unless listed in the \fB\-\-with\fR option given to the \fBbundle install\fR command\.
636
- .
637
440
  .P
638
441
  In the case of the \fBgit\fR block form, the \fB:ref\fR, \fB:branch\fR, \fB:tag\fR, and \fB:submodules\fR options may be passed to the \fBgit\fR method, and all gems in the block will inherit those options\.
639
- .
640
442
  .P
641
443
  The presence of a \fBsource\fR block in a Gemfile also makes that source available as a possible global source for any other gems which do not specify explicit sources\. Thus, when defining source blocks, it is recommended that you also ensure all other gems in the Gemfile are using explicit sources, either via source blocks or \fB:source\fR directives on individual gems\.
642
- .
643
444
  .SH "INSTALL_IF"
644
445
  The \fBinstall_if\fR method allows gems to be installed based on a proc or lambda\. This is especially useful for optional gems that can only be used if certain software is installed or some other conditions are met\.
645
- .
646
446
  .IP "" 4
647
- .
648
447
  .nf
649
-
650
448
  install_if \-> { RUBY_PLATFORM =~ /darwin/ } do
651
449
  gem "pasteboard"
652
450
  end
653
- .
654
451
  .fi
655
- .
656
452
  .IP "" 0
657
- .
658
453
  .SH "GEMSPEC"
659
- The \fB\.gemspec\fR \fIhttp://guides\.rubygems\.org/specification\-reference/\fR file is where you provide metadata about your gem to Rubygems\. Some required Gemspec attributes include the name, description, and homepage of your gem\. This is also where you specify the dependencies your gem needs to run\.
660
- .
454
+ The \fB\.gemspec\fR \fIhttps://guides\.rubygems\.org/specification\-reference/\fR file is where you provide metadata about your gem to Rubygems\. Some required Gemspec attributes include the name, description, and homepage of your gem\. This is also where you specify the dependencies your gem needs to run\.
661
455
  .P
662
456
  If you wish to use Bundler to help install dependencies for a gem while it is being developed, use the \fBgemspec\fR method to pull in the dependencies listed in the \fB\.gemspec\fR file\.
663
- .
664
457
  .P
665
- 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\.
666
- .
458
+ The \fBgemspec\fR method adds any runtime dependencies as gem requirements in the default group\. It also adds development dependencies as gem requirements in the \fBdevelopment\fR group\. Finally, it adds a gem requirement on your project (\fBpath: '\.'\fR)\. In conjunction with \fBBundler\.setup\fR, this allows you to require project files in your test code as you would if the project were installed as a gem; you need not manipulate the load path manually or require project files via relative paths\.
667
459
  .P
668
- 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\.
669
- .
460
+ The \fBgemspec\fR method supports optional \fB:path\fR, \fB:glob\fR, \fB:name\fR, and \fB:development_group\fR options, which control where bundler looks for the \fB\.gemspec\fR, the glob it uses to look for the gemspec (defaults to: \fB{,*,*/*}\.gemspec\fR), what named \fB\.gemspec\fR it uses (if more than one is present), and which group development dependencies are included in\.
670
461
  .P
671
462
  When a \fBgemspec\fR dependency encounters version conflicts during resolution, the local version under development will always be selected \-\- even if there are remote versions that better match other requirements for the \fBgemspec\fR gem\.
672
- .
673
463
  .SH "SOURCE PRIORITY"
674
464
  When attempting to locate a gem to satisfy a gem requirement, bundler uses the following priority order:
675
- .
676
465
  .IP "1." 4
677
466
  The source explicitly attached to the gem (using \fB:source\fR, \fB:path\fR, or \fB:git\fR)
678
- .
679
467
  .IP "2." 4
680
468
  For implicit gems (dependencies of explicit gems), any source, git, or path repository declared on the parent\. This results in bundler prioritizing the ActiveSupport gem from the Rails git repository over ones from \fBrubygems\.org\fR
681
- .
682
469
  .IP "3." 4
683
- The sources specified via global \fBsource\fR lines, searching each source in your \fBGemfile\fR from last added to first added\.
684
- .
470
+ If neither of the above conditions are met, the global source will be used\. If multiple global sources are specified, they will be prioritized from last to first, but this is deprecated since Bundler 1\.13, so Bundler prints a warning and will abort with an error in the future\.
685
471
  .IP "" 0
686
472