rubygems-update 3.5.5 → 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.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/Manifest.txt +77 -60
  4. data/bundler/CHANGELOG.md +15 -0
  5. data/bundler/lib/bundler/build_metadata.rb +2 -2
  6. data/bundler/lib/bundler/cli/gem.rb +1 -1
  7. data/bundler/lib/bundler/cli/lock.rb +5 -4
  8. data/bundler/lib/bundler/cli.rb +1 -1
  9. data/bundler/lib/bundler/definition.rb +54 -28
  10. data/bundler/lib/bundler/environment_preserver.rb +3 -3
  11. data/bundler/lib/bundler/fetcher/downloader.rb +1 -1
  12. data/bundler/lib/bundler/fetcher.rb +2 -2
  13. data/bundler/lib/bundler/injector.rb +1 -1
  14. data/bundler/lib/bundler/installer.rb +2 -2
  15. data/bundler/lib/bundler/mirror.rb +3 -3
  16. data/bundler/lib/bundler/plugin/api/source.rb +2 -2
  17. data/bundler/lib/bundler/runtime.rb +1 -1
  18. data/bundler/lib/bundler/settings.rb +4 -4
  19. data/bundler/lib/bundler/source/git/git_proxy.rb +1 -1
  20. data/bundler/lib/bundler/source/git.rb +1 -1
  21. data/bundler/lib/bundler/source/rubygems/remote.rb +1 -1
  22. data/bundler/lib/bundler/source/rubygems.rb +2 -2
  23. data/bundler/lib/bundler/spec_set.rb +1 -1
  24. data/bundler/lib/bundler/uri_credentials_filter.rb +2 -2
  25. data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +22 -22
  26. data/bundler/lib/bundler/vendored_uri.rb +18 -1
  27. data/bundler/lib/bundler/version.rb +1 -1
  28. data/bundler/lib/bundler/yaml_serializer.rb +12 -0
  29. data/bundler/lib/bundler.rb +3 -2
  30. data/lib/rubygems/commands/sources_command.rb +2 -2
  31. data/lib/rubygems/gemcutter_utilities/webauthn_listener.rb +1 -1
  32. data/lib/rubygems/gemcutter_utilities.rb +39 -22
  33. data/lib/rubygems/local_remote_options.rb +6 -6
  34. data/lib/rubygems/net/http.rb +1 -1
  35. data/lib/rubygems/optparse.rb +1 -1
  36. data/lib/rubygems/remote_fetcher.rb +2 -2
  37. data/lib/rubygems/request.rb +4 -4
  38. data/lib/rubygems/requirement.rb +5 -0
  39. data/lib/rubygems/resolver/api_set.rb +1 -1
  40. data/lib/rubygems/resolver/best_set.rb +1 -1
  41. data/lib/rubygems/resolver.rb +5 -5
  42. data/lib/rubygems/s3_uri_signer.rb +2 -2
  43. data/lib/rubygems/source/git.rb +2 -2
  44. data/lib/rubygems/source_list.rb +1 -1
  45. data/lib/rubygems/specification.rb +5 -5
  46. data/lib/rubygems/specification_policy.rb +6 -6
  47. data/lib/rubygems/timeout.rb +1 -1
  48. data/lib/rubygems/tsort.rb +1 -1
  49. data/lib/rubygems/uri.rb +6 -6
  50. data/lib/rubygems/util.rb +1 -1
  51. data/lib/rubygems/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +57 -0
  52. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/delegates/specification_provider.rb +11 -11
  53. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/action.rb +1 -1
  54. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +1 -1
  55. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +1 -1
  56. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +1 -1
  57. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +1 -1
  58. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/log.rb +1 -1
  59. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/set_payload.rb +1 -1
  60. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/tag.rb +1 -1
  61. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/vertex.rb +1 -1
  62. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph.rb +1 -1
  63. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/errors.rb +1 -1
  64. data/lib/rubygems/vendor/molinillo/lib/molinillo/gem_metadata.rb +6 -0
  65. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/modules/specification_provider.rb +2 -2
  66. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/modules/ui.rb +1 -1
  67. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/resolution.rb +3 -3
  68. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/resolver.rb +1 -1
  69. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/state.rb +1 -1
  70. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo.rb +2 -2
  71. data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/generic_request.rb +9 -9
  72. data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/header.rb +2 -2
  73. data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/request.rb +3 -3
  74. data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/requests.rb +30 -30
  75. data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/response.rb +2 -2
  76. data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/responses.rb +6 -6
  77. data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/status.rb +1 -1
  78. data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http.rb +15 -15
  79. data/lib/rubygems/{net-http → vendor/net-http}/lib/net/https.rb +1 -1
  80. data/lib/rubygems/vendor/optparse/lib/optparse/uri.rb +7 -0
  81. data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse.rb +11 -11
  82. data/lib/rubygems/{timeout → vendor/timeout}/lib/timeout.rb +1 -1
  83. data/lib/rubygems/{tsort → vendor/tsort}/lib/tsort.rb +2 -2
  84. data/lib/rubygems/vendor/uri/.document +1 -0
  85. data/lib/rubygems/vendor/uri/LICENSE.txt +22 -0
  86. data/lib/rubygems/vendor/uri/lib/uri/common.rb +853 -0
  87. data/lib/rubygems/vendor/uri/lib/uri/file.rb +100 -0
  88. data/lib/rubygems/vendor/uri/lib/uri/ftp.rb +267 -0
  89. data/lib/rubygems/vendor/uri/lib/uri/generic.rb +1588 -0
  90. data/lib/rubygems/vendor/uri/lib/uri/http.rb +125 -0
  91. data/lib/rubygems/vendor/uri/lib/uri/https.rb +23 -0
  92. data/lib/rubygems/vendor/uri/lib/uri/ldap.rb +261 -0
  93. data/lib/rubygems/vendor/uri/lib/uri/ldaps.rb +22 -0
  94. data/lib/rubygems/vendor/uri/lib/uri/mailto.rb +293 -0
  95. data/lib/rubygems/vendor/uri/lib/uri/rfc2396_parser.rb +539 -0
  96. data/lib/rubygems/vendor/uri/lib/uri/rfc3986_parser.rb +183 -0
  97. data/lib/rubygems/vendor/uri/lib/uri/version.rb +6 -0
  98. data/lib/rubygems/vendor/uri/lib/uri/ws.rb +83 -0
  99. data/lib/rubygems/vendor/uri/lib/uri/wss.rb +23 -0
  100. data/lib/rubygems/vendor/uri/lib/uri.rb +104 -0
  101. data/lib/rubygems/vendored_molinillo.rb +3 -0
  102. data/lib/rubygems/yaml_serializer.rb +12 -0
  103. data/lib/rubygems.rb +1 -1
  104. data/rubygems-update.gemspec +7 -2
  105. metadata +83 -63
  106. data/lib/rubygems/optparse/lib/optparse/uri.rb +0 -7
  107. data/lib/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb +0 -57
  108. data/lib/rubygems/resolver/molinillo/lib/molinillo/gem_metadata.rb +0 -6
  109. data/lib/rubygems/resolver/molinillo.rb +0 -3
  110. /data/lib/rubygems/{net-http → vendor/molinillo}/.document +0 -0
  111. /data/lib/rubygems/{resolver → vendor}/molinillo/LICENSE +0 -0
  112. /data/lib/rubygems/{net-protocol → vendor/net-http}/.document +0 -0
  113. /data/lib/rubygems/{net-http → vendor/net-http}/LICENSE.txt +0 -0
  114. /data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/backward.rb +0 -0
  115. /data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/exceptions.rb +0 -0
  116. /data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/proxy_delta.rb +0 -0
  117. /data/lib/rubygems/{optparse → vendor/net-protocol}/.document +0 -0
  118. /data/lib/rubygems/{net-protocol → vendor/net-protocol}/LICENSE.txt +0 -0
  119. /data/lib/rubygems/{net-protocol → vendor/net-protocol}/lib/net/protocol.rb +0 -0
  120. /data/lib/rubygems/{resolv → vendor/optparse}/.document +0 -0
  121. /data/lib/rubygems/{optparse → vendor/optparse}/COPYING +0 -0
  122. /data/lib/rubygems/{optparse → vendor/optparse}/lib/optionparser.rb +0 -0
  123. /data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/ac.rb +0 -0
  124. /data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/date.rb +0 -0
  125. /data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/kwargs.rb +0 -0
  126. /data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/shellwords.rb +0 -0
  127. /data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/time.rb +0 -0
  128. /data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/version.rb +0 -0
  129. /data/lib/rubygems/{resolver/molinillo → vendor/resolv}/.document +0 -0
  130. /data/lib/rubygems/{resolv → vendor/resolv}/LICENSE.txt +0 -0
  131. /data/lib/rubygems/{resolv → vendor/resolv}/lib/resolv.rb +0 -0
  132. /data/lib/rubygems/{timeout → vendor/timeout}/.document +0 -0
  133. /data/lib/rubygems/{timeout → vendor/timeout}/LICENSE.txt +0 -0
  134. /data/lib/rubygems/{tsort → vendor/tsort}/.document +0 -0
  135. /data/lib/rubygems/{tsort → vendor/tsort}/LICENSE.txt +0 -0
@@ -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
- require "uri"
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
 
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "timeout/lib/timeout"
3
+ require_relative "vendor/timeout/lib/timeout"
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "tsort/lib/tsort"
3
+ require_relative "vendor/tsort/lib/tsort"
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
- require "uri"
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
@@ -1,67 +1,67 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module Gem::Resolver::Molinillo
3
+ module Gem::Molinillo
4
4
  module Delegates
5
- # Delegates all {Gem::Resolver::Molinillo::SpecificationProvider} methods to a
5
+ # Delegates all {Gem::Molinillo::SpecificationProvider} methods to a
6
6
  # `#specification_provider` property.
7
7
  module SpecificationProvider
8
- # (see Gem::Resolver::Molinillo::SpecificationProvider#search_for)
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::Resolver::Molinillo::SpecificationProvider#dependencies_for)
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::Resolver::Molinillo::SpecificationProvider#requirement_satisfied_by?)
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::Resolver::Molinillo::SpecificationProvider#dependencies_equal?)
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::Resolver::Molinillo::SpecificationProvider#name_for)
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::Resolver::Molinillo::SpecificationProvider#name_for_explicit_dependency_source)
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::Resolver::Molinillo::SpecificationProvider#name_for_locking_dependency_source)
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::Resolver::Molinillo::SpecificationProvider#sort_dependencies)
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::Resolver::Molinillo::SpecificationProvider#allow_missing?)
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)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module Gem::Resolver::Molinillo
3
+ module Gem::Molinillo
4
4
  class DependencyGraph
5
5
  # An action that modifies a {DependencyGraph} that is reversible.
6
6
  # @abstract
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative 'action'
4
- module Gem::Resolver::Molinillo
4
+ module Gem::Molinillo
5
5
  class DependencyGraph
6
6
  # @!visibility private
7
7
  # (see DependencyGraph#add_edge_no_circular)
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative 'action'
4
- module Gem::Resolver::Molinillo
4
+ module Gem::Molinillo
5
5
  class DependencyGraph
6
6
  # @!visibility private
7
7
  # (see DependencyGraph#add_vertex)
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative 'action'
4
- module Gem::Resolver::Molinillo
4
+ module Gem::Molinillo
5
5
  class DependencyGraph
6
6
  # @!visibility private
7
7
  # (see DependencyGraph#delete_edge)
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative 'action'
4
- module Gem::Resolver::Molinillo
4
+ module Gem::Molinillo
5
5
  class DependencyGraph
6
6
  # @!visibility private
7
7
  # @see DependencyGraph#detach_vertex_named
@@ -7,7 +7,7 @@ require_relative 'detach_vertex_named'
7
7
  require_relative 'set_payload'
8
8
  require_relative 'tag'
9
9
 
10
- module Gem::Resolver::Molinillo
10
+ module Gem::Molinillo
11
11
  class DependencyGraph
12
12
  # A log for dependency graph actions
13
13
  class Log
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative 'action'
4
- module Gem::Resolver::Molinillo
4
+ module Gem::Molinillo
5
5
  class DependencyGraph
6
6
  # @!visibility private
7
7
  # @see DependencyGraph#set_payload
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative 'action'
4
- module Gem::Resolver::Molinillo
4
+ module Gem::Molinillo
5
5
  class DependencyGraph
6
6
  # @!visibility private
7
7
  # @see DependencyGraph#tag
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module Gem::Resolver::Molinillo
3
+ module Gem::Molinillo
4
4
  class DependencyGraph
5
5
  # A vertex in a {DependencyGraph} that encapsulates a {#name} and a
6
6
  # {#payload}
@@ -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::Resolver::Molinillo
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
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module Gem::Resolver::Molinillo
3
+ module Gem::Molinillo
4
4
  # An error that occurred during the resolution process
5
5
  class ResolverError < StandardError; end
6
6
 
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gem::Molinillo
4
+ # The version of Gem::Molinillo.
5
+ VERSION = '0.8.0'.freeze
6
+ end
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module Gem::Resolver::Molinillo
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::Resolver::Molinillo must to implement,
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::Resolver::Molinillo
3
+ module Gem::Molinillo
4
4
  # Conveys information about the resolution process to a user.
5
5
  module UI
6
6
  # The {IO} object that should be used to print output. `STDOUT`, by default.
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module Gem::Resolver::Molinillo
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::Resolver::Molinillo::Delegates::ResolutionState
248
- include Gem::Resolver::Molinillo::Delegates::SpecificationProvider
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::Resolver::Molinillo
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}
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module Gem::Resolver::Molinillo
3
+ module Gem::Molinillo
4
4
  # A state that a {Resolution} can be in
5
5
  # @attr [String] name the name of the current requirement
6
6
  # @attr [Array<Object>] requirements currently unsatisfied requirements
@@ -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::Resolver::Molinillo is a generic dependency resolution algorithm.
10
- module Gem::Resolver::Molinillo
9
+ # Gem::Molinillo is a generic dependency resolution algorithm.
10
+ module Gem::Molinillo
11
11
  end
@@ -17,10 +17,10 @@ class Gem::Net::HTTPGenericRequest
17
17
  @request_has_body = reqbody
18
18
  @response_has_body = resbody
19
19
 
20
- if URI === uri_or_path then
21
- raise ArgumentError, "not an HTTP URI" unless URI::HTTP === uri_or_path
20
+ if Gem::URI === uri_or_path then
21
+ raise ArgumentError, "not an HTTP Gem::URI" unless Gem::URI::HTTP === uri_or_path
22
22
  hostname = uri_or_path.hostname
23
- raise ArgumentError, "no host component for URI" unless (hostname && hostname.length > 0)
23
+ raise ArgumentError, "no host component for Gem::URI" unless (hostname && hostname.length > 0)
24
24
  @uri = uri_or_path.dup
25
25
  host = @uri.hostname.dup
26
26
  host << ":" << @uri.port.to_s if @uri.port != @uri.default_port
@@ -71,10 +71,10 @@ class Gem::Net::HTTPGenericRequest
71
71
  #
72
72
  attr_reader :path
73
73
 
74
- # Returns the URI object for the request, or +nil+ if none:
74
+ # Returns the Gem::URI object for the request, or +nil+ if none:
75
75
  #
76
76
  # Gem::Net::HTTP::Get.new(uri).uri
77
- # # => #<URI::HTTPS https://jsonplaceholder.typicode.com/>
77
+ # # => #<Gem::URI::HTTPS https://jsonplaceholder.typicode.com/>
78
78
  # Gem::Net::HTTP::Get.new('example.com').uri # => nil
79
79
  #
80
80
  attr_reader :uri
@@ -213,10 +213,10 @@ class Gem::Net::HTTPGenericRequest
213
213
 
214
214
  if ssl
215
215
  scheme = 'https'
216
- klass = URI::HTTPS
216
+ klass = Gem::URI::HTTPS
217
217
  else
218
218
  scheme = 'http'
219
- klass = URI::HTTP
219
+ klass = Gem::URI::HTTP
220
220
  end
221
221
 
222
222
  if host = self['host']
@@ -225,7 +225,7 @@ class Gem::Net::HTTPGenericRequest
225
225
  else
226
226
  host = addr
227
227
  end
228
- # convert the class of the URI
228
+ # convert the class of the Gem::URI
229
229
  if @uri.is_a?(klass)
230
230
  @uri.host = host
231
231
  @uri.port = port
@@ -286,7 +286,7 @@ class Gem::Net::HTTPGenericRequest
286
286
  def send_request_with_body_data(sock, ver, path, params)
287
287
  if /\Amultipart\/form-data\z/i !~ self.content_type
288
288
  self.content_type = 'application/x-www-form-urlencoded'
289
- return send_request_with_body(sock, ver, path, URI.encode_www_form(params))
289
+ return send_request_with_body(sock, ver, path, Gem::URI.encode_www_form(params))
290
290
  end
291
291
 
292
292
  opt = @form_option.dup
@@ -782,7 +782,7 @@ module Gem::Net::HTTPHeader
782
782
  # The resulting request is suitable for HTTP request +POST+ or +PUT+.
783
783
  #
784
784
  # Argument +params+ must be suitable for use as argument +enum+ to
785
- # {URI.encode_www_form}[https://docs.ruby-lang.org/en/master/URI.html#method-c-encode_www_form].
785
+ # {Gem::URI.encode_www_form}[https://docs.ruby-lang.org/en/master/Gem::URI.html#method-c-encode_www_form].
786
786
  #
787
787
  # With only argument +params+ given,
788
788
  # sets the body to a URL-encoded string with the default separator <tt>'&'</tt>:
@@ -810,7 +810,7 @@ module Gem::Net::HTTPHeader
810
810
  #
811
811
  # Gem::Net::HTTPHeader#form_data= is an alias for Gem::Net::HTTPHeader#set_form_data.
812
812
  def set_form_data(params, sep = '&')
813
- query = URI.encode_www_form(params)
813
+ query = Gem::URI.encode_www_form(params)
814
814
  query.gsub!(/&/, sep) if sep != '&'
815
815
  self.body = query
816
816
  self.content_type = 'application/x-www-form-urlencoded'
@@ -6,10 +6,10 @@
6
6
  #
7
7
  # == Creating a Request
8
8
  #
9
- # An request object may be created with either a URI or a string hostname:
9
+ # An request object may be created with either a Gem::URI or a string hostname:
10
10
  #
11
- # require 'rubygems/net-http/lib/net/http'
12
- # uri = URI('https://jsonplaceholder.typicode.com/')
11
+ # require 'rubygems/vendor/net-http/lib/net/http'
12
+ # uri = Gem::URI('https://jsonplaceholder.typicode.com/')
13
13
  # req = Gem::Net::HTTP::Get.new(uri) # => #<Gem::Net::HTTP::Get GET>
14
14
  # req = Gem::Net::HTTP::Get.new(uri.hostname) # => #<Gem::Net::HTTP::Get GET>
15
15
  #