bundler 2.5.16 → 2.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +194 -0
  3. data/bundler.gemspec +2 -2
  4. data/lib/bundler/build_metadata.rb +2 -2
  5. data/lib/bundler/cli/add.rb +3 -1
  6. data/lib/bundler/cli/check.rb +3 -3
  7. data/lib/bundler/cli/console.rb +0 -4
  8. data/lib/bundler/cli/doctor.rb +4 -4
  9. data/lib/bundler/cli/exec.rb +1 -0
  10. data/lib/bundler/cli/gem.rb +6 -3
  11. data/lib/bundler/cli/info.rb +2 -2
  12. data/lib/bundler/cli/inject.rb +1 -1
  13. data/lib/bundler/cli/install.rb +13 -4
  14. data/lib/bundler/cli/lock.rb +25 -6
  15. data/lib/bundler/cli/outdated.rb +16 -18
  16. data/lib/bundler/cli/pristine.rb +1 -1
  17. data/lib/bundler/cli/show.rb +2 -2
  18. data/lib/bundler/cli.rb +38 -68
  19. data/lib/bundler/compact_index_client/cache_file.rb +0 -5
  20. data/lib/bundler/compact_index_client/updater.rb +0 -11
  21. data/lib/bundler/definition.rb +186 -119
  22. data/lib/bundler/dependency.rb +1 -1
  23. data/lib/bundler/dsl.rb +67 -52
  24. data/lib/bundler/endpoint_specification.rb +10 -1
  25. data/lib/bundler/errors.rb +17 -5
  26. data/lib/bundler/feature_flag.rb +1 -0
  27. data/lib/bundler/fetcher/compact_index.rb +1 -1
  28. data/lib/bundler/fetcher.rb +12 -5
  29. data/lib/bundler/force_platform.rb +0 -2
  30. data/lib/bundler/gem_helpers.rb +21 -5
  31. data/lib/bundler/injector.rb +2 -2
  32. data/lib/bundler/inline.rb +42 -17
  33. data/lib/bundler/installer/gem_installer.rb +4 -2
  34. data/lib/bundler/installer/parallel_installer.rb +3 -2
  35. data/lib/bundler/installer/standalone.rb +2 -2
  36. data/lib/bundler/installer.rb +11 -47
  37. data/lib/bundler/lazy_specification.rb +74 -26
  38. data/lib/bundler/lockfile_generator.rb +1 -1
  39. data/lib/bundler/lockfile_parser.rb +10 -2
  40. data/lib/bundler/man/bundle-add.1 +42 -25
  41. data/lib/bundler/man/bundle-add.1.ronn +52 -23
  42. data/lib/bundler/man/bundle-binstubs.1 +7 -4
  43. data/lib/bundler/man/bundle-binstubs.1.ronn +6 -3
  44. data/lib/bundler/man/bundle-cache.1 +30 -2
  45. data/lib/bundler/man/bundle-cache.1.ronn +31 -2
  46. data/lib/bundler/man/bundle-check.1 +3 -3
  47. data/lib/bundler/man/bundle-check.1.ronn +4 -2
  48. data/lib/bundler/man/bundle-clean.1 +1 -1
  49. data/lib/bundler/man/bundle-config.1 +3 -5
  50. data/lib/bundler/man/bundle-config.1.ronn +2 -7
  51. data/lib/bundler/man/bundle-console.1 +2 -4
  52. data/lib/bundler/man/bundle-console.1.ronn +2 -7
  53. data/lib/bundler/man/bundle-doctor.1 +2 -2
  54. data/lib/bundler/man/bundle-doctor.1.ronn +1 -1
  55. data/lib/bundler/man/bundle-env.1 +9 -0
  56. data/lib/bundler/man/bundle-env.1.ronn +10 -0
  57. data/lib/bundler/man/bundle-exec.1 +5 -2
  58. data/lib/bundler/man/bundle-exec.1.ronn +4 -1
  59. data/lib/bundler/man/bundle-fund.1 +22 -0
  60. data/lib/bundler/man/bundle-fund.1.ronn +25 -0
  61. data/lib/bundler/man/bundle-gem.1 +17 -5
  62. data/lib/bundler/man/bundle-gem.1.ronn +27 -6
  63. data/lib/bundler/man/bundle-help.1 +1 -1
  64. data/lib/bundler/man/bundle-info.1 +5 -2
  65. data/lib/bundler/man/bundle-info.1.ronn +6 -2
  66. data/lib/bundler/man/bundle-init.1 +3 -3
  67. data/lib/bundler/man/bundle-init.1.ronn +3 -2
  68. data/lib/bundler/man/bundle-inject.1 +10 -2
  69. data/lib/bundler/man/bundle-inject.1.ronn +9 -1
  70. data/lib/bundler/man/bundle-install.1 +15 -12
  71. data/lib/bundler/man/bundle-install.1.ronn +22 -18
  72. data/lib/bundler/man/bundle-issue.1 +45 -0
  73. data/lib/bundler/man/bundle-issue.1.ronn +37 -0
  74. data/lib/bundler/man/bundle-licenses.1 +9 -0
  75. data/lib/bundler/man/bundle-licenses.1.ronn +10 -0
  76. data/lib/bundler/man/bundle-list.1 +1 -1
  77. data/lib/bundler/man/bundle-list.1.ronn +4 -1
  78. data/lib/bundler/man/bundle-lock.1 +21 -6
  79. data/lib/bundler/man/bundle-lock.1.ronn +25 -4
  80. data/lib/bundler/man/bundle-open.1 +2 -2
  81. data/lib/bundler/man/bundle-open.1.ronn +2 -1
  82. data/lib/bundler/man/bundle-outdated.1 +8 -5
  83. data/lib/bundler/man/bundle-outdated.1.ronn +8 -4
  84. data/lib/bundler/man/bundle-platform.1 +1 -1
  85. data/lib/bundler/man/bundle-plugin.1 +1 -1
  86. data/lib/bundler/man/bundle-pristine.1 +1 -1
  87. data/lib/bundler/man/bundle-pristine.1.ronn +1 -1
  88. data/lib/bundler/man/bundle-remove.1 +1 -1
  89. data/lib/bundler/man/bundle-remove.1.ronn +1 -1
  90. data/lib/bundler/man/bundle-show.1 +5 -2
  91. data/lib/bundler/man/bundle-show.1.ronn +4 -0
  92. data/lib/bundler/man/bundle-update.1 +13 -7
  93. data/lib/bundler/man/bundle-update.1.ronn +14 -6
  94. data/lib/bundler/man/bundle-version.1 +1 -1
  95. data/lib/bundler/man/bundle-viz.1 +4 -4
  96. data/lib/bundler/man/bundle-viz.1.ronn +7 -3
  97. data/lib/bundler/man/bundle.1 +1 -1
  98. data/lib/bundler/man/gemfile.5 +3 -1
  99. data/lib/bundler/man/gemfile.5.ronn +6 -0
  100. data/lib/bundler/man/index.txt +4 -0
  101. data/lib/bundler/materialization.rb +59 -0
  102. data/lib/bundler/plugin/api/source.rb +2 -1
  103. data/lib/bundler/plugin/events.rb +24 -0
  104. data/lib/bundler/plugin/installer.rb +1 -1
  105. data/lib/bundler/plugin.rb +20 -1
  106. data/lib/bundler/process_lock.rb +10 -14
  107. data/lib/bundler/remote_specification.rb +6 -1
  108. data/lib/bundler/resolver/base.rb +12 -6
  109. data/lib/bundler/resolver/candidate.rb +2 -2
  110. data/lib/bundler/resolver/package.rb +10 -1
  111. data/lib/bundler/resolver/spec_group.rb +4 -3
  112. data/lib/bundler/resolver.rb +36 -14
  113. data/lib/bundler/retry.rb +1 -1
  114. data/lib/bundler/ruby_version.rb +7 -1
  115. data/lib/bundler/rubygems_ext.rb +104 -51
  116. data/lib/bundler/rubygems_gem_installer.rb +7 -5
  117. data/lib/bundler/rubygems_integration.rb +23 -62
  118. data/lib/bundler/runtime.rb +22 -7
  119. data/lib/bundler/self_manager.rb +7 -7
  120. data/lib/bundler/settings.rb +6 -1
  121. data/lib/bundler/shared_helpers.rb +29 -17
  122. data/lib/bundler/source/git/git_proxy.rb +0 -2
  123. data/lib/bundler/source/git.rb +93 -40
  124. data/lib/bundler/source/metadata.rb +2 -3
  125. data/lib/bundler/source/path.rb +5 -3
  126. data/lib/bundler/source/rubygems.rb +6 -16
  127. data/lib/bundler/source_list.rb +1 -1
  128. data/lib/bundler/spec_set.rb +82 -57
  129. data/lib/bundler/stub_specification.rb +21 -2
  130. data/lib/bundler/templates/newgem/Gemfile.tt +0 -3
  131. data/lib/bundler/templates/newgem/README.md.tt +7 -3
  132. data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +15 -15
  133. data/lib/bundler/templates/newgem/newgem.gemspec.tt +4 -4
  134. data/lib/bundler/ui/shell.rb +24 -2
  135. data/lib/bundler/ui/silent.rb +12 -1
  136. data/lib/bundler/uri_credentials_filter.rb +1 -1
  137. data/lib/bundler/vendor/fileutils/COPYING +56 -0
  138. data/lib/bundler/vendor/fileutils/lib/fileutils.rb +15 -13
  139. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +46 -8
  140. data/lib/bundler/vendor/securerandom/.document +1 -0
  141. data/lib/bundler/vendor/securerandom/COPYING +56 -0
  142. data/lib/bundler/vendor/securerandom/lib/securerandom.rb +102 -0
  143. data/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +3 -5
  144. data/lib/bundler/vendor/thor/lib/thor/group.rb +11 -0
  145. data/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +1 -4
  146. data/lib/bundler/vendor/thor/lib/thor/parser/option.rb +2 -2
  147. data/lib/bundler/vendor/thor/lib/thor/parser/options.rb +2 -1
  148. data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +9 -9
  149. data/lib/bundler/vendor/thor/lib/thor/shell/html.rb +1 -1
  150. data/lib/bundler/vendor/thor/lib/thor/shell/table_printer.rb +5 -21
  151. data/lib/bundler/vendor/thor/lib/thor/util.rb +1 -1
  152. data/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
  153. data/lib/bundler/vendor/thor/lib/thor.rb +11 -0
  154. data/lib/bundler/vendor/uri/COPYING +56 -0
  155. data/lib/bundler/vendor/uri/lib/uri/common.rb +37 -14
  156. data/lib/bundler/vendor/uri/lib/uri/file.rb +3 -3
  157. data/lib/bundler/vendor/uri/lib/uri/ftp.rb +1 -1
  158. data/lib/bundler/vendor/uri/lib/uri/generic.rb +16 -26
  159. data/lib/bundler/vendor/uri/lib/uri/http.rb +2 -2
  160. data/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +10 -3
  161. data/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +26 -3
  162. data/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
  163. data/lib/bundler/vendor/uri/lib/uri.rb +9 -9
  164. data/lib/bundler/vendored_securerandom.rb +12 -0
  165. data/lib/bundler/version.rb +1 -1
  166. data/lib/bundler/yaml_serializer.rb +1 -1
  167. data/lib/bundler.rb +68 -36
  168. metadata +20 -10
  169. data/lib/bundler/vendor/fileutils/LICENSE.txt +0 -22
  170. data/lib/bundler/vendor/uri/LICENSE.txt +0 -22
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 736fcd6d7bb9c8f0aaa8187d662846d4a17dc827b580d7912350e1e11f7b8c2a
4
- data.tar.gz: 793b6ad42430c89e42202dc735637373f7e7e780e286c63ca603e05712cd4bc1
3
+ metadata.gz: c3728802be4074809ca22f929200d5a37e70e6fc4ce6a2c532724240965347b2
4
+ data.tar.gz: 02ce39fa7358e3ec4923893aa1760f27963a1620b0e62e1b304305d72a1587de
5
5
  SHA512:
6
- metadata.gz: 9246f1b4a399b0f70fc9309365922cd4759dab87cce71f1048c36c50ec5ebc2563c5942c72bf9815a1b9fe13656d3e59b9fd1b490b1f8e32db8f24769b5bdd02
7
- data.tar.gz: d18554604463d8c50739086ee2c9587ca13d44fc24171ed8f4e4759be9a8f71902026a942cf7dcc6ecec74943f6b2c901d71c5455a152a21d5c304ccec87f70d
6
+ metadata.gz: fe1caf39624053f3acd53633ac14621bc3b65fa2aa59eadca1e530fd44207bcd4a4f383fc6624ba6bb3b6663e1067ae278ed43c44a44da2434bb1c3aa6da890b
7
+ data.tar.gz: 7d992c1527acea98a361fb315f201c73e01efed2034a3f6ba61004be4f722841aac5b61cb629a45c0d55d088b199a681e3288f359eb652a6c12cb2db697f1ac7
data/CHANGELOG.md CHANGED
@@ -1,3 +1,197 @@
1
+ # 2.6.2 (December 23, 2024)
2
+
3
+ ## Bug fixes:
4
+
5
+ - Restart using `Process.argv0` only if `$PROGRAM_NAME` is not a script [#8343](https://github.com/rubygems/rubygems/pull/8343)
6
+
7
+ ## Documentation:
8
+
9
+ - Fix typo in `bundle lock` man page synopsis (`--add-checkums` → `--add-checksums`) [#8350](https://github.com/rubygems/rubygems/pull/8350)
10
+
11
+ # 2.6.1 (December 17, 2024)
12
+
13
+ ## Bug fixes:
14
+
15
+ - Fix missing `Gem::Uri.redact` on some Ruby 3.1 versions [#8337](https://github.com/rubygems/rubygems/pull/8337)
16
+ - Fix `bundle lock --add-checksums` when gems are already installed [#8326](https://github.com/rubygems/rubygems/pull/8326)
17
+
18
+ # 2.6.0 (December 16, 2024)
19
+
20
+ ## Security:
21
+
22
+ - Fix gemfury credentials written to logs in verbose mode [#8283](https://github.com/rubygems/rubygems/pull/8283)
23
+ - Fix private registry credentials being written to logs [#8222](https://github.com/rubygems/rubygems/pull/8222)
24
+
25
+ ## Breaking changes:
26
+
27
+ - Drop ruby 3.0 support [#8091](https://github.com/rubygems/rubygems/pull/8091)
28
+ - Remove client-side MD5 ETag transition from compact index client [#7677](https://github.com/rubygems/rubygems/pull/7677)
29
+
30
+ ## Deprecations:
31
+
32
+ - Cancel `bundle console` deprecation [#8218](https://github.com/rubygems/rubygems/pull/8218)
33
+ - Warn when platform of installed gem differs from platform in the lockfile [#8029](https://github.com/rubygems/rubygems/pull/8029)
34
+ - Cancel deprecation of Gemfiles without a global source [#8213](https://github.com/rubygems/rubygems/pull/8213)
35
+
36
+ ## Features:
37
+
38
+ - Add a `lockfile_checksums` configuration to include checksums in fresh lockfiles [#8219](https://github.com/rubygems/rubygems/pull/8219)
39
+ - Add `bundle lock --add-checksums` to add checksums to an existing lockfile [#8214](https://github.com/rubygems/rubygems/pull/8214)
40
+
41
+ ## Performance:
42
+
43
+ - Enable a couple of performance cops [#8261](https://github.com/rubygems/rubygems/pull/8261)
44
+ - Remove override of worker jobs for `bundle install --local` [#8248](https://github.com/rubygems/rubygems/pull/8248)
45
+
46
+ ## Enhancements:
47
+
48
+ - Support `bundle exec <relative-path-to-script>` when `Kernel.exec` is used under the hood [#8294](https://github.com/rubygems/rubygems/pull/8294)
49
+ - Improve working with different rubies using the same lockfile [#8251](https://github.com/rubygems/rubygems/pull/8251)
50
+ - Define a few `inspect` methods to help debugging [#8266](https://github.com/rubygems/rubygems/pull/8266)
51
+ - Include original error when openssl fails to load [#8232](https://github.com/rubygems/rubygems/pull/8232)
52
+ - Automatically fix lockfile when it's missing dependencies [#8103](https://github.com/rubygems/rubygems/pull/8103)
53
+ - Fix some JRuby warnings when using `bundler/setup` with Ruby's -w flag [#8205](https://github.com/rubygems/rubygems/pull/8205)
54
+ - Add a `--normalize-platforms` flag to `bundle lock` [#7896](https://github.com/rubygems/rubygems/pull/7896)
55
+ - Add plugin hooks for Bundler.require [#3439](https://github.com/rubygems/rubygems/pull/3439)
56
+
57
+ ## Bug fixes:
58
+
59
+ - Fix restarting with locked version when `$PROGRAM_NAME` has been changed [#8320](https://github.com/rubygems/rubygems/pull/8320)
60
+ - Restore the previous cache format for git sources [#8296](https://github.com/rubygems/rubygems/pull/8296)
61
+ - Fix installs of subdependencies of unlocked dependencies to be conservative [#8281](https://github.com/rubygems/rubygems/pull/8281)
62
+ - Fix test task name on generated readme when using test-unit [#8291](https://github.com/rubygems/rubygems/pull/8291)
63
+ - Fix `bundle exec` executable detection on windows [#8276](https://github.com/rubygems/rubygems/pull/8276)
64
+ - Fix `bundle remove` sometimes not removing gems [#8278](https://github.com/rubygems/rubygems/pull/8278)
65
+ - Fix issue with git gems locking incorrect specs sometimes [#8269](https://github.com/rubygems/rubygems/pull/8269)
66
+
67
+ ## Documentation:
68
+
69
+ - Normalize command flag documentation and make sure all flags are documented [#8313](https://github.com/rubygems/rubygems/pull/8313)
70
+ - Add missing man pages for `bundle env` and `bundle licenses` [#8315](https://github.com/rubygems/rubygems/pull/8315)
71
+ - Add man page for 'bundle issue' command [#8271](https://github.com/rubygems/rubygems/pull/8271)
72
+ - Add man page for 'bundle fund' command [#8258](https://github.com/rubygems/rubygems/pull/8258)
73
+ - Move pry-related contents to `debugging.md` [#8263](https://github.com/rubygems/rubygems/pull/8263)
74
+ - Add debugging instruction on Windows [#8236](https://github.com/rubygems/rubygems/pull/8236)
75
+ - Unify rubygems and bundler docs directory [#8159](https://github.com/rubygems/rubygems/pull/8159)
76
+
77
+ # 2.5.23 (November 5, 2024)
78
+
79
+ ## Enhancements:
80
+
81
+ - Add useful error message for plugin load [#7639](https://github.com/rubygems/rubygems/pull/7639)
82
+ - Indent github workflow steps for generated gems [#8193](https://github.com/rubygems/rubygems/pull/8193)
83
+ - Improve several permission errors [#8168](https://github.com/rubygems/rubygems/pull/8168)
84
+ - Add `bundle add` `--quiet` option [#8157](https://github.com/rubygems/rubygems/pull/8157)
85
+
86
+ ## Bug fixes:
87
+
88
+ - Fix incompatible encodings error when paths with UTF-8 characters are involved [#8196](https://github.com/rubygems/rubygems/pull/8196)
89
+ - Update `--ext=rust` to support compiling the native extension from source [#7610](https://github.com/rubygems/rubygems/pull/7610)
90
+ - Print a proper error when there's a previous empty installation path with bad permissions [#8169](https://github.com/rubygems/rubygems/pull/8169)
91
+ - Fix running `bundler` (with a final `r`) in a `bundle exec` context [#8165](https://github.com/rubygems/rubygems/pull/8165)
92
+ - Handle two `gemspec` usages in same Gemfile with same dep and compatible requirements [#7999](https://github.com/rubygems/rubygems/pull/7999)
93
+ - Fix `bundle check` sometimes locking gems under the wrong source [#8148](https://github.com/rubygems/rubygems/pull/8148)
94
+
95
+ ## Documentation:
96
+
97
+ - Remove confusing `bundle config` documentation [#8177](https://github.com/rubygems/rubygems/pull/8177)
98
+ - Rename bundler inline's `install` parameter and clarify docs [#8170](https://github.com/rubygems/rubygems/pull/8170)
99
+ - Clarify `bundle install --quiet` documentation [#8163](https://github.com/rubygems/rubygems/pull/8163)
100
+
101
+ # 2.5.22 (October 16, 2024)
102
+
103
+ ## Enhancements:
104
+
105
+ - Update vendored `uri` and `net-http` [#8112](https://github.com/rubygems/rubygems/pull/8112)
106
+
107
+ ## Bug fixes:
108
+
109
+ - Fix bundler sometimes crashing because of trying to use a version of psych compiled for a different Ruby [#8104](https://github.com/rubygems/rubygems/pull/8104)
110
+
111
+ # 2.5.21 (October 3, 2024)
112
+
113
+ ## Bug fixes:
114
+
115
+ - Fix bug report template printed when changing a path source to a git source in frozen mode [#8079](https://github.com/rubygems/rubygems/pull/8079)
116
+ - Fix `stub.activated?` sometimes returning false after activation under bundler [#8073](https://github.com/rubygems/rubygems/pull/8073)
117
+ - Fix old cache format detection when application is not source controlled [#8076](https://github.com/rubygems/rubygems/pull/8076)
118
+ - Fix `bundler/inline` resetting ENV changes [#8059](https://github.com/rubygems/rubygems/pull/8059)
119
+
120
+ # 2.5.20 (September 24, 2024)
121
+
122
+ ## Enhancements:
123
+
124
+ - Don't try to auto-install dev versions of Bundler not available remotely [#8045](https://github.com/rubygems/rubygems/pull/8045)
125
+ - Don't try to install locked bundler when `--local` is passed [#8041](https://github.com/rubygems/rubygems/pull/8041)
126
+
127
+ ## Bug fixes:
128
+
129
+ - Fix `bundler/inline` overwriting lockfiles [#8055](https://github.com/rubygems/rubygems/pull/8055)
130
+ - Ensure refs directory in cached git source [#8047](https://github.com/rubygems/rubygems/pull/8047)
131
+ - Fix `bundle outdated` with `--group` option [#8052](https://github.com/rubygems/rubygems/pull/8052)
132
+
133
+ # 2.5.19 (September 18, 2024)
134
+
135
+ ## Enhancements:
136
+
137
+ - Raise original errors when unexpected errors happen during Gemfile evaluation [#8003](https://github.com/rubygems/rubygems/pull/8003)
138
+ - Make an exe file executable when generating new gems [#8020](https://github.com/rubygems/rubygems/pull/8020)
139
+ - Gracefully handle gem activation conflicts in inline mode [#5535](https://github.com/rubygems/rubygems/pull/5535)
140
+ - Don't include hook templates in cached git source [#8013](https://github.com/rubygems/rubygems/pull/8013)
141
+ - Fix some errors about a previous installation folder that's unsafe to remove, when there's no need to remove it [#7985](https://github.com/rubygems/rubygems/pull/7985)
142
+ - Emit progress to stderr during `bundle outdated --parseable` [#7966](https://github.com/rubygems/rubygems/pull/7966)
143
+ - Reject unknown platforms when running `bundle lock --add-platform` [#7967](https://github.com/rubygems/rubygems/pull/7967)
144
+ - Emit progress to stderr when `--print` is passed to `bundle lock` [#7957](https://github.com/rubygems/rubygems/pull/7957)
145
+
146
+ ## Bug fixes:
147
+
148
+ - Fix `bundle install --local` hitting the network when default gems are included [#8027](https://github.com/rubygems/rubygems/pull/8027)
149
+ - Remove temporary `.lock` files unintentionally left around by gem installer [#8022](https://github.com/rubygems/rubygems/pull/8022)
150
+ - Fix `bundle exec rake install` failing when local gem has extensions [#7977](https://github.com/rubygems/rubygems/pull/7977)
151
+ - Load gemspecs in the context of its parent also when using local overrides [#7993](https://github.com/rubygems/rubygems/pull/7993)
152
+ - Fix `bundler/inline` failing in Ruby 3.2 due to conflicting `securerandom` versions [#7984](https://github.com/rubygems/rubygems/pull/7984)
153
+ - Don't blow up when explicit version is removed from some git sources [#7973](https://github.com/rubygems/rubygems/pull/7973)
154
+ - Fix `gem exec rails new project` failing on Ruby 3.2 [#7960](https://github.com/rubygems/rubygems/pull/7960)
155
+
156
+ ## Documentation:
157
+
158
+ - Improve `bundle add` man page [#5903](https://github.com/rubygems/rubygems/pull/5903)
159
+ - Add some documentation about backwards compatibility [#7964](https://github.com/rubygems/rubygems/pull/7964)
160
+
161
+ # 2.5.18 (August 26, 2024)
162
+
163
+ ## Enhancements:
164
+
165
+ - Don't remove existing platform gems when PLATFORMS section is badly indented [#7916](https://github.com/rubygems/rubygems/pull/7916)
166
+
167
+ ## Bug fixes:
168
+
169
+ - Fix error message when Bundler refuses to install due to frozen being set without a lockfile [#7955](https://github.com/rubygems/rubygems/pull/7955)
170
+ - Fix several issues with the `--prefer-local` flag [#7951](https://github.com/rubygems/rubygems/pull/7951)
171
+ - Restore support for passing relative paths to `git:` sources [#7950](https://github.com/rubygems/rubygems/pull/7950)
172
+ - Regenerate previous git application caches that didn't include bare repos [#7926](https://github.com/rubygems/rubygems/pull/7926)
173
+ - Fix `bundle update <indirect_dep>` failing to upgrade when versions present in two different sources [#7915](https://github.com/rubygems/rubygems/pull/7915)
174
+
175
+ ## Documentation:
176
+
177
+ - Change new gem README template to have copyable code blocks [#7935](https://github.com/rubygems/rubygems/pull/7935)
178
+
179
+ # 2.5.17 (August 1, 2024)
180
+
181
+ ## Enhancements:
182
+
183
+ - Print better log message when current platform is not present in the lockfile [#7891](https://github.com/rubygems/rubygems/pull/7891)
184
+ - Explicitly encode `Gem::Dependency` to yaml [#7867](https://github.com/rubygems/rubygems/pull/7867)
185
+ - Enable lockfile checksums on future Bundler 3 when there's no previous lockfile [#7805](https://github.com/rubygems/rubygems/pull/7805)
186
+
187
+ ## Bug fixes:
188
+
189
+ - Fix truffleruby removing gems from lockfile [#7795](https://github.com/rubygems/rubygems/pull/7795)
190
+ - Fix `bundle check` exit code when gem git source is not checked out [#7894](https://github.com/rubygems/rubygems/pull/7894)
191
+ - Generate gems.rb from Gemfile.tt template for `bundle-gem` [#7853](https://github.com/rubygems/rubygems/pull/7853)
192
+ - Fix git source cache being used as the install location [#4469](https://github.com/rubygems/rubygems/pull/4469)
193
+ - Fix `bundle exec gem uninstall` [#7886](https://github.com/rubygems/rubygems/pull/7886)
194
+
1
195
  # 2.5.16 (July 18, 2024)
2
196
 
3
197
  ## Bug fixes:
data/bundler.gemspec CHANGED
@@ -29,10 +29,10 @@ Gem::Specification.new do |s|
29
29
  "source_code_uri" => "https://github.com/rubygems/rubygems/tree/master/bundler",
30
30
  }
31
31
 
32
- s.required_ruby_version = ">= 3.0.0"
32
+ s.required_ruby_version = ">= 3.1.0"
33
33
 
34
34
  # It should match the RubyGems version shipped with `required_ruby_version` above
35
- s.required_rubygems_version = ">= 3.2.3"
35
+ s.required_rubygems_version = ">= 3.3.3"
36
36
 
37
37
  s.files = Dir.glob("lib/bundler{.rb,/**/*}", File::FNM_DOTMATCH).reject {|f| File.directory?(f) }
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 = "2024-07-18".freeze
8
- @git_commit_sha = "f49d3d48c9".freeze
7
+ @built_at = "2024-12-23".freeze
8
+ @git_commit_sha = "90ebd47c740".freeze
9
9
  @release = true
10
10
  # end ivars
11
11
 
@@ -12,6 +12,8 @@ module Bundler
12
12
  end
13
13
 
14
14
  def run
15
+ Bundler.ui.level = "warn" if options[:quiet]
16
+
15
17
  validate_options!
16
18
  inject_dependencies
17
19
  perform_bundle_install unless options["skip-install"]
@@ -34,7 +36,7 @@ module Bundler
34
36
  end
35
37
 
36
38
  def validate_options!
37
- raise InvalidOption, "You can not specify `--strict` and `--optimistic` at the same time." if options[:strict] && options[:optimistic]
39
+ raise InvalidOption, "You cannot specify `--strict` and `--optimistic` at the same time." if options[:strict] && options[:optimistic]
38
40
 
39
41
  # raise error when no gems are specified
40
42
  raise InvalidOption, "Please specify gems to add." if gems.empty?
@@ -15,9 +15,9 @@ module Bundler
15
15
  definition.validate_runtime!
16
16
 
17
17
  begin
18
- definition.resolve_only_locally!
18
+ definition.check!
19
19
  not_installed = definition.missing_specs
20
- rescue GemNotFound, SolveFailure
20
+ rescue GemNotFound, GitError, SolveFailure
21
21
  Bundler.ui.error "Bundler can't satisfy your Gemfile's dependencies."
22
22
  Bundler.ui.warn "Install missing gems with `bundle install`."
23
23
  exit 1
@@ -32,7 +32,7 @@ module Bundler
32
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
- Bundler.load.lock(preserve_unknown_sections: true) unless options[:"dry-run"]
35
+ definition.lock(true) unless options[:"dry-run"]
36
36
  Bundler.ui.info "The Gemfile's dependencies are satisfied"
37
37
  end
38
38
  end
@@ -9,10 +9,6 @@ module Bundler
9
9
  end
10
10
 
11
11
  def run
12
- message = "bundle console will be replaced by `bin/console` generated by `bundle gem <name>`"
13
- removed_message = "bundle console has been replaced by `bin/console` generated by `bundle gem <name>`"
14
- Bundler::SharedHelpers.major_deprecation 2, message, removed_message: removed_message
15
-
16
12
  group ? Bundler.require(:default, *group.split(" ").map!(&:to_sym)) : Bundler.require
17
13
  ARGV.clear
18
14
 
@@ -32,11 +32,11 @@ module Bundler
32
32
 
33
33
  def dylibs_ldd(path)
34
34
  output = `/usr/bin/ldd #{path.shellescape}`.chomp
35
- output.split("\n").map do |l|
35
+ output.split("\n").filter_map do |l|
36
36
  match = l.match(LDD_REGEX)
37
37
  next if match.nil?
38
38
  match.captures[0]
39
- end.compact
39
+ end
40
40
  end
41
41
 
42
42
  def dylibs(path)
@@ -89,11 +89,11 @@ module Bundler
89
89
 
90
90
  if broken_links.any?
91
91
  message = "The following gems are missing OS dependencies:"
92
- broken_links.map do |spec, paths|
92
+ broken_links.flat_map do |spec, paths|
93
93
  paths.uniq.map do |path|
94
94
  "\n * #{spec.name}: #{path}"
95
95
  end
96
- end.flatten.sort.each {|m| message += m }
96
+ end.sort.each {|m| message += m }
97
97
  raise ProductionError, message
98
98
  elsif !permissions_valid
99
99
  Bundler.ui.info "No issues found with the installed bundle"
@@ -22,6 +22,7 @@ module Bundler
22
22
  if !Bundler.settings[:disable_exec_load] && ruby_shebang?(bin_path)
23
23
  return kernel_load(bin_path, *args)
24
24
  end
25
+ bin_path = "./" + bin_path unless File.absolute_path?(bin_path)
25
26
  kernel_exec(bin_path, *args)
26
27
  else
27
28
  # exec using the given command
@@ -79,7 +79,7 @@ module Bundler
79
79
  ensure_safe_gem_name(name, constant_array)
80
80
 
81
81
  templates = {
82
- "#{Bundler.preferred_gemfile_name}.tt" => Bundler.preferred_gemfile_name,
82
+ "Gemfile.tt" => Bundler.preferred_gemfile_name,
83
83
  "lib/newgem.rb.tt" => "lib/#{namespaced_path}.rb",
84
84
  "lib/newgem/version.rb.tt" => "lib/#{namespaced_path}/version.rb",
85
85
  "sig/newgem.rbs.tt" => "sig/#{namespaced_path}.rbs",
@@ -191,7 +191,10 @@ module Bundler
191
191
  templates.merge!("standard.yml.tt" => ".standard.yml")
192
192
  end
193
193
 
194
- templates.merge!("exe/newgem.tt" => "exe/#{name}") if config[:exe]
194
+ if config[:exe]
195
+ templates.merge!("exe/newgem.tt" => "exe/#{name}")
196
+ executables.push("exe/#{name}")
197
+ end
195
198
 
196
199
  if extension == "c"
197
200
  templates.merge!(
@@ -443,7 +446,7 @@ module Bundler
443
446
  end
444
447
 
445
448
  def required_ruby_version
446
- "3.0.0"
449
+ "3.1.0"
447
450
  end
448
451
 
449
452
  def rubocop_version
@@ -73,11 +73,11 @@ module Bundler
73
73
  end
74
74
 
75
75
  def gem_dependencies
76
- @gem_dependencies ||= Bundler.definition.specs.map do |spec|
76
+ @gem_dependencies ||= Bundler.definition.specs.filter_map do |spec|
77
77
  dependency = spec.dependencies.find {|dep| dep.name == gem_name }
78
78
  next unless dependency
79
79
  "#{spec.name} (#{spec.version}) depends on #{gem_name} (#{dependency.requirements_list.join(", ")})"
80
- end.compact.sort
80
+ end.sort
81
81
  end
82
82
  end
83
83
  end
@@ -48,7 +48,7 @@ module Bundler
48
48
 
49
49
  def last_version_number
50
50
  definition = Bundler.definition(true)
51
- definition.resolve_remotely!
51
+ definition.remotely!
52
52
  specs = definition.index[name].sort_by(&:version)
53
53
  unless options[:pre]
54
54
  specs.delete_if {|b| b.respond_to?(:version) && b.version.prerelease? }
@@ -12,22 +12,31 @@ module Bundler
12
12
 
13
13
  warn_if_root
14
14
 
15
- Bundler.self_manager.install_locked_bundler_and_restart_with_it_if_needed
15
+ if options[:local]
16
+ Bundler.self_manager.restart_with_locked_bundler_if_needed
17
+ else
18
+ Bundler.self_manager.install_locked_bundler_and_restart_with_it_if_needed
19
+ end
16
20
 
17
21
  Bundler::SharedHelpers.set_env "RB_USER_INSTALL", "1" if Gem.freebsd_platform?
18
22
 
19
23
  # Disable color in deployment mode
20
24
  Bundler.ui.shell = Thor::Shell::Basic.new if options[:deployment]
21
25
 
26
+ if target_rbconfig_path = options[:"target-rbconfig"]
27
+ Bundler.rubygems.set_target_rbconfig(target_rbconfig_path)
28
+ end
29
+
22
30
  check_for_options_conflicts
23
31
 
24
32
  check_trust_policy
25
33
 
26
34
  if options[:deployment] || options[:frozen] || Bundler.frozen_bundle?
27
35
  unless Bundler.default_lockfile.exist?
28
- flag = "--deployment flag" if options[:deployment]
29
- flag ||= "--frozen flag" if options[:frozen]
30
- flag ||= "deployment setting"
36
+ flag = "--deployment flag" if options[:deployment]
37
+ flag ||= "--frozen flag" if options[:frozen]
38
+ flag ||= "deployment setting" if Bundler.settings[:deployment]
39
+ flag ||= "frozen setting" if Bundler.settings[:frozen]
31
40
  raise ProductionError, "The #{flag} requires a lockfile. Please make " \
32
41
  "sure you have checked your #{SharedHelpers.relative_lockfile_path} into version control " \
33
42
  "before deploying."
@@ -14,9 +14,11 @@ module Bundler
14
14
  exit 1
15
15
  end
16
16
 
17
+ check_for_conflicting_options
18
+
17
19
  print = options[:print]
18
- previous_ui_level = Bundler.ui.level
19
- Bundler.ui.level = "silent" if print
20
+ previous_output_stream = Bundler.ui.output_stream
21
+ Bundler.ui.output_stream = :stderr if print
20
22
 
21
23
  Bundler::Fetcher.disable_endpoint = options["full-index"]
22
24
 
@@ -38,6 +40,7 @@ module Bundler
38
40
 
39
41
  Bundler.settings.temporary(frozen: false) do
40
42
  definition = Bundler.definition(update, file)
43
+ definition.add_checksums if options["add-checksums"]
41
44
 
42
45
  Bundler::CLI::Common.configure_gem_version_promoter(definition, options) if options[:update]
43
46
 
@@ -48,8 +51,8 @@ module Bundler
48
51
  options["add-platform"].each do |platform_string|
49
52
  platform = Gem::Platform.new(platform_string)
50
53
  if platform.to_s == "unknown"
51
- Bundler.ui.warn "The platform `#{platform_string}` is unknown to RubyGems " \
52
- "and adding it will likely lead to resolution errors"
54
+ Bundler.ui.error "The platform `#{platform_string}` is unknown to RubyGems and can't be added to the lockfile."
55
+ exit 1
53
56
  end
54
57
  definition.add_platform(platform)
55
58
  end
@@ -58,7 +61,11 @@ module Bundler
58
61
  raise InvalidOption, "Removing all platforms from the bundle is not allowed"
59
62
  end
60
63
 
61
- definition.resolve_remotely! unless options[:local]
64
+ definition.remotely! unless options[:local]
65
+
66
+ if options["normalize-platforms"]
67
+ definition.normalize_platforms
68
+ end
62
69
 
63
70
  if print
64
71
  puts definition.to_lock
@@ -68,7 +75,19 @@ module Bundler
68
75
  end
69
76
  end
70
77
 
71
- Bundler.ui.level = previous_ui_level
78
+ Bundler.ui.output_stream = previous_output_stream
79
+ end
80
+
81
+ private
82
+
83
+ def check_for_conflicting_options
84
+ if options["normalize-platforms"] && options["add-platform"].any?
85
+ raise InvalidOption, "--normalize-platforms can't be used with --add-platform"
86
+ end
87
+
88
+ if options["normalize-platforms"] && options["remove-platform"].any?
89
+ raise InvalidOption, "--normalize-platforms can't be used with --remove-platform"
90
+ end
72
91
  end
73
92
  end
74
93
  end
@@ -54,7 +54,7 @@ module Bundler
54
54
  end
55
55
 
56
56
  if options[:parseable]
57
- Bundler.ui.silence(&definition_resolution)
57
+ Bundler.ui.progress(&definition_resolution)
58
58
  else
59
59
  definition_resolution.call
60
60
  end
@@ -97,28 +97,26 @@ module Bundler
97
97
  }
98
98
  end
99
99
 
100
- if outdated_gems.empty?
100
+ relevant_outdated_gems = if options_include_groups
101
+ outdated_gems.group_by {|g| g[:groups] }.sort.flat_map do |groups, gems|
102
+ contains_group = groups.split(", ").include?(options[:group])
103
+ next unless options[:groups] || contains_group
104
+
105
+ gems
106
+ end.compact
107
+ else
108
+ outdated_gems
109
+ end
110
+
111
+ if relevant_outdated_gems.empty?
101
112
  unless options[:parseable]
102
113
  Bundler.ui.info(nothing_outdated_message)
103
114
  end
104
115
  else
105
- if options_include_groups
106
- relevant_outdated_gems = outdated_gems.group_by {|g| g[:groups] }.sort.flat_map do |groups, gems|
107
- contains_group = groups.split(", ").include?(options[:group])
108
- next unless options[:groups] || contains_group
109
-
110
- gems
111
- end.compact
112
-
113
- if options[:parseable]
114
- print_gems(relevant_outdated_gems)
115
- else
116
- print_gems_table(relevant_outdated_gems)
117
- end
118
- elsif options[:parseable]
119
- print_gems(outdated_gems)
116
+ if options[:parseable]
117
+ print_gems(relevant_outdated_gems)
120
118
  else
121
- print_gems_table(outdated_gems)
119
+ print_gems_table(relevant_outdated_gems)
122
120
  end
123
121
 
124
122
  exit 1
@@ -49,7 +49,7 @@ module Bundler
49
49
  true
50
50
  end.map(&:name)
51
51
 
52
- jobs = installer.send(:installation_parallelization, {})
52
+ jobs = installer.send(:installation_parallelization)
53
53
  pristine_count = definition.specs.count - installed_specs.count
54
54
  # allow a pristining a single gem to skip the parallel worker
55
55
  jobs = [jobs, pristine_count].min
@@ -59,9 +59,9 @@ module Bundler
59
59
  definition = Bundler.definition(true)
60
60
  if options[:outdated]
61
61
  Bundler.ui.info "Fetching remote specs for outdated check...\n\n"
62
- Bundler.ui.silence { definition.resolve_remotely! }
62
+ Bundler.ui.silence { definition.remotely! }
63
63
  else
64
- definition.resolve_with_cache!
64
+ definition.with_cache!
65
65
  end
66
66
  Bundler.reset!
67
67
  definition.specs