rubygems-update 3.2.27 → 3.2.31

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +70 -0
  3. data/Manifest.txt +28 -1
  4. data/bundler/CHANGELOG.md +52 -1
  5. data/bundler/README.md +1 -1
  6. data/bundler/lib/bundler/build_metadata.rb +2 -2
  7. data/bundler/lib/bundler/cli/gem.rb +86 -8
  8. data/bundler/lib/bundler/cli/info.rb +11 -4
  9. data/bundler/lib/bundler/cli/issue.rb +4 -3
  10. data/bundler/lib/bundler/cli/remove.rb +1 -2
  11. data/bundler/lib/bundler/cli.rb +4 -1
  12. data/bundler/lib/bundler/compact_index_client.rb +2 -2
  13. data/bundler/lib/bundler/definition.rb +14 -9
  14. data/bundler/lib/bundler/digest.rb +71 -0
  15. data/bundler/lib/bundler/errors.rb +18 -2
  16. data/bundler/lib/bundler/fetcher.rb +2 -1
  17. data/bundler/lib/bundler/friendly_errors.rb +5 -30
  18. data/bundler/lib/bundler/gem_helper.rb +6 -17
  19. data/bundler/lib/bundler/lockfile_parser.rb +1 -0
  20. data/bundler/lib/bundler/man/bundle-add.1 +1 -1
  21. data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
  22. data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
  23. data/bundler/lib/bundler/man/bundle-check.1 +1 -1
  24. data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
  25. data/bundler/lib/bundler/man/bundle-config.1 +3 -3
  26. data/bundler/lib/bundler/man/bundle-config.1.ronn +2 -2
  27. data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
  28. data/bundler/lib/bundler/man/bundle-exec.1 +1 -1
  29. data/bundler/lib/bundler/man/bundle-gem.1 +14 -1
  30. data/bundler/lib/bundler/man/bundle-gem.1.ronn +16 -0
  31. data/bundler/lib/bundler/man/bundle-info.1 +1 -1
  32. data/bundler/lib/bundler/man/bundle-init.1 +1 -1
  33. data/bundler/lib/bundler/man/bundle-inject.1 +1 -1
  34. data/bundler/lib/bundler/man/bundle-install.1 +1 -1
  35. data/bundler/lib/bundler/man/bundle-list.1 +1 -1
  36. data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
  37. data/bundler/lib/bundler/man/bundle-open.1 +1 -1
  38. data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
  39. data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
  40. data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
  41. data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
  42. data/bundler/lib/bundler/man/bundle-show.1 +1 -1
  43. data/bundler/lib/bundler/man/bundle-update.1 +1 -1
  44. data/bundler/lib/bundler/man/bundle-viz.1 +1 -1
  45. data/bundler/lib/bundler/man/bundle.1 +1 -1
  46. data/bundler/lib/bundler/man/gemfile.5 +1 -1
  47. data/bundler/lib/bundler/rubygems_ext.rb +4 -0
  48. data/bundler/lib/bundler/rubygems_gem_installer.rb +20 -4
  49. data/bundler/lib/bundler/rubygems_integration.rb +26 -9
  50. data/bundler/lib/bundler/runtime.rb +2 -2
  51. data/bundler/lib/bundler/source/git/git_proxy.rb +5 -2
  52. data/bundler/lib/bundler/source/git.rb +22 -4
  53. data/bundler/lib/bundler/source/rubygems.rb +36 -72
  54. data/bundler/lib/bundler/spec_set.rb +1 -1
  55. data/bundler/lib/bundler/templates/newgem/Gemfile.tt +5 -2
  56. data/bundler/lib/bundler/templates/newgem/Rakefile.tt +5 -1
  57. data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +13 -13
  58. data/bundler/lib/bundler/templates/newgem/standard.yml.tt +4 -0
  59. data/bundler/lib/bundler/vendor/connection_pool/LICENSE +20 -0
  60. data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +19 -21
  61. data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +1 -1
  62. data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb +57 -0
  63. data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +39 -74
  64. data/bundler/lib/bundler/vendor/fileutils/LICENSE.txt +22 -0
  65. data/bundler/lib/bundler/vendor/molinillo/LICENSE +9 -0
  66. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +2 -2
  67. data/bundler/lib/bundler/vendor/net-http-persistent/README.rdoc +82 -0
  68. data/bundler/lib/bundler/vendor/thor/LICENSE.md +20 -0
  69. data/bundler/lib/bundler/vendor/tsort/LICENSE.txt +22 -0
  70. data/bundler/lib/bundler/vendor/tsort/lib/tsort.rb +453 -0
  71. data/bundler/lib/bundler/vendor/uri/LICENSE.txt +22 -0
  72. data/bundler/lib/bundler/vendored_tsort.rb +4 -0
  73. data/bundler/lib/bundler/version.rb +1 -1
  74. data/bundler/lib/bundler/worker.rb +2 -2
  75. data/bundler/lib/bundler.rb +2 -1
  76. data/lib/rubygems/command.rb +4 -4
  77. data/lib/rubygems/commands/cert_command.rb +18 -11
  78. data/lib/rubygems/commands/fetch_command.rb +1 -1
  79. data/lib/rubygems/commands/server_command.rb +3 -3
  80. data/lib/rubygems/commands/setup_command.rb +65 -56
  81. data/lib/rubygems/commands/uninstall_command.rb +1 -1
  82. data/lib/rubygems/commands/update_command.rb +1 -1
  83. data/lib/rubygems/core_ext/tcpsocket_init.rb +2 -2
  84. data/lib/rubygems/defaults.rb +1 -1
  85. data/lib/rubygems/dependency_list.rb +2 -2
  86. data/lib/rubygems/errors.rb +1 -2
  87. data/lib/rubygems/ext/builder.rb +6 -5
  88. data/lib/rubygems/ext/cmake_builder.rb +1 -1
  89. data/lib/rubygems/install_update_options.rb +2 -2
  90. data/lib/rubygems/installer.rb +31 -6
  91. data/lib/rubygems/local_remote_options.rb +3 -3
  92. data/lib/rubygems/optparse/COPYING +56 -0
  93. data/lib/rubygems/optparse/lib/optionparser.rb +2 -0
  94. data/lib/rubygems/optparse/lib/optparse/ac.rb +54 -0
  95. data/lib/rubygems/optparse/lib/optparse/date.rb +18 -0
  96. data/lib/rubygems/optparse/lib/optparse/kwargs.rb +22 -0
  97. data/lib/rubygems/optparse/lib/optparse/shellwords.rb +7 -0
  98. data/lib/rubygems/optparse/lib/optparse/time.rb +11 -0
  99. data/lib/rubygems/optparse/lib/optparse/uri.rb +7 -0
  100. data/lib/rubygems/optparse/lib/optparse/version.rb +71 -0
  101. data/lib/rubygems/optparse/lib/optparse.rb +2230 -0
  102. data/lib/rubygems/optparse.rb +3 -0
  103. data/lib/rubygems/package.rb +24 -34
  104. data/lib/rubygems/platform.rb +1 -0
  105. data/lib/rubygems/query_utils.rb +4 -4
  106. data/lib/rubygems/remote_fetcher.rb +2 -2
  107. data/lib/rubygems/request/connection_pools.rb +1 -1
  108. data/lib/rubygems/request/http_pool.rb +1 -1
  109. data/lib/rubygems/request.rb +2 -0
  110. data/lib/rubygems/request_set.rb +3 -3
  111. data/lib/rubygems/resolver/molinillo/LICENSE +9 -0
  112. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb +2 -2
  113. data/lib/rubygems/resolver/set.rb +0 -1
  114. data/lib/rubygems/s3_uri_signer.rb +4 -5
  115. data/lib/rubygems/security/policy.rb +5 -3
  116. data/lib/rubygems/security/signer.rb +3 -4
  117. data/lib/rubygems/security.rb +49 -15
  118. data/lib/rubygems/security_option.rb +3 -3
  119. data/lib/rubygems/source/git.rb +2 -2
  120. data/lib/rubygems/source.rb +1 -1
  121. data/lib/rubygems/specification.rb +12 -8
  122. data/lib/rubygems/specification_policy.rb +1 -1
  123. data/lib/rubygems/tsort/LICENSE.txt +22 -0
  124. data/lib/rubygems/tsort/lib/tsort.rb +454 -0
  125. data/lib/rubygems/tsort.rb +3 -0
  126. data/lib/rubygems/uri.rb +9 -0
  127. data/lib/rubygems/user_interaction.rb +1 -1
  128. data/lib/rubygems/util/licenses.rb +2 -0
  129. data/lib/rubygems/util.rb +1 -1
  130. data/lib/rubygems/version_option.rb +2 -2
  131. data/lib/rubygems.rb +2 -2
  132. data/rubygems-update.gemspec +1 -1
  133. data/test/rubygems/encrypted_private_key.pem +26 -26
  134. data/test/rubygems/helper.rb +26 -30
  135. data/test/rubygems/private_ec_key.pem +9 -0
  136. data/test/rubygems/test_gem.rb +59 -71
  137. data/test/rubygems/test_gem_command.rb +1 -1
  138. data/test/rubygems/test_gem_commands_cert_command.rb +71 -12
  139. data/test/rubygems/test_gem_commands_fetch_command.rb +36 -0
  140. data/test/rubygems/test_gem_commands_server_command.rb +3 -3
  141. data/test/rubygems/test_gem_commands_setup_command.rb +50 -19
  142. data/test/rubygems/test_gem_commands_signin_command.rb +1 -1
  143. data/test/rubygems/test_gem_commands_uninstall_command.rb +1 -1
  144. data/test/rubygems/test_gem_commands_yank_command.rb +1 -1
  145. data/test/rubygems/test_gem_install_update_options.rb +2 -2
  146. data/test/rubygems/test_gem_package.rb +27 -26
  147. data/test/rubygems/test_gem_platform.rb +1 -0
  148. data/test/rubygems/test_gem_request.rb +16 -10
  149. data/test/rubygems/test_gem_resolver.rb +7 -7
  150. data/test/rubygems/test_gem_security.rb +32 -4
  151. data/test/rubygems/test_gem_source_fetch_problem.rb +10 -0
  152. data/test/rubygems/test_gem_specification.rb +239 -232
  153. data/test/rubygems/test_gem_uri.rb +7 -0
  154. metadata +34 -7
  155. data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/monotonic_time.rb +0 -66
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3ce1a1e494194a4df6708ff29699aa24f85cae78793b58ea82a9432d80fc7d58
4
- data.tar.gz: 5a922a7db514f0b88f2b93aea3c830086362ee161f85146dd3f2fd7113e4c405
3
+ metadata.gz: b9b3eb30992cb27a7b1145d72c67be34eb5b26eb6d884280788819fa3eeb3d16
4
+ data.tar.gz: ad1ae1dc4863afadf470989bff6c7fdd1f69040aa457c75c8ec7d1d542a9ce4e
5
5
  SHA512:
6
- metadata.gz: 49129d596674dd6f3ed1e5192ff959bcaee181eb9940871b75728d29f4bc09c18ab8edcccdd31de259048e3c58fec08738f7c065d345b701863ea4a5772ef980
7
- data.tar.gz: c303eb6c77393bd3770e962b2bd3af13725af4626b952b2ea7ad012f85dd96879615306727ed1882935476087bd7f4222692dc602b9e891b9b66b9bd8d6fc14c
6
+ metadata.gz: 42d88e84d8d4cee20d1042c55d535a451ed5ebc304cb0e37457236db9255774d2bfa1dcbfa70e31300b2e857960505cc04a0de68a6461a9b0eb3d3a706475326
7
+ data.tar.gz: 2c6a23a16e036404479502dd75ef7bcd646228fc409229f2b3d917dc831e928abfea07ad27935801846b547a820bc3d1d5e1fa4fa74422b70d542e89840374a9
data/CHANGELOG.md CHANGED
@@ -1,3 +1,73 @@
1
+ # 3.2.31 / 2021-11-08
2
+
3
+ ## Enhancements:
4
+
5
+ * Don't pass empty `DESTDIR` to `nmake` since it works differently from
6
+ standard `make`. Pull request #5057 by hsbt
7
+ * Fix `gem install` vs `gem fetch` inconsistency. Pull request #5037 by
8
+ deivid-rodriguez
9
+ * Lazily load and vendor `optparse`. Pull request #4881 by
10
+ deivid-rodriguez
11
+ * Use a vendored copy of `tsort` internally. Pull request #5027 by
12
+ deivid-rodriguez
13
+
14
+ ## Bug fixes:
15
+
16
+ * Fix `ruby setup.rb` when `--prefix` is passed. Pull request #5051 by
17
+ deivid-rodriguez
18
+ * Don't apply `--destdir` twice when running `setup.rb`. Pull request
19
+ #2768 by alyssais
20
+
21
+ # 3.2.30 / 2021-10-26
22
+
23
+ ## Enhancements:
24
+
25
+ * Add support to build and sign certificates with multiple key algorithms.
26
+ Pull request #4991 by doodzik
27
+ * Avoid loading the `digest` gem unnecessarily. Pull request #4979 by
28
+ deivid-rodriguez
29
+ * Prefer `require_relative` for all internal requires. Pull request #4978
30
+ by deivid-rodriguez
31
+ * Add missing `require` of `time` within
32
+ `Gem::Request.verify_certificate_message`. Pull request #4975 by nobu
33
+
34
+ ## Performance:
35
+
36
+ * Speed up `gem install`, specially under Windows. Pull request #4960 by
37
+ deivid-rodriguez
38
+
39
+ # 3.2.29 / 2021-10-08
40
+
41
+ ## Enhancements:
42
+
43
+ * Only disallow FIXME/TODO for first word of gemspec description. Pull
44
+ request #4937 by duckinator
45
+
46
+ ## Bug fixes:
47
+
48
+ * Fix `wordy` method in `SourceFetchProblem` changing the password of
49
+ source. Pull request #4910 by Huangxiaodui
50
+
51
+ ## Performance:
52
+
53
+ * Improve `require` performance, particularly on systems with a lot of
54
+ gems installed. Pull request #4951 by pocke
55
+
56
+ # 3.2.28 / 2021-09-23
57
+
58
+ ## Enhancements:
59
+
60
+ * Support MINGW-UCRT. Pull request #4925 by hsbt
61
+ * Only check if descriptions *start with* FIXME/TODO. Pull request #4841
62
+ by duckinator
63
+ * Avoid loading `uri` unnecessarily when activating gems. Pull request
64
+ #4897 by deivid-rodriguez
65
+
66
+ ## Bug fixes:
67
+
68
+ * Fix redacted credentials being sent to gemserver. Pull request #4919 by
69
+ jdliss
70
+
1
71
  # 3.2.27 / 2021-09-03
2
72
 
3
73
  ## Enhancements:
data/Manifest.txt CHANGED
@@ -60,6 +60,7 @@ bundler/lib/bundler/dep_proxy.rb
60
60
  bundler/lib/bundler/dependency.rb
61
61
  bundler/lib/bundler/deployment.rb
62
62
  bundler/lib/bundler/deprecate.rb
63
+ bundler/lib/bundler/digest.rb
63
64
  bundler/lib/bundler/dsl.rb
64
65
  bundler/lib/bundler/endpoint_specification.rb
65
66
  bundler/lib/bundler/env.rb
@@ -213,6 +214,7 @@ bundler/lib/bundler/templates/newgem/rspec.tt
213
214
  bundler/lib/bundler/templates/newgem/rubocop.yml.tt
214
215
  bundler/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt
215
216
  bundler/lib/bundler/templates/newgem/spec/spec_helper.rb.tt
217
+ bundler/lib/bundler/templates/newgem/standard.yml.tt
216
218
  bundler/lib/bundler/templates/newgem/test/minitest/newgem_test.rb.tt
217
219
  bundler/lib/bundler/templates/newgem/test/minitest/test_helper.rb.tt
218
220
  bundler/lib/bundler/templates/newgem/test/test-unit/newgem_test.rb.tt
@@ -223,11 +225,14 @@ bundler/lib/bundler/ui/rg_proxy.rb
223
225
  bundler/lib/bundler/ui/shell.rb
224
226
  bundler/lib/bundler/ui/silent.rb
225
227
  bundler/lib/bundler/uri_credentials_filter.rb
228
+ bundler/lib/bundler/vendor/connection_pool/LICENSE
226
229
  bundler/lib/bundler/vendor/connection_pool/lib/connection_pool.rb
227
- bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/monotonic_time.rb
228
230
  bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb
229
231
  bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb
232
+ bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb
233
+ bundler/lib/bundler/vendor/fileutils/LICENSE.txt
230
234
  bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb
235
+ bundler/lib/bundler/vendor/molinillo/LICENSE
231
236
  bundler/lib/bundler/vendor/molinillo/lib/molinillo.rb
232
237
  bundler/lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb
233
238
  bundler/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb
@@ -248,10 +253,12 @@ bundler/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb
248
253
  bundler/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb
249
254
  bundler/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb
250
255
  bundler/lib/bundler/vendor/molinillo/lib/molinillo/state.rb
256
+ bundler/lib/bundler/vendor/net-http-persistent/README.rdoc
251
257
  bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb
252
258
  bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb
253
259
  bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb
254
260
  bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb
261
+ bundler/lib/bundler/vendor/thor/LICENSE.md
255
262
  bundler/lib/bundler/vendor/thor/lib/thor.rb
256
263
  bundler/lib/bundler/vendor/thor/lib/thor/actions.rb
257
264
  bundler/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb
@@ -284,6 +291,9 @@ bundler/lib/bundler/vendor/thor/lib/thor/shell/html.rb
284
291
  bundler/lib/bundler/vendor/thor/lib/thor/util.rb
285
292
  bundler/lib/bundler/vendor/thor/lib/thor/version.rb
286
293
  bundler/lib/bundler/vendor/tmpdir/lib/tmpdir.rb
294
+ bundler/lib/bundler/vendor/tsort/LICENSE.txt
295
+ bundler/lib/bundler/vendor/tsort/lib/tsort.rb
296
+ bundler/lib/bundler/vendor/uri/LICENSE.txt
287
297
  bundler/lib/bundler/vendor/uri/lib/uri.rb
288
298
  bundler/lib/bundler/vendor/uri/lib/uri/common.rb
289
299
  bundler/lib/bundler/vendor/uri/lib/uri/file.rb
@@ -302,6 +312,7 @@ bundler/lib/bundler/vendored_molinillo.rb
302
312
  bundler/lib/bundler/vendored_persistent.rb
303
313
  bundler/lib/bundler/vendored_thor.rb
304
314
  bundler/lib/bundler/vendored_tmpdir.rb
315
+ bundler/lib/bundler/vendored_tsort.rb
305
316
  bundler/lib/bundler/vendored_uri.rb
306
317
  bundler/lib/bundler/version.rb
307
318
  bundler/lib/bundler/version_ranges.rb
@@ -383,6 +394,17 @@ lib/rubygems/local_remote_options.rb
383
394
  lib/rubygems/mock_gem_ui.rb
384
395
  lib/rubygems/name_tuple.rb
385
396
  lib/rubygems/openssl.rb
397
+ lib/rubygems/optparse.rb
398
+ lib/rubygems/optparse/COPYING
399
+ lib/rubygems/optparse/lib/optionparser.rb
400
+ lib/rubygems/optparse/lib/optparse.rb
401
+ lib/rubygems/optparse/lib/optparse/ac.rb
402
+ lib/rubygems/optparse/lib/optparse/date.rb
403
+ lib/rubygems/optparse/lib/optparse/kwargs.rb
404
+ lib/rubygems/optparse/lib/optparse/shellwords.rb
405
+ lib/rubygems/optparse/lib/optparse/time.rb
406
+ lib/rubygems/optparse/lib/optparse/uri.rb
407
+ lib/rubygems/optparse/lib/optparse/version.rb
386
408
  lib/rubygems/package.rb
387
409
  lib/rubygems/package/digest_io.rb
388
410
  lib/rubygems/package/file_source.rb
@@ -431,6 +453,7 @@ lib/rubygems/resolver/local_specification.rb
431
453
  lib/rubygems/resolver/lock_set.rb
432
454
  lib/rubygems/resolver/lock_specification.rb
433
455
  lib/rubygems/resolver/molinillo.rb
456
+ lib/rubygems/resolver/molinillo/LICENSE
434
457
  lib/rubygems/resolver/molinillo/lib/molinillo.rb
435
458
  lib/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb
436
459
  lib/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb
@@ -484,6 +507,9 @@ lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA.pem
484
507
  lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA_R3.pem
485
508
  lib/rubygems/stub_specification.rb
486
509
  lib/rubygems/text.rb
510
+ lib/rubygems/tsort.rb
511
+ lib/rubygems/tsort/LICENSE.txt
512
+ lib/rubygems/tsort/lib/tsort.rb
487
513
  lib/rubygems/uninstaller.rb
488
514
  lib/rubygems/uri.rb
489
515
  lib/rubygems/uri_formatter.rb
@@ -539,6 +565,7 @@ test/rubygems/plugin/exception/rubygems_plugin.rb
539
565
  test/rubygems/plugin/load/rubygems_plugin.rb
540
566
  test/rubygems/plugin/standarderror/rubygems_plugin.rb
541
567
  test/rubygems/private3072_key.pem
568
+ test/rubygems/private_ec_key.pem
542
569
  test/rubygems/private_key.pem
543
570
  test/rubygems/public3072_cert.pem
544
571
  test/rubygems/public_cert.pem
data/bundler/CHANGELOG.md CHANGED
@@ -1,3 +1,54 @@
1
+ # 2.2.31 (November 8, 2021)
2
+
3
+ ## Enhancements:
4
+
5
+ - Link to working `bundler-graph` plugin in `bundle viz` deprecation message [#5061](https://github.com/rubygems/rubygems/pull/5061)
6
+ - Memoize materialized specs when requiring `bundler/setup` [#5033](https://github.com/rubygems/rubygems/pull/5033)
7
+ - Allow custom LicenseRef [#5013](https://github.com/rubygems/rubygems/pull/5013)
8
+ - Better error when installing a lockfile with git sources and git is not installed [#5036](https://github.com/rubygems/rubygems/pull/5036)
9
+ - Only delete cached gem when it's corrupted [#5031](https://github.com/rubygems/rubygems/pull/5031)
10
+ - Support gemified `tsort` [#5032](https://github.com/rubygems/rubygems/pull/5032)
11
+ - Add standard option alongside rubocop to `bundle gem` [#4411](https://github.com/rubygems/rubygems/pull/4411)
12
+
13
+ ## Bug fixes:
14
+
15
+ - Fix system man pages no longer working after bundler overrides `MANPATH` [#5039](https://github.com/rubygems/rubygems/pull/5039)
16
+ - Don't warn when a lockfile is locked to a dev version [#5018](https://github.com/rubygems/rubygems/pull/5018)
17
+
18
+ # 2.2.30 (October 26, 2021)
19
+
20
+ ## Enhancements:
21
+
22
+ - Add a custom SHA1 digest implementation to no longer depend on the digest gem before we know which version to activate [#4989](https://github.com/rubygems/rubygems/pull/4989)
23
+ - Ensure vendored gems have licenses [#4998](https://github.com/rubygems/rubygems/pull/4998)
24
+ - Update broken link in Bundler::Fetcher::CertificateFailureError [#4987](https://github.com/rubygems/rubygems/pull/4987)
25
+ - Give better errors for some permission issues [#4965](https://github.com/rubygems/rubygems/pull/4965)
26
+ - Print better errors when `bundler/gem_tasks` fail [#4872](https://github.com/rubygems/rubygems/pull/4872)
27
+ - Fix `bundle install` to reinstall deleted gems [#4974](https://github.com/rubygems/rubygems/pull/4974)
28
+ - Unify issue template and ISSUES.md document [#4980](https://github.com/rubygems/rubygems/pull/4980)
29
+ - Bump vendored connection_pool to 2.2.5 [#4738](https://github.com/rubygems/rubygems/pull/4738)
30
+
31
+ ## Bug fixes:
32
+
33
+ - Fix error message pointing to non existing file when using a global gem cache [#4999](https://github.com/rubygems/rubygems/pull/4999)
34
+ - Fix install crash when lockfile has missing dependencies for the current platform [#4941](https://github.com/rubygems/rubygems/pull/4941)
35
+ - Make `bundle info` show a proper warning every time it finds a deleted gem [#4971](https://github.com/rubygems/rubygems/pull/4971)
36
+
37
+ # 2.2.29 (October 8, 2021)
38
+
39
+ ## Enhancements:
40
+
41
+ - Require at least Ruby 2.6.0 for gems created with recent rubies [#4920](https://github.com/rubygems/rubygems/pull/4920)
42
+ - Include glob information in string representation of git sources to make generated lockfiles deterministic [#4947](https://github.com/rubygems/rubygems/pull/4947)
43
+ - Add missing `rubygem_push` prerequisite [#4930](https://github.com/rubygems/rubygems/pull/4930)
44
+
45
+ # 2.2.28 (September 23, 2021)
46
+
47
+ ## Enhancements:
48
+
49
+ - Use example.com in new gem template, since it will never have a potentially dangerous backing website [#4918](https://github.com/rubygems/rubygems/pull/4918)
50
+ - Deprecate `--install` flag to `bundle remove` and trigger install by default [#4891](https://github.com/rubygems/rubygems/pull/4891)
51
+
1
52
  # 2.2.27 (September 3, 2021)
2
53
 
3
54
  ## Enhancements:
@@ -92,7 +143,7 @@
92
143
  - Fix `bundle doctor` crashing when finding a broken symlink [#4707](https://github.com/rubygems/rubygems/pull/4707)
93
144
  - Fix incorrect re-resolve edge case [#4700](https://github.com/rubygems/rubygems/pull/4700)
94
145
  - Fix some gems being unintentionally locked under multiple lockfile sections [#4701](https://github.com/rubygems/rubygems/pull/4701)
95
- - Fix `--conservative` flag unexpectedly updating indirect dependencies [#4692](https://github.com/rubygems/rubygems/pull/4692)
146
+ - Fix `--conservative` flag unexpectedly updating indirect dependencies. NOTE: As part of this bug fix, some undocumented, unintentional code causing `bundle update --source <gem>` to update conservatively was fixed. Use the documented `bundle update --conservative <gem>` instead [#4692](https://github.com/rubygems/rubygems/pull/4692)
96
147
 
97
148
  # 2.2.21 (June 23, 2021)
98
149
 
data/bundler/README.md CHANGED
@@ -32,7 +32,7 @@ See [bundler.io](https://bundler.io) for the full documentation.
32
32
 
33
33
  For help with common problems, see [TROUBLESHOOTING](doc/TROUBLESHOOTING.md).
34
34
 
35
- Still stuck? Try [filing an issue](doc/contributing/ISSUES.md).
35
+ Still stuck? Try [filing an issue](https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md).
36
36
 
37
37
  ### Other questions
38
38
 
@@ -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 = "2021-09-03".freeze
8
- @git_commit_sha = "b737e1c930".freeze
7
+ @built_at = "2021-11-08".freeze
8
+ @git_commit_sha = "2505ef8972".freeze
9
9
  @release = true
10
10
  # end ivars
11
11
 
@@ -68,7 +68,7 @@ module Bundler
68
68
  :bundler_version => bundler_dependency_version,
69
69
  :git => use_git,
70
70
  :github_username => github_username.empty? ? "[USERNAME]" : github_username,
71
- :required_ruby_version => Gem.ruby_version < Gem::Version.new("2.4.a") ? "2.3.0" : "2.4.0",
71
+ :required_ruby_version => required_ruby_version,
72
72
  }
73
73
  ensure_safe_gem_name(name, constant_array)
74
74
 
@@ -163,15 +163,16 @@ module Bundler
163
163
  templates.merge!("CHANGELOG.md.tt" => "CHANGELOG.md")
164
164
  end
165
165
 
166
- if ask_and_set(:rubocop, "Do you want to add rubocop as a dependency for gems you generate?",
167
- "RuboCop is a static code analyzer that has out-of-the-box rules for many " \
168
- "of the guidelines in the community style guide. " \
169
- "For more information, see the RuboCop docs (https://docs.rubocop.org/en/stable/) " \
170
- "and the Ruby Style Guides (https://github.com/rubocop-hq/ruby-style-guide).")
171
- config[:rubocop] = true
172
- config[:rubocop_version] = Gem.ruby_version < Gem::Version.new("2.4.a") ? "0.81.0" : "1.7"
166
+ config[:linter] = ask_and_set_linter
167
+ case config[:linter]
168
+ when "rubocop"
169
+ config[:linter_version] = rubocop_version
173
170
  Bundler.ui.info "RuboCop enabled in config"
174
171
  templates.merge!("rubocop.yml.tt" => ".rubocop.yml")
172
+ when "standard"
173
+ config[:linter_version] = standard_version
174
+ Bundler.ui.info "Standard enabled in config"
175
+ templates.merge!("standard.yml.tt" => ".standard.yml")
175
176
  end
176
177
 
177
178
  templates.merge!("exe/newgem.tt" => "exe/#{name}") if config[:exe]
@@ -317,6 +318,58 @@ module Bundler
317
318
  ci_template
318
319
  end
319
320
 
321
+ def ask_and_set_linter
322
+ linter_template = options[:linter] || Bundler.settings["gem.linter"]
323
+ linter_template = deprecated_rubocop_option if linter_template.nil?
324
+
325
+ if linter_template.to_s.empty?
326
+ Bundler.ui.confirm "Do you want to add a code linter and formatter to your gem? " \
327
+ "Supported Linters:\n" \
328
+ "* RuboCop: https://rubocop.org\n" \
329
+ "* Standard: https://github.com/testdouble/standard\n" \
330
+ "\n"
331
+ Bundler.ui.info hint_text("linter")
332
+
333
+ result = Bundler.ui.ask "Enter a linter. rubocop/standard/(none):"
334
+ if result =~ /rubocop|standard/
335
+ linter_template = result
336
+ else
337
+ linter_template = false
338
+ end
339
+ end
340
+
341
+ if Bundler.settings["gem.linter"].nil?
342
+ Bundler.settings.set_global("gem.linter", linter_template)
343
+ end
344
+
345
+ # Once gem.linter safely set, unset the deprecated gem.rubocop
346
+ unless Bundler.settings["gem.rubocop"].nil?
347
+ Bundler.settings.set_global("gem.rubocop", nil)
348
+ end
349
+
350
+ if options[:linter] == Bundler.settings["gem.linter"]
351
+ Bundler.ui.info "#{options[:linter]} is already configured, ignoring --linter flag."
352
+ end
353
+
354
+ linter_template
355
+ end
356
+
357
+ def deprecated_rubocop_option
358
+ if !options[:rubocop].nil?
359
+ if options[:rubocop]
360
+ Bundler::SharedHelpers.major_deprecation 2, "--rubocop is deprecated, use --linter=rubocop"
361
+ "rubocop"
362
+ else
363
+ Bundler::SharedHelpers.major_deprecation 2, "--no-rubocop is deprecated, use --linter"
364
+ false
365
+ end
366
+ elsif !Bundler.settings["gem.rubocop"].nil?
367
+ Bundler::SharedHelpers.major_deprecation 2,
368
+ "config gem.rubocop is deprecated; we've updated your config to use gem.linter instead"
369
+ Bundler.settings["gem.rubocop"] ? "rubocop" : false
370
+ end
371
+ end
372
+
320
373
  def bundler_dependency_version
321
374
  v = Gem::Version.new(Bundler::VERSION)
322
375
  req = v.segments[0..1]
@@ -350,5 +403,30 @@ module Bundler
350
403
  def open_editor(editor, file)
351
404
  thor.run(%(#{editor} "#{file}"))
352
405
  end
406
+
407
+ def required_ruby_version
408
+ if Gem.ruby_version < Gem::Version.new("2.4.a") then "2.3.0"
409
+ elsif Gem.ruby_version < Gem::Version.new("2.5.a") then "2.4.0"
410
+ elsif Gem.ruby_version < Gem::Version.new("2.6.a") then "2.5.0"
411
+ else
412
+ "2.6.0"
413
+ end
414
+ end
415
+
416
+ def rubocop_version
417
+ if Gem.ruby_version < Gem::Version.new("2.4.a") then "0.81.0"
418
+ elsif Gem.ruby_version < Gem::Version.new("2.5.a") then "1.12"
419
+ else
420
+ "1.21"
421
+ end
422
+ end
423
+
424
+ def standard_version
425
+ if Gem.ruby_version < Gem::Version.new("2.4.a") then "0.2.5"
426
+ elsif Gem.ruby_version < Gem::Version.new("2.5.a") then "1.0"
427
+ else
428
+ "1.3"
429
+ end
430
+ end
353
431
  end
354
432
  end
@@ -40,12 +40,13 @@ module Bundler
40
40
  end
41
41
 
42
42
  def print_gem_path(spec)
43
- if spec.name == "bundler"
43
+ name = spec.name
44
+ if name == "bundler"
44
45
  path = File.expand_path("../../../..", __FILE__)
45
46
  else
46
47
  path = spec.full_gem_path
47
- unless File.directory?(path)
48
- return Bundler.ui.warn "The gem #{gem_name} has been deleted. It was installed at: #{path}"
48
+ if spec.deleted_gem?
49
+ return Bundler.ui.warn "The gem #{name} has been deleted. It was installed at: #{path}"
49
50
  end
50
51
  end
51
52
 
@@ -54,8 +55,9 @@ module Bundler
54
55
 
55
56
  def print_gem_info(spec)
56
57
  metadata = spec.metadata
58
+ name = spec.name
57
59
  gem_info = String.new
58
- gem_info << " * #{spec.name} (#{spec.version}#{spec.git_version})\n"
60
+ gem_info << " * #{name} (#{spec.version}#{spec.git_version})\n"
59
61
  gem_info << "\tSummary: #{spec.summary}\n" if spec.summary
60
62
  gem_info << "\tHomepage: #{spec.homepage}\n" if spec.homepage
61
63
  gem_info << "\tDocumentation: #{metadata["documentation_uri"]}\n" if metadata.key?("documentation_uri")
@@ -67,6 +69,11 @@ module Bundler
67
69
  gem_info << "\tMailing List: #{metadata["mailing_list_uri"]}\n" if metadata.key?("mailing_list_uri")
68
70
  gem_info << "\tPath: #{spec.full_gem_path}\n"
69
71
  gem_info << "\tDefault Gem: yes" if spec.respond_to?(:default_gem?) && spec.default_gem?
72
+
73
+ if spec.deleted_gem?
74
+ return Bundler.ui.warn "The gem #{name} has been deleted. Gemspec information is still available though:\n#{gem_info}"
75
+ end
76
+
70
77
  Bundler.ui.info gem_info
71
78
  end
72
79
  end
@@ -20,9 +20,10 @@ module Bundler
20
20
 
21
21
  Hopefully the troubleshooting steps above resolved your problem! If things
22
22
  still aren't working the way you expect them to, please let us know so
23
- that we can diagnose and help fix the problem you're having. Please
24
- view the Filing Issues guide for more information:
25
- https://github.com/rubygems/rubygems/blob/master/bundler/doc/contributing/ISSUES.md
23
+ that we can diagnose and help fix the problem you're having, by filling
24
+ in the new issue form located at
25
+ https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md,
26
+ and copy and pasting the information below.
26
27
 
27
28
  EOS
28
29
 
@@ -11,8 +11,7 @@ module Bundler
11
11
  raise InvalidOption, "Please specify gems to remove." if @gems.empty?
12
12
 
13
13
  Injector.remove(@gems, {})
14
-
15
- Installer.install(Bundler.root, Bundler.definition) if @options["install"]
14
+ Installer.install(Bundler.root, Bundler.definition)
16
15
  end
17
16
  end
18
17
  end
@@ -184,6 +184,7 @@ module Bundler
184
184
  method_option "install", :type => :boolean, :banner =>
185
185
  "Runs 'bundle install' after removing the gems from the Gemfile"
186
186
  def remove(*gems)
187
+ SharedHelpers.major_deprecation(2, "The `--install` flag has been deprecated. `bundle install` is triggered by default.") if ARGV.include?("--install")
187
188
  require_relative "cli/remove"
188
189
  Remove.new(gems, options).run
189
190
  end
@@ -551,7 +552,7 @@ module Bundler
551
552
  method_option :version, :type => :boolean, :default => false, :aliases => "-v", :desc => "Set to show each gem version."
552
553
  method_option :without, :type => :array, :default => [], :aliases => "-W", :banner => "GROUP[ GROUP...]", :desc => "Exclude gems that are part of the specified named group."
553
554
  def viz
554
- SharedHelpers.major_deprecation 2, "The `viz` command has been moved to the `bundle-viz` gem, see https://github.com/bundler/bundler-viz"
555
+ SharedHelpers.major_deprecation 2, "The `viz` command has been moved to the `bundle-viz` gem, see https://github.com/rubygems/bundler-graph"
555
556
  require_relative "cli/viz"
556
557
  Viz.new(options.dup).run
557
558
  end
@@ -574,6 +575,8 @@ module Bundler
574
575
  :desc => "Generate a test directory for your library, either rspec, minitest or test-unit. Set a default with `bundle config set --global gem.test (rspec|minitest|test-unit)`."
575
576
  method_option :ci, :type => :string, :lazy_default => Bundler.settings["gem.ci"] || "",
576
577
  :desc => "Generate CI configuration, either GitHub Actions, Travis CI, GitLab CI or CircleCI. Set a default with `bundle config set --global gem.ci (github|travis|gitlab|circle)`"
578
+ method_option :linter, :type => :string, :lazy_default => Bundler.settings["gem.linter"] || "",
579
+ :desc => "Add a linter and code formatter, either RuboCop or Standard. Set a default with `bundle config set --global gem.linter (rubocop|standard)`"
577
580
  method_option :github_username, :type => :string, :default => Bundler.settings["gem.github_username"], :banner => "Set your username on GitHub", :desc => "Fill in GitHub username on README so that you don't have to do it manually. Set a default with `bundle config set --global gem.github_username <your_username>`."
578
581
 
579
582
  def gem(name)
@@ -5,7 +5,7 @@ require "set"
5
5
 
6
6
  module Bundler
7
7
  class CompactIndexClient
8
- DEBUG_MUTEX = Mutex.new
8
+ DEBUG_MUTEX = Thread::Mutex.new
9
9
  def self.debug
10
10
  return unless ENV["DEBUG_COMPACT_INDEX"]
11
11
  DEBUG_MUTEX.synchronize { warn("[#{self}] #{yield}") }
@@ -25,7 +25,7 @@ module Bundler
25
25
  @endpoints = Set.new
26
26
  @info_checksums_by_name = {}
27
27
  @parsed_checksums = false
28
- @mutex = Mutex.new
28
+ @mutex = Thread::Mutex.new
29
29
  end
30
30
 
31
31
  def execution_mode=(block)
@@ -73,7 +73,6 @@ module Bundler
73
73
  @lockfile_contents = String.new
74
74
  @locked_bundler_version = nil
75
75
  @locked_ruby_version = nil
76
- @locked_specs_incomplete_for_platform = false
77
76
  @new_platform = nil
78
77
 
79
78
  if lockfile && File.exist?(lockfile)
@@ -139,6 +138,8 @@ module Bundler
139
138
  @dependency_changes = converge_dependencies
140
139
  @local_changes = converge_locals
141
140
 
141
+ @locked_specs_incomplete_for_platform = !@locked_specs.for(requested_dependencies & expand_dependencies(locked_dependencies), true, true)
142
+
142
143
  @requires = compute_requires
143
144
  end
144
145
 
@@ -228,17 +229,22 @@ module Bundler
228
229
  end
229
230
  end
230
231
 
232
+ def locked_dependencies
233
+ @locked_deps.values
234
+ end
235
+
231
236
  def specs_for(groups)
232
- groups = requested_groups if groups.empty?
237
+ return specs if groups.empty?
233
238
  deps = dependencies_for(groups)
234
- materialize(expand_dependencies(deps))
239
+ materialize(deps)
235
240
  end
236
241
 
237
242
  def dependencies_for(groups)
238
243
  groups.map!(&:to_sym)
239
- current_dependencies.reject do |d|
244
+ deps = current_dependencies.reject do |d|
240
245
  (d.groups & groups).empty?
241
246
  end
247
+ expand_dependencies(deps)
242
248
  end
243
249
 
244
250
  # Resolve all the dependencies specified in Gemfile. It ensures that
@@ -367,8 +373,8 @@ module Bundler
367
373
  new_sources = gemfile_sources - @locked_sources
368
374
  deleted_sources = @locked_sources - gemfile_sources
369
375
 
370
- new_deps = @dependencies - @locked_deps.values
371
- deleted_deps = @locked_deps.values - @dependencies
376
+ new_deps = @dependencies - locked_dependencies
377
+ deleted_deps = locked_dependencies - @dependencies
372
378
 
373
379
  # Check if it is possible that the source is only changed thing
374
380
  if (new_deps.empty? && deleted_deps.empty?) && (!new_sources.empty? && !deleted_sources.empty?)
@@ -560,7 +566,7 @@ module Bundler
560
566
 
561
567
  def dependencies_for_source_changed?(source, locked_source = source)
562
568
  deps_for_source = @dependencies.select {|s| s.source == source }
563
- locked_deps_for_source = @locked_deps.values.select {|dep| dep.source == locked_source }
569
+ locked_deps_for_source = locked_dependencies.select {|dep| dep.source == locked_source }
564
570
 
565
571
  deps_for_source.uniq.sort != locked_deps_for_source.sort
566
572
  end
@@ -644,7 +650,7 @@ module Bundler
644
650
 
645
651
  def converge_dependencies
646
652
  frozen = Bundler.frozen_bundle?
647
- (@dependencies + @locked_deps.values).each do |dep|
653
+ (@dependencies + locked_dependencies).each do |dep|
648
654
  locked_source = @locked_deps[dep.name]
649
655
  # This is to make sure that if bundler is installing in deployment mode and
650
656
  # after locked_source and sources don't match, we still use locked_source.
@@ -751,7 +757,6 @@ module Bundler
751
757
  end
752
758
 
753
759
  resolve = SpecSet.new(converged)
754
- @locked_specs_incomplete_for_platform = !resolve.for(expand_dependencies(requested_dependencies & deps), true, true)
755
760
  resolve = SpecSet.new(resolve.for(expand_dependencies(deps, true), false, false).reject{|s| @unlock[:gems].include?(s.name) })
756
761
  diff = nil
757
762
 
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This code was extracted from https://github.com/Solistra/ruby-digest which is under public domain
4
+ module Bundler
5
+ module Digest
6
+ # The initial constant values for the 32-bit constant words A, B, C, D, and
7
+ # E, respectively.
8
+ SHA1_WORDS = [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0].freeze
9
+
10
+ # The 8-bit field used for bitwise `AND` masking. Defaults to `0xFFFFFFFF`.
11
+ SHA1_MASK = 0xFFFFFFFF
12
+
13
+ class << self
14
+ def sha1(string)
15
+ unless string.is_a?(String)
16
+ raise TypeError, "can't convert #{string.class.inspect} into String"
17
+ end
18
+
19
+ buffer = string.b
20
+
21
+ words = SHA1_WORDS.dup
22
+ generate_split_buffer(buffer) do |chunk|
23
+ w = []
24
+ chunk.each_slice(4) do |a, b, c, d|
25
+ w << (((a << 8 | b) << 8 | c) << 8 | d)
26
+ end
27
+ a, b, c, d, e = *words
28
+ (16..79).each do |i|
29
+ w[i] = SHA1_MASK & rotate((w[i-3] ^ w[i-8] ^ w[i-14] ^ w[i-16]), 1)
30
+ end
31
+ 0.upto(79) do |i|
32
+ case i
33
+ when 0..19
34
+ f = ((b & c) | (~b & d))
35
+ k = 0x5A827999
36
+ when 20..39
37
+ f = (b ^ c ^ d)
38
+ k = 0x6ED9EBA1
39
+ when 40..59
40
+ f = ((b & c) | (b & d) | (c & d))
41
+ k = 0x8F1BBCDC
42
+ when 60..79
43
+ f = (b ^ c ^ d)
44
+ k = 0xCA62C1D6
45
+ end
46
+ t = SHA1_MASK & (SHA1_MASK & rotate(a, 5) + f + e + k + w[i])
47
+ a, b, c, d, e = t, a, SHA1_MASK & rotate(b, 30), c, d # rubocop:disable Style/ParallelAssignment
48
+ end
49
+ mutated = [a, b, c, d, e]
50
+ words.map!.with_index {|word, index| SHA1_MASK & (word + mutated[index]) }
51
+ end
52
+
53
+ words.pack("N*").unpack("H*").first
54
+ end
55
+
56
+ private
57
+
58
+ def generate_split_buffer(string, &block)
59
+ size = string.bytesize * 8
60
+ buffer = string.bytes << 128
61
+ buffer << 0 while buffer.size % 64 != 56
62
+ buffer.concat([size].pack("Q>").bytes)
63
+ buffer.each_slice(64, &block)
64
+ end
65
+
66
+ def rotate(value, spaces)
67
+ value << spaces | value >> (32 - spaces)
68
+ end
69
+ end
70
+ end
71
+ end