rubygems-update 3.5.5 → 3.5.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (214) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +107 -0
  3. data/Manifest.txt +84 -64
  4. data/POLICIES.md +75 -6
  5. data/bundler/CHANGELOG.md +75 -0
  6. data/bundler/lib/bundler/build_metadata.rb +2 -2
  7. data/bundler/lib/bundler/cli/binstubs.rb +1 -1
  8. data/bundler/lib/bundler/cli/gem.rb +1 -1
  9. data/bundler/lib/bundler/cli/lock.rb +5 -4
  10. data/bundler/lib/bundler/cli/plugin.rb +3 -2
  11. data/bundler/lib/bundler/cli.rb +7 -24
  12. data/bundler/lib/bundler/definition.rb +111 -56
  13. data/bundler/lib/bundler/dependency.rb +2 -1
  14. data/bundler/lib/bundler/dsl.rb +16 -1
  15. data/bundler/lib/bundler/environment_preserver.rb +5 -23
  16. data/bundler/lib/bundler/fetcher/downloader.rb +1 -1
  17. data/bundler/lib/bundler/fetcher.rb +2 -2
  18. data/bundler/lib/bundler/gem_version_promoter.rb +42 -38
  19. data/bundler/lib/bundler/injector.rb +3 -2
  20. data/bundler/lib/bundler/installer.rb +2 -2
  21. data/bundler/lib/bundler/man/bundle-add.1 +1 -1
  22. data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
  23. data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
  24. data/bundler/lib/bundler/man/bundle-check.1 +3 -1
  25. data/bundler/lib/bundler/man/bundle-check.1.ronn +3 -0
  26. data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
  27. data/bundler/lib/bundler/man/bundle-config.1 +1 -3
  28. data/bundler/lib/bundler/man/bundle-config.1.ronn +0 -3
  29. data/bundler/lib/bundler/man/bundle-console.1 +1 -1
  30. data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
  31. data/bundler/lib/bundler/man/bundle-exec.1 +1 -1
  32. data/bundler/lib/bundler/man/bundle-gem.1 +1 -1
  33. data/bundler/lib/bundler/man/bundle-help.1 +1 -1
  34. data/bundler/lib/bundler/man/bundle-info.1 +1 -1
  35. data/bundler/lib/bundler/man/bundle-init.1 +1 -1
  36. data/bundler/lib/bundler/man/bundle-inject.1 +1 -1
  37. data/bundler/lib/bundler/man/bundle-install.1 +3 -3
  38. data/bundler/lib/bundler/man/bundle-install.1.ronn +2 -2
  39. data/bundler/lib/bundler/man/bundle-list.1 +1 -1
  40. data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
  41. data/bundler/lib/bundler/man/bundle-open.1 +1 -1
  42. data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
  43. data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
  44. data/bundler/lib/bundler/man/bundle-plugin.1 +7 -4
  45. data/bundler/lib/bundler/man/bundle-plugin.1.ronn +7 -3
  46. data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
  47. data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
  48. data/bundler/lib/bundler/man/bundle-show.1 +1 -1
  49. data/bundler/lib/bundler/man/bundle-update.1 +1 -1
  50. data/bundler/lib/bundler/man/bundle-version.1 +1 -1
  51. data/bundler/lib/bundler/man/bundle-viz.1 +1 -1
  52. data/bundler/lib/bundler/man/bundle.1 +1 -1
  53. data/bundler/lib/bundler/man/gemfile.5 +3 -3
  54. data/bundler/lib/bundler/man/gemfile.5.ronn +2 -2
  55. data/bundler/lib/bundler/mirror.rb +3 -3
  56. data/bundler/lib/bundler/plugin/api/source.rb +2 -2
  57. data/bundler/lib/bundler/plugin/installer/path.rb +18 -0
  58. data/bundler/lib/bundler/plugin/installer.rb +36 -16
  59. data/bundler/lib/bundler/plugin/source_list.rb +4 -4
  60. data/bundler/lib/bundler/resolver/candidate.rb +1 -1
  61. data/bundler/lib/bundler/resolver.rb +54 -24
  62. data/bundler/lib/bundler/rubygems_ext.rb +12 -0
  63. data/bundler/lib/bundler/runtime.rb +1 -1
  64. data/bundler/lib/bundler/self_manager.rb +1 -1
  65. data/bundler/lib/bundler/settings.rb +14 -12
  66. data/bundler/lib/bundler/setup.rb +3 -0
  67. data/bundler/lib/bundler/source/git/git_proxy.rb +1 -1
  68. data/bundler/lib/bundler/source/git.rb +1 -1
  69. data/bundler/lib/bundler/source/rubygems/remote.rb +1 -1
  70. data/bundler/lib/bundler/source/rubygems.rb +7 -20
  71. data/bundler/lib/bundler/source_list.rb +17 -4
  72. data/bundler/lib/bundler/spec_set.rb +1 -1
  73. data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +4 -3
  74. data/bundler/lib/bundler/templates/newgem/rubocop.yml.tt +0 -5
  75. data/bundler/lib/bundler/uri_credentials_filter.rb +2 -2
  76. data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +22 -22
  77. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb +1 -0
  78. data/bundler/lib/bundler/vendored_net_http.rb +7 -3
  79. data/bundler/lib/bundler/vendored_timeout.rb +7 -3
  80. data/bundler/lib/bundler/vendored_uri.rb +18 -1
  81. data/bundler/lib/bundler/version.rb +1 -1
  82. data/bundler/lib/bundler/yaml_serializer.rb +12 -0
  83. data/bundler/lib/bundler.rb +23 -2
  84. data/lib/rubygems/command.rb +1 -1
  85. data/lib/rubygems/command_manager.rb +2 -1
  86. data/lib/rubygems/commands/build_command.rb +2 -11
  87. data/lib/rubygems/commands/help_command.rb +2 -2
  88. data/lib/rubygems/commands/rdoc_command.rb +1 -8
  89. data/lib/rubygems/commands/rebuild_command.rb +264 -0
  90. data/lib/rubygems/commands/sources_command.rb +2 -2
  91. data/lib/rubygems/commands/update_command.rb +8 -9
  92. data/lib/rubygems/config_file.rb +20 -8
  93. data/lib/rubygems/defaults.rb +4 -4
  94. data/lib/rubygems/dependency.rb +2 -2
  95. data/lib/rubygems/dependency_list.rb +1 -1
  96. data/lib/rubygems/deprecate.rb +79 -77
  97. data/lib/rubygems/ext/cargo_builder.rb +1 -1
  98. data/lib/rubygems/gemcutter_utilities/webauthn_listener.rb +1 -1
  99. data/lib/rubygems/gemcutter_utilities/webauthn_poller.rb +3 -1
  100. data/lib/rubygems/gemcutter_utilities.rb +40 -23
  101. data/lib/rubygems/gemspec_helpers.rb +19 -0
  102. data/lib/rubygems/local_remote_options.rb +6 -6
  103. data/lib/rubygems/package.rb +13 -7
  104. data/lib/rubygems/remote_fetcher.rb +3 -3
  105. data/lib/rubygems/request.rb +5 -5
  106. data/lib/rubygems/request_set.rb +1 -1
  107. data/lib/rubygems/requirement.rb +5 -0
  108. data/lib/rubygems/resolver/api_set.rb +1 -1
  109. data/lib/rubygems/resolver/best_set.rb +1 -1
  110. data/lib/rubygems/resolver/spec_specification.rb +7 -0
  111. data/lib/rubygems/resolver.rb +5 -5
  112. data/lib/rubygems/s3_uri_signer.rb +3 -3
  113. data/lib/rubygems/safe_yaml.rb +10 -1
  114. data/lib/rubygems/security.rb +1 -1
  115. data/lib/rubygems/source/git.rb +2 -2
  116. data/lib/rubygems/source_list.rb +1 -1
  117. data/lib/rubygems/specification.rb +6 -6
  118. data/lib/rubygems/specification_policy.rb +15 -7
  119. data/lib/rubygems/uri.rb +6 -6
  120. data/lib/rubygems/util/licenses.rb +43 -0
  121. data/lib/rubygems/util.rb +1 -1
  122. data/lib/rubygems/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +57 -0
  123. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/delegates/specification_provider.rb +11 -11
  124. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/action.rb +1 -1
  125. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +1 -1
  126. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +1 -1
  127. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +1 -1
  128. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +1 -1
  129. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/log.rb +1 -1
  130. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/set_payload.rb +1 -1
  131. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/tag.rb +1 -1
  132. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph/vertex.rb +1 -1
  133. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/dependency_graph.rb +2 -2
  134. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/errors.rb +1 -1
  135. data/lib/rubygems/vendor/molinillo/lib/molinillo/gem_metadata.rb +6 -0
  136. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/modules/specification_provider.rb +2 -2
  137. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/modules/ui.rb +1 -1
  138. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/resolution.rb +3 -3
  139. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/resolver.rb +1 -1
  140. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo/state.rb +1 -1
  141. data/lib/rubygems/{resolver → vendor}/molinillo/lib/molinillo.rb +2 -2
  142. data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/generic_request.rb +9 -9
  143. data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/header.rb +2 -2
  144. data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/request.rb +3 -3
  145. data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/requests.rb +30 -30
  146. data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/response.rb +2 -2
  147. data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/responses.rb +6 -6
  148. data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/status.rb +1 -1
  149. data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http.rb +15 -15
  150. data/lib/rubygems/{net-http → vendor/net-http}/lib/net/https.rb +1 -1
  151. data/lib/rubygems/vendor/optparse/lib/optparse/uri.rb +7 -0
  152. data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse.rb +11 -11
  153. data/lib/rubygems/{timeout → vendor/timeout}/lib/timeout.rb +1 -1
  154. data/lib/rubygems/{tsort → vendor/tsort}/lib/tsort.rb +2 -2
  155. data/lib/rubygems/vendor/uri/.document +1 -0
  156. data/lib/rubygems/vendor/uri/LICENSE.txt +22 -0
  157. data/lib/rubygems/vendor/uri/lib/uri/common.rb +853 -0
  158. data/lib/rubygems/vendor/uri/lib/uri/file.rb +100 -0
  159. data/lib/rubygems/vendor/uri/lib/uri/ftp.rb +267 -0
  160. data/lib/rubygems/vendor/uri/lib/uri/generic.rb +1588 -0
  161. data/lib/rubygems/vendor/uri/lib/uri/http.rb +125 -0
  162. data/lib/rubygems/vendor/uri/lib/uri/https.rb +23 -0
  163. data/lib/rubygems/vendor/uri/lib/uri/ldap.rb +261 -0
  164. data/lib/rubygems/vendor/uri/lib/uri/ldaps.rb +22 -0
  165. data/lib/rubygems/vendor/uri/lib/uri/mailto.rb +293 -0
  166. data/lib/rubygems/vendor/uri/lib/uri/rfc2396_parser.rb +539 -0
  167. data/lib/rubygems/vendor/uri/lib/uri/rfc3986_parser.rb +183 -0
  168. data/lib/rubygems/vendor/uri/lib/uri/version.rb +6 -0
  169. data/lib/rubygems/vendor/uri/lib/uri/ws.rb +83 -0
  170. data/lib/rubygems/vendor/uri/lib/uri/wss.rb +23 -0
  171. data/lib/rubygems/vendor/uri/lib/uri.rb +104 -0
  172. data/lib/rubygems/vendored_molinillo.rb +3 -0
  173. data/lib/rubygems/vendored_net_http.rb +5 -0
  174. data/lib/rubygems/vendored_optparse.rb +3 -0
  175. data/lib/rubygems/vendored_timeout.rb +5 -0
  176. data/lib/rubygems/vendored_tsort.rb +3 -0
  177. data/lib/rubygems/yaml_serializer.rb +12 -0
  178. data/lib/rubygems.rb +2 -2
  179. data/rubygems-update.gemspec +7 -2
  180. metadata +90 -67
  181. data/lib/rubygems/net/http.rb +0 -3
  182. data/lib/rubygems/optparse/lib/optparse/uri.rb +0 -7
  183. data/lib/rubygems/optparse.rb +0 -3
  184. data/lib/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb +0 -57
  185. data/lib/rubygems/resolver/molinillo/lib/molinillo/gem_metadata.rb +0 -6
  186. data/lib/rubygems/resolver/molinillo.rb +0 -3
  187. data/lib/rubygems/timeout.rb +0 -3
  188. data/lib/rubygems/tsort.rb +0 -3
  189. /data/lib/rubygems/{net-http → vendor/molinillo}/.document +0 -0
  190. /data/lib/rubygems/{resolver → vendor}/molinillo/LICENSE +0 -0
  191. /data/lib/rubygems/{net-protocol → vendor/net-http}/.document +0 -0
  192. /data/lib/rubygems/{net-http → vendor/net-http}/LICENSE.txt +0 -0
  193. /data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/backward.rb +0 -0
  194. /data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/exceptions.rb +0 -0
  195. /data/lib/rubygems/{net-http → vendor/net-http}/lib/net/http/proxy_delta.rb +0 -0
  196. /data/lib/rubygems/{optparse → vendor/net-protocol}/.document +0 -0
  197. /data/lib/rubygems/{net-protocol → vendor/net-protocol}/LICENSE.txt +0 -0
  198. /data/lib/rubygems/{net-protocol → vendor/net-protocol}/lib/net/protocol.rb +0 -0
  199. /data/lib/rubygems/{resolv → vendor/optparse}/.document +0 -0
  200. /data/lib/rubygems/{optparse → vendor/optparse}/COPYING +0 -0
  201. /data/lib/rubygems/{optparse → vendor/optparse}/lib/optionparser.rb +0 -0
  202. /data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/ac.rb +0 -0
  203. /data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/date.rb +0 -0
  204. /data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/kwargs.rb +0 -0
  205. /data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/shellwords.rb +0 -0
  206. /data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/time.rb +0 -0
  207. /data/lib/rubygems/{optparse → vendor/optparse}/lib/optparse/version.rb +0 -0
  208. /data/lib/rubygems/{resolver/molinillo → vendor/resolv}/.document +0 -0
  209. /data/lib/rubygems/{resolv → vendor/resolv}/LICENSE.txt +0 -0
  210. /data/lib/rubygems/{resolv → vendor/resolv}/lib/resolv.rb +0 -0
  211. /data/lib/rubygems/{timeout → vendor/timeout}/.document +0 -0
  212. /data/lib/rubygems/{timeout → vendor/timeout}/LICENSE.txt +0 -0
  213. /data/lib/rubygems/{tsort → vendor/tsort}/.document +0 -0
  214. /data/lib/rubygems/{tsort → vendor/tsort}/LICENSE.txt +0 -0
@@ -25,8 +25,17 @@ module Gem
25
25
  runtime
26
26
  ].freeze
27
27
 
28
+ @aliases_enabled = true
29
+ def self.aliases_enabled=(value) # :nodoc:
30
+ @aliases_enabled = !!value
31
+ end
32
+
33
+ def self.aliases_enabled? # :nodoc:
34
+ @aliases_enabled
35
+ end
36
+
28
37
  def self.safe_load(input)
29
- ::Psych.safe_load(input, permitted_classes: PERMITTED_CLASSES, permitted_symbols: PERMITTED_SYMBOLS, aliases: true)
38
+ ::Psych.safe_load(input, permitted_classes: PERMITTED_CLASSES, permitted_symbols: PERMITTED_SYMBOLS, aliases: @aliases_enabled)
30
39
  end
31
40
 
32
41
  def self.load(input)
@@ -323,7 +323,7 @@ require_relative "openssl"
323
323
  # == Original author
324
324
  #
325
325
  # Paul Duncan <pabs@pablotron.org>
326
- # http://pablotron.org/
326
+ # https://pablotron.org/
327
327
 
328
328
  module Gem::Security
329
329
  ##
@@ -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
@@ -44,7 +44,7 @@ class Gem::SourceList
44
44
  end
45
45
 
46
46
  ##
47
- # Appends +obj+ to the source list which may be a Gem::Source, URI or URI
47
+ # Appends +obj+ to the source list which may be a Gem::Source, Gem::URI or URI
48
48
  # String.
49
49
 
50
50
  def <<(obj)
@@ -341,7 +341,7 @@ class Gem::Specification < Gem::BasicSpecification
341
341
  # https://opensource.org/licenses/ approved.
342
342
  #
343
343
  # The most commonly used OSI-approved licenses are MIT and Apache-2.0.
344
- # GitHub also provides a license picker at http://choosealicense.com/.
344
+ # GitHub also provides a license picker at https://choosealicense.com/.
345
345
  #
346
346
  # You can also use a custom license file along with your gemspec and specify
347
347
  # a LicenseRef-<idstring>, where idstring is the name of the file containing
@@ -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 array_attributes from +other_spec+ so state isn't shared.
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
@@ -7,7 +7,7 @@ class Gem::SpecificationPolicy
7
7
 
8
8
  VALID_NAME_PATTERN = /\A[a-zA-Z0-9\.\-\_]+\z/ # :nodoc:
9
9
 
10
- SPECIAL_CHARACTERS = /\A[#{Regexp.escape('.-_')}]+/ # :nodoc:
10
+ SPECIAL_CHARACTERS = /\A[#{Regexp.escape(".-_")}]+/ # :nodoc:
11
11
 
12
12
  VALID_URI_PATTERN = %r{\Ahttps?:\/\/([^\s:@]+:[^\s:@]*@)?[A-Za-z\d\-]+(\.[A-Za-z\d\-]+)+\.?(:\d{1,5})?([\/?]\S*)?\z} # :nodoc:
13
13
 
@@ -103,6 +103,8 @@ class Gem::SpecificationPolicy
103
103
 
104
104
  validate_dependencies
105
105
 
106
+ validate_required_ruby_version
107
+
106
108
  validate_extensions
107
109
 
108
110
  validate_removed_attributes
@@ -227,6 +229,12 @@ duplicate dependency on #{dep}, (#{prev.requirement}) use:
227
229
  end
228
230
  end
229
231
 
232
+ def validate_required_ruby_version
233
+ if @specification.required_ruby_version.requirements == [Gem::Requirement::DefaultRequirement]
234
+ warning "make sure you specify the oldest ruby version constraint (like \">= 3.0\") that you want your gem to support by setting the `required_ruby_version` gemspec attribute"
235
+ end
236
+ end
237
+
230
238
  ##
231
239
  # Issues a warning for each file to be packaged which is world-readable.
232
240
  #
@@ -427,13 +435,13 @@ or set it to nil if you don't want to specify a license.
427
435
 
428
436
  # Make sure a homepage is valid HTTP/HTTPS URI
429
437
  if homepage && !homepage.empty?
430
- require "uri"
438
+ require_relative "vendor/uri/lib/uri"
431
439
  begin
432
- homepage_uri = URI.parse(homepage)
433
- unless [URI::HTTP, URI::HTTPS].member? homepage_uri.class
440
+ homepage_uri = Gem::URI.parse(homepage)
441
+ unless [Gem::URI::HTTP, Gem::URI::HTTPS].member? homepage_uri.class
434
442
  error "\"#{homepage}\" is not a valid HTTP URI"
435
443
  end
436
- rescue URI::InvalidURIError
444
+ rescue Gem::URI::InvalidURIError
437
445
  error "\"#{homepage}\" is not a valid HTTP URI"
438
446
  end
439
447
  end
@@ -497,10 +505,10 @@ You have specified rust based extension, but Cargo.lock is not part of the gem f
497
505
 
498
506
  def validate_rake_extensions(builder) # :nodoc:
499
507
  rake_extension = @specification.extensions.any? {|s| builder.builder_for(s) == Gem::Ext::RakeBuilder }
500
- rake_dependency = @specification.dependencies.any? {|d| d.name == "rake" }
508
+ rake_dependency = @specification.dependencies.any? {|d| d.name == "rake" && d.type == :runtime }
501
509
 
502
510
  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.
511
+ 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
512
  WARNING
505
513
  end
506
514
 
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
 
@@ -28,6 +28,7 @@ class Gem::Licenses
28
28
  AGPL-3.0-or-later
29
29
  AMDPLPA
30
30
  AML
31
+ AML-glslang
31
32
  AMPAS
32
33
  ANTLR-PD
33
34
  ANTLR-PD-fallback
@@ -42,6 +43,7 @@ class Gem::Licenses
42
43
  Abstyles
43
44
  AdaCore-doc
44
45
  Adobe-2006
46
+ Adobe-Display-PostScript
45
47
  Adobe-Glyph
46
48
  Adobe-Utopia
47
49
  Afmparse
@@ -57,6 +59,7 @@ class Gem::Licenses
57
59
  Artistic-2.0
58
60
  BSD-1-Clause
59
61
  BSD-2-Clause
62
+ BSD-2-Clause-Darwin
60
63
  BSD-2-Clause-Patent
61
64
  BSD-2-Clause-Views
62
65
  BSD-3-Clause
@@ -71,6 +74,7 @@ class Gem::Licenses
71
74
  BSD-3-Clause-No-Nuclear-Warranty
72
75
  BSD-3-Clause-Open-MPI
73
76
  BSD-3-Clause-Sun
77
+ BSD-3-Clause-acpica
74
78
  BSD-3-Clause-flex
75
79
  BSD-4-Clause
76
80
  BSD-4-Clause-Shortened
@@ -82,7 +86,9 @@ class Gem::Licenses
82
86
  BSD-Inferno-Nettverk
83
87
  BSD-Protection
84
88
  BSD-Source-Code
89
+ BSD-Source-beginning-file
85
90
  BSD-Systemics
91
+ BSD-Systemics-W3Works
86
92
  BSL-1.0
87
93
  BUSL-1.1
88
94
  Baekmuk
@@ -96,6 +102,7 @@ class Gem::Licenses
96
102
  BlueOak-1.0.0
97
103
  Boehm-GC
98
104
  Borceux
105
+ Brian-Gladman-2-Clause
99
106
  Brian-Gladman-3-Clause
100
107
  C-UDA-1.0
101
108
  CAL-1.0
@@ -107,6 +114,7 @@ class Gem::Licenses
107
114
  CC-BY-2.5-AU
108
115
  CC-BY-3.0
109
116
  CC-BY-3.0-AT
117
+ CC-BY-3.0-AU
110
118
  CC-BY-3.0-DE
111
119
  CC-BY-3.0-IGO
112
120
  CC-BY-3.0-NL
@@ -172,6 +180,7 @@ class Gem::Licenses
172
180
  CERN-OHL-W-2.0
173
181
  CFITSIO
174
182
  CMU-Mach
183
+ CMU-Mach-nodoc
175
184
  CNRI-Jython
176
185
  CNRI-Python
177
186
  CNRI-Python-GPL-Compatible
@@ -181,6 +190,7 @@ class Gem::Licenses
181
190
  CPOL-1.02
182
191
  CUA-OPL-1.0
183
192
  Caldera
193
+ Caldera-no-preamble
184
194
  ClArtistic
185
195
  Clips
186
196
  Community-Spec-1.0
@@ -191,10 +201,12 @@ class Gem::Licenses
191
201
  CrystalStacker
192
202
  Cube
193
203
  D-FSL-1.0
204
+ DEC-3-Clause
194
205
  DL-DE-BY-2.0
195
206
  DL-DE-ZERO-2.0
196
207
  DOC
197
208
  DRL-1.0
209
+ DRL-1.1
198
210
  DSDP
199
211
  Dotseqn
200
212
  ECL-1.0
@@ -215,6 +227,7 @@ class Gem::Licenses
215
227
  FBM
216
228
  FDK-AAC
217
229
  FSFAP
230
+ FSFAP-no-warranty-disclaimer
218
231
  FSFUL
219
232
  FSFULLR
220
233
  FSFULLRWD
@@ -225,6 +238,7 @@ class Gem::Licenses
225
238
  FreeBSD-DOC
226
239
  FreeImage
227
240
  Furuseth
241
+ GCR-docs
228
242
  GD
229
243
  GFDL-1.1-invariants-only
230
244
  GFDL-1.1-invariants-or-later
@@ -260,6 +274,10 @@ class Gem::Licenses
260
274
  HP-1989
261
275
  HPND
262
276
  HPND-DEC
277
+ HPND-Fenneberg-Livingston
278
+ HPND-INRIA-IMAG
279
+ HPND-Kevlin-Henney
280
+ HPND-MIT-disclaimer
263
281
  HPND-Markus-Kuhn
264
282
  HPND-Pbmplus
265
283
  HPND-UC
@@ -267,6 +285,7 @@ class Gem::Licenses
267
285
  HPND-doc-sell
268
286
  HPND-export-US
269
287
  HPND-export-US-modify
288
+ HPND-sell-MIT-disclaimer-xserver
270
289
  HPND-sell-regexpr
271
290
  HPND-sell-variant
272
291
  HPND-sell-variant-MIT-disclaimer
@@ -281,6 +300,7 @@ class Gem::Licenses
281
300
  IPA
282
301
  IPL-1.0
283
302
  ISC
303
+ ISC-Veillard
284
304
  ImageMagick
285
305
  Imlib2
286
306
  Info-ZIP
@@ -306,6 +326,7 @@ class Gem::Licenses
306
326
  LGPL-3.0-or-later
307
327
  LGPLLR
308
328
  LOOP
329
+ LPD-document
309
330
  LPL-1.0
310
331
  LPL-1.02
311
332
  LPPL-1.0
@@ -350,6 +371,8 @@ class Gem::Licenses
350
371
  MS-PL
351
372
  MS-RL
352
373
  MTLL
374
+ Mackerras-3-Clause
375
+ Mackerras-3-Clause-acknowledgment
353
376
  MakeIndex
354
377
  Martin-Birgmeier
355
378
  McPhee-slideshow
@@ -434,6 +457,8 @@ class Gem::Licenses
434
457
  OSL-3.0
435
458
  OpenPBS-2.3
436
459
  OpenSSL
460
+ OpenSSL-standalone
461
+ OpenVision
437
462
  PADL
438
463
  PDDL-1.0
439
464
  PHP-3.0
@@ -441,6 +466,7 @@ class Gem::Licenses
441
466
  PSF-2.0
442
467
  Parity-6.0.0
443
468
  Parity-7.0.0
469
+ Pixar
444
470
  Plexus
445
471
  PolyForm-Noncommercial-1.0.0
446
472
  PolyForm-Small-Business-1.0.0
@@ -459,6 +485,7 @@ class Gem::Licenses
459
485
  Rdisc
460
486
  Ruby
461
487
  SAX-PD
488
+ SAX-PD-2.0
462
489
  SCEA
463
490
  SGI-B-1.0
464
491
  SGI-B-1.1
@@ -476,6 +503,7 @@ class Gem::Licenses
476
503
  SPL-1.0
477
504
  SSH-OpenSSH
478
505
  SSH-short
506
+ SSLeay-standalone
479
507
  SSPL-1.0
480
508
  SWL
481
509
  Saxpath
@@ -489,11 +517,13 @@ class Gem::Licenses
489
517
  Spencer-94
490
518
  Spencer-99
491
519
  SugarCRM-1.1.3
520
+ Sun-PPP
492
521
  SunPro
493
522
  Symlinks
494
523
  TAPR-OHL-1.0
495
524
  TCL
496
525
  TCP-wrappers
526
+ TGPPL-1.0
497
527
  TMate
498
528
  TORQUE-1.1
499
529
  TOSL
@@ -506,8 +536,10 @@ class Gem::Licenses
506
536
  TermReadKey
507
537
  UCAR
508
538
  UCL-1.0
539
+ UMich-Merit
509
540
  UPL-1.0
510
541
  URT-RLE
542
+ Unicode-3.0
511
543
  Unicode-DFS-2015
512
544
  Unicode-DFS-2016
513
545
  Unicode-TOU
@@ -542,6 +574,7 @@ class Gem::Licenses
542
574
  Zimbra-1.3
543
575
  Zimbra-1.4
544
576
  Zlib
577
+ bcrypt-Solar-Designer
545
578
  blessing
546
579
  bzip2-1.0.6
547
580
  check-cvs
@@ -557,6 +590,8 @@ class Gem::Licenses
557
590
  fwlw
558
591
  gSOAP-1.3b
559
592
  gnuplot
593
+ gtkbook
594
+ hdparm
560
595
  iMatix
561
596
  libpng-2.0
562
597
  libselinux-1.0
@@ -564,6 +599,7 @@ class Gem::Licenses
564
599
  libutil-David-Nugent
565
600
  lsof
566
601
  magaz
602
+ mailprio
567
603
  metamail
568
604
  mpi-permissive
569
605
  mpich2
@@ -572,12 +608,15 @@ class Gem::Licenses
572
608
  psfrag
573
609
  psutils
574
610
  python-ldap
611
+ radvd
575
612
  snprintf
613
+ softSurfer
576
614
  ssh-keyscan
577
615
  swrule
578
616
  ulem
579
617
  w3m
580
618
  xinetd
619
+ xkeyboard-config-Zinoviev
581
620
  xlock
582
621
  xpp
583
622
  zlib-acknowledgement
@@ -626,6 +665,7 @@ class Gem::Licenses
626
665
  Autoconf-exception-generic
627
666
  Autoconf-exception-generic-3.0
628
667
  Autoconf-exception-macro
668
+ Bison-exception-1.24
629
669
  Bison-exception-2.2
630
670
  Bootloader-exception
631
671
  CLISP-exception-2.0
@@ -638,6 +678,7 @@ class Gem::Licenses
638
678
  GCC-exception-2.0-note
639
679
  GCC-exception-3.1
640
680
  GNAT-exception
681
+ GNOME-examples-exception
641
682
  GNU-compiler-exception
642
683
  GPL-3.0-interface-exception
643
684
  GPL-3.0-linking-exception
@@ -645,6 +686,7 @@ class Gem::Licenses
645
686
  GPL-CC-1.0
646
687
  GStreamer-exception-2005
647
688
  GStreamer-exception-2008
689
+ Gmsh-exception
648
690
  KiCad-libraries-exception
649
691
  LGPL-3.0-linking-exception
650
692
  LLGPL
@@ -671,6 +713,7 @@ class Gem::Licenses
671
713
  WxWindows-exception-3.1
672
714
  cryptsetup-OpenSSL-exception
673
715
  eCos-exception-2.0
716
+ fmt-exception
674
717
  freertos-exception-2.0
675
718
  gnu-javamail-exception
676
719
  i2p-gpl-java-exception
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