rubygems-update 3.5.17 → 3.5.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +52 -0
  3. data/Manifest.txt +10 -0
  4. data/bundler/CHANGELOG.md +46 -0
  5. data/bundler/lib/bundler/build_metadata.rb +2 -2
  6. data/bundler/lib/bundler/cli/add.rb +1 -1
  7. data/bundler/lib/bundler/cli/gem.rb +4 -1
  8. data/bundler/lib/bundler/cli/install.rb +4 -3
  9. data/bundler/lib/bundler/cli/lock.rb +5 -5
  10. data/bundler/lib/bundler/cli/outdated.rb +1 -1
  11. data/bundler/lib/bundler/definition.rb +14 -25
  12. data/bundler/lib/bundler/dsl.rb +27 -17
  13. data/bundler/lib/bundler/errors.rb +7 -5
  14. data/bundler/lib/bundler/fetcher.rb +2 -2
  15. data/bundler/lib/bundler/inline.rb +19 -4
  16. data/bundler/lib/bundler/installer/gem_installer.rb +4 -2
  17. data/bundler/lib/bundler/installer/parallel_installer.rb +3 -2
  18. data/bundler/lib/bundler/installer.rb +9 -11
  19. data/bundler/lib/bundler/lockfile_parser.rb +1 -1
  20. data/bundler/lib/bundler/man/bundle-add.1 +27 -16
  21. data/bundler/lib/bundler/man/bundle-add.1.ronn +37 -14
  22. data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
  23. data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
  24. data/bundler/lib/bundler/man/bundle-check.1 +1 -1
  25. data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
  26. data/bundler/lib/bundler/man/bundle-config.1 +1 -1
  27. data/bundler/lib/bundler/man/bundle-console.1 +1 -1
  28. data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
  29. data/bundler/lib/bundler/man/bundle-exec.1 +1 -1
  30. data/bundler/lib/bundler/man/bundle-gem.1 +1 -1
  31. data/bundler/lib/bundler/man/bundle-help.1 +1 -1
  32. data/bundler/lib/bundler/man/bundle-info.1 +1 -1
  33. data/bundler/lib/bundler/man/bundle-init.1 +1 -1
  34. data/bundler/lib/bundler/man/bundle-inject.1 +1 -1
  35. data/bundler/lib/bundler/man/bundle-install.1 +1 -1
  36. data/bundler/lib/bundler/man/bundle-list.1 +1 -1
  37. data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
  38. data/bundler/lib/bundler/man/bundle-open.1 +1 -1
  39. data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
  40. data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
  41. data/bundler/lib/bundler/man/bundle-plugin.1 +1 -1
  42. data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
  43. data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
  44. data/bundler/lib/bundler/man/bundle-show.1 +1 -1
  45. data/bundler/lib/bundler/man/bundle-update.1 +1 -1
  46. data/bundler/lib/bundler/man/bundle-version.1 +1 -1
  47. data/bundler/lib/bundler/man/bundle-viz.1 +1 -1
  48. data/bundler/lib/bundler/man/bundle.1 +1 -1
  49. data/bundler/lib/bundler/man/gemfile.5 +3 -1
  50. data/bundler/lib/bundler/man/gemfile.5.ronn +6 -0
  51. data/bundler/lib/bundler/resolver/base.rb +6 -0
  52. data/bundler/lib/bundler/resolver/package.rb +10 -1
  53. data/bundler/lib/bundler/resolver.rb +31 -9
  54. data/bundler/lib/bundler/retry.rb +1 -1
  55. data/bundler/lib/bundler/ruby_version.rb +7 -1
  56. data/bundler/lib/bundler/rubygems_ext.rb +43 -16
  57. data/bundler/lib/bundler/rubygems_gem_installer.rb +4 -3
  58. data/bundler/lib/bundler/source/git/git_proxy.rb +4 -2
  59. data/bundler/lib/bundler/source/git.rb +16 -6
  60. data/bundler/lib/bundler/source/rubygems.rb +5 -12
  61. data/bundler/lib/bundler/templates/newgem/README.md.tt +6 -2
  62. data/bundler/lib/bundler/ui/shell.rb +24 -2
  63. data/bundler/lib/bundler/ui/silent.rb +12 -1
  64. data/bundler/lib/bundler/vendor/securerandom/.document +1 -0
  65. data/bundler/lib/bundler/vendor/securerandom/LICENSE.txt +22 -0
  66. data/bundler/lib/bundler/vendor/securerandom/lib/random/formatter.rb +373 -0
  67. data/bundler/lib/bundler/vendor/securerandom/lib/securerandom.rb +96 -0
  68. data/bundler/lib/bundler/vendored_securerandom.rb +14 -0
  69. data/bundler/lib/bundler/version.rb +1 -1
  70. data/bundler/lib/bundler.rb +1 -1
  71. data/lib/rubygems/commands/exec_command.rb +1 -6
  72. data/lib/rubygems/commands/fetch_command.rb +14 -0
  73. data/lib/rubygems/commands/install_command.rb +0 -4
  74. data/lib/rubygems/commands/setup_command.rb +2 -0
  75. data/lib/rubygems/commands/uninstall_command.rb +8 -3
  76. data/lib/rubygems/exceptions.rb +2 -3
  77. data/lib/rubygems/installer.rb +1 -1
  78. data/lib/rubygems/remote_fetcher.rb +0 -1
  79. data/lib/rubygems/resolver/activation_request.rb +1 -1
  80. data/lib/rubygems/resolver/best_set.rb +2 -28
  81. data/lib/rubygems/source/git.rb +7 -5
  82. data/lib/rubygems/source/installed.rb +3 -1
  83. data/lib/rubygems/source/local.rb +8 -4
  84. data/lib/rubygems/source/specific_file.rb +5 -3
  85. data/lib/rubygems/source.rb +10 -8
  86. data/lib/rubygems/specification.rb +1 -1
  87. data/lib/rubygems/specification_policy.rb +1 -1
  88. data/lib/rubygems/vendor/molinillo/lib/molinillo/resolution.rb +1 -1
  89. data/lib/rubygems/vendor/net-http/lib/net/https.rb +1 -1
  90. data/lib/rubygems/vendor/optparse/lib/optparse.rb +1 -1
  91. data/lib/rubygems/vendor/resolv/lib/resolv.rb +71 -16
  92. data/lib/rubygems/vendor/securerandom/.document +1 -0
  93. data/lib/rubygems/vendor/securerandom/LICENSE.txt +22 -0
  94. data/lib/rubygems/vendor/securerandom/lib/random/formatter.rb +373 -0
  95. data/lib/rubygems/vendor/securerandom/lib/securerandom.rb +96 -0
  96. data/lib/rubygems/vendored_securerandom.rb +4 -0
  97. data/lib/rubygems.rb +18 -15
  98. data/rubygems-update.gemspec +1 -1
  99. metadata +13 -3
@@ -1,24 +1,12 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-ADD" "1" "June 2024" ""
3
+ .TH "BUNDLE\-ADD" "1" "September 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install
6
6
  .SH "SYNOPSIS"
7
- \fBbundle add\fR \fIGEM_NAME\fR [\-\-group=GROUP] [\-\-version=VERSION] [\-\-source=SOURCE] [\-\-path=PATH] [\-\-git=GIT] [\-\-github=GITHUB] [\-\-branch=BRANCH] [\-\-ref=REF] [\-\-skip\-install] [\-\-strict] [\-\-optimistic]
7
+ \fBbundle add\fR \fIGEM_NAME\fR [\-\-group=GROUP] [\-\-version=VERSION] [\-\-source=SOURCE] [\-\-path=PATH] [\-\-git=GIT|\-\-github=GITHUB] [\-\-branch=BRANCH] [\-\-ref=REF] [\-\-skip\-install] [\-\-strict|\-\-optimistic]
8
8
  .SH "DESCRIPTION"
9
- Adds the named gem to the Gemfile and run \fBbundle install\fR\. \fBbundle install\fR can be avoided by using the flag \fB\-\-skip\-install\fR\.
10
- .P
11
- Example:
12
- .P
13
- bundle add rails
14
- .P
15
- bundle add rails \-\-version "< 3\.0, > 1\.1"
16
- .P
17
- bundle add rails \-\-version "~> 5\.0\.0" \-\-source "https://gems\.example\.com" \-\-group "development"
18
- .P
19
- bundle add rails \-\-skip\-install
20
- .P
21
- bundle add rails \-\-group "development, test"
9
+ Adds the named gem to the [\fBGemfile(5)\fR][Gemfile(5)] and run \fBbundle install\fR\. \fBbundle install\fR can be avoided by using the flag \fB\-\-skip\-install\fR\.
22
10
  .SH "OPTIONS"
23
11
  .TP
24
12
  \fB\-\-version\fR, \fB\-v\fR
@@ -56,4 +44,27 @@ Adds optimistic declaration of version\.
56
44
  .TP
57
45
  \fB\-\-strict\fR
58
46
  Adds strict declaration of version\.
59
-
47
+ .SH "EXAMPLES"
48
+ .IP "1." 4
49
+ You can add the \fBrails\fR gem to the Gemfile without any version restriction\. The source of the gem will be the global source\.
50
+ .IP
51
+ \fBbundle add rails\fR
52
+ .IP "2." 4
53
+ You can add the \fBrails\fR gem with version greater than 1\.1 (not including 1\.1) and less than 3\.0\.
54
+ .IP
55
+ \fBbundle add rails \-\-version "> 1\.1, < 3\.0"\fR
56
+ .IP "3." 4
57
+ You can use the \fBhttps://gems\.example\.com\fR custom source and assign the gem to a group\.
58
+ .IP
59
+ \fBbundle add rails \-\-version "~> 5\.0\.0" \-\-source "https://gems\.example\.com" \-\-group "development"\fR
60
+ .IP "4." 4
61
+ The following adds the \fBgem\fR entry to the Gemfile without installing the gem\. You can install gems later via \fBbundle install\fR\.
62
+ .IP
63
+ \fBbundle add rails \-\-skip\-install\fR
64
+ .IP "5." 4
65
+ You can assign the gem to more than one group\.
66
+ .IP
67
+ \fBbundle add rails \-\-group "development, test"\fR
68
+ .IP "" 0
69
+ .SH "SEE ALSO"
70
+ Gemfile(5) \fIhttps://bundler\.io/man/gemfile\.5\.html\fR, bundle\-remove(1) \fIbundle\-remove\.1\.html\fR
@@ -1,26 +1,19 @@
1
1
  bundle-add(1) -- Add gem to the Gemfile and run bundle install
2
- ================================================================
2
+ ==============================================================
3
3
 
4
4
  ## SYNOPSIS
5
5
 
6
- `bundle add` <GEM_NAME> [--group=GROUP] [--version=VERSION] [--source=SOURCE] [--path=PATH] [--git=GIT] [--github=GITHUB] [--branch=BRANCH] [--ref=REF] [--skip-install] [--strict] [--optimistic]
6
+ `bundle add` <GEM_NAME> [--group=GROUP] [--version=VERSION] [--source=SOURCE]
7
+ [--path=PATH] [--git=GIT|--github=GITHUB] [--branch=BRANCH] [--ref=REF]
8
+ [--skip-install] [--strict|--optimistic]
7
9
 
8
10
  ## DESCRIPTION
9
- Adds the named gem to the Gemfile and run `bundle install`. `bundle install` can be avoided by using the flag `--skip-install`.
10
11
 
11
- Example:
12
-
13
- bundle add rails
14
-
15
- bundle add rails --version "< 3.0, > 1.1"
16
-
17
- bundle add rails --version "~> 5.0.0" --source "https://gems.example.com" --group "development"
18
-
19
- bundle add rails --skip-install
20
-
21
- bundle add rails --group "development, test"
12
+ Adds the named gem to the [`Gemfile(5)`][Gemfile(5)] and run `bundle install`.
13
+ `bundle install` can be avoided by using the flag `--skip-install`.
22
14
 
23
15
  ## OPTIONS
16
+
24
17
  * `--version`, `-v`:
25
18
  Specify version requirements(s) for the added gem.
26
19
 
@@ -56,3 +49,33 @@ bundle add rails --group "development, test"
56
49
 
57
50
  * `--strict`:
58
51
  Adds strict declaration of version.
52
+
53
+ ## EXAMPLES
54
+
55
+ 1. You can add the `rails` gem to the Gemfile without any version restriction.
56
+ The source of the gem will be the global source.
57
+
58
+ `bundle add rails`
59
+
60
+ 2. You can add the `rails` gem with version greater than 1.1 (not including 1.1) and less than 3.0.
61
+
62
+ `bundle add rails --version "> 1.1, < 3.0"`
63
+
64
+ 3. You can use the `https://gems.example.com` custom source and assign the gem
65
+ to a group.
66
+
67
+ `bundle add rails --version "~> 5.0.0" --source "https://gems.example.com" --group "development"`
68
+
69
+ 4. The following adds the `gem` entry to the Gemfile without installing the
70
+ gem. You can install gems later via `bundle install`.
71
+
72
+ `bundle add rails --skip-install`
73
+
74
+ 5. You can assign the gem to more than one group.
75
+
76
+ `bundle add rails --group "development, test"`
77
+
78
+ ## SEE ALSO
79
+
80
+ [Gemfile(5)](https://bundler.io/man/gemfile.5.html),
81
+ [bundle-remove(1)](bundle-remove.1.html)
@@ -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\-BINSTUBS" "1" "June 2024" ""
3
+ .TH "BUNDLE\-BINSTUBS" "1" "September 2024" ""
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
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-CACHE" "1" "June 2024" ""
3
+ .TH "BUNDLE\-CACHE" "1" "September 2024" ""
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
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-CHECK" "1" "June 2024" ""
3
+ .TH "BUNDLE\-CHECK" "1" "September 2024" ""
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
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-CLEAN" "1" "June 2024" ""
3
+ .TH "BUNDLE\-CLEAN" "1" "September 2024" ""
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
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-CONFIG" "1" "June 2024" ""
3
+ .TH "BUNDLE\-CONFIG" "1" "September 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-config\fR \- Set bundler configuration options
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\-CONSOLE" "1" "June 2024" ""
3
+ .TH "BUNDLE\-CONSOLE" "1" "September 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-console\fR \- Deprecated way to open an IRB session with the bundle pre\-loaded
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\-DOCTOR" "1" "June 2024" ""
3
+ .TH "BUNDLE\-DOCTOR" "1" "September 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-doctor\fR \- Checks the bundle for common problems
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\-EXEC" "1" "June 2024" ""
3
+ .TH "BUNDLE\-EXEC" "1" "September 2024" ""
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
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-GEM" "1" "June 2024" ""
3
+ .TH "BUNDLE\-GEM" "1" "September 2024" ""
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
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-HELP" "1" "June 2024" ""
3
+ .TH "BUNDLE\-HELP" "1" "September 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-help\fR \- Displays detailed help for each subcommand
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\-INFO" "1" "June 2024" ""
3
+ .TH "BUNDLE\-INFO" "1" "September 2024" ""
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
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-INIT" "1" "June 2024" ""
3
+ .TH "BUNDLE\-INIT" "1" "September 2024" ""
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
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-INJECT" "1" "June 2024" ""
3
+ .TH "BUNDLE\-INJECT" "1" "September 2024" ""
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
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-INSTALL" "1" "June 2024" ""
3
+ .TH "BUNDLE\-INSTALL" "1" "September 2024" ""
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
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-LIST" "1" "June 2024" ""
3
+ .TH "BUNDLE\-LIST" "1" "September 2024" ""
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
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-LOCK" "1" "June 2024" ""
3
+ .TH "BUNDLE\-LOCK" "1" "September 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-lock\fR \- Creates / Updates a lockfile without installing
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\-OPEN" "1" "June 2024" ""
3
+ .TH "BUNDLE\-OPEN" "1" "September 2024" ""
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
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-OUTDATED" "1" "June 2024" ""
3
+ .TH "BUNDLE\-OUTDATED" "1" "September 2024" ""
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
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-PLATFORM" "1" "June 2024" ""
3
+ .TH "BUNDLE\-PLATFORM" "1" "September 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" "June 2024" ""
3
+ .TH "BUNDLE\-PLUGIN" "1" "September 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" "June 2024" ""
3
+ .TH "BUNDLE\-PRISTINE" "1" "September 2024" ""
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
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-REMOVE" "1" "June 2024" ""
3
+ .TH "BUNDLE\-REMOVE" "1" "September 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-remove\fR \- Removes gems from the Gemfile
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\-SHOW" "1" "June 2024" ""
3
+ .TH "BUNDLE\-SHOW" "1" "September 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"
@@ -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\-UPDATE" "1" "June 2024" ""
3
+ .TH "BUNDLE\-UPDATE" "1" "September 2024" ""
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
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-VERSION" "1" "June 2024" ""
3
+ .TH "BUNDLE\-VERSION" "1" "September 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" "June 2024" ""
3
+ .TH "BUNDLE\-VIZ" "1" "September 2024" ""
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
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE" "1" "June 2024" ""
3
+ .TH "BUNDLE" "1" "September 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" "June 2024" ""
3
+ .TH "GEMFILE" "5" "September 2024" ""
4
4
  .SH "NAME"
5
5
  \fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
6
6
  .SH "SYNOPSIS"
@@ -216,6 +216,8 @@ The following platform values are deprecated and should be replaced with \fBwind
216
216
  .IP "\(bu" 4
217
217
  \fBmswin\fR, \fBmswin64\fR, \fBmingw32\fR, \fBx64_mingw\fR
218
218
  .IP "" 0
219
+ .P
220
+ Note that, while unfortunately using the same terminology, the values of this option are different from the values that \fBbundle lock \-\-add\-platform\fR can take\. The values of this option are more closer to "Ruby Implementation" while the values that \fBbundle lock \-\-add\-platform\fR understands are more related to OS and architecture of the different systems where your lockfile will be used\.
219
221
  .SS "FORCE_RUBY_PLATFORM"
220
222
  If you always want the pure ruby variant of a gem to be chosen over platform specific variants, you can use the \fBforce_ruby_platform\fR option:
221
223
  .IP "" 4
@@ -242,6 +242,12 @@ The following platform values are deprecated and should be replaced with `window
242
242
 
243
243
  * `mswin`, `mswin64`, `mingw32`, `x64_mingw`
244
244
 
245
+ Note that, while unfortunately using the same terminology, the values of this
246
+ option are different from the values that `bundle lock --add-platform` can take.
247
+ The values of this option are more closer to "Ruby Implementation" while the
248
+ values that `bundle lock --add-platform` understands are more related to OS and
249
+ architecture of the different systems where your lockfile will be used.
250
+
245
251
  ### FORCE_RUBY_PLATFORM
246
252
 
247
253
  If you always want the pure ruby variant of a gem to be chosen over platform
@@ -72,6 +72,12 @@ module Bundler
72
72
  end
73
73
  end
74
74
 
75
+ def include_remote_specs(names)
76
+ names.each do |name|
77
+ get_package(name).consider_remote_versions!
78
+ end
79
+ end
80
+
75
81
  private
76
82
 
77
83
  def indirect_pins(names)
@@ -15,7 +15,7 @@ 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, dependency: nil)
18
+ def initialize(name, platforms, locked_specs:, unlock:, prerelease: false, prefer_local: false, dependency: nil)
19
19
  @name = name
20
20
  @platforms = platforms
21
21
  @locked_version = locked_specs[name].first&.version
@@ -23,6 +23,7 @@ module Bundler
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
+ @prefer_local = prefer_local
26
27
  end
27
28
 
28
29
  def platform_specs(specs)
@@ -69,6 +70,14 @@ module Bundler
69
70
  @prerelease = :consider_last
70
71
  end
71
72
 
73
+ def prefer_local?
74
+ @prefer_local
75
+ end
76
+
77
+ def consider_remote_versions!
78
+ @prefer_local = false
79
+ end
80
+
72
81
  def force_ruby_platform?
73
82
  @dependency.force_ruby_platform
74
83
  end
@@ -84,9 +84,9 @@ module Bundler
84
84
  rescue PubGrub::SolveFailure => e
85
85
  incompatibility = e.incompatibility
86
86
 
87
- names_to_unlock, names_to_allow_prereleases_for, extended_explanation = find_names_to_relax(incompatibility)
87
+ names_to_unlock, names_to_allow_prereleases_for, names_to_allow_remote_specs_for, extended_explanation = find_names_to_relax(incompatibility)
88
88
 
89
- names_to_relax = names_to_unlock + names_to_allow_prereleases_for
89
+ names_to_relax = names_to_unlock + names_to_allow_prereleases_for + names_to_allow_remote_specs_for
90
90
 
91
91
  if names_to_relax.any?
92
92
  if names_to_unlock.any?
@@ -96,11 +96,17 @@ module Bundler
96
96
  end
97
97
 
98
98
  if names_to_allow_prereleases_for.any?
99
- Bundler.ui.debug "Found conflicts with dependencies with prereleases. Will retrying considering prereleases for #{names_to_allow_prereleases_for.join(", ")}...", true
99
+ Bundler.ui.debug "Found conflicts with dependencies with prereleases. Will retry considering prereleases for #{names_to_allow_prereleases_for.join(", ")}...", true
100
100
 
101
101
  @base.include_prereleases(names_to_allow_prereleases_for)
102
102
  end
103
103
 
104
+ if names_to_allow_remote_specs_for.any?
105
+ Bundler.ui.debug "Found conflicts with local versions of #{names_to_allow_remote_specs_for.join(", ")}. Will retry considering remote versions...", true
106
+
107
+ @base.include_remote_specs(names_to_allow_remote_specs_for)
108
+ end
109
+
104
110
  root, logger = setup_solver
105
111
 
106
112
  Bundler.ui.debug "Retrying resolution...", true
@@ -120,6 +126,7 @@ module Bundler
120
126
  def find_names_to_relax(incompatibility)
121
127
  names_to_unlock = []
122
128
  names_to_allow_prereleases_for = []
129
+ names_to_allow_remote_specs_for = []
123
130
  extended_explanation = nil
124
131
 
125
132
  while incompatibility.conflict?
@@ -134,6 +141,8 @@ module Bundler
134
141
  names_to_unlock << name
135
142
  elsif package.ignores_prereleases? && @all_specs[name].any? {|s| s.version.prerelease? }
136
143
  names_to_allow_prereleases_for << name
144
+ elsif package.prefer_local? && @all_specs[name].any? {|s| !s.is_a?(StubSpecification) }
145
+ names_to_allow_remote_specs_for << name
137
146
  end
138
147
 
139
148
  no_versions_incompat = [cause.incompatibility, cause.satisfier].find {|incompat| incompat.cause.is_a?(PubGrub::Incompatibility::NoVersions) }
@@ -143,7 +152,7 @@ module Bundler
143
152
  end
144
153
  end
145
154
 
146
- [names_to_unlock.uniq, names_to_allow_prereleases_for.uniq, extended_explanation]
155
+ [names_to_unlock.uniq, names_to_allow_prereleases_for.uniq, names_to_allow_remote_specs_for.uniq, extended_explanation]
147
156
  end
148
157
 
149
158
  def parse_dependency(package, dependency)
@@ -244,7 +253,7 @@ module Bundler
244
253
 
245
254
  def all_versions_for(package)
246
255
  name = package.name
247
- results = (@base[name] + filter_prereleases(@all_specs[name], package)).uniq {|spec| [spec.version.hash, spec.platform] }
256
+ results = (@base[name] + filter_specs(@all_specs[name], package)).uniq {|spec| [spec.version.hash, spec.platform] }
248
257
 
249
258
  if name == "bundler" && !bundler_pinned_to_current_version?
250
259
  bundler_spec = Gem.loaded_specs["bundler"]
@@ -368,12 +377,22 @@ module Bundler
368
377
  end
369
378
  end
370
379
 
380
+ def filter_specs(specs, package)
381
+ filter_remote_specs(filter_prereleases(specs, package), package)
382
+ end
383
+
371
384
  def filter_prereleases(specs, package)
372
385
  return specs unless package.ignores_prereleases? && specs.size > 1
373
386
 
374
387
  specs.reject {|s| s.version.prerelease? }
375
388
  end
376
389
 
390
+ def filter_remote_specs(specs, package)
391
+ return specs unless package.prefer_local?
392
+
393
+ specs.select {|s| s.is_a?(StubSpecification) }
394
+ end
395
+
377
396
  # Ignore versions that depend on themselves incorrectly
378
397
  def filter_invalid_self_dependencies(specs, name)
379
398
  specs.reject do |s|
@@ -405,10 +424,13 @@ module Bundler
405
424
 
406
425
  dep_range = dep_constraint.range
407
426
  versions = select_sorted_versions(dep_package, dep_range)
408
- if versions.empty? && dep_package.ignores_prereleases?
409
- @all_versions.delete(dep_package)
410
- @sorted_versions.delete(dep_package)
411
- dep_package.consider_prereleases!
427
+ if versions.empty?
428
+ if dep_package.ignores_prereleases? || dep_package.prefer_local?
429
+ @all_versions.delete(dep_package)
430
+ @sorted_versions.delete(dep_package)
431
+ end
432
+ dep_package.consider_prereleases! if dep_package.ignores_prereleases?
433
+ dep_package.consider_remote_versions! if dep_package.prefer_local?
412
434
  versions = select_sorted_versions(dep_package, dep_range)
413
435
  end
414
436
 
@@ -50,7 +50,7 @@ module Bundler
50
50
  end
51
51
  return true unless name
52
52
  Bundler.ui.info "" unless Bundler.ui.debug? # Add new line in case dots preceded this
53
- Bundler.ui.warn "Retrying #{name} due to error (#{current_run.next}/#{total_runs}): #{e.class} #{e.message}", Bundler.ui.debug?
53
+ Bundler.ui.warn "Retrying #{name} due to error (#{current_run.next}/#{total_runs}): #{e.class} #{e.message}", true
54
54
  end
55
55
 
56
56
  def keep_trying?
@@ -23,7 +23,13 @@ module Bundler
23
23
  # specified must match the version.
24
24
 
25
25
  @versions = Array(versions).map do |v|
26
- op, v = Gem::Requirement.parse(normalize_version(v))
26
+ normalized_v = normalize_version(v)
27
+
28
+ unless Gem::Requirement::PATTERN.match?(normalized_v)
29
+ raise InvalidArgumentError, "#{v} is not a valid requirement on the Ruby version"
30
+ end
31
+
32
+ op, v = Gem::Requirement.parse(normalized_v)
27
33
  op == "=" ? v.to_s : "#{op} #{v}"
28
34
  end
29
35