rubygems-update 3.3.20 → 3.3.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/Manifest.txt +4 -1
- data/bundler/CHANGELOG.md +23 -0
- data/bundler/UPGRADING.md +11 -4
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli/platform.rb +1 -1
- data/bundler/lib/bundler/definition.rb +27 -22
- data/bundler/lib/bundler/endpoint_specification.rb +1 -12
- data/bundler/lib/bundler/gem_version_promoter.rb +4 -0
- data/bundler/lib/bundler/inline.rb +1 -1
- data/bundler/lib/bundler/installer.rb +6 -11
- data/bundler/lib/bundler/lazy_specification.rb +2 -4
- data/bundler/lib/bundler/man/bundle-add.1 +1 -1
- data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
- data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
- data/bundler/lib/bundler/man/bundle-check.1 +1 -1
- data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
- data/bundler/lib/bundler/man/bundle-config.1 +11 -2
- data/bundler/lib/bundler/man/bundle-config.1.ronn +4 -1
- data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
- data/bundler/lib/bundler/man/bundle-exec.1 +1 -1
- data/bundler/lib/bundler/man/bundle-gem.1 +1 -1
- data/bundler/lib/bundler/man/bundle-info.1 +1 -1
- data/bundler/lib/bundler/man/bundle-init.1 +1 -1
- data/bundler/lib/bundler/man/bundle-inject.1 +1 -1
- data/bundler/lib/bundler/man/bundle-install.1 +1 -1
- data/bundler/lib/bundler/man/bundle-list.1 +1 -1
- data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
- data/bundler/lib/bundler/man/bundle-open.1 +1 -1
- data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
- data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
- data/bundler/lib/bundler/man/bundle-plugin.1 +81 -0
- data/bundler/lib/bundler/man/bundle-plugin.1.ronn +59 -0
- data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
- data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
- data/bundler/lib/bundler/man/bundle-show.1 +1 -1
- data/bundler/lib/bundler/man/bundle-update.1 +1 -1
- data/bundler/lib/bundler/man/bundle-viz.1 +1 -1
- data/bundler/lib/bundler/man/bundle.1 +5 -1
- data/bundler/lib/bundler/man/bundle.1.ronn +3 -0
- data/bundler/lib/bundler/man/gemfile.5 +1 -1
- data/bundler/lib/bundler/man/index.txt +1 -0
- data/bundler/lib/bundler/match_metadata.rb +13 -0
- data/bundler/lib/bundler/match_remote_metadata.rb +26 -0
- data/bundler/lib/bundler/plugin.rb +2 -0
- data/bundler/lib/bundler/remote_specification.rb +1 -7
- data/bundler/lib/bundler/resolver/spec_group.rb +11 -8
- data/bundler/lib/bundler/resolver.rb +39 -17
- data/bundler/lib/bundler/rubygems_ext.rb +28 -0
- data/bundler/lib/bundler/spec_set.rb +19 -9
- data/bundler/lib/bundler/version.rb +1 -1
- data/bundler/lib/bundler.rb +3 -4
- data/lib/rubygems/platform.rb +16 -5
- data/lib/rubygems.rb +1 -1
- data/rubygems-update.gemspec +1 -1
- data/test/rubygems/test_gem_ext_cargo_builder/custom_name/Cargo.lock +4 -4
- data/test/rubygems/test_gem_ext_cargo_builder/custom_name/Cargo.toml +1 -1
- data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.lock +4 -4
- data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.toml +1 -1
- data/test/rubygems/test_gem_platform.rb +41 -2
- data/test/rubygems/test_gem_resolver.rb +37 -3
- metadata +7 -4
- data/bundler/lib/bundler/incomplete_specification.rb +0 -12
@@ -0,0 +1,59 @@
|
|
1
|
+
bundle-plugin(1) -- Manage Bundler plugins
|
2
|
+
==========================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bundle plugin` install PLUGINS [--source=<SOURCE>] [--version=<version>]
|
7
|
+
[--git|--local_git=<git-url>] [--branch=<branch>|--ref=<rev>]<br>
|
8
|
+
`bundle plugin` uninstall PLUGINS<br>
|
9
|
+
`bundle plugin` list<br>
|
10
|
+
`bundle plugin` help [COMMAND]
|
11
|
+
|
12
|
+
## DESCRIPTION
|
13
|
+
|
14
|
+
You can install, uninstall, and list plugin(s) with this command to extend functionalities of Bundler.
|
15
|
+
|
16
|
+
## SUB-COMMANDS
|
17
|
+
|
18
|
+
### install
|
19
|
+
|
20
|
+
Install the given plugin(s).
|
21
|
+
|
22
|
+
* `bundle plugin install bundler-graph`:
|
23
|
+
Install bundler-graph gem from RubyGems.org. The global source, specified in source in Gemfile is ignored.
|
24
|
+
|
25
|
+
* `bundle plugin install bundler-graph --source https://example.com`:
|
26
|
+
Install bundler-graph gem from example.com. The global source, specified in source in Gemfile is not considered.
|
27
|
+
|
28
|
+
* `bundle plugin install bundler-graph --version 0.2.1`:
|
29
|
+
You can specify the version of the gem via `--version`.
|
30
|
+
|
31
|
+
* `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
|
+
|
34
|
+
* `ssh://[user@]host.xz[:port]/path/to/repo.git`
|
35
|
+
* `http[s]://host.xz[:port]/path/to/repo.git`
|
36
|
+
* `/path/to/repo`
|
37
|
+
* `file:///path/to/repo`
|
38
|
+
|
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
|
+
|
41
|
+
### uninstall
|
42
|
+
|
43
|
+
Uninstall the plugin(s) specified in PLUGINS.
|
44
|
+
|
45
|
+
### list
|
46
|
+
|
47
|
+
List the installed plugins and available commands.
|
48
|
+
|
49
|
+
No options.
|
50
|
+
|
51
|
+
### help
|
52
|
+
|
53
|
+
Describe subcommands or one specific subcommand.
|
54
|
+
|
55
|
+
No options.
|
56
|
+
|
57
|
+
## SEE ALSO
|
58
|
+
|
59
|
+
* [How to write a Bundler plugin](https://bundler.io/guides/bundler_plugins.html)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-PRISTINE" "1" "
|
4
|
+
.TH "BUNDLE\-PRISTINE" "1" "August 2022" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-pristine\fR \- Restores installed gems to their pristine condition
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-SHOW" "1" "
|
4
|
+
.TH "BUNDLE\-SHOW" "1" "August 2022" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-UPDATE" "1" "
|
4
|
+
.TH "BUNDLE\-UPDATE" "1" "August 2022" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-update\fR \- Update your gems to the latest available versions
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE" "1" "
|
4
|
+
.TH "BUNDLE" "1" "August 2022" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\fR \- Ruby Dependency Management
|
@@ -120,6 +120,10 @@ Display warnings about common problems
|
|
120
120
|
\fBbundle remove(1)\fR \fIbundle\-remove\.1\.html\fR
|
121
121
|
Removes gems from the Gemfile
|
122
122
|
.
|
123
|
+
.TP
|
124
|
+
\fBbundle plugin(1)\fR \fIbundle\-plugin\.1\.html\fR
|
125
|
+
Manage Bundler plugins
|
126
|
+
.
|
123
127
|
.SH "PLUGINS"
|
124
128
|
When running a command that isn\'t listed in PRIMARY COMMANDS or UTILITIES, Bundler will try to find an executable on your path named \fBbundler\-<command>\fR and execute it, passing down any extra arguments to it\.
|
125
129
|
.
|
@@ -97,6 +97,9 @@ We divide `bundle` subcommands into primary commands and utilities:
|
|
97
97
|
* [`bundle remove(1)`](bundle-remove.1.html):
|
98
98
|
Removes gems from the Gemfile
|
99
99
|
|
100
|
+
* [`bundle plugin(1)`](bundle-plugin.1.html):
|
101
|
+
Manage Bundler plugins
|
102
|
+
|
100
103
|
## PLUGINS
|
101
104
|
|
102
105
|
When running a command that isn't listed in PRIMARY COMMANDS or UTILITIES,
|
@@ -18,6 +18,7 @@ bundle-lock(1) bundle-lock.1
|
|
18
18
|
bundle-open(1) bundle-open.1
|
19
19
|
bundle-outdated(1) bundle-outdated.1
|
20
20
|
bundle-platform(1) bundle-platform.1
|
21
|
+
bundle-plugin(1) bundle-plugin.1
|
21
22
|
bundle-pristine(1) bundle-pristine.1
|
22
23
|
bundle-remove(1) bundle-remove.1
|
23
24
|
bundle-show(1) bundle-show.1
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Bundler
|
4
|
+
module MatchMetadata
|
5
|
+
def matches_current_ruby?
|
6
|
+
@required_ruby_version.satisfied_by?(Gem.ruby_version)
|
7
|
+
end
|
8
|
+
|
9
|
+
def matches_current_rubygems?
|
10
|
+
@required_rubygems_version.satisfied_by?(Gem.rubygems_version)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Bundler
|
4
|
+
module FetchMetadata
|
5
|
+
def matches_current_ruby?
|
6
|
+
@required_ruby_version ||= _remote_specification.required_ruby_version
|
7
|
+
|
8
|
+
super
|
9
|
+
end
|
10
|
+
|
11
|
+
def matches_current_rubygems?
|
12
|
+
# A fallback is included because the original version of the specification
|
13
|
+
# API didn't include that field, so some marshalled specs in the index have it
|
14
|
+
# set to +nil+.
|
15
|
+
@required_rubygems_version ||= _remote_specification.required_rubygems_version || Gem::Requirement.default
|
16
|
+
|
17
|
+
super
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
module MatchRemoteMetadata
|
22
|
+
include MatchMetadata
|
23
|
+
|
24
|
+
prepend FetchMetadata
|
25
|
+
end
|
26
|
+
end
|
@@ -36,6 +36,8 @@ module Bundler
|
|
36
36
|
# @param [Hash] options various parameters as described in description.
|
37
37
|
# Refer to cli/plugin for available options
|
38
38
|
def install(names, options)
|
39
|
+
raise InvalidOption, "You cannot specify `--branch` and `--ref` at the same time." if options["branch"] && options["ref"]
|
40
|
+
|
39
41
|
specs = Installer.new.install(names, options)
|
40
42
|
|
41
43
|
save_plugins names, specs
|
@@ -6,6 +6,7 @@ module Bundler
|
|
6
6
|
# be seeded with what we're given from the source's abbreviated index - the
|
7
7
|
# full specification will only be fetched when necessary.
|
8
8
|
class RemoteSpecification
|
9
|
+
include MatchRemoteMetadata
|
9
10
|
include MatchPlatform
|
10
11
|
include Comparable
|
11
12
|
|
@@ -28,13 +29,6 @@ module Bundler
|
|
28
29
|
@platform = _remote_specification.platform
|
29
30
|
end
|
30
31
|
|
31
|
-
# A fallback is included because the original version of the specification
|
32
|
-
# API didn't include that field, so some marshalled specs in the index have it
|
33
|
-
# set to +nil+.
|
34
|
-
def required_rubygems_version
|
35
|
-
@required_rubygems_version ||= _remote_specification.required_rubygems_version || Gem::Requirement.default
|
36
|
-
end
|
37
|
-
|
38
32
|
def full_name
|
39
33
|
if @original_platform == Gem::Platform::RUBY
|
40
34
|
"#{@name}-#{@version}"
|
@@ -97,14 +97,17 @@ module Bundler
|
|
97
97
|
def metadata_dependencies(platform)
|
98
98
|
spec = @specs[platform].first
|
99
99
|
return [] if spec.is_a?(LazySpecification)
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
100
|
+
|
101
|
+
[
|
102
|
+
metadata_dependency("Ruby", spec.required_ruby_version, platform),
|
103
|
+
metadata_dependency("RubyGems", spec.required_rubygems_version, platform),
|
104
|
+
].compact
|
105
|
+
end
|
106
|
+
|
107
|
+
def metadata_dependency(name, requirement, platform)
|
108
|
+
return if requirement.nil? || requirement.none?
|
109
|
+
|
110
|
+
DepProxy.get_proxy(Dependency.new("#{name}\0", requirement), platform)
|
108
111
|
end
|
109
112
|
end
|
110
113
|
end
|
@@ -7,6 +7,8 @@ module Bundler
|
|
7
7
|
|
8
8
|
include GemHelpers
|
9
9
|
|
10
|
+
attr_writer :platforms
|
11
|
+
|
10
12
|
# Figures out the best possible configuration of gems that satisfies
|
11
13
|
# the list of passed dependencies and any child dependencies without
|
12
14
|
# causing any gem activation errors.
|
@@ -19,41 +21,48 @@ module Bundler
|
|
19
21
|
# collection of gemspecs is returned. Otherwise, nil is returned.
|
20
22
|
def self.resolve(requirements, source_requirements = {}, base = [], gem_version_promoter = GemVersionPromoter.new, additional_base_requirements = [], platforms = nil)
|
21
23
|
base = SpecSet.new(base) unless base.is_a?(SpecSet)
|
22
|
-
|
23
|
-
resolver
|
24
|
-
result = resolver.start(requirements)
|
25
|
-
SpecSet.new(SpecSet.new(result).for(regular_requirements, false, platforms))
|
24
|
+
resolver = new(source_requirements, base, gem_version_promoter, additional_base_requirements, platforms)
|
25
|
+
resolver.start(requirements)
|
26
26
|
end
|
27
27
|
|
28
|
-
def initialize(source_requirements, base, gem_version_promoter, additional_base_requirements, platforms
|
28
|
+
def initialize(source_requirements, base, gem_version_promoter, additional_base_requirements, platforms)
|
29
29
|
@source_requirements = source_requirements
|
30
|
-
@metadata_requirements = metadata_requirements
|
31
30
|
@base = base
|
32
31
|
@resolver = Molinillo::Resolver.new(self, self)
|
32
|
+
@results_for = {}
|
33
33
|
@search_for = {}
|
34
|
-
@
|
35
|
-
|
36
|
-
dep = Dependency.new(ls.name, ls.version)
|
37
|
-
@base_dg.add_vertex(ls.name, DepProxy.get_proxy(dep, ls.platform), true)
|
38
|
-
end
|
39
|
-
additional_base_requirements.each {|d| @base_dg.add_vertex(d.name, d) }
|
40
|
-
@platforms = platforms.reject {|p| p != Gem::Platform::RUBY && (platforms - [p]).any? {|pl| generic(pl) == p } }
|
34
|
+
@additional_base_requirements = additional_base_requirements
|
35
|
+
@platforms = platforms
|
41
36
|
@resolving_only_for_ruby = platforms == [Gem::Platform::RUBY]
|
42
37
|
@gem_version_promoter = gem_version_promoter
|
43
38
|
@use_gvp = Bundler.feature_flag.use_gem_version_promoter_for_major_updates? || !@gem_version_promoter.major?
|
44
39
|
end
|
45
40
|
|
46
|
-
def start(requirements)
|
41
|
+
def start(requirements, exclude_specs: [])
|
42
|
+
@metadata_requirements, regular_requirements = requirements.partition {|dep| dep.name.end_with?("\0") }
|
43
|
+
|
44
|
+
exclude_specs.each do |spec|
|
45
|
+
remove_from_candidates(spec)
|
46
|
+
end
|
47
|
+
|
48
|
+
@base_dg = Molinillo::DependencyGraph.new
|
49
|
+
@base.each do |ls|
|
50
|
+
dep = Dependency.new(ls.name, ls.version)
|
51
|
+
@base_dg.add_vertex(ls.name, DepProxy.get_proxy(dep, ls.platform), true)
|
52
|
+
end
|
53
|
+
@additional_base_requirements.each {|d| @base_dg.add_vertex(d.name, d) }
|
54
|
+
|
47
55
|
@gem_version_promoter.prerelease_specified = @prerelease_specified = {}
|
48
56
|
requirements.each {|dep| @prerelease_specified[dep.name] ||= dep.prerelease? }
|
49
57
|
|
50
58
|
verify_gemfile_dependencies_are_found!(requirements)
|
51
|
-
|
52
|
-
dg.
|
59
|
+
result = @resolver.resolve(requirements, @base_dg).
|
53
60
|
map(&:payload).
|
54
61
|
reject {|sg| sg.name.end_with?("\0") }.
|
55
62
|
map(&:to_specs).
|
56
63
|
flatten
|
64
|
+
|
65
|
+
SpecSet.new(SpecSet.new(result).for(regular_requirements, false, @platforms))
|
57
66
|
rescue Molinillo::VersionConflict => e
|
58
67
|
message = version_conflict_message(e)
|
59
68
|
raise VersionConflict.new(e.conflicts.keys.uniq, message)
|
@@ -177,7 +186,7 @@ module Bundler
|
|
177
186
|
end
|
178
187
|
|
179
188
|
def results_for(dependency)
|
180
|
-
index_for(dependency).search(dependency)
|
189
|
+
@results_for[dependency] ||= index_for(dependency).search(dependency)
|
181
190
|
end
|
182
191
|
|
183
192
|
def name_for(dependency)
|
@@ -228,6 +237,19 @@ module Bundler
|
|
228
237
|
|
229
238
|
private
|
230
239
|
|
240
|
+
def remove_from_candidates(spec)
|
241
|
+
@base.delete(spec)
|
242
|
+
@gem_version_promoter.reset
|
243
|
+
|
244
|
+
@results_for.keys.each do |dep|
|
245
|
+
next unless dep.name == spec.name
|
246
|
+
|
247
|
+
@results_for[dep].reject {|s| s.name == spec.name && s.version == spec.version }
|
248
|
+
end
|
249
|
+
|
250
|
+
@search_for = {}
|
251
|
+
end
|
252
|
+
|
231
253
|
# returns an integer \in (-\infty, 0]
|
232
254
|
# a number closer to 0 means the dependency is less constraining
|
233
255
|
#
|
@@ -15,6 +15,7 @@ require "rubygems/specification"
|
|
15
15
|
# `Gem::Source` from the redefined `Gem::Specification#source`.
|
16
16
|
require "rubygems/source"
|
17
17
|
|
18
|
+
require_relative "match_metadata"
|
18
19
|
require_relative "match_platform"
|
19
20
|
|
20
21
|
# Cherry-pick fixes to `Gem.ruby_version` to be useful for modern Bundler
|
@@ -28,6 +29,7 @@ end
|
|
28
29
|
|
29
30
|
module Gem
|
30
31
|
class Specification
|
32
|
+
include ::Bundler::MatchMetadata
|
31
33
|
include ::Bundler::MatchPlatform
|
32
34
|
|
33
35
|
attr_accessor :remote, :location, :relative_loaded_from
|
@@ -235,6 +237,32 @@ module Gem
|
|
235
237
|
MINGW = Gem::Platform.new("x86-mingw32")
|
236
238
|
X64_MINGW = [Gem::Platform.new("x64-mingw32"),
|
237
239
|
Gem::Platform.new("x64-mingw-ucrt")].freeze
|
240
|
+
|
241
|
+
if Gem::Platform.new("x86_64-linux-musl") === Gem::Platform.new("x86_64-linux")
|
242
|
+
remove_method :===
|
243
|
+
|
244
|
+
def ===(other)
|
245
|
+
return nil unless Gem::Platform === other
|
246
|
+
|
247
|
+
# universal-mingw32 matches x64-mingw-ucrt
|
248
|
+
return true if (@cpu == "universal" || other.cpu == "universal") &&
|
249
|
+
@os.start_with?("mingw") && other.os.start_with?("mingw")
|
250
|
+
|
251
|
+
# cpu
|
252
|
+
([nil,"universal"].include?(@cpu) || [nil, "universal"].include?(other.cpu) || @cpu == other.cpu ||
|
253
|
+
(@cpu == "arm" && other.cpu.start_with?("arm"))) &&
|
254
|
+
|
255
|
+
# os
|
256
|
+
@os == other.os &&
|
257
|
+
|
258
|
+
# version
|
259
|
+
(
|
260
|
+
(@os != "linux" && (@version.nil? || other.version.nil?)) ||
|
261
|
+
(@os == "linux" && ((@version.nil? && ["gnu", "musl"].include?(other.version)) || (@version == "gnu" && other.version.nil?))) ||
|
262
|
+
@version == other.version
|
263
|
+
)
|
264
|
+
end
|
265
|
+
end
|
238
266
|
end
|
239
267
|
|
240
268
|
Platform.singleton_class.module_eval do
|
@@ -7,8 +7,11 @@ module Bundler
|
|
7
7
|
include Enumerable
|
8
8
|
include TSort
|
9
9
|
|
10
|
-
|
10
|
+
attr_reader :incomplete_specs
|
11
|
+
|
12
|
+
def initialize(specs, incomplete_specs = [])
|
11
13
|
@specs = specs
|
14
|
+
@incomplete_specs = incomplete_specs
|
12
15
|
end
|
13
16
|
|
14
17
|
def for(dependencies, check = false, platforms = [nil])
|
@@ -19,7 +22,10 @@ module Bundler
|
|
19
22
|
loop do
|
20
23
|
break unless dep = deps.shift
|
21
24
|
|
22
|
-
|
25
|
+
name = dep[0].name
|
26
|
+
platform = dep[1]
|
27
|
+
|
28
|
+
key = [name, platform]
|
23
29
|
next if handled.key?(key)
|
24
30
|
|
25
31
|
handled[key] = true
|
@@ -33,7 +39,7 @@ module Bundler
|
|
33
39
|
deps << [d, dep[1]]
|
34
40
|
end
|
35
41
|
elsif check
|
36
|
-
|
42
|
+
@incomplete_specs += lookup[name]
|
37
43
|
end
|
38
44
|
end
|
39
45
|
|
@@ -51,6 +57,12 @@ module Bundler
|
|
51
57
|
@sorted = nil
|
52
58
|
end
|
53
59
|
|
60
|
+
def delete(spec)
|
61
|
+
@specs.delete(spec)
|
62
|
+
@lookup = nil
|
63
|
+
@sorted = nil
|
64
|
+
end
|
65
|
+
|
54
66
|
def sort!
|
55
67
|
self
|
56
68
|
end
|
@@ -66,7 +78,7 @@ module Bundler
|
|
66
78
|
def materialize(deps)
|
67
79
|
materialized = self.for(deps, true)
|
68
80
|
|
69
|
-
SpecSet.new(materialized)
|
81
|
+
SpecSet.new(materialized, incomplete_specs)
|
70
82
|
end
|
71
83
|
|
72
84
|
# Materialize for all the specs in the spec set, regardless of what platform they're for
|
@@ -83,17 +95,15 @@ module Bundler
|
|
83
95
|
end
|
84
96
|
|
85
97
|
def incomplete_ruby_specs?(deps)
|
86
|
-
self.
|
98
|
+
self.for(deps, true, [Gem::Platform::RUBY])
|
99
|
+
|
100
|
+
@incomplete_specs.any?
|
87
101
|
end
|
88
102
|
|
89
103
|
def missing_specs
|
90
104
|
@specs.select {|s| s.is_a?(LazySpecification) }
|
91
105
|
end
|
92
106
|
|
93
|
-
def incomplete_specs
|
94
|
-
@specs.select {|s| s.is_a?(IncompleteSpecification) }
|
95
|
-
end
|
96
|
-
|
97
107
|
def merge(set)
|
98
108
|
arr = sorted.dup
|
99
109
|
set.each do |set_spec|
|
data/bundler/lib/bundler.rb
CHANGED
@@ -53,13 +53,12 @@ module Bundler
|
|
53
53
|
autoload :GemHelpers, File.expand_path("bundler/gem_helpers", __dir__)
|
54
54
|
autoload :GemVersionPromoter, File.expand_path("bundler/gem_version_promoter", __dir__)
|
55
55
|
autoload :Graph, File.expand_path("bundler/graph", __dir__)
|
56
|
-
autoload :IncompleteSpecification, File.expand_path("bundler/incomplete_specification", __dir__)
|
57
56
|
autoload :Index, File.expand_path("bundler/index", __dir__)
|
58
57
|
autoload :Injector, File.expand_path("bundler/injector", __dir__)
|
59
58
|
autoload :Installer, File.expand_path("bundler/installer", __dir__)
|
60
59
|
autoload :LazySpecification, File.expand_path("bundler/lazy_specification", __dir__)
|
61
60
|
autoload :LockfileParser, File.expand_path("bundler/lockfile_parser", __dir__)
|
62
|
-
autoload :
|
61
|
+
autoload :MatchRemoteMetadata, File.expand_path("bundler/match_remote_metadata", __dir__)
|
63
62
|
autoload :ProcessLock, File.expand_path("bundler/process_lock", __dir__)
|
64
63
|
autoload :RemoteSpecification, File.expand_path("bundler/remote_specification", __dir__)
|
65
64
|
autoload :Resolver, File.expand_path("bundler/resolver", __dir__)
|
@@ -332,9 +331,9 @@ module Bundler
|
|
332
331
|
FileUtils.remove_entry_secure(path) if path && File.exist?(path)
|
333
332
|
rescue ArgumentError
|
334
333
|
message = <<EOF
|
335
|
-
It is a security vulnerability to allow your home directory to be world-writable, and bundler
|
334
|
+
It is a security vulnerability to allow your home directory to be world-writable, and bundler cannot continue.
|
336
335
|
You should probably consider fixing this issue by running `chmod o-w ~` on *nix.
|
337
|
-
Please refer to https://ruby-doc.org/stdlib-
|
336
|
+
Please refer to https://ruby-doc.org/stdlib-3.1.2/libdoc/fileutils/rdoc/FileUtils.html#method-c-remove_entry_secure for details.
|
338
337
|
EOF
|
339
338
|
File.world_writable?(path) ? Bundler.ui.warn(message) : raise
|
340
339
|
raise PathError, "Please fix the world-writable issue with your #{path} directory"
|
data/lib/rubygems/platform.rb
CHANGED
@@ -25,7 +25,7 @@ class Gem::Platform
|
|
25
25
|
platforms.any? do |local_platform|
|
26
26
|
platform.nil? ||
|
27
27
|
local_platform == platform ||
|
28
|
-
(local_platform != Gem::Platform::RUBY &&
|
28
|
+
(local_platform != Gem::Platform::RUBY && platform =~ local_platform)
|
29
29
|
end
|
30
30
|
end
|
31
31
|
private_class_method :match_platforms?
|
@@ -70,7 +70,7 @@ class Gem::Platform
|
|
70
70
|
when String then
|
71
71
|
arch = arch.split "-"
|
72
72
|
|
73
|
-
if arch.length > 2 && arch.last !~
|
73
|
+
if arch.length > 2 && arch.last !~ /\d+(\.\d+)?$/ # reassemble x86-linux-{libc}
|
74
74
|
extra = arch.pop
|
75
75
|
arch.last << "-#{extra}"
|
76
76
|
end
|
@@ -102,7 +102,7 @@ class Gem::Platform
|
|
102
102
|
when /^dalvik(\d+)?$/ then [ "dalvik", $1 ]
|
103
103
|
when /^dotnet$/ then [ "dotnet", nil ]
|
104
104
|
when /^dotnet([\d.]*)/ then [ "dotnet", $1 ]
|
105
|
-
when /linux-?(
|
105
|
+
when /linux-?(\w+)?/ then [ "linux", $1 ]
|
106
106
|
when /mingw32/ then [ "mingw32", nil ]
|
107
107
|
when /mingw-?(\w+)?/ then [ "mingw", $1 ]
|
108
108
|
when /(mswin\d+)(\_(\d+))?/ then
|
@@ -151,10 +151,17 @@ class Gem::Platform
|
|
151
151
|
##
|
152
152
|
# Does +other+ match this platform? Two platforms match if they have the
|
153
153
|
# same CPU, or either has a CPU of 'universal', they have the same OS, and
|
154
|
-
# they have the same version, or either has no version
|
154
|
+
# they have the same version, or either one has no version
|
155
155
|
#
|
156
156
|
# Additionally, the platform will match if the local CPU is 'arm' and the
|
157
157
|
# other CPU starts with "arm" (for generic ARM family support).
|
158
|
+
#
|
159
|
+
# Of note, this method is not commutative. Indeed the OS 'linux' has a
|
160
|
+
# special case: the version is the libc name, yet while "no version" stands
|
161
|
+
# as a wildcard for a binary gem platform (as for other OSes), for the
|
162
|
+
# runtime platform "no version" stands for 'gnu'. To be able to disinguish
|
163
|
+
# these, the method receiver is the gem platform, while the argument is
|
164
|
+
# the runtime platform.
|
158
165
|
|
159
166
|
def ===(other)
|
160
167
|
return nil unless Gem::Platform === other
|
@@ -171,7 +178,11 @@ class Gem::Platform
|
|
171
178
|
@os == other.os &&
|
172
179
|
|
173
180
|
# version
|
174
|
-
(
|
181
|
+
(
|
182
|
+
(@os != "linux" && (@version.nil? || other.version.nil?)) ||
|
183
|
+
(@os == "linux" && ((@version.nil? && ["gnu", "musl"].include?(other.version)) || (@version == "gnu" && other.version.nil?))) ||
|
184
|
+
@version == other.version
|
185
|
+
)
|
175
186
|
end
|
176
187
|
|
177
188
|
##
|
data/lib/rubygems.rb
CHANGED
data/rubygems-update.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "rubygems-update"
|
5
|
-
s.version = "3.3.
|
5
|
+
s.version = "3.3.21"
|
6
6
|
s.authors = ["Jim Weirich", "Chad Fowler", "Eric Hodel", "Luis Lavena", "Aaron Patterson", "Samuel Giddins", "André Arko", "Evan Phoenix", "Hiroshi SHIBATA"]
|
7
7
|
s.email = ["", "", "drbrain@segment7.net", "luislavena@gmail.com", "aaron@tenderlovemaking.com", "segiddins@segiddins.me", "andre@arko.net", "evan@phx.io", "hsbt@ruby-lang.org"]
|
8
8
|
|
@@ -160,9 +160,9 @@ dependencies = [
|
|
160
160
|
|
161
161
|
[[package]]
|
162
162
|
name = "rb-sys"
|
163
|
-
version = "0.9.
|
163
|
+
version = "0.9.30"
|
164
164
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
165
|
-
checksum = "
|
165
|
+
checksum = "24b22a374fc2e92eb6f49d7efe4eb7663655c6e9455d9259ed3342cc1599da85"
|
166
166
|
dependencies = [
|
167
167
|
"bindgen",
|
168
168
|
"linkify",
|
@@ -171,9 +171,9 @@ dependencies = [
|
|
171
171
|
|
172
172
|
[[package]]
|
173
173
|
name = "rb-sys-build"
|
174
|
-
version = "0.9.
|
174
|
+
version = "0.9.30"
|
175
175
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
176
|
-
checksum = "
|
176
|
+
checksum = "3cd23b6dd929b7d50ccb35a6d3aa77dec364328ab9cb304dd32c629332491671"
|
177
177
|
dependencies = [
|
178
178
|
"regex",
|
179
179
|
"shell-words",
|
@@ -153,9 +153,9 @@ dependencies = [
|
|
153
153
|
|
154
154
|
[[package]]
|
155
155
|
name = "rb-sys"
|
156
|
-
version = "0.9.
|
156
|
+
version = "0.9.30"
|
157
157
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
158
|
-
checksum = "
|
158
|
+
checksum = "24b22a374fc2e92eb6f49d7efe4eb7663655c6e9455d9259ed3342cc1599da85"
|
159
159
|
dependencies = [
|
160
160
|
"bindgen",
|
161
161
|
"linkify",
|
@@ -164,9 +164,9 @@ dependencies = [
|
|
164
164
|
|
165
165
|
[[package]]
|
166
166
|
name = "rb-sys-build"
|
167
|
-
version = "0.9.
|
167
|
+
version = "0.9.30"
|
168
168
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
169
|
-
checksum = "
|
169
|
+
checksum = "3cd23b6dd929b7d50ccb35a6d3aa77dec364328ab9cb304dd32c629332491671"
|
170
170
|
dependencies = [
|
171
171
|
"regex",
|
172
172
|
"shell-words",
|