rubygems-update 3.3.18 → 3.4.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (615) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1429 -1064
  3. data/CONTRIBUTING.md +31 -8
  4. data/Manifest.txt +61 -36
  5. data/POLICIES.md +55 -20
  6. data/README.md +19 -6
  7. data/bundler/CHANGELOG.md +457 -1
  8. data/bundler/README.md +3 -6
  9. data/bundler/UPGRADING.md +11 -4
  10. data/bundler/bundler.gemspec +8 -10
  11. data/bundler/exe/bundle +5 -16
  12. data/bundler/lib/bundler/build_metadata.rb +2 -2
  13. data/bundler/lib/bundler/cli/add.rb +1 -1
  14. data/bundler/lib/bundler/cli/binstubs.rb +6 -2
  15. data/bundler/lib/bundler/cli/check.rb +1 -1
  16. data/bundler/lib/bundler/cli/common.rb +2 -0
  17. data/bundler/lib/bundler/cli/console.rb +2 -2
  18. data/bundler/lib/bundler/cli/doctor.rb +4 -6
  19. data/bundler/lib/bundler/cli/gem.rb +62 -40
  20. data/bundler/lib/bundler/cli/info.rb +1 -1
  21. data/bundler/lib/bundler/cli/init.rb +6 -2
  22. data/bundler/lib/bundler/cli/install.rb +8 -6
  23. data/bundler/lib/bundler/cli/lock.rb +8 -5
  24. data/bundler/lib/bundler/cli/open.rb +6 -4
  25. data/bundler/lib/bundler/cli/outdated.rb +14 -7
  26. data/bundler/lib/bundler/cli/platform.rb +7 -5
  27. data/bundler/lib/bundler/cli/viz.rb +1 -1
  28. data/bundler/lib/bundler/cli.rb +53 -7
  29. data/bundler/lib/bundler/compact_index_client/cache.rb +1 -1
  30. data/bundler/lib/bundler/compact_index_client/updater.rb +40 -39
  31. data/bundler/lib/bundler/constants.rb +1 -1
  32. data/bundler/lib/bundler/current_ruby.rb +16 -5
  33. data/bundler/lib/bundler/definition.rb +262 -133
  34. data/bundler/lib/bundler/dependency.rb +20 -86
  35. data/bundler/lib/bundler/digest.rb +1 -1
  36. data/bundler/lib/bundler/dsl.rb +6 -7
  37. data/bundler/lib/bundler/endpoint_specification.rb +2 -13
  38. data/bundler/lib/bundler/env.rb +2 -2
  39. data/bundler/lib/bundler/environment_preserver.rb +3 -2
  40. data/bundler/lib/bundler/errors.rb +1 -11
  41. data/bundler/lib/bundler/feature_flag.rb +0 -2
  42. data/bundler/lib/bundler/fetcher/compact_index.rb +11 -13
  43. data/bundler/lib/bundler/fetcher/dependency.rb +2 -6
  44. data/bundler/lib/bundler/fetcher/downloader.rb +4 -5
  45. data/bundler/lib/bundler/fetcher/index.rb +1 -2
  46. data/bundler/lib/bundler/fetcher.rb +21 -15
  47. data/bundler/lib/bundler/force_platform.rb +18 -0
  48. data/bundler/lib/bundler/friendly_errors.rb +1 -4
  49. data/bundler/lib/bundler/gem_helper.rb +3 -4
  50. data/bundler/lib/bundler/gem_helpers.rb +7 -2
  51. data/bundler/lib/bundler/gem_version_promoter.rb +53 -98
  52. data/bundler/lib/bundler/graph.rb +3 -3
  53. data/bundler/lib/bundler/index.rb +13 -47
  54. data/bundler/lib/bundler/injector.rb +5 -4
  55. data/bundler/lib/bundler/inline.rb +9 -11
  56. data/bundler/lib/bundler/installer/parallel_installer.rb +4 -34
  57. data/bundler/lib/bundler/installer/standalone.rb +13 -9
  58. data/bundler/lib/bundler/installer.rb +17 -29
  59. data/bundler/lib/bundler/lazy_specification.rb +54 -53
  60. data/bundler/lib/bundler/lockfile_generator.rb +3 -3
  61. data/bundler/lib/bundler/lockfile_parser.rb +17 -16
  62. data/bundler/lib/bundler/man/bundle-add.1 +6 -2
  63. data/bundler/lib/bundler/man/bundle-add.1.ronn +4 -1
  64. data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
  65. data/bundler/lib/bundler/man/bundle-cache.1 +9 -3
  66. data/bundler/lib/bundler/man/bundle-cache.1.ronn +9 -2
  67. data/bundler/lib/bundler/man/bundle-check.1 +1 -1
  68. data/bundler/lib/bundler/man/bundle-clean.1 +2 -2
  69. data/bundler/lib/bundler/man/bundle-clean.1.ronn +1 -1
  70. data/bundler/lib/bundler/man/bundle-config.1 +26 -10
  71. data/bundler/lib/bundler/man/bundle-config.1.ronn +17 -10
  72. data/bundler/lib/bundler/man/bundle-console.1 +53 -0
  73. data/bundler/lib/bundler/man/bundle-console.1.ronn +44 -0
  74. data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
  75. data/bundler/lib/bundler/man/bundle-exec.1 +6 -6
  76. data/bundler/lib/bundler/man/bundle-exec.1.ronn +6 -6
  77. data/bundler/lib/bundler/man/bundle-gem.1 +27 -37
  78. data/bundler/lib/bundler/man/bundle-gem.1.ronn +5 -5
  79. data/bundler/lib/bundler/man/bundle-help.1 +13 -0
  80. data/bundler/lib/bundler/man/bundle-help.1.ronn +12 -0
  81. data/bundler/lib/bundler/man/bundle-info.1 +3 -3
  82. data/bundler/lib/bundler/man/bundle-info.1.ronn +3 -3
  83. data/bundler/lib/bundler/man/bundle-init.1 +5 -1
  84. data/bundler/lib/bundler/man/bundle-init.1.ronn +2 -0
  85. data/bundler/lib/bundler/man/bundle-inject.1 +5 -2
  86. data/bundler/lib/bundler/man/bundle-inject.1.ronn +3 -1
  87. data/bundler/lib/bundler/man/bundle-install.1 +5 -30
  88. data/bundler/lib/bundler/man/bundle-install.1.ronn +6 -29
  89. data/bundler/lib/bundler/man/bundle-list.1 +1 -1
  90. data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
  91. data/bundler/lib/bundler/man/bundle-open.1 +22 -2
  92. data/bundler/lib/bundler/man/bundle-open.1.ronn +9 -1
  93. data/bundler/lib/bundler/man/bundle-outdated.1 +13 -9
  94. data/bundler/lib/bundler/man/bundle-outdated.1.ronn +12 -9
  95. data/bundler/lib/bundler/man/bundle-platform.1 +16 -6
  96. data/bundler/lib/bundler/man/bundle-platform.1.ronn +14 -7
  97. data/bundler/lib/bundler/man/bundle-plugin.1 +81 -0
  98. data/bundler/lib/bundler/man/bundle-plugin.1.ronn +59 -0
  99. data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
  100. data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
  101. data/bundler/lib/bundler/man/bundle-show.1 +1 -1
  102. data/bundler/lib/bundler/man/bundle-update.1 +1 -1
  103. data/bundler/lib/bundler/man/bundle-version.1 +35 -0
  104. data/bundler/lib/bundler/man/bundle-version.1.ronn +24 -0
  105. data/bundler/lib/bundler/man/bundle-viz.1 +4 -1
  106. data/bundler/lib/bundler/man/bundle-viz.1.ronn +2 -0
  107. data/bundler/lib/bundler/man/bundle.1 +15 -10
  108. data/bundler/lib/bundler/man/bundle.1.ronn +12 -7
  109. data/bundler/lib/bundler/man/gemfile.5 +55 -55
  110. data/bundler/lib/bundler/man/gemfile.5.ronn +57 -53
  111. data/bundler/lib/bundler/man/index.txt +4 -0
  112. data/bundler/lib/bundler/match_metadata.rb +13 -0
  113. data/bundler/lib/bundler/match_remote_metadata.rb +29 -0
  114. data/bundler/lib/bundler/mirror.rb +5 -7
  115. data/bundler/lib/bundler/plugin/index.rb +5 -5
  116. data/bundler/lib/bundler/plugin/installer/rubygems.rb +0 -4
  117. data/bundler/lib/bundler/plugin/installer.rb +5 -2
  118. data/bundler/lib/bundler/plugin.rb +3 -1
  119. data/bundler/lib/bundler/remote_specification.rb +7 -12
  120. data/bundler/lib/bundler/resolver/base.rb +107 -0
  121. data/bundler/lib/bundler/resolver/candidate.rb +94 -0
  122. data/bundler/lib/bundler/resolver/incompatibility.rb +15 -0
  123. data/bundler/lib/bundler/resolver/package.rb +72 -0
  124. data/bundler/lib/bundler/resolver/root.rb +25 -0
  125. data/bundler/lib/bundler/resolver/spec_group.rb +42 -71
  126. data/bundler/lib/bundler/resolver.rb +335 -328
  127. data/bundler/lib/bundler/ruby_dsl.rb +7 -1
  128. data/bundler/lib/bundler/ruby_version.rb +8 -8
  129. data/bundler/lib/bundler/rubygems_ext.rb +100 -9
  130. data/bundler/lib/bundler/rubygems_gem_installer.rb +23 -14
  131. data/bundler/lib/bundler/rubygems_integration.rb +11 -15
  132. data/bundler/lib/bundler/runtime.rb +2 -6
  133. data/bundler/lib/bundler/safe_marshal.rb +31 -0
  134. data/bundler/lib/bundler/settings.rb +5 -11
  135. data/bundler/lib/bundler/setup.rb +4 -1
  136. data/bundler/lib/bundler/shared_helpers.rb +3 -3
  137. data/bundler/lib/bundler/source/git/git_proxy.rb +237 -74
  138. data/bundler/lib/bundler/source/git.rb +55 -30
  139. data/bundler/lib/bundler/source/metadata.rb +1 -2
  140. data/bundler/lib/bundler/source/path/installer.rb +1 -22
  141. data/bundler/lib/bundler/source/path.rb +6 -6
  142. data/bundler/lib/bundler/source/rubygems.rb +26 -81
  143. data/bundler/lib/bundler/source.rb +1 -1
  144. data/bundler/lib/bundler/source_list.rb +8 -2
  145. data/bundler/lib/bundler/spec_set.rb +60 -37
  146. data/bundler/lib/bundler/templates/Executable +1 -1
  147. data/bundler/lib/bundler/templates/Executable.bundler +5 -10
  148. data/bundler/lib/bundler/templates/Executable.standalone +2 -0
  149. data/bundler/lib/bundler/templates/newgem/Cargo.toml.tt +7 -0
  150. data/bundler/lib/bundler/templates/newgem/Gemfile.tt +3 -0
  151. data/bundler/lib/bundler/templates/newgem/README.md.tt +6 -4
  152. data/bundler/lib/bundler/templates/newgem/Rakefile.tt +12 -1
  153. data/bundler/lib/bundler/templates/newgem/bin/console.tt +0 -4
  154. data/bundler/lib/bundler/templates/newgem/circleci/config.yml.tt +12 -0
  155. data/bundler/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +15 -0
  156. data/bundler/lib/bundler/templates/newgem/ext/newgem/extconf-c.rb.tt +10 -0
  157. data/bundler/lib/bundler/templates/newgem/ext/newgem/extconf-rust.rb.tt +6 -0
  158. data/bundler/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt +1 -1
  159. data/bundler/lib/bundler/templates/newgem/ext/newgem/src/lib.rs.tt +12 -0
  160. data/bundler/lib/bundler/templates/newgem/github/workflows/main.yml.tt +10 -0
  161. data/bundler/lib/bundler/templates/newgem/gitignore.tt +3 -0
  162. data/bundler/lib/bundler/templates/newgem/gitlab-ci.yml.tt +13 -4
  163. data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +9 -2
  164. data/bundler/lib/bundler/ui/rg_proxy.rb +1 -1
  165. data/bundler/lib/bundler/ui/shell.rb +35 -12
  166. data/bundler/lib/bundler/ui/silent.rb +21 -5
  167. data/bundler/lib/bundler/uri_normalizer.rb +23 -0
  168. data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +3 -3
  169. data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb +0 -1
  170. data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +3 -1
  171. data/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb +1351 -409
  172. data/bundler/lib/bundler/vendor/net-http-persistent/README.rdoc +1 -1
  173. data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +1 -1
  174. data/bundler/lib/bundler/vendor/pub_grub/LICENSE.txt +21 -0
  175. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb +20 -0
  176. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb +189 -0
  177. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb +182 -0
  178. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb +150 -0
  179. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb +43 -0
  180. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/partial_solution.rb +121 -0
  181. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb +45 -0
  182. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb +19 -0
  183. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb +60 -0
  184. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/term.rb +105 -0
  185. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version.rb +3 -0
  186. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb +129 -0
  187. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb +411 -0
  188. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +248 -0
  189. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb +178 -0
  190. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub.rb +31 -0
  191. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +1 -1
  192. data/bundler/lib/bundler/vendor/uri/lib/uri/common.rb +64 -16
  193. data/bundler/lib/bundler/vendor/uri/lib/uri/file.rb +7 -1
  194. data/bundler/lib/bundler/vendor/uri/lib/uri/ftp.rb +2 -1
  195. data/bundler/lib/bundler/vendor/uri/lib/uri/generic.rb +27 -7
  196. data/bundler/lib/bundler/vendor/uri/lib/uri/http.rb +40 -2
  197. data/bundler/lib/bundler/vendor/uri/lib/uri/https.rb +2 -1
  198. data/bundler/lib/bundler/vendor/uri/lib/uri/ldap.rb +1 -1
  199. data/bundler/lib/bundler/vendor/uri/lib/uri/ldaps.rb +2 -1
  200. data/bundler/lib/bundler/vendor/uri/lib/uri/mailto.rb +2 -2
  201. data/bundler/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +15 -9
  202. data/bundler/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +11 -6
  203. data/bundler/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
  204. data/bundler/lib/bundler/vendor/uri/lib/uri/ws.rb +1 -2
  205. data/bundler/lib/bundler/vendor/uri/lib/uri/wss.rb +2 -1
  206. data/bundler/lib/bundler/vendor/uri/lib/uri.rb +3 -2
  207. data/bundler/lib/bundler/vendored_persistent.rb +1 -33
  208. data/bundler/lib/bundler/{vendored_tmpdir.rb → vendored_pub_grub.rb} +1 -1
  209. data/bundler/lib/bundler/version.rb +5 -1
  210. data/bundler/lib/bundler/worker.rb +5 -7
  211. data/bundler/lib/bundler.rb +25 -77
  212. data/{bin → exe}/gem +4 -5
  213. data/{bin → exe}/update_rubygems +12 -10
  214. data/lib/rubygems/available_set.rb +4 -3
  215. data/lib/rubygems/basic_specification.rb +5 -4
  216. data/lib/rubygems/bundler_version_finder.rb +2 -2
  217. data/lib/rubygems/command.rb +41 -32
  218. data/lib/rubygems/command_manager.rb +30 -15
  219. data/lib/rubygems/commands/build_command.rb +12 -8
  220. data/lib/rubygems/commands/cert_command.rb +34 -33
  221. data/lib/rubygems/commands/check_command.rb +21 -20
  222. data/lib/rubygems/commands/cleanup_command.rb +18 -17
  223. data/lib/rubygems/commands/contents_command.rb +14 -13
  224. data/lib/rubygems/commands/dependency_command.rb +17 -16
  225. data/lib/rubygems/commands/environment_command.rb +6 -5
  226. data/lib/rubygems/commands/exec_command.rb +249 -0
  227. data/lib/rubygems/commands/fetch_command.rb +10 -9
  228. data/lib/rubygems/commands/generate_index_command.rb +18 -17
  229. data/lib/rubygems/commands/help_command.rb +7 -6
  230. data/lib/rubygems/commands/info_command.rb +3 -3
  231. data/lib/rubygems/commands/install_command.rb +28 -23
  232. data/lib/rubygems/commands/list_command.rb +4 -3
  233. data/lib/rubygems/commands/lock_command.rb +5 -4
  234. data/lib/rubygems/commands/mirror_command.rb +4 -3
  235. data/lib/rubygems/commands/open_command.rb +10 -9
  236. data/lib/rubygems/commands/outdated_command.rb +6 -5
  237. data/lib/rubygems/commands/owner_command.rb +17 -14
  238. data/lib/rubygems/commands/pristine_command.rb +46 -36
  239. data/lib/rubygems/commands/push_command.rb +9 -8
  240. data/lib/rubygems/commands/query_command.rb +9 -8
  241. data/lib/rubygems/commands/rdoc_command.rb +21 -19
  242. data/lib/rubygems/commands/search_command.rb +4 -3
  243. data/lib/rubygems/commands/server_command.rb +4 -3
  244. data/lib/rubygems/commands/setup_command.rb +97 -106
  245. data/lib/rubygems/commands/signin_command.rb +10 -9
  246. data/lib/rubygems/commands/signout_command.rb +8 -7
  247. data/lib/rubygems/commands/sources_command.rb +22 -21
  248. data/lib/rubygems/commands/specification_command.rb +14 -13
  249. data/lib/rubygems/commands/stale_command.rb +3 -2
  250. data/lib/rubygems/commands/uninstall_command.rb +44 -40
  251. data/lib/rubygems/commands/unpack_command.rb +14 -13
  252. data/lib/rubygems/commands/update_command.rb +42 -63
  253. data/lib/rubygems/commands/which_command.rb +8 -7
  254. data/lib/rubygems/commands/yank_command.rb +12 -11
  255. data/lib/rubygems/config_file.rb +55 -21
  256. data/lib/rubygems/core_ext/kernel_gem.rb +1 -6
  257. data/lib/rubygems/core_ext/kernel_require.rb +109 -115
  258. data/lib/rubygems/core_ext/kernel_warn.rb +33 -37
  259. data/lib/rubygems/core_ext/tcpsocket_init.rb +3 -1
  260. data/lib/rubygems/defaults.rb +33 -18
  261. data/lib/rubygems/dependency.rb +15 -11
  262. data/lib/rubygems/dependency_installer.rb +38 -37
  263. data/lib/rubygems/dependency_list.rb +7 -6
  264. data/lib/rubygems/deprecate.rb +3 -2
  265. data/lib/rubygems/doctor.rb +19 -18
  266. data/lib/rubygems/errors.rb +3 -2
  267. data/lib/rubygems/exceptions.rb +16 -8
  268. data/lib/rubygems/ext/build_error.rb +2 -1
  269. data/lib/rubygems/ext/builder.rb +37 -21
  270. data/lib/rubygems/ext/cargo_builder/link_flag_converter.rb +9 -5
  271. data/lib/rubygems/ext/cargo_builder.rb +150 -111
  272. data/lib/rubygems/ext/cmake_builder.rb +2 -2
  273. data/lib/rubygems/ext/configure_builder.rb +2 -1
  274. data/lib/rubygems/ext/ext_conf_builder.rb +11 -9
  275. data/lib/rubygems/ext/rake_builder.rb +7 -5
  276. data/lib/rubygems/ext.rb +8 -7
  277. data/lib/rubygems/gem_runner.rb +6 -5
  278. data/lib/rubygems/gemcutter_utilities/webauthn_listener/response.rb +163 -0
  279. data/lib/rubygems/gemcutter_utilities/webauthn_listener.rb +105 -0
  280. data/lib/rubygems/gemcutter_utilities/webauthn_poller.rb +78 -0
  281. data/lib/rubygems/gemcutter_utilities.rb +90 -34
  282. data/lib/rubygems/indexer.rb +29 -28
  283. data/lib/rubygems/install_default_message.rb +3 -2
  284. data/lib/rubygems/install_message.rb +3 -2
  285. data/lib/rubygems/install_update_options.rb +56 -55
  286. data/lib/rubygems/installer.rb +54 -46
  287. data/lib/rubygems/installer_uninstaller_utils.rb +2 -2
  288. data/lib/rubygems/local_remote_options.rb +19 -20
  289. data/lib/rubygems/mock_gem_ui.rb +3 -2
  290. data/lib/rubygems/name_tuple.rb +5 -4
  291. data/lib/rubygems/optparse/lib/optparse.rb +20 -15
  292. data/lib/rubygems/optparse.rb +1 -1
  293. data/lib/rubygems/package/digest_io.rb +1 -0
  294. data/lib/rubygems/package/file_source.rb +3 -2
  295. data/lib/rubygems/package/io_source.rb +1 -0
  296. data/lib/rubygems/package/old.rb +9 -8
  297. data/lib/rubygems/package/source.rb +1 -0
  298. data/lib/rubygems/package/tar_header.rb +63 -62
  299. data/lib/rubygems/package/tar_reader/entry.rb +91 -9
  300. data/lib/rubygems/package/tar_reader.rb +2 -29
  301. data/lib/rubygems/package/tar_writer.rb +8 -7
  302. data/lib/rubygems/package.rb +64 -48
  303. data/lib/rubygems/package_task.rb +5 -4
  304. data/lib/rubygems/path_support.rb +1 -0
  305. data/lib/rubygems/platform.rb +79 -53
  306. data/lib/rubygems/psych_tree.rb +2 -1
  307. data/lib/rubygems/query_utils.rb +35 -35
  308. data/lib/rubygems/rdoc.rb +3 -2
  309. data/lib/rubygems/remote_fetcher.rb +23 -22
  310. data/lib/rubygems/request/connection_pools.rb +4 -4
  311. data/lib/rubygems/request/http_pool.rb +2 -1
  312. data/lib/rubygems/request/https_pool.rb +1 -0
  313. data/lib/rubygems/request.rb +23 -22
  314. data/lib/rubygems/request_set/gem_dependency_api.rb +123 -123
  315. data/lib/rubygems/request_set/lockfile/parser.rb +28 -27
  316. data/lib/rubygems/request_set/lockfile/tokenizer.rb +5 -3
  317. data/lib/rubygems/request_set/lockfile.rb +6 -5
  318. data/lib/rubygems/request_set.rb +20 -19
  319. data/lib/rubygems/requirement.rb +15 -14
  320. data/lib/rubygems/resolver/activation_request.rb +4 -3
  321. data/lib/rubygems/resolver/api_set.rb +5 -4
  322. data/lib/rubygems/resolver/api_specification.rb +7 -6
  323. data/lib/rubygems/resolver/best_set.rb +6 -5
  324. data/lib/rubygems/resolver/composed_set.rb +1 -0
  325. data/lib/rubygems/resolver/conflict.rb +11 -10
  326. data/lib/rubygems/resolver/current_set.rb +1 -0
  327. data/lib/rubygems/resolver/dependency_request.rb +3 -2
  328. data/lib/rubygems/resolver/git_set.rb +3 -2
  329. data/lib/rubygems/resolver/git_specification.rb +7 -6
  330. data/lib/rubygems/resolver/index_set.rb +4 -3
  331. data/lib/rubygems/resolver/index_specification.rb +7 -5
  332. data/lib/rubygems/resolver/installed_specification.rb +5 -4
  333. data/lib/rubygems/resolver/installer_set.rb +15 -17
  334. data/lib/rubygems/resolver/local_specification.rb +3 -2
  335. data/lib/rubygems/resolver/lock_set.rb +5 -4
  336. data/lib/rubygems/resolver/lock_specification.rb +5 -4
  337. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb +1 -1
  338. data/lib/rubygems/resolver/molinillo/lib/molinillo/errors.rb +32 -26
  339. data/lib/rubygems/resolver/molinillo/lib/molinillo/gem_metadata.rb +1 -1
  340. data/lib/rubygems/resolver/molinillo.rb +2 -1
  341. data/lib/rubygems/resolver/requirement_list.rb +1 -0
  342. data/lib/rubygems/resolver/set.rb +1 -0
  343. data/lib/rubygems/resolver/source_set.rb +2 -0
  344. data/lib/rubygems/resolver/spec_specification.rb +1 -0
  345. data/lib/rubygems/resolver/specification.rb +2 -1
  346. data/lib/rubygems/resolver/stats.rb +2 -1
  347. data/lib/rubygems/resolver/vendor_set.rb +2 -1
  348. data/lib/rubygems/resolver/vendor_specification.rb +4 -3
  349. data/lib/rubygems/resolver.rb +41 -40
  350. data/lib/rubygems/s3_uri_signer.rb +10 -8
  351. data/lib/rubygems/safe_yaml.rb +4 -2
  352. data/lib/rubygems/security/policies.rb +48 -47
  353. data/lib/rubygems/security/policy.rb +19 -18
  354. data/lib/rubygems/security/signer.rb +6 -5
  355. data/lib/rubygems/security/trust_dir.rb +5 -4
  356. data/lib/rubygems/security.rb +30 -42
  357. data/lib/rubygems/security_option.rb +6 -5
  358. data/lib/rubygems/shellwords.rb +3 -0
  359. data/lib/rubygems/source/git.rb +22 -22
  360. data/lib/rubygems/source/installed.rb +2 -1
  361. data/lib/rubygems/source/local.rb +3 -2
  362. data/lib/rubygems/source/lock.rb +1 -0
  363. data/lib/rubygems/source/specific_file.rb +2 -1
  364. data/lib/rubygems/source/vendor.rb +1 -0
  365. data/lib/rubygems/source.rb +16 -16
  366. data/lib/rubygems/spec_fetcher.rb +10 -9
  367. data/lib/rubygems/specification.rb +121 -114
  368. data/lib/rubygems/specification_policy.rb +36 -15
  369. data/lib/rubygems/stub_specification.rb +11 -9
  370. data/lib/rubygems/text.rb +2 -2
  371. data/lib/rubygems/tsort/lib/tsort.rb +308 -310
  372. data/lib/rubygems/tsort.rb +1 -1
  373. data/lib/rubygems/uninstaller.rb +19 -18
  374. data/lib/rubygems/update_suggestion.rb +69 -0
  375. data/lib/rubygems/uri.rb +4 -4
  376. data/lib/rubygems/uri_formatter.rb +1 -1
  377. data/lib/rubygems/user_interaction.rb +37 -21
  378. data/lib/rubygems/util/licenses.rb +4 -3
  379. data/lib/rubygems/util/list.rb +1 -0
  380. data/lib/rubygems/util.rb +12 -15
  381. data/lib/rubygems/validator.rb +7 -6
  382. data/lib/rubygems/version.rb +17 -11
  383. data/lib/rubygems/version_option.rb +4 -3
  384. data/lib/rubygems.rb +89 -68
  385. data/rubygems-update.gemspec +10 -8
  386. data/setup.rb +10 -9
  387. data/test/rubygems/alternate_cert.pem +14 -14
  388. data/test/rubygems/alternate_cert_32.pem +15 -15
  389. data/test/rubygems/alternate_key.pem +25 -25
  390. data/test/rubygems/bad_rake.rb +1 -0
  391. data/test/rubygems/bundler_test_gem.rb +421 -0
  392. data/test/rubygems/child_cert.pem +15 -16
  393. data/test/rubygems/child_cert_32.pem +15 -16
  394. data/test/rubygems/child_key.pem +25 -25
  395. data/test/rubygems/encrypted_private_key.pem +26 -26
  396. data/test/rubygems/expired_cert.pem +15 -15
  397. data/test/rubygems/fake_certlib/openssl.rb +1 -0
  398. data/test/rubygems/future_cert.pem +15 -15
  399. data/test/rubygems/future_cert_32.pem +15 -15
  400. data/test/rubygems/good_rake.rb +1 -0
  401. data/test/rubygems/grandchild_cert.pem +15 -16
  402. data/test/rubygems/grandchild_cert_32.pem +15 -16
  403. data/test/rubygems/grandchild_key.pem +25 -25
  404. data/test/rubygems/helper.rb +172 -151
  405. data/test/rubygems/installer_test_case.rb +14 -13
  406. data/test/rubygems/invalid_issuer_cert.pem +16 -16
  407. data/test/rubygems/invalid_issuer_cert_32.pem +16 -16
  408. data/test/rubygems/invalid_key.pem +25 -25
  409. data/test/rubygems/invalid_signer_cert.pem +15 -15
  410. data/test/rubygems/invalid_signer_cert_32.pem +15 -15
  411. data/test/rubygems/invalidchild_cert.pem +15 -16
  412. data/test/rubygems/invalidchild_cert_32.pem +15 -16
  413. data/test/rubygems/invalidchild_key.pem +25 -25
  414. data/test/rubygems/multifactor_auth_utilities.rb +111 -0
  415. data/test/rubygems/package/tar_test_case.rb +53 -17
  416. data/test/rubygems/packages/Bluebie-legs-0.6.2.gem +0 -0
  417. data/test/rubygems/plugin/exception/rubygems_plugin.rb +2 -1
  418. data/test/rubygems/plugin/load/rubygems_plugin.rb +1 -0
  419. data/test/rubygems/plugin/standarderror/rubygems_plugin.rb +2 -1
  420. data/test/rubygems/private_key.pem +25 -25
  421. data/test/rubygems/public_cert.pem +16 -16
  422. data/test/rubygems/public_cert_32.pem +15 -15
  423. data/test/rubygems/public_key.pem +7 -7
  424. data/test/rubygems/rubygems/commands/crash_command.rb +1 -0
  425. data/test/rubygems/rubygems_plugin.rb +3 -2
  426. data/test/rubygems/simple_gem.rb +2 -1
  427. data/test/rubygems/specifications/bar-0.0.2.gemspec +2 -0
  428. data/test/rubygems/specifications/rubyforge-0.0.1.gemspec +6 -4
  429. data/test/rubygems/test_bundled_ca.rb +13 -12
  430. data/test/rubygems/test_config.rb +5 -4
  431. data/test/rubygems/test_deprecate.rb +5 -4
  432. data/test/rubygems/test_exit.rb +9 -3
  433. data/test/rubygems/test_gem.rb +339 -677
  434. data/test/rubygems/test_gem_available_set.rb +22 -21
  435. data/test/rubygems/test_gem_bundler_version_finder.rb +6 -4
  436. data/test/rubygems/test_gem_command.rb +45 -44
  437. data/test/rubygems/test_gem_command_manager.rb +96 -30
  438. data/test/rubygems/test_gem_commands_build_command.rb +74 -63
  439. data/test/rubygems/test_gem_commands_cert_command.rb +98 -99
  440. data/test/rubygems/test_gem_commands_check_command.rb +5 -4
  441. data/test/rubygems/test_gem_commands_cleanup_command.rb +41 -40
  442. data/test/rubygems/test_gem_commands_contents_command.rb +28 -27
  443. data/test/rubygems/test_gem_commands_dependency_command.rb +37 -36
  444. data/test/rubygems/test_gem_commands_environment_command.rb +17 -16
  445. data/test/rubygems/test_gem_commands_exec_command.rb +853 -0
  446. data/test/rubygems/test_gem_commands_fetch_command.rb +38 -37
  447. data/test/rubygems/test_gem_commands_generate_index_command.rb +8 -7
  448. data/test/rubygems/test_gem_commands_help_command.rb +14 -13
  449. data/test/rubygems/test_gem_commands_info_command.rb +29 -2
  450. data/test/rubygems/test_gem_commands_install_command.rb +152 -132
  451. data/test/rubygems/test_gem_commands_list_command.rb +5 -4
  452. data/test/rubygems/test_gem_commands_lock_command.rb +11 -10
  453. data/test/rubygems/test_gem_commands_mirror.rb +3 -2
  454. data/test/rubygems/test_gem_commands_open_command.rb +5 -4
  455. data/test/rubygems/test_gem_commands_outdated_command.rb +10 -9
  456. data/test/rubygems/test_gem_commands_owner_command.rb +227 -50
  457. data/test/rubygems/test_gem_commands_pristine_command.rb +142 -93
  458. data/test/rubygems/test_gem_commands_push_command.rb +189 -64
  459. data/test/rubygems/test_gem_commands_query_command.rb +74 -73
  460. data/test/rubygems/test_gem_commands_search_command.rb +3 -2
  461. data/test/rubygems/test_gem_commands_server_command.rb +3 -2
  462. data/test/rubygems/test_gem_commands_setup_command.rb +123 -96
  463. data/test/rubygems/test_gem_commands_signin_command.rb +71 -31
  464. data/test/rubygems/test_gem_commands_signout_command.rb +3 -3
  465. data/test/rubygems/test_gem_commands_sources_command.rb +29 -29
  466. data/test/rubygems/test_gem_commands_specification_command.rb +33 -32
  467. data/test/rubygems/test_gem_commands_stale_command.rb +5 -4
  468. data/test/rubygems/test_gem_commands_uninstall_command.rb +99 -81
  469. data/test/rubygems/test_gem_commands_unpack_command.rb +32 -31
  470. data/test/rubygems/test_gem_commands_update_command.rb +96 -95
  471. data/test/rubygems/test_gem_commands_which_command.rb +7 -6
  472. data/test/rubygems/test_gem_commands_yank_command.rb +162 -43
  473. data/test/rubygems/test_gem_config_file.rb +94 -81
  474. data/test/rubygems/test_gem_dependency.rb +76 -73
  475. data/test/rubygems/test_gem_dependency_installer.rb +200 -165
  476. data/test/rubygems/test_gem_dependency_list.rb +48 -47
  477. data/test/rubygems/test_gem_dependency_resolution_error.rb +5 -4
  478. data/test/rubygems/test_gem_doctor.rb +27 -26
  479. data/test/rubygems/test_gem_ext_builder.rb +60 -61
  480. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/custom_name.gemspec +4 -4
  481. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/{Cargo.lock → ext/custom_name_lib/Cargo.lock} +23 -33
  482. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/{Cargo.toml → ext/custom_name_lib/Cargo.toml} +1 -1
  483. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/{src → ext/custom_name_lib/src}/lib.rs +1 -1
  484. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/lib/custom_name.rb +3 -0
  485. data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.lock +37 -33
  486. data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.toml +1 -1
  487. data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/rust_ruby_example.gemspec +2 -0
  488. data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/src/lib.rs +12 -0
  489. data/test/rubygems/test_gem_ext_cargo_builder.rb +48 -59
  490. data/test/rubygems/test_gem_ext_cargo_builder_link_flag_converter.rb +20 -19
  491. data/test/rubygems/test_gem_ext_cargo_builder_unit.rb +21 -36
  492. data/test/rubygems/test_gem_ext_cmake_builder.rb +16 -15
  493. data/test/rubygems/test_gem_ext_configure_builder.rb +14 -13
  494. data/test/rubygems/test_gem_ext_ext_conf_builder.rb +51 -52
  495. data/test/rubygems/test_gem_ext_rake_builder.rb +16 -15
  496. data/test/rubygems/test_gem_gem_runner.rb +15 -9
  497. data/test/rubygems/test_gem_gemcutter_utilities.rb +170 -84
  498. data/test/rubygems/test_gem_impossible_dependencies_error.rb +5 -4
  499. data/test/rubygems/test_gem_indexer.rb +87 -67
  500. data/test/rubygems/test_gem_install_update_options.rb +17 -16
  501. data/test/rubygems/test_gem_installer.rb +422 -304
  502. data/test/rubygems/test_gem_local_remote_options.rb +11 -10
  503. data/test/rubygems/test_gem_name_tuple.rb +5 -4
  504. data/test/rubygems/test_gem_package.rb +243 -231
  505. data/test/rubygems/test_gem_package_old.rb +14 -13
  506. data/test/rubygems/test_gem_package_tar_header.rb +48 -47
  507. data/test/rubygems/test_gem_package_tar_reader.rb +56 -8
  508. data/test/rubygems/test_gem_package_tar_reader_entry.rb +162 -16
  509. data/test/rubygems/test_gem_package_tar_writer.rb +77 -76
  510. data/test/rubygems/test_gem_package_task.rb +19 -18
  511. data/test/rubygems/test_gem_path_support.rb +15 -14
  512. data/test/rubygems/test_gem_platform.rb +333 -227
  513. data/test/rubygems/test_gem_rdoc.rb +15 -14
  514. data/test/rubygems/test_gem_remote_fetcher.rb +155 -154
  515. data/test/rubygems/test_gem_request.rb +64 -58
  516. data/test/rubygems/test_gem_request_connection_pools.rb +30 -29
  517. data/test/rubygems/test_gem_request_set.rb +101 -100
  518. data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +210 -211
  519. data/test/rubygems/test_gem_request_set_lockfile.rb +87 -86
  520. data/test/rubygems/test_gem_request_set_lockfile_parser.rb +58 -57
  521. data/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb +63 -62
  522. data/test/rubygems/test_gem_requirement.rb +48 -41
  523. data/test/rubygems/test_gem_resolver.rb +167 -99
  524. data/test/rubygems/test_gem_resolver_activation_request.rb +7 -6
  525. data/test/rubygems/test_gem_resolver_api_set.rb +34 -33
  526. data/test/rubygems/test_gem_resolver_api_specification.rb +48 -47
  527. data/test/rubygems/test_gem_resolver_best_set.rb +23 -22
  528. data/test/rubygems/test_gem_resolver_composed_set.rb +2 -1
  529. data/test/rubygems/test_gem_resolver_conflict.rb +13 -12
  530. data/test/rubygems/test_gem_resolver_dependency_request.rb +16 -15
  531. data/test/rubygems/test_gem_resolver_git_set.rb +22 -21
  532. data/test/rubygems/test_gem_resolver_git_specification.rb +22 -21
  533. data/test/rubygems/test_gem_resolver_index_set.rb +13 -12
  534. data/test/rubygems/test_gem_resolver_index_specification.rb +17 -16
  535. data/test/rubygems/test_gem_resolver_installed_specification.rb +6 -5
  536. data/test/rubygems/test_gem_resolver_installer_set.rb +79 -34
  537. data/test/rubygems/test_gem_resolver_local_specification.rb +8 -7
  538. data/test/rubygems/test_gem_resolver_lock_set.rb +13 -12
  539. data/test/rubygems/test_gem_resolver_lock_specification.rb +18 -17
  540. data/test/rubygems/test_gem_resolver_requirement_list.rb +2 -1
  541. data/test/rubygems/test_gem_resolver_specification.rb +9 -8
  542. data/test/rubygems/test_gem_resolver_vendor_set.rb +7 -6
  543. data/test/rubygems/test_gem_resolver_vendor_specification.rb +11 -10
  544. data/test/rubygems/test_gem_security.rb +69 -68
  545. data/test/rubygems/test_gem_security_policy.rb +72 -72
  546. data/test/rubygems/test_gem_security_signer.rb +35 -34
  547. data/test/rubygems/test_gem_security_trust_dir.rb +7 -6
  548. data/test/rubygems/test_gem_silent_ui.rb +39 -32
  549. data/test/rubygems/test_gem_source.rb +45 -44
  550. data/test/rubygems/test_gem_source_fetch_problem.rb +10 -9
  551. data/test/rubygems/test_gem_source_git.rb +69 -62
  552. data/test/rubygems/test_gem_source_installed.rb +17 -16
  553. data/test/rubygems/test_gem_source_list.rb +6 -5
  554. data/test/rubygems/test_gem_source_local.rb +15 -14
  555. data/test/rubygems/test_gem_source_lock.rb +32 -31
  556. data/test/rubygems/test_gem_source_specific_file.rb +18 -17
  557. data/test/rubygems/test_gem_source_subpath_problem.rb +8 -7
  558. data/test/rubygems/test_gem_source_vendor.rb +14 -13
  559. data/test/rubygems/test_gem_spec_fetcher.rb +73 -72
  560. data/test/rubygems/test_gem_specification.rb +533 -469
  561. data/test/rubygems/test_gem_stream_ui.rb +53 -22
  562. data/test/rubygems/test_gem_stub_specification.rb +33 -32
  563. data/test/rubygems/test_gem_text.rb +2 -1
  564. data/test/rubygems/test_gem_uninstaller.rb +118 -117
  565. data/test/rubygems/test_gem_unsatisfiable_dependency_error.rb +4 -3
  566. data/test/rubygems/test_gem_update_suggestion.rb +209 -0
  567. data/test/rubygems/test_gem_uri.rb +6 -4
  568. data/test/rubygems/test_gem_uri_formatter.rb +15 -14
  569. data/test/rubygems/test_gem_util.rb +24 -23
  570. data/test/rubygems/test_gem_validator.rb +8 -8
  571. data/test/rubygems/test_gem_version.rb +24 -16
  572. data/test/rubygems/test_gem_version_option.rb +16 -15
  573. data/test/rubygems/test_kernel.rb +43 -48
  574. data/test/rubygems/test_project_sanity.rb +32 -3
  575. data/test/rubygems/test_remote_fetch_error.rb +8 -7
  576. data/test/rubygems/test_require.rb +118 -103
  577. data/test/rubygems/test_rubygems.rb +10 -8
  578. data/test/rubygems/test_webauthn_listener.rb +143 -0
  579. data/test/rubygems/test_webauthn_listener_response.rb +93 -0
  580. data/test/rubygems/test_webauthn_poller.rb +124 -0
  581. data/test/rubygems/utilities.rb +98 -34
  582. data/test/rubygems/wrong_key_cert.pem +15 -15
  583. data/test/rubygems/wrong_key_cert_32.pem +15 -15
  584. data/test/test_changelog_generator.rb +1 -1
  585. metadata +99 -46
  586. data/bundler/lib/bundler/dep_proxy.rb +0 -55
  587. data/bundler/lib/bundler/templates/gems.rb +0 -5
  588. data/bundler/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt +0 -5
  589. data/bundler/lib/bundler/templates/newgem/travis.yml.tt +0 -6
  590. data/bundler/lib/bundler/vendor/molinillo/LICENSE +0 -9
  591. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +0 -57
  592. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +0 -88
  593. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb +0 -36
  594. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +0 -66
  595. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +0 -62
  596. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +0 -63
  597. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +0 -61
  598. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb +0 -126
  599. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb +0 -46
  600. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +0 -36
  601. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +0 -164
  602. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +0 -255
  603. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +0 -149
  604. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +0 -6
  605. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +0 -112
  606. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb +0 -67
  607. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +0 -839
  608. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb +0 -46
  609. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/state.rb +0 -58
  610. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo.rb +0 -11
  611. data/bundler/lib/bundler/vendor/tmpdir/lib/tmpdir.rb +0 -154
  612. data/bundler/lib/bundler/vendored_molinillo.rb +0 -4
  613. data/bundler/lib/bundler/version_ranges.rb +0 -122
  614. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb +0 -21
  615. data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/build.rb +0 -21
@@ -1,10 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "match_platform"
3
+ require_relative "force_platform"
4
4
 
5
5
  module Bundler
6
6
  class LazySpecification
7
7
  include MatchPlatform
8
+ include ForcePlatform
8
9
 
9
10
  attr_reader :name, :version, :dependencies, :platform
10
11
  attr_accessor :source, :remote, :force_ruby_platform
@@ -15,11 +16,11 @@ module Bundler
15
16
  @dependencies = []
16
17
  @platform = platform || Gem::Platform::RUBY
17
18
  @source = source
18
- @specification = nil
19
+ @force_ruby_platform = default_force_ruby_platform
19
20
  end
20
21
 
21
22
  def full_name
22
- if platform == Gem::Platform::RUBY || platform.nil?
23
+ @full_name ||= if platform == Gem::Platform::RUBY
23
24
  "#{@name}-#{@version}"
24
25
  else
25
26
  "#{@name}-#{@version}-#{platform}"
@@ -27,15 +28,15 @@ module Bundler
27
28
  end
28
29
 
29
30
  def ==(other)
30
- identifier == other.identifier
31
+ full_name == other.full_name
31
32
  end
32
33
 
33
34
  def eql?(other)
34
- identifier.eql?(other.identifier)
35
+ full_name.eql?(other.full_name)
35
36
  end
36
37
 
37
38
  def hash
38
- identifier.hash
39
+ full_name.hash
39
40
  end
40
41
 
41
42
  ##
@@ -61,7 +62,7 @@ module Bundler
61
62
  def to_lock
62
63
  out = String.new
63
64
 
64
- if platform == Gem::Platform::RUBY || platform.nil?
65
+ if platform == Gem::Platform::RUBY
65
66
  out << " #{name} (#{version})\n"
66
67
  else
67
68
  out << " #{name} (#{version}-#{platform})\n"
@@ -75,76 +76,74 @@ module Bundler
75
76
  out
76
77
  end
77
78
 
78
- def __materialize__
79
- @specification = if source.is_a?(Source::Gemspec) && source.gemspec.name == name
80
- source.gemspec.tap {|s| s.source = source }
79
+ def materialize_for_installation
80
+ source.local!
81
+
82
+ matching_specs = source.specs.search(use_exact_resolved_specifications? ? self : [name, version])
83
+ return self if matching_specs.empty?
84
+
85
+ candidates = if use_exact_resolved_specifications?
86
+ matching_specs
81
87
  else
82
- search_object = if source.is_a?(Source::Path)
83
- Dependency.new(name, version)
84
- else
85
- ruby_platform_materializes_to_ruby_platform? ? self : Dependency.new(name, version)
86
- end
87
- platform_object = ruby_platform_materializes_to_ruby_platform? ? Gem::Platform.new(platform) : Gem::Platform.local
88
- candidates = source.specs.search(search_object)
89
- same_platform_candidates = candidates.select do |spec|
90
- MatchPlatform.platforms_match?(spec.platform, platform_object)
91
- end
92
- installable_candidates = same_platform_candidates.select do |spec|
93
- spec.is_a?(StubSpecification) ||
94
- (spec.required_ruby_version.satisfied_by?(Gem.ruby_version) &&
95
- spec.required_rubygems_version.satisfied_by?(Gem.rubygems_version))
88
+ target_platform = ruby_platform_materializes_to_ruby_platform? ? platform : local_platform
89
+
90
+ installable_candidates = GemHelpers.select_best_platform_match(matching_specs, target_platform)
91
+
92
+ specification = __materialize__(installable_candidates, :fallback_to_non_installable => false)
93
+ return specification unless specification.nil?
94
+
95
+ if target_platform != platform
96
+ installable_candidates = GemHelpers.select_best_platform_match(matching_specs, platform)
96
97
  end
97
- search = installable_candidates.last || same_platform_candidates.last
98
- search.dependencies = dependencies if search && (search.is_a?(RemoteSpecification) || search.is_a?(EndpointSpecification))
99
- search
98
+
99
+ installable_candidates
100
100
  end
101
+
102
+ __materialize__(candidates)
101
103
  end
102
104
 
103
- def respond_to?(*args)
104
- super || @specification ? @specification.respond_to?(*args) : nil
105
+ # If in frozen mode, we fallback to a non-installable candidate because by
106
+ # doing this we avoid re-resolving and potentially end up changing the
107
+ # lock file, which is not allowed. In that case, we will give a proper error
108
+ # about the mismatch higher up the stack, right before trying to install the
109
+ # bad gem.
110
+ def __materialize__(candidates, fallback_to_non_installable: Bundler.frozen_bundle?)
111
+ search = candidates.reverse.find do |spec|
112
+ spec.is_a?(StubSpecification) ||
113
+ (spec.matches_current_ruby? &&
114
+ spec.matches_current_rubygems?)
115
+ end
116
+ if search.nil? && fallback_to_non_installable
117
+ search = candidates.last
118
+ else
119
+ search.dependencies = dependencies if search && search.full_name == full_name && (search.is_a?(RemoteSpecification) || search.is_a?(EndpointSpecification))
120
+ end
121
+ search
105
122
  end
106
123
 
107
124
  def to_s
108
- @__to_s ||= if platform == Gem::Platform::RUBY || platform.nil?
125
+ @to_s ||= if platform == Gem::Platform::RUBY
109
126
  "#{name} (#{version})"
110
127
  else
111
128
  "#{name} (#{version}-#{platform})"
112
129
  end
113
130
  end
114
131
 
115
- def identifier
116
- @__identifier ||= [name, version, platform_string]
117
- end
118
-
119
132
  def git_version
120
133
  return unless source.is_a?(Bundler::Source::Git)
121
134
  " #{source.revision[0..6]}"
122
135
  end
123
136
 
124
- protected
125
-
126
- def platform_string
127
- platform_string = platform.to_s
128
- platform_string == Index::RUBY ? Index::NULL : platform_string
129
- end
130
-
131
137
  private
132
138
 
133
- def to_ary
134
- nil
135
- end
136
-
137
- def method_missing(method, *args, &blk)
138
- raise "LazySpecification has not been materialized yet (calling :#{method} #{args.inspect})" unless @specification
139
-
140
- return super unless respond_to?(method)
141
-
142
- @specification.send(method, *args, &blk)
139
+ def use_exact_resolved_specifications?
140
+ @use_exact_resolved_specifications ||= !source.is_a?(Source::Path) && ruby_platform_materializes_to_ruby_platform?
143
141
  end
144
142
 
145
143
  #
146
144
  # For backwards compatibility with existing lockfiles, if the most specific
147
- # locked platform is RUBY, we keep the previous behaviour of resolving the
145
+ # locked platform is not a specific platform like x86_64-linux or
146
+ # universal-java-11, then we keep the previous behaviour of resolving the
148
147
  # best platform variant at materiliazation time. For previous bundler
149
148
  # versions (before 2.2.0) this was always the case (except when the lockfile
150
149
  # only included non-ruby platforms), but we're also keeping this behaviour
@@ -152,7 +151,9 @@ module Bundler
152
151
  # explicitly add a more specific platform.
153
152
  #
154
153
  def ruby_platform_materializes_to_ruby_platform?
155
- !Bundler.most_specific_locked_platform?(generic_local_platform) || force_ruby_platform || Bundler.settings[:force_ruby_platform]
154
+ generic_platform = generic_local_platform == Gem::Platform::JAVA ? Gem::Platform::JAVA : Gem::Platform::RUBY
155
+
156
+ !Bundler.most_specific_locked_platform?(generic_platform) || force_ruby_platform || Bundler.settings[:force_ruby_platform]
156
157
  end
157
158
  end
158
159
  end
@@ -45,7 +45,7 @@ module Bundler
45
45
  # gems with the same name, but different platform
46
46
  # are ordered consistently
47
47
  specs.sort_by(&:full_name).each do |spec|
48
- next if spec.name == "bundler".freeze
48
+ next if spec.name == "bundler"
49
49
  out << spec.to_lock
50
50
  end
51
51
  end
@@ -60,7 +60,7 @@ module Bundler
60
60
  handled = []
61
61
  definition.dependencies.sort_by(&:to_s).each do |dep|
62
62
  next if handled.include?(dep.name)
63
- out << dep.to_lock
63
+ out << dep.to_lock << "\n"
64
64
  handled << dep.name
65
65
  end
66
66
  end
@@ -71,7 +71,7 @@ module Bundler
71
71
  end
72
72
 
73
73
  def add_bundled_with
74
- add_section("BUNDLED WITH", Bundler::VERSION)
74
+ add_section("BUNDLED WITH", definition.bundler_version_to_lock.to_s)
75
75
  end
76
76
 
77
77
  def add_section(name, value)
@@ -4,15 +4,15 @@ module Bundler
4
4
  class LockfileParser
5
5
  attr_reader :sources, :dependencies, :specs, :platforms, :bundler_version, :ruby_version
6
6
 
7
- BUNDLED = "BUNDLED WITH".freeze
8
- DEPENDENCIES = "DEPENDENCIES".freeze
9
- PLATFORMS = "PLATFORMS".freeze
10
- RUBY = "RUBY VERSION".freeze
11
- GIT = "GIT".freeze
12
- GEM = "GEM".freeze
13
- PATH = "PATH".freeze
14
- PLUGIN = "PLUGIN SOURCE".freeze
15
- SPECS = " specs:".freeze
7
+ BUNDLED = "BUNDLED WITH"
8
+ DEPENDENCIES = "DEPENDENCIES"
9
+ PLATFORMS = "PLATFORMS"
10
+ RUBY = "RUBY VERSION"
11
+ GIT = "GIT"
12
+ GEM = "GEM"
13
+ PATH = "PATH"
14
+ PLUGIN = "PLUGIN SOURCE"
15
+ SPECS = " specs:"
16
16
  OPTIONS = /^ ([a-z]+): (.*)$/i.freeze
17
17
  SOURCE = [GIT, GEM, PATH, PLUGIN].freeze
18
18
 
@@ -26,6 +26,7 @@ module Bundler
26
26
  KNOWN_SECTIONS = SECTIONS_BY_VERSION_INTRODUCED.values.flatten.freeze
27
27
 
28
28
  ENVIRONMENT_VERSION_SECTIONS = [BUNDLED, RUBY].freeze
29
+ deprecate_constant(:ENVIRONMENT_VERSION_SECTIONS)
29
30
 
30
31
  def self.sections_in_lockfile(lockfile_contents)
31
32
  lockfile_contents.scan(/^\w[\w ]*$/).uniq
@@ -63,7 +64,7 @@ module Bundler
63
64
  @state = nil
64
65
  @specs = {}
65
66
 
66
- if lockfile.match(/<<<<<<<|=======|>>>>>>>|\|\|\|\|\|\|\|/)
67
+ if lockfile.match?(/<<<<<<<|=======|>>>>>>>|\|\|\|\|\|\|\|/)
67
68
  raise LockfileError, "Your #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} contains merge conflicts.\n" \
68
69
  "Run `git checkout HEAD -- #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)}` first to get a clean lock."
69
70
  end
@@ -80,13 +81,13 @@ module Bundler
80
81
  @state = :ruby
81
82
  elsif line == BUNDLED
82
83
  @state = :bundled_with
83
- elsif line =~ /^[^\s]/
84
+ elsif /^[^\s]/.match?(line)
84
85
  @state = nil
85
86
  elsif @state
86
87
  send("parse_#{@state}", line)
87
88
  end
88
89
  end
89
- @specs = @specs.values.sort_by(&:identifier)
90
+ @specs = @specs.values.sort_by(&:full_name)
90
91
  rescue ArgumentError => e
91
92
  Bundler.ui.debug(e)
92
93
  raise LockfileError, "Your lockfile is unreadable. Run `rm #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)}` " \
@@ -100,9 +101,9 @@ module Bundler
100
101
  private
101
102
 
102
103
  TYPES = {
103
- GIT => Bundler::Source::Git,
104
- GEM => Bundler::Source::Rubygems,
105
- PATH => Bundler::Source::Path,
104
+ GIT => Bundler::Source::Git,
105
+ GEM => Bundler::Source::Rubygems,
106
+ PATH => Bundler::Source::Path,
106
107
  PLUGIN => Bundler::Plugin,
107
108
  }.freeze
108
109
 
@@ -199,7 +200,7 @@ module Bundler
199
200
  @current_spec.source = @current_source
200
201
  @current_source.add_dependency_names(name)
201
202
 
202
- @specs[@current_spec.identifier] = @current_spec
203
+ @specs[@current_spec.full_name] = @current_spec
203
204
  elsif spaces.size == 6
204
205
  version = version.split(",").map(&:strip) if version
205
206
  dep = Gem::Dependency.new(name, version)
@@ -1,13 +1,13 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-ADD" "1" "June 2022" "" ""
4
+ .TH "BUNDLE\-ADD" "1" "August 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install
8
8
  .
9
9
  .SH "SYNOPSIS"
10
- \fBbundle add\fR \fIGEM_NAME\fR [\-\-group=GROUP] [\-\-version=VERSION] [\-\-source=SOURCE] [\-\-git=GIT] [\-\-github=GITHUB] [\-\-branch=BRANCH] [\-\-ref=REF] [\-\-skip\-install] [\-\-strict] [\-\-optimistic]
10
+ \fBbundle add\fR \fIGEM_NAME\fR [\-\-group=GROUP] [\-\-version=VERSION] [\-\-source=SOURCE] [\-\-path=PATH] [\-\-git=GIT] [\-\-github=GITHUB] [\-\-branch=BRANCH] [\-\-ref=REF] [\-\-skip\-install] [\-\-strict] [\-\-optimistic]
11
11
  .
12
12
  .SH "DESCRIPTION"
13
13
  Adds the named gem to the Gemfile and run \fBbundle install\fR\. \fBbundle install\fR can be avoided by using the flag \fB\-\-skip\-install\fR\.
@@ -49,6 +49,10 @@ Specify the source for the added gem\.
49
49
  Adds require path to gem\. Provide false, or a path as a string\.
50
50
  .
51
51
  .TP
52
+ \fB\-\-path\fR
53
+ Specify the file system path for the added gem\.
54
+ .
55
+ .TP
52
56
  \fB\-\-git\fR
53
57
  Specify the git source for the added gem\.
54
58
  .
@@ -3,7 +3,7 @@ bundle-add(1) -- Add gem to the Gemfile and run bundle install
3
3
 
4
4
  ## SYNOPSIS
5
5
 
6
- `bundle add` <GEM_NAME> [--group=GROUP] [--version=VERSION] [--source=SOURCE] [--git=GIT] [--github=GITHUB] [--branch=BRANCH] [--ref=REF] [--skip-install] [--strict] [--optimistic]
6
+ `bundle add` <GEM_NAME> [--group=GROUP] [--version=VERSION] [--source=SOURCE] [--path=PATH] [--git=GIT] [--github=GITHUB] [--branch=BRANCH] [--ref=REF] [--skip-install] [--strict] [--optimistic]
7
7
 
8
8
  ## DESCRIPTION
9
9
  Adds the named gem to the Gemfile and run `bundle install`. `bundle install` can be avoided by using the flag `--skip-install`.
@@ -33,6 +33,9 @@ bundle add rails --group "development, test"
33
33
  * `--require`, `-r`:
34
34
  Adds require path to gem. Provide false, or a path as a string.
35
35
 
36
+ * `--path`:
37
+ Specify the file system path for the added gem.
38
+
36
39
  * `--git`:
37
40
  Specify the git source for the added gem.
38
41
 
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-BINSTUBS" "1" "June 2022" "" ""
4
+ .TH "BUNDLE\-BINSTUBS" "1" "August 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-binstubs\fR \- Install the binstubs of the listed gems
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-CACHE" "1" "June 2022" "" ""
4
+ .TH "BUNDLE\-CACHE" "1" "August 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
@@ -9,8 +9,11 @@
9
9
  .SH "SYNOPSIS"
10
10
  \fBbundle cache\fR
11
11
  .
12
+ .P
13
+ alias: \fBpackage\fR, \fBpack\fR
14
+ .
12
15
  .SH "DESCRIPTION"
13
- Copy all of the \fB\.gem\fR files needed to run the application into the \fBvendor/cache\fR directory\. In the future, when running [bundle install(1)][bundle\-install], use the gems in the cache in preference to the ones on \fBrubygems\.org\fR\.
16
+ Copy all of the \fB\.gem\fR files needed to run the application into the \fBvendor/cache\fR directory\. In the future, when running \fBbundle install(1)\fR \fIbundle\-install\.1\.html\fR, use the gems in the cache in preference to the ones on \fBrubygems\.org\fR\.
14
17
  .
15
18
  .SH "GIT AND PATH GEMS"
16
19
  The \fBbundle cache\fR command can also package \fB:git\fR and \fB:path\fR dependencies besides \.gem files\. This needs to be explicitly enabled via the \fB\-\-all\fR option\. Once used, the \fB\-\-all\fR option will be remembered\.
@@ -19,7 +22,7 @@ The \fBbundle cache\fR command can also package \fB:git\fR and \fB:path\fR depen
19
22
  When using gems that have different packages for different platforms, Bundler supports caching of gems for other platforms where the Gemfile has been resolved (i\.e\. present in the lockfile) in \fBvendor/cache\fR\. This needs to be enabled via the \fB\-\-all\-platforms\fR option\. This setting will be remembered in your local bundler configuration\.
20
23
  .
21
24
  .SH "REMOTE FETCHING"
22
- By default, if you run \fBbundle install(1)\fR](bundle\-install\.1\.html) after running bundle cache(1) \fIbundle\-cache\.1\.html\fR, bundler will still connect to \fBrubygems\.org\fR to check whether a platform\-specific gem exists for any of the gems in \fBvendor/cache\fR\.
25
+ By default, if you run \fBbundle install(1)\fR \fIbundle\-install\.1\.html\fR after running bundle cache(1) \fIbundle\-cache\.1\.html\fR, bundler will still connect to \fBrubygems\.org\fR to check whether a platform\-specific gem exists for any of the gems in \fBvendor/cache\fR\.
23
26
  .
24
27
  .P
25
28
  For instance, consider this Gemfile(5):
@@ -53,3 +56,6 @@ One way to be sure that you have the right platformed versions of all your gems
53
56
  .
54
57
  .P
55
58
  By default, bundle cache(1) \fIbundle\-cache\.1\.html\fR fetches and also installs the gems to the default location\. To package the dependencies to \fBvendor/cache\fR without installing them to the local install location, you can run \fBbundle cache \-\-no\-install\fR\.
59
+ .
60
+ .SH "HISTORY"
61
+ In Bundler 2\.1, \fBcache\fR took in the functionalities of \fBpackage\fR and now \fBpackage\fR and \fBpack\fR are aliases of \fBcache\fR\.
@@ -5,10 +5,12 @@ bundle-cache(1) -- Package your needed `.gem` files into your application
5
5
 
6
6
  `bundle cache`
7
7
 
8
+ alias: `package`, `pack`
9
+
8
10
  ## DESCRIPTION
9
11
 
10
12
  Copy all of the `.gem` files needed to run the application into the
11
- `vendor/cache` directory. In the future, when running [bundle install(1)][bundle-install],
13
+ `vendor/cache` directory. In the future, when running [`bundle install(1)`](bundle-install.1.html),
12
14
  use the gems in the cache in preference to the ones on `rubygems.org`.
13
15
 
14
16
  ## GIT AND PATH GEMS
@@ -27,7 +29,7 @@ bundler configuration.
27
29
 
28
30
  ## REMOTE FETCHING
29
31
 
30
- By default, if you run `bundle install(1)`](bundle-install.1.html) after running
32
+ By default, if you run [`bundle install(1)`](bundle-install.1.html) after running
31
33
  [bundle cache(1)](bundle-cache.1.html), bundler will still connect to `rubygems.org`
32
34
  to check whether a platform-specific gem exists for any of the gems
33
35
  in `vendor/cache`.
@@ -70,3 +72,8 @@ By default, [bundle cache(1)](bundle-cache.1.html) fetches and also
70
72
  installs the gems to the default location. To package the
71
73
  dependencies to `vendor/cache` without installing them to the
72
74
  local install location, you can run `bundle cache --no-install`.
75
+
76
+ ## HISTORY
77
+
78
+ In Bundler 2.1, `cache` took in the functionalities of `package` and now
79
+ `package` and `pack` are aliases of `cache`.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-CHECK" "1" "June 2022" "" ""
4
+ .TH "BUNDLE\-CHECK" "1" "August 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-CLEAN" "1" "June 2022" "" ""
4
+ .TH "BUNDLE\-CLEAN" "1" "August 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory
@@ -20,5 +20,5 @@ Print the changes, but do not clean the unused gems\.
20
20
  .
21
21
  .TP
22
22
  \fB\-\-force\fR
23
- Force a clean even if \fB\-\-path\fR is not set\.
23
+ Forces cleaning up unused gems even if Bundler is configured to use globally installed gems\. As a consequence, removes all system gems except for the ones in the current application\.
24
24
 
@@ -15,4 +15,4 @@ useful when you have made many changes to your gem dependencies.
15
15
  * `--dry-run`:
16
16
  Print the changes, but do not clean the unused gems.
17
17
  * `--force`:
18
- Force a clean even if `--path` is not set.
18
+ Forces cleaning up unused gems even if Bundler is configured to use globally installed gems. As a consequence, removes all system gems except for the ones in the current application.
@@ -1,13 +1,22 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-CONFIG" "1" "June 2022" "" ""
4
+ .TH "BUNDLE\-CONFIG" "1" "August 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-config\fR \- Set bundler configuration options
8
8
  .
9
9
  .SH "SYNOPSIS"
10
- \fBbundle config\fR [list|get|set|unset] [\fIname\fR [\fIvalue\fR]]
10
+ \fBbundle config\fR list
11
+ .
12
+ .br
13
+ \fBbundle config\fR [get] NAME
14
+ .
15
+ .br
16
+ \fBbundle config\fR [set] NAME VALUE
17
+ .
18
+ .br
19
+ \fBbundle config\fR unset NAME
11
20
  .
12
21
  .SH "DESCRIPTION"
13
22
  This command allows you to interact with Bundler\'s configuration system\.
@@ -30,7 +39,7 @@ Bundler default config
30
39
  .IP "" 0
31
40
  .
32
41
  .P
33
- Executing \fBbundle config list\fR with will print a list of all bundler configuration for the current bundle, and where that configuration was set\.
42
+ Executing \fBbundle config list\fR will print a list of all bundler configuration for the current bundle, and where that configuration was set\.
34
43
  .
35
44
  .P
36
45
  Executing \fBbundle config get <name>\fR will print the value of that configuration setting, and where it was set\.
@@ -51,7 +60,7 @@ Executing \fBbundle config unset <name>\fR will delete the configuration in both
51
60
  Executing \fBbundle config unset \-\-global <name>\fR will delete the configuration only from the user configuration\.
52
61
  .
53
62
  .P
54
- Executing \fBbundle config unset \-\-local <name> <value>\fR will delete the configuration only from the local application\.
63
+ Executing \fBbundle config unset \-\-local <name>\fR will delete the configuration only from the local application\.
55
64
  .
56
65
  .P
57
66
  Executing bundle with the \fBBUNDLE_IGNORE_CONFIG\fR environment variable set will cause it to ignore all configuration\.
@@ -74,6 +83,10 @@ Creates a directory (defaults to \fB~/bin\fR) and place any executables from the
74
83
  In deployment mode, Bundler will \'roll\-out\' the bundle for \fBproduction\fR use\. Please check carefully if you want to have this option enabled in \fBdevelopment\fR or \fBtest\fR environments\.
75
84
  .
76
85
  .TP
86
+ \fBonly\fR
87
+ A space\-separated list of groups to install only gems of the specified groups\.
88
+ .
89
+ .TP
77
90
  \fBpath\fR
78
91
  The location to install the specified gems to\. This defaults to Rubygems\' setting\. Bundler shares this location with Rubygems, \fBgem install \.\.\.\fR will have gem installed there, too\. Therefore, gems installed without a \fB\-\-path \.\.\.\fR setting will show up by calling \fBgem list\fR\. Accordingly, gems installed to other locations will not get listed\.
79
92
  .
@@ -205,6 +218,9 @@ The following is a list of all configuration keys and their purpose\. You can le
205
218
  \fBglobal_gem_cache\fR (\fBBUNDLE_GLOBAL_GEM_CACHE\fR): Whether Bundler should cache all gems globally, rather than locally to the installing Ruby installation\.
206
219
  .
207
220
  .IP "\(bu" 4
221
+ \fBignore_funding_requests\fR (\fBBUNDLE_IGNORE_FUNDING_REQUESTS\fR): When set, no funding requests will be printed\.
222
+ .
223
+ .IP "\(bu" 4
208
224
  \fBignore_messages\fR (\fBBUNDLE_IGNORE_MESSAGES\fR): When set, no post install messages will be printed\. To silence a single gem, use dot notation like \fBignore_messages\.httparty true\fR\.
209
225
  .
210
226
  .IP "\(bu" 4
@@ -220,6 +236,9 @@ The following is a list of all configuration keys and their purpose\. You can le
220
236
  \fBno_prune\fR (\fBBUNDLE_NO_PRUNE\fR): Whether Bundler should leave outdated gems unpruned when caching\.
221
237
  .
222
238
  .IP "\(bu" 4
239
+ \fBonly\fR (\fBBUNDLE_ONLY\fR): A space\-separated list of groups to install only gems of the specified groups\.
240
+ .
241
+ .IP "\(bu" 4
223
242
  \fBpath\fR (\fBBUNDLE_PATH\fR): The location on disk where all gems in your bundle will be located regardless of \fB$GEM_HOME\fR or \fB$GEM_PATH\fR values\. Bundle gems not found in this location will be installed by \fBbundle install\fR\. Defaults to \fBGem\.dir\fR\. When \-\-deployment is used, defaults to vendor/bundle\.
224
243
  .
225
244
  .IP "\(bu" 4
@@ -265,9 +284,6 @@ The following is a list of all configuration keys and their purpose\. You can le
265
284
  \fBssl_verify_mode\fR (\fBBUNDLE_SSL_VERIFY_MODE\fR): The SSL verification mode Bundler uses when making HTTPS requests\. Defaults to verify peer\.
266
285
  .
267
286
  .IP "\(bu" 4
268
- \fBsuppress_install_using_messages\fR (\fBBUNDLE_SUPPRESS_INSTALL_USING_MESSAGES\fR): Avoid printing \fBUsing \.\.\.\fR messages during installation when the version of a gem has not changed\.
269
- .
270
- .IP "\(bu" 4
271
287
  \fBsystem_bindir\fR (\fBBUNDLE_SYSTEM_BINDIR\fR): The location where RubyGems installs binstubs\. Defaults to \fBGem\.bindir\fR\.
272
288
  .
273
289
  .IP "\(bu" 4
@@ -288,7 +304,7 @@ The following is a list of all configuration keys and their purpose\. You can le
288
304
  .IP "" 0
289
305
  .
290
306
  .P
291
- In general, you should set these settings per\-application by using the applicable flag to the bundle install(1) \fIbundle\-install\.1\.html\fR or bundle package(1) \fIbundle\-package\.1\.html\fR command\.
307
+ In general, you should set these settings per\-application by using the applicable flag to the bundle install(1) \fIbundle\-install\.1\.html\fR or bundle cache(1) \fIbundle\-cache\.1\.html\fR command\.
292
308
  .
293
309
  .P
294
310
  You can set them globally either via environment variables or \fBbundle config\fR, whichever is preferable for your setup\. If you use both, environment variables will take preference over global settings\.
@@ -342,13 +358,13 @@ bundle config set \-\-global mirror\.SOURCE_URL MIRROR_URL
342
358
  .IP "" 0
343
359
  .
344
360
  .P
345
- For example, to use a mirror of rubygems\.org hosted at rubygems\-mirror\.org:
361
+ For example, to use a mirror of https://rubygems\.org hosted at https://example\.org:
346
362
  .
347
363
  .IP "" 4
348
364
  .
349
365
  .nf
350
366
 
351
- bundle config set \-\-global mirror\.http://rubygems\.org http://rubygems\-mirror\.org
367
+ bundle config set \-\-global mirror\.https://rubygems\.org https://example\.org
352
368
  .
353
369
  .fi
354
370
  .
@@ -3,7 +3,10 @@ bundle-config(1) -- Set bundler configuration options
3
3
 
4
4
  ## SYNOPSIS
5
5
 
6
- `bundle config` [list|get|set|unset] [<name> [<value>]]
6
+ `bundle config` list<br>
7
+ `bundle config` [get] NAME<br>
8
+ `bundle config` [set] NAME VALUE<br>
9
+ `bundle config` unset NAME
7
10
 
8
11
  ## DESCRIPTION
9
12
 
@@ -16,7 +19,7 @@ Bundler loads configuration settings in this order:
16
19
  3. Global config (`~/.bundle/config`)
17
20
  4. Bundler default config
18
21
 
19
- Executing `bundle config list` with will print a list of all bundler
22
+ Executing `bundle config list` will print a list of all bundler
20
23
  configuration for the current bundle, and where that configuration
21
24
  was set.
22
25
 
@@ -43,8 +46,8 @@ local and global sources.
43
46
  Executing `bundle config unset --global <name>` will delete the configuration
44
47
  only from the user configuration.
45
48
 
46
- Executing `bundle config unset --local <name> <value>` will delete the
47
- configuration only from the local application.
49
+ Executing `bundle config unset --local <name>` will delete the configuration
50
+ only from the local application.
48
51
 
49
52
  Executing bundle with the `BUNDLE_IGNORE_CONFIG` environment variable set will
50
53
  cause it to ignore all configuration.
@@ -74,6 +77,9 @@ The options that can be configured are:
74
77
  `production` use. Please check carefully if you want to have this option
75
78
  enabled in `development` or `test` environments.
76
79
 
80
+ * `only`:
81
+ A space-separated list of groups to install only gems of the specified groups.
82
+
77
83
  * `path`:
78
84
  The location to install the specified gems to. This defaults to Rubygems'
79
85
  setting. Bundler shares this location with Rubygems, `gem install ...` will
@@ -204,6 +210,8 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
204
210
  * `global_gem_cache` (`BUNDLE_GLOBAL_GEM_CACHE`):
205
211
  Whether Bundler should cache all gems globally, rather than locally to the
206
212
  installing Ruby installation.
213
+ * `ignore_funding_requests` (`BUNDLE_IGNORE_FUNDING_REQUESTS`):
214
+ When set, no funding requests will be printed.
207
215
  * `ignore_messages` (`BUNDLE_IGNORE_MESSAGES`):
208
216
  When set, no post install messages will be printed. To silence a single gem,
209
217
  use dot notation like `ignore_messages.httparty true`.
@@ -216,6 +224,8 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
216
224
  Whether `bundle package` should skip installing gems.
217
225
  * `no_prune` (`BUNDLE_NO_PRUNE`):
218
226
  Whether Bundler should leave outdated gems unpruned when caching.
227
+ * `only` (`BUNDLE_ONLY`):
228
+ A space-separated list of groups to install only gems of the specified groups.
219
229
  * `path` (`BUNDLE_PATH`):
220
230
  The location on disk where all gems in your bundle will be located regardless
221
231
  of `$GEM_HOME` or `$GEM_PATH` values. Bundle gems not found in this location
@@ -255,9 +265,6 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
255
265
  * `ssl_verify_mode` (`BUNDLE_SSL_VERIFY_MODE`):
256
266
  The SSL verification mode Bundler uses when making HTTPS requests.
257
267
  Defaults to verify peer.
258
- * `suppress_install_using_messages` (`BUNDLE_SUPPRESS_INSTALL_USING_MESSAGES`):
259
- Avoid printing `Using ...` messages during installation when the version of
260
- a gem has not changed.
261
268
  * `system_bindir` (`BUNDLE_SYSTEM_BINDIR`):
262
269
  The location where RubyGems installs binstubs. Defaults to `Gem.bindir`.
263
270
  * `timeout` (`BUNDLE_TIMEOUT`):
@@ -273,7 +280,7 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
273
280
  A `:`-separated list of groups whose gems bundler should not install.
274
281
 
275
282
  In general, you should set these settings per-application by using the applicable
276
- flag to the [bundle install(1)](bundle-install.1.html) or [bundle package(1)](bundle-package.1.html) command.
283
+ flag to the [bundle install(1)](bundle-install.1.html) or [bundle cache(1)](bundle-cache.1.html) command.
277
284
 
278
285
  You can set them globally either via environment variables or `bundle config`,
279
286
  whichever is preferable for your setup. If you use both, environment variables
@@ -321,9 +328,9 @@ mirror to fetch gems.
321
328
 
322
329
  bundle config set --global mirror.SOURCE_URL MIRROR_URL
323
330
 
324
- For example, to use a mirror of rubygems.org hosted at rubygems-mirror.org:
331
+ For example, to use a mirror of https://rubygems.org hosted at https://example.org:
325
332
 
326
- bundle config set --global mirror.http://rubygems.org http://rubygems-mirror.org
333
+ bundle config set --global mirror.https://rubygems.org https://example.org
327
334
 
328
335
  Each mirror also provides a fallback timeout setting. If the mirror does not
329
336
  respond within the fallback timeout, Bundler will try to use the original