bundler 2.5.7 → 2.5.8
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/bundler/build_metadata.rb +2 -2
- data/lib/bundler/cli/plugin.rb +2 -1
- data/lib/bundler/gem_version_promoter.rb +42 -38
- data/lib/bundler/man/bundle-add.1 +1 -1
- data/lib/bundler/man/bundle-binstubs.1 +1 -1
- data/lib/bundler/man/bundle-cache.1 +1 -1
- data/lib/bundler/man/bundle-check.1 +1 -1
- data/lib/bundler/man/bundle-clean.1 +1 -1
- data/lib/bundler/man/bundle-config.1 +1 -1
- data/lib/bundler/man/bundle-console.1 +1 -1
- data/lib/bundler/man/bundle-doctor.1 +1 -1
- data/lib/bundler/man/bundle-exec.1 +1 -1
- data/lib/bundler/man/bundle-gem.1 +1 -1
- data/lib/bundler/man/bundle-help.1 +1 -1
- data/lib/bundler/man/bundle-info.1 +1 -1
- data/lib/bundler/man/bundle-init.1 +1 -1
- data/lib/bundler/man/bundle-inject.1 +1 -1
- data/lib/bundler/man/bundle-install.1 +1 -1
- data/lib/bundler/man/bundle-list.1 +1 -1
- data/lib/bundler/man/bundle-lock.1 +1 -1
- data/lib/bundler/man/bundle-open.1 +1 -1
- data/lib/bundler/man/bundle-outdated.1 +1 -1
- data/lib/bundler/man/bundle-platform.1 +1 -1
- data/lib/bundler/man/bundle-plugin.1 +6 -3
- data/lib/bundler/man/bundle-plugin.1.ronn +6 -2
- data/lib/bundler/man/bundle-pristine.1 +1 -1
- data/lib/bundler/man/bundle-remove.1 +1 -1
- data/lib/bundler/man/bundle-show.1 +1 -1
- data/lib/bundler/man/bundle-update.1 +1 -1
- data/lib/bundler/man/bundle-version.1 +1 -1
- data/lib/bundler/man/bundle-viz.1 +1 -1
- data/lib/bundler/man/bundle.1 +1 -1
- data/lib/bundler/man/gemfile.5 +1 -1
- data/lib/bundler/plugin/installer/path.rb +18 -0
- data/lib/bundler/plugin/installer.rb +34 -10
- data/lib/bundler/plugin/source_list.rb +4 -4
- data/lib/bundler/resolver/candidate.rb +1 -1
- data/lib/bundler/resolver.rb +54 -24
- data/lib/bundler/self_manager.rb +1 -1
- data/lib/bundler/source/rubygems.rb +2 -2
- data/lib/bundler/source_list.rb +2 -2
- data/lib/bundler/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5b022aa2fbcb7dc23d00521f4d06a6d47ac0c59fe82da544b25ec46b82d80a3
|
4
|
+
data.tar.gz: 95f43a8fb90cd87a9749746121fe46cdab001476b04c99bdf16ac388912c6bfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5915fb8ba535b49dbe06042a31564614e86928b4d6a75935a7a3aa782ffd713bb1c5f95be3ffc028ae1337367e46e708a9a59d38601a268c54f7814ec0dcea32
|
7
|
+
data.tar.gz: 18300e1cf1066cbbc36cc70822f80a0d46eabd5330b7dadf47993cd00cb1c1762ab663c582a18cec055309d5893ea7a241d7eecd0915654bc2fb5d1c8165b2e7
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
# 2.5.8 (April 11, 2024)
|
2
|
+
|
3
|
+
## Enhancements:
|
4
|
+
|
5
|
+
- Allow installing plugins from path via CLI [#6960](https://github.com/rubygems/rubygems/pull/6960)
|
6
|
+
- Improve validation of `bundle plugin install` options [#7529](https://github.com/rubygems/rubygems/pull/7529)
|
7
|
+
|
8
|
+
## Bug fixes:
|
9
|
+
|
10
|
+
- Fix resolver error message when it runs out of versions due to `--strict --patch` filtering out everything [#7527](https://github.com/rubygems/rubygems/pull/7527)
|
11
|
+
- Fix incorrect `bundle update --bundler` message [#7516](https://github.com/rubygems/rubygems/pull/7516)
|
12
|
+
|
1
13
|
# 2.5.7 (March 22, 2024)
|
2
14
|
|
3
15
|
## Deprecations:
|
@@ -4,8 +4,8 @@ module Bundler
|
|
4
4
|
# Represents metadata from when the Bundler gem was built.
|
5
5
|
module BuildMetadata
|
6
6
|
# begin ivars
|
7
|
-
@built_at = "2024-
|
8
|
-
@git_commit_sha = "
|
7
|
+
@built_at = "2024-04-11".freeze
|
8
|
+
@git_commit_sha = "cf66a7369b".freeze
|
9
9
|
@release = true
|
10
10
|
# end ivars
|
11
11
|
|
data/lib/bundler/cli/plugin.rb
CHANGED
@@ -5,7 +5,7 @@ module Bundler
|
|
5
5
|
class CLI::Plugin < Thor
|
6
6
|
desc "install PLUGINS", "Install the plugin from the source"
|
7
7
|
long_desc <<-D
|
8
|
-
Install plugins either from the rubygems source provided (with --source option)
|
8
|
+
Install plugins either from the rubygems source provided (with --source option), from a git source provided with --git, or a local path provided with --path. If no sources are provided, it uses Gem.sources
|
9
9
|
D
|
10
10
|
method_option "source", type: :string, default: nil, banner: "URL of the RubyGems source to fetch the plugin from"
|
11
11
|
method_option "version", type: :string, default: nil, banner: "The version of the plugin to fetch"
|
@@ -13,6 +13,7 @@ module Bundler
|
|
13
13
|
method_option "local_git", type: :string, default: nil, banner: "Path of the local git repo to fetch from (deprecated)"
|
14
14
|
method_option "branch", type: :string, default: nil, banner: "The git branch to checkout"
|
15
15
|
method_option "ref", type: :string, default: nil, banner: "The git revision to check out"
|
16
|
+
method_option "path", type: :string, default: nil, banner: "Path of a local gem to directly use"
|
16
17
|
def install(*plugins)
|
17
18
|
Bundler::Plugin.install(plugins, options)
|
18
19
|
end
|
@@ -45,17 +45,37 @@ module Bundler
|
|
45
45
|
|
46
46
|
# Given a Resolver::Package and an Array of Specifications of available
|
47
47
|
# versions for a gem, this method will return the Array of Specifications
|
48
|
-
# sorted
|
49
|
-
#
|
50
|
-
#
|
48
|
+
# sorted in an order to give preference to the current level (:major, :minor
|
49
|
+
# or :patch) when resolution is deciding what versions best resolve all
|
50
|
+
# dependencies in the bundle.
|
51
51
|
# @param package [Resolver::Package] The package being resolved.
|
52
52
|
# @param specs [Specification] An array of Specifications for the package.
|
53
|
-
# @return [Specification] A new instance of the Specification Array sorted
|
54
|
-
# possibly filtered.
|
53
|
+
# @return [Specification] A new instance of the Specification Array sorted.
|
55
54
|
def sort_versions(package, specs)
|
56
|
-
|
55
|
+
locked_version = package.locked_version
|
57
56
|
|
58
|
-
|
57
|
+
result = specs.sort do |a, b|
|
58
|
+
unless package.prerelease_specified? || pre?
|
59
|
+
a_pre = a.prerelease?
|
60
|
+
b_pre = b.prerelease?
|
61
|
+
|
62
|
+
next 1 if a_pre && !b_pre
|
63
|
+
next -1 if b_pre && !a_pre
|
64
|
+
end
|
65
|
+
|
66
|
+
if major? || locked_version.nil?
|
67
|
+
b <=> a
|
68
|
+
elsif either_version_older_than_locked?(a, b, locked_version)
|
69
|
+
b <=> a
|
70
|
+
elsif segments_do_not_match?(a, b, :major)
|
71
|
+
a <=> b
|
72
|
+
elsif !minor? && segments_do_not_match?(a, b, :minor)
|
73
|
+
a <=> b
|
74
|
+
else
|
75
|
+
b <=> a
|
76
|
+
end
|
77
|
+
end
|
78
|
+
post_sort(result, package.unlock?, locked_version)
|
59
79
|
end
|
60
80
|
|
61
81
|
# @return [bool] Convenience method for testing value of level variable.
|
@@ -73,9 +93,18 @@ module Bundler
|
|
73
93
|
pre == true
|
74
94
|
end
|
75
95
|
|
76
|
-
|
96
|
+
# Given a Resolver::Package and an Array of Specifications of available
|
97
|
+
# versions for a gem, this method will truncate the Array if strict
|
98
|
+
# is true. That means filtering out downgrades from the version currently
|
99
|
+
# locked, and filtering out upgrades that go past the selected level (major,
|
100
|
+
# minor, or patch).
|
101
|
+
# @param package [Resolver::Package] The package being resolved.
|
102
|
+
# @param specs [Specification] An array of Specifications for the package.
|
103
|
+
# @return [Specification] A new instance of the Specification Array
|
104
|
+
# truncated.
|
105
|
+
def filter_versions(package, specs)
|
106
|
+
return specs unless strict
|
77
107
|
|
78
|
-
def filter_dep_specs(specs, package)
|
79
108
|
locked_version = package.locked_version
|
80
109
|
return specs if locked_version.nil? || major?
|
81
110
|
|
@@ -89,32 +118,7 @@ module Bundler
|
|
89
118
|
end
|
90
119
|
end
|
91
120
|
|
92
|
-
|
93
|
-
locked_version = package.locked_version
|
94
|
-
|
95
|
-
result = specs.sort do |a, b|
|
96
|
-
unless package.prerelease_specified? || pre?
|
97
|
-
a_pre = a.prerelease?
|
98
|
-
b_pre = b.prerelease?
|
99
|
-
|
100
|
-
next -1 if a_pre && !b_pre
|
101
|
-
next 1 if b_pre && !a_pre
|
102
|
-
end
|
103
|
-
|
104
|
-
if major? || locked_version.nil?
|
105
|
-
a <=> b
|
106
|
-
elsif either_version_older_than_locked?(a, b, locked_version)
|
107
|
-
a <=> b
|
108
|
-
elsif segments_do_not_match?(a, b, :major)
|
109
|
-
b <=> a
|
110
|
-
elsif !minor? && segments_do_not_match?(a, b, :minor)
|
111
|
-
b <=> a
|
112
|
-
else
|
113
|
-
a <=> b
|
114
|
-
end
|
115
|
-
end
|
116
|
-
post_sort(result, package.unlock?, locked_version)
|
117
|
-
end
|
121
|
+
private
|
118
122
|
|
119
123
|
def either_version_older_than_locked?(a, b, locked_version)
|
120
124
|
a.version < locked_version || b.version < locked_version
|
@@ -133,13 +137,13 @@ module Bundler
|
|
133
137
|
if unlock || locked_version.nil?
|
134
138
|
result
|
135
139
|
else
|
136
|
-
|
140
|
+
move_version_to_beginning(result, locked_version)
|
137
141
|
end
|
138
142
|
end
|
139
143
|
|
140
|
-
def
|
144
|
+
def move_version_to_beginning(result, version)
|
141
145
|
move, keep = result.partition {|s| s.version.to_s == version.to_s }
|
142
|
-
|
146
|
+
move.concat(keep)
|
143
147
|
end
|
144
148
|
end
|
145
149
|
end
|
@@ -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" "
|
3
|
+
.TH "BUNDLE\-BINSTUBS" "1" "March 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" "
|
3
|
+
.TH "BUNDLE\-CACHE" "1" "March 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" "
|
3
|
+
.TH "BUNDLE\-CHECK" "1" "March 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" "
|
3
|
+
.TH "BUNDLE\-CLEAN" "1" "March 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\-CONSOLE" "1" "
|
3
|
+
.TH "BUNDLE\-CONSOLE" "1" "March 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\-EXEC" "1" "
|
3
|
+
.TH "BUNDLE\-EXEC" "1" "March 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" "
|
3
|
+
.TH "BUNDLE\-GEM" "1" "March 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\-INFO" "1" "
|
3
|
+
.TH "BUNDLE\-INFO" "1" "March 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" "
|
3
|
+
.TH "BUNDLE\-INIT" "1" "March 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" "
|
3
|
+
.TH "BUNDLE\-INJECT" "1" "March 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" "
|
3
|
+
.TH "BUNDLE\-INSTALL" "1" "March 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\-LOCK" "1" "
|
3
|
+
.TH "BUNDLE\-LOCK" "1" "March 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" "
|
3
|
+
.TH "BUNDLE\-OPEN" "1" "March 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" "
|
3
|
+
.TH "BUNDLE\-OUTDATED" "1" "March 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" "
|
3
|
+
.TH "BUNDLE\-PLATFORM" "1" "March 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" "
|
3
|
+
.TH "BUNDLE\-PLUGIN" "1" "March 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=\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
|
@@ -37,7 +37,10 @@ Install bundler\-graph gem from Git repository\. You can use standard Git URLs l
|
|
37
37
|
.br
|
38
38
|
\fBfile:///path/to/repo\fR
|
39
39
|
.IP
|
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\.
|
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=<git-url>] [--branch=<branch>|--ref=<rev>]
|
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]
|
@@ -36,7 +37,10 @@ Install the given plugin(s).
|
|
36
37
|
`/path/to/repo`<br>
|
37
38
|
`file:///path/to/repo`
|
38
39
|
|
39
|
-
When you specify `--git`, you can use `--branch` or `--ref` to specify any branch, tag, or commit hash (revision) to use.
|
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" "
|
3
|
+
.TH "BUNDLE\-PRISTINE" "1" "March 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\-SHOW" "1" "
|
3
|
+
.TH "BUNDLE\-SHOW" "1" "March 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" "
|
3
|
+
.TH "BUNDLE\-UPDATE" "1" "March 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\-VIZ" "1" "
|
3
|
+
.TH "BUNDLE\-VIZ" "1" "March 2024" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-viz\fR \- Generates a visual dependency graph for your Gemfile
|
6
6
|
.SH "SYNOPSIS"
|
data/lib/bundler/man/bundle.1
CHANGED
data/lib/bundler/man/gemfile.5
CHANGED
@@ -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
|
+
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,6 +19,8 @@ module Bundler
|
|
18
19
|
|
19
20
|
if options[:git]
|
20
21
|
install_git(names, version, options)
|
22
|
+
elsif options[:path]
|
23
|
+
install_path(names, version, options[:path])
|
21
24
|
else
|
22
25
|
sources = options[:source] || Gem.sources
|
23
26
|
install_rubygems(names, version, sources)
|
@@ -43,18 +46,40 @@ module Bundler
|
|
43
46
|
if options.key?(:git) && options.key?(:local_git)
|
44
47
|
raise InvalidOption, "Remote and local plugin git sources can't be both specified"
|
45
48
|
end
|
49
|
+
|
46
50
|
# back-compat; local_git is an alias for git
|
47
51
|
if options.key?(:local_git)
|
48
52
|
Bundler::SharedHelpers.major_deprecation(2, "--local_git is deprecated, use --git")
|
49
53
|
options[:git] = options.delete(:local_git)
|
50
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
|
51
67
|
end
|
52
68
|
|
53
69
|
def install_git(names, version, options)
|
54
|
-
|
55
|
-
|
70
|
+
source_list = SourceList.new
|
71
|
+
source = source_list.add_git_source({ "uri" => options[:git],
|
72
|
+
"branch" => options[:branch],
|
73
|
+
"ref" => options[:ref] })
|
56
74
|
|
57
|
-
install_all_sources(names, version,
|
75
|
+
install_all_sources(names, version, source_list, source)
|
76
|
+
end
|
77
|
+
|
78
|
+
def install_path(names, version, path)
|
79
|
+
source_list = SourceList.new
|
80
|
+
source = source_list.add_path_source({ "path" => path })
|
81
|
+
|
82
|
+
install_all_sources(names, version, source_list, source)
|
58
83
|
end
|
59
84
|
|
60
85
|
# Installs the plugin from rubygems source and returns the path where the
|
@@ -66,16 +91,15 @@ module Bundler
|
|
66
91
|
#
|
67
92
|
# @return [Hash] map of names to the specs of plugins installed
|
68
93
|
def install_rubygems(names, version, sources)
|
69
|
-
install_all_sources(names, version, nil, sources)
|
70
|
-
end
|
71
|
-
|
72
|
-
def install_all_sources(names, version, git_source_options, rubygems_source)
|
73
94
|
source_list = SourceList.new
|
74
95
|
|
75
|
-
source_list.
|
76
|
-
|
96
|
+
Array(sources).each {|remote| source_list.add_global_rubygems_remote(remote) }
|
97
|
+
|
98
|
+
install_all_sources(names, version, source_list)
|
99
|
+
end
|
77
100
|
|
78
|
-
|
101
|
+
def install_all_sources(names, version, source_list, source = nil)
|
102
|
+
deps = names.map {|name| Dependency.new(name, version, { "source" => source }) }
|
79
103
|
|
80
104
|
Bundler.configure_gem_home_and_path(Plugin.root)
|
81
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
|
@@ -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
|
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
|
#
|
data/lib/bundler/resolver.rb
CHANGED
@@ -50,26 +50,26 @@ module Bundler
|
|
50
50
|
specs[name] = matches.sort_by {|s| [s.version, s.platform.to_s] }
|
51
51
|
end
|
52
52
|
|
53
|
+
@all_versions = Hash.new do |candidates, package|
|
54
|
+
candidates[package] = all_versions_for(package)
|
55
|
+
end
|
56
|
+
|
53
57
|
@sorted_versions = Hash.new do |candidates, package|
|
54
|
-
candidates[package] =
|
55
|
-
[root_version]
|
56
|
-
else
|
57
|
-
all_versions_for(package).sort
|
58
|
-
end
|
58
|
+
candidates[package] = filtered_versions_for(package).sort
|
59
59
|
end
|
60
60
|
|
61
|
+
@sorted_versions[root] = [root_version]
|
62
|
+
|
61
63
|
root_dependencies = prepare_dependencies(@requirements, @packages)
|
62
64
|
|
63
65
|
@cached_dependencies = Hash.new do |dependencies, package|
|
64
|
-
dependencies[package] =
|
65
|
-
{
|
66
|
-
else
|
67
|
-
Hash.new do |versions, version|
|
68
|
-
versions[version] = to_dependency_hash(version.dependencies.reject {|d| d.name == package.name }, @packages)
|
69
|
-
end
|
66
|
+
dependencies[package] = Hash.new do |versions, version|
|
67
|
+
versions[version] = to_dependency_hash(version.dependencies.reject {|d| d.name == package.name }, @packages)
|
70
68
|
end
|
71
69
|
end
|
72
70
|
|
71
|
+
@cached_dependencies[root] = { root_version => root_dependencies }
|
72
|
+
|
73
73
|
logger = Bundler::UI::Shell.new
|
74
74
|
logger.level = debug? ? "debug" : "warn"
|
75
75
|
|
@@ -156,9 +156,15 @@ module Bundler
|
|
156
156
|
end
|
157
157
|
|
158
158
|
def versions_for(package, range=VersionRange.any)
|
159
|
-
versions =
|
159
|
+
versions = select_sorted_versions(package, range)
|
160
160
|
|
161
|
-
|
161
|
+
# Conditional avoids (among other things) calling
|
162
|
+
# sort_versions_by_preferred with the root package
|
163
|
+
if versions.size > 1
|
164
|
+
sort_versions_by_preferred(package, versions)
|
165
|
+
else
|
166
|
+
versions
|
167
|
+
end
|
162
168
|
end
|
163
169
|
|
164
170
|
def no_versions_incompatibility_for(package, unsatisfied_term)
|
@@ -247,7 +253,7 @@ module Bundler
|
|
247
253
|
locked_requirement = base_requirements[name]
|
248
254
|
results = filter_matching_specs(results, locked_requirement) if locked_requirement
|
249
255
|
|
250
|
-
|
256
|
+
results.group_by(&:version).reduce([]) do |groups, (version, specs)|
|
251
257
|
platform_specs = package.platforms.map {|platform| select_best_platform_match(specs, platform) }
|
252
258
|
|
253
259
|
# If package is a top-level dependency,
|
@@ -274,8 +280,6 @@ module Bundler
|
|
274
280
|
|
275
281
|
groups
|
276
282
|
end
|
277
|
-
|
278
|
-
sort_versions(package, versions)
|
279
283
|
end
|
280
284
|
|
281
285
|
def source_for(name)
|
@@ -334,6 +338,21 @@ module Bundler
|
|
334
338
|
|
335
339
|
private
|
336
340
|
|
341
|
+
def filtered_versions_for(package)
|
342
|
+
@gem_version_promoter.filter_versions(package, @all_versions[package])
|
343
|
+
end
|
344
|
+
|
345
|
+
def raise_all_versions_filtered_out!(package)
|
346
|
+
level = @gem_version_promoter.level
|
347
|
+
name = package.name
|
348
|
+
locked_version = package.locked_version
|
349
|
+
requirement = package.dependency
|
350
|
+
|
351
|
+
raise GemNotFound,
|
352
|
+
"#{name} is locked to #{locked_version}, while Gemfile is requesting #{requirement}. " \
|
353
|
+
"--strict --#{level} was specified, but there are no #{level} level upgrades from #{locked_version} satisfying #{requirement}, so version solving has failed"
|
354
|
+
end
|
355
|
+
|
337
356
|
def filter_matching_specs(specs, requirements)
|
338
357
|
Array(requirements).flat_map do |requirement|
|
339
358
|
specs.select {| spec| requirement_satisfied_by?(requirement, spec) }
|
@@ -357,12 +376,8 @@ module Bundler
|
|
357
376
|
requirement.satisfied_by?(spec.version) || spec.source.is_a?(Source::Gemspec)
|
358
377
|
end
|
359
378
|
|
360
|
-
def
|
361
|
-
|
362
|
-
@gem_version_promoter.sort_versions(package, versions).reverse
|
363
|
-
else
|
364
|
-
versions
|
365
|
-
end
|
379
|
+
def sort_versions_by_preferred(package, versions)
|
380
|
+
@gem_version_promoter.sort_versions(package, versions)
|
366
381
|
end
|
367
382
|
|
368
383
|
def repository_for(package)
|
@@ -379,12 +394,19 @@ module Bundler
|
|
379
394
|
|
380
395
|
next [dep_package, dep_constraint] if name == "bundler"
|
381
396
|
|
382
|
-
|
397
|
+
dep_range = dep_constraint.range
|
398
|
+
versions = select_sorted_versions(dep_package, dep_range)
|
383
399
|
if versions.empty? && dep_package.ignores_prereleases?
|
400
|
+
@all_versions.delete(dep_package)
|
384
401
|
@sorted_versions.delete(dep_package)
|
385
402
|
dep_package.consider_prereleases!
|
386
|
-
versions =
|
403
|
+
versions = select_sorted_versions(dep_package, dep_range)
|
387
404
|
end
|
405
|
+
|
406
|
+
if versions.empty? && select_all_versions(dep_package, dep_range).any?
|
407
|
+
raise_all_versions_filtered_out!(dep_package)
|
408
|
+
end
|
409
|
+
|
388
410
|
next [dep_package, dep_constraint] unless versions.empty?
|
389
411
|
|
390
412
|
next unless dep_package.current_platform?
|
@@ -393,6 +415,14 @@ module Bundler
|
|
393
415
|
end.compact.to_h
|
394
416
|
end
|
395
417
|
|
418
|
+
def select_sorted_versions(package, range)
|
419
|
+
range.select_versions(@sorted_versions[package])
|
420
|
+
end
|
421
|
+
|
422
|
+
def select_all_versions(package, range)
|
423
|
+
range.select_versions(@all_versions[package])
|
424
|
+
end
|
425
|
+
|
396
426
|
def other_specs_matching_message(specs, requirement)
|
397
427
|
message = String.new("The source contains the following gems matching '#{requirement}':\n")
|
398
428
|
message << specs.map {|s| " * #{s.full_name}" }.join("\n")
|
data/lib/bundler/self_manager.rb
CHANGED
@@ -113,7 +113,7 @@ module Bundler
|
|
113
113
|
end
|
114
114
|
|
115
115
|
def local_specs
|
116
|
-
@local_specs ||= Bundler::Source::Rubygems.new("allow_local" => true).specs.select {|spec| spec.name == "bundler" }
|
116
|
+
@local_specs ||= Bundler::Source::Rubygems.new("allow_local" => true, "allow_cached" => true).specs.select {|spec| spec.name == "bundler" }
|
117
117
|
end
|
118
118
|
|
119
119
|
def remote_specs
|
@@ -17,7 +17,7 @@ module Bundler
|
|
17
17
|
@remotes = []
|
18
18
|
@dependency_names = []
|
19
19
|
@allow_remote = false
|
20
|
-
@allow_cached = false
|
20
|
+
@allow_cached = options["allow_cached"] || false
|
21
21
|
@allow_local = options["allow_local"] || false
|
22
22
|
@checksum_store = Checksum::Store.new
|
23
23
|
|
@@ -133,7 +133,7 @@ module Bundler
|
|
133
133
|
# sources, and large_idx.merge! small_idx is way faster than
|
134
134
|
# small_idx.merge! large_idx.
|
135
135
|
index = @allow_remote ? remote_specs.dup : Index.new
|
136
|
-
index.merge!(cached_specs) if @allow_cached
|
136
|
+
index.merge!(cached_specs) if @allow_cached
|
137
137
|
index.merge!(installed_specs) if @allow_local
|
138
138
|
index
|
139
139
|
end
|
data/lib/bundler/source_list.rb
CHANGED
@@ -9,7 +9,7 @@ module Bundler
|
|
9
9
|
:metadata_source
|
10
10
|
|
11
11
|
def global_rubygems_source
|
12
|
-
@global_rubygems_source ||= rubygems_aggregate_class.new("allow_local" => true)
|
12
|
+
@global_rubygems_source ||= rubygems_aggregate_class.new("allow_local" => true, "allow_cached" => true)
|
13
13
|
end
|
14
14
|
|
15
15
|
def initialize
|
@@ -174,7 +174,7 @@ module Bundler
|
|
174
174
|
replacement_source = replacement_sources.find {|s| s == global_rubygems_source }
|
175
175
|
return global_rubygems_source unless replacement_source
|
176
176
|
|
177
|
-
replacement_source.
|
177
|
+
replacement_source.cached!
|
178
178
|
replacement_source
|
179
179
|
end
|
180
180
|
|
data/lib/bundler/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- André Arko
|
@@ -22,7 +22,7 @@ authors:
|
|
22
22
|
autorequire:
|
23
23
|
bindir: exe
|
24
24
|
cert_chain: []
|
25
|
-
date: 2024-
|
25
|
+
date: 2024-04-11 00:00:00.000000000 Z
|
26
26
|
dependencies: []
|
27
27
|
description: Bundler manages an application's dependencies through its entire life,
|
28
28
|
across many machines, systematically and repeatably
|
@@ -189,6 +189,7 @@ files:
|
|
189
189
|
- lib/bundler/plugin/index.rb
|
190
190
|
- lib/bundler/plugin/installer.rb
|
191
191
|
- lib/bundler/plugin/installer/git.rb
|
192
|
+
- lib/bundler/plugin/installer/path.rb
|
192
193
|
- lib/bundler/plugin/installer/rubygems.rb
|
193
194
|
- lib/bundler/plugin/source_list.rb
|
194
195
|
- lib/bundler/process_lock.rb
|
@@ -398,7 +399,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
398
399
|
- !ruby/object:Gem::Version
|
399
400
|
version: 3.2.3
|
400
401
|
requirements: []
|
401
|
-
rubygems_version: 3.5.
|
402
|
+
rubygems_version: 3.5.8
|
402
403
|
signing_key:
|
403
404
|
specification_version: 4
|
404
405
|
summary: The best way to manage your application's dependencies
|