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
@@ -0,0 +1,183 @@
1
+ # frozen_string_literal: true
2
+ module Gem::URI
3
+ class RFC3986_Parser # :nodoc:
4
+ # Gem::URI defined in RFC3986
5
+ HOST = %r[
6
+ (?<IP-literal>\[(?:
7
+ (?<IPv6address>
8
+ (?:\h{1,4}:){6}
9
+ (?<ls32>\h{1,4}:\h{1,4}
10
+ | (?<IPv4address>(?<dec-octet>[1-9]\d|1\d{2}|2[0-4]\d|25[0-5]|\d)
11
+ \.\g<dec-octet>\.\g<dec-octet>\.\g<dec-octet>)
12
+ )
13
+ | ::(?:\h{1,4}:){5}\g<ls32>
14
+ | \h{1,4}?::(?:\h{1,4}:){4}\g<ls32>
15
+ | (?:(?:\h{1,4}:)?\h{1,4})?::(?:\h{1,4}:){3}\g<ls32>
16
+ | (?:(?:\h{1,4}:){,2}\h{1,4})?::(?:\h{1,4}:){2}\g<ls32>
17
+ | (?:(?:\h{1,4}:){,3}\h{1,4})?::\h{1,4}:\g<ls32>
18
+ | (?:(?:\h{1,4}:){,4}\h{1,4})?::\g<ls32>
19
+ | (?:(?:\h{1,4}:){,5}\h{1,4})?::\h{1,4}
20
+ | (?:(?:\h{1,4}:){,6}\h{1,4})?::
21
+ )
22
+ | (?<IPvFuture>v\h++\.[!$&-.0-9:;=A-Z_a-z~]++)
23
+ )\])
24
+ | \g<IPv4address>
25
+ | (?<reg-name>(?:%\h\h|[!$&-.0-9;=A-Z_a-z~])*+)
26
+ ]x
27
+
28
+ USERINFO = /(?:%\h\h|[!$&-.0-9:;=A-Z_a-z~])*+/
29
+
30
+ SCHEME = %r[[A-Za-z][+\-.0-9A-Za-z]*+].source
31
+ SEG = %r[(?:%\h\h|[!$&-.0-9:;=@A-Z_a-z~/])].source
32
+ SEG_NC = %r[(?:%\h\h|[!$&-.0-9;=@A-Z_a-z~])].source
33
+ FRAGMENT = %r[(?:%\h\h|[!$&-.0-9:;=@A-Z_a-z~/?])*+].source
34
+
35
+ RFC3986_URI = %r[\A
36
+ (?<seg>#{SEG}){0}
37
+ (?<Gem::URI>
38
+ (?<scheme>#{SCHEME}):
39
+ (?<hier-part>//
40
+ (?<authority>
41
+ (?:(?<userinfo>#{USERINFO.source})@)?
42
+ (?<host>#{HOST.source.delete(" \n")})
43
+ (?::(?<port>\d*+))?
44
+ )
45
+ (?<path-abempty>(?:/\g<seg>*+)?)
46
+ | (?<path-absolute>/((?!/)\g<seg>++)?)
47
+ | (?<path-rootless>(?!/)\g<seg>++)
48
+ | (?<path-empty>)
49
+ )
50
+ (?:\?(?<query>[^\#]*+))?
51
+ (?:\#(?<fragment>#{FRAGMENT}))?
52
+ )\z]x
53
+
54
+ RFC3986_relative_ref = %r[\A
55
+ (?<seg>#{SEG}){0}
56
+ (?<relative-ref>
57
+ (?<relative-part>//
58
+ (?<authority>
59
+ (?:(?<userinfo>#{USERINFO.source})@)?
60
+ (?<host>#{HOST.source.delete(" \n")}(?<!/))?
61
+ (?::(?<port>\d*+))?
62
+ )
63
+ (?<path-abempty>(?:/\g<seg>*+)?)
64
+ | (?<path-absolute>/\g<seg>*+)
65
+ | (?<path-noscheme>#{SEG_NC}++(?:/\g<seg>*+)?)
66
+ | (?<path-empty>)
67
+ )
68
+ (?:\?(?<query>[^#]*+))?
69
+ (?:\#(?<fragment>#{FRAGMENT}))?
70
+ )\z]x
71
+ attr_reader :regexp
72
+
73
+ def initialize
74
+ @regexp = default_regexp.each_value(&:freeze).freeze
75
+ end
76
+
77
+ def split(uri) #:nodoc:
78
+ begin
79
+ uri = uri.to_str
80
+ rescue NoMethodError
81
+ raise InvalidURIError, "bad Gem::URI(is not Gem::URI?): #{uri.inspect}"
82
+ end
83
+ uri.ascii_only? or
84
+ raise InvalidURIError, "Gem::URI must be ascii only #{uri.dump}"
85
+ if m = RFC3986_URI.match(uri)
86
+ query = m["query"]
87
+ scheme = m["scheme"]
88
+ opaque = m["path-rootless"]
89
+ if opaque
90
+ opaque << "?#{query}" if query
91
+ [ scheme,
92
+ nil, # userinfo
93
+ nil, # host
94
+ nil, # port
95
+ nil, # registry
96
+ nil, # path
97
+ opaque,
98
+ nil, # query
99
+ m["fragment"]
100
+ ]
101
+ else # normal
102
+ [ scheme,
103
+ m["userinfo"],
104
+ m["host"],
105
+ m["port"],
106
+ nil, # registry
107
+ (m["path-abempty"] ||
108
+ m["path-absolute"] ||
109
+ m["path-empty"]),
110
+ nil, # opaque
111
+ query,
112
+ m["fragment"]
113
+ ]
114
+ end
115
+ elsif m = RFC3986_relative_ref.match(uri)
116
+ [ nil, # scheme
117
+ m["userinfo"],
118
+ m["host"],
119
+ m["port"],
120
+ nil, # registry,
121
+ (m["path-abempty"] ||
122
+ m["path-absolute"] ||
123
+ m["path-noscheme"] ||
124
+ m["path-empty"]),
125
+ nil, # opaque
126
+ m["query"],
127
+ m["fragment"]
128
+ ]
129
+ else
130
+ raise InvalidURIError, "bad Gem::URI(is not Gem::URI?): #{uri.inspect}"
131
+ end
132
+ end
133
+
134
+ def parse(uri) # :nodoc:
135
+ Gem::URI.for(*self.split(uri), self)
136
+ end
137
+
138
+
139
+ def join(*uris) # :nodoc:
140
+ uris[0] = convert_to_uri(uris[0])
141
+ uris.inject :merge
142
+ end
143
+
144
+ @@to_s = Kernel.instance_method(:to_s)
145
+ if @@to_s.respond_to?(:bind_call)
146
+ def inspect
147
+ @@to_s.bind_call(self)
148
+ end
149
+ else
150
+ def inspect
151
+ @@to_s.bind(self).call
152
+ end
153
+ end
154
+
155
+ private
156
+
157
+ def default_regexp # :nodoc:
158
+ {
159
+ SCHEME: %r[\A#{SCHEME}\z]o,
160
+ USERINFO: %r[\A#{USERINFO}\z]o,
161
+ HOST: %r[\A#{HOST}\z]o,
162
+ ABS_PATH: %r[\A/#{SEG}*+\z]o,
163
+ REL_PATH: %r[\A(?!/)#{SEG}++\z]o,
164
+ QUERY: %r[\A(?:%\h\h|[!$&-.0-9:;=@A-Z_a-z~/?])*+\z],
165
+ FRAGMENT: %r[\A#{FRAGMENT}\z]o,
166
+ OPAQUE: %r[\A(?:[^/].*)?\z],
167
+ PORT: /\A[\x09\x0a\x0c\x0d ]*+\d*[\x09\x0a\x0c\x0d ]*\z/,
168
+ }
169
+ end
170
+
171
+ def convert_to_uri(uri)
172
+ if uri.is_a?(Gem::URI::Generic)
173
+ uri
174
+ elsif uri = String.try_convert(uri)
175
+ parse(uri)
176
+ else
177
+ raise ArgumentError,
178
+ "bad argument (expected Gem::URI object or Gem::URI string)"
179
+ end
180
+ end
181
+
182
+ end # class Parser
183
+ end # module Gem::URI
@@ -0,0 +1,6 @@
1
+ module Gem::URI
2
+ # :stopdoc:
3
+ VERSION_CODE = '001300'.freeze
4
+ VERSION = VERSION_CODE.scan(/../).collect{|n| n.to_i}.join('.').freeze
5
+ # :startdoc:
6
+ end
@@ -0,0 +1,83 @@
1
+ # frozen_string_literal: false
2
+ # = uri/ws.rb
3
+ #
4
+ # Author:: Matt Muller <mamuller@amazon.com>
5
+ # License:: You can redistribute it and/or modify it under the same term as Ruby.
6
+ #
7
+ # See Gem::URI for general documentation
8
+ #
9
+
10
+ require_relative 'generic'
11
+
12
+ module Gem::URI
13
+
14
+ #
15
+ # The syntax of WS URIs is defined in RFC6455 section 3.
16
+ #
17
+ # Note that the Ruby Gem::URI library allows WS URLs containing usernames and
18
+ # passwords. This is not legal as per the RFC, but used to be
19
+ # supported in Internet Explorer 5 and 6, before the MS04-004 security
20
+ # update. See <URL:http://support.microsoft.com/kb/834489>.
21
+ #
22
+ class WS < Generic
23
+ # A Default port of 80 for Gem::URI::WS.
24
+ DEFAULT_PORT = 80
25
+
26
+ # An Array of the available components for Gem::URI::WS.
27
+ COMPONENT = %i[
28
+ scheme
29
+ userinfo host port
30
+ path
31
+ query
32
+ ].freeze
33
+
34
+ #
35
+ # == Description
36
+ #
37
+ # Creates a new Gem::URI::WS object from components, with syntax checking.
38
+ #
39
+ # The components accepted are userinfo, host, port, path, and query.
40
+ #
41
+ # The components should be provided either as an Array, or as a Hash
42
+ # with keys formed by preceding the component names with a colon.
43
+ #
44
+ # If an Array is used, the components must be passed in the
45
+ # order <code>[userinfo, host, port, path, query]</code>.
46
+ #
47
+ # Example:
48
+ #
49
+ # uri = Gem::URI::WS.build(host: 'www.example.com', path: '/foo/bar')
50
+ #
51
+ # uri = Gem::URI::WS.build([nil, "www.example.com", nil, "/path", "query"])
52
+ #
53
+ # Currently, if passed userinfo components this method generates
54
+ # invalid WS URIs as per RFC 1738.
55
+ #
56
+ def self.build(args)
57
+ tmp = Util.make_components_hash(self, args)
58
+ super(tmp)
59
+ end
60
+
61
+ #
62
+ # == Description
63
+ #
64
+ # Returns the full path for a WS Gem::URI, as required by Net::HTTP::Get.
65
+ #
66
+ # If the Gem::URI contains a query, the full path is Gem::URI#path + '?' + Gem::URI#query.
67
+ # Otherwise, the path is simply Gem::URI#path.
68
+ #
69
+ # Example:
70
+ #
71
+ # uri = Gem::URI::WS.build(path: '/foo/bar', query: 'test=true')
72
+ # uri.request_uri # => "/foo/bar?test=true"
73
+ #
74
+ def request_uri
75
+ return unless @path
76
+
77
+ url = @query ? "#@path?#@query" : @path.dup
78
+ url.start_with?(?/.freeze) ? url : ?/ + url
79
+ end
80
+ end
81
+
82
+ register_scheme 'WS', WS
83
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: false
2
+ # = uri/wss.rb
3
+ #
4
+ # Author:: Matt Muller <mamuller@amazon.com>
5
+ # License:: You can redistribute it and/or modify it under the same term as Ruby.
6
+ #
7
+ # See Gem::URI for general documentation
8
+ #
9
+
10
+ require_relative 'ws'
11
+
12
+ module Gem::URI
13
+
14
+ # The default port for WSS URIs is 443, and the scheme is 'wss:' rather
15
+ # than 'ws:'. Other than that, WSS URIs are identical to WS URIs;
16
+ # see Gem::URI::WS.
17
+ class WSS < WS
18
+ # A Default port of 443 for Gem::URI::WSS
19
+ DEFAULT_PORT = 443
20
+ end
21
+
22
+ register_scheme 'WSS', WSS
23
+ end
@@ -0,0 +1,104 @@
1
+ # frozen_string_literal: false
2
+ # Gem::URI is a module providing classes to handle Uniform Resource Identifiers
3
+ # (RFC2396[http://tools.ietf.org/html/rfc2396]).
4
+ #
5
+ # == Features
6
+ #
7
+ # * Uniform way of handling URIs.
8
+ # * Flexibility to introduce custom Gem::URI schemes.
9
+ # * Flexibility to have an alternate Gem::URI::Parser (or just different patterns
10
+ # and regexp's).
11
+ #
12
+ # == Basic example
13
+ #
14
+ # require 'rubygems/vendor/uri/lib/uri'
15
+ #
16
+ # uri = Gem::URI("http://foo.com/posts?id=30&limit=5#time=1305298413")
17
+ # #=> #<Gem::URI::HTTP http://foo.com/posts?id=30&limit=5#time=1305298413>
18
+ #
19
+ # uri.scheme #=> "http"
20
+ # uri.host #=> "foo.com"
21
+ # uri.path #=> "/posts"
22
+ # uri.query #=> "id=30&limit=5"
23
+ # uri.fragment #=> "time=1305298413"
24
+ #
25
+ # uri.to_s #=> "http://foo.com/posts?id=30&limit=5#time=1305298413"
26
+ #
27
+ # == Adding custom URIs
28
+ #
29
+ # module Gem::URI
30
+ # class RSYNC < Generic
31
+ # DEFAULT_PORT = 873
32
+ # end
33
+ # register_scheme 'RSYNC', RSYNC
34
+ # end
35
+ # #=> Gem::URI::RSYNC
36
+ #
37
+ # Gem::URI.scheme_list
38
+ # #=> {"FILE"=>Gem::URI::File, "FTP"=>Gem::URI::FTP, "HTTP"=>Gem::URI::HTTP,
39
+ # # "HTTPS"=>Gem::URI::HTTPS, "LDAP"=>Gem::URI::LDAP, "LDAPS"=>Gem::URI::LDAPS,
40
+ # # "MAILTO"=>Gem::URI::MailTo, "RSYNC"=>Gem::URI::RSYNC}
41
+ #
42
+ # uri = Gem::URI("rsync://rsync.foo.com")
43
+ # #=> #<Gem::URI::RSYNC rsync://rsync.foo.com>
44
+ #
45
+ # == RFC References
46
+ #
47
+ # A good place to view an RFC spec is http://www.ietf.org/rfc.html.
48
+ #
49
+ # Here is a list of all related RFC's:
50
+ # - RFC822[http://tools.ietf.org/html/rfc822]
51
+ # - RFC1738[http://tools.ietf.org/html/rfc1738]
52
+ # - RFC2255[http://tools.ietf.org/html/rfc2255]
53
+ # - RFC2368[http://tools.ietf.org/html/rfc2368]
54
+ # - RFC2373[http://tools.ietf.org/html/rfc2373]
55
+ # - RFC2396[http://tools.ietf.org/html/rfc2396]
56
+ # - RFC2732[http://tools.ietf.org/html/rfc2732]
57
+ # - RFC3986[http://tools.ietf.org/html/rfc3986]
58
+ #
59
+ # == Class tree
60
+ #
61
+ # - Gem::URI::Generic (in uri/generic.rb)
62
+ # - Gem::URI::File - (in uri/file.rb)
63
+ # - Gem::URI::FTP - (in uri/ftp.rb)
64
+ # - Gem::URI::HTTP - (in uri/http.rb)
65
+ # - Gem::URI::HTTPS - (in uri/https.rb)
66
+ # - Gem::URI::LDAP - (in uri/ldap.rb)
67
+ # - Gem::URI::LDAPS - (in uri/ldaps.rb)
68
+ # - Gem::URI::MailTo - (in uri/mailto.rb)
69
+ # - Gem::URI::Parser - (in uri/common.rb)
70
+ # - Gem::URI::REGEXP - (in uri/common.rb)
71
+ # - Gem::URI::REGEXP::PATTERN - (in uri/common.rb)
72
+ # - Gem::URI::Util - (in uri/common.rb)
73
+ # - Gem::URI::Error - (in uri/common.rb)
74
+ # - Gem::URI::InvalidURIError - (in uri/common.rb)
75
+ # - Gem::URI::InvalidComponentError - (in uri/common.rb)
76
+ # - Gem::URI::BadURIError - (in uri/common.rb)
77
+ #
78
+ # == Copyright Info
79
+ #
80
+ # Author:: Akira Yamada <akira@ruby-lang.org>
81
+ # Documentation::
82
+ # Akira Yamada <akira@ruby-lang.org>
83
+ # Dmitry V. Sabanin <sdmitry@lrn.ru>
84
+ # Vincent Batts <vbatts@hashbangbash.com>
85
+ # License::
86
+ # Copyright (c) 2001 akira yamada <akira@ruby-lang.org>
87
+ # You can redistribute it and/or modify it under the same term as Ruby.
88
+ #
89
+
90
+ module Gem::URI
91
+ end
92
+
93
+ require_relative 'uri/version'
94
+ require_relative 'uri/common'
95
+ require_relative 'uri/generic'
96
+ require_relative 'uri/file'
97
+ require_relative 'uri/ftp'
98
+ require_relative 'uri/http'
99
+ require_relative 'uri/https'
100
+ require_relative 'uri/ldap'
101
+ require_relative 'uri/ldaps'
102
+ require_relative 'uri/mailto'
103
+ require_relative 'uri/ws'
104
+ require_relative 'uri/wss'
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "vendor/molinillo/lib/molinillo"
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Ruby 3.3 and RubyGems 3.5 is already load Gem::Timeout from lib/rubygems/net/http.rb
4
+ # We should avoid to load it again
5
+ require_relative "vendor/net-http/lib/net/http" unless defined?(Gem::Net::HTTP)
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "vendor/optparse/lib/optparse"
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Ruby 3.3 and RubyGems 3.5 is already load Gem::Timeout from lib/rubygems/timeout.rb
4
+ # We should avoid to load it again
5
+ require_relative "vendor/timeout/lib/timeout" unless defined?(Gem::Timeout)
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "vendor/tsort/lib/tsort"
@@ -58,6 +58,8 @@ module Gem
58
58
  str.split(/\r?\n/) do |line|
59
59
  if match = HASH_REGEX.match(line)
60
60
  indent, key, quote, val = match.captures
61
+ val = strip_comment(val)
62
+
61
63
  convert_to_backward_compatible_key!(key)
62
64
  depth = indent.size / 2
63
65
  if quote.empty? && val.empty?
@@ -72,6 +74,8 @@ module Gem
72
74
  end
73
75
  elsif match = ARRAY_REGEX.match(line)
74
76
  _, val = match.captures
77
+ val = strip_comment(val)
78
+
75
79
  last_hash[last_empty_key] = [] unless last_hash[last_empty_key].is_a?(Array)
76
80
 
77
81
  last_hash[last_empty_key].push(val)
@@ -80,6 +84,14 @@ module Gem
80
84
  res
81
85
  end
82
86
 
87
+ def strip_comment(val)
88
+ if val.include?("#") && !val.start_with?("#")
89
+ val.split("#", 2).first.strip
90
+ else
91
+ val
92
+ end
93
+ end
94
+
83
95
  # for settings' keys
84
96
  def convert_to_backward_compatible_key!(key)
85
97
  key << "/" if /https?:/i.match?(key) && !%r{/\Z}.match?(key)
data/lib/rubygems.rb CHANGED
@@ -9,7 +9,7 @@
9
9
  require "rbconfig"
10
10
 
11
11
  module Gem
12
- VERSION = "3.5.5"
12
+ VERSION = "3.5.10"
13
13
  end
14
14
 
15
15
  # Must be first since it unloads the prelude from 1.9.2
@@ -1225,7 +1225,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
1225
1225
 
1226
1226
  def find_unresolved_default_spec(path)
1227
1227
  default_spec = @path_to_default_spec_map[path]
1228
- return default_spec if default_spec && loaded_specs[default_spec.name] != default_spec
1228
+ default_spec if default_spec && loaded_specs[default_spec.name] != default_spec
1229
1229
  end
1230
1230
 
1231
1231
  ##
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "rubygems-update"
5
- s.version = "3.5.5"
5
+ s.version = "3.5.10"
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
 
@@ -14,7 +14,12 @@ Gem::Specification.new do |s|
14
14
  repository of Gems that allows you to publish a Gem that can be shared and used by other
15
15
  developers. See our guide on publishing a Gem at guides.rubygems.org"
16
16
  s.homepage = "https://guides.rubygems.org"
17
- s.metadata = { "source_code_uri" => "https://github.com/rubygems/rubygems" }
17
+ s.metadata = {
18
+ "source_code_uri" => "https://github.com/rubygems/rubygems",
19
+ "bug_tracker_uri" => "https://github.com/rubygems/rubygems/issues",
20
+ "changelog_uri" => "https://github.com/rubygems/rubygems/blob/master/CHANGELOG.md",
21
+ "funding_uri" => "https://rubycentral.org/#/portal/signup",
22
+ }
18
23
  s.licenses = ["Ruby", "MIT"]
19
24
 
20
25
  s.files = File.read(File.expand_path("Manifest.txt", __dir__)).split