rubygems-update 3.2.14 → 3.2.15
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 +11 -0
- data/bundler/CHANGELOG.md +12 -0
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/installer/parallel_installer.rb +30 -7
- data/bundler/lib/bundler/lazy_specification.rb +6 -1
- data/bundler/lib/bundler/source/path.rb +3 -1
- data/bundler/lib/bundler/source/path/installer.rb +1 -1
- data/bundler/lib/bundler/source_list.rb +1 -1
- data/bundler/lib/bundler/version.rb +1 -1
- data/lib/rubygems.rb +1 -1
- data/lib/rubygems/commands/update_command.rb +21 -3
- data/lib/rubygems/security/trust_dir.rb +1 -0
- data/rubygems-update.gemspec +1 -1
- data/test/rubygems/test_gem_commands_update_command.rb +28 -1
- data/test/rubygems/test_gem_remote_fetcher.rb +0 -6
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12f7d1b385b073b255590e0eee7807d5bb588ab877a9928e5edee6f3701e47b6
|
4
|
+
data.tar.gz: 425d632864b300c71cd1d62e9fdd045f94f4a6a088dbfc0a3a29977950958787
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed5579f01a5c0a2d832779331df8900db7e0ed9bc6dc03f6f449ff76f9552f378d771424354629fbc34bd2ace0a9ab486cf79743065ece6d89d832a79383b97a
|
7
|
+
data.tar.gz: bf54441188feb5c8388676a46713113097aa978270514a3bcadf12564f8dd50ec671c0067c55727a927e7f6dfac27ce05bf13ba04731a44e749ce8c1b16d0470
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
# 3.2.15 / 2021-03-18
|
2
|
+
|
3
|
+
## Enhancements:
|
4
|
+
|
5
|
+
* Prevent downgrades to untested rubygems versions. Pull request #4460 by
|
6
|
+
deivid-rodriguez
|
7
|
+
|
8
|
+
## Bug fixes:
|
9
|
+
|
10
|
+
* Fix missing require breaking `gem cert`. Pull request #4464 by lukehinds
|
11
|
+
|
1
12
|
# 3.2.14 / 2021-03-08
|
2
13
|
|
3
14
|
## Enhancements:
|
data/bundler/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
# 2.2.15 (March 18, 2021)
|
2
|
+
|
3
|
+
## Enhancements:
|
4
|
+
|
5
|
+
- Add a hint about bundler installing executables for path gems [#4461](https://github.com/rubygems/rubygems/pull/4461)
|
6
|
+
- Warn lockfiles with incorrect resolutions [#4459](https://github.com/rubygems/rubygems/pull/4459)
|
7
|
+
- Don't generate duplicate redundant sources in the lockfile [#4456](https://github.com/rubygems/rubygems/pull/4456)
|
8
|
+
|
9
|
+
## Bug fixes:
|
10
|
+
|
11
|
+
- Respect running ruby when resolving platforms [#4449](https://github.com/rubygems/rubygems/pull/4449)
|
12
|
+
|
1
13
|
# 2.2.14 (March 8, 2021)
|
2
14
|
|
3
15
|
## Security fixes:
|
@@ -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 = "2021-03-
|
8
|
-
@git_commit_sha = "
|
7
|
+
@built_at = "2021-03-19".freeze
|
8
|
+
@git_commit_sha = "3dbcc68293".freeze
|
9
9
|
@release = true
|
10
10
|
# end ivars
|
11
11
|
|
@@ -6,10 +6,11 @@ require_relative "gem_installer"
|
|
6
6
|
module Bundler
|
7
7
|
class ParallelInstaller
|
8
8
|
class SpecInstallation
|
9
|
-
attr_accessor :spec, :name, :post_install_message, :state, :error
|
9
|
+
attr_accessor :spec, :name, :full_name, :post_install_message, :state, :error
|
10
10
|
def initialize(spec)
|
11
11
|
@spec = spec
|
12
12
|
@name = spec.name
|
13
|
+
@full_name = spec.full_name
|
13
14
|
@state = :none
|
14
15
|
@post_install_message = ""
|
15
16
|
@error = nil
|
@@ -49,14 +50,11 @@ module Bundler
|
|
49
50
|
# Represents only the non-development dependencies, the ones that are
|
50
51
|
# itself and are in the total list.
|
51
52
|
def dependencies
|
52
|
-
@dependencies ||=
|
53
|
-
all_dependencies.reject {|dep| ignorable_dependency? dep }
|
54
|
-
end
|
53
|
+
@dependencies ||= all_dependencies.reject {|dep| ignorable_dependency? dep }
|
55
54
|
end
|
56
55
|
|
57
56
|
def missing_lockfile_dependencies(all_spec_names)
|
58
|
-
|
59
|
-
deps.reject {|dep| all_spec_names.include? dep.name }
|
57
|
+
dependencies.reject {|dep| all_spec_names.include? dep.name }
|
60
58
|
end
|
61
59
|
|
62
60
|
# Represents all dependencies
|
@@ -65,7 +63,7 @@ module Bundler
|
|
65
63
|
end
|
66
64
|
|
67
65
|
def to_s
|
68
|
-
"#<#{self.class} #{
|
66
|
+
"#<#{self.class} #{full_name} (#{state})>"
|
69
67
|
end
|
70
68
|
end
|
71
69
|
|
@@ -99,12 +97,37 @@ module Bundler
|
|
99
97
|
install_serially
|
100
98
|
end
|
101
99
|
|
100
|
+
check_for_unmet_dependencies
|
101
|
+
|
102
102
|
handle_error if failed_specs.any?
|
103
103
|
@specs
|
104
104
|
ensure
|
105
105
|
worker_pool && worker_pool.stop
|
106
106
|
end
|
107
107
|
|
108
|
+
def check_for_unmet_dependencies
|
109
|
+
unmet_dependencies = @specs.map do |s|
|
110
|
+
[
|
111
|
+
s,
|
112
|
+
s.dependencies.reject {|dep| @specs.any? {|spec| dep.matches_spec?(spec.spec) } },
|
113
|
+
]
|
114
|
+
end.reject {|a| a.last.empty? }
|
115
|
+
return if unmet_dependencies.empty?
|
116
|
+
|
117
|
+
warning = []
|
118
|
+
warning << "Your lockfile doesn't include a valid resolution."
|
119
|
+
warning << "You can fix this by regenerating your lockfile or trying to manually editing the bad locked gems to a version that satisfies all dependencies."
|
120
|
+
warning << "The unmet dependencies are:"
|
121
|
+
|
122
|
+
unmet_dependencies.each do |spec, unmet_spec_dependencies|
|
123
|
+
unmet_spec_dependencies.each do |unmet_spec_dependency|
|
124
|
+
warning << "* #{unmet_spec_dependency}, depended upon #{spec.full_name}, unsatisfied by #{@specs.find {|s| s.name == unmet_spec_dependency.name && !unmet_spec_dependency.matches_spec?(s.spec) }.full_name}"
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
Bundler.ui.warn(warning.join("\n"))
|
129
|
+
end
|
130
|
+
|
108
131
|
def check_for_corrupt_lockfile
|
109
132
|
missing_dependencies = @specs.map do |s|
|
110
133
|
[
|
@@ -73,7 +73,12 @@ module Bundler
|
|
73
73
|
same_platform_candidates = candidates.select do |spec|
|
74
74
|
MatchPlatform.platforms_match?(spec.platform, platform_object)
|
75
75
|
end
|
76
|
-
|
76
|
+
installable_candidates = same_platform_candidates.select do |spec|
|
77
|
+
!spec.is_a?(RemoteSpecification) &&
|
78
|
+
spec.required_ruby_version.satisfied_by?(Gem.ruby_version) &&
|
79
|
+
spec.required_rubygems_version.satisfied_by?(Gem.rubygems_version)
|
80
|
+
end
|
81
|
+
search = installable_candidates.last || same_platform_candidates.last
|
77
82
|
search.dependencies = dependencies if search && (search.is_a?(RemoteSpecification) || search.is_a?(EndpointSpecification))
|
78
83
|
search
|
79
84
|
end
|
@@ -82,7 +82,9 @@ module Bundler
|
|
82
82
|
end
|
83
83
|
|
84
84
|
def install(spec, options = {})
|
85
|
-
|
85
|
+
using_message = "Using #{version_message(spec)} from #{self}"
|
86
|
+
using_message += " and installing its executables" unless spec.executables.empty?
|
87
|
+
print_using_message using_message
|
86
88
|
generate_bin(spec, :disable_extensions => true)
|
87
89
|
nil # no post-install message
|
88
90
|
end
|
@@ -88,7 +88,7 @@ module Bundler
|
|
88
88
|
def lock_sources
|
89
89
|
lock_sources = (path_sources + git_sources + plugin_sources).sort_by(&:to_s)
|
90
90
|
if disable_multisource?
|
91
|
-
lock_sources + rubygems_sources.sort_by(&:to_s)
|
91
|
+
lock_sources + rubygems_sources.sort_by(&:to_s).uniq
|
92
92
|
else
|
93
93
|
lock_sources << combine_rubygems_sources
|
94
94
|
end
|
data/lib/rubygems.rb
CHANGED
@@ -76,7 +76,7 @@ command to remove old versions.
|
|
76
76
|
|
77
77
|
def check_oldest_rubygems(version) # :nodoc:
|
78
78
|
if oldest_supported_version > version
|
79
|
-
alert_error "rubygems #{version} is not supported. The oldest supported
|
79
|
+
alert_error "rubygems #{version} is not supported on #{RUBY_VERSION}. The oldest version supported by this ruby is #{oldest_supported_version}"
|
80
80
|
terminate_interaction 1
|
81
81
|
end
|
82
82
|
end
|
@@ -322,8 +322,26 @@ command to remove old versions.
|
|
322
322
|
|
323
323
|
private
|
324
324
|
|
325
|
+
#
|
326
|
+
# Oldest version we support downgrading to. This is the version that
|
327
|
+
# originally ships with the first patch version of each ruby, because we never
|
328
|
+
# test each ruby against older rubygems, so we can't really guarantee it
|
329
|
+
# works. Version list can be checked here: https://stdgems.org/rubygems
|
330
|
+
#
|
325
331
|
def oldest_supported_version
|
326
|
-
|
327
|
-
|
332
|
+
@oldest_supported_version ||=
|
333
|
+
if Gem.ruby_version > Gem::Version.new("3.0.a")
|
334
|
+
Gem::Version.new("3.2.3")
|
335
|
+
elsif Gem.ruby_version > Gem::Version.new("2.7.a")
|
336
|
+
Gem::Version.new("3.1.2")
|
337
|
+
elsif Gem.ruby_version > Gem::Version.new("2.6.a")
|
338
|
+
Gem::Version.new("3.0.1")
|
339
|
+
elsif Gem.ruby_version > Gem::Version.new("2.5.a")
|
340
|
+
Gem::Version.new("2.7.3")
|
341
|
+
elsif Gem.ruby_version > Gem::Version.new("2.4.a")
|
342
|
+
Gem::Version.new("2.6.8")
|
343
|
+
else
|
344
|
+
Gem::Version.new("2.5.2")
|
345
|
+
end
|
328
346
|
end
|
329
347
|
end
|
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.2.
|
5
|
+
s.version = "3.2.15"
|
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
|
|
@@ -168,6 +168,15 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
|
|
168
168
|
@cmd.options[:args] = []
|
169
169
|
@cmd.options[:system] = "2.5.1"
|
170
170
|
|
171
|
+
oldest_version_mod = Module.new do
|
172
|
+
def oldest_supported_version
|
173
|
+
Gem::Version.new("2.5.2")
|
174
|
+
end
|
175
|
+
private :oldest_supported_version
|
176
|
+
end
|
177
|
+
|
178
|
+
@cmd.extend(oldest_version_mod)
|
179
|
+
|
171
180
|
assert_raises Gem::MockGemUi::TermError do
|
172
181
|
use_ui @ui do
|
173
182
|
@cmd.execute
|
@@ -175,7 +184,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
|
|
175
184
|
end
|
176
185
|
|
177
186
|
assert_empty @ui.output
|
178
|
-
assert_equal "ERROR: rubygems 2.5.1 is not supported. The oldest supported
|
187
|
+
assert_equal "ERROR: rubygems 2.5.1 is not supported on #{RUBY_VERSION}. The oldest version supported by this ruby is 2.5.2\n", @ui.error
|
179
188
|
end
|
180
189
|
|
181
190
|
def test_execute_system_specific_older_than_3_2_removes_plugins_dir
|
@@ -185,6 +194,15 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
|
|
185
194
|
end
|
186
195
|
end
|
187
196
|
|
197
|
+
oldest_version_mod = Module.new do
|
198
|
+
def oldest_supported_version
|
199
|
+
Gem::Version.new("2.5.2")
|
200
|
+
end
|
201
|
+
private :oldest_supported_version
|
202
|
+
end
|
203
|
+
|
204
|
+
@cmd.extend(oldest_version_mod)
|
205
|
+
|
188
206
|
@cmd.options[:args] = []
|
189
207
|
@cmd.options[:system] = "3.1"
|
190
208
|
|
@@ -203,6 +221,15 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
|
|
203
221
|
end
|
204
222
|
end
|
205
223
|
|
224
|
+
oldest_version_mod = Module.new do
|
225
|
+
def oldest_supported_version
|
226
|
+
Gem::Version.new("2.5.2")
|
227
|
+
end
|
228
|
+
private :oldest_supported_version
|
229
|
+
end
|
230
|
+
|
231
|
+
@cmd.extend(oldest_version_mod)
|
232
|
+
|
206
233
|
@cmd.options[:args] = []
|
207
234
|
@cmd.options[:system] = "3.2.a"
|
208
235
|
|
@@ -1000,12 +1000,6 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
|
|
1000
1000
|
end
|
1001
1001
|
end
|
1002
1002
|
|
1003
|
-
def test_tcpsocketext_require
|
1004
|
-
with_configured_fetcher(":ipv4_fallback_enabled: true") do |fetcher|
|
1005
|
-
refute require('rubygems/core_ext/tcpsocket_init')
|
1006
|
-
end
|
1007
|
-
end
|
1008
|
-
|
1009
1003
|
def with_configured_fetcher(config_str = nil, &block)
|
1010
1004
|
if config_str
|
1011
1005
|
temp_conf = File.join @tempdir, '.gemrc'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubygems-update
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Weirich
|
@@ -16,7 +16,7 @@ authors:
|
|
16
16
|
autorequire:
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
|
-
date: 2021-03-
|
19
|
+
date: 2021-03-19 00:00:00.000000000 Z
|
20
20
|
dependencies: []
|
21
21
|
description: |-
|
22
22
|
A package (also known as a library) contains a set of functionality
|
@@ -768,7 +768,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
768
768
|
- !ruby/object:Gem::Version
|
769
769
|
version: '0'
|
770
770
|
requirements: []
|
771
|
-
rubygems_version: 3.2.
|
771
|
+
rubygems_version: 3.2.15
|
772
772
|
signing_key:
|
773
773
|
specification_version: 4
|
774
774
|
summary: RubyGems is a package management framework for Ruby.
|