rubygems-update 3.4.20 → 3.4.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (227) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +55 -0
  3. data/Manifest.txt +6 -0
  4. data/bundler/CHANGELOG.md +55 -3
  5. data/bundler/README.md +1 -2
  6. data/bundler/lib/bundler/build_metadata.rb +3 -3
  7. data/bundler/lib/bundler/cli/check.rb +1 -1
  8. data/bundler/lib/bundler/cli/gem.rb +4 -3
  9. data/bundler/lib/bundler/cli/install.rb +2 -2
  10. data/bundler/lib/bundler/cli/lock.rb +26 -23
  11. data/bundler/lib/bundler/cli/open.rb +5 -7
  12. data/bundler/lib/bundler/definition.rb +43 -26
  13. data/bundler/lib/bundler/endpoint_specification.rb +1 -1
  14. data/bundler/lib/bundler/env.rb +2 -2
  15. data/bundler/lib/bundler/errors.rb +15 -0
  16. data/bundler/lib/bundler/gem_helpers.rb +7 -0
  17. data/bundler/lib/bundler/gem_version_promoter.rb +2 -2
  18. data/bundler/lib/bundler/injector.rb +1 -1
  19. data/bundler/lib/bundler/installer/gem_installer.rb +5 -5
  20. data/bundler/lib/bundler/installer/parallel_installer.rb +0 -26
  21. data/bundler/lib/bundler/installer/standalone.rb +13 -6
  22. data/bundler/lib/bundler/lazy_specification.rb +4 -0
  23. data/bundler/lib/bundler/lockfile_parser.rb +29 -24
  24. data/bundler/lib/bundler/man/bundle-add.1 +1 -1
  25. data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
  26. data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
  27. data/bundler/lib/bundler/man/bundle-check.1 +1 -1
  28. data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
  29. data/bundler/lib/bundler/man/bundle-config.1 +1 -1
  30. data/bundler/lib/bundler/man/bundle-console.1 +1 -1
  31. data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
  32. data/bundler/lib/bundler/man/bundle-exec.1 +2 -2
  33. data/bundler/lib/bundler/man/bundle-exec.1.ronn +2 -3
  34. data/bundler/lib/bundler/man/bundle-gem.1 +1 -1
  35. data/bundler/lib/bundler/man/bundle-help.1 +1 -1
  36. data/bundler/lib/bundler/man/bundle-info.1 +1 -1
  37. data/bundler/lib/bundler/man/bundle-init.1 +1 -1
  38. data/bundler/lib/bundler/man/bundle-inject.1 +1 -1
  39. data/bundler/lib/bundler/man/bundle-install.1 +1 -1
  40. data/bundler/lib/bundler/man/bundle-list.1 +1 -1
  41. data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
  42. data/bundler/lib/bundler/man/bundle-open.1 +1 -1
  43. data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
  44. data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
  45. data/bundler/lib/bundler/man/bundle-plugin.1 +17 -17
  46. data/bundler/lib/bundler/man/bundle-plugin.1.ronn +5 -5
  47. data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
  48. data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
  49. data/bundler/lib/bundler/man/bundle-show.1 +1 -1
  50. data/bundler/lib/bundler/man/bundle-update.1 +1 -1
  51. data/bundler/lib/bundler/man/bundle-version.1 +1 -1
  52. data/bundler/lib/bundler/man/bundle-viz.1 +1 -1
  53. data/bundler/lib/bundler/man/bundle.1 +1 -1
  54. data/bundler/lib/bundler/man/gemfile.5 +1 -1
  55. data/bundler/lib/bundler/plugin/index.rb +8 -0
  56. data/bundler/lib/bundler/plugin.rb +9 -2
  57. data/bundler/lib/bundler/resolver/package.rb +5 -0
  58. data/bundler/lib/bundler/resolver.rb +27 -7
  59. data/bundler/lib/bundler/ruby_version.rb +8 -1
  60. data/bundler/lib/bundler/rubygems_ext.rb +3 -4
  61. data/bundler/lib/bundler/rubygems_gem_installer.rb +23 -8
  62. data/bundler/lib/bundler/settings.rb +53 -16
  63. data/bundler/lib/bundler/shared_helpers.rb +16 -1
  64. data/bundler/lib/bundler/source/git/git_proxy.rb +21 -4
  65. data/bundler/lib/bundler/source/metadata.rb +1 -1
  66. data/bundler/lib/bundler/spec_set.rb +7 -4
  67. data/bundler/lib/bundler/stub_specification.rb +4 -2
  68. data/bundler/lib/bundler/templates/newgem/Rakefile.tt +6 -2
  69. data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +1 -1
  70. data/bundler/lib/bundler/ui/shell.rb +1 -1
  71. data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb +1 -0
  72. data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb +21 -9
  73. data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +1 -1
  74. data/bundler/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb +3 -2
  75. data/bundler/lib/bundler/vendor/thor/lib/thor/actions/directory.rb +1 -1
  76. data/bundler/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +1 -1
  77. data/bundler/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +8 -10
  78. data/bundler/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +15 -4
  79. data/bundler/lib/bundler/vendor/thor/lib/thor/actions.rb +15 -15
  80. data/bundler/lib/bundler/vendor/thor/lib/thor/base.rb +140 -14
  81. data/bundler/lib/bundler/vendor/thor/lib/thor/command.rb +13 -4
  82. data/bundler/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +4 -0
  83. data/bundler/lib/bundler/vendor/thor/lib/thor/error.rb +16 -25
  84. data/bundler/lib/bundler/vendor/thor/lib/thor/group.rb +1 -1
  85. data/bundler/lib/bundler/vendor/thor/lib/thor/invocation.rb +1 -1
  86. data/bundler/lib/bundler/vendor/thor/lib/thor/nested_context.rb +2 -2
  87. data/bundler/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +20 -1
  88. data/bundler/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +33 -17
  89. data/bundler/lib/bundler/vendor/thor/lib/thor/parser/option.rb +27 -8
  90. data/bundler/lib/bundler/vendor/thor/lib/thor/parser/options.rb +44 -6
  91. data/bundler/lib/bundler/vendor/thor/lib/thor/rake_compat.rb +2 -2
  92. data/bundler/lib/bundler/vendor/thor/lib/thor/runner.rb +40 -30
  93. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +26 -150
  94. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/color.rb +4 -46
  95. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/column_printer.rb +29 -0
  96. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/html.rb +3 -45
  97. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/lcs_diff.rb +49 -0
  98. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/table_printer.rb +134 -0
  99. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/terminal.rb +42 -0
  100. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/wrapped_printer.rb +38 -0
  101. data/bundler/lib/bundler/vendor/thor/lib/thor/shell.rb +1 -1
  102. data/bundler/lib/bundler/vendor/thor/lib/thor/util.rb +8 -7
  103. data/bundler/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
  104. data/bundler/lib/bundler/vendor/thor/lib/thor.rb +155 -8
  105. data/bundler/lib/bundler/version.rb +1 -1
  106. data/bundler/lib/bundler/yaml_serializer.rb +12 -8
  107. data/bundler/lib/bundler.rb +0 -8
  108. data/lib/rubygems/basic_specification.rb +1 -1
  109. data/lib/rubygems/command.rb +5 -5
  110. data/lib/rubygems/command_manager.rb +1 -1
  111. data/lib/rubygems/commands/cert_command.rb +3 -3
  112. data/lib/rubygems/commands/check_command.rb +5 -1
  113. data/lib/rubygems/commands/cleanup_command.rb +1 -1
  114. data/lib/rubygems/commands/contents_command.rb +2 -2
  115. data/lib/rubygems/commands/environment_command.rb +2 -2
  116. data/lib/rubygems/commands/help_command.rb +3 -3
  117. data/lib/rubygems/commands/open_command.rb +1 -3
  118. data/lib/rubygems/commands/owner_command.rb +1 -1
  119. data/lib/rubygems/commands/setup_command.rb +10 -10
  120. data/lib/rubygems/commands/specification_command.rb +5 -1
  121. data/lib/rubygems/commands/stale_command.rb +1 -1
  122. data/lib/rubygems/commands/uninstall_command.rb +4 -4
  123. data/lib/rubygems/commands/unpack_command.rb +3 -3
  124. data/lib/rubygems/commands/update_command.rb +4 -4
  125. data/lib/rubygems/commands/yank_command.rb +1 -1
  126. data/lib/rubygems/config_file.rb +63 -16
  127. data/lib/rubygems/core_ext/kernel_gem.rb +1 -1
  128. data/lib/rubygems/core_ext/kernel_require.rb +2 -2
  129. data/lib/rubygems/defaults.rb +6 -2
  130. data/lib/rubygems/dependency_installer.rb +4 -4
  131. data/lib/rubygems/deprecate.rb +2 -1
  132. data/lib/rubygems/doctor.rb +2 -2
  133. data/lib/rubygems/errors.rb +1 -1
  134. data/lib/rubygems/exceptions.rb +1 -1
  135. data/lib/rubygems/ext/builder.rb +5 -4
  136. data/lib/rubygems/ext/cargo_builder.rb +2 -2
  137. data/lib/rubygems/ext/ext_conf_builder.rb +1 -1
  138. data/lib/rubygems/ext/rake_builder.rb +1 -1
  139. data/lib/rubygems/gem_runner.rb +5 -1
  140. data/lib/rubygems/gemcutter_utilities.rb +2 -2
  141. data/lib/rubygems/indexer.rb +1 -1
  142. data/lib/rubygems/install_update_options.rb +1 -1
  143. data/lib/rubygems/installer.rb +15 -20
  144. data/lib/rubygems/local_remote_options.rb +1 -1
  145. data/lib/rubygems/package/digest_io.rb +1 -1
  146. data/lib/rubygems/package/old.rb +1 -1
  147. data/lib/rubygems/package/tar_header.rb +2 -2
  148. data/lib/rubygems/package/tar_reader.rb +9 -2
  149. data/lib/rubygems/package/tar_writer.rb +2 -2
  150. data/lib/rubygems/package.rb +9 -9
  151. data/lib/rubygems/path_support.rb +1 -1
  152. data/lib/rubygems/platform.rb +12 -6
  153. data/lib/rubygems/query_utils.rb +4 -4
  154. data/lib/rubygems/remote_fetcher.rb +12 -4
  155. data/lib/rubygems/request.rb +1 -1
  156. data/lib/rubygems/request_set/gem_dependency_api.rb +1 -1
  157. data/lib/rubygems/request_set.rb +2 -1
  158. data/lib/rubygems/requirement.rb +1 -1
  159. data/lib/rubygems/resolver/api_set.rb +2 -1
  160. data/lib/rubygems/resolver/api_specification.rb +1 -1
  161. data/lib/rubygems/resolver.rb +3 -3
  162. data/lib/rubygems/security/signer.rb +10 -2
  163. data/lib/rubygems/security/trust_dir.rb +5 -5
  164. data/lib/rubygems/security.rb +1 -1
  165. data/lib/rubygems/security_option.rb +1 -1
  166. data/lib/rubygems/source/local.rb +2 -1
  167. data/lib/rubygems/source.rb +5 -1
  168. data/lib/rubygems/source_list.rb +1 -1
  169. data/lib/rubygems/spec_fetcher.rb +2 -2
  170. data/lib/rubygems/specification.rb +30 -23
  171. data/lib/rubygems/specification_policy.rb +11 -11
  172. data/lib/rubygems/uninstaller.rb +3 -3
  173. data/lib/rubygems/update_suggestion.rb +1 -1
  174. data/lib/rubygems/user_interaction.rb +2 -2
  175. data/lib/rubygems/util/licenses.rb +48 -0
  176. data/lib/rubygems/util.rb +5 -1
  177. data/lib/rubygems/validator.rb +1 -1
  178. data/lib/rubygems/version.rb +6 -5
  179. data/lib/rubygems/yaml_serializer.rb +93 -0
  180. data/lib/rubygems.rb +9 -9
  181. data/rubygems-update.gemspec +1 -1
  182. data/setup.rb +2 -0
  183. data/test/rubygems/bundler_test_gem.rb +6 -3
  184. data/test/rubygems/helper.rb +29 -21
  185. data/test/rubygems/package/tar_test_case.rb +2 -2
  186. data/test/rubygems/test_gem.rb +51 -26
  187. data/test/rubygems/test_gem_command.rb +3 -1
  188. data/test/rubygems/test_gem_command_manager.rb +6 -6
  189. data/test/rubygems/test_gem_commands_cert_command.rb +23 -23
  190. data/test/rubygems/test_gem_commands_cleanup_command.rb +2 -2
  191. data/test/rubygems/test_gem_commands_environment_command.rb +2 -1
  192. data/test/rubygems/test_gem_commands_exec_command.rb +5 -1
  193. data/test/rubygems/test_gem_commands_install_command.rb +5 -5
  194. data/test/rubygems/test_gem_commands_open_command.rb +5 -2
  195. data/test/rubygems/test_gem_commands_pristine_command.rb +2 -2
  196. data/test/rubygems/test_gem_commands_push_command.rb +7 -6
  197. data/test/rubygems/test_gem_commands_signin_command.rb +8 -8
  198. data/test/rubygems/test_gem_commands_uninstall_command.rb +21 -1
  199. data/test/rubygems/test_gem_commands_unpack_command.rb +2 -2
  200. data/test/rubygems/test_gem_config_file.rb +46 -12
  201. data/test/rubygems/test_gem_ext_builder.rb +1 -1
  202. data/test/rubygems/test_gem_ext_cargo_builder.rb +2 -2
  203. data/test/rubygems/test_gem_gemcutter_utilities.rb +8 -5
  204. data/test/rubygems/test_gem_install_update_options.rb +3 -3
  205. data/test/rubygems/test_gem_installer.rb +16 -16
  206. data/test/rubygems/test_gem_package.rb +35 -34
  207. data/test/rubygems/test_gem_package_old.rb +1 -1
  208. data/test/rubygems/test_gem_package_tar_header.rb +3 -3
  209. data/test/rubygems/test_gem_package_tar_reader.rb +19 -4
  210. data/test/rubygems/test_gem_package_tar_writer.rb +28 -28
  211. data/test/rubygems/test_gem_rdoc.rb +2 -2
  212. data/test/rubygems/test_gem_remote_fetcher.rb +13 -9
  213. data/test/rubygems/test_gem_request.rb +5 -5
  214. data/test/rubygems/test_gem_request_connection_pools.rb +2 -1
  215. data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +14 -7
  216. data/test/rubygems/test_gem_security.rb +2 -2
  217. data/test/rubygems/test_gem_security_policy.rb +2 -2
  218. data/test/rubygems/test_gem_security_signer.rb +2 -2
  219. data/test/rubygems/test_gem_security_trust_dir.rb +6 -6
  220. data/test/rubygems/test_gem_spec_fetcher.rb +2 -2
  221. data/test/rubygems/test_gem_specification.rb +29 -29
  222. data/test/rubygems/test_gem_stream_ui.rb +1 -1
  223. data/test/rubygems/test_gem_update_suggestion.rb +12 -6
  224. data/test/rubygems/test_gem_util.rb +2 -2
  225. data/test/rubygems/test_gem_version.rb +4 -2
  226. data/test/rubygems/utilities.rb +4 -3
  227. metadata +9 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d7e2796bcbea4d90f69fc8e0b49f30ff512777fd1f72bfcace6618e01505a24
4
- data.tar.gz: 1921651535aec5214a2504f28c7b62b405e75b15f01130753543e059bbe3f4e0
3
+ metadata.gz: d9b782e56366a59b623c07b32c0904f4513142800144c6696a711662e263eaff
4
+ data.tar.gz: b68d46e9eb675529b261a94fa642da2796cf72079d3b913efb4111ea869ef1c0
5
5
  SHA512:
6
- metadata.gz: a8897e246b67854308c5bafd93f42d03bdc3290c63a1dc1c2d706aff9694c393059de946d75fd49c29a1db4d16fe317c6e418e1c93166e000c6a30635166d47f
7
- data.tar.gz: 479607e63ac5901ed8b904e0502fd26bb671d2700a5343a812e9120cfabfa08d199ce4098ebce337ab47df09cb4fb1e644a850b361467fd40c2d8242e2e6d566
6
+ metadata.gz: f9c8dd30ce9c75aae03adb7d5aa98e717d11aaa3ea97dc0a02229c8ee9ad59c39300270b31557bcc8bee2b8a6cd5037aa5a50484ca6e352cc764d6cedd6bc34b
7
+ data.tar.gz: 5ecf50108472f52df50b05e05fc57ddf8bfc65c526e9ffd7e3623b0fd63d1d1714097617356b652d06f0bc7ee354a6b9a8b65b7856e0d1cdb2951407b16fb36d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,58 @@
1
+ # 3.4.22 / 2023-11-09
2
+
3
+ ## Enhancements:
4
+
5
+ * Update SPDX license list as of 2023-10-05. Pull request
6
+ [#7040](https://github.com/rubygems/rubygems/pull/7040) by
7
+ github-actions[bot]
8
+ * Remove unnecessary rescue. Pull request
9
+ [#7109](https://github.com/rubygems/rubygems/pull/7109) by
10
+ deivid-rodriguez
11
+ * Installs bundler 2.4.22 as a default gem.
12
+
13
+ ## Bug fixes:
14
+
15
+ * Handle empty array at built-in YAML serializer. Pull request
16
+ [#7099](https://github.com/rubygems/rubygems/pull/7099) by hsbt
17
+ * Ignore non-tar format `.gem` files during search. Pull request
18
+ [#7095](https://github.com/rubygems/rubygems/pull/7095) by dearblue
19
+ * Allow explicitly uninstalling multiple versions of same gem. Pull
20
+ request [#7063](https://github.com/rubygems/rubygems/pull/7063) by
21
+ kstevens715
22
+
23
+ ## Performance:
24
+
25
+ * Avoid regexp match on every call to `Gem::Platform.local`. Pull request
26
+ [#7104](https://github.com/rubygems/rubygems/pull/7104) by segiddins
27
+
28
+ ## Documentation:
29
+
30
+ * Get `Gem::Specification#extensions_dir` documented. Pull request
31
+ [#6218](https://github.com/rubygems/rubygems/pull/6218) by
32
+ deivid-rodriguez
33
+
34
+ # 3.4.21 / 2023-10-17
35
+
36
+ ## Enhancements:
37
+
38
+ * Abort `setup.rb` if Ruby is too old. Pull request
39
+ [#7011](https://github.com/rubygems/rubygems/pull/7011) by
40
+ deivid-rodriguez
41
+ * Remove usage of Dir.chdir that only execute a subprocess. Pull request
42
+ [#6930](https://github.com/rubygems/rubygems/pull/6930) by segiddins
43
+ * Freeze more strings in generated gemspecs. Pull request
44
+ [#6974](https://github.com/rubygems/rubygems/pull/6974) by segiddins
45
+ * Use pure-ruby YAML parser for loading configuration at RubyGems. Pull
46
+ request [#6615](https://github.com/rubygems/rubygems/pull/6615) by hsbt
47
+ * Installs bundler 2.4.21 as a default gem.
48
+
49
+ ## Documentation:
50
+
51
+ * Update suggested variable for bindir. Pull request
52
+ [#7028](https://github.com/rubygems/rubygems/pull/7028) by hsbt
53
+ * Fix invalid links in documentation. Pull request
54
+ [#7008](https://github.com/rubygems/rubygems/pull/7008) by simi
55
+
1
56
  # 3.4.20 / 2023-09-27
2
57
 
3
58
  ## Enhancements:
data/Manifest.txt CHANGED
@@ -302,7 +302,12 @@ bundler/lib/bundler/vendor/thor/lib/thor/runner.rb
302
302
  bundler/lib/bundler/vendor/thor/lib/thor/shell.rb
303
303
  bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb
304
304
  bundler/lib/bundler/vendor/thor/lib/thor/shell/color.rb
305
+ bundler/lib/bundler/vendor/thor/lib/thor/shell/column_printer.rb
305
306
  bundler/lib/bundler/vendor/thor/lib/thor/shell/html.rb
307
+ bundler/lib/bundler/vendor/thor/lib/thor/shell/lcs_diff.rb
308
+ bundler/lib/bundler/vendor/thor/lib/thor/shell/table_printer.rb
309
+ bundler/lib/bundler/vendor/thor/lib/thor/shell/terminal.rb
310
+ bundler/lib/bundler/vendor/thor/lib/thor/shell/wrapped_printer.rb
306
311
  bundler/lib/bundler/vendor/thor/lib/thor/util.rb
307
312
  bundler/lib/bundler/vendor/thor/lib/thor/version.rb
308
313
  bundler/lib/bundler/vendor/tsort/LICENSE.txt
@@ -545,6 +550,7 @@ lib/rubygems/util/list.rb
545
550
  lib/rubygems/validator.rb
546
551
  lib/rubygems/version.rb
547
552
  lib/rubygems/version_option.rb
553
+ lib/rubygems/yaml_serializer.rb
548
554
  rubygems-update.gemspec
549
555
  setup.rb
550
556
  test/rubygems/alternate_cert.pem
data/bundler/CHANGELOG.md CHANGED
@@ -1,3 +1,56 @@
1
+ # 2.4.22 (November 9, 2023)
2
+
3
+ ## Enhancements:
4
+
5
+ - Add Bundler::Plugin.loaded? helper [#6964](https://github.com/rubygems/rubygems/pull/6964)
6
+ - Give better error when previous installation folder is insecure to remove [#7030](https://github.com/rubygems/rubygems/pull/7030)
7
+ - Set file path when eval-ing local specification in EndpointSpecification [#7106](https://github.com/rubygems/rubygems/pull/7106)
8
+ - Git ignore the proper files for the CI service selected for `bundle gem` [#7101](https://github.com/rubygems/rubygems/pull/7101)
9
+ - Update vendored thor to v1.3.0 [#7078](https://github.com/rubygems/rubygems/pull/7078)
10
+ - Restore using old way of passing Ruby version to resolver [#7066](https://github.com/rubygems/rubygems/pull/7066)
11
+ - Bump vendored net-http-persistent to 4.0.2 [#6787](https://github.com/rubygems/rubygems/pull/6787)
12
+
13
+ ## Bug fixes:
14
+
15
+ - Fix regression when installing native extensions on universal rubies [#7077](https://github.com/rubygems/rubygems/pull/7077)
16
+ - Only remove bundler plugin gem when it's inside the cache [#7001](https://github.com/rubygems/rubygems/pull/7001)
17
+ - Don't show bug report template when GEM_HOME has no writable bit [#7113](https://github.com/rubygems/rubygems/pull/7113)
18
+ - Fix regression in old git versions [#7114](https://github.com/rubygems/rubygems/pull/7114)
19
+ - Handle empty array at built-in YAML serializer [#7099](https://github.com/rubygems/rubygems/pull/7099)
20
+ - Fix force_ruby_platform: when the lockfile only locks the ruby platform [#6936](https://github.com/rubygems/rubygems/pull/6936)
21
+
22
+ # 2.4.21 (October 17, 2023)
23
+
24
+ ## Enhancements:
25
+
26
+ - Avoid duplicates -rbundler/setup in RUBYOPT with Ruby preview [#7002](https://github.com/rubygems/rubygems/pull/7002)
27
+ - Prevent gem activation in standalone mode [#6925](https://github.com/rubygems/rubygems/pull/6925)
28
+ - Support Ruby's preview version format (Ex: 3.3.0-preview2) in Gemfile [#7016](https://github.com/rubygems/rubygems/pull/7016)
29
+ - Fix `bundle install` when older revisions of git source [#6980](https://github.com/rubygems/rubygems/pull/6980)
30
+ - Remove usage of Dir.chdir that only execute a subprocess [#6930](https://github.com/rubygems/rubygems/pull/6930)
31
+
32
+ ## Bug fixes:
33
+
34
+ - Don't delete the release version from pre-release string more than once [#7054](https://github.com/rubygems/rubygems/pull/7054)
35
+ - Make the `lock` command not be affected by the `frozen` setting [#7034](https://github.com/rubygems/rubygems/pull/7034)
36
+ - Raise an error when adding a gem incompatible with some locked platform [#7035](https://github.com/rubygems/rubygems/pull/7035)
37
+ - Re-resolve when lockfile is invalid [#7020](https://github.com/rubygems/rubygems/pull/7020)
38
+ - Don't re-resolve with prereleases if unlocked gem has no prereleases [#7021](https://github.com/rubygems/rubygems/pull/7021)
39
+ - Include gemspec in ExtensionTask for native gem tasks [#7015](https://github.com/rubygems/rubygems/pull/7015)
40
+ - Avoid error reporting relative path when validating frozen [#5128](https://github.com/rubygems/rubygems/pull/5128)
41
+ - Fix `bundle lock --minor --update <dep>` edge case [#6992](https://github.com/rubygems/rubygems/pull/6992)
42
+ - Stop bundler eagerly loading all specs with exts [#6945](https://github.com/rubygems/rubygems/pull/6945)
43
+
44
+ ## Performance:
45
+
46
+ - Reduce allocations when parsing lockfile [#6976](https://github.com/rubygems/rubygems/pull/6976)
47
+ - Stop allocating the same settings keys repeatedly [#6963](https://github.com/rubygems/rubygems/pull/6963)
48
+
49
+ ## Documentation:
50
+
51
+ - Improve formatting and global source information in `bundle plugin` man page [#7045](https://github.com/rubygems/rubygems/pull/7045)
52
+ - Update man page of `bundle exec` to reflect default true of flag `--keep-file-descriptors` [#7033](https://github.com/rubygems/rubygems/pull/7033)
53
+
1
54
  # 2.4.20 (September 27, 2023)
2
55
 
3
56
  ## Enhancements:
@@ -21,7 +74,6 @@
21
74
 
22
75
  - Lazily construct fetcher debug messages [#6973](https://github.com/rubygems/rubygems/pull/6973)
23
76
  - Avoid allocating empty hashes in Index [#6962](https://github.com/rubygems/rubygems/pull/6962)
24
- - Stop allocating the same settings keys repeatedly [#6963](https://github.com/rubygems/rubygems/pull/6963)
25
77
  - Improve `Bundler::Index` efficiency by removing unnecessary creation and dups [#6931](https://github.com/rubygems/rubygems/pull/6931)
26
78
  - (Further) Improve Bundler::Settings#[] performance and memory usage [#6923](https://github.com/rubygems/rubygems/pull/6923)
27
79
  - Don't use full indexes unnecessarily on legacy Gemfiles [#6916](https://github.com/rubygems/rubygems/pull/6916)
@@ -2182,7 +2234,7 @@ Changes
2182
2234
 
2183
2235
  - retry gem downloads ([#4846](https://github.com/rubygems/bundler/issues/4846), @jkeiser)
2184
2236
  - improve the CompactIndex to handle capitalized legacy gems ([#4867](https://github.com/rubygems/bundler/issues/4867), @segiddins)
2185
- - re-use persistent HTTP connections for CompactIndex (@NickLaMuro)
2237
+ - reuse persistent HTTP connections for CompactIndex (@NickLaMuro)
2186
2238
  - respect `required_ruby_version` when Gemfile contains `ruby` version (@indirect)
2187
2239
  - allow `rake release` to sign git tags ([#4743](https://github.com/rubygems/bundler/issues/4743), @eagletmt)
2188
2240
  - set process titles when using `#load` during `exec` (@yob)
@@ -3378,7 +3430,7 @@ Changes
3378
3430
  - `gem` option --test can generate rspec stubs (@MafcoCinco)
3379
3431
  - `gem` option --test can generate minitest stubs (@kcurtin)
3380
3432
  - `gem` command generates MIT license (@BrentWheeldon)
3381
- - gem rake task 'release' resuses existing tags (@shtirlic)
3433
+ - gem rake task 'release' reuses existing tags (@shtirlic)
3382
3434
 
3383
3435
  ## Bug fixes:
3384
3436
 
data/bundler/README.md CHANGED
@@ -1,5 +1,4 @@
1
1
  [![Version ](https://img.shields.io/gem/v/bundler.svg?style=flat)](https://rubygems.org/gems/bundler)
2
- [![Slack ](https://bundler-slackin.herokuapp.com/badge.svg)](https://bundler-slackin.herokuapp.com)
3
2
 
4
3
  # Bundler: a gem to bundle gems
5
4
 
@@ -38,7 +37,7 @@ Still stuck? Try [filing an issue](https://github.com/rubygems/rubygems/issues/n
38
37
 
39
38
  To see what has changed in recent versions of Bundler, see the [CHANGELOG](CHANGELOG.md).
40
39
 
41
- To get in touch with the Bundler core team and other Bundler users, please join [the Bundler slack](https://slack.bundler.io).
40
+ To get in touch with the Bundler core team and other Bundler users, please join [the Bundler slack](https://join.slack.com/t/bundler/shared_invite/zt-1rrsuuv3m-OmXKWQf8K6iSla4~F1DBjQ).
42
41
 
43
42
  ### Contributing
44
43
 
@@ -4,8 +4,8 @@ module Bundler
4
4
  # Represents metadata from when the Bundler gem was built.
5
5
  module BuildMetadata
6
6
  # begin ivars
7
- @built_at = "2023-09-27".freeze
8
- @git_commit_sha = "de20c7e7b".freeze
7
+ @built_at = "2023-11-09".freeze
8
+ @git_commit_sha = "ec2089640".freeze
9
9
  @release = true
10
10
  # end ivars
11
11
 
@@ -31,7 +31,7 @@ module Bundler
31
31
  # commit instance variable then we can't determine its commits SHA.
32
32
  git_dir = File.expand_path("../../../.git", __dir__)
33
33
  if File.directory?(git_dir)
34
- return @git_commit_sha = Dir.chdir(git_dir) { `git rev-parse --short HEAD`.strip.freeze }
34
+ return @git_commit_sha = IO.popen(%w[git rev-parse --short HEAD], { :chdir => git_dir }, &:read).strip.freeze
35
35
  end
36
36
 
37
37
  @git_commit_sha ||= "unknown"
@@ -29,7 +29,7 @@ module Bundler
29
29
  Bundler.ui.warn "Install missing gems with `bundle install`"
30
30
  exit 1
31
31
  elsif !Bundler.default_lockfile.file? && Bundler.frozen_bundle?
32
- Bundler.ui.error "This bundle has been frozen, but there is no #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} present"
32
+ Bundler.ui.error "This bundle has been frozen, but there is no #{SharedHelpers.relative_lockfile_path} present"
33
33
  exit 1
34
34
  else
35
35
  Bundler.load.lock(:preserve_unknown_sections => true) unless options[:"dry-run"]
@@ -137,10 +137,13 @@ module Bundler
137
137
  case config[:ci]
138
138
  when "github"
139
139
  templates.merge!("github/workflows/main.yml.tt" => ".github/workflows/main.yml")
140
+ config[:ci_config_path] = ".github "
140
141
  when "gitlab"
141
142
  templates.merge!("gitlab-ci.yml.tt" => ".gitlab-ci.yml")
143
+ config[:ci_config_path] = ".gitlab-ci.yml "
142
144
  when "circle"
143
145
  templates.merge!("circleci/config.yml.tt" => ".circleci/config.yml")
146
+ config[:ci_config_path] = ".circleci "
144
147
  end
145
148
 
146
149
  if ask_and_set(:mit, "Do you want to license your code permissively under the MIT license?",
@@ -233,9 +236,7 @@ module Bundler
233
236
  end
234
237
 
235
238
  if use_git
236
- Dir.chdir(target) do
237
- `git add .`
238
- end
239
+ IO.popen(%w[git add .], { :chdir => target }, &:read)
239
240
  end
240
241
 
241
242
  # Open gemspec in editor
@@ -28,8 +28,8 @@ module Bundler
28
28
  flag = "--deployment flag" if options[:deployment]
29
29
  flag ||= "--frozen flag" if options[:frozen]
30
30
  flag ||= "deployment setting"
31
- raise ProductionError, "The #{flag} requires a #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)}. Please make " \
32
- "sure you have checked your #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} into version control " \
31
+ raise ProductionError, "The #{flag} requires a lockfile. Please make " \
32
+ "sure you have checked your #{SharedHelpers.relative_lockfile_path} into version control " \
33
33
  "before deploying."
34
34
  end
35
35
 
@@ -32,36 +32,39 @@ module Bundler
32
32
  elsif update && bundler
33
33
  update = { :bundler => bundler }
34
34
  end
35
- definition = Bundler.definition(update)
36
35
 
37
- Bundler::CLI::Common.configure_gem_version_promoter(Bundler.definition, options) if options[:update]
36
+ Bundler.settings.temporary(:frozen => false) do
37
+ definition = Bundler.definition(update)
38
38
 
39
- options["remove-platform"].each do |platform|
40
- definition.remove_platform(platform)
41
- end
39
+ Bundler::CLI::Common.configure_gem_version_promoter(definition, options) if options[:update]
42
40
 
43
- options["add-platform"].each do |platform_string|
44
- platform = Gem::Platform.new(platform_string)
45
- if platform.to_s == "unknown"
46
- Bundler.ui.warn "The platform `#{platform_string}` is unknown to RubyGems " \
47
- "and adding it will likely lead to resolution errors"
41
+ options["remove-platform"].each do |platform|
42
+ definition.remove_platform(platform)
48
43
  end
49
- definition.add_platform(platform)
50
- end
51
44
 
52
- if definition.platforms.empty?
53
- raise InvalidOption, "Removing all platforms from the bundle is not allowed"
54
- end
45
+ options["add-platform"].each do |platform_string|
46
+ platform = Gem::Platform.new(platform_string)
47
+ if platform.to_s == "unknown"
48
+ Bundler.ui.warn "The platform `#{platform_string}` is unknown to RubyGems " \
49
+ "and adding it will likely lead to resolution errors"
50
+ end
51
+ definition.add_platform(platform)
52
+ end
55
53
 
56
- definition.resolve_remotely! unless options[:local]
54
+ if definition.platforms.empty?
55
+ raise InvalidOption, "Removing all platforms from the bundle is not allowed"
56
+ end
57
+
58
+ definition.resolve_remotely! unless options[:local]
57
59
 
58
- if print
59
- puts definition.to_lock
60
- else
61
- file = options[:lockfile]
62
- file = file ? File.expand_path(file) : Bundler.default_lockfile
63
- puts "Writing lockfile to #{file}"
64
- definition.lock(file)
60
+ if print
61
+ puts definition.to_lock
62
+ else
63
+ file = options[:lockfile]
64
+ file = file ? File.expand_path(file) : Bundler.default_lockfile
65
+ puts "Writing lockfile to #{file}"
66
+ definition.lock(file)
67
+ end
65
68
  end
66
69
 
67
70
  Bundler.ui.level = previous_ui_level
@@ -18,13 +18,11 @@ module Bundler
18
18
  Bundler.ui.info "Unable to open #{name} because it's a default gem, so the directory it would normally be installed to does not exist."
19
19
  else
20
20
  root_path = spec.full_gem_path
21
- Dir.chdir(root_path) do
22
- require "shellwords"
23
- command = Shellwords.split(editor) << File.join([root_path, path].compact)
24
- Bundler.with_original_env do
25
- system(*command)
26
- end || Bundler.ui.info("Could not run '#{command.join(" ")}'")
27
- end
21
+ require "shellwords"
22
+ command = Shellwords.split(editor) << File.join([root_path, path].compact)
23
+ Bundler.with_original_env do
24
+ system(*command, { :chdir => root_path })
25
+ end || Bundler.ui.info("Could not run '#{command.join(" ")}'")
28
26
  end
29
27
  end
30
28
  end
@@ -149,7 +149,7 @@ module Bundler
149
149
  @dependency_changes = converge_dependencies
150
150
  @local_changes = converge_locals
151
151
 
152
- @missing_lockfile_dep = check_missing_lockfile_dep
152
+ check_lockfile
153
153
  end
154
154
 
155
155
  def gem_version_promoter
@@ -405,13 +405,13 @@ module Bundler
405
405
  msg << "\n\nYou have added to the Gemfile:\n" << added.join("\n") if added.any?
406
406
  msg << "\n\nYou have deleted from the Gemfile:\n" << deleted.join("\n") if deleted.any?
407
407
  msg << "\n\nYou have changed in the Gemfile:\n" << changed.join("\n") if changed.any?
408
- msg << "\n\nRun `bundle install` elsewhere and add the updated #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} to version control.\n"
408
+ msg << "\n\nRun `bundle install` elsewhere and add the updated #{SharedHelpers.relative_gemfile_path} to version control.\n"
409
409
 
410
410
  unless explicit_flag
411
411
  suggested_command = unless Bundler.settings.locations("frozen").keys.include?(:env)
412
412
  "bundle config set frozen false"
413
413
  end
414
- msg << "If this is a development machine, remove the #{Bundler.default_gemfile.relative_path_from(SharedHelpers.pwd)} " \
414
+ msg << "If this is a development machine, remove the #{SharedHelpers.relative_lockfile_path} " \
415
415
  "freeze by running `#{suggested_command}`." if suggested_command
416
416
  end
417
417
 
@@ -452,8 +452,8 @@ module Bundler
452
452
  return if current_platform_locked?
453
453
 
454
454
  raise ProductionError, "Your bundle only supports platforms #{@platforms.map(&:to_s)} " \
455
- "but your local platform is #{Bundler.local_platform}. " \
456
- "Add the current platform to the lockfile with\n`bundle lock --add-platform #{Bundler.local_platform}` and try again."
455
+ "but your local platform is #{local_platform}. " \
456
+ "Add the current platform to the lockfile with\n`bundle lock --add-platform #{local_platform}` and try again."
457
457
  end
458
458
 
459
459
  def add_platform(platform)
@@ -478,7 +478,7 @@ module Bundler
478
478
  private :sources
479
479
 
480
480
  def nothing_changed?
481
- !@source_changes && !@dependency_changes && !@new_platform && !@path_changes && !@local_changes && !@missing_lockfile_dep && !@unlocking_bundler
481
+ !@source_changes && !@dependency_changes && !@new_platform && !@path_changes && !@local_changes && !@missing_lockfile_dep && !@unlocking_bundler && !@invalid_lockfile_dep
482
482
  end
483
483
 
484
484
  def no_resolve_needed?
@@ -509,7 +509,7 @@ module Bundler
509
509
  def resolution_packages
510
510
  @resolution_packages ||= begin
511
511
  last_resolve = converge_locked_specs
512
- remove_ruby_from_platforms_if_necessary!(current_dependencies)
512
+ remove_invalid_platforms!(current_dependencies)
513
513
  packages = Resolver::Base.new(source_requirements, expanded_dependencies, last_resolve, @platforms, :locked_specs => @originally_locked_specs, :unlock => @unlock[:gems], :prerelease => gem_version_promoter.pre?)
514
514
  additional_base_requirements_for_resolve(packages, last_resolve)
515
515
  end
@@ -600,7 +600,7 @@ module Bundler
600
600
 
601
601
  def current_platform_locked?
602
602
  @platforms.any? do |bundle_platform|
603
- MatchPlatform.platforms_match?(bundle_platform, Bundler.local_platform)
603
+ MatchPlatform.platforms_match?(bundle_platform, local_platform)
604
604
  end
605
605
  end
606
606
 
@@ -630,6 +630,7 @@ module Bundler
630
630
  [@local_changes, "the gemspecs for git local gems changed"],
631
631
  [@missing_lockfile_dep, "your lock file is missing \"#{@missing_lockfile_dep}\""],
632
632
  [@unlocking_bundler, "an update to the version of Bundler itself was requested"],
633
+ [@invalid_lockfile_dep, "your lock file has an invalid dependency \"#{@invalid_lockfile_dep}\""],
633
634
  ].select(&:first).map(&:last).join(", ")
634
635
  end
635
636
 
@@ -684,24 +685,38 @@ module Bundler
684
685
  !sources_with_changes.each {|source| @unlock[:sources] << source.name }.empty?
685
686
  end
686
687
 
687
- def check_missing_lockfile_dep
688
- all_locked_specs = @locked_specs.map(&:name) << "bundler"
688
+ def check_lockfile
689
+ @invalid_lockfile_dep = nil
690
+ @missing_lockfile_dep = nil
689
691
 
690
- missing = @locked_specs.select do |s|
691
- s.dependencies.any? {|dep| !all_locked_specs.include?(dep.name) }
692
+ locked_names = @locked_specs.map(&:name)
693
+ missing = []
694
+ invalid = []
695
+
696
+ @locked_specs.each do |s|
697
+ s.dependencies.each do |dep|
698
+ next if dep.name == "bundler"
699
+
700
+ missing << s unless locked_names.include?(dep.name)
701
+ invalid << s if @locked_specs.none? {|spec| dep.matches_spec?(spec) }
702
+ end
692
703
  end
693
704
 
694
705
  if missing.any?
695
706
  @locked_specs.delete(missing)
696
707
 
697
- return missing.first.name
708
+ @missing_lockfile_dep = missing.first.name
709
+ elsif !@dependency_changes
710
+ @missing_lockfile_dep = current_dependencies.find do |d|
711
+ @locked_specs[d.name].empty? && d.name != "bundler"
712
+ end&.name
698
713
  end
699
714
 
700
- return if @dependency_changes
715
+ if invalid.any?
716
+ @locked_specs.delete(invalid)
701
717
 
702
- current_dependencies.find do |d|
703
- @locked_specs[d.name].empty? && d.name != "bundler"
704
- end&.name
718
+ @invalid_lockfile_dep = invalid.first.name
719
+ end
705
720
  end
706
721
 
707
722
  def converge_paths
@@ -866,7 +881,7 @@ module Bundler
866
881
 
867
882
  def metadata_dependencies
868
883
  @metadata_dependencies ||= [
869
- Dependency.new("Ruby\0", Gem.ruby_version),
884
+ Dependency.new("Ruby\0", Bundler::RubyVersion.system.gem_version),
870
885
  Dependency.new("RubyGems\0", Gem::VERSION),
871
886
  ]
872
887
  end
@@ -941,17 +956,19 @@ module Bundler
941
956
  resolution_packages
942
957
  end
943
958
 
944
- def remove_ruby_from_platforms_if_necessary!(dependencies)
945
- return if Bundler.frozen_bundle? ||
946
- Bundler.local_platform == Gem::Platform::RUBY ||
947
- !platforms.include?(Gem::Platform::RUBY) ||
948
- (@new_platform && platforms.last == Gem::Platform::RUBY) ||
959
+ def remove_invalid_platforms!(dependencies)
960
+ return if Bundler.frozen_bundle?
961
+
962
+ platforms.each do |platform|
963
+ next if local_platform == platform ||
964
+ (@new_platform && platforms.last == platform) ||
949
965
  @path_changes ||
950
966
  @dependency_changes ||
951
- !@originally_locked_specs.incomplete_ruby_specs?(dependencies)
967
+ !@originally_locked_specs.incomplete_for_platform?(dependencies, platform)
952
968
 
953
- remove_platform(Gem::Platform::RUBY)
954
- add_current_platform
969
+ remove_platform(platform)
970
+ add_current_platform if platform == Gem::Platform::RUBY
971
+ end
955
972
  end
956
973
 
957
974
  def source_map
@@ -94,7 +94,7 @@ module Bundler
94
94
 
95
95
  def _local_specification
96
96
  return unless @loaded_from && File.exist?(local_specification_path)
97
- eval(File.read(local_specification_path)).tap do |spec|
97
+ eval(File.read(local_specification_path), nil, local_specification_path).tap do |spec|
98
98
  spec.loaded_from = @loaded_from
99
99
  end
100
100
  end
@@ -40,11 +40,11 @@ module Bundler
40
40
 
41
41
  out << "\n## Gemfile\n"
42
42
  gemfiles.each do |gemfile|
43
- out << "\n### #{Pathname.new(gemfile).relative_path_from(SharedHelpers.pwd)}\n\n"
43
+ out << "\n### #{SharedHelpers.relative_path_to(gemfile)}\n\n"
44
44
  out << "```ruby\n" << read_file(gemfile).chomp << "\n```\n"
45
45
  end
46
46
 
47
- out << "\n### #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)}\n\n"
47
+ out << "\n### #{SharedHelpers.relative_path_to(Bundler.default_lockfile)}\n\n"
48
48
  out << "```\n" << read_file(Bundler.default_lockfile).chomp << "\n```\n"
49
49
  end
50
50
 
@@ -172,4 +172,19 @@ module Bundler
172
172
 
173
173
  status_code(36)
174
174
  end
175
+
176
+ class InsecureInstallPathError < BundlerError
177
+ def initialize(path)
178
+ @path = path
179
+ end
180
+
181
+ def message
182
+ "The installation path is insecure. Bundler cannot continue.\n" \
183
+ "#{@path} is world-writable (without sticky bit).\n" \
184
+ "Bundler cannot safely replace gems in world-writeable directories due to potential vulnerabilities.\n" \
185
+ "Please change the permissions of this directory or choose a different install path."
186
+ end
187
+
188
+ status_code(38)
189
+ end
175
190
  end
@@ -48,6 +48,13 @@ module Bundler
48
48
  end
49
49
  module_function :select_best_platform_match
50
50
 
51
+ def force_ruby_platform(specs)
52
+ matching = specs.select {|spec| spec.match_platform(Gem::Platform::RUBY) && spec.force_ruby_platform! }
53
+
54
+ sort_best_platform_match(matching, Gem::Platform::RUBY)
55
+ end
56
+ module_function :force_ruby_platform
57
+
51
58
  def sort_best_platform_match(matching, platform)
52
59
  exact = matching.select {|spec| spec.platform == platform }
53
60
  return exact if exact.any?
@@ -101,7 +101,7 @@ module Bundler
101
101
  next 1 if b_pre && !a_pre
102
102
  end
103
103
 
104
- if major?
104
+ if major? || locked_version.nil?
105
105
  a <=> b
106
106
  elsif either_version_older_than_locked?(a, b, locked_version)
107
107
  a <=> b
@@ -117,7 +117,7 @@ module Bundler
117
117
  end
118
118
 
119
119
  def either_version_older_than_locked?(a, b, locked_version)
120
- locked_version && (a.version < locked_version || b.version < locked_version)
120
+ a.version < locked_version || b.version < locked_version
121
121
  end
122
122
 
123
123
  def segments_do_not_match?(a, b, level)
@@ -86,7 +86,7 @@ module Bundler
86
86
  segments = version.segments
87
87
  seg_end_index = version >= Gem::Version.new("1.0") ? 1 : 2
88
88
 
89
- prerelease_suffix = version.to_s.gsub(version.release.to_s, "") if version.prerelease?
89
+ prerelease_suffix = version.to_s.delete_prefix(version.release.to_s) if version.prerelease?
90
90
  "#{version_prefix}#{segments[0..seg_end_index].join(".")}#{prerelease_suffix}"
91
91
  end
92
92
 
@@ -16,13 +16,13 @@ module Bundler
16
16
  post_install_message = install
17
17
  Bundler.ui.debug "#{worker}: #{spec.name} (#{spec.version}) from #{spec.loaded_from}"
18
18
  generate_executable_stubs
19
- return true, post_install_message
20
- rescue Bundler::InstallHookError, Bundler::SecurityError, Bundler::APIResponseMismatchError
19
+ [true, post_install_message]
20
+ rescue Bundler::InstallHookError, Bundler::SecurityError, Bundler::APIResponseMismatchError, Bundler::InsecureInstallPathError
21
21
  raise
22
22
  rescue Errno::ENOSPC
23
- return false, out_of_space_message
24
- rescue Bundler::BundlerError, Gem::InstallError, Bundler::APIResponseInvalidDependenciesError => e
25
- return false, specific_failure_message(e)
23
+ [false, out_of_space_message]
24
+ rescue Bundler::BundlerError, Gem::InstallError => e
25
+ [false, specific_failure_message(e)]
26
26
  end
27
27
 
28
28
  private
@@ -91,38 +91,12 @@ module Bundler
91
91
  install_serially
92
92
  end
93
93
 
94
- check_for_unmet_dependencies
95
-
96
94
  handle_error if failed_specs.any?
97
95
  @specs
98
96
  ensure
99
97
  worker_pool&.stop
100
98
  end
101
99
 
102
- def check_for_unmet_dependencies
103
- unmet_dependencies = @specs.map do |s|
104
- [
105
- s,
106
- s.dependencies.reject {|dep| @specs.any? {|spec| dep.matches_spec?(spec.spec) } },
107
- ]
108
- end.reject {|a| a.last.empty? }
109
- return if unmet_dependencies.empty?
110
-
111
- warning = []
112
- warning << "Your lockfile doesn't include a valid resolution."
113
- warning << "You can fix this by regenerating your lockfile or manually editing the bad locked gems to a version that satisfies all dependencies."
114
- warning << "The unmet dependencies are:"
115
-
116
- unmet_dependencies.each do |spec, unmet_spec_dependencies|
117
- unmet_spec_dependencies.each do |unmet_spec_dependency|
118
- found = @specs.find {|s| s.name == unmet_spec_dependency.name && !unmet_spec_dependency.matches_spec?(s.spec) }
119
- warning << "* #{unmet_spec_dependency}, dependency of #{spec.full_name}, unsatisfied by #{found.full_name}"
120
- end
121
- end
122
-
123
- Bundler.ui.warn(warning.join("\n"))
124
- end
125
-
126
100
  private
127
101
 
128
102
  def failed_specs