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
@@ -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}
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative '../../../../tsort'
3
+ require_relative '../../../../vendored_tsort'
4
4
 
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
  #
@@ -5,8 +5,8 @@
5
5
  # \Class for representing
6
6
  # {HTTP method GET}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#GET_method]:
7
7
  #
8
- # require 'rubygems/net-http/lib/net/http'
9
- # uri = URI('http://example.com')
8
+ # require 'rubygems/vendor/net-http/lib/net/http'
9
+ # uri = Gem::URI('http://example.com')
10
10
  # hostname = uri.hostname # => "example.com"
11
11
  # req = Gem::Net::HTTP::Get.new(uri) # => #<Gem::Net::HTTP::Get GET>
12
12
  # res = Gem::Net::HTTP.start(hostname) do |http|
@@ -37,8 +37,8 @@ end
37
37
  # \Class for representing
38
38
  # {HTTP method HEAD}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#HEAD_method]:
39
39
  #
40
- # require 'rubygems/net-http/lib/net/http'
41
- # uri = URI('http://example.com')
40
+ # require 'rubygems/vendor/net-http/lib/net/http'
41
+ # uri = Gem::URI('http://example.com')
42
42
  # hostname = uri.hostname # => "example.com"
43
43
  # req = Gem::Net::HTTP::Head.new(uri) # => #<Gem::Net::HTTP::Head HEAD>
44
44
  # res = Gem::Net::HTTP.start(hostname) do |http|
@@ -68,8 +68,8 @@ end
68
68
  # \Class for representing
69
69
  # {HTTP method POST}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#POST_method]:
70
70
  #
71
- # require 'rubygems/net-http/lib/net/http'
72
- # uri = URI('http://example.com')
71
+ # require 'rubygems/vendor/net-http/lib/net/http'
72
+ # uri = Gem::URI('http://example.com')
73
73
  # hostname = uri.hostname # => "example.com"
74
74
  # uri.path = '/posts'
75
75
  # req = Gem::Net::HTTP::Post.new(uri) # => #<Gem::Net::HTTP::Post POST>
@@ -103,8 +103,8 @@ end
103
103
  # \Class for representing
104
104
  # {HTTP method PUT}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#PUT_method]:
105
105
  #
106
- # require 'rubygems/net-http/lib/net/http'
107
- # uri = URI('http://example.com')
106
+ # require 'rubygems/vendor/net-http/lib/net/http'
107
+ # uri = Gem::URI('http://example.com')
108
108
  # hostname = uri.hostname # => "example.com"
109
109
  # uri.path = '/posts'
110
110
  # req = Gem::Net::HTTP::Put.new(uri) # => #<Gem::Net::HTTP::Put PUT>
@@ -133,8 +133,8 @@ end
133
133
  # \Class for representing
134
134
  # {HTTP method DELETE}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#DELETE_method]:
135
135
  #
136
- # require 'rubygems/net-http/lib/net/http'
137
- # uri = URI('http://example.com')
136
+ # require 'rubygems/vendor/net-http/lib/net/http'
137
+ # uri = Gem::URI('http://example.com')
138
138
  # hostname = uri.hostname # => "example.com"
139
139
  # uri.path = '/posts/1'
140
140
  # req = Gem::Net::HTTP::Delete.new(uri) # => #<Gem::Net::HTTP::Delete DELETE>
@@ -165,8 +165,8 @@ end
165
165
  # \Class for representing
166
166
  # {HTTP method OPTIONS}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#OPTIONS_method]:
167
167
  #
168
- # require 'rubygems/net-http/lib/net/http'
169
- # uri = URI('http://example.com')
168
+ # require 'rubygems/vendor/net-http/lib/net/http'
169
+ # uri = Gem::URI('http://example.com')
170
170
  # hostname = uri.hostname # => "example.com"
171
171
  # req = Gem::Net::HTTP::Options.new(uri) # => #<Gem::Net::HTTP::Options OPTIONS>
172
172
  # res = Gem::Net::HTTP.start(hostname) do |http|
@@ -196,8 +196,8 @@ end
196
196
  # \Class for representing
197
197
  # {HTTP method TRACE}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#TRACE_method]:
198
198
  #
199
- # require 'rubygems/net-http/lib/net/http'
200
- # uri = URI('http://example.com')
199
+ # require 'rubygems/vendor/net-http/lib/net/http'
200
+ # uri = Gem::URI('http://example.com')
201
201
  # hostname = uri.hostname # => "example.com"
202
202
  # req = Gem::Net::HTTP::Trace.new(uri) # => #<Gem::Net::HTTP::Trace TRACE>
203
203
  # res = Gem::Net::HTTP.start(hostname) do |http|
@@ -227,8 +227,8 @@ end
227
227
  # \Class for representing
228
228
  # {HTTP method PATCH}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#PATCH_method]:
229
229
  #
230
- # require 'rubygems/net-http/lib/net/http'
231
- # uri = URI('http://example.com')
230
+ # require 'rubygems/vendor/net-http/lib/net/http'
231
+ # uri = Gem::URI('http://example.com')
232
232
  # hostname = uri.hostname # => "example.com"
233
233
  # uri.path = '/posts'
234
234
  # req = Gem::Net::HTTP::Patch.new(uri) # => #<Gem::Net::HTTP::Patch PATCH>
@@ -265,8 +265,8 @@ end
265
265
  # \Class for representing
266
266
  # {WebDAV method PROPFIND}[http://www.webdav.org/specs/rfc4918.html#METHOD_PROPFIND]:
267
267
  #
268
- # require 'rubygems/net-http/lib/net/http'
269
- # uri = URI('http://example.com')
268
+ # require 'rubygems/vendor/net-http/lib/net/http'
269
+ # uri = Gem::URI('http://example.com')
270
270
  # hostname = uri.hostname # => "example.com"
271
271
  # req = Gem::Net::HTTP::Propfind.new(uri) # => #<Gem::Net::HTTP::Propfind PROPFIND>
272
272
  # res = Gem::Net::HTTP.start(hostname) do |http|
@@ -288,8 +288,8 @@ end
288
288
  # \Class for representing
289
289
  # {WebDAV method PROPPATCH}[http://www.webdav.org/specs/rfc4918.html#METHOD_PROPPATCH]:
290
290
  #
291
- # require 'rubygems/net-http/lib/net/http'
292
- # uri = URI('http://example.com')
291
+ # require 'rubygems/vendor/net-http/lib/net/http'
292
+ # uri = Gem::URI('http://example.com')
293
293
  # hostname = uri.hostname # => "example.com"
294
294
  # req = Gem::Net::HTTP::Proppatch.new(uri) # => #<Gem::Net::HTTP::Proppatch PROPPATCH>
295
295
  # res = Gem::Net::HTTP.start(hostname) do |http|
@@ -311,8 +311,8 @@ end
311
311
  # \Class for representing
312
312
  # {WebDAV method MKCOL}[http://www.webdav.org/specs/rfc4918.html#METHOD_MKCOL]:
313
313
  #
314
- # require 'rubygems/net-http/lib/net/http'
315
- # uri = URI('http://example.com')
314
+ # require 'rubygems/vendor/net-http/lib/net/http'
315
+ # uri = Gem::URI('http://example.com')
316
316
  # hostname = uri.hostname # => "example.com"
317
317
  # req = Gem::Net::HTTP::Mkcol.new(uri) # => #<Gem::Net::HTTP::Mkcol MKCOL>
318
318
  # res = Gem::Net::HTTP.start(hostname) do |http|
@@ -334,8 +334,8 @@ end
334
334
  # \Class for representing
335
335
  # {WebDAV method COPY}[http://www.webdav.org/specs/rfc4918.html#METHOD_COPY]:
336
336
  #
337
- # require 'rubygems/net-http/lib/net/http'
338
- # uri = URI('http://example.com')
337
+ # require 'rubygems/vendor/net-http/lib/net/http'
338
+ # uri = Gem::URI('http://example.com')
339
339
  # hostname = uri.hostname # => "example.com"
340
340
  # req = Gem::Net::HTTP::Copy.new(uri) # => #<Gem::Net::HTTP::Copy COPY>
341
341
  # res = Gem::Net::HTTP.start(hostname) do |http|
@@ -357,8 +357,8 @@ end
357
357
  # \Class for representing
358
358
  # {WebDAV method MOVE}[http://www.webdav.org/specs/rfc4918.html#METHOD_MOVE]:
359
359
  #
360
- # require 'rubygems/net-http/lib/net/http'
361
- # uri = URI('http://example.com')
360
+ # require 'rubygems/vendor/net-http/lib/net/http'
361
+ # uri = Gem::URI('http://example.com')
362
362
  # hostname = uri.hostname # => "example.com"
363
363
  # req = Gem::Net::HTTP::Move.new(uri) # => #<Gem::Net::HTTP::Move MOVE>
364
364
  # res = Gem::Net::HTTP.start(hostname) do |http|
@@ -380,8 +380,8 @@ end
380
380
  # \Class for representing
381
381
  # {WebDAV method LOCK}[http://www.webdav.org/specs/rfc4918.html#METHOD_LOCK]:
382
382
  #
383
- # require 'rubygems/net-http/lib/net/http'
384
- # uri = URI('http://example.com')
383
+ # require 'rubygems/vendor/net-http/lib/net/http'
384
+ # uri = Gem::URI('http://example.com')
385
385
  # hostname = uri.hostname # => "example.com"
386
386
  # req = Gem::Net::HTTP::Lock.new(uri) # => #<Gem::Net::HTTP::Lock LOCK>
387
387
  # res = Gem::Net::HTTP.start(hostname) do |http|
@@ -403,8 +403,8 @@ end
403
403
  # \Class for representing
404
404
  # {WebDAV method UNLOCK}[http://www.webdav.org/specs/rfc4918.html#METHOD_UNLOCK]:
405
405
  #
406
- # require 'rubygems/net-http/lib/net/http'
407
- # uri = URI('http://example.com')
406
+ # require 'rubygems/vendor/net-http/lib/net/http'
407
+ # uri = Gem::URI('http://example.com')
408
408
  # hostname = uri.hostname # => "example.com"
409
409
  # req = Gem::Net::HTTP::Unlock.new(uri) # => #<Gem::Net::HTTP::Unlock UNLOCK>
410
410
  # res = Gem::Net::HTTP.start(hostname) do |http|
@@ -216,8 +216,8 @@ class Gem::Net::HTTPResponse
216
216
  attr_reader :message
217
217
  alias msg message # :nodoc: obsolete
218
218
 
219
- # The URI used to fetch this response. The response URI is only available
220
- # if a URI was used to create the request.
219
+ # The Gem::URI used to fetch this response. The response Gem::URI is only available
220
+ # if a Gem::URI was used to create the request.
221
221
  attr_reader :uri
222
222
 
223
223
  # Set to true automatically when the request did not contain an
@@ -379,7 +379,7 @@ module Gem::Net
379
379
 
380
380
  # Response class for <tt>See Other</tt> responses (status code 303).
381
381
  #
382
- # The response to the request can be found under another URI using the GET method.
382
+ # The response to the request can be found under another Gem::URI using the GET method.
383
383
  #
384
384
  # :include: doc/net-http/included_getters.rdoc
385
385
  #
@@ -428,8 +428,8 @@ module Gem::Net
428
428
 
429
429
  # Response class for <tt>Temporary Redirect</tt> responses (status code 307).
430
430
  #
431
- # The request should be repeated with another URI;
432
- # however, future requests should still use the original URI.
431
+ # The request should be repeated with another Gem::URI;
432
+ # however, future requests should still use the original Gem::URI.
433
433
  #
434
434
  # :include: doc/net-http/included_getters.rdoc
435
435
  #
@@ -445,7 +445,7 @@ module Gem::Net
445
445
 
446
446
  # Response class for <tt>Permanent Redirect</tt> responses (status code 308).
447
447
  #
448
- # This and all future requests should be directed to the given URI.
448
+ # This and all future requests should be directed to the given Gem::URI.
449
449
  #
450
450
  # :include: doc/net-http/included_getters.rdoc
451
451
  #
@@ -690,9 +690,9 @@ module Gem::Net
690
690
  end
691
691
  HTTPRequestEntityTooLarge = HTTPPayloadTooLarge
692
692
 
693
- # Response class for <tt>URI Too Long</tt> responses (status code 414).
693
+ # Response class for <tt>Gem::URI Too Long</tt> responses (status code 414).
694
694
  #
695
- # The URI provided was too long for the server to process.
695
+ # The Gem::URI provided was too long for the server to process.
696
696
  #
697
697
  # :include: doc/net-http/included_getters.rdoc
698
698
  #
@@ -11,7 +11,7 @@ if $0 == __FILE__
11
11
  puts
12
12
  puts "Gem::Net::HTTP::STATUS_CODES = {"
13
13
  url = "https://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv"
14
- URI(url).read.each_line do |line|
14
+ Gem::URI(url).read.each_line do |line|
15
15
  code, mes, = line.split(',')
16
16
  next if ['(Unused)', 'Unassigned', 'Description'].include?(mes)
17
17
  puts " #{code} => '#{mes}',"
@@ -21,7 +21,7 @@
21
21
  #
22
22
 
23
23
  require_relative '../../../net-protocol/lib/net/protocol'
24
- require 'uri'
24
+ require_relative '../../../uri/lib/uri'
25
25
  require_relative '../../../resolv/lib/resolv'
26
26
  autoload :OpenSSL, 'openssl'
27
27
 
@@ -106,20 +106,20 @@ module Gem::Net #:nodoc:
106
106
  # It consists of some or all of: scheme, hostname, path, query, and fragment;
107
107
  # see {URI syntax}[https://en.wikipedia.org/wiki/Uniform_Resource_Identifier#Syntax].
108
108
  #
109
- # A Ruby {URI::Generic}[https://docs.ruby-lang.org/en/master/URI/Generic.html] object
109
+ # A Ruby {Gem::URI::Generic}[https://docs.ruby-lang.org/en/master/Gem/URI/Generic.html] object
110
110
  # represents an internet URI.
111
111
  # It provides, among others, methods
112
112
  # +scheme+, +hostname+, +path+, +query+, and +fragment+.
113
113
  #
114
114
  # === Schemes
115
115
  #
116
- # An internet \URI has
116
+ # An internet \Gem::URI has
117
117
  # a {scheme}[https://en.wikipedia.org/wiki/List_of_URI_schemes].
118
118
  #
119
119
  # The two schemes supported in \Gem::Net::HTTP are <tt>'https'</tt> and <tt>'http'</tt>:
120
120
  #
121
121
  # uri.scheme # => "https"
122
- # URI('http://example.com').scheme # => "http"
122
+ # Gem::URI('http://example.com').scheme # => "http"
123
123
  #
124
124
  # === Hostnames
125
125
  #
@@ -146,8 +146,8 @@ module Gem::Net #:nodoc:
146
146
  #
147
147
  # _uri = uri.dup
148
148
  # params = {userId: 1, completed: false}
149
- # _uri.query = URI.encode_www_form(params)
150
- # _uri # => #<URI::HTTPS https://jsonplaceholder.typicode.com?userId=1&completed=false>
149
+ # _uri.query = Gem::URI.encode_www_form(params)
150
+ # _uri # => #<Gem::URI::HTTPS https://jsonplaceholder.typicode.com?userId=1&completed=false>
151
151
  # Gem::Net::HTTP.get(_uri)
152
152
  #
153
153
  # === Fragments
@@ -273,7 +273,7 @@ module Gem::Net #:nodoc:
273
273
  # # You should choose a better exception.
274
274
  # raise ArgumentError, 'Too many HTTP redirects' if limit == 0
275
275
  #
276
- # res = Gem::Net::HTTP.get_response(URI(uri))
276
+ # res = Gem::Net::HTTP.get_response(Gem::URI(uri))
277
277
  # case res
278
278
  # when Gem::Net::HTTPSuccess # Any success class.
279
279
  # res
@@ -327,9 +327,9 @@ module Gem::Net #:nodoc:
327
327
  #
328
328
  # Or if you simply want to make a GET request, you may pass in a URI
329
329
  # object that has an \HTTPS URL. \Gem::Net::HTTP automatically turns on TLS
330
- # verification if the URI object has a 'https' URI scheme:
330
+ # verification if the URI object has a 'https' :URI scheme:
331
331
  #
332
- # uri # => #<URI::HTTPS https://jsonplaceholder.typicode.com/>
332
+ # uri # => #<Gem::URI::HTTPS https://jsonplaceholder.typicode.com/>
333
333
  # Gem::Net::HTTP.get(uri)
334
334
  #
335
335
  # == Proxy Server
@@ -371,9 +371,9 @@ module Gem::Net #:nodoc:
371
371
  # === Proxy Using '<tt>ENV['http_proxy']</tt>'
372
372
  #
373
373
  # When environment variable <tt>'http_proxy'</tt>
374
- # is set to a \URI string,
374
+ # is set to a \Gem::URI string,
375
375
  # the returned +http+ will have the server at that URI as its proxy;
376
- # note that the \URI string must have a protocol
376
+ # note that the \Gem::URI string must have a protocol
377
377
  # such as <tt>'http'</tt> or <tt>'https'</tt>:
378
378
  #
379
379
  # ENV['http_proxy'] = 'http://example.com'
@@ -386,7 +386,7 @@ module Gem::Net #:nodoc:
386
386
  # http.proxy_user # => nil
387
387
  # http.proxy_pass # => nil
388
388
  #
389
- # The \URI string may include proxy username, password, and port number:
389
+ # The \Gem::URI string may include proxy username, password, and port number:
390
390
  #
391
391
  # ENV['http_proxy'] = 'http://pname:ppass@example.com:8000'
392
392
  # http = Gem::Net::HTTP.new(hostname)
@@ -790,7 +790,7 @@ module Gem::Net #:nodoc:
790
790
  #
791
791
  # With URI object +uri+ and optional hash argument +headers+:
792
792
  #
793
- # uri = URI('https://jsonplaceholder.typicode.com/todos/1')
793
+ # uri = Gem::URI('https://jsonplaceholder.typicode.com/todos/1')
794
794
  # headers = {'Content-type' => 'application/json; charset=UTF-8'}
795
795
  # Gem::Net::HTTP.get(uri, headers)
796
796
  #
@@ -1074,7 +1074,7 @@ module Gem::Net #:nodoc:
1074
1074
  elsif p_addr == :ENV then
1075
1075
  http.proxy_from_env = true
1076
1076
  else
1077
- if p_addr && p_no_proxy && !URI::Generic.use_proxy?(address, address, port, p_no_proxy)
1077
+ if p_addr && p_no_proxy && !Gem::URI::Generic.use_proxy?(address, address, port, p_no_proxy)
1078
1078
  p_addr = nil
1079
1079
  p_port = nil
1080
1080
  end
@@ -1796,7 +1796,7 @@ module Gem::Net #:nodoc:
1796
1796
  # The proxy URI determined from the environment for this connection.
1797
1797
  def proxy_uri # :nodoc:
1798
1798
  return if @proxy_uri == false
1799
- @proxy_uri ||= URI::HTTP.new(
1799
+ @proxy_uri ||= Gem::URI::HTTP.new(
1800
1800
  "http", nil, address, port, nil, nil, nil, nil, nil
1801
1801
  ).find_proxy || false
1802
1802
  @proxy_uri || nil
@@ -4,7 +4,7 @@
4
4
  = net/https -- SSL/TLS enhancement for Gem::Net::HTTP.
5
5
 
6
6
  This file has been merged with net/http. There is no longer any need to
7
- require 'rubygems/net-http/lib/net/https' to use HTTPS.
7
+ require 'rubygems/vendor/net-http/lib/net/https' to use HTTPS.
8
8
 
9
9
  See Gem::Net::HTTP for details on how to make HTTPS connections.
10
10
 
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: false
2
+ # -*- ruby -*-
3
+
4
+ require_relative '../optparse'
5
+ require_relative '../../../uri/lib/uri'
6
+
7
+ Gem::OptionParser.accept(Gem::URI) {|s,| Gem::URI.parse(s) if s}
@@ -73,7 +73,7 @@
73
73
  #
74
74
  # === Minimal example
75
75
  #
76
- # require 'rubygems/optparse/lib/optparse'
76
+ # require 'rubygems/vendor/optparse/lib/optparse'
77
77
  #
78
78
  # options = {}
79
79
  # Gem::OptionParser.new do |parser|
@@ -92,7 +92,7 @@
92
92
  # Gem::OptionParser can be used to automatically generate help for the commands you
93
93
  # write:
94
94
  #
95
- # require 'rubygems/optparse/lib/optparse'
95
+ # require 'rubygems/vendor/optparse/lib/optparse'
96
96
  #
97
97
  # Options = Struct.new(:name)
98
98
  #
@@ -130,7 +130,7 @@
130
130
  # option name in all caps. If an option is used without the required argument,
131
131
  # an exception will be raised.
132
132
  #
133
- # require 'rubygems/optparse/lib/optparse'
133
+ # require 'rubygems/vendor/optparse/lib/optparse'
134
134
  #
135
135
  # options = {}
136
136
  # Gem::OptionParser.new do |parser|
@@ -158,7 +158,7 @@
158
158
  # - Date -- Anything accepted by +Date.parse+ (need to require +optparse/date+)
159
159
  # - DateTime -- Anything accepted by +DateTime.parse+ (need to require +optparse/date+)
160
160
  # - Time -- Anything accepted by +Time.httpdate+ or +Time.parse+ (need to require +optparse/time+)
161
- # - URI -- Anything accepted by +URI.parse+ (need to require +optparse/uri+)
161
+ # - URI -- Anything accepted by +Gem::URI.parse+ (need to require +optparse/uri+)
162
162
  # - Shellwords -- Anything accepted by +Shellwords.shellwords+ (need to require +optparse/shellwords+)
163
163
  # - String -- Any non-empty string
164
164
  # - Integer -- Any integer. Will convert octal. (e.g. 124, -3, 040)
@@ -183,8 +183,8 @@
183
183
  # as a +Time+. If it succeeds, that time will be passed to the
184
184
  # handler block. Otherwise, an exception will be raised.
185
185
  #
186
- # require 'rubygems/optparse/lib/optparse'
187
- # require 'rubygems/optparse/lib/optparse/time'
186
+ # require 'rubygems/vendor/optparse/lib/optparse'
187
+ # require 'rubygems/vendor/optparse/lib/optparse/time'
188
188
  # Gem::OptionParser.new do |parser|
189
189
  # parser.on("-t", "--time [TIME]", Time, "Begin execution at given time") do |time|
190
190
  # p time
@@ -206,7 +206,7 @@
206
206
  # It specifies which conversion block to call whenever a class is specified.
207
207
  # The example below uses it to fetch a +User+ object before the +on+ handler receives it.
208
208
  #
209
- # require 'rubygems/optparse/lib/optparse'
209
+ # require 'rubygems/vendor/optparse/lib/optparse'
210
210
  #
211
211
  # User = Struct.new(:id, :name)
212
212
  #
@@ -242,7 +242,7 @@
242
242
  #
243
243
  # The +into+ option of +order+, +parse+ and so on methods stores command line options into a Hash.
244
244
  #
245
- # require 'rubygems/optparse/lib/optparse'
245
+ # require 'rubygems/vendor/optparse/lib/optparse'
246
246
  #
247
247
  # options = {}
248
248
  # Gem::OptionParser.new do |parser|
@@ -268,8 +268,8 @@
268
268
  # effect of specifying various options. This is probably the best way to learn
269
269
  # the features of +optparse+.
270
270
  #
271
- # require 'rubygems/optparse/lib/optparse'
272
- # require 'rubygems/optparse/lib/optparse/time'
271
+ # require 'rubygems/vendor/optparse/lib/optparse'
272
+ # require 'rubygems/vendor/optparse/lib/optparse/time'
273
273
  # require 'ostruct'
274
274
  # require 'pp'
275
275
  #
@@ -1084,7 +1084,7 @@ XXX
1084
1084
  Switch::OptionalArgument.new do |pkg|
1085
1085
  if pkg
1086
1086
  begin
1087
- require 'rubygems/optparse/lib/optparse/version'
1087
+ require 'rubygems/vendor/optparse/lib/optparse/version'
1088
1088
  rescue LoadError
1089
1089
  else
1090
1090
  show_version(*pkg.split(/,/)) or
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # == Synopsis
5
5
  #
6
- # require 'rubygems/timeout/lib/timeout'
6
+ # require 'rubygems/vendor/timeout/lib/timeout'
7
7
  # status = Gem::Timeout::timeout(5) {
8
8
  # # Something that should be interrupted if it takes more than 5 seconds...
9
9
  # }