rubygems-update 3.5.22 → 3.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (242) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +91 -0
  3. data/Manifest.txt +23 -16
  4. data/README.md +14 -9
  5. data/bundler/CHANGELOG.md +83 -0
  6. data/bundler/bundler.gemspec +2 -2
  7. data/bundler/lib/bundler/build_metadata.rb +2 -2
  8. data/bundler/lib/bundler/cli/add.rb +2 -0
  9. data/bundler/lib/bundler/cli/check.rb +2 -2
  10. data/bundler/lib/bundler/cli/console.rb +0 -4
  11. data/bundler/lib/bundler/cli/doctor.rb +4 -4
  12. data/bundler/lib/bundler/cli/exec.rb +1 -0
  13. data/bundler/lib/bundler/cli/gem.rb +1 -1
  14. data/bundler/lib/bundler/cli/info.rb +2 -2
  15. data/bundler/lib/bundler/cli/inject.rb +1 -1
  16. data/bundler/lib/bundler/cli/install.rb +4 -0
  17. data/bundler/lib/bundler/cli/lock.rb +20 -1
  18. data/bundler/lib/bundler/cli/pristine.rb +1 -1
  19. data/bundler/lib/bundler/cli/show.rb +2 -2
  20. data/bundler/lib/bundler/cli.rb +23 -53
  21. data/bundler/lib/bundler/compact_index_client/cache_file.rb +0 -5
  22. data/bundler/lib/bundler/compact_index_client/updater.rb +0 -11
  23. data/bundler/lib/bundler/definition.rb +143 -76
  24. data/bundler/lib/bundler/dependency.rb +1 -1
  25. data/bundler/lib/bundler/dsl.rb +33 -28
  26. data/bundler/lib/bundler/endpoint_specification.rb +10 -1
  27. data/bundler/lib/bundler/errors.rb +10 -0
  28. data/bundler/lib/bundler/feature_flag.rb +1 -0
  29. data/bundler/lib/bundler/fetcher/compact_index.rb +1 -1
  30. data/bundler/lib/bundler/fetcher.rb +10 -3
  31. data/bundler/lib/bundler/gem_helpers.rb +21 -5
  32. data/bundler/lib/bundler/injector.rb +2 -2
  33. data/bundler/lib/bundler/inline.rb +12 -8
  34. data/bundler/lib/bundler/installer/standalone.rb +2 -2
  35. data/bundler/lib/bundler/installer.rb +4 -38
  36. data/bundler/lib/bundler/lazy_specification.rb +74 -26
  37. data/bundler/lib/bundler/lockfile_generator.rb +1 -1
  38. data/bundler/lib/bundler/lockfile_parser.rb +9 -1
  39. data/bundler/lib/bundler/man/bundle-add.1 +17 -11
  40. data/bundler/lib/bundler/man/bundle-add.1.ronn +16 -10
  41. data/bundler/lib/bundler/man/bundle-binstubs.1 +7 -4
  42. data/bundler/lib/bundler/man/bundle-binstubs.1.ronn +6 -3
  43. data/bundler/lib/bundler/man/bundle-cache.1 +30 -2
  44. data/bundler/lib/bundler/man/bundle-cache.1.ronn +31 -2
  45. data/bundler/lib/bundler/man/bundle-check.1 +3 -3
  46. data/bundler/lib/bundler/man/bundle-check.1.ronn +4 -2
  47. data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
  48. data/bundler/lib/bundler/man/bundle-config.1 +3 -5
  49. data/bundler/lib/bundler/man/bundle-config.1.ronn +2 -7
  50. data/bundler/lib/bundler/man/bundle-console.1 +2 -4
  51. data/bundler/lib/bundler/man/bundle-console.1.ronn +2 -7
  52. data/bundler/lib/bundler/man/bundle-doctor.1 +2 -2
  53. data/bundler/lib/bundler/man/bundle-doctor.1.ronn +1 -1
  54. data/bundler/lib/bundler/man/bundle-env.1 +9 -0
  55. data/bundler/lib/bundler/man/bundle-env.1.ronn +10 -0
  56. data/bundler/lib/bundler/man/bundle-exec.1 +5 -2
  57. data/bundler/lib/bundler/man/bundle-exec.1.ronn +4 -1
  58. data/bundler/lib/bundler/man/bundle-fund.1 +22 -0
  59. data/bundler/lib/bundler/man/bundle-fund.1.ronn +25 -0
  60. data/bundler/lib/bundler/man/bundle-gem.1 +17 -5
  61. data/bundler/lib/bundler/man/bundle-gem.1.ronn +27 -6
  62. data/bundler/lib/bundler/man/bundle-help.1 +1 -1
  63. data/bundler/lib/bundler/man/bundle-info.1 +5 -2
  64. data/bundler/lib/bundler/man/bundle-info.1.ronn +6 -2
  65. data/bundler/lib/bundler/man/bundle-init.1 +3 -3
  66. data/bundler/lib/bundler/man/bundle-init.1.ronn +3 -2
  67. data/bundler/lib/bundler/man/bundle-inject.1 +10 -2
  68. data/bundler/lib/bundler/man/bundle-inject.1.ronn +9 -1
  69. data/bundler/lib/bundler/man/bundle-install.1 +15 -12
  70. data/bundler/lib/bundler/man/bundle-install.1.ronn +22 -18
  71. data/bundler/lib/bundler/man/bundle-issue.1 +45 -0
  72. data/bundler/lib/bundler/man/bundle-issue.1.ronn +37 -0
  73. data/bundler/lib/bundler/man/bundle-licenses.1 +9 -0
  74. data/bundler/lib/bundler/man/bundle-licenses.1.ronn +10 -0
  75. data/bundler/lib/bundler/man/bundle-list.1 +1 -1
  76. data/bundler/lib/bundler/man/bundle-list.1.ronn +4 -1
  77. data/bundler/lib/bundler/man/bundle-lock.1 +21 -6
  78. data/bundler/lib/bundler/man/bundle-lock.1.ronn +25 -4
  79. data/bundler/lib/bundler/man/bundle-open.1 +2 -2
  80. data/bundler/lib/bundler/man/bundle-open.1.ronn +2 -1
  81. data/bundler/lib/bundler/man/bundle-outdated.1 +8 -5
  82. data/bundler/lib/bundler/man/bundle-outdated.1.ronn +8 -4
  83. data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
  84. data/bundler/lib/bundler/man/bundle-plugin.1 +1 -1
  85. data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
  86. data/bundler/lib/bundler/man/bundle-pristine.1.ronn +1 -1
  87. data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
  88. data/bundler/lib/bundler/man/bundle-remove.1.ronn +1 -1
  89. data/bundler/lib/bundler/man/bundle-show.1 +5 -2
  90. data/bundler/lib/bundler/man/bundle-show.1.ronn +4 -0
  91. data/bundler/lib/bundler/man/bundle-update.1 +13 -7
  92. data/bundler/lib/bundler/man/bundle-update.1.ronn +14 -6
  93. data/bundler/lib/bundler/man/bundle-version.1 +1 -1
  94. data/bundler/lib/bundler/man/bundle-viz.1 +4 -4
  95. data/bundler/lib/bundler/man/bundle-viz.1.ronn +7 -3
  96. data/bundler/lib/bundler/man/bundle.1 +1 -1
  97. data/bundler/lib/bundler/man/gemfile.5 +1 -1
  98. data/bundler/lib/bundler/man/index.txt +4 -0
  99. data/bundler/lib/bundler/materialization.rb +59 -0
  100. data/bundler/lib/bundler/plugin/events.rb +24 -0
  101. data/bundler/lib/bundler/plugin/installer.rb +1 -1
  102. data/bundler/lib/bundler/plugin.rb +20 -1
  103. data/bundler/lib/bundler/process_lock.rb +10 -14
  104. data/bundler/lib/bundler/remote_specification.rb +6 -1
  105. data/bundler/lib/bundler/resolver/base.rb +6 -6
  106. data/bundler/lib/bundler/resolver/candidate.rb +2 -2
  107. data/bundler/lib/bundler/resolver/spec_group.rb +4 -3
  108. data/bundler/lib/bundler/resolver.rb +5 -5
  109. data/bundler/lib/bundler/rubygems_ext.rb +30 -27
  110. data/bundler/lib/bundler/rubygems_gem_installer.rb +3 -2
  111. data/bundler/lib/bundler/rubygems_integration.rb +23 -40
  112. data/bundler/lib/bundler/runtime.rb +27 -7
  113. data/bundler/lib/bundler/self_manager.rb +2 -3
  114. data/bundler/lib/bundler/settings.rb +6 -1
  115. data/bundler/lib/bundler/shared_helpers.rb +29 -17
  116. data/bundler/lib/bundler/source/git/git_proxy.rb +0 -6
  117. data/bundler/lib/bundler/source/git.rb +56 -31
  118. data/bundler/lib/bundler/source/metadata.rb +2 -3
  119. data/bundler/lib/bundler/source/path.rb +2 -2
  120. data/bundler/lib/bundler/source_list.rb +1 -1
  121. data/bundler/lib/bundler/spec_set.rb +81 -56
  122. data/bundler/lib/bundler/stub_specification.rb +8 -0
  123. data/bundler/lib/bundler/templates/newgem/Gemfile.tt +0 -3
  124. data/bundler/lib/bundler/templates/newgem/README.md.tt +1 -1
  125. data/bundler/lib/bundler/templates/newgem/github/workflows/main.yml.tt +15 -15
  126. data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +4 -4
  127. data/bundler/lib/bundler/uri_credentials_filter.rb +1 -1
  128. data/bundler/lib/bundler/vendor/fileutils/COPYING +56 -0
  129. data/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb +15 -13
  130. data/bundler/lib/bundler/vendor/securerandom/COPYING +56 -0
  131. data/bundler/lib/bundler/vendor/securerandom/lib/securerandom.rb +5 -5
  132. data/bundler/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +3 -5
  133. data/bundler/lib/bundler/vendor/thor/lib/thor/group.rb +11 -0
  134. data/bundler/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +1 -4
  135. data/bundler/lib/bundler/vendor/thor/lib/thor/parser/option.rb +2 -2
  136. data/bundler/lib/bundler/vendor/thor/lib/thor/parser/options.rb +2 -1
  137. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +9 -9
  138. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/html.rb +1 -1
  139. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/table_printer.rb +5 -21
  140. data/bundler/lib/bundler/vendor/thor/lib/thor/util.rb +1 -1
  141. data/bundler/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
  142. data/bundler/lib/bundler/vendor/thor/lib/thor.rb +11 -0
  143. data/bundler/lib/bundler/vendor/uri/COPYING +56 -0
  144. data/bundler/lib/bundler/vendor/uri/lib/uri/common.rb +37 -16
  145. data/bundler/lib/bundler/vendor/uri/lib/uri/file.rb +3 -3
  146. data/bundler/lib/bundler/vendor/uri/lib/uri/ftp.rb +1 -1
  147. data/bundler/lib/bundler/vendor/uri/lib/uri/generic.rb +16 -26
  148. data/bundler/lib/bundler/vendor/uri/lib/uri/http.rb +2 -2
  149. data/bundler/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +10 -3
  150. data/bundler/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +26 -3
  151. data/bundler/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
  152. data/bundler/lib/bundler/vendor/uri/lib/uri.rb +9 -9
  153. data/bundler/lib/bundler/vendored_securerandom.rb +0 -2
  154. data/bundler/lib/bundler/version.rb +1 -1
  155. data/bundler/lib/bundler.rb +38 -14
  156. data/{CONTRIBUTING.md → doc/rubygems/CONTRIBUTING.md} +9 -9
  157. data/{POLICIES.md → doc/rubygems/POLICIES.md} +11 -11
  158. data/lib/rubygems/basic_specification.rb +5 -4
  159. data/lib/rubygems/commands/cleanup_command.rb +2 -2
  160. data/lib/rubygems/commands/contents_command.rb +4 -4
  161. data/lib/rubygems/commands/exec_command.rb +3 -0
  162. data/lib/rubygems/commands/pristine_command.rb +2 -2
  163. data/lib/rubygems/commands/push_command.rb +29 -5
  164. data/lib/rubygems/commands/rdoc_command.rb +2 -2
  165. data/lib/rubygems/commands/rebuild_command.rb +0 -2
  166. data/lib/rubygems/commands/setup_command.rb +7 -16
  167. data/lib/rubygems/commands/unpack_command.rb +0 -6
  168. data/lib/rubygems/commands/update_command.rb +2 -8
  169. data/lib/rubygems/config_file.rb +12 -0
  170. data/lib/rubygems/core_ext/kernel_warn.rb +2 -6
  171. data/lib/rubygems/defaults.rb +1 -1
  172. data/lib/rubygems/exceptions.rb +0 -6
  173. data/lib/rubygems/ext/builder.rb +6 -4
  174. data/lib/rubygems/ext/cargo_builder.rb +7 -4
  175. data/lib/rubygems/ext/cmake_builder.rb +7 -2
  176. data/lib/rubygems/ext/configure_builder.rb +7 -2
  177. data/lib/rubygems/ext/ext_conf_builder.rb +9 -5
  178. data/lib/rubygems/ext/rake_builder.rb +6 -1
  179. data/lib/rubygems/gem_runner.rb +9 -0
  180. data/lib/rubygems/gemcutter_utilities.rb +8 -2
  181. data/lib/rubygems/install_update_options.rb +5 -0
  182. data/lib/rubygems/installer.rb +8 -9
  183. data/lib/rubygems/package/tar_header.rb +11 -0
  184. data/lib/rubygems/package/tar_reader/entry.rb +1 -5
  185. data/lib/rubygems/platform.rb +4 -3
  186. data/lib/rubygems/psych_tree.rb +4 -0
  187. data/lib/rubygems/request_set/gem_dependency_api.rb +1 -1
  188. data/lib/rubygems/requirement.rb +0 -4
  189. data/lib/rubygems/resolver/composed_set.rb +3 -3
  190. data/lib/rubygems/resolver/git_set.rb +0 -1
  191. data/lib/rubygems/resolver/index_set.rb +2 -2
  192. data/lib/rubygems/resolver.rb +3 -3
  193. data/lib/rubygems/source/git.rb +13 -10
  194. data/lib/rubygems/spec_fetcher.rb +46 -7
  195. data/lib/rubygems/specification.rb +38 -32
  196. data/lib/rubygems/target_rbconfig.rb +50 -0
  197. data/lib/rubygems/uri.rb +1 -1
  198. data/lib/rubygems/util/licenses.rb +10 -1
  199. data/lib/rubygems/vendor/net-http/COPYING +56 -0
  200. data/lib/rubygems/vendor/net-http/lib/net/http/header.rb +1 -1
  201. data/lib/rubygems/vendor/net-http/lib/net/http/requests.rb +5 -0
  202. data/lib/rubygems/vendor/net-http/lib/net/http.rb +120 -36
  203. data/lib/rubygems/vendor/optparse/lib/optparse/ac.rb +16 -0
  204. data/lib/rubygems/vendor/optparse/lib/optparse/kwargs.rb +8 -3
  205. data/lib/rubygems/vendor/optparse/lib/optparse/version.rb +9 -0
  206. data/lib/rubygems/vendor/optparse/lib/optparse.rb +147 -51
  207. data/lib/rubygems/vendor/resolv/COPYING +56 -0
  208. data/lib/rubygems/vendor/resolv/lib/resolv.rb +50 -37
  209. data/lib/rubygems/vendor/securerandom/COPYING +56 -0
  210. data/lib/rubygems/vendor/securerandom/lib/securerandom.rb +5 -5
  211. data/lib/rubygems/vendor/timeout/COPYING +56 -0
  212. data/lib/rubygems/vendor/timeout/lib/timeout.rb +5 -8
  213. data/lib/rubygems/vendor/uri/COPYING +56 -0
  214. data/lib/rubygems/vendor/uri/lib/uri/common.rb +37 -16
  215. data/lib/rubygems/vendor/uri/lib/uri/file.rb +3 -3
  216. data/lib/rubygems/vendor/uri/lib/uri/ftp.rb +1 -1
  217. data/lib/rubygems/vendor/uri/lib/uri/generic.rb +16 -26
  218. data/lib/rubygems/vendor/uri/lib/uri/http.rb +2 -2
  219. data/lib/rubygems/vendor/uri/lib/uri/rfc2396_parser.rb +10 -3
  220. data/lib/rubygems/vendor/uri/lib/uri/rfc3986_parser.rb +26 -3
  221. data/lib/rubygems/vendor/uri/lib/uri/version.rb +1 -1
  222. data/lib/rubygems/vendor/uri/lib/uri.rb +9 -9
  223. data/lib/rubygems/vendored_securerandom.rb +0 -1
  224. data/lib/rubygems/version.rb +0 -4
  225. data/lib/rubygems.rb +30 -20
  226. data/rubygems-update.gemspec +5 -5
  227. data/setup.rb +1 -1
  228. metadata +36 -27
  229. data/bundler/lib/bundler/vendor/fileutils/LICENSE.txt +0 -22
  230. data/bundler/lib/bundler/vendor/securerandom/LICENSE.txt +0 -22
  231. data/bundler/lib/bundler/vendor/securerandom/lib/random/formatter.rb +0 -373
  232. data/bundler/lib/bundler/vendor/uri/LICENSE.txt +0 -22
  233. data/lib/rubygems/vendor/net-http/LICENSE.txt +0 -22
  234. data/lib/rubygems/vendor/net-http/lib/net/http/backward.rb +0 -40
  235. data/lib/rubygems/vendor/resolv/LICENSE.txt +0 -22
  236. data/lib/rubygems/vendor/securerandom/LICENSE.txt +0 -22
  237. data/lib/rubygems/vendor/securerandom/lib/random/formatter.rb +0 -373
  238. data/lib/rubygems/vendor/timeout/LICENSE.txt +0 -22
  239. data/lib/rubygems/vendor/uri/LICENSE.txt +0 -22
  240. /data/{MAINTAINERS.txt → doc/MAINTAINERS.txt} +0 -0
  241. /data/{bundler → doc/bundler}/UPGRADING.md +0 -0
  242. /data/{UPGRADING.md → doc/rubygems/UPGRADING.md} +0 -0
@@ -4,15 +4,20 @@ bundle-lock(1) -- Creates / Updates a lockfile without installing
4
4
  ## SYNOPSIS
5
5
 
6
6
  `bundle lock` [--update]
7
+ [--bundler[=BUNDLER]]
7
8
  [--local]
8
9
  [--print]
9
10
  [--lockfile=PATH]
10
11
  [--full-index]
12
+ [--gemfile=GEMFILE]
13
+ [--add-checkums]
11
14
  [--add-platform]
12
15
  [--remove-platform]
16
+ [--normalize-platforms]
13
17
  [--patch]
14
18
  [--minor]
15
19
  [--major]
20
+ [--pre]
16
21
  [--strict]
17
22
  [--conservative]
18
23
 
@@ -22,10 +27,14 @@ Lock the gems specified in Gemfile.
22
27
 
23
28
  ## OPTIONS
24
29
 
25
- * `--update=<*gems>`:
30
+ * `--update[=<list>]`:
26
31
  Ignores the existing lockfile. Resolve then updates lockfile. Taking a list
27
32
  of gems or updating all gems if no list is given.
28
33
 
34
+ * `--bundler[=BUNDLER]`:
35
+ Update the locked version of bundler to the given version or the latest
36
+ version if no version is given.
37
+
29
38
  * `--local`:
30
39
  Do not attempt to connect to `rubygems.org`. Instead, Bundler will use the
31
40
  gems already present in Rubygems' cache or in `vendor/cache`. Note that if a
@@ -35,19 +44,28 @@ Lock the gems specified in Gemfile.
35
44
  * `--print`:
36
45
  Prints the lockfile to STDOUT instead of writing to the file system.
37
46
 
38
- * `--lockfile=<path>`:
47
+ * `--lockfile=LOCKFILE`:
39
48
  The path where the lockfile should be written to.
40
49
 
41
50
  * `--full-index`:
42
51
  Fall back to using the single-file index of all gems.
43
52
 
44
- * `--add-platform`:
53
+ * `--gemfile=GEMFILE`:
54
+ Use the specified gemfile instead of [`Gemfile(5)`][Gemfile(5)].
55
+
56
+ * `--add-checksums`:
57
+ Add checksums to the lockfile.
58
+
59
+ * `--add-platform=<list>`:
45
60
  Add a new platform to the lockfile, re-resolving for the addition of that
46
61
  platform.
47
62
 
48
- * `--remove-platform`:
63
+ * `--remove-platform=<list>`:
49
64
  Remove a platform from the lockfile.
50
65
 
66
+ * `--normalize-platforms`:
67
+ Normalize lockfile platforms.
68
+
51
69
  * `--patch`:
52
70
  If updating, prefer updating only to next patch version.
53
71
 
@@ -57,6 +75,9 @@ Lock the gems specified in Gemfile.
57
75
  * `--major`:
58
76
  If updating, prefer updating to next major version (default).
59
77
 
78
+ * `--pre`:
79
+ If updating, always choose the highest allowed version, regardless of prerelease status.
80
+
60
81
  * `--strict`:
61
82
  If updating, do not allow any gem to be updated past latest --patch | --minor | --major.
62
83
 
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-OPEN" "1" "September 2024" ""
3
+ .TH "BUNDLE\-OPEN" "1" "December 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-open\fR \- Opens the source directory for a gem in your bundle
6
6
  .SH "SYNOPSIS"
@@ -27,6 +27,6 @@ bundle open 'rack' \-\-path 'README\.md'
27
27
  Will open the README\.md file of the 'rack' gem source in your bundle\.
28
28
  .SH "OPTIONS"
29
29
  .TP
30
- \fB\-\-path\fR
30
+ \fB\-\-path[=PATH]\fR
31
31
  Specify GEM source relative path to open\.
32
32
 
@@ -23,5 +23,6 @@ Will open the source directory for the 'rack' gem in your bundle.
23
23
  Will open the README.md file of the 'rack' gem source in your bundle.
24
24
 
25
25
  ## OPTIONS
26
- * `--path`:
26
+
27
+ * `--path[=PATH]`:
27
28
  Specify GEM source relative path to open.
@@ -1,10 +1,10 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-OUTDATED" "1" "September 2024" ""
3
+ .TH "BUNDLE\-OUTDATED" "1" "December 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-outdated\fR \- List installed gems with newer versions available
6
6
  .SH "SYNOPSIS"
7
- \fBbundle outdated\fR [GEM] [\-\-local] [\-\-pre] [\-\-source] [\-\-strict] [\-\-parseable | \-\-porcelain] [\-\-group=GROUP] [\-\-groups] [\-\-patch|\-\-minor|\-\-major] [\-\-filter\-major] [\-\-filter\-minor] [\-\-filter\-patch] [\-\-only\-explicit]
7
+ \fBbundle outdated\fR [GEM] [\-\-local] [\-\-pre] [\-\-source] [\-\-filter\-strict | \-\-strict] [\-\-update\-strict] [\-\-parseable | \-\-porcelain] [\-\-group=GROUP] [\-\-groups] [\-\-patch|\-\-minor|\-\-major] [\-\-filter\-major] [\-\-filter\-minor] [\-\-filter\-patch] [\-\-only\-explicit]
8
8
  .SH "DESCRIPTION"
9
9
  Outdated lists the names and versions of gems that have a newer version available in the given source\. Calling outdated with [GEM [GEM]] will only check for newer versions of the given gems\. Prerelease gems are ignored by default\. If your gems are up to date, Bundler will exit with a status of 0\. Otherwise, it will exit 1\.
10
10
  .SH "OPTIONS"
@@ -15,16 +15,19 @@ Do not attempt to fetch gems remotely and use the gem cache instead\.
15
15
  \fB\-\-pre\fR
16
16
  Check for newer pre\-release gems\.
17
17
  .TP
18
- \fB\-\-source\fR
18
+ \fB\-\-source=<list>\fR
19
19
  Check against a specific source\.
20
20
  .TP
21
- \fB\-\-strict\fR
21
+ \fB\-\-filter\-strict\fR, \fB\-\-strict\fR
22
22
  Only list newer versions allowed by your Gemfile requirements, also respecting conservative update flags (\-\-patch, \-\-minor, \-\-major)\.
23
23
  .TP
24
+ \fB\-\-update\-strict\fR
25
+ Strict conservative resolution, do not allow any gem to be updated past latest \-\-patch | \-\-minor | \-\-major\.
26
+ .TP
24
27
  \fB\-\-parseable\fR, \fB\-\-porcelain\fR
25
28
  Use minimal formatting for more parseable output\.
26
29
  .TP
27
- \fB\-\-group\fR
30
+ \fB\-\-group=GROUP\fR
28
31
  List gems from a specific group\.
29
32
  .TP
30
33
  \fB\-\-groups\fR
@@ -6,7 +6,8 @@ bundle-outdated(1) -- List installed gems with newer versions available
6
6
  `bundle outdated` [GEM] [--local]
7
7
  [--pre]
8
8
  [--source]
9
- [--strict]
9
+ [--filter-strict | --strict]
10
+ [--update-strict]
10
11
  [--parseable | --porcelain]
11
12
  [--group=GROUP]
12
13
  [--groups]
@@ -31,16 +32,19 @@ are up to date, Bundler will exit with a status of 0. Otherwise, it will exit 1.
31
32
  * `--pre`:
32
33
  Check for newer pre-release gems.
33
34
 
34
- * `--source`:
35
+ * `--source=<list>`:
35
36
  Check against a specific source.
36
37
 
37
- * `--strict`:
38
+ * `--filter-strict`, `--strict`:
38
39
  Only list newer versions allowed by your Gemfile requirements, also respecting conservative update flags (--patch, --minor, --major).
39
40
 
41
+ * `--update-strict`:
42
+ Strict conservative resolution, do not allow any gem to be updated past latest --patch | --minor | --major.
43
+
40
44
  * `--parseable`, `--porcelain`:
41
45
  Use minimal formatting for more parseable output.
42
46
 
43
- * `--group`:
47
+ * `--group=GROUP`:
44
48
  List gems from a specific group.
45
49
 
46
50
  * `--groups`:
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-PLATFORM" "1" "September 2024" ""
3
+ .TH "BUNDLE\-PLATFORM" "1" "December 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-platform\fR \- Displays platform compatibility information
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-PLUGIN" "1" "September 2024" ""
3
+ .TH "BUNDLE\-PLUGIN" "1" "December 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-plugin\fR \- Manage Bundler plugins
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-PRISTINE" "1" "September 2024" ""
3
+ .TH "BUNDLE\-PRISTINE" "1" "December 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-pristine\fR \- Restores installed gems to their pristine condition
6
6
  .SH "SYNOPSIS"
@@ -1,5 +1,5 @@
1
1
  bundle-pristine(1) -- Restores installed gems to their pristine condition
2
- ===========================================================================
2
+ =========================================================================
3
3
 
4
4
  ## SYNOPSIS
5
5
 
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-REMOVE" "1" "September 2024" ""
3
+ .TH "BUNDLE\-REMOVE" "1" "December 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-remove\fR \- Removes gems from the Gemfile
6
6
  .SH "SYNOPSIS"
@@ -1,5 +1,5 @@
1
1
  bundle-remove(1) -- Removes gems from the Gemfile
2
- ===========================================================================
2
+ =================================================
3
3
 
4
4
  ## SYNOPSIS
5
5
 
@@ -1,10 +1,10 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-SHOW" "1" "September 2024" ""
3
+ .TH "BUNDLE\-SHOW" "1" "December 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem
6
6
  .SH "SYNOPSIS"
7
- \fBbundle show\fR [GEM] [\-\-paths]
7
+ \fBbundle show\fR [GEM] [\-\-paths] [\-\-outdated]
8
8
  .SH "DESCRIPTION"
9
9
  Without the [GEM] option, \fBshow\fR will print a list of the names and versions of all gems that are required by your [\fBGemfile(5)\fR][Gemfile(5)], sorted by name\.
10
10
  .P
@@ -13,4 +13,7 @@ Calling show with [GEM] will list the exact location of that gem on your machine
13
13
  .TP
14
14
  \fB\-\-paths\fR
15
15
  List the paths of all gems that are required by your [\fBGemfile(5)\fR][Gemfile(5)], sorted by gem name\.
16
+ .TP
17
+ \fB\-\-outdated\fR
18
+ Show verbose output including whether gems are outdated\.
16
19
 
@@ -5,6 +5,7 @@ bundle-show(1) -- Shows all the gems in your bundle, or the path to a gem
5
5
 
6
6
  `bundle show` [GEM]
7
7
  [--paths]
8
+ [--outdated]
8
9
 
9
10
  ## DESCRIPTION
10
11
 
@@ -19,3 +20,6 @@ machine.
19
20
  * `--paths`:
20
21
  List the paths of all gems that are required by your [`Gemfile(5)`][Gemfile(5)],
21
22
  sorted by gem name.
23
+
24
+ * `--outdated`:
25
+ Show verbose output including whether gems are outdated.
@@ -1,10 +1,10 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-UPDATE" "1" "September 2024" ""
3
+ .TH "BUNDLE\-UPDATE" "1" "December 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-update\fR \- Update your gems to the latest available versions
6
6
  .SH "SYNOPSIS"
7
- \fBbundle update\fR \fI*gems\fR [\-\-all] [\-\-group=NAME] [\-\-source=NAME] [\-\-local] [\-\-ruby] [\-\-bundler[=VERSION]] [\-\-full\-index] [\-\-jobs=JOBS] [\-\-quiet] [\-\-patch|\-\-minor|\-\-major] [\-\-redownload] [\-\-strict] [\-\-conservative]
7
+ \fBbundle update\fR \fI*gems\fR [\-\-all] [\-\-group=NAME] [\-\-source=NAME] [\-\-local] [\-\-ruby] [\-\-bundler[=VERSION]] [\-\-full\-index] [\-\-gemfile=GEMFILE] [\-\-jobs=NUMBER] [\-\-quiet] [\-\-patch|\-\-minor|\-\-major] [\-\-pre] [\-\-redownload] [\-\-strict] [\-\-conservative]
8
8
  .SH "DESCRIPTION"
9
9
  Update the gems specified (all gems, if \fB\-\-all\fR flag is used), ignoring the previously installed gems specified in the \fBGemfile\.lock\fR\. In general, you should use bundle install(1) \fIbundle\-install\.1\.html\fR to install the same exact gems and versions across machines\.
10
10
  .P
@@ -14,10 +14,10 @@ You would use \fBbundle update\fR to explicitly update the version of a gem\.
14
14
  \fB\-\-all\fR
15
15
  Update all gems specified in Gemfile\.
16
16
  .TP
17
- \fB\-\-group=<name>\fR, \fB\-g=[<name>]\fR
17
+ \fB\-\-group=<list>\fR, \fB\-g=<list>\fR
18
18
  Only update the gems in the specified group\. For instance, you can update all gems in the development group with \fBbundle update \-\-group development\fR\. You can also call \fBbundle update rails \-\-group test\fR to update the rails gem and all gems in the test group, for example\.
19
19
  .TP
20
- \fB\-\-source=<name>\fR
20
+ \fB\-\-source=<list>\fR
21
21
  The name of a \fB:git\fR or \fB:path\fR source used in the Gemfile(5)\. For instance, with a \fB:git\fR source of \fBhttp://github\.com/rails/rails\.git\fR, you would call \fBbundle update \-\-source rails\fR
22
22
  .TP
23
23
  \fB\-\-local\fR
@@ -26,13 +26,16 @@ Do not attempt to fetch gems remotely and use the gem cache instead\.
26
26
  \fB\-\-ruby\fR
27
27
  Update the locked version of Ruby to the current version of Ruby\.
28
28
  .TP
29
- \fB\-\-bundler\fR
29
+ \fB\-\-bundler[=BUNDLER]\fR
30
30
  Update the locked version of bundler to the invoked bundler version\.
31
31
  .TP
32
32
  \fB\-\-full\-index\fR
33
33
  Fall back to using the single\-file index of all gems\.
34
34
  .TP
35
- \fB\-\-jobs=[<number>]\fR, \fB\-j[<number>]\fR
35
+ \fB\-\-gemfile=GEMFILE\fR
36
+ Use the specified gemfile instead of [\fBGemfile(5)\fR][Gemfile(5)]\.
37
+ .TP
38
+ \fB\-\-jobs=<number>\fR, \fB\-j=<number>\fR
36
39
  Specify the number of jobs to run in parallel\. The default is the number of available processors\.
37
40
  .TP
38
41
  \fB\-\-retry=[<number>]\fR
@@ -41,7 +44,7 @@ Retry failed network or git requests for \fInumber\fR times\.
41
44
  \fB\-\-quiet\fR
42
45
  Only output warnings and errors\.
43
46
  .TP
44
- \fB\-\-redownload\fR
47
+ \fB\-\-redownload\fR, \fB\-\-force\fR
45
48
  Force downloading every gem\.
46
49
  .TP
47
50
  \fB\-\-patch\fR
@@ -53,6 +56,9 @@ Prefer updating only to next minor version\.
53
56
  \fB\-\-major\fR
54
57
  Prefer updating to next major version (default)\.
55
58
  .TP
59
+ \fB\-\-pre\fR
60
+ Always choose the highest allowed version, regardless of prerelease status\.
61
+ .TP
56
62
  \fB\-\-strict\fR
57
63
  Do not allow any gem to be updated past latest \fB\-\-patch\fR | \fB\-\-minor\fR | \fB\-\-major\fR\.
58
64
  .TP
@@ -10,9 +10,11 @@ bundle-update(1) -- Update your gems to the latest available versions
10
10
  [--ruby]
11
11
  [--bundler[=VERSION]]
12
12
  [--full-index]
13
- [--jobs=JOBS]
13
+ [--gemfile=GEMFILE]
14
+ [--jobs=NUMBER]
14
15
  [--quiet]
15
16
  [--patch|--minor|--major]
17
+ [--pre]
16
18
  [--redownload]
17
19
  [--strict]
18
20
  [--conservative]
@@ -32,13 +34,13 @@ gem.
32
34
  * `--all`:
33
35
  Update all gems specified in Gemfile.
34
36
 
35
- * `--group=<name>`, `-g=[<name>]`:
37
+ * `--group=<list>`, `-g=<list>`:
36
38
  Only update the gems in the specified group. For instance, you can update all gems
37
39
  in the development group with `bundle update --group development`. You can also
38
40
  call `bundle update rails --group test` to update the rails gem and all gems in
39
41
  the test group, for example.
40
42
 
41
- * `--source=<name>`:
43
+ * `--source=<list>`:
42
44
  The name of a `:git` or `:path` source used in the Gemfile(5). For
43
45
  instance, with a `:git` source of `http://github.com/rails/rails.git`,
44
46
  you would call `bundle update --source rails`
@@ -49,13 +51,16 @@ gem.
49
51
  * `--ruby`:
50
52
  Update the locked version of Ruby to the current version of Ruby.
51
53
 
52
- * `--bundler`:
54
+ * `--bundler[=BUNDLER]`:
53
55
  Update the locked version of bundler to the invoked bundler version.
54
56
 
55
57
  * `--full-index`:
56
58
  Fall back to using the single-file index of all gems.
57
59
 
58
- * `--jobs=[<number>]`, `-j[<number>]`:
60
+ * `--gemfile=GEMFILE`:
61
+ Use the specified gemfile instead of [`Gemfile(5)`][Gemfile(5)].
62
+
63
+ * `--jobs=<number>`, `-j=<number>`:
59
64
  Specify the number of jobs to run in parallel. The default is the number of
60
65
  available processors.
61
66
 
@@ -65,7 +70,7 @@ gem.
65
70
  * `--quiet`:
66
71
  Only output warnings and errors.
67
72
 
68
- * `--redownload`:
73
+ * `--redownload`, `--force`:
69
74
  Force downloading every gem.
70
75
 
71
76
  * `--patch`:
@@ -77,6 +82,9 @@ gem.
77
82
  * `--major`:
78
83
  Prefer updating to next major version (default).
79
84
 
85
+ * `--pre`:
86
+ Always choose the highest allowed version, regardless of prerelease status.
87
+
80
88
  * `--strict`:
81
89
  Do not allow any gem to be updated past latest `--patch` | `--minor` | `--major`.
82
90
 
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-VERSION" "1" "September 2024" ""
3
+ .TH "BUNDLE\-VERSION" "1" "December 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-version\fR \- Prints Bundler version information
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-VIZ" "1" "September 2024" ""
3
+ .TH "BUNDLE\-VIZ" "1" "December 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-viz\fR \- Generates a visual dependency graph for your Gemfile
6
6
  .SH "SYNOPSIS"
@@ -13,10 +13,10 @@ The associated gems must also be installed via \fBbundle install(1)\fR \fIbundle
13
13
  \fBviz\fR command was deprecated in Bundler 2\.2\. Use bundler\-graph plugin \fIhttps://github\.com/rubygems/bundler\-graph\fR instead\.
14
14
  .SH "OPTIONS"
15
15
  .TP
16
- \fB\-\-file\fR, \fB\-f\fR
16
+ \fB\-\-file=FILE\fR, \fB\-f=FILE\fR
17
17
  The name to use for the generated file\. See \fB\-\-format\fR option
18
18
  .TP
19
- \fB\-\-format\fR, \fB\-F\fR
19
+ \fB\-\-format=FORMAT\fR, \fB\-F=FORMAT\fR
20
20
  This is output format option\. Supported format is png, jpg, svg, dot \|\.\|\.\|\.
21
21
  .TP
22
22
  \fB\-\-requirements\fR, \fB\-R\fR
@@ -25,6 +25,6 @@ Set to show the version of each required dependency\.
25
25
  \fB\-\-version\fR, \fB\-v\fR
26
26
  Set to show each gem version\.
27
27
  .TP
28
- \fB\-\-without\fR, \fB\-W\fR
28
+ \fB\-\-without=<list>\fR, \fB\-W=<list>\fR
29
29
  Exclude gems that are part of the specified named group\.
30
30
 
@@ -20,13 +20,17 @@ The associated gems must also be installed via [`bundle install(1)`](bundle-inst
20
20
 
21
21
  ## OPTIONS
22
22
 
23
- * `--file`, `-f`:
23
+ * `--file=FILE`, `-f=FILE`:
24
24
  The name to use for the generated file. See `--format` option
25
- * `--format`, `-F`:
25
+
26
+ * `--format=FORMAT`, `-F=FORMAT`:
26
27
  This is output format option. Supported format is png, jpg, svg, dot ...
28
+
27
29
  * `--requirements`, `-R`:
28
30
  Set to show the version of each required dependency.
31
+
29
32
  * `--version`, `-v`:
30
33
  Set to show each gem version.
31
- * `--without`, `-W`:
34
+
35
+ * `--without=<list>`, `-W=<list>`:
32
36
  Exclude gems that are part of the specified named group.
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE" "1" "September 2024" ""
3
+ .TH "BUNDLE" "1" "December 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\fR \- Ruby Dependency Management
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "GEMFILE" "5" "September 2024" ""
3
+ .TH "GEMFILE" "5" "December 2024" ""
4
4
  .SH "NAME"
5
5
  \fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
6
6
  .SH "SYNOPSIS"
@@ -8,13 +8,17 @@ bundle-clean(1) bundle-clean.1
8
8
  bundle-config(1) bundle-config.1
9
9
  bundle-console(1) bundle-console.1
10
10
  bundle-doctor(1) bundle-doctor.1
11
+ bundle-env(1) bundle-env.1
11
12
  bundle-exec(1) bundle-exec.1
13
+ bundle-fund(1) bundle-fund.1
12
14
  bundle-gem(1) bundle-gem.1
13
15
  bundle-help(1) bundle-help.1
14
16
  bundle-info(1) bundle-info.1
15
17
  bundle-init(1) bundle-init.1
16
18
  bundle-inject(1) bundle-inject.1
17
19
  bundle-install(1) bundle-install.1
20
+ bundle-issue(1) bundle-issue.1
21
+ bundle-licenses(1) bundle-licenses.1
18
22
  bundle-list(1) bundle-list.1
19
23
  bundle-lock(1) bundle-lock.1
20
24
  bundle-open(1) bundle-open.1
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Bundler
4
+ #
5
+ # This class materializes a set of resolved specifications (`LazySpecification`)
6
+ # for a given gem into the most appropriate real specifications
7
+ # (`StubSepecification`, `EndpointSpecification`, etc), given a dependency and a
8
+ # target platform.
9
+ #
10
+ class Materialization
11
+ def initialize(dep, platform, candidates:)
12
+ @dep = dep
13
+ @platform = platform
14
+ @candidates = candidates
15
+ end
16
+
17
+ def complete?
18
+ specs.any?
19
+ end
20
+
21
+ def specs
22
+ @specs ||= if @candidates.nil?
23
+ []
24
+ elsif platform
25
+ GemHelpers.select_best_platform_match(@candidates, platform, force_ruby: dep.force_ruby_platform)
26
+ else
27
+ GemHelpers.select_best_local_platform_match(@candidates, force_ruby: dep.force_ruby_platform || dep.default_force_ruby_platform)
28
+ end
29
+ end
30
+
31
+ def dependencies
32
+ specs.first.runtime_dependencies.map {|d| [d, platform] }
33
+ end
34
+
35
+ def materialized_spec
36
+ specs.reject(&:missing?).first&.materialization
37
+ end
38
+
39
+ def completely_missing_specs
40
+ return [] unless specs.all?(&:missing?)
41
+
42
+ specs
43
+ end
44
+
45
+ def partially_missing_specs
46
+ specs.select(&:missing?)
47
+ end
48
+
49
+ def incomplete_specs
50
+ return [] if complete?
51
+
52
+ @candidates || LazySpecification.new(dep.name, nil, nil)
53
+ end
54
+
55
+ private
56
+
57
+ attr_reader :dep, :platform
58
+ end
59
+ end
@@ -56,6 +56,30 @@ module Bundler
56
56
  # Includes an Array of Bundler::Dependency objects
57
57
  # GEM_AFTER_INSTALL_ALL = "after-install-all"
58
58
  define :GEM_AFTER_INSTALL_ALL, "after-install-all"
59
+
60
+ # @!parse
61
+ # A hook called before each individual gem is required
62
+ # Includes a Bundler::Dependency.
63
+ # GEM_BEFORE_REQUIRE = "before-require"
64
+ define :GEM_BEFORE_REQUIRE, "before-require"
65
+
66
+ # @!parse
67
+ # A hook called after each individual gem is required
68
+ # Includes a Bundler::Dependency.
69
+ # GEM_AFTER_REQUIRE = "after-require"
70
+ define :GEM_AFTER_REQUIRE, "after-require"
71
+
72
+ # @!parse
73
+ # A hook called before any gems require
74
+ # Includes an Array of Bundler::Dependency objects.
75
+ # GEM_BEFORE_REQUIRE_ALL = "before-require-all"
76
+ define :GEM_BEFORE_REQUIRE_ALL, "before-require-all"
77
+
78
+ # @!parse
79
+ # A hook called after all gems required
80
+ # Includes an Array of Bundler::Dependency objects.
81
+ # GEM_AFTER_REQUIRE_ALL = "after-require-all"
82
+ define :GEM_AFTER_REQUIRE_ALL, "after-require-all"
59
83
  end
60
84
  end
61
85
  end
@@ -34,7 +34,7 @@ module Bundler
34
34
  # @return [Hash] map of names to their specs they are installed with
35
35
  def install_definition(definition)
36
36
  def definition.lock(*); end
37
- definition.resolve_remotely!
37
+ definition.remotely!
38
38
  specs = definition.specs
39
39
 
40
40
  install_from_specs specs
@@ -342,7 +342,26 @@ module Bundler
342
342
  # done to avoid conflicts
343
343
  path = index.plugin_path(name)
344
344
 
345
- Gem.add_to_load_path(*index.load_paths(name))
345
+ paths = index.load_paths(name)
346
+ invalid_paths = paths.reject {|p| File.directory?(p) }
347
+
348
+ if invalid_paths.any?
349
+ Bundler.ui.warn <<~MESSAGE
350
+ The following plugin paths don't exist: #{invalid_paths.join(", ")}.
351
+
352
+ This can happen if the plugin was installed with a different version of Ruby that has since been uninstalled.
353
+
354
+ If you would like to reinstall the plugin, run:
355
+
356
+ bundler plugin uninstall #{name} && bundler plugin install #{name}
357
+
358
+ Continuing without installing plugin #{name}.
359
+ MESSAGE
360
+
361
+ return
362
+ end
363
+
364
+ Gem.add_to_load_path(*paths)
346
365
 
347
366
  load path.join(PLUGIN_FILE_NAME)
348
367
 
@@ -2,23 +2,19 @@
2
2
 
3
3
  module Bundler
4
4
  class ProcessLock
5
- def self.lock(bundle_path = Bundler.bundle_path)
5
+ def self.lock(bundle_path = Bundler.bundle_path, &block)
6
6
  lock_file_path = File.join(bundle_path, "bundler.lock")
7
- has_lock = false
7
+ base_lock_file_path = lock_file_path.delete_suffix(".lock")
8
8
 
9
- File.open(lock_file_path, "w") do |f|
10
- f.flock(File::LOCK_EX)
11
- has_lock = true
12
- yield
13
- f.flock(File::LOCK_UN)
9
+ require "fileutils" if Bundler.rubygems.provides?("< 3.6.0")
10
+
11
+ begin
12
+ SharedHelpers.filesystem_access(lock_file_path, :write) do
13
+ Gem.open_file_with_lock(base_lock_file_path, &block)
14
+ end
15
+ rescue PermissionError
16
+ block.call
14
17
  end
15
- rescue Errno::EACCES, Errno::ENOLCK, Errno::ENOTSUP, Errno::EPERM, Errno::EROFS
16
- # In the case the user does not have access to
17
- # create the lock file or is using NFS where
18
- # locks are not available we skip locking.
19
- yield
20
- ensure
21
- FileUtils.rm_f(lock_file_path) if has_lock
22
18
  end
23
19
  end
24
20
  end