bundler 1.17.3 → 2.6.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (426) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3354 -1258
  3. data/LICENSE.md +18 -19
  4. data/README.md +10 -15
  5. data/bundler.gemspec +15 -33
  6. data/exe/bundle +8 -10
  7. data/exe/bundler +1 -1
  8. data/lib/bundler/.document +1 -0
  9. data/lib/bundler/build_metadata.rb +5 -13
  10. data/lib/bundler/capistrano.rb +5 -5
  11. data/lib/bundler/checksum.rb +254 -0
  12. data/lib/bundler/ci_detector.rb +75 -0
  13. data/lib/bundler/cli/add.rb +29 -15
  14. data/lib/bundler/cli/binstubs.rb +13 -5
  15. data/lib/bundler/cli/cache.rb +24 -17
  16. data/lib/bundler/cli/check.rb +7 -5
  17. data/lib/bundler/cli/clean.rb +1 -1
  18. data/lib/bundler/cli/common.rb +50 -14
  19. data/lib/bundler/cli/config.rb +171 -86
  20. data/lib/bundler/cli/console.rb +3 -6
  21. data/lib/bundler/cli/doctor.rb +29 -12
  22. data/lib/bundler/cli/exec.rb +9 -25
  23. data/lib/bundler/cli/fund.rb +36 -0
  24. data/lib/bundler/cli/gem.rb +268 -53
  25. data/lib/bundler/cli/info.rb +51 -18
  26. data/lib/bundler/cli/init.rb +7 -3
  27. data/lib/bundler/cli/inject.rb +2 -2
  28. data/lib/bundler/cli/install.rb +55 -73
  29. data/lib/bundler/cli/issue.rb +9 -8
  30. data/lib/bundler/cli/list.rb +19 -11
  31. data/lib/bundler/cli/lock.rb +56 -26
  32. data/lib/bundler/cli/open.rb +10 -7
  33. data/lib/bundler/cli/outdated.rb +159 -128
  34. data/lib/bundler/cli/platform.rb +8 -6
  35. data/lib/bundler/cli/plugin.rb +23 -12
  36. data/lib/bundler/cli/pristine.rb +39 -26
  37. data/lib/bundler/cli/remove.rb +1 -2
  38. data/lib/bundler/cli/show.rb +7 -7
  39. data/lib/bundler/cli/update.rb +51 -19
  40. data/lib/bundler/cli/viz.rb +1 -1
  41. data/lib/bundler/cli.rb +399 -390
  42. data/lib/bundler/compact_index_client/cache.rb +55 -77
  43. data/lib/bundler/compact_index_client/cache_file.rb +148 -0
  44. data/lib/bundler/compact_index_client/gem_parser.rb +32 -0
  45. data/lib/bundler/compact_index_client/parser.rb +84 -0
  46. data/lib/bundler/compact_index_client/updater.rb +72 -84
  47. data/lib/bundler/compact_index_client.rb +61 -73
  48. data/lib/bundler/constants.rb +9 -2
  49. data/lib/bundler/current_ruby.rb +20 -21
  50. data/lib/bundler/definition.rb +663 -505
  51. data/lib/bundler/dependency.rb +38 -71
  52. data/lib/bundler/deployment.rb +1 -1
  53. data/lib/bundler/digest.rb +71 -0
  54. data/lib/bundler/dsl.rb +171 -152
  55. data/lib/bundler/endpoint_specification.rb +43 -17
  56. data/lib/bundler/env.rb +11 -18
  57. data/lib/bundler/environment_preserver.rb +17 -8
  58. data/lib/bundler/errors.rb +115 -14
  59. data/lib/bundler/feature_flag.rb +15 -39
  60. data/lib/bundler/fetcher/base.rb +12 -12
  61. data/lib/bundler/fetcher/compact_index.rb +41 -47
  62. data/lib/bundler/fetcher/dependency.rb +4 -8
  63. data/lib/bundler/fetcher/downloader.rb +27 -20
  64. data/lib/bundler/fetcher/gem_remote_fetcher.rb +16 -0
  65. data/lib/bundler/fetcher/index.rb +6 -33
  66. data/lib/bundler/fetcher.rb +109 -90
  67. data/lib/bundler/force_platform.rb +16 -0
  68. data/lib/bundler/friendly_errors.rb +50 -55
  69. data/lib/bundler/gem_helper.rb +81 -46
  70. data/lib/bundler/gem_helpers.rb +78 -29
  71. data/lib/bundler/gem_tasks.rb +1 -1
  72. data/lib/bundler/gem_version_promoter.rb +68 -109
  73. data/lib/bundler/graph.rb +11 -11
  74. data/lib/bundler/index.rb +74 -82
  75. data/lib/bundler/injector.rb +58 -26
  76. data/lib/bundler/inline.rb +59 -35
  77. data/lib/bundler/installer/gem_installer.rb +29 -29
  78. data/lib/bundler/installer/parallel_installer.rb +38 -68
  79. data/lib/bundler/installer/standalone.rb +76 -16
  80. data/lib/bundler/installer.rb +60 -135
  81. data/lib/bundler/lazy_specification.rb +161 -63
  82. data/lib/bundler/lockfile_generator.rb +14 -5
  83. data/lib/bundler/lockfile_parser.rb +150 -109
  84. data/lib/bundler/man/bundle-add.1 +76 -0
  85. data/lib/bundler/man/bundle-add.1.ronn +87 -0
  86. data/{man → lib/bundler/man}/bundle-binstubs.1 +15 -22
  87. data/{man/bundle-binstubs.ronn → lib/bundler/man/bundle-binstubs.1.ronn} +8 -7
  88. data/lib/bundler/man/bundle-cache.1 +68 -0
  89. data/lib/bundler/man/bundle-cache.1.ronn +108 -0
  90. data/{man → lib/bundler/man}/bundle-check.1 +7 -14
  91. data/{man/bundle-check.ronn → lib/bundler/man/bundle-check.1.ronn} +7 -2
  92. data/{man → lib/bundler/man}/bundle-clean.1 +4 -11
  93. data/{man/bundle-clean.ronn → lib/bundler/man/bundle-clean.1.ronn} +1 -1
  94. data/{man → lib/bundler/man}/bundle-config.1 +80 -260
  95. data/{man/bundle-config.ronn → lib/bundler/man/bundle-config.1.ronn} +104 -98
  96. data/lib/bundler/man/bundle-console.1 +33 -0
  97. data/lib/bundler/man/bundle-console.1.ronn +39 -0
  98. data/{man → lib/bundler/man}/bundle-doctor.1 +5 -19
  99. data/{man/bundle-doctor.ronn → lib/bundler/man/bundle-doctor.1.ronn} +1 -1
  100. data/lib/bundler/man/bundle-env.1 +9 -0
  101. data/lib/bundler/man/bundle-env.1.ronn +10 -0
  102. data/{man → lib/bundler/man}/bundle-exec.1 +20 -78
  103. data/{man/bundle-exec.ronn → lib/bundler/man/bundle-exec.1.ronn} +12 -10
  104. data/lib/bundler/man/bundle-fund.1 +22 -0
  105. data/lib/bundler/man/bundle-fund.1.ronn +25 -0
  106. data/lib/bundler/man/bundle-gem.1 +87 -0
  107. data/lib/bundler/man/bundle-gem.1.ronn +149 -0
  108. data/lib/bundler/man/bundle-help.1 +9 -0
  109. data/lib/bundler/man/bundle-help.1.ronn +12 -0
  110. data/lib/bundler/man/bundle-info.1 +17 -0
  111. data/lib/bundler/man/bundle-info.1.ronn +21 -0
  112. data/{man → lib/bundler/man}/bundle-init.1 +8 -13
  113. data/{man/bundle-init.ronn → lib/bundler/man/bundle-init.1.ronn} +5 -2
  114. data/lib/bundler/man/bundle-inject.1 +31 -0
  115. data/{man/bundle-inject.ronn → lib/bundler/man/bundle-inject.1.ronn} +12 -2
  116. data/{man → lib/bundler/man}/bundle-install.1 +65 -155
  117. data/{man/bundle-install.ronn → lib/bundler/man/bundle-install.1.ronn} +66 -57
  118. data/lib/bundler/man/bundle-issue.1 +45 -0
  119. data/lib/bundler/man/bundle-issue.1.ronn +37 -0
  120. data/lib/bundler/man/bundle-licenses.1 +9 -0
  121. data/lib/bundler/man/bundle-licenses.1.ronn +10 -0
  122. data/{man → lib/bundler/man}/bundle-list.1 +9 -24
  123. data/{man/bundle-list.ronn → lib/bundler/man/bundle-list.1.ronn} +10 -7
  124. data/{man → lib/bundler/man}/bundle-lock.1 +25 -34
  125. data/{man/bundle-lock.ronn → lib/bundler/man/bundle-lock.1.ronn} +25 -4
  126. data/lib/bundler/man/bundle-open.1 +32 -0
  127. data/{man/bundle-open.ronn → lib/bundler/man/bundle-open.1.ronn} +10 -1
  128. data/{man → lib/bundler/man}/bundle-outdated.1 +23 -75
  129. data/{man/bundle-outdated.ronn → lib/bundler/man/bundle-outdated.1.ronn} +21 -22
  130. data/lib/bundler/man/bundle-platform.1 +49 -0
  131. data/{man/bundle-platform.ronn → lib/bundler/man/bundle-platform.1.ronn} +14 -7
  132. data/lib/bundler/man/bundle-plugin.1 +58 -0
  133. data/lib/bundler/man/bundle-plugin.1.ronn +63 -0
  134. data/{man → lib/bundler/man}/bundle-pristine.1 +5 -16
  135. data/{man/bundle-pristine.ronn → lib/bundler/man/bundle-pristine.1.ronn} +1 -1
  136. data/{man → lib/bundler/man}/bundle-remove.1 +4 -14
  137. data/{man/bundle-remove.ronn → lib/bundler/man/bundle-remove.1.ronn} +1 -1
  138. data/{man → lib/bundler/man}/bundle-show.1 +7 -11
  139. data/{man/bundle-show.ronn → lib/bundler/man/bundle-show.1.ronn} +4 -0
  140. data/{man → lib/bundler/man}/bundle-update.1 +35 -148
  141. data/{man/bundle-update.ronn → lib/bundler/man/bundle-update.1.ronn} +21 -12
  142. data/lib/bundler/man/bundle-version.1 +22 -0
  143. data/lib/bundler/man/bundle-version.1.ronn +24 -0
  144. data/{man → lib/bundler/man}/bundle-viz.1 +9 -18
  145. data/{man/bundle-viz.ronn → lib/bundler/man/bundle-viz.1.ronn} +9 -3
  146. data/{man → lib/bundler/man}/bundle.1 +19 -53
  147. data/{man/bundle.ronn → lib/bundler/man/bundle.1.ronn} +14 -9
  148. data/{man → lib/bundler/man}/gemfile.5 +139 -356
  149. data/{man → lib/bundler/man}/gemfile.5.ronn +134 -97
  150. data/{man → lib/bundler/man}/index.txt +9 -1
  151. data/lib/bundler/match_metadata.rb +17 -0
  152. data/lib/bundler/match_platform.rb +2 -3
  153. data/lib/bundler/match_remote_metadata.rb +29 -0
  154. data/lib/bundler/materialization.rb +59 -0
  155. data/lib/bundler/mirror.rb +10 -12
  156. data/lib/bundler/plugin/api/source.rb +34 -18
  157. data/lib/bundler/plugin/api.rb +1 -1
  158. data/lib/bundler/plugin/dsl.rb +1 -1
  159. data/lib/bundler/plugin/events.rb +24 -0
  160. data/lib/bundler/plugin/index.rb +44 -9
  161. data/lib/bundler/plugin/installer/git.rb +0 -4
  162. data/lib/bundler/plugin/installer/path.rb +18 -0
  163. data/lib/bundler/plugin/installer/rubygems.rb +1 -9
  164. data/lib/bundler/plugin/installer.rb +63 -27
  165. data/lib/bundler/plugin/source_list.rb +5 -1
  166. data/lib/bundler/plugin.rb +131 -45
  167. data/lib/bundler/process_lock.rb +10 -14
  168. data/lib/bundler/remote_specification.rb +22 -10
  169. data/lib/bundler/resolver/base.rb +118 -0
  170. data/lib/bundler/resolver/candidate.rb +82 -0
  171. data/lib/bundler/resolver/incompatibility.rb +15 -0
  172. data/lib/bundler/resolver/package.rb +90 -0
  173. data/lib/bundler/resolver/root.rb +25 -0
  174. data/lib/bundler/resolver/spec_group.rb +60 -68
  175. data/lib/bundler/resolver.rb +454 -303
  176. data/lib/bundler/retry.rb +6 -6
  177. data/lib/bundler/ruby_dsl.rb +51 -7
  178. data/lib/bundler/ruby_version.rb +23 -38
  179. data/lib/bundler/rubygems_ext.rb +357 -98
  180. data/lib/bundler/rubygems_gem_installer.rb +131 -65
  181. data/lib/bundler/rubygems_integration.rb +149 -591
  182. data/lib/bundler/runtime.rb +51 -51
  183. data/lib/bundler/safe_marshal.rb +31 -0
  184. data/lib/bundler/self_manager.rb +206 -0
  185. data/lib/bundler/settings.rb +271 -135
  186. data/lib/bundler/setup.rb +23 -12
  187. data/lib/bundler/shared_helpers.rb +127 -117
  188. data/lib/bundler/similarity_detector.rb +3 -3
  189. data/lib/bundler/source/git/git_proxy.rb +326 -127
  190. data/lib/bundler/source/git.rb +207 -88
  191. data/lib/bundler/source/metadata.rb +19 -18
  192. data/lib/bundler/source/path/installer.rb +11 -32
  193. data/lib/bundler/source/path.rb +39 -38
  194. data/lib/bundler/source/rubygems/remote.rb +3 -4
  195. data/lib/bundler/source/rubygems.rb +223 -255
  196. data/lib/bundler/source/rubygems_aggregate.rb +68 -0
  197. data/lib/bundler/source.rb +33 -11
  198. data/lib/bundler/source_list.rb +131 -66
  199. data/lib/bundler/source_map.rb +71 -0
  200. data/lib/bundler/spec_set.rb +239 -94
  201. data/lib/bundler/stub_specification.rb +77 -39
  202. data/lib/bundler/templates/Executable +3 -5
  203. data/lib/bundler/templates/Executable.bundler +23 -19
  204. data/lib/bundler/templates/Executable.standalone +4 -4
  205. data/lib/bundler/templates/Gemfile +0 -2
  206. data/lib/bundler/templates/newgem/CHANGELOG.md.tt +5 -0
  207. data/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +104 -46
  208. data/lib/bundler/templates/newgem/Cargo.toml.tt +7 -0
  209. data/lib/bundler/templates/newgem/Gemfile.tt +19 -2
  210. data/lib/bundler/templates/newgem/README.md.tt +18 -16
  211. data/lib/bundler/templates/newgem/Rakefile.tt +44 -6
  212. data/lib/bundler/templates/newgem/bin/console.tt +1 -4
  213. data/lib/bundler/templates/newgem/circleci/config.yml.tt +25 -0
  214. data/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +15 -0
  215. data/lib/bundler/templates/newgem/ext/newgem/extconf-c.rb.tt +10 -0
  216. data/lib/bundler/templates/newgem/ext/newgem/extconf-rust.rb.tt +6 -0
  217. data/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt +1 -1
  218. data/lib/bundler/templates/newgem/ext/newgem/src/lib.rs.tt +12 -0
  219. data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +37 -0
  220. data/lib/bundler/templates/newgem/gitignore.tt +3 -0
  221. data/lib/bundler/templates/newgem/gitlab-ci.yml.tt +18 -0
  222. data/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +2 -0
  223. data/lib/bundler/templates/newgem/lib/newgem.rb.tt +4 -2
  224. data/lib/bundler/templates/newgem/newgem.gemspec.tt +37 -40
  225. data/lib/bundler/templates/newgem/rubocop.yml.tt +8 -0
  226. data/lib/bundler/templates/newgem/sig/newgem.rbs.tt +8 -0
  227. data/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +2 -0
  228. data/lib/bundler/templates/newgem/spec/spec_helper.rb.tt +2 -1
  229. data/lib/bundler/templates/newgem/standard.yml.tt +3 -0
  230. data/lib/bundler/templates/newgem/test/minitest/test_helper.rb.tt +6 -0
  231. data/lib/bundler/templates/newgem/test/{newgem_test.rb.tt → minitest/test_newgem.rb.tt} +3 -1
  232. data/lib/bundler/templates/newgem/test/test-unit/newgem_test.rb.tt +15 -0
  233. data/lib/bundler/templates/newgem/test/test-unit/test_helper.rb.tt +6 -0
  234. data/lib/bundler/ui/rg_proxy.rb +2 -2
  235. data/lib/bundler/ui/shell.rb +64 -23
  236. data/lib/bundler/ui/silent.rb +33 -6
  237. data/lib/bundler/ui.rb +3 -3
  238. data/lib/bundler/uri_credentials_filter.rb +11 -5
  239. data/lib/bundler/uri_normalizer.rb +23 -0
  240. data/lib/bundler/vendor/.document +1 -0
  241. data/lib/bundler/vendor/connection_pool/.document +1 -0
  242. data/lib/bundler/vendor/connection_pool/LICENSE +20 -0
  243. data/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +174 -0
  244. data/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +3 -0
  245. data/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb +56 -0
  246. data/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +175 -0
  247. data/lib/bundler/vendor/fileutils/.document +1 -0
  248. data/lib/bundler/vendor/fileutils/COPYING +56 -0
  249. data/lib/bundler/vendor/fileutils/lib/fileutils.rb +1490 -432
  250. data/lib/bundler/vendor/net-http-persistent/.document +1 -0
  251. data/lib/bundler/vendor/net-http-persistent/README.rdoc +82 -0
  252. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb +41 -0
  253. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb +65 -0
  254. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb +79 -0
  255. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +362 -484
  256. data/lib/bundler/vendor/pub_grub/.document +1 -0
  257. data/lib/bundler/vendor/pub_grub/LICENSE.txt +21 -0
  258. data/lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb +20 -0
  259. data/lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb +189 -0
  260. data/lib/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb +182 -0
  261. data/lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb +150 -0
  262. data/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb +43 -0
  263. data/lib/bundler/vendor/pub_grub/lib/pub_grub/partial_solution.rb +121 -0
  264. data/lib/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb +45 -0
  265. data/lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb +19 -0
  266. data/lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb +61 -0
  267. data/lib/bundler/vendor/pub_grub/lib/pub_grub/term.rb +105 -0
  268. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version.rb +3 -0
  269. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb +129 -0
  270. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb +411 -0
  271. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +248 -0
  272. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb +178 -0
  273. data/lib/bundler/vendor/pub_grub/lib/pub_grub.rb +31 -0
  274. data/lib/bundler/vendor/securerandom/.document +1 -0
  275. data/lib/bundler/vendor/securerandom/COPYING +56 -0
  276. data/lib/bundler/vendor/securerandom/lib/securerandom.rb +102 -0
  277. data/lib/bundler/vendor/thor/.document +1 -0
  278. data/lib/bundler/vendor/thor/LICENSE.md +20 -0
  279. data/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb +4 -3
  280. data/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb +3 -2
  281. data/lib/bundler/vendor/thor/lib/thor/actions/directory.rb +8 -18
  282. data/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +1 -1
  283. data/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +27 -20
  284. data/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +34 -13
  285. data/lib/bundler/vendor/thor/lib/thor/actions.rb +47 -28
  286. data/lib/bundler/vendor/thor/lib/thor/base.rb +200 -54
  287. data/lib/bundler/vendor/thor/lib/thor/command.rb +34 -18
  288. data/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +10 -0
  289. data/lib/bundler/vendor/thor/lib/thor/error.rb +74 -0
  290. data/lib/bundler/vendor/thor/lib/thor/group.rb +15 -4
  291. data/lib/bundler/vendor/thor/lib/thor/invocation.rb +2 -1
  292. data/lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb +1 -1
  293. data/lib/bundler/vendor/thor/lib/thor/line_editor/readline.rb +6 -6
  294. data/lib/bundler/vendor/thor/lib/thor/line_editor.rb +2 -2
  295. data/lib/bundler/vendor/thor/lib/thor/nested_context.rb +29 -0
  296. data/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +17 -1
  297. data/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +35 -15
  298. data/lib/bundler/vendor/thor/lib/thor/parser/option.rb +45 -13
  299. data/lib/bundler/vendor/thor/lib/thor/parser/options.rb +86 -13
  300. data/lib/bundler/vendor/thor/lib/thor/parser.rb +4 -4
  301. data/lib/bundler/vendor/thor/lib/thor/rake_compat.rb +3 -2
  302. data/lib/bundler/vendor/thor/lib/thor/runner.rb +51 -40
  303. data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +99 -148
  304. data/lib/bundler/vendor/thor/lib/thor/shell/color.rb +6 -43
  305. data/lib/bundler/vendor/thor/lib/thor/shell/column_printer.rb +29 -0
  306. data/lib/bundler/vendor/thor/lib/thor/shell/html.rb +4 -49
  307. data/lib/bundler/vendor/thor/lib/thor/shell/table_printer.rb +118 -0
  308. data/lib/bundler/vendor/thor/lib/thor/shell/terminal.rb +42 -0
  309. data/lib/bundler/vendor/thor/lib/thor/shell/wrapped_printer.rb +38 -0
  310. data/lib/bundler/vendor/thor/lib/thor/shell.rb +6 -6
  311. data/lib/bundler/vendor/thor/lib/thor/util.rb +26 -9
  312. data/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
  313. data/lib/bundler/vendor/thor/lib/thor.rb +182 -17
  314. data/lib/bundler/vendor/tsort/.document +1 -0
  315. data/lib/bundler/vendor/tsort/LICENSE.txt +22 -0
  316. data/lib/bundler/vendor/tsort/lib/tsort.rb +455 -0
  317. data/lib/bundler/vendor/uri/.document +1 -0
  318. data/lib/bundler/vendor/uri/COPYING +56 -0
  319. data/lib/bundler/vendor/uri/lib/uri/common.rb +876 -0
  320. data/lib/bundler/vendor/uri/lib/uri/file.rb +100 -0
  321. data/lib/bundler/vendor/uri/lib/uri/ftp.rb +267 -0
  322. data/lib/bundler/vendor/uri/lib/uri/generic.rb +1578 -0
  323. data/lib/bundler/vendor/uri/lib/uri/http.rb +125 -0
  324. data/lib/bundler/vendor/uri/lib/uri/https.rb +23 -0
  325. data/lib/bundler/vendor/uri/lib/uri/ldap.rb +261 -0
  326. data/lib/bundler/vendor/uri/lib/uri/ldaps.rb +22 -0
  327. data/lib/bundler/vendor/uri/lib/uri/mailto.rb +293 -0
  328. data/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +546 -0
  329. data/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +206 -0
  330. data/lib/bundler/vendor/uri/lib/uri/version.rb +6 -0
  331. data/lib/bundler/vendor/uri/lib/uri/ws.rb +83 -0
  332. data/lib/bundler/vendor/uri/lib/uri/wss.rb +23 -0
  333. data/lib/bundler/vendor/uri/lib/uri.rb +104 -0
  334. data/lib/bundler/vendored_fileutils.rb +1 -6
  335. data/lib/bundler/vendored_net_http.rb +23 -0
  336. data/lib/bundler/vendored_persistent.rb +1 -42
  337. data/lib/bundler/{vendored_molinillo.rb → vendored_pub_grub.rb} +1 -1
  338. data/lib/bundler/vendored_securerandom.rb +12 -0
  339. data/lib/bundler/vendored_thor.rb +2 -2
  340. data/lib/bundler/vendored_timeout.rb +12 -0
  341. data/lib/bundler/vendored_tsort.rb +4 -0
  342. data/lib/bundler/vendored_uri.rb +21 -0
  343. data/lib/bundler/version.rb +5 -20
  344. data/lib/bundler/vlad.rb +3 -3
  345. data/lib/bundler/worker.rb +26 -15
  346. data/lib/bundler/yaml_serializer.rb +21 -13
  347. data/lib/bundler.rb +364 -230
  348. metadata +186 -218
  349. data/exe/bundle_ruby +0 -60
  350. data/lib/bundler/cli/package.rb +0 -49
  351. data/lib/bundler/compatibility_guard.rb +0 -14
  352. data/lib/bundler/dep_proxy.rb +0 -48
  353. data/lib/bundler/gem_remote_fetcher.rb +0 -43
  354. data/lib/bundler/gemdeps.rb +0 -29
  355. data/lib/bundler/psyched_yaml.rb +0 -37
  356. data/lib/bundler/ssl_certs/certificate_manager.rb +0 -66
  357. data/lib/bundler/ssl_certs/index.rubygems.org/GlobalSignRootCA.pem +0 -21
  358. data/lib/bundler/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem +0 -23
  359. data/lib/bundler/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem +0 -25
  360. data/lib/bundler/templates/gems.rb +0 -8
  361. data/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt +0 -3
  362. data/lib/bundler/templates/newgem/test/test_helper.rb.tt +0 -4
  363. data/lib/bundler/templates/newgem/travis.yml.tt +0 -7
  364. data/lib/bundler/vendor/molinillo/lib/molinillo/compatibility.rb +0 -26
  365. data/lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +0 -57
  366. data/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +0 -81
  367. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb +0 -36
  368. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +0 -66
  369. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +0 -62
  370. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +0 -63
  371. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +0 -61
  372. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb +0 -126
  373. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb +0 -46
  374. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +0 -36
  375. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +0 -136
  376. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +0 -223
  377. data/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +0 -143
  378. data/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +0 -6
  379. data/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +0 -101
  380. data/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb +0 -67
  381. data/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +0 -837
  382. data/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb +0 -46
  383. data/lib/bundler/vendor/molinillo/lib/molinillo/state.rb +0 -58
  384. data/lib/bundler/vendor/molinillo/lib/molinillo.rb +0 -12
  385. data/lib/bundler/vendor/net-http-persistent/lib/net/http/faster.rb +0 -27
  386. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/ssl_reuse.rb +0 -129
  387. data/lib/bundler/vendor/thor/lib/thor/core_ext/io_binary_read.rb +0 -12
  388. data/lib/bundler/vendor/thor/lib/thor/core_ext/ordered_hash.rb +0 -129
  389. data/lib/bundler/version_ranges.rb +0 -76
  390. data/man/bundle-add.1 +0 -58
  391. data/man/bundle-add.1.txt +0 -52
  392. data/man/bundle-add.ronn +0 -40
  393. data/man/bundle-binstubs.1.txt +0 -48
  394. data/man/bundle-check.1.txt +0 -33
  395. data/man/bundle-clean.1.txt +0 -26
  396. data/man/bundle-config.1.txt +0 -529
  397. data/man/bundle-doctor.1.txt +0 -44
  398. data/man/bundle-exec.1.txt +0 -178
  399. data/man/bundle-gem.1 +0 -80
  400. data/man/bundle-gem.1.txt +0 -91
  401. data/man/bundle-gem.ronn +0 -78
  402. data/man/bundle-info.1 +0 -20
  403. data/man/bundle-info.1.txt +0 -21
  404. data/man/bundle-info.ronn +0 -17
  405. data/man/bundle-init.1.txt +0 -34
  406. data/man/bundle-inject.1 +0 -33
  407. data/man/bundle-inject.1.txt +0 -32
  408. data/man/bundle-install.1.txt +0 -396
  409. data/man/bundle-list.1.txt +0 -43
  410. data/man/bundle-lock.1.txt +0 -93
  411. data/man/bundle-open.1 +0 -32
  412. data/man/bundle-open.1.txt +0 -29
  413. data/man/bundle-outdated.1.txt +0 -131
  414. data/man/bundle-package.1 +0 -55
  415. data/man/bundle-package.1.txt +0 -79
  416. data/man/bundle-package.ronn +0 -72
  417. data/man/bundle-platform.1 +0 -61
  418. data/man/bundle-platform.1.txt +0 -57
  419. data/man/bundle-pristine.1.txt +0 -44
  420. data/man/bundle-remove.1.txt +0 -34
  421. data/man/bundle-show.1.txt +0 -27
  422. data/man/bundle-update.1.txt +0 -391
  423. data/man/bundle-viz.1.txt +0 -39
  424. data/man/bundle.1.txt +0 -116
  425. data/man/gemfile.5.txt +0 -653
  426. /data/lib/bundler/{ssl_certs → man}/.document +0 -0
@@ -15,23 +15,28 @@ directory as the `Rakefile`.
15
15
  A `Gemfile` is evaluated as Ruby code, in a context which makes available
16
16
  a number of methods used to describe the gem requirements.
17
17
 
18
- ## GLOBAL SOURCES
18
+ ## GLOBAL SOURCE
19
19
 
20
- At the top of the `Gemfile`, add a line for the `Rubygems` source that contains
21
- the gems listed in the `Gemfile`.
20
+ At the top of the `Gemfile`, add a single line for the `RubyGems` source that
21
+ contains the gems listed in the `Gemfile`.
22
22
 
23
23
  source "https://rubygems.org"
24
24
 
25
- It is possible, but not recommended as of Bundler 1.7, to add multiple global
26
- `source` lines. Each of these `source`s `MUST` be a valid Rubygems repository.
25
+ You can add only one global source. In Bundler 1.13, adding multiple global
26
+ sources was deprecated. The `source` `MUST` be a valid RubyGems repository.
27
27
 
28
- Sources are checked for gems following the heuristics described in
29
- [SOURCE PRIORITY][]. If a gem is found in more than one global source, Bundler
28
+ To use more than one source of RubyGems, you should use [`source` block
29
+ ](#BLOCK-FORM-OF-SOURCE-GIT-PATH-GROUP-and-PLATFORMS).
30
+
31
+ A source is checked for gems following the heuristics described in
32
+ [SOURCE PRIORITY][].
33
+
34
+ **Note about a behavior of the feature deprecated in Bundler 1.13**:
35
+ If a gem is found in more than one global source, Bundler
30
36
  will print a warning after installing the gem indicating which source was used,
31
37
  and listing the other sources where the gem is available. A specific source can
32
38
  be selected for gems that need to use a non-standard repository, suppressing
33
- this warning, by using the [`:source` option](#SOURCE) or a
34
- [`source` block](#BLOCK-FORM-OF-SOURCE-GIT-PATH-GROUP-and-PLATFORMS).
39
+ this warning, by using the [`:source` option](#SOURCE) or `source` block.
35
40
 
36
41
  ### CREDENTIALS
37
42
 
@@ -59,10 +64,20 @@ All parameters are `OPTIONAL` unless otherwise specified.
59
64
  ### VERSION (required)
60
65
 
61
66
  The version of Ruby that your application requires. If your application
62
- requires an alternate Ruby engine, such as JRuby, Rubinius or TruffleRuby, this
67
+ requires an alternate Ruby engine, such as JRuby, TruffleRuby, etc., this
63
68
  should be the Ruby version that the engine is compatible with.
64
69
 
65
- ruby "1.9.3"
70
+ ruby "3.1.2"
71
+
72
+ If you wish to derive your Ruby version from a version file (ie .ruby-version),
73
+ you can use the `file` option instead.
74
+
75
+ ruby file: ".ruby-version"
76
+
77
+ The version file should conform to any of the following formats:
78
+
79
+ - `3.1.2` (.ruby-version)
80
+ - `ruby 3.1.2` (.tool-versions, read: https://asdf-vm.com/manage/configuration.html#tool-versions)
66
81
 
67
82
  ### ENGINE
68
83
 
@@ -81,9 +96,10 @@ What exactly is an Engine?
81
96
 
82
97
  - [Other implementations](https://www.ruby-lang.org/en/about/) of Ruby exist.
83
98
  Some of the more well-known implementations include
84
- [Rubinius](https://rubinius.com/), and [JRuby](http://jruby.org/).
99
+ [JRuby](https://www.jruby.org/) and [TruffleRuby](https://www.graalvm.org/ruby/).
85
100
  Rubinius is an alternative implementation of Ruby written in Ruby.
86
101
  JRuby is an implementation of Ruby on the JVM, short for Java Virtual Machine.
102
+ TruffleRuby is a Ruby implementation on the GraalVM, a language toolkit built on the JVM.
87
103
 
88
104
  ### ENGINE VERSION
89
105
 
@@ -91,13 +107,17 @@ Each application _may_ specify a Ruby engine version. If an engine version is
91
107
  specified, an engine _must_ also be specified. If the engine is "ruby" the
92
108
  engine version specified _must_ match the Ruby version.
93
109
 
94
- ruby "1.8.7", :engine => "jruby", :engine_version => "1.6.7"
110
+ ruby "2.6.8", engine: "jruby", engine_version: "9.3.8.0"
95
111
 
96
112
  ### PATCHLEVEL
97
113
 
98
- Each application _may_ specify a Ruby patchlevel.
114
+ Each application _may_ specify a Ruby patchlevel. Specifying the patchlevel has
115
+ been meaningless since Ruby 2.1.0 was released as the patchlevel is now
116
+ uniquely determined by a combination of major, minor, and teeny version numbers.
117
+
118
+ This option was implemented in Bundler 1.4.0 for Ruby 2.0 or earlier.
99
119
 
100
- ruby "2.0.0", :patchlevel => "247"
120
+ ruby "3.1.2", patchlevel: "20"
101
121
 
102
122
  ## GEMS
103
123
 
@@ -120,27 +140,27 @@ Each _gem_ `MAY` have one or more version specifiers.
120
140
  ### REQUIRE AS
121
141
 
122
142
  Each _gem_ `MAY` specify files that should be used when autorequiring via
123
- `Bundler.require`. You may pass an array with multiple files or `true` if file
124
- you want `required` has same name as _gem_ or `false` to
143
+ `Bundler.require`. You may pass an array with multiple files or `true` if the file
144
+ you want `required` has the same name as _gem_ or `false` to
125
145
  prevent any file from being autorequired.
126
146
 
127
- gem "redis", :require => ["redis/connection/hiredis", "redis"]
128
- gem "webmock", :require => false
129
- gem "debugger", :require => true
147
+ gem "redis", require: ["redis/connection/hiredis", "redis"]
148
+ gem "webmock", require: false
149
+ gem "byebug", require: true
130
150
 
131
151
  The argument defaults to the name of the gem. For example, these are identical:
132
152
 
133
153
  gem "nokogiri"
134
- gem "nokogiri", :require => "nokogiri"
135
- gem "nokogiri", :require => true
154
+ gem "nokogiri", require: "nokogiri"
155
+ gem "nokogiri", require: true
136
156
 
137
157
  ### GROUPS
138
158
 
139
159
  Each _gem_ `MAY` specify membership in one or more groups. Any _gem_ that does
140
160
  not specify membership in any group is placed in the `default` group.
141
161
 
142
- gem "rspec", :group => :test
143
- gem "wirble", :groups => [:development, :test]
162
+ gem "rspec", group: :test
163
+ gem "wirble", groups: [:development, :test]
144
164
 
145
165
  The Bundler runtime allows its two main methods, `Bundler.setup` and
146
166
  `Bundler.require`, to limit their impact to particular groups.
@@ -159,15 +179,12 @@ The Bundler runtime allows its two main methods, `Bundler.setup` and
159
179
  Bundler.require(:test) # requires the _test_ group
160
180
 
161
181
  The Bundler CLI allows you to specify a list of groups whose gems `bundle install` should
162
- not install with the `--without` option. To specify multiple groups to ignore, specify a
163
- list of groups separated by spaces.
182
+ not install with the `without` configuration.
164
183
 
165
- bundle install --without test
166
- bundle install --without development test
184
+ To specify multiple groups to ignore, specify a list of groups separated by spaces.
167
185
 
168
- After running `bundle install --without test`, bundler will remember that you excluded
169
- the test group in the last installation. The next time you run `bundle install`,
170
- without any `--without option`, bundler will recall it.
186
+ bundle config set --local without test
187
+ bundle config set --local without development test
171
188
 
172
189
  Also, calling `Bundler.setup` with no parameters, or calling `require "bundler/setup"`
173
190
  will setup all groups except for the ones you excluded via `--without` (since they
@@ -176,7 +193,7 @@ are not available).
176
193
  Note that on `bundle install`, bundler downloads and evaluates all gems, in order to
177
194
  create a single canonical list of all of the required gems and their dependencies.
178
195
  This means that you cannot list different versions of the same gems in different
179
- groups. For more details, see [Understanding Bundler](http://bundler.io/rationale.html).
196
+ groups. For more details, see [Understanding Bundler](https://bundler.io/rationale.html).
180
197
 
181
198
  ### PLATFORMS
182
199
 
@@ -188,70 +205,81 @@ platforms.
188
205
  There are a number of `Gemfile` platforms:
189
206
 
190
207
  * `ruby`:
191
- C Ruby (MRI), Rubinius or TruffleRuby, but `NOT` Windows
208
+ C Ruby (MRI), Rubinius, or TruffleRuby, but not Windows
192
209
  * `mri`:
193
- Same as _ruby_, but only C Ruby (MRI)
194
- * `mingw`:
195
- Windows 32 bit 'mingw32' platform (aka RubyInstaller)
196
- * `x64_mingw`:
197
- Windows 64 bit 'mingw32' platform (aka RubyInstaller x64)
210
+ C Ruby (MRI) only, but not Windows
211
+ * `windows`:
212
+ Windows C Ruby (MRI), including RubyInstaller 32-bit and 64-bit versions
213
+ * `mswin`:
214
+ Windows C Ruby (MRI), including RubyInstaller 32-bit versions
215
+ * `mswin64`:
216
+ Windows C Ruby (MRI), including RubyInstaller 64-bit versions
198
217
  * `rbx`:
199
218
  Rubinius
200
219
  * `jruby`:
201
220
  JRuby
202
221
  * `truffleruby`:
203
222
  TruffleRuby
204
- * `mswin`:
205
- Windows
206
-
207
- You can restrict further by platform and version for all platforms *except* for
208
- `rbx`, `jruby`, `truffleruby` and `mswin`.
209
223
 
210
- To specify a version in addition to a platform, append the version number without
211
- the delimiter to the platform. For example, to specify that a gem should only be
212
- used on platforms with Ruby 2.3, use:
224
+ On platforms `ruby`, `mri`, `mswin`, `mswin64`, and `windows`, you may
225
+ additionally specify a version by appending the major and minor version numbers
226
+ without a delimiter. For example, to specify that a gem should only be used on
227
+ platform `ruby` version 3.1, use:
213
228
 
214
- ruby_23
215
-
216
- The full list of platforms and supported versions includes:
217
-
218
- * `ruby`:
219
- 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5
220
- * `mri`:
221
- 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5
222
- * `mingw`:
223
- 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5
224
- * `x64_mingw`:
225
- 2.0, 2.1, 2.2, 2.3, 2.4, 2.5
229
+ ruby_31
226
230
 
227
- As with groups, you can specify one or more platforms:
231
+ As with groups (above), you may specify one or more platforms:
228
232
 
229
- gem "weakling", :platforms => :jruby
230
- gem "ruby-debug", :platforms => :mri_18
231
- gem "nokogiri", :platforms => [:mri_18, :jruby]
233
+ gem "weakling", platforms: :jruby
234
+ gem "ruby-debug", platforms: :mri_31
235
+ gem "nokogiri", platforms: [:windows_31, :jruby]
232
236
 
233
237
  All operations involving groups ([`bundle install`](bundle-install.1.html), `Bundler.setup`,
234
238
  `Bundler.require`) behave exactly the same as if any groups not
235
239
  matching the current platform were explicitly excluded.
236
240
 
241
+ The following platform values are deprecated and should be replaced with `windows`:
242
+
243
+ * `mswin`, `mswin64`, `mingw32`, `x64_mingw`
244
+
245
+ Note that, while unfortunately using the same terminology, the values of this
246
+ option are different from the values that `bundle lock --add-platform` can take.
247
+ The values of this option are more closer to "Ruby Implementation" while the
248
+ values that `bundle lock --add-platform` understands are more related to OS and
249
+ architecture of the different systems where your lockfile will be used.
250
+
251
+ ### FORCE_RUBY_PLATFORM
252
+
253
+ If you always want the pure ruby variant of a gem to be chosen over platform
254
+ specific variants, you can use the `force_ruby_platform` option:
255
+
256
+ gem "ffi", force_ruby_platform: true
257
+
258
+ This can be handy (assuming the pure ruby variant works fine) when:
259
+
260
+ * You're having issues with the platform specific variant.
261
+ * The platform specific variant does not yet support a newer ruby (and thus has
262
+ a `required_ruby_version` upper bound), but you still want your Gemfile{.lock}
263
+ files to resolve under that ruby.
264
+
237
265
  ### SOURCE
238
266
 
239
- You can select an alternate Rubygems repository for a gem using the ':source'
267
+ You can select an alternate RubyGems repository for a gem using the ':source'
240
268
  option.
241
269
 
242
- gem "some_internal_gem", :source => "https://gems.example.com"
270
+ gem "some_internal_gem", source: "https://gems.example.com"
243
271
 
244
- This forces the gem to be loaded from this source and ignores any global sources
272
+ This forces the gem to be loaded from this source and ignores the global source
245
273
  declared at the top level of the file. If the gem does not exist in this source,
246
274
  it will not be installed.
247
275
 
248
276
  Bundler will search for child dependencies of this gem by first looking in the
249
277
  source selected for the parent, but if they are not found there, it will fall
250
- back on global sources using the ordering described in [SOURCE PRIORITY][].
278
+ back on the global source.
251
279
 
280
+ **Note about a behavior of the feature deprecated in Bundler 1.13**:
252
281
  Selecting a specific source repository this way also suppresses the ambiguous
253
- gem warning described above in
254
- [GLOBAL SOURCES (#source)](#GLOBAL-SOURCES).
282
+ gem warning described above in [GLOBAL SOURCE](#GLOBAL-SOURCE).
255
283
 
256
284
  Using the `:source` option for an individual gem will also make that source
257
285
  available as a possible global source for any other gems which do not specify
@@ -266,11 +294,11 @@ git repository using the `:git` parameter. The repository can be accessed via
266
294
  several protocols:
267
295
 
268
296
  * `HTTP(S)`:
269
- gem "rails", :git => "https://github.com/rails/rails.git"
297
+ gem "rails", git: "https://github.com/rails/rails.git"
270
298
  * `SSH`:
271
- gem "rails", :git => "git@github.com:rails/rails.git"
299
+ gem "rails", git: "git@github.com:rails/rails.git"
272
300
  * `git`:
273
- gem "rails", :git => "git://github.com/rails/rails.git"
301
+ gem "rails", git: "git://github.com/rails/rails.git"
274
302
 
275
303
  If using SSH, the user that you use to run `bundle install` `MUST` have the
276
304
  appropriate keys available in their `$HOME/.ssh`.
@@ -298,7 +326,7 @@ to, a version specifier, if provided, means that the git repository is
298
326
  only valid if the `.gemspec` specifies a version matching the version
299
327
  specifier. If not, bundler will print a warning.
300
328
 
301
- gem "rails", "2.3.8", :git => "https://github.com/rails/rails.git"
329
+ gem "rails", "2.3.8", git: "https://github.com/rails/rails.git"
302
330
  # bundle install will fail, because the .gemspec in the rails
303
331
  # repository's master branch specifies version 3.0.0
304
332
 
@@ -310,19 +338,18 @@ Git repositories support a number of additional options.
310
338
 
311
339
  * `branch`, `tag`, and `ref`:
312
340
  You `MUST` only specify at most one of these options. The default
313
- is `:branch => "master"`
314
- * For example:
341
+ is `branch: "master"`. For example:
315
342
 
316
- git "https://github.com/rails/rails.git", :branch => "5-0-stable" do
343
+ gem "rails", git: "https://github.com/rails/rails.git", branch: "5-0-stable"
317
344
 
318
- git "https://github.com/rails/rails.git", :tag => "v5.0.0" do
345
+ gem "rails", git: "https://github.com/rails/rails.git", tag: "v5.0.0"
319
346
 
320
- git "https://github.com/rails/rails.git", :ref => "4aded" do
347
+ gem "rails", git: "https://github.com/rails/rails.git", ref: "4aded"
321
348
 
322
349
  * `submodules`:
323
350
  For reference, a [git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules)
324
351
  lets you have another git repository within a subfolder of your repository.
325
- Specify `:submodules => true` to cause bundler to expand any
352
+ Specify `submodules: true` to cause bundler to expand any
326
353
  submodules included in the git repository
327
354
 
328
355
  If a git repository contains multiple `.gemspecs`, each `.gemspec`
@@ -350,11 +377,11 @@ as an argument, and a block which receives a single argument and interpolates it
350
377
  string to return the full repo address:
351
378
 
352
379
  git_source(:stash){ |repo_name| "https://stash.corp.acme.pl/#{repo_name}.git" }
353
- gem 'rails', :stash => 'forks/rails'
380
+ gem 'rails', stash: 'forks/rails'
354
381
 
355
382
  In addition, if you wish to choose a specific branch:
356
383
 
357
- gem "rails", :stash => "forks/rails", :branch => "branch_name"
384
+ gem "rails", stash: "forks/rails", branch: "branch_name"
358
385
 
359
386
  ### GITHUB
360
387
 
@@ -367,25 +394,33 @@ If the git repository you want to use is hosted on GitHub and is public, you can
367
394
  trailing ".git"), separated by a slash. If both the username and repository name are the
368
395
  same, you can omit one.
369
396
 
370
- gem "rails", :github => "rails/rails"
371
- gem "rails", :github => "rails"
397
+ gem "rails", github: "rails/rails"
398
+ gem "rails", github: "rails"
372
399
 
373
400
  Are both equivalent to
374
401
 
375
- gem "rails", :git => "git://github.com/rails/rails.git"
402
+ gem "rails", git: "https://github.com/rails/rails.git"
376
403
 
377
404
  Since the `github` method is a specialization of `git_source`, it accepts a `:branch` named argument.
378
405
 
406
+ You can also directly pass a pull request URL:
407
+
408
+ gem "rails", github: "https://github.com/rails/rails/pull/43753"
409
+
410
+ Which is equivalent to:
411
+
412
+ gem "rails", github: "rails/rails", branch: "refs/pull/43753/head"
413
+
379
414
  ### GIST
380
415
 
381
- If the git repository you want to use is hosted as a Github Gist and is public, you can use
416
+ If the git repository you want to use is hosted as a GitHub Gist and is public, you can use
382
417
  the :gist shorthand to specify the gist identifier (without the trailing ".git").
383
418
 
384
- gem "the_hatch", :gist => "4815162342"
419
+ gem "the_hatch", gist: "4815162342"
385
420
 
386
421
  Is equivalent to:
387
422
 
388
- gem "the_hatch", :git => "https://gist.github.com/4815162342.git"
423
+ gem "the_hatch", git: "https://gist.github.com/4815162342.git"
389
424
 
390
425
  Since the `gist` method is a specialization of `git_source`, it accepts a `:branch` named argument.
391
426
 
@@ -396,12 +431,12 @@ If the git repository you want to use is hosted on Bitbucket and is public, you
396
431
  trailing ".git"), separated by a slash. If both the username and repository name are the
397
432
  same, you can omit one.
398
433
 
399
- gem "rails", :bitbucket => "rails/rails"
400
- gem "rails", :bitbucket => "rails"
434
+ gem "rails", bitbucket: "rails/rails"
435
+ gem "rails", bitbucket: "rails"
401
436
 
402
437
  Are both equivalent to
403
438
 
404
- gem "rails", :git => "https://rails@bitbucket.org/rails/rails.git"
439
+ gem "rails", git: "https://rails@bitbucket.org/rails/rails.git"
405
440
 
406
441
  Since the `bitbucket` method is a specialization of `git_source`, it accepts a `:branch` named argument.
407
442
 
@@ -419,7 +454,7 @@ version that bundler should use.
419
454
  Unlike `:git`, bundler does not compile C extensions for
420
455
  gems specified as paths.
421
456
 
422
- gem "rails", :path => "vendor/rails"
457
+ gem "rails", path: "vendor/rails"
423
458
 
424
459
  If you would like to use multiple local gems directly from the filesystem, you can set a global `path` option to the path containing the gem's files. This will automatically load gemspec files from subdirectories.
425
460
 
@@ -448,7 +483,7 @@ applied to a group of gems by using block form.
448
483
  gem "sqlite3"
449
484
  end
450
485
 
451
- group :development, :optional => true do
486
+ group :development, optional: true do
452
487
  gem "wirble"
453
488
  gem "faker"
454
489
  end
@@ -480,7 +515,7 @@ software is installed or some other conditions are met.
480
515
 
481
516
  ## GEMSPEC
482
517
 
483
- The [`.gemspec`](http://guides.rubygems.org/specification-reference/) file is where
518
+ The [`.gemspec`](https://guides.rubygems.org/specification-reference/) file is where
484
519
  you provide metadata about your gem to Rubygems. Some required Gemspec
485
520
  attributes include the name, description, and homepage of your gem. This is
486
521
  also where you specify the dependencies your gem needs to run.
@@ -491,15 +526,15 @@ the `.gemspec` file.
491
526
 
492
527
  The `gemspec` method adds any runtime dependencies as gem requirements in the
493
528
  default group. It also adds development dependencies as gem requirements in the
494
- `development` group. Finally, it adds a gem requirement on your project (`:path
495
- => '.'`). In conjunction with `Bundler.setup`, this allows you to require project
529
+ `development` group. Finally, it adds a gem requirement on your project (`path:
530
+ '.'`). In conjunction with `Bundler.setup`, this allows you to require project
496
531
  files in your test code as you would if the project were installed as a gem; you
497
532
  need not manipulate the load path manually or require project files via relative
498
533
  paths.
499
534
 
500
535
  The `gemspec` method supports optional `:path`, `:glob`, `:name`, and `:development_group`
501
536
  options, which control where bundler looks for the `.gemspec`, the glob it uses to look
502
- for the gemspec (defaults to: "{,*,*/*}.gemspec"), what named `.gemspec` it uses
537
+ for the gemspec (defaults to: `{,*,*/*}.gemspec`), what named `.gemspec` it uses
503
538
  (if more than one is present), and which group development dependencies are included in.
504
539
 
505
540
  When a `gemspec` dependency encounters version conflicts during resolution, the
@@ -517,5 +552,7 @@ bundler uses the following priority order:
517
552
  repository declared on the parent. This results in bundler prioritizing the
518
553
  ActiveSupport gem from the Rails git repository over ones from
519
554
  `rubygems.org`
520
- 3. The sources specified via global `source` lines, searching each source in
521
- your `Gemfile` from last added to first added.
555
+ 3. If neither of the above conditions are met, the global source will be used.
556
+ If multiple global sources are specified, they will be prioritized from
557
+ last to first, but this is deprecated since Bundler 1.13, so Bundler prints
558
+ a warning and will abort with an error in the future.
@@ -2,24 +2,32 @@ Gemfile(5) gemfile.5
2
2
  bundle(1) bundle.1
3
3
  bundle-add(1) bundle-add.1
4
4
  bundle-binstubs(1) bundle-binstubs.1
5
+ bundle-cache(1) bundle-cache.1
5
6
  bundle-check(1) bundle-check.1
6
7
  bundle-clean(1) bundle-clean.1
7
8
  bundle-config(1) bundle-config.1
9
+ bundle-console(1) bundle-console.1
8
10
  bundle-doctor(1) bundle-doctor.1
11
+ bundle-env(1) bundle-env.1
9
12
  bundle-exec(1) bundle-exec.1
13
+ bundle-fund(1) bundle-fund.1
10
14
  bundle-gem(1) bundle-gem.1
15
+ bundle-help(1) bundle-help.1
11
16
  bundle-info(1) bundle-info.1
12
17
  bundle-init(1) bundle-init.1
13
18
  bundle-inject(1) bundle-inject.1
14
19
  bundle-install(1) bundle-install.1
20
+ bundle-issue(1) bundle-issue.1
21
+ bundle-licenses(1) bundle-licenses.1
15
22
  bundle-list(1) bundle-list.1
16
23
  bundle-lock(1) bundle-lock.1
17
24
  bundle-open(1) bundle-open.1
18
25
  bundle-outdated(1) bundle-outdated.1
19
- bundle-package(1) bundle-package.1
20
26
  bundle-platform(1) bundle-platform.1
27
+ bundle-plugin(1) bundle-plugin.1
21
28
  bundle-pristine(1) bundle-pristine.1
22
29
  bundle-remove(1) bundle-remove.1
23
30
  bundle-show(1) bundle-show.1
24
31
  bundle-update(1) bundle-update.1
32
+ bundle-version(1) bundle-version.1
25
33
  bundle-viz(1) bundle-viz.1
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Bundler
4
+ module MatchMetadata
5
+ def matches_current_metadata?
6
+ matches_current_ruby? && matches_current_rubygems?
7
+ end
8
+
9
+ def matches_current_ruby?
10
+ @required_ruby_version.satisfied_by?(Gem.ruby_version)
11
+ end
12
+
13
+ def matches_current_rubygems?
14
+ @required_rubygems_version.satisfied_by?(Gem.rubygems_version)
15
+ end
16
+ end
17
+ end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "bundler/gem_helpers"
3
+ require_relative "gem_helpers"
4
4
 
5
5
  module Bundler
6
6
  module MatchPlatform
@@ -12,10 +12,9 @@ module Bundler
12
12
 
13
13
  def self.platforms_match?(gemspec_platform, local_platform)
14
14
  return true if gemspec_platform.nil?
15
- return true if Gem::Platform::RUBY == gemspec_platform
15
+ return true if gemspec_platform == Gem::Platform::RUBY
16
16
  return true if local_platform == gemspec_platform
17
17
  gemspec_platform = Gem::Platform.new(gemspec_platform)
18
- return true if GemHelpers.generic(gemspec_platform) === local_platform
19
18
  return true if gemspec_platform === local_platform
20
19
 
21
20
  false
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Bundler
4
+ module FetchMetadata
5
+ # A fallback is included because the original version of the specification
6
+ # API didn't include that field, so some marshalled specs in the index have it
7
+ # set to +nil+.
8
+ def matches_current_ruby?
9
+ @required_ruby_version ||= _remote_specification.required_ruby_version || Gem::Requirement.default
10
+
11
+ super
12
+ end
13
+
14
+ def matches_current_rubygems?
15
+ # A fallback is included because the original version of the specification
16
+ # API didn't include that field, so some marshalled specs in the index have it
17
+ # set to +nil+.
18
+ @required_rubygems_version ||= _remote_specification.required_rubygems_version || Gem::Requirement.default
19
+
20
+ super
21
+ end
22
+ end
23
+
24
+ module MatchRemoteMetadata
25
+ include MatchMetadata
26
+
27
+ prepend FetchMetadata
28
+ end
29
+ end
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Bundler
4
+ #
5
+ # This class materializes a set of resolved specifications (`LazySpecification`)
6
+ # for a given gem into the most appropriate real specifications
7
+ # (`StubSepecification`, `EndpointSpecification`, etc), given a dependency and a
8
+ # target platform.
9
+ #
10
+ class Materialization
11
+ def initialize(dep, platform, candidates:)
12
+ @dep = dep
13
+ @platform = platform
14
+ @candidates = candidates
15
+ end
16
+
17
+ def complete?
18
+ specs.any?
19
+ end
20
+
21
+ def specs
22
+ @specs ||= if @candidates.nil?
23
+ []
24
+ elsif platform
25
+ GemHelpers.select_best_platform_match(@candidates, platform, force_ruby: dep.force_ruby_platform)
26
+ else
27
+ GemHelpers.select_best_local_platform_match(@candidates, force_ruby: dep.force_ruby_platform || dep.default_force_ruby_platform)
28
+ end
29
+ end
30
+
31
+ def dependencies
32
+ specs.first.runtime_dependencies.map {|d| [d, platform] }
33
+ end
34
+
35
+ def materialized_spec
36
+ specs.reject(&:missing?).first&.materialization
37
+ end
38
+
39
+ def completely_missing_specs
40
+ return [] unless specs.all?(&:missing?)
41
+
42
+ specs
43
+ end
44
+
45
+ def partially_missing_specs
46
+ specs.select(&:missing?)
47
+ end
48
+
49
+ def incomplete_specs
50
+ return [] if complete?
51
+
52
+ @candidates || LazySpecification.new(dep.name, nil, nil)
53
+ end
54
+
55
+ private
56
+
57
+ attr_reader :dep, :platform
58
+ end
59
+ end
@@ -43,11 +43,11 @@ module Bundler
43
43
  config.update_mirror(mirror)
44
44
  end
45
45
 
46
- private
46
+ private
47
47
 
48
48
  def fetch_valid_mirror_for(uri)
49
49
  downcased = uri.to_s.downcase
50
- mirror = @mirrors[downcased] || @mirrors[URI(downcased).host] || Mirror.new(uri)
50
+ mirror = @mirrors[downcased] || @mirrors[Gem::URI(downcased).host] || Mirror.new(uri)
51
51
  mirror.validate!(@prober)
52
52
  mirror = Mirror.new(uri) unless mirror.valid?
53
53
  mirror
@@ -74,7 +74,7 @@ module Bundler
74
74
  @uri = if uri.nil?
75
75
  nil
76
76
  else
77
- URI(uri.to_s)
77
+ Gem::URI(uri.to_s)
78
78
  end
79
79
  @valid = nil
80
80
  end
@@ -126,7 +126,7 @@ module Bundler
126
126
  if uri == "all"
127
127
  @all = true
128
128
  else
129
- @uri = URI(uri).absolute? ? Settings.normalize_uri(uri) : uri
129
+ @uri = Gem::URI(uri).absolute? ? Settings.normalize_uri(uri) : uri
130
130
  end
131
131
  @value = value
132
132
  end
@@ -148,17 +148,15 @@ module Bundler
148
148
  class TCPSocketProbe
149
149
  def replies?(mirror)
150
150
  MirrorSockets.new(mirror).any? do |socket, address, timeout|
151
- begin
152
- socket.connect_nonblock(address)
153
- rescue Errno::EINPROGRESS
154
- wait_for_writtable_socket(socket, address, timeout)
155
- rescue RuntimeError # Connection failed somehow, again
156
- false
157
- end
151
+ socket.connect_nonblock(address)
152
+ rescue Errno::EINPROGRESS
153
+ wait_for_writtable_socket(socket, address, timeout)
154
+ rescue RuntimeError # Connection failed somehow, again
155
+ false
158
156
  end
159
157
  end
160
158
 
161
- private
159
+ private
162
160
 
163
161
  def wait_for_writtable_socket(socket, address, timeout)
164
162
  if IO.select(nil, [socket], nil, timeout)