bundler 2.6.2 → 2.6.4

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 (73) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +53 -0
  3. data/README.md +2 -2
  4. data/lib/bundler/build_metadata.rb +2 -2
  5. data/lib/bundler/cli/console.rb +8 -6
  6. data/lib/bundler/cli/doctor.rb +9 -5
  7. data/lib/bundler/cli/info.rb +4 -4
  8. data/lib/bundler/cli/issue.rb +1 -1
  9. data/lib/bundler/cli/outdated.rb +6 -4
  10. data/lib/bundler/cli/show.rb +1 -1
  11. data/lib/bundler/current_ruby.rb +23 -33
  12. data/lib/bundler/definition.rb +62 -60
  13. data/lib/bundler/dependency.rb +92 -47
  14. data/lib/bundler/dsl.rb +83 -78
  15. data/lib/bundler/endpoint_specification.rb +10 -3
  16. data/lib/bundler/errors.rb +4 -0
  17. data/lib/bundler/feature_flag.rb +2 -6
  18. data/lib/bundler/gem_helpers.rb +4 -10
  19. data/lib/bundler/gem_version_promoter.rb +0 -2
  20. data/lib/bundler/installer.rb +16 -2
  21. data/lib/bundler/lazy_specification.rb +50 -45
  22. data/lib/bundler/man/bundle-add.1 +3 -3
  23. data/lib/bundler/man/bundle-binstubs.1 +3 -3
  24. data/lib/bundler/man/bundle-cache.1 +3 -3
  25. data/lib/bundler/man/bundle-check.1 +3 -3
  26. data/lib/bundler/man/bundle-clean.1 +3 -3
  27. data/lib/bundler/man/bundle-config.1 +3 -3
  28. data/lib/bundler/man/bundle-console.1 +3 -3
  29. data/lib/bundler/man/bundle-doctor.1 +3 -3
  30. data/lib/bundler/man/bundle-env.1 +3 -3
  31. data/lib/bundler/man/bundle-exec.1 +3 -3
  32. data/lib/bundler/man/bundle-fund.1 +3 -3
  33. data/lib/bundler/man/bundle-gem.1 +3 -3
  34. data/lib/bundler/man/bundle-help.1 +3 -3
  35. data/lib/bundler/man/bundle-info.1 +3 -3
  36. data/lib/bundler/man/bundle-init.1 +3 -3
  37. data/lib/bundler/man/bundle-inject.1 +3 -3
  38. data/lib/bundler/man/bundle-install.1 +3 -3
  39. data/lib/bundler/man/bundle-issue.1 +3 -3
  40. data/lib/bundler/man/bundle-licenses.1 +3 -3
  41. data/lib/bundler/man/bundle-list.1 +3 -3
  42. data/lib/bundler/man/bundle-lock.1 +3 -3
  43. data/lib/bundler/man/bundle-open.1 +3 -3
  44. data/lib/bundler/man/bundle-outdated.1 +3 -3
  45. data/lib/bundler/man/bundle-platform.1 +3 -3
  46. data/lib/bundler/man/bundle-plugin.1 +3 -3
  47. data/lib/bundler/man/bundle-pristine.1 +3 -3
  48. data/lib/bundler/man/bundle-remove.1 +3 -3
  49. data/lib/bundler/man/bundle-show.1 +3 -3
  50. data/lib/bundler/man/bundle-update.1 +3 -3
  51. data/lib/bundler/man/bundle-version.1 +3 -3
  52. data/lib/bundler/man/bundle-viz.1 +3 -3
  53. data/lib/bundler/man/bundle.1 +3 -3
  54. data/lib/bundler/man/gemfile.5 +3 -3
  55. data/lib/bundler/match_metadata.rb +13 -0
  56. data/lib/bundler/plugin/index.rb +4 -0
  57. data/lib/bundler/resolver/base.rb +2 -1
  58. data/lib/bundler/resolver/package.rb +8 -4
  59. data/lib/bundler/resolver/spec_group.rb +1 -25
  60. data/lib/bundler/resolver.rb +13 -3
  61. data/lib/bundler/ruby_dsl.rb +12 -3
  62. data/lib/bundler/rubygems_ext.rb +83 -82
  63. data/lib/bundler/rubygems_integration.rb +2 -15
  64. data/lib/bundler/runtime.rb +19 -24
  65. data/lib/bundler/source/git.rb +1 -0
  66. data/lib/bundler/source/rubygems.rb +19 -4
  67. data/lib/bundler/source.rb +2 -0
  68. data/lib/bundler/source_list.rb +4 -0
  69. data/lib/bundler/spec_set.rb +66 -29
  70. data/lib/bundler/templates/newgem/Gemfile.tt +1 -0
  71. data/lib/bundler/version.rb +1 -1
  72. data/lib/bundler.rb +10 -30
  73. metadata +3 -3
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-BINSTUBS" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-BINSTUBS" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-binstubs\fR \- Install the binstubs of the listed gems
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-CACHE" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-CACHE" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-CHECK" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-CHECK" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-CLEAN" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-CLEAN" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-CONFIG" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-CONFIG" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-config\fR \- Set bundler configuration options
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-CONSOLE" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-CONSOLE" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-console\fR \- Open an IRB session with the bundle pre\-loaded
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-DOCTOR" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-DOCTOR" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-doctor\fR \- Checks the bundle for common problems
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-ENV" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-ENV" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-env\fR \- Print information about the environment Bundler is running under
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-EXEC" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-EXEC" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-exec\fR \- Execute a command in the context of the bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-FUND" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-FUND" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-fund\fR \- Lists information about gems seeking funding assistance
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-GEM" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-GEM" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-gem\fR \- Generate a project skeleton for creating a rubygem
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-HELP" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-HELP" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-help\fR \- Displays detailed help for each subcommand
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-INFO" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-INFO" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-info\fR \- Show information for the given gem in your bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-INIT" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-INIT" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-init\fR \- Generates a Gemfile into the current working directory
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-INJECT" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-INJECT" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-inject\fR \- Add named gem(s) with version requirements to Gemfile
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-INSTALL" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-INSTALL" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-ISSUE" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-ISSUE" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-issue\fR \- Get help reporting Bundler issues
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-LICENSES" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-LICENSES" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-licenses\fR \- Print the license of all gems in the bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-LIST" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-LIST" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-list\fR \- List all the gems in the bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-LOCK" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-LOCK" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-lock\fR \- Creates / Updates a lockfile without installing
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-OPEN" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-OPEN" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-open\fR \- Opens the source directory for a gem in your bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-OUTDATED" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-OUTDATED" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-outdated\fR \- List installed gems with newer versions available
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-PLATFORM" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-PLATFORM" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-platform\fR \- Displays platform compatibility information
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-PLUGIN" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-PLUGIN" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-plugin\fR \- Manage Bundler plugins
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-PRISTINE" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-PRISTINE" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-pristine\fR \- Restores installed gems to their pristine condition
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-REMOVE" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-REMOVE" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-remove\fR \- Removes gems from the Gemfile
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-SHOW" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-SHOW" "1" "January 2025" ""
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"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-UPDATE" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-UPDATE" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-update\fR \- Update your gems to the latest available versions
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-VERSION" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-VERSION" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-version\fR \- Prints Bundler version information
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-VIZ" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE\-VIZ" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-viz\fR \- Generates a visual dependency graph for your Gemfile
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE" "1" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "BUNDLE" "1" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\fR \- Ruby Dependency Management
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
- .\" generated with nRonn/v0.11.1
2
- .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "GEMFILE" "5" "December 2024" ""
1
+ .\" generated with Ronn-NG/v0.10.1
2
+ .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
+ .TH "GEMFILE" "5" "January 2025" ""
4
4
  .SH "NAME"
5
5
  \fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
6
6
  .SH "SYNOPSIS"
@@ -13,5 +13,18 @@ module Bundler
13
13
  def matches_current_rubygems?
14
14
  @required_rubygems_version.satisfied_by?(Gem.rubygems_version)
15
15
  end
16
+
17
+ def expanded_dependencies
18
+ runtime_dependencies + [
19
+ metadata_dependency("Ruby", @required_ruby_version),
20
+ metadata_dependency("RubyGems", @required_rubygems_version),
21
+ ].compact
22
+ end
23
+
24
+ def metadata_dependency(name, requirement)
25
+ return if requirement.nil? || requirement.none?
26
+
27
+ Gem::Dependency.new("#{name}\0", requirement)
28
+ end
16
29
  end
17
30
  end
@@ -34,6 +34,10 @@ module Bundler
34
34
  rescue GenericSystemCallError
35
35
  # no need to fail when on a read-only FS, for example
36
36
  nil
37
+ rescue ArgumentError => e
38
+ # ruby 3.4 checks writability in Dir.tmpdir
39
+ raise unless e.message&.include?("could not find a temporary directory")
40
+ nil
37
41
  end
38
42
  load_index(local_index_file) if SharedHelpers.in_bundle?
39
43
  end
@@ -5,10 +5,11 @@ require_relative "package"
5
5
  module Bundler
6
6
  class Resolver
7
7
  class Base
8
- attr_reader :packages, :requirements, :source_requirements
8
+ attr_reader :packages, :requirements, :source_requirements, :locked_specs
9
9
 
10
10
  def initialize(source_requirements, dependencies, base, platforms, options)
11
11
  @source_requirements = source_requirements
12
+ @locked_specs = options[:locked_specs]
12
13
 
13
14
  @base = base
14
15
 
@@ -15,19 +15,23 @@ module Bundler
15
15
  class Package
16
16
  attr_reader :name, :platforms, :dependency, :locked_version
17
17
 
18
- def initialize(name, platforms, locked_specs:, unlock:, prerelease: false, prefer_local: false, dependency: nil)
18
+ def initialize(name, platforms, locked_specs:, unlock:, prerelease: false, prefer_local: false, dependency: nil, new_platforms: [])
19
19
  @name = name
20
20
  @platforms = platforms
21
- @locked_version = locked_specs[name].first&.version
21
+ @locked_version = locked_specs.version_for(name)
22
22
  @unlock = unlock
23
23
  @dependency = dependency || Dependency.new(name, @locked_version)
24
24
  @top_level = !dependency.nil?
25
25
  @prerelease = @dependency.prerelease? || @locked_version&.prerelease? || prerelease ? :consider_first : :ignore
26
26
  @prefer_local = prefer_local
27
+ @new_platforms = new_platforms
27
28
  end
28
29
 
29
30
  def platform_specs(specs)
30
- platforms.map {|platform| GemHelpers.select_best_platform_match(specs, platform, prefer_locked: !unlock?) }
31
+ platforms.map do |platform|
32
+ prefer_locked = @new_platforms.include?(platform) ? false : !unlock?
33
+ GemHelpers.select_best_platform_match(specs, platform, prefer_locked: prefer_locked)
34
+ end
31
35
  end
32
36
 
33
37
  def to_s
@@ -55,7 +59,7 @@ module Bundler
55
59
  end
56
60
 
57
61
  def unlock?
58
- @unlock.empty? || @unlock.include?(name)
62
+ @unlock == true || @unlock.include?(name)
59
63
  end
60
64
 
61
65
  def ignores_prereleases?
@@ -39,9 +39,7 @@ module Bundler
39
39
  end
40
40
 
41
41
  def dependencies
42
- @dependencies ||= @specs.flat_map do |spec|
43
- __dependencies(spec) + metadata_dependencies(spec)
44
- end.uniq.sort
42
+ @dependencies ||= @specs.flat_map(&:expanded_dependencies).uniq.sort
45
43
  end
46
44
 
47
45
  def ==(other)
@@ -71,28 +69,6 @@ module Bundler
71
69
  def exemplary_spec
72
70
  @specs.first
73
71
  end
74
-
75
- def __dependencies(spec)
76
- dependencies = []
77
- spec.dependencies.each do |dep|
78
- next if dep.type == :development
79
- dependencies << Dependency.new(dep.name, dep.requirement)
80
- end
81
- dependencies
82
- end
83
-
84
- def metadata_dependencies(spec)
85
- [
86
- metadata_dependency("Ruby", spec.required_ruby_version),
87
- metadata_dependency("RubyGems", spec.required_rubygems_version),
88
- ].compact
89
- end
90
-
91
- def metadata_dependency(name, requirement)
92
- return if requirement.nil? || requirement.none?
93
-
94
- Dependency.new("#{name}\0", requirement)
95
- end
96
72
  end
97
73
  end
98
74
  end
@@ -80,7 +80,8 @@ module Bundler
80
80
  def solve_versions(root:, logger:)
81
81
  solver = PubGrub::VersionSolver.new(source: self, root: root, logger: logger)
82
82
  result = solver.solve
83
- result.flat_map {|package, version| version.to_specs(package, @most_specific_locked_platform) }
83
+ resolved_specs = result.flat_map {|package, version| version.to_specs(package, @most_specific_locked_platform) }
84
+ SpecSet.new(resolved_specs).specs_with_additional_variants_from(@base.locked_specs)
84
85
  rescue PubGrub::SolveFailure => e
85
86
  incompatibility = e.incompatibility
86
87
 
@@ -388,9 +389,18 @@ module Bundler
388
389
  end
389
390
 
390
391
  def filter_remote_specs(specs, package)
391
- return specs unless package.prefer_local?
392
+ if package.prefer_local?
393
+ local_specs = specs.select {|s| s.is_a?(StubSpecification) }
392
394
 
393
- specs.select {|s| s.is_a?(StubSpecification) }
395
+ if local_specs.empty?
396
+ package.consider_remote_versions!
397
+ specs
398
+ else
399
+ local_specs
400
+ end
401
+ else
402
+ specs
403
+ end
394
404
  end
395
405
 
396
406
  # Ignore versions that depend on themselves incorrectly
@@ -42,9 +42,18 @@ module Bundler
42
42
  # Loads the file relative to the dirname of the Gemfile itself.
43
43
  def normalize_ruby_file(filename)
44
44
  file_content = Bundler.read_file(gemfile.dirname.join(filename))
45
- # match "ruby-3.2.2" or "ruby 3.2.2" capturing version string up to the first space or comment
46
- if /^ruby(-|\s+)([^\s#]+)/.match(file_content)
47
- $2
45
+ # match "ruby-3.2.2", ruby = "3.2.2" or "ruby 3.2.2" capturing version string up to the first space or comment
46
+ if /^ # Start of line
47
+ ruby # Literal "ruby"
48
+ [\s-]* # Optional whitespace or hyphens (for "ruby-3.2.2" format)
49
+ (?:=\s*)? # Optional equals sign with whitespace (for ruby = "3.2.2" format)
50
+ "? # Optional opening quote
51
+ ( # Start capturing group
52
+ [^\s#"]+ # One or more chars that aren't spaces, #, or quotes
53
+ ) # End capturing group
54
+ "? # Optional closing quote
55
+ /x.match(file_content)
56
+ $1
48
57
  else
49
58
  file_content.strip
50
59
  end