bundler 2.2.26 → 2.3.7

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 (149) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +206 -1
  3. data/README.md +1 -1
  4. data/exe/bundle +7 -8
  5. data/lib/bundler/.document +1 -0
  6. data/lib/bundler/build_metadata.rb +2 -2
  7. data/lib/bundler/cli/check.rb +1 -1
  8. data/lib/bundler/cli/config.rb +10 -1
  9. data/lib/bundler/cli/doctor.rb +12 -3
  10. data/lib/bundler/cli/gem.rb +98 -9
  11. data/lib/bundler/cli/info.rb +26 -5
  12. data/lib/bundler/cli/install.rb +8 -28
  13. data/lib/bundler/cli/issue.rb +4 -3
  14. data/lib/bundler/cli/platform.rb +1 -1
  15. data/lib/bundler/cli/remove.rb +1 -2
  16. data/lib/bundler/cli/update.rb +8 -4
  17. data/lib/bundler/cli.rb +13 -11
  18. data/lib/bundler/compact_index_client/cache.rb +0 -9
  19. data/lib/bundler/compact_index_client/updater.rb +0 -5
  20. data/lib/bundler/compact_index_client.rb +2 -8
  21. data/lib/bundler/definition.rb +79 -133
  22. data/lib/bundler/dependency.rb +5 -7
  23. data/lib/bundler/digest.rb +71 -0
  24. data/lib/bundler/dsl.rb +18 -30
  25. data/lib/bundler/endpoint_specification.rb +21 -11
  26. data/lib/bundler/env.rb +1 -1
  27. data/lib/bundler/environment_preserver.rb +4 -1
  28. data/lib/bundler/errors.rb +18 -2
  29. data/lib/bundler/fetcher/compact_index.rb +9 -14
  30. data/lib/bundler/fetcher/index.rb +0 -26
  31. data/lib/bundler/fetcher.rb +13 -20
  32. data/lib/bundler/friendly_errors.rb +5 -30
  33. data/lib/bundler/gem_helper.rb +7 -18
  34. data/lib/bundler/injector.rb +10 -1
  35. data/lib/bundler/installer/gem_installer.rb +1 -6
  36. data/lib/bundler/installer.rb +1 -5
  37. data/lib/bundler/lazy_specification.rb +19 -3
  38. data/lib/bundler/lockfile_generator.rb +1 -1
  39. data/lib/bundler/lockfile_parser.rb +10 -12
  40. data/lib/bundler/man/bundle-add.1 +10 -2
  41. data/lib/bundler/man/bundle-add.1.ronn +7 -1
  42. data/lib/bundler/man/bundle-binstubs.1 +1 -1
  43. data/lib/bundler/man/bundle-cache.1 +1 -1
  44. data/lib/bundler/man/bundle-check.1 +1 -1
  45. data/lib/bundler/man/bundle-clean.1 +1 -1
  46. data/lib/bundler/man/bundle-config.1 +5 -5
  47. data/lib/bundler/man/bundle-config.1.ronn +5 -5
  48. data/lib/bundler/man/bundle-doctor.1 +1 -1
  49. data/lib/bundler/man/bundle-exec.1 +1 -1
  50. data/lib/bundler/man/bundle-gem.1 +14 -1
  51. data/lib/bundler/man/bundle-gem.1.ronn +16 -0
  52. data/lib/bundler/man/bundle-info.1 +1 -1
  53. data/lib/bundler/man/bundle-init.1 +1 -1
  54. data/lib/bundler/man/bundle-inject.1 +1 -1
  55. data/lib/bundler/man/bundle-install.1 +2 -2
  56. data/lib/bundler/man/bundle-install.1.ronn +2 -2
  57. data/lib/bundler/man/bundle-list.1 +1 -1
  58. data/lib/bundler/man/bundle-lock.1 +1 -1
  59. data/lib/bundler/man/bundle-open.1 +1 -1
  60. data/lib/bundler/man/bundle-outdated.1 +1 -1
  61. data/lib/bundler/man/bundle-platform.1 +1 -1
  62. data/lib/bundler/man/bundle-pristine.1 +1 -1
  63. data/lib/bundler/man/bundle-remove.1 +1 -1
  64. data/lib/bundler/man/bundle-show.1 +1 -1
  65. data/lib/bundler/man/bundle-update.1 +2 -2
  66. data/lib/bundler/man/bundle-update.1.ronn +2 -1
  67. data/lib/bundler/man/bundle-viz.1 +1 -1
  68. data/lib/bundler/man/bundle.1 +1 -1
  69. data/lib/bundler/man/gemfile.5 +28 -2
  70. data/lib/bundler/man/gemfile.5.ronn +9 -1
  71. data/lib/bundler/plugin/api/source.rb +1 -0
  72. data/lib/bundler/plugin/installer.rb +3 -1
  73. data/lib/bundler/plugin.rb +23 -6
  74. data/lib/bundler/process_lock.rb +1 -1
  75. data/lib/bundler/remote_specification.rb +7 -0
  76. data/lib/bundler/resolver/spec_group.rb +1 -1
  77. data/lib/bundler/resolver.rb +38 -40
  78. data/lib/bundler/ruby_version.rb +1 -1
  79. data/lib/bundler/rubygems_ext.rb +19 -10
  80. data/lib/bundler/rubygems_gem_installer.rb +21 -5
  81. data/lib/bundler/rubygems_integration.rb +40 -70
  82. data/lib/bundler/runtime.rb +2 -2
  83. data/lib/bundler/self_manager.rb +168 -0
  84. data/lib/bundler/settings.rb +11 -2
  85. data/lib/bundler/shared_helpers.rb +4 -12
  86. data/lib/bundler/source/git/git_proxy.rb +7 -4
  87. data/lib/bundler/source/git.rb +22 -4
  88. data/lib/bundler/source/metadata.rb +1 -1
  89. data/lib/bundler/source/rubygems.rb +60 -85
  90. data/lib/bundler/source/rubygems_aggregate.rb +1 -1
  91. data/lib/bundler/source.rb +3 -1
  92. data/lib/bundler/source_list.rb +11 -29
  93. data/lib/bundler/spec_set.rb +2 -2
  94. data/lib/bundler/templates/Executable.bundler +1 -1
  95. data/lib/bundler/templates/Gemfile +0 -2
  96. data/lib/bundler/templates/gems.rb +0 -3
  97. data/lib/bundler/templates/newgem/Gemfile.tt +5 -2
  98. data/lib/bundler/templates/newgem/Rakefile.tt +15 -2
  99. data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +4 -3
  100. data/lib/bundler/templates/newgem/newgem.gemspec.tt +15 -15
  101. data/lib/bundler/templates/newgem/sig/newgem.rbs.tt +8 -0
  102. data/lib/bundler/templates/newgem/standard.yml.tt +3 -0
  103. data/lib/bundler/templates/newgem/test/minitest/{newgem_test.rb.tt → test_newgem.rb.tt} +1 -1
  104. data/lib/bundler/ui/shell.rb +1 -1
  105. data/lib/bundler/vendor/.document +1 -0
  106. data/lib/bundler/vendor/connection_pool/LICENSE +20 -0
  107. data/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +19 -21
  108. data/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +1 -1
  109. data/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb +57 -0
  110. data/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +39 -74
  111. data/lib/bundler/vendor/fileutils/LICENSE.txt +22 -0
  112. data/lib/bundler/vendor/molinillo/LICENSE +9 -0
  113. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +2 -2
  114. data/lib/bundler/vendor/net-http-persistent/README.rdoc +82 -0
  115. data/lib/bundler/vendor/thor/LICENSE.md +20 -0
  116. data/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +6 -6
  117. data/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +1 -2
  118. data/lib/bundler/vendor/thor/lib/thor/actions.rb +6 -2
  119. data/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +6 -0
  120. data/lib/bundler/vendor/thor/lib/thor/error.rb +9 -4
  121. data/lib/bundler/vendor/thor/lib/thor/parser/options.rb +19 -1
  122. data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +22 -4
  123. data/lib/bundler/vendor/thor/lib/thor/shell.rb +1 -1
  124. data/lib/bundler/vendor/thor/lib/thor/util.rb +1 -1
  125. data/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
  126. data/lib/bundler/vendor/tsort/LICENSE.txt +22 -0
  127. data/lib/bundler/vendor/tsort/lib/tsort.rb +453 -0
  128. data/lib/bundler/vendor/uri/LICENSE.txt +22 -0
  129. data/lib/bundler/vendor/uri/lib/uri/common.rb +17 -80
  130. data/lib/bundler/vendor/uri/lib/uri/ftp.rb +0 -1
  131. data/lib/bundler/vendor/uri/lib/uri/generic.rb +5 -6
  132. data/lib/bundler/vendor/uri/lib/uri/http.rb +0 -1
  133. data/lib/bundler/vendor/uri/lib/uri/https.rb +0 -1
  134. data/lib/bundler/vendor/uri/lib/uri/ldap.rb +1 -1
  135. data/lib/bundler/vendor/uri/lib/uri/mailto.rb +0 -1
  136. data/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +1 -14
  137. data/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +1 -12
  138. data/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
  139. data/lib/bundler/vendor/uri/lib/uri/ws.rb +84 -0
  140. data/lib/bundler/vendor/uri/lib/uri/wss.rb +22 -0
  141. data/lib/bundler/vendor/uri/lib/uri.rb +0 -1
  142. data/lib/bundler/vendored_tsort.rb +4 -0
  143. data/lib/bundler/version.rb +1 -1
  144. data/lib/bundler/worker.rb +2 -2
  145. data/lib/bundler.rb +23 -22
  146. metadata +25 -10
  147. data/lib/bundler/gemdeps.rb +0 -29
  148. data/lib/bundler/psyched_yaml.rb +0 -22
  149. data/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: 0f6b49cdd4d65c0b945ba09e5a1f49de540a778e19e0157ed2a376a6daf9511c
4
- data.tar.gz: 52ade727aa83b8390bb5eeaceda718c1d194d00251ea535013c9da8e58b79094
3
+ metadata.gz: afa073e2d0f107d4d7c2c6906c399d5a04973d85c45416643a40ae23cf2acfe7
4
+ data.tar.gz: 7173281106d774a25a867f141a752e7b9617a36811375276d592f208e1dd7646
5
5
  SHA512:
6
- metadata.gz: 2e9f6084d7c8059af49ed11ccc1b0748babe41d40d6a363b7dad9091762c979091ad5388cc913545eb2853867ebe9ee7088c3ffb331e667eb57d04345799ab87
7
- data.tar.gz: dab0d503f64a592ec7dcc8e91ff509f149cc65e20b83db73857ea3e750f10bec57301042db96639f3d77707db78fea0a1f29338a4a3c5721dad3b8db906fd71b
6
+ metadata.gz: 6c97e621ce961b554ce5a20ee0e78d4ada40fdf169994e9a67dd45bd1df4a29fe936dc79bfb3b4d01a3eb1bf91ae6d33b5028f291ba59cefaf506dccb9e4d53c
7
+ data.tar.gz: 6d58dbb998751182e6b9fb3f1b6cd41626202dfb92c76a7744346068b0e854d6813e8b62cf5288170f04f3744cc5ea5cb55fcf6da80b17c37ad7db3f15d0098a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,208 @@
1
+ # 2.3.7 (February 9, 2022)
2
+
3
+ ## Enhancements:
4
+
5
+ - Don't activate `yaml` gem from Bundler [#5277](https://github.com/rubygems/rubygems/pull/5277)
6
+ - Add Reverse Dependencies section to info command [#3966](https://github.com/rubygems/rubygems/pull/3966)
7
+
8
+ ## Bug fixes:
9
+
10
+ - Don't silently persist `BUNDLE_WITH` and `BUNDLE_WITHOUT` envs locally [#5335](https://github.com/rubygems/rubygems/pull/5335)
11
+ - Fix `bundle config` inside an application saving configuration globally [#4152](https://github.com/rubygems/rubygems/pull/4152)
12
+
13
+ # 2.3.6 (January 26, 2022)
14
+
15
+ ## Enhancements:
16
+
17
+ - Use `Gem::Platform.local` instead of `RUBY_PLATFORM` when displaying local platform [#5306](https://github.com/rubygems/rubygems/pull/5306)
18
+ - Lock standard.yml to the required ruby version [#5284](https://github.com/rubygems/rubygems/pull/5284)
19
+ - Use `Fiddle` in `bundle doctor` to check for dynamic library presence [#5173](https://github.com/rubygems/rubygems/pull/5173)
20
+
21
+ ## Bug fixes:
22
+
23
+ - Fix edge case where gems were incorrectly removed from the lockfile [#5302](https://github.com/rubygems/rubygems/pull/5302)
24
+ - Fix `force_ruby_platform` ignored when lockfile includes current specific platform [#5304](https://github.com/rubygems/rubygems/pull/5304)
25
+ - Create minitest file to underscored path in "bundle gem" command with dashed gem name [#5273](https://github.com/rubygems/rubygems/pull/5273)
26
+ - Fix regression with old marshaled specs having null `required_rubygems_version` [#5291](https://github.com/rubygems/rubygems/pull/5291)
27
+
28
+ # 2.3.5 (January 12, 2022)
29
+
30
+ ## Enhancements:
31
+
32
+ - Make `bundle update --bundler` actually lock to the latest bundler version (even if not yet installed) [#5182](https://github.com/rubygems/rubygems/pull/5182)
33
+ - Use thor-1.2.1 [#5260](https://github.com/rubygems/rubygems/pull/5260)
34
+ - Exclude bin directory for newgem template [#5259](https://github.com/rubygems/rubygems/pull/5259)
35
+
36
+ ## Bug fixes:
37
+
38
+ - Fix metadata requirements being bypassed when custom gem servers are used [#5256](https://github.com/rubygems/rubygems/pull/5256)
39
+ - Fix `rake build:checksum` writing checksum of package path, not package contents [#5250](https://github.com/rubygems/rubygems/pull/5250)
40
+
41
+ # 2.3.4 (December 29, 2021)
42
+
43
+ ## Enhancements:
44
+
45
+ - Improve error message when `BUNDLED WITH` version does not exist [#5205](https://github.com/rubygems/rubygems/pull/5205)
46
+
47
+ ## Bug fixes:
48
+
49
+ - Fix `bundle update --bundler` no longer updating lockfile [#5224](https://github.com/rubygems/rubygems/pull/5224)
50
+
51
+ # 2.3.3 (December 24, 2021)
52
+
53
+ ## Bug fixes:
54
+
55
+ - Fix locked bundler not installed to the right path when `deployment` is set [#5217](https://github.com/rubygems/rubygems/pull/5217)
56
+
57
+ # 2.3.2 (December 23, 2021)
58
+
59
+ ## Enhancements:
60
+
61
+ - Remove unnecessary lockfile upgrade warning [#5209](https://github.com/rubygems/rubygems/pull/5209)
62
+
63
+ # 2.3.1 (December 22, 2021)
64
+
65
+ ## Enhancements:
66
+
67
+ - Vendor latest `thor` with fixes for latest `did_you_mean` deprecations [#5202](https://github.com/rubygems/rubygems/pull/5202)
68
+ - Avoid unnecessary `shellwords` require on newer rubygems [#5195](https://github.com/rubygems/rubygems/pull/5195)
69
+ - Re-exec prepending command with `Gem.ruby` if `$PROGRAM_NAME` is not executable [#5193](https://github.com/rubygems/rubygems/pull/5193)
70
+
71
+ # 2.3.0 (December 21, 2021)
72
+
73
+ ## Features:
74
+
75
+ - Change `bundle install` with a lockfile to respect the `BUNDLED WITH` bundler version [#4076](https://github.com/rubygems/rubygems/pull/4076)
76
+
77
+ ## Enhancements:
78
+
79
+ - Print warning when running Bundler on potentially problematic RubyGems & Ruby combinations [#5177](https://github.com/rubygems/rubygems/pull/5177)
80
+ - Error tracing should be printed to stderr [#5179](https://github.com/rubygems/rubygems/pull/5179)
81
+ - Add `github` and `ref` options to `bundle add` [#5159](https://github.com/rubygems/rubygems/pull/5159)
82
+ - Add require parameter to `bundle add` [#5021](https://github.com/rubygems/rubygems/pull/5021)
83
+ - Enable parallel installation on Windows by default [#4822](https://github.com/rubygems/rubygems/pull/4822)
84
+ - More logging when compact index is not used and we fallback to other APIs [#4546](https://github.com/rubygems/rubygems/pull/4546)
85
+ - `bundle gem` generated MiniTest file and class now start with 'test' [#3893](https://github.com/rubygems/rubygems/pull/3893)
86
+ - Add `Bundler::Definition.no_lock` accessor for skipping lock file creation/update [#3401](https://github.com/rubygems/rubygems/pull/3401)
87
+
88
+ ## Bug fixes:
89
+
90
+ - Fix crash when when no platform specific matches exist and show a proper error [#5168](https://github.com/rubygems/rubygems/pull/5168)
91
+ - Ignore dependencies not actually locked from frozen check [#5152](https://github.com/rubygems/rubygems/pull/5152)
92
+ - Fix `bundle cache --all-platforms` on Windows [#4552](https://github.com/rubygems/rubygems/pull/4552)
93
+
94
+ ## Documentation:
95
+
96
+ - Fix gemspec template typo [#4545](https://github.com/rubygems/rubygems/pull/4545)
97
+
98
+ # 2.2.33 (December 7, 2021)
99
+
100
+ ## Security fixes:
101
+
102
+ - Pass "--" to git commands to separate positional and optional args [#5142](https://github.com/rubygems/rubygems/pull/5142)
103
+
104
+ ## Enhancements:
105
+
106
+ - Accept pull request URLs as github source [#5126](https://github.com/rubygems/rubygems/pull/5126)
107
+ - Add `--version` parameter to `bundle info` command [#5137](https://github.com/rubygems/rubygems/pull/5137)
108
+ - Let original `Errno::EACCES` error be raised in compact index updater [#5110](https://github.com/rubygems/rubygems/pull/5110)
109
+ - Improve gemfile-lockfile source equivalence errors [#5120](https://github.com/rubygems/rubygems/pull/5120)
110
+ - Avoid float-to-string loss of characters in GitHub Actions configuration labels in new gem template [#5089](https://github.com/rubygems/rubygems/pull/5089)
111
+ - Add an initial rbs template to `bundle gem` skeleton [#5041](https://github.com/rubygems/rubygems/pull/5041)
112
+ - Avoid shared libraries not getting environment passed right after argv in memory when `bundle exec` is used [#4815](https://github.com/rubygems/rubygems/pull/4815)
113
+
114
+ ## Bug fixes:
115
+
116
+ - Don't cleanup paths from gems already activated from `$LOAD_PATH` [#5111](https://github.com/rubygems/rubygems/pull/5111)
117
+ - Fix handling prereleases of 0 versions, like 0.0.0.dev or 0.0.0.SNAPSHOT [#5116](https://github.com/rubygems/rubygems/pull/5116)
118
+ - Fix escape of filenames in `bundle doctor` [#5102](https://github.com/rubygems/rubygems/pull/5102)
119
+ - Don't unlock dependencies when running `bundle install` after changing global source [#5090](https://github.com/rubygems/rubygems/pull/5090)
120
+ - Fix missing locked specs when depended on another platform [#5092](https://github.com/rubygems/rubygems/pull/5092)
121
+ - Fix `bundle info` sometimes claiming that bundler has been deleted [#5097](https://github.com/rubygems/rubygems/pull/5097)
122
+
123
+ ## Documentation:
124
+
125
+ - Ignore to generate the documentation from vendored libraries [#5118](https://github.com/rubygems/rubygems/pull/5118)
126
+
127
+ # 2.2.32 (November 23, 2021)
128
+
129
+ ## Enhancements:
130
+
131
+ - Clarify `bundle viz` deprecation [#5083](https://github.com/rubygems/rubygems/pull/5083)
132
+ - Unlock dependencies that no longer match lockfile [#5068](https://github.com/rubygems/rubygems/pull/5068)
133
+ - Use `shellsplit` instead of array of strings for git push [#5062](https://github.com/rubygems/rubygems/pull/5062)
134
+ - Re-enable `default_ignores` option for standard [#5003](https://github.com/rubygems/rubygems/pull/5003)
135
+
136
+ ## Bug fixes:
137
+
138
+ - Fix downgrading dependencies by changing the `Gemfile` and running `bundle update` [#5078](https://github.com/rubygems/rubygems/pull/5078)
139
+
140
+ # 2.2.31 (November 8, 2021)
141
+
142
+ ## Enhancements:
143
+
144
+ - Link to working `bundler-graph` plugin in `bundle viz` deprecation message [#5061](https://github.com/rubygems/rubygems/pull/5061)
145
+ - Memoize materialized specs when requiring `bundler/setup` [#5033](https://github.com/rubygems/rubygems/pull/5033)
146
+ - Allow custom LicenseRef [#5013](https://github.com/rubygems/rubygems/pull/5013)
147
+ - Better error when installing a lockfile with git sources and git is not installed [#5036](https://github.com/rubygems/rubygems/pull/5036)
148
+ - Only delete cached gem when it's corrupted [#5031](https://github.com/rubygems/rubygems/pull/5031)
149
+ - Support gemified `tsort` [#5032](https://github.com/rubygems/rubygems/pull/5032)
150
+ - Add standard option alongside rubocop to `bundle gem` [#4411](https://github.com/rubygems/rubygems/pull/4411)
151
+
152
+ ## Bug fixes:
153
+
154
+ - Fix system man pages no longer working after bundler overrides `MANPATH` [#5039](https://github.com/rubygems/rubygems/pull/5039)
155
+ - Don't warn when a lockfile is locked to a dev version [#5018](https://github.com/rubygems/rubygems/pull/5018)
156
+
157
+ # 2.2.30 (October 26, 2021)
158
+
159
+ ## Enhancements:
160
+
161
+ - 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)
162
+ - Ensure vendored gems have licenses [#4998](https://github.com/rubygems/rubygems/pull/4998)
163
+ - Update broken link in Bundler::Fetcher::CertificateFailureError [#4987](https://github.com/rubygems/rubygems/pull/4987)
164
+ - Give better errors for some permission issues [#4965](https://github.com/rubygems/rubygems/pull/4965)
165
+ - Print better errors when `bundler/gem_tasks` fail [#4872](https://github.com/rubygems/rubygems/pull/4872)
166
+ - Fix `bundle install` to reinstall deleted gems [#4974](https://github.com/rubygems/rubygems/pull/4974)
167
+ - Unify issue template and ISSUES.md document [#4980](https://github.com/rubygems/rubygems/pull/4980)
168
+ - Bump vendored connection_pool to 2.2.5 [#4738](https://github.com/rubygems/rubygems/pull/4738)
169
+
170
+ ## Bug fixes:
171
+
172
+ - Fix error message pointing to non existing file when using a global gem cache [#4999](https://github.com/rubygems/rubygems/pull/4999)
173
+ - Fix install crash when lockfile has missing dependencies for the current platform [#4941](https://github.com/rubygems/rubygems/pull/4941)
174
+ - Make `bundle info` show a proper warning every time it finds a deleted gem [#4971](https://github.com/rubygems/rubygems/pull/4971)
175
+
176
+ # 2.2.29 (October 8, 2021)
177
+
178
+ ## Enhancements:
179
+
180
+ - Require at least Ruby 2.6.0 for gems created with recent rubies [#4920](https://github.com/rubygems/rubygems/pull/4920)
181
+ - Include glob information in string representation of git sources to make generated lockfiles deterministic [#4947](https://github.com/rubygems/rubygems/pull/4947)
182
+ - Add missing `rubygem_push` prerequisite [#4930](https://github.com/rubygems/rubygems/pull/4930)
183
+
184
+ # 2.2.28 (September 23, 2021)
185
+
186
+ ## Enhancements:
187
+
188
+ - 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)
189
+ - Deprecate `--install` flag to `bundle remove` and trigger install by default [#4891](https://github.com/rubygems/rubygems/pull/4891)
190
+
191
+ # 2.2.27 (September 3, 2021)
192
+
193
+ ## Enhancements:
194
+
195
+ - Optimize some requires [#4887](https://github.com/rubygems/rubygems/pull/4887)
196
+ - Correctly redact credentials when using x-oauth-basic [#4866](https://github.com/rubygems/rubygems/pull/4866)
197
+
198
+ ## Bug fixes:
199
+
200
+ - Add missing key `branches:` to template for GitHub Actions [#4883](https://github.com/rubygems/rubygems/pull/4883)
201
+ - Fix `bundle plugin install` detection of already installed plugins [#4869](https://github.com/rubygems/rubygems/pull/4869)
202
+ - Make plugin installation idempotent [#4864](https://github.com/rubygems/rubygems/pull/4864)
203
+ - Fix `bundle check` showing duplicated gems when multiple platforms are locked [#4854](https://github.com/rubygems/rubygems/pull/4854)
204
+ - Fix `bundle check` incorrectly considering cached gems [#4853](https://github.com/rubygems/rubygems/pull/4853)
205
+
1
206
  # 2.2.26 (August 17, 2021)
2
207
 
3
208
  ## Enhancements:
@@ -77,7 +282,7 @@
77
282
  - Fix `bundle doctor` crashing when finding a broken symlink [#4707](https://github.com/rubygems/rubygems/pull/4707)
78
283
  - Fix incorrect re-resolve edge case [#4700](https://github.com/rubygems/rubygems/pull/4700)
79
284
  - Fix some gems being unintentionally locked under multiple lockfile sections [#4701](https://github.com/rubygems/rubygems/pull/4701)
80
- - Fix `--conservative` flag unexpectedly updating indirect dependencies [#4692](https://github.com/rubygems/rubygems/pull/4692)
285
+ - 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)
81
286
 
82
287
  # 2.2.21 (June 23, 2021)
83
288
 
data/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
 
data/exe/bundle CHANGED
@@ -18,14 +18,13 @@ end
18
18
  # Workaround for non-activated bundler spec due to missing https://github.com/rubygems/rubygems/commit/4e306d7bcdee924b8d80ca9db6125aa59ee4e5a3
19
19
  gem "bundler", Bundler::VERSION if Gem.rubygems_version < Gem::Version.new("2.6.2")
20
20
 
21
- # Check if an older version of bundler is installed
22
- $LOAD_PATH.each do |path|
23
- next unless path =~ %r{/bundler-0\.(\d+)} && $1.to_i < 9
24
- err = String.new
25
- err << "Looks like you have a version of bundler that's older than 0.9.\n"
26
- err << "Please remove your old versions.\n"
27
- err << "An easy way to do this is by running `gem cleanup bundler`."
28
- abort(err)
21
+ if Gem.rubygems_version < Gem::Version.new("3.2.3") && Gem.ruby_version < Gem::Version.new("2.6.a") && !ENV["BUNDLER_NO_OLD_RUBYGEMS_WARNING"]
22
+ Bundler.ui.warn \
23
+ "Your RubyGems version (#{Gem::VERSION})) has a bug that prevents " \
24
+ "`required_ruby_version` from working for Bundler. Any scripts that use " \
25
+ "`gem install bundler` will break as soon as Bundler drops support for " \
26
+ "your Ruby version. Please upgrade RubyGems to avoid future breakage " \
27
+ "and silence this warning by running `gem update --system 3.2.3`"
29
28
  end
30
29
 
31
30
  if File.exist?(base_path)
@@ -0,0 +1 @@
1
+ # not in RDoc
@@ -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-08-17".freeze
8
- @git_commit_sha = "21fd333002".freeze
7
+ @built_at = "2022-02-09".freeze
8
+ @git_commit_sha = "bafe43c593".freeze
9
9
  @release = true
10
10
  # end ivars
11
11
 
@@ -15,7 +15,7 @@ module Bundler
15
15
  definition.validate_runtime!
16
16
 
17
17
  begin
18
- definition.resolve_with_cache!
18
+ definition.resolve_only_locally!
19
19
  not_installed = definition.missing_specs
20
20
  rescue GemNotFound, VersionConflict
21
21
  Bundler.ui.error "Bundler can't satisfy your Gemfile's dependencies."
@@ -180,7 +180,7 @@ module Bundler
180
180
  scopes = %w[global local].select {|s| options[s] }
181
181
  case scopes.size
182
182
  when 0
183
- @scope = "global"
183
+ @scope = inside_app? ? "local" : "global"
184
184
  @explicit_scope = false
185
185
  when 1
186
186
  @scope = scopes.first
@@ -189,6 +189,15 @@ module Bundler
189
189
  "The options #{scopes.join " and "} were specified. Please only use one of the switches at a time."
190
190
  end
191
191
  end
192
+
193
+ private
194
+
195
+ def inside_app?
196
+ Bundler.root
197
+ true
198
+ rescue GemfileNotFound
199
+ false
200
+ end
192
201
  end
193
202
  end
194
203
  end
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "rbconfig"
4
+ require "shellwords"
5
+ require "fiddle"
4
6
 
5
7
  module Bundler
6
8
  class CLI::Doctor
@@ -22,14 +24,14 @@ module Bundler
22
24
  end
23
25
 
24
26
  def dylibs_darwin(path)
25
- output = `/usr/bin/otool -L "#{path}"`.chomp
27
+ output = `/usr/bin/otool -L #{path.shellescape}`.chomp
26
28
  dylibs = output.split("\n")[1..-1].map {|l| l.match(DARWIN_REGEX).captures[0] }.uniq
27
29
  # ignore @rpath and friends
28
30
  dylibs.reject {|dylib| dylib.start_with? "@" }
29
31
  end
30
32
 
31
33
  def dylibs_ldd(path)
32
- output = `/usr/bin/ldd "#{path}"`.chomp
34
+ output = `/usr/bin/ldd #{path.shellescape}`.chomp
33
35
  output.split("\n").map do |l|
34
36
  match = l.match(LDD_REGEX)
35
37
  next if match.nil?
@@ -70,7 +72,14 @@ module Bundler
70
72
 
71
73
  definition.specs.each do |spec|
72
74
  bundles_for_gem(spec).each do |bundle|
73
- bad_paths = dylibs(bundle).select {|f| !File.exist?(f) }
75
+ bad_paths = dylibs(bundle).select do |f|
76
+ begin
77
+ Fiddle.dlopen(f)
78
+ false
79
+ rescue Fiddle::DLError
80
+ true
81
+ end
82
+ end
74
83
  if bad_paths.any?
75
84
  broken_links[spec] ||= []
76
85
  broken_links[spec].concat(bad_paths)
@@ -38,6 +38,7 @@ module Bundler
38
38
  namespaced_path = name.tr("-", "/")
39
39
  constant_name = name.gsub(/-[_-]*(?![_-]|$)/) { "::" }.gsub(/([_-]+|(::)|^)(.|$)/) { $2.to_s + $3.upcase }
40
40
  constant_array = constant_name.split("::")
41
+ minitest_constant_name = constant_array.clone.tap {|a| a[-1] = "Test#{a[-1]}" }.join("::") # Foo::Bar => Foo::TestBar
41
42
 
42
43
  use_git = Bundler.git_present? && options[:git]
43
44
 
@@ -68,7 +69,8 @@ module Bundler
68
69
  :bundler_version => bundler_dependency_version,
69
70
  :git => use_git,
70
71
  :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",
72
+ :required_ruby_version => required_ruby_version,
73
+ :minitest_constant_name => minitest_constant_name,
72
74
  }
73
75
  ensure_safe_gem_name(name, constant_array)
74
76
 
@@ -76,6 +78,7 @@ module Bundler
76
78
  "#{Bundler.preferred_gemfile_name}.tt" => Bundler.preferred_gemfile_name,
77
79
  "lib/newgem.rb.tt" => "lib/#{namespaced_path}.rb",
78
80
  "lib/newgem/version.rb.tt" => "lib/#{namespaced_path}/version.rb",
81
+ "sig/newgem.rbs.tt" => "sig/#{namespaced_path}.rbs",
79
82
  "newgem.gemspec.tt" => "#{name}.gemspec",
80
83
  "Rakefile.tt" => "Rakefile",
81
84
  "README.md.tt" => "README.md",
@@ -103,9 +106,17 @@ module Bundler
103
106
  )
104
107
  config[:test_task] = :spec
105
108
  when "minitest"
109
+ # Generate path for minitest target file (FileList["test/**/test_*.rb"])
110
+ # foo => test/test_foo.rb
111
+ # foo-bar => test/foo/test_bar.rb
112
+ # foo_bar => test/test_foo_bar.rb
113
+ paths = namespaced_path.rpartition("/")
114
+ paths[2] = "test_#{paths[2]}"
115
+ minitest_namespaced_path = paths.join("")
116
+
106
117
  templates.merge!(
107
118
  "test/minitest/test_helper.rb.tt" => "test/test_helper.rb",
108
- "test/minitest/newgem_test.rb.tt" => "test/#{namespaced_path}_test.rb"
119
+ "test/minitest/test_newgem.rb.tt" => "test/#{minitest_namespaced_path}.rb"
109
120
  )
110
121
  config[:test_task] = :test
111
122
  when "test-unit"
@@ -163,15 +174,16 @@ module Bundler
163
174
  templates.merge!("CHANGELOG.md.tt" => "CHANGELOG.md")
164
175
  end
165
176
 
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"
177
+ config[:linter] = ask_and_set_linter
178
+ case config[:linter]
179
+ when "rubocop"
180
+ config[:linter_version] = rubocop_version
173
181
  Bundler.ui.info "RuboCop enabled in config"
174
182
  templates.merge!("rubocop.yml.tt" => ".rubocop.yml")
183
+ when "standard"
184
+ config[:linter_version] = standard_version
185
+ Bundler.ui.info "Standard enabled in config"
186
+ templates.merge!("standard.yml.tt" => ".standard.yml")
175
187
  end
176
188
 
177
189
  templates.merge!("exe/newgem.tt" => "exe/#{name}") if config[:exe]
@@ -317,6 +329,58 @@ module Bundler
317
329
  ci_template
318
330
  end
319
331
 
332
+ def ask_and_set_linter
333
+ linter_template = options[:linter] || Bundler.settings["gem.linter"]
334
+ linter_template = deprecated_rubocop_option if linter_template.nil?
335
+
336
+ if linter_template.to_s.empty?
337
+ Bundler.ui.confirm "Do you want to add a code linter and formatter to your gem? " \
338
+ "Supported Linters:\n" \
339
+ "* RuboCop: https://rubocop.org\n" \
340
+ "* Standard: https://github.com/testdouble/standard\n" \
341
+ "\n"
342
+ Bundler.ui.info hint_text("linter")
343
+
344
+ result = Bundler.ui.ask "Enter a linter. rubocop/standard/(none):"
345
+ if result =~ /rubocop|standard/
346
+ linter_template = result
347
+ else
348
+ linter_template = false
349
+ end
350
+ end
351
+
352
+ if Bundler.settings["gem.linter"].nil?
353
+ Bundler.settings.set_global("gem.linter", linter_template)
354
+ end
355
+
356
+ # Once gem.linter safely set, unset the deprecated gem.rubocop
357
+ unless Bundler.settings["gem.rubocop"].nil?
358
+ Bundler.settings.set_global("gem.rubocop", nil)
359
+ end
360
+
361
+ if options[:linter] == Bundler.settings["gem.linter"]
362
+ Bundler.ui.info "#{options[:linter]} is already configured, ignoring --linter flag."
363
+ end
364
+
365
+ linter_template
366
+ end
367
+
368
+ def deprecated_rubocop_option
369
+ if !options[:rubocop].nil?
370
+ if options[:rubocop]
371
+ Bundler::SharedHelpers.major_deprecation 2, "--rubocop is deprecated, use --linter=rubocop"
372
+ "rubocop"
373
+ else
374
+ Bundler::SharedHelpers.major_deprecation 2, "--no-rubocop is deprecated, use --linter"
375
+ false
376
+ end
377
+ elsif !Bundler.settings["gem.rubocop"].nil?
378
+ Bundler::SharedHelpers.major_deprecation 2,
379
+ "config gem.rubocop is deprecated; we've updated your config to use gem.linter instead"
380
+ Bundler.settings["gem.rubocop"] ? "rubocop" : false
381
+ end
382
+ end
383
+
320
384
  def bundler_dependency_version
321
385
  v = Gem::Version.new(Bundler::VERSION)
322
386
  req = v.segments[0..1]
@@ -350,5 +414,30 @@ module Bundler
350
414
  def open_editor(editor, file)
351
415
  thor.run(%(#{editor} "#{file}"))
352
416
  end
417
+
418
+ def required_ruby_version
419
+ if Gem.ruby_version < Gem::Version.new("2.4.a") then "2.3.0"
420
+ elsif Gem.ruby_version < Gem::Version.new("2.5.a") then "2.4.0"
421
+ elsif Gem.ruby_version < Gem::Version.new("2.6.a") then "2.5.0"
422
+ else
423
+ "2.6.0"
424
+ end
425
+ end
426
+
427
+ def rubocop_version
428
+ if Gem.ruby_version < Gem::Version.new("2.4.a") then "0.81.0"
429
+ elsif Gem.ruby_version < Gem::Version.new("2.5.a") then "1.12"
430
+ else
431
+ "1.21"
432
+ end
433
+ end
434
+
435
+ def standard_version
436
+ if Gem.ruby_version < Gem::Version.new("2.4.a") then "0.2.5"
437
+ elsif Gem.ruby_version < Gem::Version.new("2.5.a") then "1.0"
438
+ else
439
+ "1.3"
440
+ end
441
+ end
353
442
  end
354
443
  end
@@ -18,6 +18,7 @@ module Bundler
18
18
 
19
19
  if spec
20
20
  return print_gem_path(spec) if @options[:path]
21
+ return print_gem_version(spec) if @options[:version]
21
22
  print_gem_info(spec)
22
23
  end
23
24
  end
@@ -39,13 +40,18 @@ module Bundler
39
40
  raise GemNotFound, Bundler::CLI::Common.gem_not_found_message(gem_name, Bundler.definition.dependencies)
40
41
  end
41
42
 
43
+ def print_gem_version(spec)
44
+ Bundler.ui.info spec.version.to_s
45
+ end
46
+
42
47
  def print_gem_path(spec)
43
- if spec.name == "bundler"
48
+ name = spec.name
49
+ if name == "bundler"
44
50
  path = File.expand_path("../../../..", __FILE__)
45
51
  else
46
52
  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}"
53
+ if spec.deleted_gem?
54
+ return Bundler.ui.warn "The gem #{name} has been deleted. It was installed at: #{path}"
49
55
  end
50
56
  end
51
57
 
@@ -54,8 +60,9 @@ module Bundler
54
60
 
55
61
  def print_gem_info(spec)
56
62
  metadata = spec.metadata
63
+ name = spec.name
57
64
  gem_info = String.new
58
- gem_info << " * #{spec.name} (#{spec.version}#{spec.git_version})\n"
65
+ gem_info << " * #{name} (#{spec.version}#{spec.git_version})\n"
59
66
  gem_info << "\tSummary: #{spec.summary}\n" if spec.summary
60
67
  gem_info << "\tHomepage: #{spec.homepage}\n" if spec.homepage
61
68
  gem_info << "\tDocumentation: #{metadata["documentation_uri"]}\n" if metadata.key?("documentation_uri")
@@ -66,8 +73,22 @@ module Bundler
66
73
  gem_info << "\tBug Tracker: #{metadata["bug_tracker_uri"]}\n" if metadata.key?("bug_tracker_uri")
67
74
  gem_info << "\tMailing List: #{metadata["mailing_list_uri"]}\n" if metadata.key?("mailing_list_uri")
68
75
  gem_info << "\tPath: #{spec.full_gem_path}\n"
69
- gem_info << "\tDefault Gem: yes" if spec.respond_to?(:default_gem?) && spec.default_gem?
76
+ gem_info << "\tDefault Gem: yes\n" if spec.respond_to?(:default_gem?) && spec.default_gem?
77
+ gem_info << "\tReverse Dependencies: \n\t\t#{gem_dependencies.join("\n\t\t")}" if gem_dependencies.any?
78
+
79
+ if name != "bundler" && spec.deleted_gem?
80
+ return Bundler.ui.warn "The gem #{name} has been deleted. Gemspec information is still available though:\n#{gem_info}"
81
+ end
82
+
70
83
  Bundler.ui.info gem_info
71
84
  end
85
+
86
+ def gem_dependencies
87
+ @gem_dependencies ||= Bundler.definition.specs.map do |spec|
88
+ dependency = spec.dependencies.find {|dep| dep.name == gem_name }
89
+ next unless dependency
90
+ "#{spec.name} (#{spec.version}) depends on #{gem_name} (#{dependency.requirements_list.join(", ")})"
91
+ end.compact.sort
92
+ end
72
93
  end
73
94
  end
@@ -12,6 +12,8 @@ module Bundler
12
12
 
13
13
  warn_if_root
14
14
 
15
+ Bundler.self_manager.install_locked_bundler_and_restart_with_it_if_needed
16
+
15
17
  Bundler::SharedHelpers.set_env "RB_USER_INSTALL", "1" if Bundler::FREEBSD
16
18
 
17
19
  # Disable color in deployment mode
@@ -133,39 +135,17 @@ module Bundler
133
135
  end
134
136
 
135
137
  def normalize_groups
136
- options[:with] &&= options[:with].join(":").tr(" ", ":").split(":")
137
- options[:without] &&= options[:without].join(":").tr(" ", ":").split(":")
138
-
139
138
  check_for_group_conflicts_in_cli_options
140
139
 
141
- Bundler.settings.set_command_option :with, nil if options[:with] == []
142
- Bundler.settings.set_command_option :without, nil if options[:without] == []
143
-
144
- with = options.fetch(:with, [])
145
- with |= Bundler.settings[:with].map(&:to_s)
146
- with -= options[:without] if options[:without]
147
-
148
- without = options.fetch(:without, [])
149
- without |= Bundler.settings[:without].map(&:to_s)
150
- without -= options[:with] if options[:with]
151
-
152
- options[:with] = with
153
- options[:without] = without
154
-
155
- unless Bundler.settings[:without] == options[:without] && Bundler.settings[:with] == options[:with]
156
- # need to nil them out first to get around validation for backwards compatibility
157
- Bundler.settings.set_command_option :without, nil
158
- Bundler.settings.set_command_option :with, nil
159
- Bundler.settings.set_command_option :without, options[:without] - options[:with]
160
- Bundler.settings.set_command_option :with, options[:with]
161
- end
140
+ # need to nil them out first to get around validation for backwards compatibility
141
+ Bundler.settings.set_command_option :without, nil
142
+ Bundler.settings.set_command_option :with, nil
143
+ Bundler.settings.set_command_option :without, options[:without]
144
+ Bundler.settings.set_command_option :with, options[:with]
162
145
  end
163
146
 
164
147
  def normalize_settings
165
148
  Bundler.settings.set_command_option :path, nil if options[:system]
166
- Bundler.settings.temporary(:path_relative_to_cwd => false) do
167
- Bundler.settings.set_command_option :path, "vendor/bundle" if Bundler.settings[:deployment] && Bundler.settings[:path].nil?
168
- end
169
149
  Bundler.settings.set_command_option_if_given :path, options[:path]
170
150
  Bundler.settings.temporary(:path_relative_to_cwd => false) do
171
151
  Bundler.settings.set_command_option :path, "bundle" if options["standalone"] && Bundler.settings[:path].nil?
@@ -185,7 +165,7 @@ module Bundler
185
165
 
186
166
  Bundler.settings.set_command_option_if_given :clean, options["clean"]
187
167
 
188
- normalize_groups
168
+ normalize_groups if options[:without] || options[:with]
189
169
 
190
170
  options[:force] = options[:redownload]
191
171
  end