rubygems-update 3.5.6 → 3.5.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +204 -1
  3. data/CODE_OF_CONDUCT.md +79 -28
  4. data/CONTRIBUTING.md +2 -2
  5. data/Manifest.txt +9 -4
  6. data/POLICIES.md +75 -6
  7. data/bundler/CHANGELOG.md +156 -0
  8. data/bundler/lib/bundler/build_metadata.rb +2 -2
  9. data/bundler/lib/bundler/cli/binstubs.rb +1 -1
  10. data/bundler/lib/bundler/cli/fund.rb +1 -1
  11. data/bundler/lib/bundler/cli/gem.rb +7 -14
  12. data/bundler/lib/bundler/cli/install.rb +1 -1
  13. data/bundler/lib/bundler/cli/plugin.rb +3 -2
  14. data/bundler/lib/bundler/cli.rb +14 -31
  15. data/bundler/lib/bundler/compact_index_client/cache.rb +47 -72
  16. data/bundler/lib/bundler/compact_index_client/parser.rb +84 -0
  17. data/bundler/lib/bundler/compact_index_client.rb +51 -80
  18. data/bundler/lib/bundler/constants.rb +8 -1
  19. data/bundler/lib/bundler/definition.rb +114 -71
  20. data/bundler/lib/bundler/dependency.rb +2 -1
  21. data/bundler/lib/bundler/dsl.rb +16 -1
  22. data/bundler/lib/bundler/endpoint_specification.rb +11 -0
  23. data/bundler/lib/bundler/env.rb +1 -1
  24. data/bundler/lib/bundler/environment_preserver.rb +2 -20
  25. data/bundler/lib/bundler/errors.rb +14 -0
  26. data/bundler/lib/bundler/fetcher/compact_index.rb +15 -24
  27. data/bundler/lib/bundler/gem_helper.rb +1 -1
  28. data/bundler/lib/bundler/gem_helpers.rb +14 -7
  29. data/bundler/lib/bundler/gem_version_promoter.rb +42 -38
  30. data/bundler/lib/bundler/injector.rb +3 -5
  31. data/bundler/lib/bundler/installer/gem_installer.rb +0 -1
  32. data/bundler/lib/bundler/installer/standalone.rb +0 -3
  33. data/bundler/lib/bundler/installer.rb +9 -11
  34. data/bundler/lib/bundler/lazy_specification.rb +1 -0
  35. data/bundler/lib/bundler/man/bundle-add.1 +1 -1
  36. data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
  37. data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
  38. data/bundler/lib/bundler/man/bundle-check.1 +3 -1
  39. data/bundler/lib/bundler/man/bundle-check.1.ronn +3 -0
  40. data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
  41. data/bundler/lib/bundler/man/bundle-config.1 +2 -4
  42. data/bundler/lib/bundler/man/bundle-config.1.ronn +1 -4
  43. data/bundler/lib/bundler/man/bundle-console.1 +1 -1
  44. data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
  45. data/bundler/lib/bundler/man/bundle-exec.1 +1 -1
  46. data/bundler/lib/bundler/man/bundle-gem.1 +7 -1
  47. data/bundler/lib/bundler/man/bundle-gem.1.ronn +11 -0
  48. data/bundler/lib/bundler/man/bundle-help.1 +1 -1
  49. data/bundler/lib/bundler/man/bundle-info.1 +1 -1
  50. data/bundler/lib/bundler/man/bundle-init.1 +1 -1
  51. data/bundler/lib/bundler/man/bundle-inject.1 +1 -1
  52. data/bundler/lib/bundler/man/bundle-install.1 +3 -3
  53. data/bundler/lib/bundler/man/bundle-install.1.ronn +2 -2
  54. data/bundler/lib/bundler/man/bundle-list.1 +1 -1
  55. data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
  56. data/bundler/lib/bundler/man/bundle-open.1 +1 -1
  57. data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
  58. data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
  59. data/bundler/lib/bundler/man/bundle-plugin.1 +7 -4
  60. data/bundler/lib/bundler/man/bundle-plugin.1.ronn +7 -3
  61. data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
  62. data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
  63. data/bundler/lib/bundler/man/bundle-show.1 +1 -1
  64. data/bundler/lib/bundler/man/bundle-update.1 +1 -1
  65. data/bundler/lib/bundler/man/bundle-version.1 +1 -1
  66. data/bundler/lib/bundler/man/bundle-viz.1 +1 -1
  67. data/bundler/lib/bundler/man/bundle.1 +1 -1
  68. data/bundler/lib/bundler/man/gemfile.5 +3 -3
  69. data/bundler/lib/bundler/man/gemfile.5.ronn +2 -2
  70. data/bundler/lib/bundler/plugin/installer/path.rb +18 -0
  71. data/bundler/lib/bundler/plugin/installer.rb +36 -16
  72. data/bundler/lib/bundler/plugin/source_list.rb +4 -4
  73. data/bundler/lib/bundler/resolver/base.rb +4 -0
  74. data/bundler/lib/bundler/resolver/candidate.rb +5 -17
  75. data/bundler/lib/bundler/resolver/package.rb +4 -0
  76. data/bundler/lib/bundler/resolver/spec_group.rb +20 -2
  77. data/bundler/lib/bundler/resolver.rb +72 -33
  78. data/bundler/lib/bundler/rubygems_ext.rb +98 -10
  79. data/bundler/lib/bundler/rubygems_gem_installer.rb +35 -2
  80. data/bundler/lib/bundler/rubygems_integration.rb +16 -2
  81. data/bundler/lib/bundler/runtime.rb +1 -1
  82. data/bundler/lib/bundler/self_manager.rb +22 -2
  83. data/bundler/lib/bundler/settings.rb +22 -16
  84. data/bundler/lib/bundler/setup.rb +6 -0
  85. data/bundler/lib/bundler/shared_helpers.rb +6 -4
  86. data/bundler/lib/bundler/source/git/git_proxy.rb +8 -0
  87. data/bundler/lib/bundler/source/git.rb +14 -0
  88. data/bundler/lib/bundler/source/metadata.rb +2 -0
  89. data/bundler/lib/bundler/source/path.rb +0 -13
  90. data/bundler/lib/bundler/source/rubygems.rb +31 -30
  91. data/bundler/lib/bundler/source_list.rb +26 -2
  92. data/bundler/lib/bundler/spec_set.rb +15 -13
  93. data/bundler/lib/bundler/stub_specification.rb +8 -0
  94. data/bundler/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +77 -29
  95. data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +4 -3
  96. data/bundler/lib/bundler/templates/newgem/rubocop.yml.tt +0 -5
  97. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb +1 -0
  98. data/bundler/lib/bundler/vendored_net_http.rb +20 -5
  99. data/bundler/lib/bundler/vendored_timeout.rb +7 -3
  100. data/bundler/lib/bundler/version.rb +1 -1
  101. data/bundler/lib/bundler/yaml_serializer.rb +1 -8
  102. data/bundler/lib/bundler.rb +26 -1
  103. data/exe/update_rubygems +1 -1
  104. data/lib/rubygems/basic_specification.rb +27 -0
  105. data/lib/rubygems/bundler_version_finder.rb +1 -1
  106. data/lib/rubygems/command.rb +1 -1
  107. data/lib/rubygems/command_manager.rb +2 -1
  108. data/lib/rubygems/commands/build_command.rb +2 -11
  109. data/lib/rubygems/commands/help_command.rb +2 -2
  110. data/lib/rubygems/commands/pristine_command.rb +12 -9
  111. data/lib/rubygems/commands/rdoc_command.rb +1 -8
  112. data/lib/rubygems/commands/rebuild_command.rb +264 -0
  113. data/lib/rubygems/commands/setup_command.rb +2 -0
  114. data/lib/rubygems/commands/uninstall_command.rb +1 -1
  115. data/lib/rubygems/commands/update_command.rb +8 -9
  116. data/lib/rubygems/config_file.rb +33 -16
  117. data/lib/rubygems/defaults.rb +4 -4
  118. data/lib/rubygems/dependency.rb +3 -15
  119. data/lib/rubygems/dependency_list.rb +1 -1
  120. data/lib/rubygems/deprecate.rb +79 -77
  121. data/lib/rubygems/ext/cargo_builder.rb +2 -17
  122. data/lib/rubygems/gemcutter_utilities/webauthn_poller.rb +3 -1
  123. data/lib/rubygems/gemcutter_utilities.rb +1 -1
  124. data/lib/rubygems/gemspec_helpers.rb +19 -0
  125. data/lib/rubygems/installer.rb +9 -8
  126. data/lib/rubygems/package/tar_header.rb +20 -4
  127. data/lib/rubygems/package.rb +13 -8
  128. data/lib/rubygems/platform.rb +3 -2
  129. data/lib/rubygems/remote_fetcher.rb +1 -1
  130. data/lib/rubygems/request.rb +1 -1
  131. data/lib/rubygems/request_set.rb +1 -1
  132. data/lib/rubygems/requirement.rb +2 -2
  133. data/lib/rubygems/resolver/spec_specification.rb +7 -0
  134. data/lib/rubygems/s3_uri_signer.rb +1 -1
  135. data/lib/rubygems/safe_yaml.rb +10 -1
  136. data/lib/rubygems/security.rb +1 -1
  137. data/lib/rubygems/specification.rb +55 -124
  138. data/lib/rubygems/specification_policy.rb +26 -6
  139. data/lib/rubygems/specification_record.rb +212 -0
  140. data/lib/rubygems/stub_specification.rb +21 -0
  141. data/lib/rubygems/uninstaller.rb +27 -20
  142. data/lib/rubygems/util/licenses.rb +68 -0
  143. data/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph.rb +1 -1
  144. data/lib/rubygems/vendored_net_http.rb +5 -0
  145. data/lib/rubygems/vendored_timeout.rb +5 -0
  146. data/lib/rubygems/yaml_serializer.rb +1 -8
  147. data/lib/rubygems.rb +28 -15
  148. data/rubygems-update.gemspec +1 -1
  149. metadata +12 -7
  150. data/lib/rubygems/net/http.rb +0 -3
  151. data/lib/rubygems/timeout.rb +0 -3
  152. /data/lib/rubygems/{optparse.rb → vendored_optparse.rb} +0 -0
  153. /data/lib/rubygems/{tsort.rb → vendored_tsort.rb} +0 -0
@@ -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" "December 2023" ""
3
+ .TH "BUNDLE\-INSTALL" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
6
6
  .SH "SYNOPSIS"
@@ -208,8 +208,8 @@ To explicitly update \fBactionpack\fR, including its dependencies which other ge
208
208
  \fBSummary\fR: In general, after making a change to the Gemfile(5) , you should first try to run \fBbundle install\fR, which will guarantee that no other gem in the Gemfile(5) is impacted by the change\. If that does not work, run bundle update(1) \fIbundle\-update\.1\.html\fR\.
209
209
  .SH "SEE ALSO"
210
210
  .IP "\(bu" 4
211
- Gem install docs \fIhttp://guides\.rubygems\.org/rubygems\-basics/#installing\-gems\fR
211
+ Gem install docs \fIhttps://guides\.rubygems\.org/rubygems\-basics/#installing\-gems\fR
212
212
  .IP "\(bu" 4
213
- Rubygems signing docs \fIhttp://guides\.rubygems\.org/security/\fR
213
+ Rubygems signing docs \fIhttps://guides\.rubygems\.org/security/\fR
214
214
  .IP "" 0
215
215
 
@@ -379,5 +379,5 @@ does not work, run [bundle update(1)](bundle-update.1.html).
379
379
 
380
380
  ## SEE ALSO
381
381
 
382
- * [Gem install docs](http://guides.rubygems.org/rubygems-basics/#installing-gems)
383
- * [Rubygems signing docs](http://guides.rubygems.org/security/)
382
+ * [Gem install docs](https://guides.rubygems.org/rubygems-basics/#installing-gems)
383
+ * [Rubygems signing docs](https://guides.rubygems.org/security/)
@@ -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" "December 2023" ""
3
+ .TH "BUNDLE\-LIST" "1" "June 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" "December 2023" ""
3
+ .TH "BUNDLE\-LOCK" "1" "June 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" "December 2023" ""
3
+ .TH "BUNDLE\-OPEN" "1" "June 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" "December 2023" ""
3
+ .TH "BUNDLE\-OUTDATED" "1" "June 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" "December 2023" ""
3
+ .TH "BUNDLE\-PLATFORM" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-platform\fR \- Displays platform compatibility information
6
6
  .SH "SYNOPSIS"
@@ -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\-PLUGIN" "1" "December 2023" ""
3
+ .TH "BUNDLE\-PLUGIN" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-plugin\fR \- Manage Bundler plugins
6
6
  .SH "SYNOPSIS"
7
- \fBbundle plugin\fR install PLUGINS [\-\-source=\fISOURCE\fR] [\-\-version=\fIversion\fR] [\-\-git|\-\-local_git=\fIgit\-url\fR] [\-\-branch=\fIbranch\fR|\-\-ref=\fIrev\fR]
7
+ \fBbundle plugin\fR install PLUGINS [\-\-source=\fISOURCE\fR] [\-\-version=\fIversion\fR] [\-\-git=\fIgit\-url\fR] [\-\-branch=\fIbranch\fR|\-\-ref=\fIrev\fR] [\-\-path=\fIpath\fR]
8
8
  .br
9
9
  \fBbundle plugin\fR uninstall PLUGINS
10
10
  .br
@@ -27,7 +27,7 @@ Install bundler\-graph gem from example\.com\. The global source, specified in s
27
27
  You can specify the version of the gem via \fB\-\-version\fR\.
28
28
  .TP
29
29
  \fBbundle plugin install bundler\-graph \-\-git https://github\.com/rubygems/bundler\-graph\fR
30
- Install bundler\-graph gem from Git repository\. \fB\-\-git\fR can be replaced with \fB\-\-local\-git\fR\. You cannot use both \fB\-\-git\fR and \fB\-\-local\-git\fR\. You can use standard Git URLs like:
30
+ Install bundler\-graph gem from Git repository\. You can use standard Git URLs like:
31
31
  .IP
32
32
  \fBssh://[user@]host\.xz[:port]/path/to/repo\.git\fR
33
33
  .br
@@ -37,7 +37,10 @@ Install bundler\-graph gem from Git repository\. \fB\-\-git\fR can be replaced w
37
37
  .br
38
38
  \fBfile:///path/to/repo\fR
39
39
  .IP
40
- When you specify \fB\-\-git\fR/\fB\-\-local\-git\fR, you can use \fB\-\-branch\fR or \fB\-\-ref\fR to specify any branch, tag, or commit hash (revision) to use\. When you specify both, only the latter is used\.
40
+ When you specify \fB\-\-git\fR, you can use \fB\-\-branch\fR or \fB\-\-ref\fR to specify any branch, tag, or commit hash (revision) to use\.
41
+ .TP
42
+ \fBbundle plugin install bundler\-graph \-\-path \.\./bundler\-graph\fR
43
+ Install bundler\-graph gem from a local path\.
41
44
  .SS "uninstall"
42
45
  Uninstall the plugin(s) specified in PLUGINS\.
43
46
  .SS "list"
@@ -4,7 +4,8 @@ bundle-plugin(1) -- Manage Bundler plugins
4
4
  ## SYNOPSIS
5
5
 
6
6
  `bundle plugin` install PLUGINS [--source=<SOURCE>] [--version=<version>]
7
- [--git|--local_git=<git-url>] [--branch=<branch>|--ref=<rev>]<br>
7
+ [--git=<git-url>] [--branch=<branch>|--ref=<rev>]
8
+ [--path=<path>]<br>
8
9
  `bundle plugin` uninstall PLUGINS<br>
9
10
  `bundle plugin` list<br>
10
11
  `bundle plugin` help [COMMAND]
@@ -29,14 +30,17 @@ Install the given plugin(s).
29
30
  You can specify the version of the gem via `--version`.
30
31
 
31
32
  * `bundle plugin install bundler-graph --git https://github.com/rubygems/bundler-graph`:
32
- Install bundler-graph gem from Git repository. `--git` can be replaced with `--local-git`. You cannot use both `--git` and `--local-git`. You can use standard Git URLs like:
33
+ Install bundler-graph gem from Git repository. You can use standard Git URLs like:
33
34
 
34
35
  `ssh://[user@]host.xz[:port]/path/to/repo.git`<br>
35
36
  `http[s]://host.xz[:port]/path/to/repo.git`<br>
36
37
  `/path/to/repo`<br>
37
38
  `file:///path/to/repo`
38
39
 
39
- When you specify `--git`/`--local-git`, you can use `--branch` or `--ref` to specify any branch, tag, or commit hash (revision) to use. When you specify both, only the latter is used.
40
+ When you specify `--git`, you can use `--branch` or `--ref` to specify any branch, tag, or commit hash (revision) to use.
41
+
42
+ * `bundle plugin install bundler-graph --path ../bundler-graph`:
43
+ Install bundler-graph gem from a local path.
40
44
 
41
45
  ### uninstall
42
46
 
@@ -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" "December 2023" ""
3
+ .TH "BUNDLE\-PRISTINE" "1" "June 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" "December 2023" ""
3
+ .TH "BUNDLE\-REMOVE" "1" "June 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" "December 2023" ""
3
+ .TH "BUNDLE\-SHOW" "1" "June 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" "December 2023" ""
3
+ .TH "BUNDLE\-UPDATE" "1" "June 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" "December 2023" ""
3
+ .TH "BUNDLE\-VERSION" "1" "June 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" "December 2023" ""
3
+ .TH "BUNDLE\-VIZ" "1" "June 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" "December 2023" ""
3
+ .TH "BUNDLE" "1" "June 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" "December 2023" ""
3
+ .TH "GEMFILE" "5" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
6
6
  .SH "SYNOPSIS"
@@ -72,7 +72,7 @@ A Ruby engine is an implementation of the Ruby language\.
72
72
  .IP "\(bu" 4
73
73
  For background: the reference or original implementation of the Ruby programming language is called Matz's Ruby Interpreter \fIhttps://en\.wikipedia\.org/wiki/Ruby_MRI\fR, or MRI for short\. This is named after Ruby creator Yukihiro Matsumoto, also known as Matz\. MRI is also known as CRuby, because it is written in C\. MRI is the most widely used Ruby engine\.
74
74
  .IP "\(bu" 4
75
- Other implementations \fIhttps://www\.ruby\-lang\.org/en/about/\fR of Ruby exist\. Some of the more well\-known implementations include JRuby \fIhttp://jruby\.org/\fR and TruffleRuby \fIhttps://www\.graalvm\.org/ruby/\fR\. Rubinius is an alternative implementation of Ruby written in Ruby\. JRuby is an implementation of Ruby on the JVM, short for Java Virtual Machine\. TruffleRuby is a Ruby implementation on the GraalVM, a language toolkit built on the JVM\.
75
+ Other implementations \fIhttps://www\.ruby\-lang\.org/en/about/\fR of Ruby exist\. Some of the more well\-known implementations include JRuby \fIhttps://www\.jruby\.org/\fR and TruffleRuby \fIhttps://www\.graalvm\.org/ruby/\fR\. Rubinius is an alternative implementation of Ruby written in Ruby\. JRuby is an implementation of Ruby on the JVM, short for Java Virtual Machine\. TruffleRuby is a Ruby implementation on the GraalVM, a language toolkit built on the JVM\.
76
76
  .IP "" 0
77
77
  .SS "ENGINE VERSION"
78
78
  Each application \fImay\fR specify a Ruby engine version\. If an engine version is specified, an engine \fImust\fR also be specified\. If the engine is "ruby" the engine version specified \fImust\fR match the Ruby version\.
@@ -449,7 +449,7 @@ end
449
449
  .fi
450
450
  .IP "" 0
451
451
  .SH "GEMSPEC"
452
- The \fB\.gemspec\fR \fIhttp://guides\.rubygems\.org/specification\-reference/\fR file is where you provide metadata about your gem to Rubygems\. Some required Gemspec attributes include the name, description, and homepage of your gem\. This is also where you specify the dependencies your gem needs to run\.
452
+ The \fB\.gemspec\fR \fIhttps://guides\.rubygems\.org/specification\-reference/\fR file is where you provide metadata about your gem to Rubygems\. Some required Gemspec attributes include the name, description, and homepage of your gem\. This is also where you specify the dependencies your gem needs to run\.
453
453
  .P
454
454
  If you wish to use Bundler to help install dependencies for a gem while it is being developed, use the \fBgemspec\fR method to pull in the dependencies listed in the \fB\.gemspec\fR file\.
455
455
  .P
@@ -96,7 +96,7 @@ What exactly is an Engine?
96
96
 
97
97
  - [Other implementations](https://www.ruby-lang.org/en/about/) of Ruby exist.
98
98
  Some of the more well-known implementations include
99
- [JRuby](http://jruby.org/) and [TruffleRuby](https://www.graalvm.org/ruby/).
99
+ [JRuby](https://www.jruby.org/) and [TruffleRuby](https://www.graalvm.org/ruby/).
100
100
  Rubinius is an alternative implementation of Ruby written in Ruby.
101
101
  JRuby is an implementation of Ruby on the JVM, short for Java Virtual Machine.
102
102
  TruffleRuby is a Ruby implementation on the GraalVM, a language toolkit built on the JVM.
@@ -509,7 +509,7 @@ software is installed or some other conditions are met.
509
509
 
510
510
  ## GEMSPEC
511
511
 
512
- The [`.gemspec`](http://guides.rubygems.org/specification-reference/) file is where
512
+ The [`.gemspec`](https://guides.rubygems.org/specification-reference/) file is where
513
513
  you provide metadata about your gem to Rubygems. Some required Gemspec
514
514
  attributes include the name, description, and homepage of your gem. This is
515
515
  also where you specify the dependencies your gem needs to run.
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Bundler
4
+ module Plugin
5
+ class Installer
6
+ class Path < Bundler::Source::Path
7
+ def root
8
+ SharedHelpers.in_bundle? ? Bundler.root : Plugin.root
9
+ end
10
+
11
+ def generate_bin(spec, disable_extensions = false)
12
+ # Need to find a way without code duplication
13
+ # For now, we can ignore this
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -10,6 +10,7 @@ module Bundler
10
10
  class Installer
11
11
  autoload :Rubygems, File.expand_path("installer/rubygems", __dir__)
12
12
  autoload :Git, File.expand_path("installer/git", __dir__)
13
+ autoload :Path, File.expand_path("installer/path", __dir__)
13
14
 
14
15
  def install(names, options)
15
16
  check_sources_consistency!(options)
@@ -18,8 +19,8 @@ module Bundler
18
19
 
19
20
  if options[:git]
20
21
  install_git(names, version, options)
21
- elsif options[:local_git]
22
- install_local_git(names, version, options)
22
+ elsif options[:path]
23
+ install_path(names, version, options[:path])
23
24
  else
24
25
  sources = options[:source] || Gem.sources
25
26
  install_rubygems(names, version, sources)
@@ -45,20 +46,40 @@ module Bundler
45
46
  if options.key?(:git) && options.key?(:local_git)
46
47
  raise InvalidOption, "Remote and local plugin git sources can't be both specified"
47
48
  end
49
+
50
+ # back-compat; local_git is an alias for git
51
+ if options.key?(:local_git)
52
+ Bundler::SharedHelpers.major_deprecation(2, "--local_git is deprecated, use --git")
53
+ options[:git] = options.delete(:local_git)
54
+ end
55
+
56
+ if (options.keys & [:source, :git, :path]).length > 1
57
+ raise InvalidOption, "Only one of --source, --git, or --path may be specified"
58
+ end
59
+
60
+ if (options.key?(:branch) || options.key?(:ref)) && !options.key?(:git)
61
+ raise InvalidOption, "--#{options.key?(:branch) ? "branch" : "ref"} can only be used with git sources"
62
+ end
63
+
64
+ if options.key?(:branch) && options.key?(:ref)
65
+ raise InvalidOption, "--branch and --ref can't be both specified"
66
+ end
48
67
  end
49
68
 
50
69
  def install_git(names, version, options)
51
- uri = options.delete(:git)
52
- options["uri"] = uri
70
+ source_list = SourceList.new
71
+ source = source_list.add_git_source({ "uri" => options[:git],
72
+ "branch" => options[:branch],
73
+ "ref" => options[:ref] })
53
74
 
54
- install_all_sources(names, version, options, options[:source])
75
+ install_all_sources(names, version, source_list, source)
55
76
  end
56
77
 
57
- def install_local_git(names, version, options)
58
- uri = options.delete(:local_git)
59
- options["uri"] = uri
78
+ def install_path(names, version, path)
79
+ source_list = SourceList.new
80
+ source = source_list.add_path_source({ "path" => path, "root_path" => SharedHelpers.pwd })
60
81
 
61
- install_all_sources(names, version, options, options[:source])
82
+ install_all_sources(names, version, source_list, source)
62
83
  end
63
84
 
64
85
  # Installs the plugin from rubygems source and returns the path where the
@@ -70,16 +91,15 @@ module Bundler
70
91
  #
71
92
  # @return [Hash] map of names to the specs of plugins installed
72
93
  def install_rubygems(names, version, sources)
73
- install_all_sources(names, version, nil, sources)
74
- end
75
-
76
- def install_all_sources(names, version, git_source_options, rubygems_source)
77
94
  source_list = SourceList.new
78
95
 
79
- source_list.add_git_source(git_source_options) if git_source_options
80
- Array(rubygems_source).each {|remote| source_list.add_global_rubygems_remote(remote) } if rubygems_source
96
+ Array(sources).each {|remote| source_list.add_global_rubygems_remote(remote) }
97
+
98
+ install_all_sources(names, version, source_list)
99
+ end
81
100
 
82
- deps = names.map {|name| Dependency.new name, version }
101
+ def install_all_sources(names, version, source_list, source = nil)
102
+ deps = names.map {|name| Dependency.new(name, version, { "source" => source }) }
83
103
 
84
104
  Bundler.configure_gem_home_and_path(Plugin.root)
85
105
 
@@ -9,6 +9,10 @@ module Bundler
9
9
  add_source_to_list Plugin::Installer::Git.new(options), git_sources
10
10
  end
11
11
 
12
+ def add_path_source(options = {})
13
+ add_source_to_list Plugin::Installer::Path.new(options), path_sources
14
+ end
15
+
12
16
  def add_rubygems_source(options = {})
13
17
  add_source_to_list Plugin::Installer::Rubygems.new(options), @rubygems_sources
14
18
  end
@@ -17,10 +21,6 @@ module Bundler
17
21
  path_sources + git_sources + rubygems_sources + [metadata_source]
18
22
  end
19
23
 
20
- def default_source
21
- git_sources.first || global_rubygems_source
22
- end
23
-
24
24
  private
25
25
 
26
26
  def rubygems_aggregate_class
@@ -30,6 +30,10 @@ module Bundler
30
30
  end.compact
31
31
  end
32
32
 
33
+ def specs_compatible_with(result)
34
+ @base.specs_compatible_with(result)
35
+ end
36
+
33
37
  def [](name)
34
38
  @base[name]
35
39
  end
@@ -15,7 +15,7 @@ module Bundler
15
15
  # considered separately.
16
16
  #
17
17
  # Some candidates may also keep some information explicitly about the
18
- # package the refer to. These candidates are referred to as "canonical" and
18
+ # package they refer to. These candidates are referred to as "canonical" and
19
19
  # are used when materializing resolution results back into RubyGems
20
20
  # specifications that can be installed, written to lock files, and so on.
21
21
  #
@@ -24,10 +24,10 @@ module Bundler
24
24
 
25
25
  attr_reader :version
26
26
 
27
- def initialize(version, specs: [])
28
- @spec_group = Resolver::SpecGroup.new(specs)
27
+ def initialize(version, group: nil, priority: -1)
28
+ @spec_group = group || SpecGroup.new([])
29
29
  @version = Gem::Version.new(version)
30
- @ruby_only = specs.map(&:platform).uniq == [Gem::Platform::RUBY]
30
+ @priority = priority
31
31
  end
32
32
 
33
33
  def dependencies
@@ -40,18 +40,6 @@ module Bundler
40
40
  @spec_group.to_specs(package.force_ruby_platform?)
41
41
  end
42
42
 
43
- def generic!
44
- @ruby_only = true
45
-
46
- self
47
- end
48
-
49
- def platform_specific!
50
- @ruby_only = false
51
-
52
- self
53
- end
54
-
55
43
  def prerelease?
56
44
  @version.prerelease?
57
45
  end
@@ -61,7 +49,7 @@ module Bundler
61
49
  end
62
50
 
63
51
  def sort_obj
64
- [@version, @ruby_only ? -1 : 1]
52
+ [@version, @priority]
65
53
  end
66
54
 
67
55
  def <=>(other)
@@ -25,6 +25,10 @@ module Bundler
25
25
  @prerelease = @dependency.prerelease? || @locked_version&.prerelease? || prerelease ? :consider_first : :ignore
26
26
  end
27
27
 
28
+ def platform_specs(specs)
29
+ platforms.map {|platform| GemHelpers.select_best_platform_match(specs, platform, prefer_locked: !unlock?) }
30
+ end
31
+
28
32
  def to_s
29
33
  @name.delete("\0")
30
34
  end
@@ -3,6 +3,8 @@
3
3
  module Bundler
4
4
  class Resolver
5
5
  class SpecGroup
6
+ attr_reader :specs
7
+
6
8
  def initialize(specs)
7
9
  @specs = specs
8
10
  end
@@ -38,17 +40,33 @@ module Bundler
38
40
  def dependencies
39
41
  @dependencies ||= @specs.map do |spec|
40
42
  __dependencies(spec) + metadata_dependencies(spec)
41
- end.flatten.uniq
43
+ end.flatten.uniq.sort
44
+ end
45
+
46
+ def ==(other)
47
+ sorted_spec_names == other.sorted_spec_names
48
+ end
49
+
50
+ def merge(other)
51
+ return false unless equivalent?(other)
52
+
53
+ @specs |= other.specs
54
+
55
+ true
42
56
  end
43
57
 
44
58
  protected
45
59
 
46
60
  def sorted_spec_names
47
- @sorted_spec_names ||= @specs.map(&:full_name).sort
61
+ @specs.map(&:full_name).sort
48
62
  end
49
63
 
50
64
  private
51
65
 
66
+ def equivalent?(other)
67
+ name == other.name && version == other.version && source == other.source && dependencies == other.dependencies
68
+ end
69
+
52
70
  def exemplary_spec
53
71
  @specs.first
54
72
  end