rubygems-update 3.5.4 → 3.5.6
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 +48 -1
- data/Manifest.txt +77 -60
- data/POLICIES.md +5 -5
- data/bundler/CHANGELOG.md +27 -1
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli/gem.rb +1 -1
- data/bundler/lib/bundler/cli/lock.rb +5 -4
- data/bundler/lib/bundler/cli.rb +1 -1
- data/bundler/lib/bundler/compact_index_client/updater.rb +4 -4
- data/bundler/lib/bundler/definition.rb +54 -28
- data/bundler/lib/bundler/dsl.rb +7 -7
- data/bundler/lib/bundler/environment_preserver.rb +3 -3
- data/bundler/lib/bundler/fetcher/downloader.rb +1 -1
- data/bundler/lib/bundler/fetcher.rb +2 -2
- data/bundler/lib/bundler/injector.rb +1 -1
- data/bundler/lib/bundler/installer.rb +2 -2
- data/bundler/lib/bundler/man/bundle-config.1 +2 -2
- data/bundler/lib/bundler/man/bundle-config.1.ronn +2 -2
- data/bundler/lib/bundler/mirror.rb +3 -3
- data/bundler/lib/bundler/plugin/api/source.rb +2 -2
- data/bundler/lib/bundler/runtime.rb +1 -1
- data/bundler/lib/bundler/settings.rb +4 -4
- data/bundler/lib/bundler/source/git/git_proxy.rb +1 -1
- data/bundler/lib/bundler/source/git.rb +1 -1
- data/bundler/lib/bundler/source/rubygems/remote.rb +1 -1
- data/bundler/lib/bundler/source/rubygems.rb +2 -2
- data/bundler/lib/bundler/spec_set.rb +1 -1
- data/bundler/lib/bundler/uri_credentials_filter.rb +2 -2
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +22 -22
- data/bundler/lib/bundler/vendored_uri.rb +18 -1
- data/bundler/lib/bundler/version.rb +1 -1
- data/bundler/lib/bundler/yaml_serializer.rb +12 -0
- data/bundler/lib/bundler.rb +3 -2
- data/lib/rubygems/commands/sources_command.rb +2 -2
- data/lib/rubygems/core_ext/kernel_require.rb +11 -2
- data/lib/rubygems/defaults.rb +1 -1
- data/lib/rubygems/gemcutter_utilities/webauthn_listener.rb +1 -1
- data/lib/rubygems/gemcutter_utilities.rb +39 -22
- data/lib/rubygems/local_remote_options.rb +6 -6
- data/lib/rubygems/net/http.rb +1 -1
- data/lib/rubygems/optparse.rb +1 -1
- data/lib/rubygems/remote_fetcher.rb +2 -2
- data/lib/rubygems/request.rb +4 -4
- data/lib/rubygems/requirement.rb +5 -0
- data/lib/rubygems/resolver/api_set.rb +1 -1
- data/lib/rubygems/resolver/best_set.rb +1 -1
- data/lib/rubygems/resolver.rb +5 -5
- data/lib/rubygems/s3_uri_signer.rb +2 -2
- data/lib/rubygems/source/git.rb +2 -2
- data/lib/rubygems/source_list.rb +1 -1
- data/lib/rubygems/specification.rb +6 -6
- data/lib/rubygems/specification_policy.rb +6 -6
- data/lib/rubygems/timeout.rb +1 -1
- data/lib/rubygems/tsort.rb +1 -1
- data/lib/rubygems/uri.rb +6 -6
- data/lib/rubygems/util.rb +1 -1
- data/lib/rubygems/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +57 -0
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/delegates/specification_provider.rb +11 -11
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/action.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/log.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/set_payload.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/tag.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/vertex.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/errors.rb +1 -1
- data/lib/rubygems/vendor/molinillo/lib/molinillo/gem_metadata.rb +6 -0
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/modules/specification_provider.rb +2 -2
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/modules/ui.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/resolution.rb +3 -3
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/resolver.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/state.rb +1 -1
- data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo.rb +2 -2
- data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/generic_request.rb +9 -9
- data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/header.rb +2 -2
- data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/request.rb +3 -3
- data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/requests.rb +30 -30
- data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/response.rb +2 -2
- data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/responses.rb +6 -6
- data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/status.rb +1 -1
- data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http.rb +15 -15
- data/lib/rubygems/{net-http → vendor/net-http}/lib/net/https.rb +1 -1
- data/lib/rubygems/vendor/optparse/lib/optparse/uri.rb +7 -0
- data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse.rb +11 -11
- data/lib/rubygems/{timeout → vendor/timeout}/lib/timeout.rb +1 -1
- data/lib/rubygems/{tsort → vendor/tsort}/lib/tsort.rb +2 -2
- data/lib/rubygems/vendor/uri/.document +1 -0
- data/lib/rubygems/vendor/uri/LICENSE.txt +22 -0
- data/lib/rubygems/vendor/uri/lib/uri/common.rb +853 -0
- data/lib/rubygems/vendor/uri/lib/uri/file.rb +100 -0
- data/lib/rubygems/vendor/uri/lib/uri/ftp.rb +267 -0
- data/lib/rubygems/vendor/uri/lib/uri/generic.rb +1588 -0
- data/lib/rubygems/vendor/uri/lib/uri/http.rb +125 -0
- data/lib/rubygems/vendor/uri/lib/uri/https.rb +23 -0
- data/lib/rubygems/vendor/uri/lib/uri/ldap.rb +261 -0
- data/lib/rubygems/vendor/uri/lib/uri/ldaps.rb +22 -0
- data/lib/rubygems/vendor/uri/lib/uri/mailto.rb +293 -0
- data/lib/rubygems/vendor/uri/lib/uri/rfc2396_parser.rb +539 -0
- data/lib/rubygems/vendor/uri/lib/uri/rfc3986_parser.rb +183 -0
- data/lib/rubygems/vendor/uri/lib/uri/version.rb +6 -0
- data/lib/rubygems/vendor/uri/lib/uri/ws.rb +83 -0
- data/lib/rubygems/vendor/uri/lib/uri/wss.rb +23 -0
- data/lib/rubygems/vendor/uri/lib/uri.rb +104 -0
- data/lib/rubygems/vendored_molinillo.rb +3 -0
- data/lib/rubygems/yaml_serializer.rb +12 -0
- data/lib/rubygems.rb +8 -1
- data/rubygems-update.gemspec +7 -2
- metadata +83 -63
- data/lib/rubygems/optparse/lib/optparse/uri.rb +0 -7
- data/lib/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb +0 -57
- data/lib/rubygems/resolver/molinillo/lib/molinillo/gem_metadata.rb +0 -6
- data/lib/rubygems/resolver/molinillo.rb +0 -3
- /data/lib/rubygems/{net-http → vendor/molinillo}/.document +0 -0
- /data/lib/rubygems/{resolver → vendor}/molinillo/LICENSE +0 -0
- /data/lib/rubygems/{net-protocol → vendor/net-http}/.document +0 -0
- /data/lib/rubygems/{net-http → vendor/net-http}/LICENSE.txt +0 -0
- /data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/backward.rb +0 -0
- /data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/exceptions.rb +0 -0
- /data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/proxy_delta.rb +0 -0
- /data/lib/rubygems/{optparse → vendor/net-protocol}/.document +0 -0
- /data/lib/rubygems/{net-protocol → vendor/net-protocol}/LICENSE.txt +0 -0
- /data/lib/rubygems/{net-protocol → vendor/net-protocol}/lib/net/protocol.rb +0 -0
- /data/lib/rubygems/{resolv → vendor/optparse}/.document +0 -0
- /data/lib/rubygems/{optparse → vendor/optparse}/COPYING +0 -0
- /data/lib/rubygems/{optparse → vendor/optparse}/lib/optionparser.rb +0 -0
- /data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/ac.rb +0 -0
- /data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/date.rb +0 -0
- /data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/kwargs.rb +0 -0
- /data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/shellwords.rb +0 -0
- /data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/time.rb +0 -0
- /data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/version.rb +0 -0
- /data/lib/rubygems/{resolver/molinillo → vendor/resolv}/.document +0 -0
- /data/lib/rubygems/{resolv → vendor/resolv}/LICENSE.txt +0 -0
- /data/lib/rubygems/{resolv → vendor/resolv}/lib/resolv.rb +0 -0
- /data/lib/rubygems/{timeout → vendor/timeout}/.document +0 -0
- /data/lib/rubygems/{timeout → vendor/timeout}/LICENSE.txt +0 -0
- /data/lib/rubygems/{tsort → vendor/tsort}/.document +0 -0
- /data/lib/rubygems/{tsort → vendor/tsort}/LICENSE.txt +0 -0
data/lib/rubygems/request.rb
CHANGED
@@ -18,11 +18,11 @@ class Gem::Request
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def self.proxy_uri(proxy) # :nodoc:
|
21
|
-
|
21
|
+
require_relative "vendor/uri/lib/uri"
|
22
22
|
case proxy
|
23
23
|
when :no_proxy then nil
|
24
|
-
when URI::HTTP then proxy
|
25
|
-
else URI.parse(proxy)
|
24
|
+
when Gem::URI::HTTP then proxy
|
25
|
+
else Gem::URI.parse(proxy)
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
@@ -176,7 +176,7 @@ class Gem::Request
|
|
176
176
|
end
|
177
177
|
|
178
178
|
require "uri"
|
179
|
-
uri = URI(Gem::UriFormatter.new(env_proxy).normalize)
|
179
|
+
uri = Gem::URI(Gem::UriFormatter.new(env_proxy).normalize)
|
180
180
|
|
181
181
|
if uri && uri.user.nil? && uri.password.nil?
|
182
182
|
user = ENV["#{downcase_scheme}_proxy_user"] || ENV["#{upcase_scheme}_PROXY_USER"]
|
data/lib/rubygems/requirement.rb
CHANGED
@@ -284,6 +284,11 @@ class Gem::Requirement
|
|
284
284
|
def _tilde_requirements
|
285
285
|
@_tilde_requirements ||= _sorted_requirements.select {|r| r.first == "~>" }
|
286
286
|
end
|
287
|
+
|
288
|
+
def initialize_copy(other) # :nodoc:
|
289
|
+
@requirements = other.requirements.dup
|
290
|
+
super
|
291
|
+
end
|
287
292
|
end
|
288
293
|
|
289
294
|
class Gem::Version
|
@@ -30,7 +30,7 @@ class Gem::Resolver::APISet < Gem::Resolver::Set
|
|
30
30
|
def initialize(dep_uri = "https://index.rubygems.org/info/")
|
31
31
|
super()
|
32
32
|
|
33
|
-
dep_uri = URI dep_uri unless URI === dep_uri
|
33
|
+
dep_uri = Gem::URI dep_uri unless Gem::URI === dep_uri
|
34
34
|
|
35
35
|
@dep_uri = dep_uri
|
36
36
|
@uri = dep_uri + ".."
|
@@ -60,7 +60,7 @@ class Gem::Resolver::BestSet < Gem::Resolver::ComposedSet
|
|
60
60
|
|
61
61
|
def replace_failed_api_set(error) # :nodoc:
|
62
62
|
uri = error.original_uri
|
63
|
-
uri = URI uri unless URI === uri
|
63
|
+
uri = Gem::URI uri unless Gem::URI === uri
|
64
64
|
uri += "."
|
65
65
|
|
66
66
|
raise error unless api_set = @sets.find do |set|
|
data/lib/rubygems/resolver.rb
CHANGED
@@ -11,7 +11,7 @@ require_relative "util/list"
|
|
11
11
|
# all the requirements.
|
12
12
|
|
13
13
|
class Gem::Resolver
|
14
|
-
require_relative "
|
14
|
+
require_relative "vendored_molinillo"
|
15
15
|
|
16
16
|
##
|
17
17
|
# If the DEBUG_RESOLVER environment variable is set then debugging mode is
|
@@ -167,7 +167,7 @@ class Gem::Resolver
|
|
167
167
|
reqs
|
168
168
|
end
|
169
169
|
|
170
|
-
include Molinillo::UI
|
170
|
+
include Gem::Molinillo::UI
|
171
171
|
|
172
172
|
def output
|
173
173
|
@output ||= debug? ? $stdout : File.open(IO::NULL, "w")
|
@@ -177,14 +177,14 @@ class Gem::Resolver
|
|
177
177
|
DEBUG_RESOLVER
|
178
178
|
end
|
179
179
|
|
180
|
-
include Molinillo::SpecificationProvider
|
180
|
+
include Gem::Molinillo::SpecificationProvider
|
181
181
|
|
182
182
|
##
|
183
183
|
# Proceed with resolution! Returns an array of ActivationRequest objects.
|
184
184
|
|
185
185
|
def resolve
|
186
|
-
Molinillo::Resolver.new(self, self).resolve(@needed.map {|d| DependencyRequest.new d, nil }).tsort.map(&:payload).compact
|
187
|
-
rescue Molinillo::VersionConflict => e
|
186
|
+
Gem::Molinillo::Resolver.new(self, self).resolve(@needed.map {|d| DependencyRequest.new d, nil }).tsort.map(&:payload).compact
|
187
|
+
rescue Gem::Molinillo::VersionConflict => e
|
188
188
|
conflict = e.conflicts.values.first
|
189
189
|
raise Gem::DependencyResolutionError, Conflict.new(conflict.requirement_trees.first.first, conflict.existing, conflict.requirement)
|
190
190
|
ensure
|
@@ -49,7 +49,7 @@ class Gem::S3URISigner
|
|
49
49
|
string_to_sign = generate_string_to_sign(date_time, credential_info, canonical_request)
|
50
50
|
signature = generate_signature(s3_config, date, string_to_sign)
|
51
51
|
|
52
|
-
URI.parse("https://#{canonical_host}#{uri.path}?#{query_params}&X-Amz-Signature=#{signature}")
|
52
|
+
Gem::URI.parse("https://#{canonical_host}#{uri.path}?#{query_params}&X-Amz-Signature=#{signature}")
|
53
53
|
end
|
54
54
|
|
55
55
|
private
|
@@ -152,7 +152,7 @@ class Gem::S3URISigner
|
|
152
152
|
end
|
153
153
|
|
154
154
|
def ec2_metadata_request(url)
|
155
|
-
uri = URI(url)
|
155
|
+
uri = Gem::URI(url)
|
156
156
|
@request_pool ||= create_request_pool(uri)
|
157
157
|
request = Gem::Request.new(uri, Gem::Net::HTTP::Get, nil, @request_pool)
|
158
158
|
response = request.fetch
|
data/lib/rubygems/source/git.rb
CHANGED
@@ -221,14 +221,14 @@ class Gem::Source::Git < Gem::Source
|
|
221
221
|
end
|
222
222
|
|
223
223
|
##
|
224
|
-
# A hash for the git gem based on the git repository URI.
|
224
|
+
# A hash for the git gem based on the git repository Gem::URI.
|
225
225
|
|
226
226
|
def uri_hash # :nodoc:
|
227
227
|
require_relative "../openssl"
|
228
228
|
|
229
229
|
normalized =
|
230
230
|
if @repository.match?(%r{^\w+://(\w+@)?})
|
231
|
-
uri = URI(@repository).normalize.to_s.sub %r{/$},""
|
231
|
+
uri = Gem::URI(@repository).normalize.to_s.sub %r{/$},""
|
232
232
|
uri.sub(/\A(\w+)/) { $1.downcase }
|
233
233
|
else
|
234
234
|
@repository
|
data/lib/rubygems/source_list.rb
CHANGED
@@ -301,7 +301,7 @@ class Gem::Specification < Gem::BasicSpecification
|
|
301
301
|
#
|
302
302
|
# Usage:
|
303
303
|
#
|
304
|
-
# spec.description =
|
304
|
+
# spec.description = <<~EOF
|
305
305
|
# Rake is a Make-like program implemented in Ruby. Tasks and
|
306
306
|
# dependencies are specified in standard Ruby syntax.
|
307
307
|
# EOF
|
@@ -1003,8 +1003,6 @@ class Gem::Specification < Gem::BasicSpecification
|
|
1003
1003
|
def self.find_all_by_name(name, *requirements)
|
1004
1004
|
requirements = Gem::Requirement.default if requirements.empty?
|
1005
1005
|
|
1006
|
-
# TODO: maybe try: find_all { |s| spec === dep }
|
1007
|
-
|
1008
1006
|
Gem::Dependency.new(name, *requirements).matching_specs
|
1009
1007
|
end
|
1010
1008
|
|
@@ -1022,8 +1020,6 @@ class Gem::Specification < Gem::BasicSpecification
|
|
1022
1020
|
def self.find_by_name(name, *requirements)
|
1023
1021
|
requirements = Gem::Requirement.default if requirements.empty?
|
1024
1022
|
|
1025
|
-
# TODO: maybe try: find { |s| spec === dep }
|
1026
|
-
|
1027
1023
|
Gem::Dependency.new(name, *requirements).to_spec
|
1028
1024
|
end
|
1029
1025
|
|
@@ -2079,7 +2075,8 @@ class Gem::Specification < Gem::BasicSpecification
|
|
2079
2075
|
end
|
2080
2076
|
|
2081
2077
|
##
|
2082
|
-
# Duplicates
|
2078
|
+
# Duplicates Array and Gem::Requirement attributes from +other_spec+ so state isn't shared.
|
2079
|
+
#
|
2083
2080
|
|
2084
2081
|
def initialize_copy(other_spec)
|
2085
2082
|
self.class.array_attributes.each do |name|
|
@@ -2101,6 +2098,9 @@ class Gem::Specification < Gem::BasicSpecification
|
|
2101
2098
|
raise e
|
2102
2099
|
end
|
2103
2100
|
end
|
2101
|
+
|
2102
|
+
@required_ruby_version = other_spec.required_ruby_version.dup
|
2103
|
+
@required_rubygems_version = other_spec.required_rubygems_version.dup
|
2104
2104
|
end
|
2105
2105
|
|
2106
2106
|
def base_dir
|
@@ -427,13 +427,13 @@ or set it to nil if you don't want to specify a license.
|
|
427
427
|
|
428
428
|
# Make sure a homepage is valid HTTP/HTTPS URI
|
429
429
|
if homepage && !homepage.empty?
|
430
|
-
|
430
|
+
require_relative "vendor/uri/lib/uri"
|
431
431
|
begin
|
432
|
-
homepage_uri = URI.parse(homepage)
|
433
|
-
unless [URI::HTTP, URI::HTTPS].member? homepage_uri.class
|
432
|
+
homepage_uri = Gem::URI.parse(homepage)
|
433
|
+
unless [Gem::URI::HTTP, Gem::URI::HTTPS].member? homepage_uri.class
|
434
434
|
error "\"#{homepage}\" is not a valid HTTP URI"
|
435
435
|
end
|
436
|
-
rescue URI::InvalidURIError
|
436
|
+
rescue Gem::URI::InvalidURIError
|
437
437
|
error "\"#{homepage}\" is not a valid HTTP URI"
|
438
438
|
end
|
439
439
|
end
|
@@ -497,10 +497,10 @@ You have specified rust based extension, but Cargo.lock is not part of the gem f
|
|
497
497
|
|
498
498
|
def validate_rake_extensions(builder) # :nodoc:
|
499
499
|
rake_extension = @specification.extensions.any? {|s| builder.builder_for(s) == Gem::Ext::RakeBuilder }
|
500
|
-
rake_dependency = @specification.dependencies.any? {|d| d.name == "rake" }
|
500
|
+
rake_dependency = @specification.dependencies.any? {|d| d.name == "rake" && d.type == :runtime }
|
501
501
|
|
502
502
|
warning <<-WARNING if rake_extension && !rake_dependency
|
503
|
-
You have specified rake based extension, but rake is not added as dependency. It is recommended to add rake as a dependency in gemspec since there's no guarantee rake will be already installed.
|
503
|
+
You have specified rake based extension, but rake is not added as runtime dependency. It is recommended to add rake as a runtime dependency in gemspec since there's no guarantee rake will be already installed.
|
504
504
|
WARNING
|
505
505
|
end
|
506
506
|
|
data/lib/rubygems/timeout.rb
CHANGED
data/lib/rubygems/tsort.rb
CHANGED
data/lib/rubygems/uri.rb
CHANGED
@@ -16,9 +16,9 @@ class Gem::Uri
|
|
16
16
|
# Parses uri, raising if it's invalid
|
17
17
|
|
18
18
|
def self.parse!(uri)
|
19
|
-
|
19
|
+
require_relative "vendor/uri/lib/uri"
|
20
20
|
|
21
|
-
raise URI::InvalidURIError unless uri
|
21
|
+
raise Gem::URI::InvalidURIError unless uri
|
22
22
|
|
23
23
|
return uri unless uri.is_a?(String)
|
24
24
|
|
@@ -28,9 +28,9 @@ class Gem::Uri
|
|
28
28
|
# as "%7BDESede%7D". If this is escaped again the percentage
|
29
29
|
# symbols will be escaped.
|
30
30
|
begin
|
31
|
-
URI.parse(uri)
|
32
|
-
rescue URI::InvalidURIError
|
33
|
-
URI.parse(URI::DEFAULT_PARSER.escape(uri))
|
31
|
+
Gem::URI.parse(uri)
|
32
|
+
rescue Gem::URI::InvalidURIError
|
33
|
+
Gem::URI.parse(Gem::URI::DEFAULT_PARSER.escape(uri))
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
@@ -39,7 +39,7 @@ class Gem::Uri
|
|
39
39
|
|
40
40
|
def self.parse(uri)
|
41
41
|
parse!(uri)
|
42
|
-
rescue URI::InvalidURIError
|
42
|
+
rescue Gem::URI::InvalidURIError
|
43
43
|
uri
|
44
44
|
end
|
45
45
|
|
data/lib/rubygems/util.rb
CHANGED
@@ -105,7 +105,7 @@ module Gem::Util
|
|
105
105
|
end
|
106
106
|
|
107
107
|
##
|
108
|
-
# Corrects +path+ (usually returned by `URI.parse().path` on Windows), that
|
108
|
+
# Corrects +path+ (usually returned by `Gem::URI.parse().path` on Windows), that
|
109
109
|
# comes with a leading slash.
|
110
110
|
|
111
111
|
def self.correct_for_windows_path(path)
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Gem::Molinillo
|
4
|
+
# @!visibility private
|
5
|
+
module Delegates
|
6
|
+
# Delegates all {Gem::Molinillo::ResolutionState} methods to a `#state` property.
|
7
|
+
module ResolutionState
|
8
|
+
# (see Gem::Molinillo::ResolutionState#name)
|
9
|
+
def name
|
10
|
+
current_state = state || Gem::Molinillo::ResolutionState.empty
|
11
|
+
current_state.name
|
12
|
+
end
|
13
|
+
|
14
|
+
# (see Gem::Molinillo::ResolutionState#requirements)
|
15
|
+
def requirements
|
16
|
+
current_state = state || Gem::Molinillo::ResolutionState.empty
|
17
|
+
current_state.requirements
|
18
|
+
end
|
19
|
+
|
20
|
+
# (see Gem::Molinillo::ResolutionState#activated)
|
21
|
+
def activated
|
22
|
+
current_state = state || Gem::Molinillo::ResolutionState.empty
|
23
|
+
current_state.activated
|
24
|
+
end
|
25
|
+
|
26
|
+
# (see Gem::Molinillo::ResolutionState#requirement)
|
27
|
+
def requirement
|
28
|
+
current_state = state || Gem::Molinillo::ResolutionState.empty
|
29
|
+
current_state.requirement
|
30
|
+
end
|
31
|
+
|
32
|
+
# (see Gem::Molinillo::ResolutionState#possibilities)
|
33
|
+
def possibilities
|
34
|
+
current_state = state || Gem::Molinillo::ResolutionState.empty
|
35
|
+
current_state.possibilities
|
36
|
+
end
|
37
|
+
|
38
|
+
# (see Gem::Molinillo::ResolutionState#depth)
|
39
|
+
def depth
|
40
|
+
current_state = state || Gem::Molinillo::ResolutionState.empty
|
41
|
+
current_state.depth
|
42
|
+
end
|
43
|
+
|
44
|
+
# (see Gem::Molinillo::ResolutionState#conflicts)
|
45
|
+
def conflicts
|
46
|
+
current_state = state || Gem::Molinillo::ResolutionState.empty
|
47
|
+
current_state.conflicts
|
48
|
+
end
|
49
|
+
|
50
|
+
# (see Gem::Molinillo::ResolutionState#unused_unwind_options)
|
51
|
+
def unused_unwind_options
|
52
|
+
current_state = state || Gem::Molinillo::ResolutionState.empty
|
53
|
+
current_state.unused_unwind_options
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/delegates/specification_provider.rb
RENAMED
@@ -1,67 +1,67 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
module Gem::
|
3
|
+
module Gem::Molinillo
|
4
4
|
module Delegates
|
5
|
-
# Delegates all {Gem::
|
5
|
+
# Delegates all {Gem::Molinillo::SpecificationProvider} methods to a
|
6
6
|
# `#specification_provider` property.
|
7
7
|
module SpecificationProvider
|
8
|
-
# (see Gem::
|
8
|
+
# (see Gem::Molinillo::SpecificationProvider#search_for)
|
9
9
|
def search_for(dependency)
|
10
10
|
with_no_such_dependency_error_handling do
|
11
11
|
specification_provider.search_for(dependency)
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
|
-
# (see Gem::
|
15
|
+
# (see Gem::Molinillo::SpecificationProvider#dependencies_for)
|
16
16
|
def dependencies_for(specification)
|
17
17
|
with_no_such_dependency_error_handling do
|
18
18
|
specification_provider.dependencies_for(specification)
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
# (see Gem::
|
22
|
+
# (see Gem::Molinillo::SpecificationProvider#requirement_satisfied_by?)
|
23
23
|
def requirement_satisfied_by?(requirement, activated, spec)
|
24
24
|
with_no_such_dependency_error_handling do
|
25
25
|
specification_provider.requirement_satisfied_by?(requirement, activated, spec)
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
-
# (see Gem::
|
29
|
+
# (see Gem::Molinillo::SpecificationProvider#dependencies_equal?)
|
30
30
|
def dependencies_equal?(dependencies, other_dependencies)
|
31
31
|
with_no_such_dependency_error_handling do
|
32
32
|
specification_provider.dependencies_equal?(dependencies, other_dependencies)
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
|
-
# (see Gem::
|
36
|
+
# (see Gem::Molinillo::SpecificationProvider#name_for)
|
37
37
|
def name_for(dependency)
|
38
38
|
with_no_such_dependency_error_handling do
|
39
39
|
specification_provider.name_for(dependency)
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
|
-
# (see Gem::
|
43
|
+
# (see Gem::Molinillo::SpecificationProvider#name_for_explicit_dependency_source)
|
44
44
|
def name_for_explicit_dependency_source
|
45
45
|
with_no_such_dependency_error_handling do
|
46
46
|
specification_provider.name_for_explicit_dependency_source
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
50
|
-
# (see Gem::
|
50
|
+
# (see Gem::Molinillo::SpecificationProvider#name_for_locking_dependency_source)
|
51
51
|
def name_for_locking_dependency_source
|
52
52
|
with_no_such_dependency_error_handling do
|
53
53
|
specification_provider.name_for_locking_dependency_source
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
57
|
-
# (see Gem::
|
57
|
+
# (see Gem::Molinillo::SpecificationProvider#sort_dependencies)
|
58
58
|
def sort_dependencies(dependencies, activated, conflicts)
|
59
59
|
with_no_such_dependency_error_handling do
|
60
60
|
specification_provider.sort_dependencies(dependencies, activated, conflicts)
|
61
61
|
end
|
62
62
|
end
|
63
63
|
|
64
|
-
# (see Gem::
|
64
|
+
# (see Gem::Molinillo::SpecificationProvider#allow_missing?)
|
65
65
|
def allow_missing?(dependency)
|
66
66
|
with_no_such_dependency_error_handling do
|
67
67
|
specification_provider.allow_missing?(dependency)
|
@@ -5,7 +5,7 @@ require_relative '../../../../tsort'
|
|
5
5
|
require_relative 'dependency_graph/log'
|
6
6
|
require_relative 'dependency_graph/vertex'
|
7
7
|
|
8
|
-
module Gem::
|
8
|
+
module Gem::Molinillo
|
9
9
|
# A directed acyclic graph that is tuned to hold named dependencies
|
10
10
|
class DependencyGraph
|
11
11
|
include Enumerable
|
data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/modules/specification_provider.rb
RENAMED
@@ -1,11 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
module Gem::
|
3
|
+
module Gem::Molinillo
|
4
4
|
# Provides information about specifications and dependencies to the resolver,
|
5
5
|
# allowing the {Resolver} class to remain generic while still providing power
|
6
6
|
# and flexibility.
|
7
7
|
#
|
8
|
-
# This module contains the methods that users of Gem::
|
8
|
+
# This module contains the methods that users of Gem::Molinillo must to implement,
|
9
9
|
# using knowledge of their own model classes.
|
10
10
|
module SpecificationProvider
|
11
11
|
# Search for the specifications that match the given dependency.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
module Gem::
|
3
|
+
module Gem::Molinillo
|
4
4
|
class Resolver
|
5
5
|
# A specific resolution from a given {Resolver}
|
6
6
|
class Resolution
|
@@ -244,8 +244,8 @@ module Gem::Resolver::Molinillo
|
|
244
244
|
require_relative 'delegates/resolution_state'
|
245
245
|
require_relative 'delegates/specification_provider'
|
246
246
|
|
247
|
-
include Gem::
|
248
|
-
include Gem::
|
247
|
+
include Gem::Molinillo::Delegates::ResolutionState
|
248
|
+
include Gem::Molinillo::Delegates::SpecificationProvider
|
249
249
|
|
250
250
|
# Processes the topmost available {RequirementState} on the stack
|
251
251
|
# @return [void]
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require_relative 'dependency_graph'
|
4
4
|
|
5
|
-
module Gem::
|
5
|
+
module Gem::Molinillo
|
6
6
|
# This class encapsulates a dependency resolver.
|
7
7
|
# The resolver is responsible for determining which set of dependencies to
|
8
8
|
# activate, with feedback from the {#specification_provider}
|
@@ -6,6 +6,6 @@ require_relative 'molinillo/resolver'
|
|
6
6
|
require_relative 'molinillo/modules/ui'
|
7
7
|
require_relative 'molinillo/modules/specification_provider'
|
8
8
|
|
9
|
-
# Gem::
|
10
|
-
module Gem::
|
9
|
+
# Gem::Molinillo is a generic dependency resolution algorithm.
|
10
|
+
module Gem::Molinillo
|
11
11
|
end
|