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
@@ -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
 
@@ -124,23 +144,23 @@ Each _gem_ `MAY` specify files that should be used when autorequiring via
124
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 "byebug", :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.
@@ -185,70 +205,81 @@ platforms.
185
205
  There are a number of `Gemfile` platforms:
186
206
 
187
207
  * `ruby`:
188
- C Ruby (MRI), Rubinius or TruffleRuby, but `NOT` Windows
208
+ C Ruby (MRI), Rubinius, or TruffleRuby, but not Windows
189
209
  * `mri`:
190
- Same as _ruby_, but only C Ruby (MRI)
191
- * `mingw`:
192
- Windows 32 bit 'mingw32' platform (aka RubyInstaller)
193
- * `x64_mingw`:
194
- 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
195
217
  * `rbx`:
196
218
  Rubinius
197
219
  * `jruby`:
198
220
  JRuby
199
221
  * `truffleruby`:
200
222
  TruffleRuby
201
- * `mswin`:
202
- Windows
203
-
204
- You can restrict further by platform and version for all platforms *except* for
205
- `rbx`, `jruby`, `truffleruby` and `mswin`.
206
223
 
207
- To specify a version in addition to a platform, append the version number without
208
- the delimiter to the platform. For example, to specify that a gem should only be
209
- 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:
210
228
 
211
- ruby_23
212
-
213
- The full list of platforms and supported versions includes:
214
-
215
- * `ruby`:
216
- 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6
217
- * `mri`:
218
- 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6
219
- * `mingw`:
220
- 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6
221
- * `x64_mingw`:
222
- 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6
229
+ ruby_31
223
230
 
224
- As with groups, you can specify one or more platforms:
231
+ As with groups (above), you may specify one or more platforms:
225
232
 
226
- gem "weakling", :platforms => :jruby
227
- gem "ruby-debug", :platforms => :mri_18
228
- 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]
229
236
 
230
237
  All operations involving groups ([`bundle install`](bundle-install.1.html), `Bundler.setup`,
231
238
  `Bundler.require`) behave exactly the same as if any groups not
232
239
  matching the current platform were explicitly excluded.
233
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
+
234
265
  ### SOURCE
235
266
 
236
- 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'
237
268
  option.
238
269
 
239
- gem "some_internal_gem", :source => "https://gems.example.com"
270
+ gem "some_internal_gem", source: "https://gems.example.com"
240
271
 
241
- 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
242
273
  declared at the top level of the file. If the gem does not exist in this source,
243
274
  it will not be installed.
244
275
 
245
276
  Bundler will search for child dependencies of this gem by first looking in the
246
277
  source selected for the parent, but if they are not found there, it will fall
247
- back on global sources using the ordering described in [SOURCE PRIORITY][].
278
+ back on the global source.
248
279
 
280
+ **Note about a behavior of the feature deprecated in Bundler 1.13**:
249
281
  Selecting a specific source repository this way also suppresses the ambiguous
250
- gem warning described above in
251
- [GLOBAL SOURCES (#source)](#GLOBAL-SOURCES).
282
+ gem warning described above in [GLOBAL SOURCE](#GLOBAL-SOURCE).
252
283
 
253
284
  Using the `:source` option for an individual gem will also make that source
254
285
  available as a possible global source for any other gems which do not specify
@@ -263,11 +294,11 @@ git repository using the `:git` parameter. The repository can be accessed via
263
294
  several protocols:
264
295
 
265
296
  * `HTTP(S)`:
266
- gem "rails", :git => "https://github.com/rails/rails.git"
297
+ gem "rails", git: "https://github.com/rails/rails.git"
267
298
  * `SSH`:
268
- gem "rails", :git => "git@github.com:rails/rails.git"
299
+ gem "rails", git: "git@github.com:rails/rails.git"
269
300
  * `git`:
270
- gem "rails", :git => "git://github.com/rails/rails.git"
301
+ gem "rails", git: "git://github.com/rails/rails.git"
271
302
 
272
303
  If using SSH, the user that you use to run `bundle install` `MUST` have the
273
304
  appropriate keys available in their `$HOME/.ssh`.
@@ -295,7 +326,7 @@ to, a version specifier, if provided, means that the git repository is
295
326
  only valid if the `.gemspec` specifies a version matching the version
296
327
  specifier. If not, bundler will print a warning.
297
328
 
298
- 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"
299
330
  # bundle install will fail, because the .gemspec in the rails
300
331
  # repository's master branch specifies version 3.0.0
301
332
 
@@ -307,18 +338,18 @@ Git repositories support a number of additional options.
307
338
 
308
339
  * `branch`, `tag`, and `ref`:
309
340
  You `MUST` only specify at most one of these options. The default
310
- is `:branch => "master"`. For example:
341
+ is `branch: "master"`. For example:
311
342
 
312
- gem "rails", :git => "https://github.com/rails/rails.git", :branch => "5-0-stable"
343
+ gem "rails", git: "https://github.com/rails/rails.git", branch: "5-0-stable"
313
344
 
314
- gem "rails", :git => "https://github.com/rails/rails.git", :tag => "v5.0.0"
345
+ gem "rails", git: "https://github.com/rails/rails.git", tag: "v5.0.0"
315
346
 
316
- gem "rails", :git => "https://github.com/rails/rails.git", :ref => "4aded"
347
+ gem "rails", git: "https://github.com/rails/rails.git", ref: "4aded"
317
348
 
318
349
  * `submodules`:
319
350
  For reference, a [git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules)
320
351
  lets you have another git repository within a subfolder of your repository.
321
- Specify `:submodules => true` to cause bundler to expand any
352
+ Specify `submodules: true` to cause bundler to expand any
322
353
  submodules included in the git repository
323
354
 
324
355
  If a git repository contains multiple `.gemspecs`, each `.gemspec`
@@ -346,11 +377,11 @@ as an argument, and a block which receives a single argument and interpolates it
346
377
  string to return the full repo address:
347
378
 
348
379
  git_source(:stash){ |repo_name| "https://stash.corp.acme.pl/#{repo_name}.git" }
349
- gem 'rails', :stash => 'forks/rails'
380
+ gem 'rails', stash: 'forks/rails'
350
381
 
351
382
  In addition, if you wish to choose a specific branch:
352
383
 
353
- gem "rails", :stash => "forks/rails", :branch => "branch_name"
384
+ gem "rails", stash: "forks/rails", branch: "branch_name"
354
385
 
355
386
  ### GITHUB
356
387
 
@@ -363,25 +394,33 @@ If the git repository you want to use is hosted on GitHub and is public, you can
363
394
  trailing ".git"), separated by a slash. If both the username and repository name are the
364
395
  same, you can omit one.
365
396
 
366
- gem "rails", :github => "rails/rails"
367
- gem "rails", :github => "rails"
397
+ gem "rails", github: "rails/rails"
398
+ gem "rails", github: "rails"
368
399
 
369
400
  Are both equivalent to
370
401
 
371
- gem "rails", :git => "git://github.com/rails/rails.git"
402
+ gem "rails", git: "https://github.com/rails/rails.git"
372
403
 
373
404
  Since the `github` method is a specialization of `git_source`, it accepts a `:branch` named argument.
374
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
+
375
414
  ### GIST
376
415
 
377
- 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
378
417
  the :gist shorthand to specify the gist identifier (without the trailing ".git").
379
418
 
380
- gem "the_hatch", :gist => "4815162342"
419
+ gem "the_hatch", gist: "4815162342"
381
420
 
382
421
  Is equivalent to:
383
422
 
384
- gem "the_hatch", :git => "https://gist.github.com/4815162342.git"
423
+ gem "the_hatch", git: "https://gist.github.com/4815162342.git"
385
424
 
386
425
  Since the `gist` method is a specialization of `git_source`, it accepts a `:branch` named argument.
387
426
 
@@ -392,12 +431,12 @@ If the git repository you want to use is hosted on Bitbucket and is public, you
392
431
  trailing ".git"), separated by a slash. If both the username and repository name are the
393
432
  same, you can omit one.
394
433
 
395
- gem "rails", :bitbucket => "rails/rails"
396
- gem "rails", :bitbucket => "rails"
434
+ gem "rails", bitbucket: "rails/rails"
435
+ gem "rails", bitbucket: "rails"
397
436
 
398
437
  Are both equivalent to
399
438
 
400
- gem "rails", :git => "https://rails@bitbucket.org/rails/rails.git"
439
+ gem "rails", git: "https://rails@bitbucket.org/rails/rails.git"
401
440
 
402
441
  Since the `bitbucket` method is a specialization of `git_source`, it accepts a `:branch` named argument.
403
442
 
@@ -415,7 +454,7 @@ version that bundler should use.
415
454
  Unlike `:git`, bundler does not compile C extensions for
416
455
  gems specified as paths.
417
456
 
418
- gem "rails", :path => "vendor/rails"
457
+ gem "rails", path: "vendor/rails"
419
458
 
420
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.
421
460
 
@@ -444,7 +483,7 @@ applied to a group of gems by using block form.
444
483
  gem "sqlite3"
445
484
  end
446
485
 
447
- group :development, :optional => true do
486
+ group :development, optional: true do
448
487
  gem "wirble"
449
488
  gem "faker"
450
489
  end
@@ -476,7 +515,7 @@ software is installed or some other conditions are met.
476
515
 
477
516
  ## GEMSPEC
478
517
 
479
- The [`.gemspec`](http://guides.rubygems.org/specification-reference/) file is where
518
+ The [`.gemspec`](https://guides.rubygems.org/specification-reference/) file is where
480
519
  you provide metadata about your gem to Rubygems. Some required Gemspec
481
520
  attributes include the name, description, and homepage of your gem. This is
482
521
  also where you specify the dependencies your gem needs to run.
@@ -487,15 +526,15 @@ the `.gemspec` file.
487
526
 
488
527
  The `gemspec` method adds any runtime dependencies as gem requirements in the
489
528
  default group. It also adds development dependencies as gem requirements in the
490
- `development` group. Finally, it adds a gem requirement on your project (`:path
491
- => '.'`). 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
492
531
  files in your test code as you would if the project were installed as a gem; you
493
532
  need not manipulate the load path manually or require project files via relative
494
533
  paths.
495
534
 
496
535
  The `gemspec` method supports optional `:path`, `:glob`, `:name`, and `:development_group`
497
536
  options, which control where bundler looks for the `.gemspec`, the glob it uses to look
498
- for the gemspec (defaults to: "{,*,*/*}.gemspec"), what named `.gemspec` it uses
537
+ for the gemspec (defaults to: `{,*,*/*}.gemspec`), what named `.gemspec` it uses
499
538
  (if more than one is present), and which group development dependencies are included in.
500
539
 
501
540
  When a `gemspec` dependency encounters version conflicts during resolution, the
@@ -513,5 +552,7 @@ bundler uses the following priority order:
513
552
  repository declared on the parent. This results in bundler prioritizing the
514
553
  ActiveSupport gem from the Rails git repository over ones from
515
554
  `rubygems.org`
516
- 3. The sources specified via global `source` lines, searching each source in
517
- 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.
@@ -6,20 +6,28 @@ bundle-cache(1) bundle-cache.1
6
6
  bundle-check(1) bundle-check.1
7
7
  bundle-clean(1) bundle-clean.1
8
8
  bundle-config(1) bundle-config.1
9
+ bundle-console(1) bundle-console.1
9
10
  bundle-doctor(1) bundle-doctor.1
11
+ bundle-env(1) bundle-env.1
10
12
  bundle-exec(1) bundle-exec.1
13
+ bundle-fund(1) bundle-fund.1
11
14
  bundle-gem(1) bundle-gem.1
15
+ bundle-help(1) bundle-help.1
12
16
  bundle-info(1) bundle-info.1
13
17
  bundle-init(1) bundle-init.1
14
18
  bundle-inject(1) bundle-inject.1
15
19
  bundle-install(1) bundle-install.1
20
+ bundle-issue(1) bundle-issue.1
21
+ bundle-licenses(1) bundle-licenses.1
16
22
  bundle-list(1) bundle-list.1
17
23
  bundle-lock(1) bundle-lock.1
18
24
  bundle-open(1) bundle-open.1
19
25
  bundle-outdated(1) bundle-outdated.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
@@ -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
@@ -47,7 +47,7 @@ module Bundler
47
47
 
48
48
  def fetch_valid_mirror_for(uri)
49
49
  downcased = uri.to_s.downcase
50
- mirror = @mirrors[downcased] || @mirrors[Bundler::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
- Bundler::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 = Bundler::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,13 +148,11 @@ 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