rubygems-update 3.0.3 → 3.4.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (806) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5633 -0
  3. data/CODE_OF_CONDUCT.md +62 -24
  4. data/CONTRIBUTING.md +111 -21
  5. data/MAINTAINERS.txt +1 -6
  6. data/Manifest.txt +216 -101
  7. data/POLICIES.md +70 -27
  8. data/README.md +40 -19
  9. data/UPGRADING.md +5 -81
  10. data/bin/gem +2 -16
  11. data/bin/update_rubygems +5 -5
  12. data/bundler/CHANGELOG.md +2698 -1256
  13. data/bundler/LICENSE.md +18 -19
  14. data/bundler/README.md +10 -14
  15. data/bundler/UPGRADING.md +222 -0
  16. data/bundler/bundler.gemspec +13 -33
  17. data/bundler/exe/bundle +26 -11
  18. data/bundler/exe/bundler +1 -1
  19. data/bundler/lib/bundler/.document +1 -0
  20. data/bundler/lib/bundler/build_metadata.rb +5 -13
  21. data/bundler/lib/bundler/capistrano.rb +4 -4
  22. data/bundler/lib/bundler/cli/add.rb +28 -16
  23. data/bundler/lib/bundler/cli/binstubs.rb +11 -3
  24. data/bundler/lib/bundler/cli/cache.rb +24 -17
  25. data/bundler/lib/bundler/cli/check.rb +5 -3
  26. data/bundler/lib/bundler/cli/clean.rb +1 -1
  27. data/bundler/lib/bundler/cli/common.rb +41 -13
  28. data/bundler/lib/bundler/cli/config.rb +170 -86
  29. data/bundler/lib/bundler/cli/console.rb +3 -3
  30. data/bundler/lib/bundler/cli/doctor.rb +27 -10
  31. data/bundler/lib/bundler/cli/exec.rb +8 -25
  32. data/bundler/lib/bundler/cli/fund.rb +36 -0
  33. data/bundler/lib/bundler/cli/gem.rb +261 -48
  34. data/bundler/lib/bundler/cli/info.rb +52 -8
  35. data/bundler/lib/bundler/cli/init.rb +7 -3
  36. data/bundler/lib/bundler/cli/inject.rb +1 -1
  37. data/bundler/lib/bundler/cli/install.rb +38 -66
  38. data/bundler/lib/bundler/cli/issue.rb +8 -7
  39. data/bundler/lib/bundler/cli/list.rb +19 -11
  40. data/bundler/lib/bundler/cli/lock.rb +11 -4
  41. data/bundler/lib/bundler/cli/open.rb +14 -9
  42. data/bundler/lib/bundler/cli/outdated.rb +152 -121
  43. data/bundler/lib/bundler/cli/platform.rb +2 -2
  44. data/bundler/lib/bundler/cli/plugin.rb +19 -2
  45. data/bundler/lib/bundler/cli/pristine.rb +6 -1
  46. data/bundler/lib/bundler/cli/remove.rb +1 -2
  47. data/bundler/lib/bundler/cli/show.rb +3 -3
  48. data/bundler/lib/bundler/cli/update.rb +49 -18
  49. data/bundler/lib/bundler/cli/viz.rb +1 -1
  50. data/bundler/lib/bundler/cli.rb +269 -165
  51. data/bundler/lib/bundler/compact_index_client/cache.rb +7 -24
  52. data/bundler/lib/bundler/compact_index_client/gem_parser.rb +28 -0
  53. data/bundler/lib/bundler/compact_index_client/updater.rb +58 -57
  54. data/bundler/lib/bundler/compact_index_client.rb +28 -18
  55. data/bundler/lib/bundler/constants.rb +1 -1
  56. data/bundler/lib/bundler/current_ruby.rb +26 -11
  57. data/bundler/lib/bundler/definition.rb +371 -441
  58. data/bundler/lib/bundler/dependency.rb +29 -71
  59. data/bundler/lib/bundler/deployment.rb +1 -1
  60. data/bundler/lib/bundler/digest.rb +71 -0
  61. data/bundler/lib/bundler/dsl.rb +84 -116
  62. data/bundler/lib/bundler/endpoint_specification.rb +16 -14
  63. data/bundler/lib/bundler/env.rb +10 -15
  64. data/bundler/lib/bundler/environment_preserver.rb +32 -5
  65. data/bundler/lib/bundler/errors.rb +31 -14
  66. data/bundler/lib/bundler/feature_flag.rb +13 -33
  67. data/bundler/lib/bundler/fetcher/base.rb +7 -9
  68. data/bundler/lib/bundler/fetcher/compact_index.rb +46 -39
  69. data/bundler/lib/bundler/fetcher/dependency.rb +3 -7
  70. data/bundler/lib/bundler/fetcher/downloader.rb +15 -12
  71. data/bundler/lib/bundler/fetcher/index.rb +4 -30
  72. data/bundler/lib/bundler/fetcher.rb +40 -42
  73. data/bundler/lib/bundler/force_platform.rb +18 -0
  74. data/bundler/lib/bundler/friendly_errors.rb +49 -54
  75. data/bundler/lib/bundler/gem_helper.rb +79 -43
  76. data/bundler/lib/bundler/gem_helpers.rb +44 -28
  77. data/bundler/lib/bundler/gem_tasks.rb +1 -1
  78. data/bundler/lib/bundler/gem_version_promoter.rb +54 -99
  79. data/bundler/lib/bundler/graph.rb +5 -5
  80. data/bundler/lib/bundler/index.rb +16 -54
  81. data/bundler/lib/bundler/injector.rb +51 -17
  82. data/bundler/lib/bundler/inline.rb +28 -29
  83. data/bundler/lib/bundler/installer/gem_installer.rb +22 -23
  84. data/bundler/lib/bundler/installer/parallel_installer.rb +38 -51
  85. data/bundler/lib/bundler/installer/standalone.rb +62 -12
  86. data/bundler/lib/bundler/installer.rb +46 -97
  87. data/bundler/lib/bundler/lazy_specification.rb +88 -52
  88. data/bundler/lib/bundler/lockfile_generator.rb +4 -4
  89. data/bundler/lib/bundler/lockfile_parser.rb +40 -72
  90. data/bundler/{man → lib/bundler/man}/bundle-add.1 +29 -5
  91. data/bundler/{man/bundle-add.ronn → lib/bundler/man/bundle-add.1.ronn} +22 -4
  92. data/bundler/{man → lib/bundler/man}/bundle-binstubs.1 +6 -4
  93. data/bundler/{man/bundle-binstubs.ronn → lib/bundler/man/bundle-binstubs.1.ronn} +3 -5
  94. data/bundler/lib/bundler/man/bundle-cache.1 +61 -0
  95. data/bundler/{man/bundle-package.ronn → lib/bundler/man/bundle-cache.1.ronn} +22 -15
  96. data/bundler/{man → lib/bundler/man}/bundle-check.1 +1 -1
  97. data/bundler/{man → lib/bundler/man}/bundle-clean.1 +2 -2
  98. data/bundler/{man/bundle-clean.ronn → lib/bundler/man/bundle-clean.1.ronn} +1 -1
  99. data/bundler/{man → lib/bundler/man}/bundle-config.1 +78 -60
  100. data/bundler/{man/bundle-config.ronn → lib/bundler/man/bundle-config.1.ronn} +96 -85
  101. data/bundler/lib/bundler/man/bundle-console.1 +53 -0
  102. data/bundler/lib/bundler/man/bundle-console.1.ronn +44 -0
  103. data/bundler/{man → lib/bundler/man}/bundle-doctor.1 +1 -1
  104. data/bundler/{man → lib/bundler/man}/bundle-exec.1 +6 -6
  105. data/bundler/{man/bundle-exec.ronn → lib/bundler/man/bundle-exec.1.ronn} +6 -6
  106. data/bundler/lib/bundler/man/bundle-gem.1 +105 -0
  107. data/bundler/lib/bundler/man/bundle-gem.1.ronn +117 -0
  108. data/bundler/lib/bundler/man/bundle-help.1 +13 -0
  109. data/bundler/lib/bundler/man/bundle-help.1.ronn +12 -0
  110. data/bundler/{man → lib/bundler/man}/bundle-info.1 +1 -1
  111. data/bundler/{man → lib/bundler/man}/bundle-init.1 +6 -2
  112. data/bundler/{man/bundle-init.ronn → lib/bundler/man/bundle-init.1.ronn} +3 -1
  113. data/bundler/{man → lib/bundler/man}/bundle-inject.1 +5 -2
  114. data/bundler/{man/bundle-inject.ronn → lib/bundler/man/bundle-inject.1.ronn} +3 -1
  115. data/bundler/{man → lib/bundler/man}/bundle-install.1 +42 -37
  116. data/bundler/{man/bundle-install.ronn → lib/bundler/man/bundle-install.1.ronn} +42 -38
  117. data/bundler/{man → lib/bundler/man}/bundle-list.1 +7 -7
  118. data/bundler/{man/bundle-list.ronn → lib/bundler/man/bundle-list.1.ronn} +6 -6
  119. data/bundler/{man → lib/bundler/man}/bundle-lock.1 +1 -1
  120. data/bundler/{man → lib/bundler/man}/bundle-open.1 +22 -2
  121. data/bundler/{man/bundle-open.ronn → lib/bundler/man/bundle-open.1.ronn} +9 -1
  122. data/bundler/{man → lib/bundler/man}/bundle-outdated.1 +3 -10
  123. data/bundler/{man/bundle-outdated.ronn → lib/bundler/man/bundle-outdated.1.ronn} +1 -10
  124. data/bundler/{man → lib/bundler/man}/bundle-platform.1 +16 -6
  125. data/bundler/{man/bundle-platform.ronn → lib/bundler/man/bundle-platform.1.ronn} +14 -7
  126. data/bundler/lib/bundler/man/bundle-plugin.1 +81 -0
  127. data/bundler/lib/bundler/man/bundle-plugin.1.ronn +59 -0
  128. data/bundler/{man → lib/bundler/man}/bundle-pristine.1 +1 -1
  129. data/bundler/{man → lib/bundler/man}/bundle-remove.1 +1 -1
  130. data/bundler/{man → lib/bundler/man}/bundle-show.1 +1 -1
  131. data/bundler/{man → lib/bundler/man}/bundle-update.1 +8 -8
  132. data/bundler/{man/bundle-update.ronn → lib/bundler/man/bundle-update.1.ronn} +8 -7
  133. data/bundler/lib/bundler/man/bundle-version.1 +35 -0
  134. data/bundler/lib/bundler/man/bundle-version.1.ronn +24 -0
  135. data/bundler/{man → lib/bundler/man}/bundle-viz.1 +4 -1
  136. data/bundler/{man/bundle-viz.ronn → lib/bundler/man/bundle-viz.1.ronn} +2 -0
  137. data/bundler/{man → lib/bundler/man}/bundle.1 +17 -12
  138. data/bundler/{man/bundle.ronn → lib/bundler/man/bundle.1.ronn} +14 -9
  139. data/bundler/lib/bundler/man/gemfile.5 +723 -0
  140. data/bundler/{man → lib/bundler/man}/gemfile.5.ronn +112 -95
  141. data/bundler/lib/bundler/man/index.txt +29 -0
  142. data/bundler/lib/bundler/match_metadata.rb +13 -0
  143. data/bundler/lib/bundler/match_platform.rb +1 -2
  144. data/bundler/lib/bundler/match_remote_metadata.rb +29 -0
  145. data/bundler/lib/bundler/mirror.rb +10 -12
  146. data/bundler/lib/bundler/plugin/api/source.rb +29 -15
  147. data/bundler/lib/bundler/plugin/api.rb +1 -1
  148. data/bundler/lib/bundler/plugin/dsl.rb +1 -1
  149. data/bundler/lib/bundler/plugin/index.rb +31 -8
  150. data/bundler/lib/bundler/plugin/installer/git.rb +0 -4
  151. data/bundler/lib/bundler/plugin/installer/rubygems.rb +1 -9
  152. data/bundler/lib/bundler/plugin/installer.rb +40 -24
  153. data/bundler/lib/bundler/plugin/source_list.rb +5 -1
  154. data/bundler/lib/bundler/plugin.rb +103 -43
  155. data/bundler/lib/bundler/process_lock.rb +1 -1
  156. data/bundler/lib/bundler/remote_specification.rb +12 -9
  157. data/bundler/lib/bundler/resolver/base.rb +107 -0
  158. data/bundler/lib/bundler/resolver/candidate.rb +94 -0
  159. data/bundler/lib/bundler/resolver/incompatibility.rb +15 -0
  160. data/bundler/lib/bundler/resolver/package.rb +72 -0
  161. data/bundler/lib/bundler/resolver/root.rb +25 -0
  162. data/bundler/lib/bundler/resolver/spec_group.rb +49 -73
  163. data/bundler/lib/bundler/resolver.rb +341 -301
  164. data/bundler/lib/bundler/retry.rb +4 -4
  165. data/bundler/lib/bundler/ruby_dsl.rb +1 -1
  166. data/bundler/lib/bundler/ruby_version.rb +10 -38
  167. data/bundler/lib/bundler/rubygems_ext.rb +237 -92
  168. data/bundler/lib/bundler/rubygems_gem_installer.rb +87 -21
  169. data/bundler/lib/bundler/rubygems_integration.rb +179 -515
  170. data/bundler/lib/bundler/runtime.rb +25 -40
  171. data/bundler/lib/bundler/self_manager.rb +168 -0
  172. data/bundler/lib/bundler/settings.rb +163 -119
  173. data/bundler/lib/bundler/setup.rb +14 -12
  174. data/bundler/lib/bundler/shared_helpers.rb +62 -103
  175. data/bundler/lib/bundler/similarity_detector.rb +3 -3
  176. data/bundler/lib/bundler/source/git/git_proxy.rb +274 -128
  177. data/bundler/lib/bundler/source/git.rb +86 -62
  178. data/bundler/lib/bundler/source/metadata.rb +9 -9
  179. data/bundler/lib/bundler/source/path/installer.rb +11 -32
  180. data/bundler/lib/bundler/source/path.rb +29 -18
  181. data/bundler/lib/bundler/source/rubygems/remote.rb +3 -4
  182. data/bundler/lib/bundler/source/rubygems.rb +176 -206
  183. data/bundler/lib/bundler/source/rubygems_aggregate.rb +68 -0
  184. data/bundler/lib/bundler/source.rb +30 -10
  185. data/bundler/lib/bundler/source_list.rb +112 -67
  186. data/bundler/lib/bundler/source_map.rb +71 -0
  187. data/bundler/lib/bundler/spec_set.rb +96 -72
  188. data/bundler/lib/bundler/stub_specification.rb +45 -37
  189. data/bundler/lib/bundler/templates/Executable +3 -5
  190. data/bundler/lib/bundler/templates/Executable.bundler +22 -18
  191. data/bundler/lib/bundler/templates/Executable.standalone +4 -4
  192. data/bundler/lib/bundler/templates/Gemfile +0 -2
  193. data/bundler/lib/bundler/templates/newgem/CHANGELOG.md.tt +5 -0
  194. data/bundler/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +57 -47
  195. data/bundler/lib/bundler/templates/newgem/Cargo.toml.tt +7 -0
  196. data/bundler/lib/bundler/templates/newgem/Gemfile.tt +22 -2
  197. data/bundler/lib/bundler/templates/newgem/README.md.tt +13 -15
  198. data/bundler/lib/bundler/templates/newgem/Rakefile.tt +43 -5
  199. data/bundler/lib/bundler/templates/newgem/bin/console.tt +1 -4
  200. data/bundler/lib/bundler/templates/newgem/circleci/config.yml.tt +25 -0
  201. data/bundler/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +15 -0
  202. data/bundler/lib/bundler/templates/newgem/ext/newgem/extconf-c.rb.tt +10 -0
  203. data/bundler/lib/bundler/templates/newgem/ext/newgem/extconf-rust.rb.tt +6 -0
  204. data/bundler/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt +1 -1
  205. data/bundler/lib/bundler/templates/newgem/ext/newgem/src/lib.rs.tt +12 -0
  206. data/bundler/lib/bundler/templates/newgem/github/workflows/main.yml.tt +37 -0
  207. data/bundler/lib/bundler/templates/newgem/gitignore.tt +3 -0
  208. data/bundler/lib/bundler/templates/newgem/gitlab-ci.yml.tt +18 -0
  209. data/bundler/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +2 -0
  210. data/bundler/lib/bundler/templates/newgem/lib/newgem.rb.tt +4 -2
  211. data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +36 -41
  212. data/bundler/lib/bundler/templates/newgem/rubocop.yml.tt +13 -0
  213. data/bundler/lib/bundler/templates/newgem/sig/newgem.rbs.tt +8 -0
  214. data/bundler/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +2 -0
  215. data/bundler/lib/bundler/templates/newgem/spec/spec_helper.rb.tt +2 -1
  216. data/bundler/lib/bundler/templates/newgem/standard.yml.tt +3 -0
  217. data/bundler/lib/bundler/templates/newgem/test/minitest/test_helper.rb.tt +6 -0
  218. data/bundler/lib/bundler/templates/newgem/test/{newgem_test.rb.tt → minitest/test_newgem.rb.tt} +3 -1
  219. data/bundler/lib/bundler/templates/newgem/test/test-unit/newgem_test.rb.tt +15 -0
  220. data/bundler/lib/bundler/templates/newgem/test/test-unit/test_helper.rb.tt +6 -0
  221. data/bundler/lib/bundler/ui/rg_proxy.rb +1 -1
  222. data/bundler/lib/bundler/ui/shell.rb +39 -20
  223. data/bundler/lib/bundler/ui/silent.rb +21 -5
  224. data/bundler/lib/bundler/ui.rb +3 -3
  225. data/bundler/lib/bundler/uri_credentials_filter.rb +10 -4
  226. data/bundler/lib/bundler/uri_normalizer.rb +23 -0
  227. data/bundler/lib/bundler/vendor/.document +1 -0
  228. data/bundler/lib/bundler/vendor/connection_pool/LICENSE +20 -0
  229. data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +174 -0
  230. data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +3 -0
  231. data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb +56 -0
  232. data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +128 -0
  233. data/bundler/lib/bundler/vendor/fileutils/LICENSE.txt +22 -0
  234. data/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb +1493 -425
  235. data/bundler/lib/bundler/vendor/net-http-persistent/README.rdoc +82 -0
  236. data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb +40 -0
  237. data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb +53 -0
  238. data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb +79 -0
  239. data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +302 -462
  240. data/bundler/lib/bundler/vendor/pub_grub/LICENSE.txt +21 -0
  241. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb +20 -0
  242. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb +189 -0
  243. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb +182 -0
  244. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb +150 -0
  245. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb +43 -0
  246. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/partial_solution.rb +121 -0
  247. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb +45 -0
  248. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb +19 -0
  249. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb +60 -0
  250. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/term.rb +105 -0
  251. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version.rb +3 -0
  252. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb +129 -0
  253. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb +411 -0
  254. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +243 -0
  255. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb +178 -0
  256. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub.rb +31 -0
  257. data/bundler/lib/bundler/vendor/thor/LICENSE.md +20 -0
  258. data/bundler/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb +1 -1
  259. data/bundler/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb +3 -2
  260. data/bundler/lib/bundler/vendor/thor/lib/thor/actions/directory.rb +7 -17
  261. data/bundler/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +25 -14
  262. data/bundler/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +20 -10
  263. data/bundler/lib/bundler/vendor/thor/lib/thor/actions.rb +34 -15
  264. data/bundler/lib/bundler/vendor/thor/lib/thor/base.rb +63 -43
  265. data/bundler/lib/bundler/vendor/thor/lib/thor/command.rb +21 -14
  266. data/bundler/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +6 -0
  267. data/bundler/lib/bundler/vendor/thor/lib/thor/error.rb +83 -0
  268. data/bundler/lib/bundler/vendor/thor/lib/thor/group.rb +3 -3
  269. data/bundler/lib/bundler/vendor/thor/lib/thor/invocation.rb +1 -0
  270. data/bundler/lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb +1 -1
  271. data/bundler/lib/bundler/vendor/thor/lib/thor/line_editor/readline.rb +6 -6
  272. data/bundler/lib/bundler/vendor/thor/lib/thor/line_editor.rb +2 -2
  273. data/bundler/lib/bundler/vendor/thor/lib/thor/nested_context.rb +29 -0
  274. data/bundler/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +7 -3
  275. data/bundler/lib/bundler/vendor/thor/lib/thor/parser/option.rb +20 -7
  276. data/bundler/lib/bundler/vendor/thor/lib/thor/parser/options.rb +40 -6
  277. data/bundler/lib/bundler/vendor/thor/lib/thor/parser.rb +4 -4
  278. data/bundler/lib/bundler/vendor/thor/lib/thor/rake_compat.rb +1 -0
  279. data/bundler/lib/bundler/vendor/thor/lib/thor/runner.rb +15 -14
  280. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +88 -13
  281. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/color.rb +10 -2
  282. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/html.rb +3 -3
  283. data/bundler/lib/bundler/vendor/thor/lib/thor/shell.rb +5 -5
  284. data/bundler/lib/bundler/vendor/thor/lib/thor/util.rb +18 -2
  285. data/bundler/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
  286. data/bundler/lib/bundler/vendor/thor/lib/thor.rb +16 -9
  287. data/bundler/lib/bundler/vendor/tsort/LICENSE.txt +22 -0
  288. data/bundler/lib/bundler/vendor/tsort/lib/tsort.rb +452 -0
  289. data/bundler/lib/bundler/vendor/uri/LICENSE.txt +22 -0
  290. data/bundler/lib/bundler/vendor/uri/lib/uri/common.rb +729 -0
  291. data/bundler/lib/bundler/vendor/uri/lib/uri/file.rb +100 -0
  292. data/bundler/lib/bundler/vendor/uri/lib/uri/ftp.rb +267 -0
  293. data/bundler/lib/bundler/vendor/uri/lib/uri/generic.rb +1587 -0
  294. data/bundler/lib/bundler/vendor/uri/lib/uri/http.rb +125 -0
  295. data/bundler/lib/bundler/vendor/uri/lib/uri/https.rb +23 -0
  296. data/bundler/lib/bundler/vendor/uri/lib/uri/ldap.rb +261 -0
  297. data/bundler/lib/bundler/vendor/uri/lib/uri/ldaps.rb +22 -0
  298. data/bundler/lib/bundler/vendor/uri/lib/uri/mailto.rb +293 -0
  299. data/bundler/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +539 -0
  300. data/bundler/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +119 -0
  301. data/bundler/lib/bundler/vendor/uri/lib/uri/version.rb +6 -0
  302. data/bundler/lib/bundler/vendor/uri/lib/uri/ws.rb +83 -0
  303. data/bundler/lib/bundler/vendor/uri/lib/uri/wss.rb +23 -0
  304. data/bundler/lib/bundler/vendor/uri/lib/uri.rb +104 -0
  305. data/bundler/lib/bundler/vendored_fileutils.rb +1 -6
  306. data/bundler/lib/bundler/vendored_persistent.rb +2 -39
  307. data/bundler/lib/bundler/{vendored_molinillo.rb → vendored_pub_grub.rb} +1 -1
  308. data/bundler/lib/bundler/vendored_thor.rb +2 -2
  309. data/bundler/lib/bundler/vendored_tsort.rb +4 -0
  310. data/bundler/lib/bundler/vendored_uri.rb +4 -0
  311. data/bundler/lib/bundler/version.rb +5 -20
  312. data/bundler/lib/bundler/vlad.rb +2 -2
  313. data/bundler/lib/bundler/worker.rb +26 -15
  314. data/bundler/lib/bundler/yaml_serializer.rb +3 -4
  315. data/bundler/lib/bundler.rb +290 -187
  316. data/hide_lib_for_update/note.txt +0 -4
  317. data/lib/rubygems/available_set.rb +7 -8
  318. data/lib/rubygems/basic_specification.rb +44 -31
  319. data/lib/rubygems/bundler_version_finder.rb +29 -51
  320. data/lib/rubygems/command.rb +114 -52
  321. data/lib/rubygems/command_manager.rb +38 -18
  322. data/lib/rubygems/commands/build_command.rb +77 -26
  323. data/lib/rubygems/commands/cert_command.rb +78 -76
  324. data/lib/rubygems/commands/check_command.rb +20 -22
  325. data/lib/rubygems/commands/cleanup_command.rb +36 -32
  326. data/lib/rubygems/commands/contents_command.rb +16 -18
  327. data/lib/rubygems/commands/dependency_command.rb +39 -50
  328. data/lib/rubygems/commands/environment_command.rb +11 -13
  329. data/lib/rubygems/commands/exec_command.rb +248 -0
  330. data/lib/rubygems/commands/fetch_command.rb +33 -16
  331. data/lib/rubygems/commands/generate_index_command.rb +18 -17
  332. data/lib/rubygems/commands/help_command.rb +10 -10
  333. data/lib/rubygems/commands/info_command.rb +11 -6
  334. data/lib/rubygems/commands/install_command.rb +45 -79
  335. data/lib/rubygems/commands/list_command.rb +9 -8
  336. data/lib/rubygems/commands/lock_command.rb +7 -9
  337. data/lib/rubygems/commands/mirror_command.rb +3 -4
  338. data/lib/rubygems/commands/open_command.rb +11 -14
  339. data/lib/rubygems/commands/outdated_command.rb +5 -6
  340. data/lib/rubygems/commands/owner_command.rb +33 -24
  341. data/lib/rubygems/commands/pristine_command.rb +70 -51
  342. data/lib/rubygems/commands/push_command.rb +26 -63
  343. data/lib/rubygems/commands/query_command.rb +21 -337
  344. data/lib/rubygems/commands/rdoc_command.rb +26 -26
  345. data/lib/rubygems/commands/search_command.rb +8 -8
  346. data/lib/rubygems/commands/server_command.rb +16 -77
  347. data/lib/rubygems/commands/setup_command.rb +282 -241
  348. data/lib/rubygems/commands/signin_command.rb +9 -10
  349. data/lib/rubygems/commands/signout_command.rb +7 -9
  350. data/lib/rubygems/commands/sources_command.rb +42 -26
  351. data/lib/rubygems/commands/specification_command.rb +25 -20
  352. data/lib/rubygems/commands/stale_command.rb +3 -3
  353. data/lib/rubygems/commands/uninstall_command.rb +61 -49
  354. data/lib/rubygems/commands/unpack_command.rb +15 -44
  355. data/lib/rubygems/commands/update_command.rb +133 -81
  356. data/lib/rubygems/commands/which_command.rb +8 -11
  357. data/lib/rubygems/commands/yank_command.rb +22 -19
  358. data/lib/rubygems/compatibility.rb +7 -5
  359. data/lib/rubygems/config_file.rb +101 -47
  360. data/lib/rubygems/core_ext/kernel_gem.rb +8 -12
  361. data/lib/rubygems/core_ext/kernel_require.rb +115 -84
  362. data/lib/rubygems/core_ext/kernel_warn.rb +35 -30
  363. data/lib/rubygems/core_ext/tcpsocket_init.rb +52 -0
  364. data/lib/rubygems/defaults.rb +132 -56
  365. data/lib/rubygems/dependency.rb +44 -27
  366. data/lib/rubygems/dependency_installer.rb +49 -205
  367. data/lib/rubygems/dependency_list.rb +24 -25
  368. data/lib/rubygems/deprecate.rb +106 -12
  369. data/lib/rubygems/doctor.rb +22 -22
  370. data/lib/rubygems/errors.rb +8 -14
  371. data/lib/rubygems/exceptions.rb +45 -33
  372. data/lib/rubygems/ext/build_error.rb +2 -0
  373. data/lib/rubygems/ext/builder.rb +86 -93
  374. data/lib/rubygems/ext/cargo_builder/link_flag_converter.rb +27 -0
  375. data/lib/rubygems/ext/cargo_builder.rb +360 -0
  376. data/lib/rubygems/ext/cmake_builder.rb +6 -7
  377. data/lib/rubygems/ext/configure_builder.rb +5 -8
  378. data/lib/rubygems/ext/ext_conf_builder.rb +44 -65
  379. data/lib/rubygems/ext/rake_builder.rb +7 -10
  380. data/lib/rubygems/ext.rb +7 -6
  381. data/lib/rubygems/gem_runner.rb +15 -26
  382. data/lib/rubygems/gemcutter_utilities.rb +221 -54
  383. data/lib/rubygems/indexer.rb +38 -53
  384. data/lib/rubygems/install_default_message.rb +2 -2
  385. data/lib/rubygems/install_message.rb +2 -2
  386. data/lib/rubygems/install_update_options.rb +73 -64
  387. data/lib/rubygems/installer.rb +231 -174
  388. data/lib/rubygems/installer_uninstaller_utils.rb +29 -0
  389. data/lib/rubygems/local_remote_options.rb +22 -24
  390. data/lib/rubygems/mock_gem_ui.rb +2 -5
  391. data/lib/rubygems/name_tuple.rb +10 -14
  392. data/lib/rubygems/openssl.rb +7 -0
  393. data/lib/rubygems/optparse/.document +1 -0
  394. data/lib/rubygems/optparse/COPYING +56 -0
  395. data/lib/rubygems/optparse/lib/optionparser.rb +2 -0
  396. data/lib/rubygems/optparse/lib/optparse/ac.rb +54 -0
  397. data/lib/rubygems/optparse/lib/optparse/date.rb +18 -0
  398. data/lib/rubygems/optparse/lib/optparse/kwargs.rb +22 -0
  399. data/lib/rubygems/optparse/lib/optparse/shellwords.rb +7 -0
  400. data/lib/rubygems/optparse/lib/optparse/time.rb +11 -0
  401. data/lib/rubygems/optparse/lib/optparse/uri.rb +7 -0
  402. data/lib/rubygems/optparse/lib/optparse/version.rb +71 -0
  403. data/lib/rubygems/optparse/lib/optparse.rb +2308 -0
  404. data/lib/rubygems/optparse.rb +3 -0
  405. data/lib/rubygems/package/digest_io.rb +0 -2
  406. data/lib/rubygems/package/file_source.rb +2 -4
  407. data/lib/rubygems/package/io_source.rb +4 -2
  408. data/lib/rubygems/package/old.rb +9 -11
  409. data/lib/rubygems/package/tar_header.rb +73 -66
  410. data/lib/rubygems/package/tar_reader/entry.rb +89 -11
  411. data/lib/rubygems/package/tar_reader.rb +1 -26
  412. data/lib/rubygems/package/tar_writer.rb +12 -22
  413. data/lib/rubygems/package.rb +142 -125
  414. data/lib/rubygems/package_task.rb +5 -11
  415. data/lib/rubygems/path_support.rb +3 -8
  416. data/lib/rubygems/platform.rb +113 -73
  417. data/lib/rubygems/psych_tree.rb +1 -1
  418. data/lib/rubygems/query_utils.rb +351 -0
  419. data/lib/rubygems/rdoc.rb +4 -16
  420. data/lib/rubygems/remote_fetcher.rb +64 -136
  421. data/lib/rubygems/request/connection_pools.rb +7 -11
  422. data/lib/rubygems/request/http_pool.rb +2 -3
  423. data/lib/rubygems/request.rb +31 -32
  424. data/lib/rubygems/request_set/gem_dependency_api.rb +134 -136
  425. data/lib/rubygems/request_set/lockfile/parser.rb +28 -28
  426. data/lib/rubygems/request_set/lockfile/tokenizer.rb +5 -5
  427. data/lib/rubygems/request_set/lockfile.rb +21 -20
  428. data/lib/rubygems/request_set.rb +32 -45
  429. data/lib/rubygems/requirement.rb +43 -65
  430. data/lib/rubygems/resolver/activation_request.rb +29 -53
  431. data/lib/rubygems/resolver/api_set/gem_parser.rb +20 -0
  432. data/lib/rubygems/resolver/api_set.rb +33 -26
  433. data/lib/rubygems/resolver/api_specification.rb +30 -16
  434. data/lib/rubygems/resolver/best_set.rb +9 -11
  435. data/lib/rubygems/resolver/composed_set.rb +3 -5
  436. data/lib/rubygems/resolver/conflict.rb +12 -19
  437. data/lib/rubygems/resolver/current_set.rb +0 -2
  438. data/lib/rubygems/resolver/dependency_request.rb +3 -5
  439. data/lib/rubygems/resolver/git_set.rb +2 -4
  440. data/lib/rubygems/resolver/git_specification.rb +6 -8
  441. data/lib/rubygems/resolver/index_set.rb +4 -6
  442. data/lib/rubygems/resolver/index_specification.rb +38 -7
  443. data/lib/rubygems/resolver/installed_specification.rb +4 -6
  444. data/lib/rubygems/resolver/installer_set.rb +69 -27
  445. data/lib/rubygems/resolver/local_specification.rb +2 -4
  446. data/lib/rubygems/resolver/lock_set.rb +7 -9
  447. data/lib/rubygems/resolver/lock_specification.rb +6 -8
  448. data/lib/rubygems/resolver/molinillo/LICENSE +9 -0
  449. data/lib/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb +7 -0
  450. data/lib/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb +8 -0
  451. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/action.rb +1 -0
  452. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +2 -1
  453. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +2 -1
  454. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +2 -1
  455. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +2 -1
  456. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb +7 -6
  457. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/set_payload.rb +2 -1
  458. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/tag.rb +4 -3
  459. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb +51 -12
  460. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb +42 -9
  461. data/lib/rubygems/resolver/molinillo/lib/molinillo/errors.rb +82 -8
  462. data/lib/rubygems/resolver/molinillo/lib/molinillo/gem_metadata.rb +2 -1
  463. data/lib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb +13 -1
  464. data/lib/rubygems/resolver/molinillo/lib/molinillo/modules/ui.rb +3 -1
  465. data/lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb +510 -165
  466. data/lib/rubygems/resolver/molinillo/lib/molinillo/resolver.rb +3 -2
  467. data/lib/rubygems/resolver/molinillo/lib/molinillo/state.rb +8 -4
  468. data/lib/rubygems/resolver/molinillo/lib/molinillo.rb +6 -5
  469. data/lib/rubygems/resolver/molinillo.rb +1 -1
  470. data/lib/rubygems/resolver/requirement_list.rb +0 -1
  471. data/lib/rubygems/resolver/set.rb +0 -3
  472. data/lib/rubygems/resolver/source_set.rb +0 -2
  473. data/lib/rubygems/resolver/spec_specification.rb +14 -2
  474. data/lib/rubygems/resolver/specification.rb +14 -3
  475. data/lib/rubygems/resolver/stats.rb +1 -1
  476. data/lib/rubygems/resolver/vendor_set.rb +1 -3
  477. data/lib/rubygems/resolver/vendor_specification.rb +3 -5
  478. data/lib/rubygems/resolver.rb +58 -54
  479. data/lib/rubygems/s3_uri_signer.rb +175 -0
  480. data/lib/rubygems/safe_yaml.rb +14 -16
  481. data/lib/rubygems/security/policies.rb +47 -47
  482. data/lib/rubygems/security/policy.rb +25 -29
  483. data/lib/rubygems/security/signer.rb +16 -18
  484. data/lib/rubygems/security/trust_dir.rb +5 -6
  485. data/lib/rubygems/security.rb +90 -69
  486. data/lib/rubygems/security_option.rb +7 -8
  487. data/lib/rubygems/source/git.rb +31 -31
  488. data/lib/rubygems/source/installed.rb +1 -3
  489. data/lib/rubygems/source/local.rb +4 -6
  490. data/lib/rubygems/source/lock.rb +0 -2
  491. data/lib/rubygems/source/specific_file.rb +1 -3
  492. data/lib/rubygems/source/vendor.rb +0 -2
  493. data/lib/rubygems/source.rb +50 -38
  494. data/lib/rubygems/source_list.rb +9 -13
  495. data/lib/rubygems/spec_fetcher.rb +52 -64
  496. data/lib/rubygems/specification.rb +444 -465
  497. data/lib/rubygems/specification_policy.rb +185 -87
  498. data/lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA_R3.pem +21 -0
  499. data/lib/rubygems/stub_specification.rb +28 -32
  500. data/lib/rubygems/text.rb +22 -22
  501. data/lib/rubygems/tsort/.document +1 -0
  502. data/lib/rubygems/tsort/LICENSE.txt +22 -0
  503. data/lib/rubygems/tsort/lib/tsort.rb +452 -0
  504. data/lib/rubygems/tsort.rb +3 -0
  505. data/lib/rubygems/uninstaller.rb +110 -57
  506. data/lib/rubygems/unknown_command_spell_checker.rb +21 -0
  507. data/lib/rubygems/update_suggestion.rb +69 -0
  508. data/lib/rubygems/uri.rb +126 -0
  509. data/lib/rubygems/uri_formatter.rb +2 -4
  510. data/lib/rubygems/user_interaction.rb +46 -49
  511. data/lib/rubygems/util/licenses.rb +511 -404
  512. data/lib/rubygems/util.rb +40 -56
  513. data/lib/rubygems/validator.rb +15 -37
  514. data/lib/rubygems/version.rb +50 -31
  515. data/lib/rubygems/version_option.rb +11 -5
  516. data/lib/rubygems/webauthn_listener/response.rb +161 -0
  517. data/lib/rubygems/webauthn_listener.rb +92 -0
  518. data/lib/rubygems.rb +307 -334
  519. data/rubygems-update.gemspec +6 -13
  520. data/setup.rb +11 -22
  521. data/test/rubygems/alternate_cert.pem +14 -14
  522. data/test/rubygems/alternate_cert_32.pem +15 -15
  523. data/test/rubygems/alternate_key.pem +25 -25
  524. data/test/rubygems/bundler_test_gem.rb +419 -0
  525. data/test/rubygems/ca_cert.pem +74 -65
  526. data/test/rubygems/child_cert.pem +15 -16
  527. data/test/rubygems/child_cert_32.pem +15 -16
  528. data/test/rubygems/child_key.pem +25 -25
  529. data/test/rubygems/client.pem +103 -45
  530. data/test/rubygems/data/excon-0.7.7.gemspec.rz +0 -0
  531. data/test/rubygems/data/null-required-ruby-version.gemspec.rz +0 -0
  532. data/test/rubygems/data/null-required-rubygems-version.gemspec.rz +0 -0
  533. data/test/rubygems/data/pry-0.4.7.gemspec.rz +0 -0
  534. data/test/rubygems/encrypted_private_key.pem +26 -26
  535. data/test/rubygems/expired_cert.pem +15 -15
  536. data/test/rubygems/future_cert.pem +15 -15
  537. data/test/rubygems/future_cert_32.pem +15 -15
  538. data/test/rubygems/grandchild_cert.pem +15 -16
  539. data/test/rubygems/grandchild_cert_32.pem +15 -16
  540. data/test/rubygems/grandchild_key.pem +25 -25
  541. data/{lib/rubygems/test_case.rb → test/rubygems/helper.rb} +518 -507
  542. data/{lib → test}/rubygems/installer_test_case.rb +115 -53
  543. data/test/rubygems/invalid_issuer_cert.pem +16 -16
  544. data/test/rubygems/invalid_issuer_cert_32.pem +16 -16
  545. data/test/rubygems/invalid_key.pem +25 -25
  546. data/test/rubygems/invalid_signer_cert.pem +15 -15
  547. data/test/rubygems/invalid_signer_cert_32.pem +15 -15
  548. data/test/rubygems/invalidchild_cert.pem +15 -16
  549. data/test/rubygems/invalidchild_cert_32.pem +15 -16
  550. data/test/rubygems/invalidchild_key.pem +25 -25
  551. data/{lib → test}/rubygems/package/tar_test_case.rb +51 -18
  552. data/test/rubygems/packages/Bluebie-legs-0.6.2.gem +0 -0
  553. data/test/rubygems/packages/ascii_binder-0.1.10.1.gem +0 -0
  554. data/test/rubygems/packages/ill-formatted-platform-1.0.0.10.gem +0 -0
  555. data/test/rubygems/plugin/exception/rubygems_plugin.rb +1 -1
  556. data/test/rubygems/plugin/standarderror/rubygems_plugin.rb +1 -1
  557. data/test/rubygems/private_ec_key.pem +9 -0
  558. data/test/rubygems/private_key.pem +25 -25
  559. data/test/rubygems/public_cert.pem +16 -16
  560. data/test/rubygems/public_cert_32.pem +15 -15
  561. data/test/rubygems/public_key.pem +7 -7
  562. data/test/rubygems/rubygems/commands/crash_command.rb +0 -2
  563. data/test/rubygems/rubygems_plugin.rb +2 -4
  564. data/test/rubygems/simple_gem.rb +1 -1
  565. data/test/rubygems/specifications/bar-0.0.2.gemspec +0 -2
  566. data/test/rubygems/specifications/rubyforge-0.0.1.gemspec +12 -0
  567. data/test/rubygems/ssl_cert.pem +78 -17
  568. data/test/rubygems/ssl_key.pem +25 -13
  569. data/test/rubygems/test_bundled_ca.rb +44 -47
  570. data/test/rubygems/test_config.rb +6 -8
  571. data/test/rubygems/test_deprecate.rb +91 -11
  572. data/test/rubygems/test_exit.rb +17 -0
  573. data/test/rubygems/test_gem.rb +701 -878
  574. data/test/rubygems/test_gem_available_set.rb +24 -25
  575. data/test/rubygems/test_gem_bundler_version_finder.rb +42 -42
  576. data/test/rubygems/test_gem_command.rb +186 -39
  577. data/test/rubygems/test_gem_command_manager.rb +166 -36
  578. data/test/rubygems/test_gem_commands_build_command.rb +436 -52
  579. data/test/rubygems/test_gem_commands_cert_command.rb +193 -124
  580. data/test/rubygems/test_gem_commands_check_command.rb +9 -11
  581. data/test/rubygems/test_gem_commands_cleanup_command.rb +87 -62
  582. data/test/rubygems/test_gem_commands_contents_command.rb +73 -42
  583. data/test/rubygems/test_gem_commands_dependency_command.rb +39 -41
  584. data/test/rubygems/test_gem_commands_environment_command.rb +60 -48
  585. data/test/rubygems/test_gem_commands_exec_command.rb +851 -0
  586. data/test/rubygems/test_gem_commands_fetch_command.rb +163 -32
  587. data/test/rubygems/test_gem_commands_generate_index_command.rb +39 -9
  588. data/test/rubygems/test_gem_commands_help_command.rb +34 -19
  589. data/test/rubygems/test_gem_commands_info_command.rb +34 -9
  590. data/test/rubygems/test_gem_commands_install_command.rb +601 -174
  591. data/test/rubygems/test_gem_commands_list_command.rb +5 -7
  592. data/test/rubygems/test_gem_commands_lock_command.rb +11 -13
  593. data/test/rubygems/test_gem_commands_mirror.rb +3 -4
  594. data/test/rubygems/test_gem_commands_open_command.rb +16 -19
  595. data/test/rubygems/test_gem_commands_outdated_command.rb +24 -7
  596. data/test/rubygems/test_gem_commands_owner_command.rb +250 -49
  597. data/test/rubygems/test_gem_commands_pristine_command.rb +270 -89
  598. data/test/rubygems/test_gem_commands_push_command.rb +251 -69
  599. data/test/rubygems/test_gem_commands_query_command.rb +114 -89
  600. data/test/rubygems/test_gem_commands_search_command.rb +2 -4
  601. data/test/rubygems/test_gem_commands_server_command.rb +6 -46
  602. data/test/rubygems/test_gem_commands_setup_command.rb +334 -157
  603. data/test/rubygems/test_gem_commands_signin_command.rb +187 -27
  604. data/test/rubygems/test_gem_commands_signout_command.rb +3 -10
  605. data/test/rubygems/test_gem_commands_sources_command.rb +266 -33
  606. data/test/rubygems/test_gem_commands_specification_command.rb +81 -55
  607. data/test/rubygems/test_gem_commands_stale_command.rb +4 -6
  608. data/test/rubygems/test_gem_commands_uninstall_command.rb +251 -99
  609. data/test/rubygems/test_gem_commands_unpack_command.rb +32 -34
  610. data/test/rubygems/test_gem_commands_update_command.rb +412 -102
  611. data/test/rubygems/test_gem_commands_which_command.rb +12 -14
  612. data/test/rubygems/test_gem_commands_yank_command.rb +191 -26
  613. data/test/rubygems/test_gem_config_file.rb +120 -96
  614. data/test/rubygems/test_gem_dependency.rb +94 -86
  615. data/test/rubygems/test_gem_dependency_installer.rb +305 -388
  616. data/test/rubygems/test_gem_dependency_list.rb +66 -61
  617. data/test/rubygems/test_gem_dependency_resolution_error.rb +5 -7
  618. data/test/rubygems/test_gem_doctor.rb +73 -47
  619. data/test/rubygems/test_gem_ext_builder.rb +116 -108
  620. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/.gitignore +1 -0
  621. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/custom_name.gemspec +8 -0
  622. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/ext/custom_name_lib/Cargo.lock +233 -0
  623. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/ext/custom_name_lib/Cargo.toml +10 -0
  624. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/ext/custom_name_lib/src/lib.rs +27 -0
  625. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/lib/custom_name.rb +1 -0
  626. data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/.gitignore +1 -0
  627. data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.lock +247 -0
  628. data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.toml +10 -0
  629. data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/rust_ruby_example.gemspec +8 -0
  630. data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/src/lib.rs +51 -0
  631. data/test/rubygems/test_gem_ext_cargo_builder.rb +167 -0
  632. data/test/rubygems/test_gem_ext_cargo_builder_link_flag_converter.rb +33 -0
  633. data/test/rubygems/test_gem_ext_cargo_builder_unit.rb +60 -0
  634. data/test/rubygems/test_gem_ext_cmake_builder.rb +32 -37
  635. data/test/rubygems/test_gem_ext_configure_builder.rb +23 -31
  636. data/test/rubygems/test_gem_ext_ext_conf_builder.rb +75 -79
  637. data/test/rubygems/test_gem_ext_rake_builder.rb +49 -30
  638. data/test/rubygems/test_gem_gem_runner.rb +58 -8
  639. data/test/rubygems/test_gem_gemcutter_utilities.rb +159 -76
  640. data/test/rubygems/test_gem_impossible_dependencies_error.rb +4 -6
  641. data/test/rubygems/test_gem_indexer.rb +120 -105
  642. data/test/rubygems/test_gem_install_update_options.rb +57 -33
  643. data/test/rubygems/test_gem_installer.rb +1230 -644
  644. data/test/rubygems/test_gem_local_remote_options.rb +11 -13
  645. data/test/rubygems/test_gem_name_tuple.rb +4 -6
  646. data/test/rubygems/test_gem_package.rb +390 -285
  647. data/test/rubygems/test_gem_package_old.rb +57 -56
  648. data/test/rubygems/test_gem_package_tar_header.rb +108 -50
  649. data/test/rubygems/test_gem_package_tar_reader.rb +54 -9
  650. data/test/rubygems/test_gem_package_tar_reader_entry.rb +168 -24
  651. data/test/rubygems/test_gem_package_tar_writer.rb +107 -101
  652. data/test/rubygems/test_gem_package_task.rb +58 -25
  653. data/test/rubygems/test_gem_path_support.rb +29 -29
  654. data/test/rubygems/test_gem_platform.rb +388 -199
  655. data/test/rubygems/test_gem_rdoc.rb +20 -155
  656. data/test/rubygems/test_gem_remote_fetcher.rb +475 -304
  657. data/test/rubygems/test_gem_request.rb +128 -85
  658. data/test/rubygems/test_gem_request_connection_pools.rb +32 -32
  659. data/test/rubygems/test_gem_request_set.rb +186 -110
  660. data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +283 -264
  661. data/test/rubygems/test_gem_request_set_lockfile.rb +93 -94
  662. data/test/rubygems/test_gem_request_set_lockfile_parser.rb +69 -70
  663. data/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb +136 -136
  664. data/test/rubygems/test_gem_requirement.rb +140 -55
  665. data/test/rubygems/test_gem_resolver.rb +224 -115
  666. data/test/rubygems/test_gem_resolver_activation_request.rb +9 -40
  667. data/test/rubygems/test_gem_resolver_api_set.rb +79 -78
  668. data/test/rubygems/test_gem_resolver_api_specification.rb +47 -49
  669. data/test/rubygems/test_gem_resolver_best_set.rb +43 -22
  670. data/test/rubygems/test_gem_resolver_composed_set.rb +1 -3
  671. data/test/rubygems/test_gem_resolver_conflict.rb +12 -18
  672. data/test/rubygems/test_gem_resolver_dependency_request.rb +15 -17
  673. data/test/rubygems/test_gem_resolver_git_set.rb +22 -24
  674. data/test/rubygems/test_gem_resolver_git_specification.rb +22 -22
  675. data/test/rubygems/test_gem_resolver_index_set.rb +14 -16
  676. data/test/rubygems/test_gem_resolver_index_specification.rb +21 -18
  677. data/test/rubygems/test_gem_resolver_installed_specification.rb +5 -8
  678. data/test/rubygems/test_gem_resolver_installer_set.rb +106 -44
  679. data/test/rubygems/test_gem_resolver_local_specification.rb +7 -9
  680. data/test/rubygems/test_gem_resolver_lock_set.rb +15 -17
  681. data/test/rubygems/test_gem_resolver_lock_specification.rb +17 -19
  682. data/test/rubygems/test_gem_resolver_requirement_list.rb +1 -3
  683. data/test/rubygems/test_gem_resolver_specification.rb +8 -10
  684. data/test/rubygems/test_gem_resolver_vendor_set.rb +9 -11
  685. data/test/rubygems/test_gem_resolver_vendor_specification.rb +10 -12
  686. data/test/rubygems/test_gem_security.rb +109 -79
  687. data/test/rubygems/test_gem_security_policy.rb +102 -107
  688. data/test/rubygems/test_gem_security_signer.rb +51 -52
  689. data/test/rubygems/test_gem_security_trust_dir.rb +14 -16
  690. data/test/rubygems/test_gem_silent_ui.rb +47 -42
  691. data/test/rubygems/test_gem_source.rb +66 -51
  692. data/test/rubygems/test_gem_source_fetch_problem.rb +17 -8
  693. data/test/rubygems/test_gem_source_git.rb +78 -77
  694. data/test/rubygems/test_gem_source_installed.rb +16 -18
  695. data/test/rubygems/test_gem_source_list.rb +5 -5
  696. data/test/rubygems/test_gem_source_local.rb +15 -16
  697. data/test/rubygems/test_gem_source_lock.rb +31 -33
  698. data/test/rubygems/test_gem_source_specific_file.rb +18 -19
  699. data/test/rubygems/test_gem_source_subpath_problem.rb +49 -0
  700. data/test/rubygems/test_gem_source_vendor.rb +13 -15
  701. data/test/rubygems/test_gem_spec_fetcher.rb +74 -67
  702. data/test/rubygems/test_gem_specification.rb +1070 -1073
  703. data/test/rubygems/test_gem_stream_ui.rb +25 -23
  704. data/test/rubygems/test_gem_stub_specification.rb +39 -56
  705. data/test/rubygems/test_gem_text.rb +8 -3
  706. data/test/rubygems/test_gem_uninstaller.rb +269 -100
  707. data/test/rubygems/test_gem_unsatisfiable_dependency_error.rb +3 -5
  708. data/test/rubygems/test_gem_update_suggestion.rb +208 -0
  709. data/test/rubygems/test_gem_uri.rb +39 -0
  710. data/test/rubygems/test_gem_uri_formatter.rb +14 -16
  711. data/test/rubygems/test_gem_util.rb +46 -34
  712. data/test/rubygems/test_gem_validator.rb +12 -15
  713. data/test/rubygems/test_gem_version.rb +50 -35
  714. data/test/rubygems/test_gem_version_option.rb +16 -18
  715. data/test/rubygems/test_kernel.rb +61 -61
  716. data/test/rubygems/test_project_sanity.rb +49 -0
  717. data/test/rubygems/test_remote_fetch_error.rb +8 -9
  718. data/test/rubygems/test_require.rb +415 -121
  719. data/test/rubygems/test_rubygems.rb +74 -0
  720. data/test/rubygems/test_webauthn_listener.rb +120 -0
  721. data/test/rubygems/test_webauthn_listener_response.rb +93 -0
  722. data/{lib/rubygems/test_utilities.rb → test/rubygems/utilities.rb} +115 -51
  723. data/test/rubygems/wrong_key_cert.pem +15 -15
  724. data/test/rubygems/wrong_key_cert_32.pem +15 -15
  725. data/test/test_changelog_generator.rb +17 -0
  726. metadata +225 -244
  727. data/.rubocop.yml +0 -66
  728. data/.travis.yml +0 -38
  729. data/History.txt +0 -3965
  730. data/Rakefile +0 -372
  731. data/appveyor.yml +0 -43
  732. data/bundler/CODE_OF_CONDUCT.md +0 -42
  733. data/bundler/CONTRIBUTING.md +0 -17
  734. data/bundler/exe/bundle_ruby +0 -60
  735. data/bundler/lib/bundler/cli/package.rb +0 -49
  736. data/bundler/lib/bundler/compatibility_guard.rb +0 -14
  737. data/bundler/lib/bundler/dep_proxy.rb +0 -48
  738. data/bundler/lib/bundler/gem_remote_fetcher.rb +0 -43
  739. data/bundler/lib/bundler/gemdeps.rb +0 -29
  740. data/bundler/lib/bundler/psyched_yaml.rb +0 -37
  741. data/bundler/lib/bundler/ssl_certs/certificate_manager.rb +0 -66
  742. data/bundler/lib/bundler/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem +0 -23
  743. data/bundler/lib/bundler/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem +0 -25
  744. data/bundler/lib/bundler/templates/gems.rb +0 -8
  745. data/bundler/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt +0 -3
  746. data/bundler/lib/bundler/templates/newgem/test/test_helper.rb.tt +0 -4
  747. data/bundler/lib/bundler/templates/newgem/travis.yml.tt +0 -7
  748. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/compatibility.rb +0 -26
  749. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +0 -57
  750. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +0 -81
  751. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb +0 -36
  752. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +0 -66
  753. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +0 -62
  754. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +0 -63
  755. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +0 -61
  756. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb +0 -126
  757. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb +0 -46
  758. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +0 -36
  759. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +0 -136
  760. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +0 -223
  761. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +0 -143
  762. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +0 -6
  763. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +0 -101
  764. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb +0 -67
  765. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +0 -837
  766. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb +0 -46
  767. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/state.rb +0 -58
  768. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo.rb +0 -12
  769. data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/faster.rb +0 -27
  770. data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/ssl_reuse.rb +0 -129
  771. data/bundler/lib/bundler/vendor/thor/lib/thor/core_ext/io_binary_read.rb +0 -12
  772. data/bundler/lib/bundler/vendor/thor/lib/thor/core_ext/ordered_hash.rb +0 -129
  773. data/bundler/lib/bundler/version_ranges.rb +0 -76
  774. data/bundler/man/bundle-gem.1 +0 -80
  775. data/bundler/man/bundle-gem.ronn +0 -78
  776. data/bundler/man/bundle-package.1 +0 -55
  777. data/lib/rubygems/psych_additions.rb +0 -10
  778. data/lib/rubygems/server.rb +0 -878
  779. data/lib/rubygems/source_local.rb +0 -7
  780. data/lib/rubygems/source_specific_file.rb +0 -6
  781. data/lib/rubygems/ssl_certs/index.rubygems.org/GlobalSignRootCA.pem +0 -21
  782. data/lib/rubygems/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem +0 -23
  783. data/lib/rubygems/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem +0 -25
  784. data/lib/rubygems/syck_hack.rb +0 -77
  785. data/lib/ubygems.rb +0 -14
  786. data/test/rubygems/bogussources.rb +0 -9
  787. data/test/rubygems/data/null-type.gemspec.rz +0 -0
  788. data/test/rubygems/test_gem_server.rb +0 -607
  789. data/util/CL2notes +0 -55
  790. data/util/ci +0 -77
  791. data/util/create_certs.rb +0 -171
  792. data/util/create_encrypted_key.rb +0 -16
  793. data/util/generate_spdx_license_list.rb +0 -61
  794. data/util/patch_with_prs.rb +0 -77
  795. data/util/rubocop +0 -8
  796. data/util/update_bundled_ca_certificates.rb +0 -139
  797. data/util/update_changelog.rb +0 -67
  798. /data/bundler/lib/bundler/{ssl_certs → man}/.document +0 -0
  799. /data/bundler/{man/bundle-check.ronn → lib/bundler/man/bundle-check.1.ronn} +0 -0
  800. /data/bundler/{man/bundle-doctor.ronn → lib/bundler/man/bundle-doctor.1.ronn} +0 -0
  801. /data/bundler/{man/bundle-info.ronn → lib/bundler/man/bundle-info.1.ronn} +0 -0
  802. /data/bundler/{man/bundle-lock.ronn → lib/bundler/man/bundle-lock.1.ronn} +0 -0
  803. /data/bundler/{man/bundle-pristine.ronn → lib/bundler/man/bundle-pristine.1.ronn} +0 -0
  804. /data/bundler/{man/bundle-remove.ronn → lib/bundler/man/bundle-remove.1.ronn} +0 -0
  805. /data/bundler/{man/bundle-show.ronn → lib/bundler/man/bundle-show.1.ronn} +0 -0
  806. /data/{bundler/lib/bundler/ssl_certs/index.rubygems.org → lib/rubygems/ssl_certs/rubygems.org}/GlobalSignRootCA.pem +0 -0
@@ -0,0 +1,723 @@
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
+ .
4
+ .TH "GEMFILE" "5" "February 2023" "" ""
5
+ .
6
+ .SH "NAME"
7
+ \fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
8
+ .
9
+ .SH "SYNOPSIS"
10
+ A \fBGemfile\fR describes the gem dependencies required to execute associated Ruby code\.
11
+ .
12
+ .P
13
+ Place the \fBGemfile\fR in the root of the directory containing the associated code\. For instance, in a Rails application, place the \fBGemfile\fR in the same directory as the \fBRakefile\fR\.
14
+ .
15
+ .SH "SYNTAX"
16
+ A \fBGemfile\fR is evaluated as Ruby code, in a context which makes available a number of methods used to describe the gem requirements\.
17
+ .
18
+ .SH "GLOBAL SOURCE"
19
+ At the top of the \fBGemfile\fR, add a single line for the \fBRubyGems\fR source that contains the gems listed in the \fBGemfile\fR\.
20
+ .
21
+ .IP "" 4
22
+ .
23
+ .nf
24
+
25
+ source "https://rubygems\.org"
26
+ .
27
+ .fi
28
+ .
29
+ .IP "" 0
30
+ .
31
+ .P
32
+ You can add only one global source\. In Bundler 1\.13, adding multiple global sources was deprecated\. The \fBsource\fR \fBMUST\fR be a valid RubyGems repository\.
33
+ .
34
+ .P
35
+ To use more than one source of RubyGems, you should use \fI\fBsource\fR block\fR\.
36
+ .
37
+ .P
38
+ A source is checked for gems following the heuristics described in \fISOURCE PRIORITY\fR\.
39
+ .
40
+ .P
41
+ \fBNote about a behavior of the feature deprecated in Bundler 1\.13\fR: If a gem is found in more than one global source, Bundler will print a warning after installing the gem indicating which source was used, and listing the other sources where the gem is available\. A specific source can be selected for gems that need to use a non\-standard repository, suppressing this warning, by using the \fI\fB:source\fR option\fR or \fBsource\fR block\.
42
+ .
43
+ .SS "CREDENTIALS"
44
+ Some gem sources require a username and password\. Use bundle config(1) \fIbundle\-config\.1\.html\fR to set the username and password for any of the sources that need it\. The command must be run once on each computer that will install the Gemfile, but this keeps the credentials from being stored in plain text in version control\.
45
+ .
46
+ .IP "" 4
47
+ .
48
+ .nf
49
+
50
+ bundle config gems\.example\.com user:password
51
+ .
52
+ .fi
53
+ .
54
+ .IP "" 0
55
+ .
56
+ .P
57
+ For some sources, like a company Gemfury account, it may be easier to include the credentials in the Gemfile as part of the source URL\.
58
+ .
59
+ .IP "" 4
60
+ .
61
+ .nf
62
+
63
+ source "https://user:password@gems\.example\.com"
64
+ .
65
+ .fi
66
+ .
67
+ .IP "" 0
68
+ .
69
+ .P
70
+ Credentials in the source URL will take precedence over credentials set using \fBconfig\fR\.
71
+ .
72
+ .SH "RUBY"
73
+ If your application requires a specific Ruby version or engine, specify your requirements using the \fBruby\fR method, with the following arguments\. All parameters are \fBOPTIONAL\fR unless otherwise specified\.
74
+ .
75
+ .SS "VERSION (required)"
76
+ The version of Ruby that your application requires\. If your application requires an alternate Ruby engine, such as JRuby, TruffleRuby, etc\., this should be the Ruby version that the engine is compatible with\.
77
+ .
78
+ .IP "" 4
79
+ .
80
+ .nf
81
+
82
+ ruby "3\.1\.2"
83
+ .
84
+ .fi
85
+ .
86
+ .IP "" 0
87
+ .
88
+ .SS "ENGINE"
89
+ Each application \fImay\fR specify a Ruby engine\. If an engine is specified, an engine version \fImust\fR also be specified\.
90
+ .
91
+ .P
92
+ What exactly is an Engine? \- A Ruby engine is an implementation of the Ruby language\.
93
+ .
94
+ .IP "\(bu" 4
95
+ For background: the reference or original implementation of the Ruby programming language is called Matz\'s Ruby Interpreter \fIhttps://en\.wikipedia\.org/wiki/Ruby_MRI\fR, or MRI for short\. This is named after Ruby creator Yukihiro Matsumoto, also known as Matz\. MRI is also known as CRuby, because it is written in C\. MRI is the most widely used Ruby engine\.
96
+ .
97
+ .IP "\(bu" 4
98
+ Other implementations \fIhttps://www\.ruby\-lang\.org/en/about/\fR of Ruby exist\. Some of the more well\-known implementations include JRuby \fIhttp://jruby\.org/\fR and TruffleRuby \fIhttps://www\.graalvm\.org/ruby/\fR\. Rubinius is an alternative implementation of Ruby written in Ruby\. JRuby is an implementation of Ruby on the JVM, short for Java Virtual Machine\. TruffleRuby is a Ruby implementation on the GraalVM, a language toolkit built on the JVM\.
99
+ .
100
+ .IP "" 0
101
+ .
102
+ .SS "ENGINE VERSION"
103
+ Each application \fImay\fR specify a Ruby engine version\. If an engine version is specified, an engine \fImust\fR also be specified\. If the engine is "ruby" the engine version specified \fImust\fR match the Ruby version\.
104
+ .
105
+ .IP "" 4
106
+ .
107
+ .nf
108
+
109
+ ruby "2\.6\.8", engine: "jruby", engine_version: "9\.3\.8\.0"
110
+ .
111
+ .fi
112
+ .
113
+ .IP "" 0
114
+ .
115
+ .SS "PATCHLEVEL"
116
+ Each application \fImay\fR specify a Ruby patchlevel\. Specifying the patchlevel has been meaningless since Ruby 2\.1\.0 was released as the patchlevel is now uniquely determined by a combination of major, minor, and teeny version numbers\.
117
+ .
118
+ .P
119
+ This option was implemented in Bundler 1\.4\.0 for Ruby 2\.0 or earlier\.
120
+ .
121
+ .IP "" 4
122
+ .
123
+ .nf
124
+
125
+ ruby "3\.1\.2", patchlevel: "20"
126
+ .
127
+ .fi
128
+ .
129
+ .IP "" 0
130
+ .
131
+ .SH "GEMS"
132
+ Specify gem requirements using the \fBgem\fR method, with the following arguments\. All parameters are \fBOPTIONAL\fR unless otherwise specified\.
133
+ .
134
+ .SS "NAME (required)"
135
+ For each gem requirement, list a single \fIgem\fR line\.
136
+ .
137
+ .IP "" 4
138
+ .
139
+ .nf
140
+
141
+ gem "nokogiri"
142
+ .
143
+ .fi
144
+ .
145
+ .IP "" 0
146
+ .
147
+ .SS "VERSION"
148
+ Each \fIgem\fR \fBMAY\fR have one or more version specifiers\.
149
+ .
150
+ .IP "" 4
151
+ .
152
+ .nf
153
+
154
+ gem "nokogiri", ">= 1\.4\.2"
155
+ gem "RedCloth", ">= 4\.1\.0", "< 4\.2\.0"
156
+ .
157
+ .fi
158
+ .
159
+ .IP "" 0
160
+ .
161
+ .SS "REQUIRE AS"
162
+ Each \fIgem\fR \fBMAY\fR specify files that should be used when autorequiring via \fBBundler\.require\fR\. You may pass an array with multiple files or \fBtrue\fR if the file you want \fBrequired\fR has the same name as \fIgem\fR or \fBfalse\fR to prevent any file from being autorequired\.
163
+ .
164
+ .IP "" 4
165
+ .
166
+ .nf
167
+
168
+ gem "redis", require: ["redis/connection/hiredis", "redis"]
169
+ gem "webmock", require: false
170
+ gem "byebug", require: true
171
+ .
172
+ .fi
173
+ .
174
+ .IP "" 0
175
+ .
176
+ .P
177
+ The argument defaults to the name of the gem\. For example, these are identical:
178
+ .
179
+ .IP "" 4
180
+ .
181
+ .nf
182
+
183
+ gem "nokogiri"
184
+ gem "nokogiri", require: "nokogiri"
185
+ gem "nokogiri", require: true
186
+ .
187
+ .fi
188
+ .
189
+ .IP "" 0
190
+ .
191
+ .SS "GROUPS"
192
+ Each \fIgem\fR \fBMAY\fR specify membership in one or more groups\. Any \fIgem\fR that does not specify membership in any group is placed in the \fBdefault\fR group\.
193
+ .
194
+ .IP "" 4
195
+ .
196
+ .nf
197
+
198
+ gem "rspec", group: :test
199
+ gem "wirble", groups: [:development, :test]
200
+ .
201
+ .fi
202
+ .
203
+ .IP "" 0
204
+ .
205
+ .P
206
+ The Bundler runtime allows its two main methods, \fBBundler\.setup\fR and \fBBundler\.require\fR, to limit their impact to particular groups\.
207
+ .
208
+ .IP "" 4
209
+ .
210
+ .nf
211
+
212
+ # setup adds gems to Ruby\'s load path
213
+ Bundler\.setup # defaults to all groups
214
+ require "bundler/setup" # same as Bundler\.setup
215
+ Bundler\.setup(:default) # only set up the _default_ group
216
+ Bundler\.setup(:test) # only set up the _test_ group (but `not` _default_)
217
+ Bundler\.setup(:default, :test) # set up the _default_ and _test_ groups, but no others
218
+
219
+ # require requires all of the gems in the specified groups
220
+ Bundler\.require # defaults to the _default_ group
221
+ Bundler\.require(:default) # identical
222
+ Bundler\.require(:default, :test) # requires the _default_ and _test_ groups
223
+ Bundler\.require(:test) # requires the _test_ group
224
+ .
225
+ .fi
226
+ .
227
+ .IP "" 0
228
+ .
229
+ .P
230
+ The Bundler CLI allows you to specify a list of groups whose gems \fBbundle install\fR should not install with the \fBwithout\fR configuration\.
231
+ .
232
+ .P
233
+ To specify multiple groups to ignore, specify a list of groups separated by spaces\.
234
+ .
235
+ .IP "" 4
236
+ .
237
+ .nf
238
+
239
+ bundle config set \-\-local without test
240
+ bundle config set \-\-local without development test
241
+ .
242
+ .fi
243
+ .
244
+ .IP "" 0
245
+ .
246
+ .P
247
+ Also, calling \fBBundler\.setup\fR with no parameters, or calling \fBrequire "bundler/setup"\fR will setup all groups except for the ones you excluded via \fB\-\-without\fR (since they are not available)\.
248
+ .
249
+ .P
250
+ Note that on \fBbundle install\fR, bundler downloads and evaluates all gems, in order to create a single canonical list of all of the required gems and their dependencies\. This means that you cannot list different versions of the same gems in different groups\. For more details, see Understanding Bundler \fIhttps://bundler\.io/rationale\.html\fR\.
251
+ .
252
+ .SS "PLATFORMS"
253
+ If a gem should only be used in a particular platform or set of platforms, you can specify them\. Platforms are essentially identical to groups, except that you do not need to use the \fB\-\-without\fR install\-time flag to exclude groups of gems for other platforms\.
254
+ .
255
+ .P
256
+ There are a number of \fBGemfile\fR platforms:
257
+ .
258
+ .TP
259
+ \fBruby\fR
260
+ C Ruby (MRI), Rubinius, or TruffleRuby, but not Windows
261
+ .
262
+ .TP
263
+ \fBmri\fR
264
+ C Ruby (MRI) only, but not Windows
265
+ .
266
+ .TP
267
+ \fBwindows\fR
268
+ Windows C Ruby (MRI), including RubyInstaller 32\-bit and 64\-bit versions
269
+ .
270
+ .TP
271
+ \fBmswin\fR
272
+ Windows C Ruby (MRI), including RubyInstaller 32\-bit versions
273
+ .
274
+ .TP
275
+ \fBmswin64\fR
276
+ Windows C Ruby (MRI), including RubyInstaller 64\-bit versions
277
+ .
278
+ .TP
279
+ \fBrbx\fR
280
+ Rubinius
281
+ .
282
+ .TP
283
+ \fBjruby\fR
284
+ JRuby
285
+ .
286
+ .TP
287
+ \fBtruffleruby\fR
288
+ TruffleRuby
289
+ .
290
+ .P
291
+ On platforms \fBruby\fR, \fBmri\fR, \fBmswin\fR, \fBmswin64\fR, and \fBwindows\fR, you may additionally specify a version by appending the major and minor version numbers without a delimiter\. For example, to specify that a gem should only be used on platform \fBruby\fR version 3\.1, use:
292
+ .
293
+ .IP "" 4
294
+ .
295
+ .nf
296
+
297
+ ruby_31
298
+ .
299
+ .fi
300
+ .
301
+ .IP "" 0
302
+ .
303
+ .P
304
+ As with groups (above), you may specify one or more platforms:
305
+ .
306
+ .IP "" 4
307
+ .
308
+ .nf
309
+
310
+ gem "weakling", platforms: :jruby
311
+ gem "ruby\-debug", platforms: :mri_31
312
+ gem "nokogiri", platforms: [:windows_31, :jruby]
313
+ .
314
+ .fi
315
+ .
316
+ .IP "" 0
317
+ .
318
+ .P
319
+ All operations involving groups (\fBbundle install\fR \fIbundle\-install\.1\.html\fR, \fBBundler\.setup\fR, \fBBundler\.require\fR) behave exactly the same as if any groups not matching the current platform were explicitly excluded\.
320
+ .
321
+ .SS "FORCE_RUBY_PLATFORM"
322
+ If you always want the pure ruby variant of a gem to be chosen over platform specific variants, you can use the \fBforce_ruby_platform\fR option:
323
+ .
324
+ .IP "" 4
325
+ .
326
+ .nf
327
+
328
+ gem "ffi", force_ruby_platform: true
329
+ .
330
+ .fi
331
+ .
332
+ .IP "" 0
333
+ .
334
+ .P
335
+ This can be handy (assuming the pure ruby variant works fine) when:
336
+ .
337
+ .IP "\(bu" 4
338
+ You\'re having issues with the platform specific variant\.
339
+ .
340
+ .IP "\(bu" 4
341
+ The platform specific variant does not yet support a newer ruby (and thus has a \fBrequired_ruby_version\fR upper bound), but you still want your Gemfile{\.lock} files to resolve under that ruby\.
342
+ .
343
+ .IP "" 0
344
+ .
345
+ .SS "SOURCE"
346
+ You can select an alternate RubyGems repository for a gem using the \':source\' option\.
347
+ .
348
+ .IP "" 4
349
+ .
350
+ .nf
351
+
352
+ gem "some_internal_gem", source: "https://gems\.example\.com"
353
+ .
354
+ .fi
355
+ .
356
+ .IP "" 0
357
+ .
358
+ .P
359
+ This forces the gem to be loaded from this source and ignores the global source declared at the top level of the file\. If the gem does not exist in this source, it will not be installed\.
360
+ .
361
+ .P
362
+ Bundler will search for child dependencies of this gem by first looking in the source selected for the parent, but if they are not found there, it will fall back on the global source\.
363
+ .
364
+ .P
365
+ \fBNote about a behavior of the feature deprecated in Bundler 1\.13\fR: Selecting a specific source repository this way also suppresses the ambiguous gem warning described above in \fIGLOBAL SOURCE\fR\.
366
+ .
367
+ .P
368
+ Using the \fB:source\fR option for an individual gem will also make that source available as a possible global source for any other gems which do not specify explicit sources\. Thus, when adding gems with explicit sources, it is recommended that you also ensure all other gems in the Gemfile are using explicit sources\.
369
+ .
370
+ .SS "GIT"
371
+ If necessary, you can specify that a gem is located at a particular git repository using the \fB:git\fR parameter\. The repository can be accessed via several protocols:
372
+ .
373
+ .TP
374
+ \fBHTTP(S)\fR
375
+ gem "rails", git: "https://github\.com/rails/rails\.git"
376
+ .
377
+ .TP
378
+ \fBSSH\fR
379
+ gem "rails", git: "git@github\.com:rails/rails\.git"
380
+ .
381
+ .TP
382
+ \fBgit\fR
383
+ gem "rails", git: "git://github\.com/rails/rails\.git"
384
+ .
385
+ .P
386
+ If using SSH, the user that you use to run \fBbundle install\fR \fBMUST\fR have the appropriate keys available in their \fB$HOME/\.ssh\fR\.
387
+ .
388
+ .P
389
+ \fBNOTE\fR: \fBhttp://\fR and \fBgit://\fR URLs should be avoided if at all possible\. These protocols are unauthenticated, so a man\-in\-the\-middle attacker can deliver malicious code and compromise your system\. HTTPS and SSH are strongly preferred\.
390
+ .
391
+ .P
392
+ The \fBgroup\fR, \fBplatforms\fR, and \fBrequire\fR options are available and behave exactly the same as they would for a normal gem\.
393
+ .
394
+ .P
395
+ A git repository \fBSHOULD\fR have at least one file, at the root of the directory containing the gem, with the extension \fB\.gemspec\fR\. This file \fBMUST\fR contain a valid gem specification, as expected by the \fBgem build\fR command\.
396
+ .
397
+ .P
398
+ If a git repository does not have a \fB\.gemspec\fR, bundler will attempt to create one, but it will not contain any dependencies, executables, or C extension compilation instructions\. As a result, it may fail to properly integrate into your application\.
399
+ .
400
+ .P
401
+ If a git repository does have a \fB\.gemspec\fR for the gem you attached it to, a version specifier, if provided, means that the git repository is only valid if the \fB\.gemspec\fR specifies a version matching the version specifier\. If not, bundler will print a warning\.
402
+ .
403
+ .IP "" 4
404
+ .
405
+ .nf
406
+
407
+ gem "rails", "2\.3\.8", git: "https://github\.com/rails/rails\.git"
408
+ # bundle install will fail, because the \.gemspec in the rails
409
+ # repository\'s master branch specifies version 3\.0\.0
410
+ .
411
+ .fi
412
+ .
413
+ .IP "" 0
414
+ .
415
+ .P
416
+ If a git repository does \fBnot\fR have a \fB\.gemspec\fR for the gem you attached it to, a version specifier \fBMUST\fR be provided\. Bundler will use this version in the simple \fB\.gemspec\fR it creates\.
417
+ .
418
+ .P
419
+ Git repositories support a number of additional options\.
420
+ .
421
+ .TP
422
+ \fBbranch\fR, \fBtag\fR, and \fBref\fR
423
+ You \fBMUST\fR only specify at most one of these options\. The default is \fBbranch: "master"\fR\. For example:
424
+ .
425
+ .IP
426
+ gem "rails", git: "https://github\.com/rails/rails\.git", branch: "5\-0\-stable"
427
+ .
428
+ .IP
429
+ gem "rails", git: "https://github\.com/rails/rails\.git", tag: "v5\.0\.0"
430
+ .
431
+ .IP
432
+ gem "rails", git: "https://github\.com/rails/rails\.git", ref: "4aded"
433
+ .
434
+ .TP
435
+ \fBsubmodules\fR
436
+ For reference, a git submodule \fIhttps://git\-scm\.com/book/en/v2/Git\-Tools\-Submodules\fR lets you have another git repository within a subfolder of your repository\. Specify \fBsubmodules: true\fR to cause bundler to expand any submodules included in the git repository
437
+ .
438
+ .P
439
+ If a git repository contains multiple \fB\.gemspecs\fR, each \fB\.gemspec\fR represents a gem located at the same place in the file system as the \fB\.gemspec\fR\.
440
+ .
441
+ .IP "" 4
442
+ .
443
+ .nf
444
+
445
+ |~rails [git root]
446
+ | |\-rails\.gemspec [rails gem located here]
447
+ |~actionpack
448
+ | |\-actionpack\.gemspec [actionpack gem located here]
449
+ |~activesupport
450
+ | |\-activesupport\.gemspec [activesupport gem located here]
451
+ |\.\.\.
452
+ .
453
+ .fi
454
+ .
455
+ .IP "" 0
456
+ .
457
+ .P
458
+ To install a gem located in a git repository, bundler changes to the directory containing the gemspec, runs \fBgem build name\.gemspec\fR and then installs the resulting gem\. The \fBgem build\fR command, which comes standard with Rubygems, evaluates the \fB\.gemspec\fR in the context of the directory in which it is located\.
459
+ .
460
+ .SS "GIT SOURCE"
461
+ A custom git source can be defined via the \fBgit_source\fR method\. Provide the source\'s name as an argument, and a block which receives a single argument and interpolates it into a string to return the full repo address:
462
+ .
463
+ .IP "" 4
464
+ .
465
+ .nf
466
+
467
+ git_source(:stash){ |repo_name| "https://stash\.corp\.acme\.pl/#{repo_name}\.git" }
468
+ gem \'rails\', stash: \'forks/rails\'
469
+ .
470
+ .fi
471
+ .
472
+ .IP "" 0
473
+ .
474
+ .P
475
+ In addition, if you wish to choose a specific branch:
476
+ .
477
+ .IP "" 4
478
+ .
479
+ .nf
480
+
481
+ gem "rails", stash: "forks/rails", branch: "branch_name"
482
+ .
483
+ .fi
484
+ .
485
+ .IP "" 0
486
+ .
487
+ .SS "GITHUB"
488
+ \fBNOTE\fR: This shorthand should be avoided until Bundler 2\.0, since it currently expands to an insecure \fBgit://\fR URL\. This allows a man\-in\-the\-middle attacker to compromise your system\.
489
+ .
490
+ .P
491
+ If the git repository you want to use is hosted on GitHub and is public, you can use the :github shorthand to specify the github username and repository name (without the trailing "\.git"), separated by a slash\. If both the username and repository name are the same, you can omit one\.
492
+ .
493
+ .IP "" 4
494
+ .
495
+ .nf
496
+
497
+ gem "rails", github: "rails/rails"
498
+ gem "rails", github: "rails"
499
+ .
500
+ .fi
501
+ .
502
+ .IP "" 0
503
+ .
504
+ .P
505
+ Are both equivalent to
506
+ .
507
+ .IP "" 4
508
+ .
509
+ .nf
510
+
511
+ gem "rails", git: "https://github\.com/rails/rails\.git"
512
+ .
513
+ .fi
514
+ .
515
+ .IP "" 0
516
+ .
517
+ .P
518
+ Since the \fBgithub\fR method is a specialization of \fBgit_source\fR, it accepts a \fB:branch\fR named argument\.
519
+ .
520
+ .P
521
+ You can also directly pass a pull request URL:
522
+ .
523
+ .IP "" 4
524
+ .
525
+ .nf
526
+
527
+ gem "rails", github: "https://github\.com/rails/rails/pull/43753"
528
+ .
529
+ .fi
530
+ .
531
+ .IP "" 0
532
+ .
533
+ .P
534
+ Which is equivalent to:
535
+ .
536
+ .IP "" 4
537
+ .
538
+ .nf
539
+
540
+ gem "rails", github: "rails/rails", branch: "refs/pull/43753/head"
541
+ .
542
+ .fi
543
+ .
544
+ .IP "" 0
545
+ .
546
+ .SS "GIST"
547
+ If the git repository you want to use is hosted as a GitHub Gist and is public, you can use the :gist shorthand to specify the gist identifier (without the trailing "\.git")\.
548
+ .
549
+ .IP "" 4
550
+ .
551
+ .nf
552
+
553
+ gem "the_hatch", gist: "4815162342"
554
+ .
555
+ .fi
556
+ .
557
+ .IP "" 0
558
+ .
559
+ .P
560
+ Is equivalent to:
561
+ .
562
+ .IP "" 4
563
+ .
564
+ .nf
565
+
566
+ gem "the_hatch", git: "https://gist\.github\.com/4815162342\.git"
567
+ .
568
+ .fi
569
+ .
570
+ .IP "" 0
571
+ .
572
+ .P
573
+ Since the \fBgist\fR method is a specialization of \fBgit_source\fR, it accepts a \fB:branch\fR named argument\.
574
+ .
575
+ .SS "BITBUCKET"
576
+ If the git repository you want to use is hosted on Bitbucket and is public, you can use the :bitbucket shorthand to specify the bitbucket username and repository name (without the trailing "\.git"), separated by a slash\. If both the username and repository name are the same, you can omit one\.
577
+ .
578
+ .IP "" 4
579
+ .
580
+ .nf
581
+
582
+ gem "rails", bitbucket: "rails/rails"
583
+ gem "rails", bitbucket: "rails"
584
+ .
585
+ .fi
586
+ .
587
+ .IP "" 0
588
+ .
589
+ .P
590
+ Are both equivalent to
591
+ .
592
+ .IP "" 4
593
+ .
594
+ .nf
595
+
596
+ gem "rails", git: "https://rails@bitbucket\.org/rails/rails\.git"
597
+ .
598
+ .fi
599
+ .
600
+ .IP "" 0
601
+ .
602
+ .P
603
+ Since the \fBbitbucket\fR method is a specialization of \fBgit_source\fR, it accepts a \fB:branch\fR named argument\.
604
+ .
605
+ .SS "PATH"
606
+ You can specify that a gem is located in a particular location on the file system\. Relative paths are resolved relative to the directory containing the \fBGemfile\fR\.
607
+ .
608
+ .P
609
+ Similar to the semantics of the \fB:git\fR option, the \fB:path\fR option requires that the directory in question either contains a \fB\.gemspec\fR for the gem, or that you specify an explicit version that bundler should use\.
610
+ .
611
+ .P
612
+ Unlike \fB:git\fR, bundler does not compile C extensions for gems specified as paths\.
613
+ .
614
+ .IP "" 4
615
+ .
616
+ .nf
617
+
618
+ gem "rails", path: "vendor/rails"
619
+ .
620
+ .fi
621
+ .
622
+ .IP "" 0
623
+ .
624
+ .P
625
+ If you would like to use multiple local gems directly from the filesystem, you can set a global \fBpath\fR option to the path containing the gem\'s files\. This will automatically load gemspec files from subdirectories\.
626
+ .
627
+ .IP "" 4
628
+ .
629
+ .nf
630
+
631
+ path \'components\' do
632
+ gem \'admin_ui\'
633
+ gem \'public_ui\'
634
+ end
635
+ .
636
+ .fi
637
+ .
638
+ .IP "" 0
639
+ .
640
+ .SH "BLOCK FORM OF SOURCE, GIT, PATH, GROUP and PLATFORMS"
641
+ The \fB:source\fR, \fB:git\fR, \fB:path\fR, \fB:group\fR, and \fB:platforms\fR options may be applied to a group of gems by using block form\.
642
+ .
643
+ .IP "" 4
644
+ .
645
+ .nf
646
+
647
+ source "https://gems\.example\.com" do
648
+ gem "some_internal_gem"
649
+ gem "another_internal_gem"
650
+ end
651
+
652
+ git "https://github\.com/rails/rails\.git" do
653
+ gem "activesupport"
654
+ gem "actionpack"
655
+ end
656
+
657
+ platforms :ruby do
658
+ gem "ruby\-debug"
659
+ gem "sqlite3"
660
+ end
661
+
662
+ group :development, optional: true do
663
+ gem "wirble"
664
+ gem "faker"
665
+ end
666
+ .
667
+ .fi
668
+ .
669
+ .IP "" 0
670
+ .
671
+ .P
672
+ In the case of the group block form the :optional option can be given to prevent a group from being installed unless listed in the \fB\-\-with\fR option given to the \fBbundle install\fR command\.
673
+ .
674
+ .P
675
+ In the case of the \fBgit\fR block form, the \fB:ref\fR, \fB:branch\fR, \fB:tag\fR, and \fB:submodules\fR options may be passed to the \fBgit\fR method, and all gems in the block will inherit those options\.
676
+ .
677
+ .P
678
+ The presence of a \fBsource\fR block in a Gemfile also makes that source available as a possible global source for any other gems which do not specify explicit sources\. Thus, when defining source blocks, it is recommended that you also ensure all other gems in the Gemfile are using explicit sources, either via source blocks or \fB:source\fR directives on individual gems\.
679
+ .
680
+ .SH "INSTALL_IF"
681
+ The \fBinstall_if\fR method allows gems to be installed based on a proc or lambda\. This is especially useful for optional gems that can only be used if certain software is installed or some other conditions are met\.
682
+ .
683
+ .IP "" 4
684
+ .
685
+ .nf
686
+
687
+ install_if \-> { RUBY_PLATFORM =~ /darwin/ } do
688
+ gem "pasteboard"
689
+ end
690
+ .
691
+ .fi
692
+ .
693
+ .IP "" 0
694
+ .
695
+ .SH "GEMSPEC"
696
+ The \fB\.gemspec\fR \fIhttp://guides\.rubygems\.org/specification\-reference/\fR file is where you provide metadata about your gem to Rubygems\. Some required Gemspec attributes include the name, description, and homepage of your gem\. This is also where you specify the dependencies your gem needs to run\.
697
+ .
698
+ .P
699
+ If you wish to use Bundler to help install dependencies for a gem while it is being developed, use the \fBgemspec\fR method to pull in the dependencies listed in the \fB\.gemspec\fR file\.
700
+ .
701
+ .P
702
+ The \fBgemspec\fR method adds any runtime dependencies as gem requirements in the default group\. It also adds development dependencies as gem requirements in the \fBdevelopment\fR group\. Finally, it adds a gem requirement on your project (\fBpath: \'\.\'\fR)\. In conjunction with \fBBundler\.setup\fR, this allows you to require project files in your test code as you would if the project were installed as a gem; you need not manipulate the load path manually or require project files via relative paths\.
703
+ .
704
+ .P
705
+ The \fBgemspec\fR method supports optional \fB:path\fR, \fB:glob\fR, \fB:name\fR, and \fB:development_group\fR options, which control where bundler looks for the \fB\.gemspec\fR, the glob it uses to look for the gemspec (defaults to: "{,\fI,\fR/*}\.gemspec"), what named \fB\.gemspec\fR it uses (if more than one is present), and which group development dependencies are included in\.
706
+ .
707
+ .P
708
+ When a \fBgemspec\fR dependency encounters version conflicts during resolution, the local version under development will always be selected \-\- even if there are remote versions that better match other requirements for the \fBgemspec\fR gem\.
709
+ .
710
+ .SH "SOURCE PRIORITY"
711
+ When attempting to locate a gem to satisfy a gem requirement, bundler uses the following priority order:
712
+ .
713
+ .IP "1." 4
714
+ The source explicitly attached to the gem (using \fB:source\fR, \fB:path\fR, or \fB:git\fR)
715
+ .
716
+ .IP "2." 4
717
+ For implicit gems (dependencies of explicit gems), any source, git, or path repository declared on the parent\. This results in bundler prioritizing the ActiveSupport gem from the Rails git repository over ones from \fBrubygems\.org\fR
718
+ .
719
+ .IP "3." 4
720
+ If neither of the above conditions are met, the global source will be used\. If multiple global sources are specified, they will be prioritized from last to first, but this is deprecated since Bundler 1\.13, so Bundler prints a warning and will abort with an error in the future\.
721
+ .
722
+ .IP "" 0
723
+