rubygems-update 3.5.19 → 3.5.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 +32 -0
- data/bundler/CHANGELOG.md +22 -0
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli/install.rb +5 -1
- data/bundler/lib/bundler/cli/outdated.rb +15 -17
- data/bundler/lib/bundler/definition.rb +1 -1
- data/bundler/lib/bundler/inline.rb +11 -5
- data/bundler/lib/bundler/self_manager.rb +4 -4
- data/bundler/lib/bundler/source/git/git_proxy.rb +4 -2
- data/bundler/lib/bundler/source/git.rb +7 -2
- data/bundler/lib/bundler/source/path.rb +2 -0
- data/bundler/lib/bundler/stub_specification.rb +2 -2
- data/bundler/lib/bundler/version.rb +1 -1
- data/bundler/lib/bundler.rb +29 -21
- data/lib/rubygems/command_manager.rb +2 -9
- data/lib/rubygems/commands/cleanup_command.rb +1 -11
- data/lib/rubygems/errors.rb +2 -1
- data/lib/rubygems/installer.rb +14 -23
- data/lib/rubygems/resolver/api_set.rb +12 -7
- data/lib/rubygems/resolver/best_set.rb +0 -2
- data/lib/rubygems/spec_fetcher.rb +4 -11
- data/lib/rubygems/specification.rb +2 -2
- data/lib/rubygems.rb +1 -1
- data/rubygems-update.gemspec +1 -1
- 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: b93fb693eb681ac96e283d9cbeaa13d051f7aad74a1c5345efdb2f3197bc3ffa
|
4
|
+
data.tar.gz: 891fe98e7164fd5e684ea15055f56ebeb041e9c316ba0528cb08346aa26032b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40183fff5ed0fc360dd8399691277c6f13f179d8bccadbc07d5008c189b63ed3b4eb7987214230f7cd720fbc9bbcae548fc14b5b6caddf635730c8f206651acb
|
7
|
+
data.tar.gz: 01cb679ca372d6856e928f71da3a991acd9f27cf526d1b650e33ccec7aa8d09ece5a2ff8a5dcbb02f11a7fa2923ee25042e2da52b42c452adc34c98770c1951b
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,35 @@
|
|
1
|
+
# 3.5.21 / 2024-10-03
|
2
|
+
|
3
|
+
## Enhancements:
|
4
|
+
|
5
|
+
* Fix `Gem::MissingSpecVersionError#to_s` not showing exception message.
|
6
|
+
Pull request [#8074](https://github.com/rubygems/rubygems/pull/8074) by
|
7
|
+
deivid-rodriguez
|
8
|
+
* Remove code that makes suggest_gems_from_name give worse results. Pull
|
9
|
+
request [#8083](https://github.com/rubygems/rubygems/pull/8083) by
|
10
|
+
duckinator
|
11
|
+
* Warning about PATH in `--user-install` mode is only necessary for gems
|
12
|
+
with executables. Pull request
|
13
|
+
[#8071](https://github.com/rubygems/rubygems/pull/8071) by
|
14
|
+
deivid-rodriguez
|
15
|
+
* Installs bundler 2.5.21 as a default gem.
|
16
|
+
|
17
|
+
## Bug fixes:
|
18
|
+
|
19
|
+
* Fix error in one source when fetching dependency APIs clearing results
|
20
|
+
from all sources. Pull request
|
21
|
+
[#8080](https://github.com/rubygems/rubygems/pull/8080) by
|
22
|
+
deivid-rodriguez
|
23
|
+
* Fix `gem cleanup` warning when two versions of psych installed. Pull
|
24
|
+
request [#8072](https://github.com/rubygems/rubygems/pull/8072) by
|
25
|
+
deivid-rodriguez
|
26
|
+
|
27
|
+
# 3.5.20 / 2024-09-24
|
28
|
+
|
29
|
+
## Enhancements:
|
30
|
+
|
31
|
+
* Installs bundler 2.5.20 as a default gem.
|
32
|
+
|
1
33
|
# 3.5.19 / 2024-09-18
|
2
34
|
|
3
35
|
## Enhancements:
|
data/bundler/CHANGELOG.md
CHANGED
@@ -1,3 +1,25 @@
|
|
1
|
+
# 2.5.21 (October 3, 2024)
|
2
|
+
|
3
|
+
## Bug fixes:
|
4
|
+
|
5
|
+
- Fix bug report template printed when changing a path source to a git source in frozen mode [#8079](https://github.com/rubygems/rubygems/pull/8079)
|
6
|
+
- Fix `stub.activated?` sometimes returning false after activation under bundler [#8073](https://github.com/rubygems/rubygems/pull/8073)
|
7
|
+
- Fix old cache format detection when application is not source controlled [#8076](https://github.com/rubygems/rubygems/pull/8076)
|
8
|
+
- Fix `bundler/inline` resetting ENV changes [#8059](https://github.com/rubygems/rubygems/pull/8059)
|
9
|
+
|
10
|
+
# 2.5.20 (September 24, 2024)
|
11
|
+
|
12
|
+
## Enhancements:
|
13
|
+
|
14
|
+
- Don't try to auto-install dev versions of Bundler not available remotely [#8045](https://github.com/rubygems/rubygems/pull/8045)
|
15
|
+
- Don't try to install locked bundler when `--local` is passed [#8041](https://github.com/rubygems/rubygems/pull/8041)
|
16
|
+
|
17
|
+
## Bug fixes:
|
18
|
+
|
19
|
+
- Fix `bundler/inline` overwriting lockfiles [#8055](https://github.com/rubygems/rubygems/pull/8055)
|
20
|
+
- Ensure refs directory in cached git source [#8047](https://github.com/rubygems/rubygems/pull/8047)
|
21
|
+
- Fix `bundle outdated` with `--group` option [#8052](https://github.com/rubygems/rubygems/pull/8052)
|
22
|
+
|
1
23
|
# 2.5.19 (September 18, 2024)
|
2
24
|
|
3
25
|
## Enhancements:
|
@@ -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-10-03".freeze
|
8
|
+
@git_commit_sha = "5cc66a2380b".freeze
|
9
9
|
@release = true
|
10
10
|
# end ivars
|
11
11
|
|
@@ -12,7 +12,11 @@ module Bundler
|
|
12
12
|
|
13
13
|
warn_if_root
|
14
14
|
|
15
|
-
|
15
|
+
if options[:local]
|
16
|
+
Bundler.self_manager.restart_with_locked_bundler_if_needed
|
17
|
+
else
|
18
|
+
Bundler.self_manager.install_locked_bundler_and_restart_with_it_if_needed
|
19
|
+
end
|
16
20
|
|
17
21
|
Bundler::SharedHelpers.set_env "RB_USER_INSTALL", "1" if Gem.freebsd_platform?
|
18
22
|
|
@@ -97,28 +97,26 @@ module Bundler
|
|
97
97
|
}
|
98
98
|
end
|
99
99
|
|
100
|
-
if
|
100
|
+
relevant_outdated_gems = if options_include_groups
|
101
|
+
outdated_gems.group_by {|g| g[:groups] }.sort.flat_map do |groups, gems|
|
102
|
+
contains_group = groups.split(", ").include?(options[:group])
|
103
|
+
next unless options[:groups] || contains_group
|
104
|
+
|
105
|
+
gems
|
106
|
+
end.compact
|
107
|
+
else
|
108
|
+
outdated_gems
|
109
|
+
end
|
110
|
+
|
111
|
+
if relevant_outdated_gems.empty?
|
101
112
|
unless options[:parseable]
|
102
113
|
Bundler.ui.info(nothing_outdated_message)
|
103
114
|
end
|
104
115
|
else
|
105
|
-
if
|
106
|
-
relevant_outdated_gems
|
107
|
-
contains_group = groups.split(", ").include?(options[:group])
|
108
|
-
next unless options[:groups] || contains_group
|
109
|
-
|
110
|
-
gems
|
111
|
-
end.compact
|
112
|
-
|
113
|
-
if options[:parseable]
|
114
|
-
print_gems(relevant_outdated_gems)
|
115
|
-
else
|
116
|
-
print_gems_table(relevant_outdated_gems)
|
117
|
-
end
|
118
|
-
elsif options[:parseable]
|
119
|
-
print_gems(outdated_gems)
|
116
|
+
if options[:parseable]
|
117
|
+
print_gems(relevant_outdated_gems)
|
120
118
|
else
|
121
|
-
print_gems_table(
|
119
|
+
print_gems_table(relevant_outdated_gems)
|
122
120
|
end
|
123
121
|
|
124
122
|
exit 1
|
@@ -317,7 +317,7 @@ module Bundler
|
|
317
317
|
|
318
318
|
def lock(file_or_preserve_unknown_sections = false, preserve_unknown_sections_or_unused = false)
|
319
319
|
if [true, false, nil].include?(file_or_preserve_unknown_sections)
|
320
|
-
target_lockfile = lockfile
|
320
|
+
target_lockfile = lockfile
|
321
321
|
preserve_unknown_sections = file_or_preserve_unknown_sections
|
322
322
|
else
|
323
323
|
target_lockfile = file_or_preserve_unknown_sections
|
@@ -39,7 +39,11 @@ def gemfile(install = false, options = {}, &gemfile)
|
|
39
39
|
Bundler.ui = ui
|
40
40
|
raise ArgumentError, "Unknown options: #{opts.keys.join(", ")}" unless opts.empty?
|
41
41
|
|
42
|
-
|
42
|
+
old_gemfile = ENV["BUNDLE_GEMFILE"]
|
43
|
+
|
44
|
+
Bundler.unbundle_env!
|
45
|
+
|
46
|
+
begin
|
43
47
|
Bundler.instance_variable_set(:@bundle_path, Pathname.new(Gem.dir))
|
44
48
|
Bundler::SharedHelpers.set_env "BUNDLE_GEMFILE", "Gemfile"
|
45
49
|
|
@@ -80,9 +84,11 @@ def gemfile(install = false, options = {}, &gemfile)
|
|
80
84
|
|
81
85
|
runtime.require
|
82
86
|
end
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
+
ensure
|
88
|
+
if old_gemfile
|
89
|
+
ENV["BUNDLE_GEMFILE"] = old_gemfile
|
90
|
+
else
|
91
|
+
ENV["BUNDLE_GEMFILE"] = ""
|
92
|
+
end
|
87
93
|
end
|
88
94
|
end
|
@@ -98,10 +98,10 @@ module Bundler
|
|
98
98
|
|
99
99
|
def needs_switching?
|
100
100
|
autoswitching_applies? &&
|
101
|
-
|
102
|
-
|
103
|
-
!
|
104
|
-
|
101
|
+
Bundler.settings[:version] != "system" &&
|
102
|
+
released?(restart_version) &&
|
103
|
+
!running?(restart_version) &&
|
104
|
+
!updating?
|
105
105
|
end
|
106
106
|
|
107
107
|
def autoswitching_applies?
|
@@ -84,8 +84,10 @@ module Bundler
|
|
84
84
|
end
|
85
85
|
end
|
86
86
|
|
87
|
-
def
|
88
|
-
|
87
|
+
def not_a_repository?
|
88
|
+
_, status = git_null("rev-parse", "--resolve-git-dir", path.to_s, dir: path)
|
89
|
+
|
90
|
+
!status.success?
|
89
91
|
end
|
90
92
|
|
91
93
|
def contains?(commit)
|
@@ -188,10 +188,10 @@ module Bundler
|
|
188
188
|
end
|
189
189
|
|
190
190
|
def specs(*)
|
191
|
-
|
191
|
+
set_up_app_cache!(app_cache_path) if use_app_cache?
|
192
192
|
|
193
193
|
if requires_checkout? && !@copied
|
194
|
-
FileUtils.rm_rf(app_cache_path) if use_app_cache? && git_proxy.
|
194
|
+
FileUtils.rm_rf(app_cache_path) if use_app_cache? && git_proxy.not_a_repository?
|
195
195
|
|
196
196
|
fetch
|
197
197
|
checkout
|
@@ -320,6 +320,11 @@ module Bundler
|
|
320
320
|
@install_path = path
|
321
321
|
end
|
322
322
|
|
323
|
+
def set_up_app_cache!(path)
|
324
|
+
FileUtils.mkdir_p(path.join("refs"))
|
325
|
+
set_cache_path!(path)
|
326
|
+
end
|
327
|
+
|
323
328
|
def has_app_cache?
|
324
329
|
cached_revision && super
|
325
330
|
end
|
data/bundler/lib/bundler.rb
CHANGED
@@ -383,28 +383,12 @@ module Bundler
|
|
383
383
|
|
384
384
|
# @return [Hash] Environment with all bundler-related variables removed
|
385
385
|
def unbundled_env
|
386
|
-
|
387
|
-
|
388
|
-
if env.key?("BUNDLER_ORIG_MANPATH")
|
389
|
-
env["MANPATH"] = env["BUNDLER_ORIG_MANPATH"]
|
390
|
-
end
|
391
|
-
|
392
|
-
env.delete_if {|k, _| k[0, 7] == "BUNDLE_" }
|
393
|
-
|
394
|
-
if env.key?("RUBYOPT")
|
395
|
-
rubyopt = env["RUBYOPT"].split(" ")
|
396
|
-
rubyopt.delete("-r#{File.expand_path("bundler/setup", __dir__)}")
|
397
|
-
rubyopt.delete("-rbundler/setup")
|
398
|
-
env["RUBYOPT"] = rubyopt.join(" ")
|
399
|
-
end
|
400
|
-
|
401
|
-
if env.key?("RUBYLIB")
|
402
|
-
rubylib = env["RUBYLIB"].split(File::PATH_SEPARATOR)
|
403
|
-
rubylib.delete(__dir__)
|
404
|
-
env["RUBYLIB"] = rubylib.join(File::PATH_SEPARATOR)
|
405
|
-
end
|
386
|
+
unbundle_env(original_env)
|
387
|
+
end
|
406
388
|
|
407
|
-
|
389
|
+
# Remove all bundler-related variables from ENV
|
390
|
+
def unbundle_env!
|
391
|
+
ENV.replace(unbundle_env(ENV))
|
408
392
|
end
|
409
393
|
|
410
394
|
# Run block with environment present before Bundler was activated
|
@@ -633,6 +617,30 @@ module Bundler
|
|
633
617
|
|
634
618
|
private
|
635
619
|
|
620
|
+
def unbundle_env(env)
|
621
|
+
if env.key?("BUNDLER_ORIG_MANPATH")
|
622
|
+
env["MANPATH"] = env["BUNDLER_ORIG_MANPATH"]
|
623
|
+
end
|
624
|
+
|
625
|
+
env.delete_if {|k, _| k[0, 7] == "BUNDLE_" }
|
626
|
+
env.delete("BUNDLER_SETUP")
|
627
|
+
|
628
|
+
if env.key?("RUBYOPT")
|
629
|
+
rubyopt = env["RUBYOPT"].split(" ")
|
630
|
+
rubyopt.delete("-r#{File.expand_path("bundler/setup", __dir__)}")
|
631
|
+
rubyopt.delete("-rbundler/setup")
|
632
|
+
env["RUBYOPT"] = rubyopt.join(" ")
|
633
|
+
end
|
634
|
+
|
635
|
+
if env.key?("RUBYLIB")
|
636
|
+
rubylib = env["RUBYLIB"].split(File::PATH_SEPARATOR)
|
637
|
+
rubylib.delete(__dir__)
|
638
|
+
env["RUBYLIB"] = rubylib.join(File::PATH_SEPARATOR)
|
639
|
+
end
|
640
|
+
|
641
|
+
env
|
642
|
+
end
|
643
|
+
|
636
644
|
def load_marshal(data, marshal_proc: nil)
|
637
645
|
Marshal.load(data, marshal_proc)
|
638
646
|
rescue TypeError => e
|
@@ -230,18 +230,11 @@ class Gem::CommandManager
|
|
230
230
|
def load_and_instantiate(command_name)
|
231
231
|
command_name = command_name.to_s
|
232
232
|
const_name = command_name.capitalize.gsub(/_(.)/) { $1.upcase } << "Command"
|
233
|
-
load_error = nil
|
234
233
|
|
235
234
|
begin
|
236
|
-
|
237
|
-
require "rubygems/commands/#{command_name}_command"
|
238
|
-
rescue LoadError => e
|
239
|
-
load_error = e
|
240
|
-
end
|
235
|
+
require "rubygems/commands/#{command_name}_command"
|
241
236
|
Gem::Commands.const_get(const_name).new
|
242
|
-
rescue StandardError => e
|
243
|
-
e = load_error if load_error
|
244
|
-
|
237
|
+
rescue StandardError, LoadError => e
|
245
238
|
alert_error clean_text("Loading command: #{command_name} (#{e.class})\n\t#{e}")
|
246
239
|
ui.backtrace e
|
247
240
|
end
|
@@ -38,8 +38,6 @@ class Gem::Commands::CleanupCommand < Gem::Command
|
|
38
38
|
@default_gems = []
|
39
39
|
@full = nil
|
40
40
|
@gems_to_cleanup = nil
|
41
|
-
@original_home = nil
|
42
|
-
@original_path = nil
|
43
41
|
@primary_gems = nil
|
44
42
|
end
|
45
43
|
|
@@ -95,9 +93,6 @@ If no gems are named all gems in GEM_HOME are cleaned.
|
|
95
93
|
end
|
96
94
|
|
97
95
|
def clean_gems
|
98
|
-
@original_home = Gem.dir
|
99
|
-
@original_path = Gem.path
|
100
|
-
|
101
96
|
get_primary_gems
|
102
97
|
get_candidate_gems
|
103
98
|
get_gems_to_cleanup
|
@@ -112,8 +107,6 @@ If no gems are named all gems in GEM_HOME are cleaned.
|
|
112
107
|
deps.reverse_each do |spec|
|
113
108
|
uninstall_dep spec
|
114
109
|
end
|
115
|
-
|
116
|
-
Gem::Specification.reset
|
117
110
|
end
|
118
111
|
|
119
112
|
def get_candidate_gems
|
@@ -133,7 +126,7 @@ If no gems are named all gems in GEM_HOME are cleaned.
|
|
133
126
|
|
134
127
|
default_gems, gems_to_cleanup = gems_to_cleanup.partition(&:default_gem?)
|
135
128
|
|
136
|
-
uninstall_from = options[:user_install] ? Gem.user_dir :
|
129
|
+
uninstall_from = options[:user_install] ? Gem.user_dir : Gem.dir
|
137
130
|
|
138
131
|
gems_to_cleanup = gems_to_cleanup.select do |spec|
|
139
132
|
spec.base_dir == uninstall_from
|
@@ -181,8 +174,5 @@ If no gems are named all gems in GEM_HOME are cleaned.
|
|
181
174
|
say "Unable to uninstall #{spec.full_name}:"
|
182
175
|
say "\t#{e.class}: #{e.message}"
|
183
176
|
end
|
184
|
-
ensure
|
185
|
-
# Restore path Gem::Uninstaller may have changed
|
186
|
-
Gem.use_paths @original_home, *@original_path
|
187
177
|
end
|
188
178
|
end
|
data/lib/rubygems/errors.rb
CHANGED
@@ -30,6 +30,7 @@ module Gem
|
|
30
30
|
@name = name
|
31
31
|
@requirement = requirement
|
32
32
|
@extra_message = extra_message
|
33
|
+
super(message)
|
33
34
|
end
|
34
35
|
|
35
36
|
def message # :nodoc:
|
@@ -53,8 +54,8 @@ module Gem
|
|
53
54
|
attr_reader :specs
|
54
55
|
|
55
56
|
def initialize(name, requirement, specs)
|
56
|
-
super(name, requirement)
|
57
57
|
@specs = specs
|
58
|
+
super(name, requirement)
|
58
59
|
end
|
59
60
|
|
60
61
|
private
|
data/lib/rubygems/installer.rb
CHANGED
@@ -66,8 +66,6 @@ class Gem::Installer
|
|
66
66
|
|
67
67
|
attr_reader :package
|
68
68
|
|
69
|
-
@path_warning = false
|
70
|
-
|
71
69
|
class << self
|
72
70
|
#
|
73
71
|
# Changes in rubygems to lazily loading `rubygems/command` (in order to
|
@@ -86,11 +84,6 @@ class Gem::Installer
|
|
86
84
|
super(klass)
|
87
85
|
end
|
88
86
|
|
89
|
-
##
|
90
|
-
# True if we've warned about PATH not including Gem.bindir
|
91
|
-
|
92
|
-
attr_accessor :path_warning
|
93
|
-
|
94
87
|
##
|
95
88
|
# Overrides the executable format.
|
96
89
|
#
|
@@ -188,15 +181,6 @@ class Gem::Installer
|
|
188
181
|
@package.dir_mode = options[:dir_mode]
|
189
182
|
@package.prog_mode = options[:prog_mode]
|
190
183
|
@package.data_mode = options[:data_mode]
|
191
|
-
|
192
|
-
if @gem_home == Gem.user_dir
|
193
|
-
# If we get here, then one of the following likely happened:
|
194
|
-
# - `--user-install` was specified
|
195
|
-
# - `Gem::PathSupport#home` fell back to `Gem.user_dir`
|
196
|
-
# - GEM_HOME was manually set to `Gem.user_dir`
|
197
|
-
|
198
|
-
check_that_user_bin_dir_is_in_path
|
199
|
-
end
|
200
184
|
end
|
201
185
|
|
202
186
|
##
|
@@ -488,11 +472,21 @@ class Gem::Installer
|
|
488
472
|
end
|
489
473
|
|
490
474
|
def generate_bin # :nodoc:
|
491
|
-
|
475
|
+
executables = spec.executables
|
476
|
+
return if executables.nil? || executables.empty?
|
477
|
+
|
478
|
+
if @gem_home == Gem.user_dir
|
479
|
+
# If we get here, then one of the following likely happened:
|
480
|
+
# - `--user-install` was specified
|
481
|
+
# - `Gem::PathSupport#home` fell back to `Gem.user_dir`
|
482
|
+
# - GEM_HOME was manually set to `Gem.user_dir`
|
483
|
+
|
484
|
+
check_that_user_bin_dir_is_in_path(executables)
|
485
|
+
end
|
492
486
|
|
493
487
|
ensure_writable_dir @bin_dir
|
494
488
|
|
495
|
-
|
489
|
+
executables.each do |filename|
|
496
490
|
bin_path = File.join gem_dir, spec.bindir, filename
|
497
491
|
next unless File.exist? bin_path
|
498
492
|
|
@@ -694,9 +688,7 @@ class Gem::Installer
|
|
694
688
|
end
|
695
689
|
end
|
696
690
|
|
697
|
-
def check_that_user_bin_dir_is_in_path # :nodoc:
|
698
|
-
return if self.class.path_warning
|
699
|
-
|
691
|
+
def check_that_user_bin_dir_is_in_path(executables) # :nodoc:
|
700
692
|
user_bin_dir = @bin_dir || Gem.bindir(gem_home)
|
701
693
|
user_bin_dir = user_bin_dir.tr(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR
|
702
694
|
|
@@ -712,8 +704,7 @@ class Gem::Installer
|
|
712
704
|
|
713
705
|
unless path.include? user_bin_dir
|
714
706
|
unless !Gem.win_platform? && (path.include? user_bin_dir.sub(ENV["HOME"], "~"))
|
715
|
-
alert_warning "You don't have #{user_bin_dir} in your PATH,\n\t gem executables will not run."
|
716
|
-
self.class.path_warning = true
|
707
|
+
alert_warning "You don't have #{user_bin_dir} in your PATH,\n\t gem executables (#{executables.join(", ")}) will not run."
|
717
708
|
end
|
718
709
|
end
|
719
710
|
end
|
@@ -104,16 +104,21 @@ class Gem::Resolver::APISet < Gem::Resolver::Set
|
|
104
104
|
end
|
105
105
|
|
106
106
|
uri = @dep_uri + name
|
107
|
-
str = Gem::RemoteFetcher.fetcher.fetch_path uri
|
108
107
|
|
109
|
-
|
110
|
-
|
108
|
+
begin
|
109
|
+
str = Gem::RemoteFetcher.fetcher.fetch_path uri
|
110
|
+
rescue Gem::RemoteFetcher::FetchError
|
111
|
+
@data[name] = []
|
112
|
+
else
|
113
|
+
lines(str).each do |ver|
|
114
|
+
number, platform, dependencies, requirements = parse_gem(ver)
|
111
115
|
|
112
|
-
|
113
|
-
|
114
|
-
|
116
|
+
platform ||= "ruby"
|
117
|
+
dependencies = dependencies.map {|dep_name, reqs| [dep_name, reqs.join(", ")] }
|
118
|
+
requirements = requirements.map {|req_name, reqs| [req_name.to_sym, reqs] }.to_h
|
115
119
|
|
116
|
-
|
120
|
+
@data[name] << { name: name, number: number, platform: platform, dependencies: dependencies, requirements: requirements }
|
121
|
+
end
|
117
122
|
end
|
118
123
|
|
119
124
|
@data[name]
|
@@ -176,19 +176,12 @@ class Gem::SpecFetcher
|
|
176
176
|
|
177
177
|
matches = names.map do |n|
|
178
178
|
next unless n.match_platform?
|
179
|
-
|
179
|
+
distance = levenshtein_distance gem_name, n.name.downcase.tr("_-", "")
|
180
|
+
next if distance >= max
|
181
|
+
return [n.name] if distance == 0
|
182
|
+
[n.name, distance]
|
180
183
|
end.compact
|
181
184
|
|
182
|
-
if matches.length < num_results
|
183
|
-
matches += names.map do |n|
|
184
|
-
next unless n.match_platform?
|
185
|
-
distance = levenshtein_distance gem_name, n.name.downcase.tr("_-", "")
|
186
|
-
next if distance >= max
|
187
|
-
return [n.name] if distance == 0
|
188
|
-
[n.name, distance]
|
189
|
-
end.compact
|
190
|
-
end
|
191
|
-
|
192
185
|
matches = if matches.empty? && type != :prerelease
|
193
186
|
suggest_gems_from_name gem_name, :prerelease
|
194
187
|
else
|
@@ -1208,7 +1208,7 @@ class Gem::Specification < Gem::BasicSpecification
|
|
1208
1208
|
unresolved.values.each do |dep|
|
1209
1209
|
warn " #{dep}"
|
1210
1210
|
|
1211
|
-
versions = find_all_by_name(dep.name)
|
1211
|
+
versions = find_all_by_name(dep.name).uniq(&:full_name)
|
1212
1212
|
unless versions.empty?
|
1213
1213
|
warn " Available/installed versions of this gem:"
|
1214
1214
|
versions.each {|s| warn " - #{s.version}" }
|
@@ -1412,7 +1412,7 @@ class Gem::Specification < Gem::BasicSpecification
|
|
1412
1412
|
end
|
1413
1413
|
|
1414
1414
|
begin
|
1415
|
-
specs = spec_dep.to_specs
|
1415
|
+
specs = spec_dep.to_specs.uniq(&:full_name)
|
1416
1416
|
rescue Gem::MissingSpecError => e
|
1417
1417
|
raise Gem::MissingSpecError.new(e.name, e.requirement, "at: #{spec_file}")
|
1418
1418
|
end
|
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.5.
|
5
|
+
s.version = "3.5.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
|
|
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.5.
|
4
|
+
version: 3.5.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Weirich
|
@@ -16,7 +16,7 @@ authors:
|
|
16
16
|
autorequire:
|
17
17
|
bindir: exe
|
18
18
|
cert_chain: []
|
19
|
-
date: 2024-
|
19
|
+
date: 2024-10-03 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
|
@@ -737,7 +737,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
737
737
|
- !ruby/object:Gem::Version
|
738
738
|
version: '0'
|
739
739
|
requirements: []
|
740
|
-
rubygems_version: 3.5.
|
740
|
+
rubygems_version: 3.5.21
|
741
741
|
signing_key:
|
742
742
|
specification_version: 4
|
743
743
|
summary: RubyGems is a package management framework for Ruby. This gem is downloaded
|