rubygems-update 3.2.0.rc.2 → 3.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (254) hide show
  1. checksums.yaml +4 -4
  2. data/{History.txt → CHANGELOG.md} +520 -501
  3. data/Manifest.txt +62 -55
  4. data/POLICIES.md +4 -3
  5. data/Rakefile +23 -7
  6. data/bundler/CHANGELOG.md +84 -19
  7. data/bundler/UPGRADING.md +1 -1
  8. data/bundler/bundler.gemspec +1 -1
  9. data/bundler/lib/bundler.rb +11 -0
  10. data/bundler/lib/bundler/build_metadata.rb +2 -2
  11. data/bundler/lib/bundler/cli.rb +5 -5
  12. data/bundler/lib/bundler/cli/binstubs.rb +6 -2
  13. data/bundler/lib/bundler/cli/exec.rb +3 -3
  14. data/bundler/lib/bundler/cli/install.rb +14 -5
  15. data/bundler/lib/bundler/cli/outdated.rb +0 -2
  16. data/bundler/lib/bundler/cli/update.rb +1 -1
  17. data/bundler/lib/bundler/compact_index_client/cache.rb +5 -13
  18. data/bundler/lib/bundler/compact_index_client/gem_parser.rb +28 -0
  19. data/bundler/lib/bundler/compact_index_client/updater.rb +5 -5
  20. data/bundler/lib/bundler/definition.rb +23 -25
  21. data/bundler/lib/bundler/dependency.rb +3 -1
  22. data/bundler/lib/bundler/env.rb +1 -1
  23. data/bundler/lib/bundler/feature_flag.rb +0 -1
  24. data/bundler/lib/bundler/fetcher/index.rb +2 -3
  25. data/bundler/lib/bundler/friendly_errors.rb +15 -0
  26. data/bundler/lib/bundler/gem_helpers.rb +30 -24
  27. data/bundler/lib/bundler/index.rb +5 -1
  28. data/bundler/lib/bundler/injector.rb +9 -2
  29. data/bundler/lib/bundler/installer.rb +7 -5
  30. data/bundler/lib/bundler/lazy_specification.rb +20 -9
  31. data/bundler/lib/bundler/man/.document +1 -0
  32. data/bundler/{man → lib/bundler/man}/bundle-add.1 +1 -1
  33. data/bundler/{man → lib/bundler/man}/bundle-add.1.ronn +0 -0
  34. data/bundler/{man → lib/bundler/man}/bundle-binstubs.1 +1 -1
  35. data/bundler/{man → lib/bundler/man}/bundle-binstubs.1.ronn +0 -0
  36. data/bundler/{man → lib/bundler/man}/bundle-cache.1 +1 -1
  37. data/bundler/{man → lib/bundler/man}/bundle-cache.1.ronn +0 -0
  38. data/bundler/{man → lib/bundler/man}/bundle-check.1 +1 -1
  39. data/bundler/{man → lib/bundler/man}/bundle-check.1.ronn +0 -0
  40. data/bundler/{man → lib/bundler/man}/bundle-clean.1 +1 -1
  41. data/bundler/{man → lib/bundler/man}/bundle-clean.1.ronn +0 -0
  42. data/bundler/{man → lib/bundler/man}/bundle-config.1 +2 -5
  43. data/bundler/{man → lib/bundler/man}/bundle-config.1.ronn +1 -9
  44. data/bundler/{man → lib/bundler/man}/bundle-doctor.1 +1 -1
  45. data/bundler/{man → lib/bundler/man}/bundle-doctor.1.ronn +0 -0
  46. data/bundler/{man → lib/bundler/man}/bundle-exec.1 +1 -1
  47. data/bundler/{man → lib/bundler/man}/bundle-exec.1.ronn +0 -0
  48. data/bundler/{man → lib/bundler/man}/bundle-gem.1 +1 -1
  49. data/bundler/{man → lib/bundler/man}/bundle-gem.1.ronn +0 -0
  50. data/bundler/{man → lib/bundler/man}/bundle-info.1 +1 -1
  51. data/bundler/{man → lib/bundler/man}/bundle-info.1.ronn +0 -0
  52. data/bundler/{man → lib/bundler/man}/bundle-init.1 +1 -1
  53. data/bundler/{man → lib/bundler/man}/bundle-init.1.ronn +0 -0
  54. data/bundler/{man → lib/bundler/man}/bundle-inject.1 +1 -1
  55. data/bundler/{man → lib/bundler/man}/bundle-inject.1.ronn +0 -0
  56. data/bundler/{man → lib/bundler/man}/bundle-install.1 +2 -2
  57. data/bundler/{man → lib/bundler/man}/bundle-install.1.ronn +1 -1
  58. data/bundler/{man → lib/bundler/man}/bundle-list.1 +1 -1
  59. data/bundler/{man → lib/bundler/man}/bundle-list.1.ronn +0 -0
  60. data/bundler/{man → lib/bundler/man}/bundle-lock.1 +1 -1
  61. data/bundler/{man → lib/bundler/man}/bundle-lock.1.ronn +0 -0
  62. data/bundler/{man → lib/bundler/man}/bundle-open.1 +1 -1
  63. data/bundler/{man → lib/bundler/man}/bundle-open.1.ronn +0 -0
  64. data/bundler/{man → lib/bundler/man}/bundle-outdated.1 +1 -1
  65. data/bundler/{man → lib/bundler/man}/bundle-outdated.1.ronn +0 -0
  66. data/bundler/{man → lib/bundler/man}/bundle-platform.1 +1 -1
  67. data/bundler/{man → lib/bundler/man}/bundle-platform.1.ronn +0 -0
  68. data/bundler/{man → lib/bundler/man}/bundle-pristine.1 +1 -1
  69. data/bundler/{man → lib/bundler/man}/bundle-pristine.1.ronn +0 -0
  70. data/bundler/{man → lib/bundler/man}/bundle-remove.1 +1 -1
  71. data/bundler/{man → lib/bundler/man}/bundle-remove.1.ronn +0 -0
  72. data/bundler/{man → lib/bundler/man}/bundle-show.1 +1 -1
  73. data/bundler/{man → lib/bundler/man}/bundle-show.1.ronn +0 -0
  74. data/bundler/{man → lib/bundler/man}/bundle-update.1 +1 -1
  75. data/bundler/{man → lib/bundler/man}/bundle-update.1.ronn +0 -0
  76. data/bundler/{man → lib/bundler/man}/bundle-viz.1 +1 -1
  77. data/bundler/{man → lib/bundler/man}/bundle-viz.1.ronn +0 -0
  78. data/bundler/{man → lib/bundler/man}/bundle.1 +1 -1
  79. data/bundler/{man → lib/bundler/man}/bundle.1.ronn +0 -0
  80. data/bundler/{man → lib/bundler/man}/gemfile.5 +1 -1
  81. data/bundler/{man → lib/bundler/man}/gemfile.5.ronn +0 -0
  82. data/bundler/lib/bundler/man/index.txt +25 -0
  83. data/bundler/lib/bundler/plugin/api/source.rb +1 -1
  84. data/bundler/lib/bundler/plugin/dsl.rb +1 -1
  85. data/bundler/lib/bundler/resolver.rb +25 -29
  86. data/bundler/lib/bundler/resolver/spec_group.rb +19 -25
  87. data/bundler/lib/bundler/rubygems_integration.rb +4 -6
  88. data/bundler/lib/bundler/settings.rb +0 -1
  89. data/bundler/lib/bundler/source/git/git_proxy.rb +28 -41
  90. data/bundler/lib/bundler/spec_set.rb +6 -8
  91. data/bundler/lib/bundler/stub_specification.rb +0 -2
  92. data/bundler/lib/bundler/templates/newgem/README.md.tt +0 -1
  93. data/bundler/lib/bundler/templates/newgem/lib/newgem.rb.tt +2 -2
  94. data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +6 -0
  95. data/bundler/lib/bundler/uri_credentials_filter.rb +2 -0
  96. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo.rb +0 -1
  97. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +34 -1
  98. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +2 -2
  99. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +1 -1
  100. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +1 -1
  101. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +38 -40
  102. data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +12 -8
  103. data/bundler/lib/bundler/vendor/tmpdir/lib/tmpdir.rb +154 -0
  104. data/bundler/lib/bundler/vendored_tmpdir.rb +4 -0
  105. data/bundler/lib/bundler/version.rb +1 -1
  106. data/lib/rubygems.rb +6 -2
  107. data/lib/rubygems/available_set.rb +1 -1
  108. data/lib/rubygems/command_manager.rb +2 -2
  109. data/lib/rubygems/commands/build_command.rb +37 -20
  110. data/lib/rubygems/commands/cert_command.rb +1 -1
  111. data/lib/rubygems/commands/help_command.rb +2 -0
  112. data/lib/rubygems/commands/owner_command.rb +10 -3
  113. data/lib/rubygems/commands/pristine_command.rb +1 -1
  114. data/lib/rubygems/commands/push_command.rb +7 -4
  115. data/lib/rubygems/commands/query_command.rb +17 -0
  116. data/lib/rubygems/commands/server_command.rb +4 -0
  117. data/lib/rubygems/commands/setup_command.rb +26 -90
  118. data/lib/rubygems/commands/sources_command.rb +6 -2
  119. data/lib/rubygems/commands/specification_command.rb +6 -0
  120. data/lib/rubygems/commands/yank_command.rb +4 -5
  121. data/lib/rubygems/core_ext/kernel_require.rb +3 -0
  122. data/lib/rubygems/core_ext/kernel_warn.rb +6 -7
  123. data/lib/rubygems/defaults.rb +2 -2
  124. data/lib/rubygems/dependency.rb +1 -1
  125. data/lib/rubygems/dependency_installer.rb +5 -3
  126. data/lib/rubygems/ext/builder.rb +16 -35
  127. data/lib/rubygems/ext/cmake_builder.rb +5 -6
  128. data/lib/rubygems/ext/configure_builder.rb +5 -6
  129. data/lib/rubygems/ext/ext_conf_builder.rb +19 -14
  130. data/lib/rubygems/ext/rake_builder.rb +4 -4
  131. data/lib/rubygems/gemcutter_utilities.rb +101 -20
  132. data/lib/rubygems/indexer.rb +0 -1
  133. data/lib/rubygems/install_update_options.rb +2 -2
  134. data/lib/rubygems/installer.rb +12 -32
  135. data/lib/rubygems/installer_test_case.rb +7 -6
  136. data/lib/rubygems/name_tuple.rb +1 -1
  137. data/lib/rubygems/openssl.rb +4 -4
  138. data/lib/rubygems/package.rb +3 -2
  139. data/lib/rubygems/package/tar_header.rb +1 -1
  140. data/lib/rubygems/package/tar_test_case.rb +1 -1
  141. data/lib/rubygems/platform.rb +18 -7
  142. data/lib/rubygems/query_utils.rb +0 -9
  143. data/lib/rubygems/remote_fetcher.rb +5 -4
  144. data/lib/rubygems/request.rb +4 -3
  145. data/lib/rubygems/request_set.rb +2 -13
  146. data/lib/rubygems/request_set/gem_dependency_api.rb +4 -4
  147. data/lib/rubygems/requirement.rb +1 -1
  148. data/lib/rubygems/resolver.rb +7 -2
  149. data/lib/rubygems/resolver/activation_request.rb +9 -1
  150. data/lib/rubygems/resolver/api_set.rb +29 -20
  151. data/lib/rubygems/resolver/api_set/gem_parser.rb +20 -0
  152. data/lib/rubygems/resolver/api_specification.rb +8 -3
  153. data/lib/rubygems/resolver/best_set.rb +2 -2
  154. data/lib/rubygems/resolver/conflict.rb +1 -1
  155. data/lib/rubygems/resolver/dependency_request.rb +1 -1
  156. data/lib/rubygems/resolver/index_specification.rb +29 -0
  157. data/lib/rubygems/resolver/installer_set.rb +58 -9
  158. data/lib/rubygems/resolver/lock_set.rb +1 -1
  159. data/lib/rubygems/resolver/molinillo/lib/molinillo.rb +6 -5
  160. data/lib/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb +7 -0
  161. data/lib/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb +1 -0
  162. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb +39 -5
  163. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/action.rb +1 -0
  164. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +2 -1
  165. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +2 -1
  166. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +2 -1
  167. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +2 -1
  168. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb +7 -6
  169. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/set_payload.rb +2 -1
  170. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/tag.rb +4 -3
  171. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb +43 -10
  172. data/lib/rubygems/resolver/molinillo/lib/molinillo/errors.rb +75 -7
  173. data/lib/rubygems/resolver/molinillo/lib/molinillo/gem_metadata.rb +2 -1
  174. data/lib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb +1 -0
  175. data/lib/rubygems/resolver/molinillo/lib/molinillo/modules/ui.rb +3 -1
  176. data/lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb +506 -165
  177. data/lib/rubygems/resolver/molinillo/lib/molinillo/resolver.rb +3 -2
  178. data/lib/rubygems/resolver/molinillo/lib/molinillo/state.rb +8 -4
  179. data/lib/rubygems/resolver/spec_specification.rb +14 -0
  180. data/lib/rubygems/resolver/specification.rb +13 -1
  181. data/lib/rubygems/s3_uri_signer.rb +1 -1
  182. data/lib/rubygems/security.rb +1 -2
  183. data/lib/rubygems/security/policy.rb +1 -1
  184. data/lib/rubygems/security/signer.rb +1 -1
  185. data/lib/rubygems/server.rb +7 -2
  186. data/lib/rubygems/source.rb +20 -9
  187. data/lib/rubygems/spec_fetcher.rb +1 -1
  188. data/lib/rubygems/specification.rb +8 -8
  189. data/lib/rubygems/ssl_certs/{index.rubygems.org → rubygems.org}/GlobalSignRootCA.pem +0 -0
  190. data/lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA_R3.pem +21 -0
  191. data/lib/rubygems/stub_specification.rb +1 -1
  192. data/lib/rubygems/test_case.rb +14 -27
  193. data/lib/rubygems/test_utilities.rb +6 -5
  194. data/lib/rubygems/uri_formatter.rb +2 -1
  195. data/lib/rubygems/version_option.rb +6 -0
  196. data/rubygems-update.gemspec +2 -2
  197. data/test/rubygems/data/null-required-rubygems-version.gemspec.rz +0 -0
  198. data/test/rubygems/test_bundled_ca.rb +9 -5
  199. data/test/rubygems/test_gem.rb +3 -3
  200. data/test/rubygems/test_gem_commands_build_command.rb +197 -5
  201. data/test/rubygems/test_gem_commands_cert_command.rb +2 -2
  202. data/test/rubygems/test_gem_commands_cleanup_command.rb +1 -1
  203. data/test/rubygems/test_gem_commands_contents_command.rb +2 -2
  204. data/test/rubygems/test_gem_commands_help_command.rb +15 -2
  205. data/test/rubygems/test_gem_commands_install_command.rb +132 -1
  206. data/test/rubygems/test_gem_commands_owner_command.rb +49 -1
  207. data/test/rubygems/test_gem_commands_pristine_command.rb +2 -2
  208. data/test/rubygems/test_gem_commands_push_command.rb +70 -5
  209. data/test/rubygems/test_gem_commands_query_command.rb +3 -3
  210. data/test/rubygems/test_gem_commands_setup_command.rb +20 -48
  211. data/test/rubygems/test_gem_commands_signin_command.rb +27 -3
  212. data/test/rubygems/test_gem_commands_sources_command.rb +60 -0
  213. data/test/rubygems/test_gem_commands_specification_command.rb +28 -0
  214. data/test/rubygems/test_gem_commands_update_command.rb +2 -2
  215. data/test/rubygems/test_gem_commands_yank_command.rb +31 -1
  216. data/test/rubygems/test_gem_dependency_installer.rb +63 -49
  217. data/test/rubygems/test_gem_dependency_list.rb +2 -2
  218. data/test/rubygems/test_gem_ext_builder.rb +16 -20
  219. data/test/rubygems/test_gem_ext_cmake_builder.rb +5 -13
  220. data/test/rubygems/test_gem_ext_configure_builder.rb +5 -11
  221. data/test/rubygems/test_gem_ext_ext_conf_builder.rb +9 -26
  222. data/test/rubygems/test_gem_ext_rake_builder.rb +30 -13
  223. data/test/rubygems/test_gem_gem_runner.rb +5 -4
  224. data/test/rubygems/test_gem_gemcutter_utilities.rb +3 -3
  225. data/test/rubygems/test_gem_install_update_options.rb +15 -3
  226. data/test/rubygems/test_gem_installer.rb +80 -71
  227. data/test/rubygems/test_gem_package.rb +8 -8
  228. data/test/rubygems/test_gem_package_old.rb +4 -4
  229. data/test/rubygems/test_gem_package_tar_writer.rb +1 -1
  230. data/test/rubygems/test_gem_platform.rb +63 -4
  231. data/test/rubygems/test_gem_remote_fetcher.rb +15 -19
  232. data/test/rubygems/test_gem_request.rb +2 -2
  233. data/test/rubygems/test_gem_request_set_lockfile.rb +4 -4
  234. data/test/rubygems/test_gem_resolver_api_set.rb +58 -55
  235. data/test/rubygems/test_gem_resolver_api_specification.rb +3 -3
  236. data/test/rubygems/test_gem_resolver_best_set.rb +26 -3
  237. data/test/rubygems/test_gem_resolver_conflict.rb +1 -1
  238. data/test/rubygems/test_gem_resolver_vendor_set.rb +1 -1
  239. data/test/rubygems/test_gem_security.rb +2 -2
  240. data/test/rubygems/test_gem_security_policy.rb +2 -2
  241. data/test/rubygems/test_gem_security_signer.rb +2 -2
  242. data/test/rubygems/test_gem_security_trust_dir.rb +2 -2
  243. data/test/rubygems/test_gem_source.rb +7 -2
  244. data/test/rubygems/test_gem_source_subpath_problem.rb +49 -0
  245. data/test/rubygems/test_gem_specification.rb +6 -7
  246. data/test/rubygems/test_gem_uninstaller.rb +7 -7
  247. data/test/rubygems/test_gem_validator.rb +1 -1
  248. data/test/rubygems/test_gem_version_option.rb +1 -1
  249. data/test/rubygems/test_require.rb +50 -9
  250. data/test/test_changelog_generator.rb +17 -0
  251. metadata +69 -86
  252. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/compatibility.rb +0 -26
  253. data/lib/rubygems/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem +0 -23
  254. data/lib/rubygems/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem +0 -25
@@ -105,7 +105,7 @@ automatically and that requires `bundler` to silently remember them. Since
105
105
 
106
106
  * `--local`:
107
107
  Do not attempt to connect to `rubygems.org`. Instead, Bundler will use the
108
- gems already present in Rubygems' cache or in `vendor/cache`. Note that if a
108
+ gems already present in Rubygems' cache or in `vendor/cache`. Note that if an
109
109
  appropriate platform-specific gem exists on `rubygems.org` it will not be
110
110
  found.
111
111
 
@@ -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\-LIST" "1" "October 2020" "" ""
4
+ .TH "BUNDLE\-LIST" "1" "November 2020" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-list\fR \- List all the gems in the bundle
@@ -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\-LOCK" "1" "October 2020" "" ""
4
+ .TH "BUNDLE\-LOCK" "1" "November 2020" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-lock\fR \- Creates / Updates a lockfile without installing
@@ -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\-OPEN" "1" "October 2020" "" ""
4
+ .TH "BUNDLE\-OPEN" "1" "November 2020" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-open\fR \- Opens the source directory for a gem in your bundle
@@ -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\-OUTDATED" "1" "October 2020" "" ""
4
+ .TH "BUNDLE\-OUTDATED" "1" "November 2020" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-outdated\fR \- List installed gems with newer versions available
@@ -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\-PLATFORM" "1" "October 2020" "" ""
4
+ .TH "BUNDLE\-PLATFORM" "1" "November 2020" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-platform\fR \- Displays platform compatibility information
@@ -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\-PRISTINE" "1" "October 2020" "" ""
4
+ .TH "BUNDLE\-PRISTINE" "1" "November 2020" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-pristine\fR \- Restores installed gems to their pristine condition
@@ -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\-REMOVE" "1" "October 2020" "" ""
4
+ .TH "BUNDLE\-REMOVE" "1" "November 2020" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-remove\fR \- Removes gems from the Gemfile
@@ -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\-SHOW" "1" "October 2020" "" ""
4
+ .TH "BUNDLE\-SHOW" "1" "November 2020" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem
@@ -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\-UPDATE" "1" "October 2020" "" ""
4
+ .TH "BUNDLE\-UPDATE" "1" "November 2020" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-update\fR \- Update your gems to the latest available versions
@@ -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\-VIZ" "1" "October 2020" "" ""
4
+ .TH "BUNDLE\-VIZ" "1" "November 2020" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-viz\fR \- Generates a visual dependency graph for your Gemfile
@@ -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" "1" "October 2020" "" ""
4
+ .TH "BUNDLE" "1" "November 2020" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\fR \- Ruby Dependency Management
@@ -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 "GEMFILE" "5" "October 2020" "" ""
4
+ .TH "GEMFILE" "5" "November 2020" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
@@ -0,0 +1,25 @@
1
+ Gemfile(5) gemfile.5
2
+ bundle(1) bundle.1
3
+ bundle-add(1) bundle-add.1
4
+ bundle-binstubs(1) bundle-binstubs.1
5
+ bundle-cache(1) bundle-cache.1
6
+ bundle-check(1) bundle-check.1
7
+ bundle-clean(1) bundle-clean.1
8
+ bundle-config(1) bundle-config.1
9
+ bundle-doctor(1) bundle-doctor.1
10
+ bundle-exec(1) bundle-exec.1
11
+ bundle-gem(1) bundle-gem.1
12
+ bundle-info(1) bundle-info.1
13
+ bundle-init(1) bundle-init.1
14
+ bundle-inject(1) bundle-inject.1
15
+ bundle-install(1) bundle-install.1
16
+ bundle-list(1) bundle-list.1
17
+ bundle-lock(1) bundle-lock.1
18
+ bundle-open(1) bundle-open.1
19
+ bundle-outdated(1) bundle-outdated.1
20
+ bundle-platform(1) bundle-platform.1
21
+ bundle-pristine(1) bundle-pristine.1
22
+ bundle-remove(1) bundle-remove.1
23
+ bundle-show(1) bundle-show.1
24
+ bundle-update(1) bundle-update.1
25
+ bundle-viz(1) bundle-viz.1
@@ -260,7 +260,7 @@ module Bundler
260
260
  end
261
261
 
262
262
  def to_s
263
- "plugin source for #{options[:type]} with uri #{uri}"
263
+ "plugin source for #{@type} with uri #{@uri}"
264
264
  end
265
265
 
266
266
  # Note: Do not override if you don't know what you are doing.
@@ -10,7 +10,7 @@ module Bundler
10
10
  # So that we don't have to override all there methods to dummy ones
11
11
  # explicitly.
12
12
  # They will be handled by method_missing
13
- [:gemspec, :gem, :path, :install_if, :platforms, :env].each {|m| undef_method m }
13
+ [:gemspec, :gem, :install_if, :platforms, :env].each {|m| undef_method m }
14
14
 
15
15
  # This lists the plugins that was added automatically and not specified by
16
16
  # the user.
@@ -75,7 +75,7 @@ module Bundler
75
75
  return unless debug?
76
76
  debug_info = yield
77
77
  debug_info = debug_info.inspect unless debug_info.is_a?(String)
78
- warn debug_info.split("\n").map {|s| "BUNDLER: " + " " * depth + s }
78
+ puts debug_info.split("\n").map {|s| "BUNDLER: " + " " * depth + s }
79
79
  end
80
80
 
81
81
  def debug?
@@ -106,18 +106,19 @@ module Bundler
106
106
  specification.dependencies_for_activated_platforms
107
107
  end
108
108
 
109
- def search_for(dependency)
110
- platform = dependency.__platform
111
- dependency = dependency.dep unless dependency.is_a? Gem::Dependency
112
- search = @search_for[dependency] ||= begin
109
+ def search_for(dependency_proxy)
110
+ platform = dependency_proxy.__platform
111
+ dependency = dependency_proxy.dep
112
+ @search_for[dependency_proxy] ||= begin
113
+ name = dependency.name
113
114
  index = index_for(dependency)
114
- results = index.search(dependency, @base[dependency.name])
115
+ results = index.search(dependency, @base[name])
115
116
 
116
- if vertex = @base_dg.vertex_named(dependency.name)
117
+ if vertex = @base_dg.vertex_named(name)
117
118
  locked_requirement = vertex.payload.requirement
118
119
  end
119
120
 
120
- if !@prerelease_specified[dependency.name] && (!@use_gvp || locked_requirement.nil?)
121
+ if !@prerelease_specified[name] && (!@use_gvp || locked_requirement.nil?)
121
122
  # Move prereleases to the beginning of the list, so they're considered
122
123
  # last during resolution.
123
124
  pre, results = results.partition {|spec| spec.version.prerelease? }
@@ -145,32 +146,27 @@ module Bundler
145
146
  end
146
147
  # GVP handles major itself, but it's still a bit risky to trust it with it
147
148
  # until we get it settled with new behavior. For 2.x it can take over all cases.
148
- if !@use_gvp
149
+ search = if !@use_gvp
149
150
  spec_groups
150
151
  else
151
152
  @gem_version_promoter.sort_versions(dependency, spec_groups)
152
153
  end
153
- end
154
- selected_sgs = []
155
- search.each do |sg|
156
- next unless sg.for?(platform)
157
- # Add a spec group for "non platform specific spec" as the fallback
158
- # spec group.
159
- sg_ruby = sg.copy_for(Gem::Platform::RUBY)
160
- selected_sgs << sg_ruby if sg_ruby
161
- all_platforms = @platforms + [platform]
162
- next if all_platforms.to_a == [Gem::Platform::RUBY]
163
- sg_all_platforms = nil
164
- self.class.sort_platforms(all_platforms).reverse_each do |other_platform|
165
- if sg_all_platforms.nil?
166
- sg_all_platforms = sg.copy_for(other_platform)
167
- else
168
- sg_all_platforms.activate_platform!(other_platform)
169
- end
154
+ selected_sgs = []
155
+ search.each do |sg|
156
+ next unless sg.for?(platform)
157
+ sg_all_platforms = sg.copy_for(self.class.sort_platforms(@platforms).reverse)
158
+ next unless sg_all_platforms
159
+
160
+ selected_sgs << sg_all_platforms
161
+
162
+ next if sg_all_platforms.activated_platforms == [Gem::Platform::RUBY]
163
+ # Add a spec group for "non platform specific spec" as the fallback
164
+ # spec group.
165
+ sg_ruby = sg.copy_for([Gem::Platform::RUBY])
166
+ selected_sgs.insert(-2, sg_ruby) if sg_ruby
170
167
  end
171
- selected_sgs << sg_all_platforms
168
+ selected_sgs
172
169
  end
173
- selected_sgs
174
170
  end
175
171
 
176
172
  def index_for(dependency)
@@ -302,7 +298,7 @@ module Bundler
302
298
  versions_with_platforms = specs.map {|s| [s.version, s.platform] }
303
299
  message = String.new("Could not find gem '#{SharedHelpers.pretty_dependency(requirement)}' in #{source}#{cache_message}.\n")
304
300
  message << if versions_with_platforms.any?
305
- "The source contains '#{name}' at: #{formatted_versions_with_platforms(versions_with_platforms)}"
301
+ "The source contains the following versions of '#{name}': #{formatted_versions_with_platforms(versions_with_platforms)}"
306
302
  else
307
303
  "The source does not contain any versions of '#{name}'"
308
304
  end
@@ -6,7 +6,7 @@ module Bundler
6
6
  include GemHelpers
7
7
 
8
8
  attr_accessor :name, :version, :source
9
- attr_accessor :ignores_bundler_dependencies
9
+ attr_accessor :ignores_bundler_dependencies, :activated_platforms
10
10
 
11
11
  def initialize(all_specs)
12
12
  @all_specs = all_specs
@@ -25,33 +25,29 @@ module Bundler
25
25
 
26
26
  def to_specs
27
27
  @activated_platforms.map do |p|
28
- next unless s = @specs[p]
29
- lazy_spec = LazySpecification.new(name, version, s.platform, source)
30
- lazy_spec.dependencies.replace s.dependencies
31
- lazy_spec
32
- end.compact.uniq
33
- end
28
+ specs = @specs[p]
29
+ next unless specs.any?
34
30
 
35
- def activate_platform!(platform)
36
- return unless for?(platform)
37
- return if @activated_platforms.include?(platform)
38
- @activated_platforms << platform
31
+ specs.map do |s|
32
+ lazy_spec = LazySpecification.new(name, version, s.platform, source)
33
+ lazy_spec.dependencies.replace s.dependencies
34
+ lazy_spec
35
+ end
36
+ end.flatten.compact.uniq
39
37
  end
40
38
 
41
- def copy_for(platform)
39
+ def copy_for(platforms)
40
+ platforms.select! {|p| for?(p) }
41
+ return unless platforms.any?
42
+
42
43
  copied_sg = self.class.new(@all_specs)
43
44
  copied_sg.ignores_bundler_dependencies = @ignores_bundler_dependencies
44
- return nil unless copied_sg.for?(platform)
45
- copied_sg.activate_platform!(platform)
45
+ copied_sg.activated_platforms = platforms
46
46
  copied_sg
47
47
  end
48
48
 
49
- def spec_for(platform)
50
- @specs[platform]
51
- end
52
-
53
49
  def for?(platform)
54
- !spec_for(platform).nil?
50
+ @specs[platform].any?
55
51
  end
56
52
 
57
53
  def to_s
@@ -62,7 +58,7 @@ module Bundler
62
58
  def dependencies_for_activated_platforms
63
59
  dependencies = @activated_platforms.map {|p| __dependencies[p] }
64
60
  metadata_dependencies = @activated_platforms.map do |platform|
65
- metadata_dependencies(@specs[platform], platform)
61
+ metadata_dependencies(@specs[platform].first, platform)
66
62
  end
67
63
  dependencies.concat(metadata_dependencies).flatten
68
64
  end
@@ -98,7 +94,8 @@ module Bundler
98
94
  def __dependencies
99
95
  @dependencies = Hash.new do |dependencies, platform|
100
96
  dependencies[platform] = []
101
- if spec = @specs[platform]
97
+ specs = @specs[platform]
98
+ if spec = specs.first
102
99
  spec.dependencies.each do |dep|
103
100
  next if dep.type == :development
104
101
  next if @ignores_bundler_dependencies && dep.name == "bundler".freeze
@@ -110,10 +107,7 @@ module Bundler
110
107
  end
111
108
 
112
109
  def metadata_dependencies(spec, platform)
113
- return [] unless spec
114
- # Only allow endpoint specifications since they won't hit the network to
115
- # fetch the full gemspec when calling required_ruby_version
116
- return [] if !spec.is_a?(EndpointSpecification) && !spec.is_a?(Gem::Specification)
110
+ return [] unless spec && spec.is_a?(Gem::Specification)
117
111
  dependencies = []
118
112
  if !spec.required_ruby_version.nil? && !spec.required_ruby_version.none?
119
113
  dependencies << DepProxy.new(Gem::Dependency.new("Ruby\0", spec.required_ruby_version), platform)
@@ -110,11 +110,6 @@ module Bundler
110
110
  obj.to_s
111
111
  end
112
112
 
113
- def platforms
114
- return [Gem::Platform::RUBY] if Bundler.settings[:force_ruby_platform]
115
- Gem.platforms
116
- end
117
-
118
113
  def configuration
119
114
  require_relative "psyched_yaml"
120
115
  Gem.configuration
@@ -227,6 +222,10 @@ module Bundler
227
222
  Gem.load_plugin_files(files) if Gem.respond_to?(:load_plugin_files)
228
223
  end
229
224
 
225
+ def load_env_plugins
226
+ Gem.load_env_plugins if Gem.respond_to?(:load_env_plugins)
227
+ end
228
+
230
229
  def ui=(obj)
231
230
  Gem::DefaultUserInteraction.ui = obj
232
231
  end
@@ -561,7 +560,6 @@ module Bundler
561
560
  end
562
561
 
563
562
  def all_specs
564
- require_relative "remote_specification"
565
563
  Gem::Specification.stubs.map do |stub|
566
564
  StubSpecification.from_stub(stub)
567
565
  end
@@ -42,7 +42,6 @@ module Bundler
42
42
  setup_makes_kernel_gem_public
43
43
  silence_deprecations
44
44
  silence_root_warning
45
- specific_platform
46
45
  suppress_install_using_messages
47
46
  unlock_source_unlocks_spec
48
47
  update_requires_all_flag
@@ -67,13 +67,13 @@ module Bundler
67
67
 
68
68
  def branch
69
69
  @branch ||= allowed_with_path do
70
- git("rev-parse --abbrev-ref HEAD", :dir => path).strip
70
+ git("rev-parse", "--abbrev-ref", "HEAD", :dir => path).strip
71
71
  end
72
72
  end
73
73
 
74
74
  def contains?(commit)
75
75
  allowed_with_path do
76
- result, status = git_null("branch --contains #{commit}", :dir => path)
76
+ result, status = git_null("branch", "--contains", commit, :dir => path)
77
77
  status.success? && result =~ /^\* (.*)$/
78
78
  end
79
79
  end
@@ -88,20 +88,22 @@ module Bundler
88
88
 
89
89
  def checkout
90
90
  return if path.exist? && has_revision_cached?
91
- extra_ref = "#{Shellwords.shellescape(ref)}:#{Shellwords.shellescape(ref)}" if ref && ref.start_with?("refs/")
91
+ extra_ref = "#{ref}:#{ref}" if ref && ref.start_with?("refs/")
92
92
 
93
93
  Bundler.ui.info "Fetching #{URICredentialsFilter.credential_filtered_uri(uri)}"
94
94
 
95
+ configured_uri = configured_uri_for(uri).to_s
96
+
95
97
  unless path.exist?
96
98
  SharedHelpers.filesystem_access(path.dirname) do |p|
97
99
  FileUtils.mkdir_p(p)
98
100
  end
99
- git_retry %(clone #{uri_escaped_with_configured_credentials} "#{path}" --bare --no-hardlinks --quiet)
101
+ git_retry "clone", configured_uri, path.to_s, "--bare", "--no-hardlinks", "--quiet"
100
102
  return unless extra_ref
101
103
  end
102
104
 
103
105
  with_path do
104
- git_retry %(fetch --force --quiet --tags #{uri_escaped_with_configured_credentials} "refs/heads/*:refs/heads/*" #{extra_ref}), :dir => path
106
+ git_retry(*["fetch", "--force", "--quiet", "--tags", configured_uri, "refs/heads/*:refs/heads/*", extra_ref].compact, :dir => path)
105
107
  end
106
108
  end
107
109
 
@@ -115,56 +117,55 @@ module Bundler
115
117
  SharedHelpers.filesystem_access(destination) do |p|
116
118
  FileUtils.rm_rf(p)
117
119
  end
118
- git_retry %(clone --no-checkout --quiet "#{path}" "#{destination}")
120
+ git_retry "clone", "--no-checkout", "--quiet", path.to_s, destination.to_s
119
121
  File.chmod(((File.stat(destination).mode | 0o777) & ~File.umask), destination)
120
122
  rescue Errno::EEXIST => e
121
- file_path = e.message[%r{.*?(/.*)}, 1]
123
+ file_path = e.message[%r{.*?((?:[a-zA-Z]:)?/.*)}, 1]
122
124
  raise GitError, "Bundler could not install a gem because it needs to " \
123
125
  "create a directory, but a file exists - #{file_path}. Please delete " \
124
126
  "this file and try again."
125
127
  end
126
128
  end
127
129
  # method 2
128
- git_retry %(fetch --force --quiet --tags "#{path}"), :dir => destination
130
+ git_retry "fetch", "--force", "--quiet", "--tags", path.to_s, :dir => destination
129
131
 
130
132
  begin
131
- git "reset --hard #{@revision}", :dir => destination
133
+ git "reset", "--hard", @revision, :dir => destination
132
134
  rescue GitCommandError => e
133
135
  raise MissingGitRevisionError.new(e.command, path, destination, @revision, URICredentialsFilter.credential_filtered_uri(uri))
134
136
  end
135
137
 
136
138
  if submodules
137
- git_retry "submodule update --init --recursive", :dir => destination
139
+ git_retry "submodule", "update", "--init", "--recursive", :dir => destination
138
140
  elsif Gem::Version.create(version) >= Gem::Version.create("2.9.0")
139
141
  inner_command = "git -C $toplevel submodule deinit --force $sm_path"
140
- inner_command = inner_command.gsub("$") { '\$' } unless Bundler::WINDOWS
141
- git_retry "submodule foreach --quiet \"#{inner_command}\"", :dir => destination
142
+ git_retry "submodule", "foreach", "--quiet", inner_command, :dir => destination
142
143
  end
143
144
  end
144
145
 
145
146
  private
146
147
 
147
- def git_null(command, dir: SharedHelpers.pwd)
148
+ def git_null(*command, dir: SharedHelpers.pwd)
148
149
  check_allowed(command)
149
150
 
150
151
  out, status = SharedHelpers.with_clean_git_env do
151
- capture_and_ignore_stderr("git #{command}", :chdir => dir.to_s)
152
+ capture_and_ignore_stderr("git", "-C", dir.to_s, *command)
152
153
  end
153
154
 
154
155
  [URICredentialsFilter.credential_filtered_string(out, uri), status]
155
156
  end
156
157
 
157
- def git_retry(command, dir: SharedHelpers.pwd)
158
- Bundler::Retry.new("`git #{URICredentialsFilter.credential_filtered_string(command, uri)}`", GitNotAllowedError).attempts do
159
- git(command, :dir => dir)
158
+ def git_retry(*command, dir: SharedHelpers.pwd)
159
+ Bundler::Retry.new("`git -C #{dir} #{URICredentialsFilter.credential_filtered_string(command.shelljoin, uri)}`", GitNotAllowedError).attempts do
160
+ git(*command, :dir => dir)
160
161
  end
161
162
  end
162
163
 
163
- def git(command, dir: SharedHelpers.pwd)
164
+ def git(*command, dir: SharedHelpers.pwd)
164
165
  command_with_no_credentials = check_allowed(command)
165
166
 
166
167
  out, status = SharedHelpers.with_clean_git_env do
167
- capture_and_filter_stderr(uri, "git #{command}", :chdir => dir.to_s)
168
+ capture_and_filter_stderr("git", "-C", dir.to_s, *command)
168
169
  end
169
170
 
170
171
  raise GitCommandError.new(command_with_no_credentials, path, dir) unless status.success?
@@ -174,7 +175,7 @@ module Bundler
174
175
 
175
176
  def has_revision_cached?
176
177
  return unless @revision
177
- with_path { git("cat-file -e #{@revision}", :dir => path) }
178
+ with_path { git("cat-file", "-e", @revision, :dir => path) }
178
179
  true
179
180
  rescue GitError
180
181
  false
@@ -186,26 +187,12 @@ module Bundler
186
187
 
187
188
  def find_local_revision
188
189
  allowed_with_path do
189
- git("rev-parse --verify #{Shellwords.shellescape(ref)}", :dir => path).strip
190
+ git("rev-parse", "--verify", ref, :dir => path).strip
190
191
  end
191
192
  rescue GitCommandError => e
192
193
  raise MissingGitRevisionError.new(e.command, path, path, ref, URICredentialsFilter.credential_filtered_uri(uri))
193
194
  end
194
195
 
195
- # Escape the URI for git commands
196
- def uri_escaped_with_configured_credentials
197
- remote = configured_uri_for(uri)
198
- if Bundler::WINDOWS
199
- # Windows quoting requires double quotes only, with double quotes
200
- # inside the string escaped by being doubled.
201
- '"' + remote.gsub('"') { '""' } + '"'
202
- else
203
- # Bash requires single quoted strings, with the single quotes escaped
204
- # by ending the string, escaping the quote, and restarting the string.
205
- "'" + remote.gsub("'") { "'\\''" } + "'"
206
- end
207
- end
208
-
209
196
  # Adds credentials to the URI as Fetcher#configured_uri_for does
210
197
  def configured_uri_for(uri)
211
198
  if /https?:/ =~ uri
@@ -233,21 +220,21 @@ module Bundler
233
220
  end
234
221
 
235
222
  def check_allowed(command)
236
- command_with_no_credentials = URICredentialsFilter.credential_filtered_string(command, uri)
223
+ command_with_no_credentials = URICredentialsFilter.credential_filtered_string(command.shelljoin, uri)
237
224
  raise GitNotAllowedError.new(command_with_no_credentials) unless allow?
238
225
  command_with_no_credentials
239
226
  end
240
227
 
241
- def capture_and_filter_stderr(uri, cmd, chdir: SharedHelpers.pwd)
228
+ def capture_and_filter_stderr(*cmd)
242
229
  require "open3"
243
- return_value, captured_err, status = Open3.capture3(cmd, :chdir => chdir)
244
- Bundler.ui.warn URICredentialsFilter.credential_filtered_string(captured_err, uri) if uri && !captured_err.empty?
230
+ return_value, captured_err, status = Open3.capture3(*cmd)
231
+ Bundler.ui.warn URICredentialsFilter.credential_filtered_string(captured_err, uri) unless captured_err.empty?
245
232
  [return_value, status]
246
233
  end
247
234
 
248
- def capture_and_ignore_stderr(cmd, chdir: SharedHelpers.pwd)
235
+ def capture_and_ignore_stderr(*cmd)
249
236
  require "open3"
250
- return_value, _, status = Open3.capture3(cmd, :chdir => chdir)
237
+ return_value, _, status = Open3.capture3(*cmd)
251
238
  [return_value, status]
252
239
  end
253
240
  end