rubygems-update 3.6.6 → 3.6.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 +26 -0
- data/Manifest.txt +2 -1
- data/README.md +1 -1
- data/bundler/CHANGELOG.md +37 -6
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/checksum.rb +21 -11
- data/bundler/lib/bundler/compact_index_client/cache.rb +1 -1
- data/bundler/lib/bundler/compact_index_client/parser.rb +1 -1
- data/bundler/lib/bundler/definition.rb +90 -65
- data/bundler/lib/bundler/dsl.rb +2 -3
- data/bundler/lib/bundler/friendly_errors.rb +1 -1
- data/bundler/lib/bundler/installer.rb +1 -1
- data/bundler/lib/bundler/lazy_specification.rb +9 -1
- data/bundler/lib/bundler/lockfile_parser.rb +8 -5
- data/bundler/lib/bundler/plugin/api/source.rb +1 -1
- data/bundler/lib/bundler/plugin/installer/path.rb +8 -0
- data/bundler/lib/bundler/plugin.rb +1 -1
- data/bundler/lib/bundler/resolver/candidate.rb +1 -1
- data/bundler/lib/bundler/resolver/strategy.rb +40 -0
- data/bundler/lib/bundler/resolver.rb +11 -22
- data/bundler/lib/bundler/rubygems_ext.rb +15 -0
- data/bundler/lib/bundler/runtime.rb +8 -5
- data/bundler/lib/bundler/source/gemspec.rb +1 -4
- data/bundler/lib/bundler/source/git/git_proxy.rb +8 -3
- data/bundler/lib/bundler/source/path.rb +2 -2
- data/bundler/lib/bundler/source_list.rb +29 -11
- data/bundler/lib/bundler/spec_set.rb +27 -10
- data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +53 -3
- data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +1 -1
- data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +11 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb +4 -24
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/strategy.rb +42 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb +20 -8
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +17 -29
- data/bundler/lib/bundler/version.rb +1 -1
- data/doc/rubygems/CONTRIBUTING.md +0 -4
- data/lib/rubygems/commands/exec_command.rb +15 -6
- data/lib/rubygems/defaults.rb +1 -1
- data/lib/rubygems/resolver/api_set/gem_parser.rb +2 -5
- data/lib/rubygems/specification.rb +5 -5
- data/lib/rubygems/version.rb +22 -4
- data/lib/rubygems.rb +10 -7
- data/rubygems-update.gemspec +1 -1
- metadata +11 -10
- data/bundler/lib/bundler/compact_index_client/gem_parser.rb +0 -32
@@ -76,6 +76,9 @@ module Bundler::PubGrub
|
|
76
76
|
end
|
77
77
|
|
78
78
|
def initialize(min: nil, max: nil, include_min: false, include_max: false, name: nil)
|
79
|
+
raise ArgumentError, "Ranges without a lower bound cannot have include_min == true" if !min && include_min == true
|
80
|
+
raise ArgumentError, "Ranges without an upper bound cannot have include_max == true" if !max && include_max == true
|
81
|
+
|
79
82
|
@min = min
|
80
83
|
@max = max
|
81
84
|
@include_min = include_min
|
@@ -311,10 +314,19 @@ module Bundler::PubGrub
|
|
311
314
|
|
312
315
|
def contiguous_to?(other)
|
313
316
|
return false if other.empty?
|
317
|
+
return true if any?
|
318
|
+
|
319
|
+
intersects?(other) || contiguous_below?(other) || contiguous_above?(other)
|
320
|
+
end
|
321
|
+
|
322
|
+
def contiguous_below?(other)
|
323
|
+
return false if !max || !other.min
|
324
|
+
|
325
|
+
max == other.min && (include_max || other.include_min)
|
326
|
+
end
|
314
327
|
|
315
|
-
|
316
|
-
|
317
|
-
(max == other.min && (include_max || other.include_min))
|
328
|
+
def contiguous_above?(other)
|
329
|
+
other.contiguous_below?(self)
|
318
330
|
end
|
319
331
|
|
320
332
|
def allows_all?(other)
|
@@ -375,15 +387,15 @@ module Bundler::PubGrub
|
|
375
387
|
def invert
|
376
388
|
return self.class.empty if any?
|
377
389
|
|
378
|
-
low = VersionRange.new(max: min, include_max: !include_min)
|
379
|
-
high = VersionRange.new(min: max, include_min: !include_max)
|
390
|
+
low = -> { VersionRange.new(max: min, include_max: !include_min) }
|
391
|
+
high = -> { VersionRange.new(min: max, include_min: !include_max) }
|
380
392
|
|
381
393
|
if !min
|
382
|
-
high
|
394
|
+
high.call
|
383
395
|
elsif !max
|
384
|
-
low
|
396
|
+
low.call
|
385
397
|
else
|
386
|
-
low.union(high)
|
398
|
+
low.call.union(high.call)
|
387
399
|
end
|
388
400
|
end
|
389
401
|
|
@@ -2,17 +2,20 @@ require_relative 'partial_solution'
|
|
2
2
|
require_relative 'term'
|
3
3
|
require_relative 'incompatibility'
|
4
4
|
require_relative 'solve_failure'
|
5
|
+
require_relative 'strategy'
|
5
6
|
|
6
7
|
module Bundler::PubGrub
|
7
8
|
class VersionSolver
|
8
9
|
attr_reader :logger
|
9
10
|
attr_reader :source
|
10
11
|
attr_reader :solution
|
12
|
+
attr_reader :strategy
|
11
13
|
|
12
|
-
def initialize(source:, root: Package.root, logger: Bundler::PubGrub.logger)
|
14
|
+
def initialize(source:, root: Package.root, strategy: Strategy.new(source), logger: Bundler::PubGrub.logger)
|
13
15
|
@logger = logger
|
14
16
|
|
15
17
|
@source = source
|
18
|
+
@strategy = strategy
|
16
19
|
|
17
20
|
# { package => [incompatibility, ...]}
|
18
21
|
@incompatibilities = Hash.new do |h, k|
|
@@ -36,26 +39,25 @@ module Bundler::PubGrub
|
|
36
39
|
|
37
40
|
# Returns true if there is more work to be done, false otherwise
|
38
41
|
def work
|
39
|
-
|
40
|
-
|
41
|
-
next_package = choose_package_version
|
42
|
-
propagate(next_package)
|
43
|
-
|
44
|
-
if solved?
|
42
|
+
unsatisfied_terms = solution.unsatisfied
|
43
|
+
if unsatisfied_terms.empty?
|
45
44
|
logger.info { "Solution found after #{solution.attempted_solutions} attempts:" }
|
46
45
|
solution.decisions.each do |package, version|
|
47
46
|
next if Package.root?(package)
|
48
47
|
logger.info { "* #{package} #{version}" }
|
49
48
|
end
|
50
49
|
|
51
|
-
false
|
52
|
-
else
|
53
|
-
true
|
50
|
+
return false
|
54
51
|
end
|
52
|
+
|
53
|
+
next_package = choose_package_version_from(unsatisfied_terms)
|
54
|
+
propagate(next_package)
|
55
|
+
|
56
|
+
true
|
55
57
|
end
|
56
58
|
|
57
59
|
def solve
|
58
|
-
work
|
60
|
+
while work; end
|
59
61
|
|
60
62
|
solution.decisions
|
61
63
|
end
|
@@ -105,29 +107,15 @@ module Bundler::PubGrub
|
|
105
107
|
unsatisfied.package
|
106
108
|
end
|
107
109
|
|
108
|
-
def
|
109
|
-
|
110
|
-
package = term.package
|
111
|
-
range = term.constraint.range
|
112
|
-
matching_versions = source.versions_for(package, range)
|
113
|
-
higher_versions = source.versions_for(package, range.upper_invert)
|
110
|
+
def choose_package_version_from(unsatisfied_terms)
|
111
|
+
remaining = unsatisfied_terms.map { |t| [t.package, t.constraint.range] }.to_h
|
114
112
|
|
115
|
-
|
116
|
-
end.package
|
117
|
-
end
|
118
|
-
|
119
|
-
def choose_package_version
|
120
|
-
if solution.unsatisfied.empty?
|
121
|
-
logger.info "No packages unsatisfied. Solving complete!"
|
122
|
-
return nil
|
123
|
-
end
|
113
|
+
package, version = strategy.next_package_and_version(remaining)
|
124
114
|
|
125
|
-
package = next_package_to_try
|
126
|
-
unsatisfied_term = solution.unsatisfied.find { |t| t.package == package }
|
127
|
-
version = source.versions_for(package, unsatisfied_term.constraint.range).first
|
128
115
|
logger.debug { "attempting #{package} #{version}" }
|
129
116
|
|
130
117
|
if version.nil?
|
118
|
+
unsatisfied_term = unsatisfied_terms.find { |t| t.package == package }
|
131
119
|
add_incompatibility source.no_versions_incompatibility_for(package, unsatisfied_term)
|
132
120
|
return package
|
133
121
|
end
|
@@ -70,10 +70,6 @@ And to run an individual test method named `test_default` within a test file, yo
|
|
70
70
|
|
71
71
|
### Running bundler tests
|
72
72
|
|
73
|
-
To setup bundler tests:
|
74
|
-
|
75
|
-
bin/rake spec:parallel_deps
|
76
|
-
|
77
73
|
To run the entire bundler test suite in parallel (it takes a while), run the following from the `bundler/` subfolder:
|
78
74
|
|
79
75
|
bin/parallel_rspec
|
@@ -195,7 +195,7 @@ to the same gem path as user-installed gems.
|
|
195
195
|
argv = ARGV.clone
|
196
196
|
ARGV.replace options[:args]
|
197
197
|
|
198
|
-
|
198
|
+
executable = options[:executable]
|
199
199
|
|
200
200
|
contains_executable = Gem.loaded_specs.values.select do |spec|
|
201
201
|
spec.executables.include?(executable)
|
@@ -206,13 +206,22 @@ to the same gem path as user-installed gems.
|
|
206
206
|
end
|
207
207
|
|
208
208
|
if contains_executable.empty?
|
209
|
-
|
210
|
-
|
211
|
-
|
209
|
+
spec = Gem.loaded_specs[executable]
|
210
|
+
|
211
|
+
if spec.nil? || spec.executables.empty?
|
212
212
|
alert_error "Failed to load executable `#{executable}`," \
|
213
213
|
" are you sure the gem `#{options[:gem_name]}` contains it?"
|
214
214
|
terminate_interaction 1
|
215
215
|
end
|
216
|
+
|
217
|
+
if spec.executables.size > 1
|
218
|
+
alert_error "Ambiguous which executable from gem `#{executable}` should be run: " \
|
219
|
+
"the options are #{spec.executables.sort}, specify one via COMMAND, and use `-g` and `-v` to specify gem and version"
|
220
|
+
terminate_interaction 1
|
221
|
+
end
|
222
|
+
|
223
|
+
contains_executable << spec
|
224
|
+
executable = spec.executable
|
216
225
|
end
|
217
226
|
|
218
227
|
if contains_executable.size > 1
|
@@ -223,8 +232,8 @@ to the same gem path as user-installed gems.
|
|
223
232
|
end
|
224
233
|
|
225
234
|
old_exe = $0
|
226
|
-
$0 =
|
227
|
-
load Gem.activate_bin_path(contains_executable.first.name,
|
235
|
+
$0 = executable
|
236
|
+
load Gem.activate_bin_path(contains_executable.first.name, executable, ">= 0.a")
|
228
237
|
ensure
|
229
238
|
$0 = old_exe if old_exe
|
230
239
|
ARGV.replace argv
|
data/lib/rubygems/defaults.rb
CHANGED
@@ -239,7 +239,7 @@ module Gem
|
|
239
239
|
# Enables automatic installation into user directory
|
240
240
|
|
241
241
|
def self.default_user_install # :nodoc:
|
242
|
-
if !ENV.key?("GEM_HOME") &&
|
242
|
+
if !ENV.key?("GEM_HOME") && File.exist?(Gem.dir) && !File.writable?(Gem.dir)
|
243
243
|
Gem.ui.say "Defaulting to user installation because default installation directory (#{Gem.dir}) is not writable."
|
244
244
|
return true
|
245
245
|
end
|
@@ -1,15 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
class Gem::Resolver::APISet::GemParser
|
4
|
-
EMPTY_ARRAY = [].freeze
|
5
|
-
private_constant :EMPTY_ARRAY
|
6
|
-
|
7
4
|
def parse(line)
|
8
5
|
version_and_platform, rest = line.split(" ", 2)
|
9
6
|
version, platform = version_and_platform.split("-", 2)
|
10
7
|
dependencies, requirements = rest.split("|", 2).map! {|s| s.split(",") } if rest
|
11
|
-
dependencies = dependencies ? dependencies.map! {|d| parse_dependency(d) } :
|
12
|
-
requirements = requirements ? requirements.map! {|d| parse_dependency(d) } :
|
8
|
+
dependencies = dependencies ? dependencies.map! {|d| parse_dependency(d) } : []
|
9
|
+
requirements = requirements ? requirements.map! {|d| parse_dependency(d) } : []
|
13
10
|
[version, platform, dependencies, requirements]
|
14
11
|
end
|
15
12
|
|
@@ -2144,11 +2144,11 @@ class Gem::Specification < Gem::BasicSpecification
|
|
2144
2144
|
@files.concat(@extra_rdoc_files)
|
2145
2145
|
end
|
2146
2146
|
|
2147
|
-
@files = @files.uniq if @files
|
2148
|
-
@extensions = @extensions.uniq if @extensions
|
2149
|
-
@test_files = @test_files.uniq if @test_files
|
2150
|
-
@executables = @executables.uniq if @executables
|
2151
|
-
@extra_rdoc_files = @extra_rdoc_files.uniq if @extra_rdoc_files
|
2147
|
+
@files = @files.uniq.sort if @files
|
2148
|
+
@extensions = @extensions.uniq.sort if @extensions
|
2149
|
+
@test_files = @test_files.uniq.sort if @test_files
|
2150
|
+
@executables = @executables.uniq.sort if @executables
|
2151
|
+
@extra_rdoc_files = @extra_rdoc_files.uniq.sort if @extra_rdoc_files
|
2152
2152
|
end
|
2153
2153
|
|
2154
2154
|
##
|
data/lib/rubygems/version.rb
CHANGED
@@ -368,13 +368,13 @@ class Gem::Version
|
|
368
368
|
|
369
369
|
lhsize = lhsegments.size
|
370
370
|
rhsize = rhsegments.size
|
371
|
-
limit = (lhsize > rhsize ?
|
371
|
+
limit = (lhsize > rhsize ? rhsize : lhsize)
|
372
372
|
|
373
373
|
i = 0
|
374
374
|
|
375
|
-
while i
|
376
|
-
lhs = lhsegments[i]
|
377
|
-
rhs = rhsegments[i]
|
375
|
+
while i < limit
|
376
|
+
lhs = lhsegments[i]
|
377
|
+
rhs = rhsegments[i]
|
378
378
|
i += 1
|
379
379
|
|
380
380
|
next if lhs == rhs
|
@@ -384,6 +384,24 @@ class Gem::Version
|
|
384
384
|
return lhs <=> rhs
|
385
385
|
end
|
386
386
|
|
387
|
+
lhs = lhsegments[i]
|
388
|
+
|
389
|
+
if lhs.nil?
|
390
|
+
rhs = rhsegments[i]
|
391
|
+
|
392
|
+
while i < rhsize
|
393
|
+
return 1 if String === rhs
|
394
|
+
return -1 unless rhs.zero?
|
395
|
+
rhs = rhsegments[i += 1]
|
396
|
+
end
|
397
|
+
else
|
398
|
+
while i < lhsize
|
399
|
+
return -1 if String === lhs
|
400
|
+
return 1 unless lhs.zero?
|
401
|
+
lhs = lhsegments[i += 1]
|
402
|
+
end
|
403
|
+
end
|
404
|
+
|
387
405
|
0
|
388
406
|
end
|
389
407
|
|
data/lib/rubygems.rb
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
require "rbconfig"
|
10
10
|
|
11
11
|
module Gem
|
12
|
-
VERSION = "3.6.
|
12
|
+
VERSION = "3.6.8"
|
13
13
|
end
|
14
14
|
|
15
15
|
# Must be first since it unloads the prelude from 1.9.2
|
@@ -156,6 +156,13 @@ module Gem
|
|
156
156
|
specifications/default
|
157
157
|
].freeze
|
158
158
|
|
159
|
+
##
|
160
|
+
# The default value for SOURCE_DATE_EPOCH if not specified.
|
161
|
+
# We want a date after 1980-01-01, to prevent issues with Zip files.
|
162
|
+
# This particular timestamp is for 1980-01-02 00:00:00 GMT.
|
163
|
+
|
164
|
+
DEFAULT_SOURCE_DATE_EPOCH = 315_619_200
|
165
|
+
|
159
166
|
@@win_platform = nil
|
160
167
|
|
161
168
|
@configuration = nil
|
@@ -1155,8 +1162,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
1155
1162
|
|
1156
1163
|
##
|
1157
1164
|
# If the SOURCE_DATE_EPOCH environment variable is set, returns it's value.
|
1158
|
-
# Otherwise, returns
|
1159
|
-
# first called in the same format as SOURCE_DATE_EPOCH.
|
1165
|
+
# Otherwise, returns DEFAULT_SOURCE_DATE_EPOCH as a string.
|
1160
1166
|
#
|
1161
1167
|
# NOTE(@duckinator): The implementation is a tad weird because we want to:
|
1162
1168
|
# 1. Make builds reproducible by default, by having this function always
|
@@ -1171,15 +1177,12 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
1171
1177
|
# https://reproducible-builds.org/specs/source-date-epoch/
|
1172
1178
|
|
1173
1179
|
def self.source_date_epoch_string
|
1174
|
-
# The value used if $SOURCE_DATE_EPOCH is not set.
|
1175
|
-
@default_source_date_epoch ||= Time.now.to_i.to_s
|
1176
|
-
|
1177
1180
|
specified_epoch = ENV["SOURCE_DATE_EPOCH"]
|
1178
1181
|
|
1179
1182
|
# If it's empty or just whitespace, treat it like it wasn't set at all.
|
1180
1183
|
specified_epoch = nil if !specified_epoch.nil? && specified_epoch.strip.empty?
|
1181
1184
|
|
1182
|
-
epoch = specified_epoch ||
|
1185
|
+
epoch = specified_epoch || DEFAULT_SOURCE_DATE_EPOCH.to_s
|
1183
1186
|
|
1184
1187
|
epoch.strip
|
1185
1188
|
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.6.
|
5
|
+
s.version = "3.6.8"
|
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.6.
|
4
|
+
version: 3.6.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Weirich
|
@@ -15,7 +15,7 @@ authors:
|
|
15
15
|
- Hiroshi SHIBATA
|
16
16
|
bindir: exe
|
17
17
|
cert_chain: []
|
18
|
-
date:
|
18
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
19
19
|
dependencies: []
|
20
20
|
description: |-
|
21
21
|
A package (also known as a library) contains a set of functionality
|
@@ -38,18 +38,13 @@ executables:
|
|
38
38
|
- update_rubygems
|
39
39
|
extensions: []
|
40
40
|
extra_rdoc_files:
|
41
|
+
- CODE_OF_CONDUCT.md
|
41
42
|
- LICENSE.txt
|
42
|
-
- doc/MAINTAINERS.txt
|
43
43
|
- MIT.txt
|
44
44
|
- Manifest.txt
|
45
45
|
- README.md
|
46
|
-
- doc/rubygems/UPGRADING.md
|
47
|
-
- doc/rubygems/POLICIES.md
|
48
|
-
- CODE_OF_CONDUCT.md
|
49
|
-
- doc/rubygems/CONTRIBUTING.md
|
50
46
|
- bundler/LICENSE.md
|
51
47
|
- bundler/README.md
|
52
|
-
- hide_lib_for_update/note.txt
|
53
48
|
- bundler/lib/bundler/man/bundle-add.1
|
54
49
|
- bundler/lib/bundler/man/bundle-binstubs.1
|
55
50
|
- bundler/lib/bundler/man/bundle-cache.1
|
@@ -82,6 +77,11 @@ extra_rdoc_files:
|
|
82
77
|
- bundler/lib/bundler/man/bundle-version.1
|
83
78
|
- bundler/lib/bundler/man/bundle-viz.1
|
84
79
|
- bundler/lib/bundler/man/bundle.1
|
80
|
+
- doc/MAINTAINERS.txt
|
81
|
+
- doc/rubygems/CONTRIBUTING.md
|
82
|
+
- doc/rubygems/POLICIES.md
|
83
|
+
- doc/rubygems/UPGRADING.md
|
84
|
+
- hide_lib_for_update/note.txt
|
85
85
|
files:
|
86
86
|
- CHANGELOG.md
|
87
87
|
- CODE_OF_CONDUCT.md
|
@@ -133,7 +133,6 @@ files:
|
|
133
133
|
- bundler/lib/bundler/compact_index_client.rb
|
134
134
|
- bundler/lib/bundler/compact_index_client/cache.rb
|
135
135
|
- bundler/lib/bundler/compact_index_client/cache_file.rb
|
136
|
-
- bundler/lib/bundler/compact_index_client/gem_parser.rb
|
137
136
|
- bundler/lib/bundler/compact_index_client/parser.rb
|
138
137
|
- bundler/lib/bundler/compact_index_client/updater.rb
|
139
138
|
- bundler/lib/bundler/constants.rb
|
@@ -266,6 +265,7 @@ files:
|
|
266
265
|
- bundler/lib/bundler/resolver/package.rb
|
267
266
|
- bundler/lib/bundler/resolver/root.rb
|
268
267
|
- bundler/lib/bundler/resolver/spec_group.rb
|
268
|
+
- bundler/lib/bundler/resolver/strategy.rb
|
269
269
|
- bundler/lib/bundler/retry.rb
|
270
270
|
- bundler/lib/bundler/ruby_dsl.rb
|
271
271
|
- bundler/lib/bundler/ruby_version.rb
|
@@ -366,6 +366,7 @@ files:
|
|
366
366
|
- bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb
|
367
367
|
- bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb
|
368
368
|
- bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb
|
369
|
+
- bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/strategy.rb
|
369
370
|
- bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/term.rb
|
370
371
|
- bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version.rb
|
371
372
|
- bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb
|
@@ -746,7 +747,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
746
747
|
- !ruby/object:Gem::Version
|
747
748
|
version: '0'
|
748
749
|
requirements: []
|
749
|
-
rubygems_version: 3.6.
|
750
|
+
rubygems_version: 3.6.8
|
750
751
|
specification_version: 4
|
751
752
|
summary: RubyGems is a package management framework for Ruby. This gem is downloaded
|
752
753
|
and installed by `gem update --system`, so that the `gem` CLI can update itself.
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Bundler
|
4
|
-
class CompactIndexClient
|
5
|
-
if defined?(Gem::Resolver::APISet::GemParser)
|
6
|
-
GemParser = Gem::Resolver::APISet::GemParser
|
7
|
-
else
|
8
|
-
class GemParser
|
9
|
-
EMPTY_ARRAY = [].freeze
|
10
|
-
private_constant :EMPTY_ARRAY
|
11
|
-
|
12
|
-
def parse(line)
|
13
|
-
version_and_platform, rest = line.split(" ", 2)
|
14
|
-
version, platform = version_and_platform.split("-", 2)
|
15
|
-
dependencies, requirements = rest.split("|", 2).map! {|s| s.split(",") } if rest
|
16
|
-
dependencies = dependencies ? dependencies.map! {|d| parse_dependency(d) } : EMPTY_ARRAY
|
17
|
-
requirements = requirements ? requirements.map! {|d| parse_dependency(d) } : EMPTY_ARRAY
|
18
|
-
[version, platform, dependencies, requirements]
|
19
|
-
end
|
20
|
-
|
21
|
-
private
|
22
|
-
|
23
|
-
def parse_dependency(string)
|
24
|
-
dependency = string.split(":")
|
25
|
-
dependency[-1] = dependency[-1].split("&") if dependency.size > 1
|
26
|
-
dependency[0] = -dependency[0]
|
27
|
-
dependency
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|