bundler 4.0.21 → 4.1.0.beta1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. checksums.yaml +4 -4
  2. data/{lib/bundler/vendor/connection_pool/LICENSE → MIT.txt} +8 -6
  3. data/bundler.gemspec +23 -6
  4. data/lib/bundler/build_metadata.rb +2 -2
  5. data/lib/bundler/checksum.rb +40 -25
  6. data/lib/bundler/ci_detector.rb +1 -1
  7. data/lib/bundler/cli/add.rb +3 -4
  8. data/lib/bundler/cli/cache.rb +4 -0
  9. data/lib/bundler/cli/clean.rb +5 -0
  10. data/lib/bundler/cli/common.rb +37 -1
  11. data/lib/bundler/cli/config.rb +4 -2
  12. data/lib/bundler/cli/gem.rb +0 -17
  13. data/lib/bundler/cli/install.rb +4 -5
  14. data/lib/bundler/cli/lock.rb +1 -2
  15. data/lib/bundler/cli/outdated.rb +8 -3
  16. data/lib/bundler/cli/pristine.rb +2 -1
  17. data/lib/bundler/cli/update.rb +21 -12
  18. data/lib/bundler/cli.rb +14 -11
  19. data/lib/bundler/definition.rb +61 -24
  20. data/lib/bundler/dependency.rb +4 -0
  21. data/lib/bundler/dsl.rb +77 -11
  22. data/lib/bundler/endpoint_specification.rb +51 -14
  23. data/lib/bundler/env.rb +7 -24
  24. data/lib/bundler/errors.rb +34 -5
  25. data/lib/bundler/fetcher/compact_index.rb +14 -5
  26. data/lib/bundler/fetcher/connection_pools.rb +150 -0
  27. data/lib/bundler/fetcher/downloader.rb +31 -16
  28. data/lib/bundler/fetcher.rb +8 -47
  29. data/lib/bundler/injector.rb +3 -3
  30. data/lib/bundler/inline.rb +44 -4
  31. data/lib/bundler/installer/parallel_installer.rb +25 -30
  32. data/lib/bundler/installer.rb +20 -6
  33. data/lib/bundler/lazy_specification.rb +44 -17
  34. data/lib/bundler/lockfile_generator.rb +24 -2
  35. data/lib/bundler/lockfile_parser.rb +43 -5
  36. data/lib/bundler/man/bundle-add.1 +7 -4
  37. data/lib/bundler/man/bundle-add.1.ronn +8 -4
  38. data/lib/bundler/man/bundle-binstubs.1 +1 -1
  39. data/lib/bundler/man/bundle-cache.1 +2 -2
  40. data/lib/bundler/man/bundle-cache.1.ronn +2 -2
  41. data/lib/bundler/man/bundle-check.1 +1 -1
  42. data/lib/bundler/man/bundle-clean.1 +1 -1
  43. data/lib/bundler/man/bundle-config.1 +38 -6
  44. data/lib/bundler/man/bundle-config.1.ronn +143 -10
  45. data/lib/bundler/man/bundle-console.1 +1 -1
  46. data/lib/bundler/man/bundle-doctor.1 +1 -1
  47. data/lib/bundler/man/bundle-env.1 +1 -1
  48. data/lib/bundler/man/bundle-exec.1 +1 -1
  49. data/lib/bundler/man/bundle-fund.1 +1 -1
  50. data/lib/bundler/man/bundle-gem.1 +1 -1
  51. data/lib/bundler/man/bundle-help.1 +1 -1
  52. data/lib/bundler/man/bundle-info.1 +1 -1
  53. data/lib/bundler/man/bundle-init.1 +1 -1
  54. data/lib/bundler/man/bundle-install.1 +2 -2
  55. data/lib/bundler/man/bundle-install.1.ronn +4 -4
  56. data/lib/bundler/man/bundle-issue.1 +1 -1
  57. data/lib/bundler/man/bundle-licenses.1 +1 -1
  58. data/lib/bundler/man/bundle-list.1 +1 -1
  59. data/lib/bundler/man/bundle-lock.1 +3 -3
  60. data/lib/bundler/man/bundle-lock.1.ronn +5 -5
  61. data/lib/bundler/man/bundle-open.1 +1 -1
  62. data/lib/bundler/man/bundle-outdated.1 +1 -1
  63. data/lib/bundler/man/bundle-platform.1 +1 -1
  64. data/lib/bundler/man/bundle-plugin.1 +1 -1
  65. data/lib/bundler/man/bundle-pristine.1 +1 -1
  66. data/lib/bundler/man/bundle-remove.1 +1 -1
  67. data/lib/bundler/man/bundle-show.1 +1 -1
  68. data/lib/bundler/man/bundle-update.1 +3 -3
  69. data/lib/bundler/man/bundle-update.1.ronn +3 -5
  70. data/lib/bundler/man/bundle-version.1 +1 -1
  71. data/lib/bundler/man/bundle.1 +1 -1
  72. data/lib/bundler/man/gemfile.5 +45 -1
  73. data/lib/bundler/man/gemfile.5.ronn +53 -0
  74. data/lib/bundler/match_metadata.rb +20 -0
  75. data/lib/bundler/match_platform.rb +25 -2
  76. data/lib/bundler/match_remote_metadata.rb +21 -6
  77. data/lib/bundler/materialization.rb +2 -1
  78. data/lib/bundler/override.rb +69 -0
  79. data/lib/bundler/plugin/dsl.rb +3 -5
  80. data/lib/bundler/plugin/events.rb +55 -13
  81. data/lib/bundler/plugin/index.rb +87 -11
  82. data/lib/bundler/plugin/installer/path.rb +1 -1
  83. data/lib/bundler/plugin/installer.rb +13 -5
  84. data/lib/bundler/plugin.rb +58 -30
  85. data/lib/bundler/remote_specification.rb +6 -3
  86. data/lib/bundler/resolver/base.rb +2 -1
  87. data/lib/bundler/resolver/incompatibility.rb +1 -1
  88. data/lib/bundler/resolver.rb +73 -23
  89. data/lib/bundler/ruby_version.rb +0 -2
  90. data/lib/bundler/rubygems_ext.rb +71 -1
  91. data/lib/bundler/rubygems_gem_installer.rb +41 -2
  92. data/lib/bundler/rubygems_integration.rb +7 -2
  93. data/lib/bundler/runtime.rb +69 -2
  94. data/lib/bundler/self_manager.rb +9 -15
  95. data/lib/bundler/settings.rb +373 -30
  96. data/lib/bundler/shared_helpers.rb +2 -1
  97. data/lib/bundler/source/git/git_proxy.rb +2 -10
  98. data/lib/bundler/source/git.rb +15 -6
  99. data/lib/bundler/source/path/installer.rb +1 -1
  100. data/lib/bundler/source/rubygems/remote.rb +10 -5
  101. data/lib/bundler/source/rubygems.rb +48 -12
  102. data/lib/bundler/spec_set.rb +16 -4
  103. data/lib/bundler/stub_specification.rb +2 -1
  104. data/lib/bundler/templates/newgem/Gemfile.tt +4 -4
  105. data/lib/bundler/templates/newgem/newgem.gemspec.tt +3 -3
  106. data/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +1 -1
  107. data/lib/bundler/templates/newgem/test/minitest/test_newgem.rb.tt +1 -1
  108. data/lib/bundler/ui/shell.rb +0 -4
  109. data/lib/bundler/ui/silent.rb +0 -4
  110. data/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +35 -2
  111. data/lib/bundler/vendor/thor/lib/thor/base.rb +2 -1
  112. data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +14 -6
  113. data/lib/bundler/vendor/thor/lib/thor/shell/color.rb +2 -0
  114. data/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
  115. data/lib/bundler/vendor/thor/lib/thor.rb +34 -1
  116. data/lib/bundler/vendored_pub_grub.rb +5 -2
  117. data/lib/bundler/vendored_securerandom.rb +11 -8
  118. data/lib/bundler/vendored_uri.rb +14 -14
  119. data/lib/bundler/version.rb +1 -1
  120. data/lib/bundler/worker.rb +3 -2
  121. data/lib/bundler.rb +1 -1
  122. data/lib/rubygems/compact_index_client/cache.rb +122 -0
  123. data/lib/rubygems/compact_index_client/cache_file.rb +147 -0
  124. data/lib/rubygems/compact_index_client/http_fetcher.rb +88 -0
  125. data/lib/rubygems/compact_index_client/parser.rb +90 -0
  126. data/lib/rubygems/compact_index_client/updater.rb +113 -0
  127. data/lib/rubygems/compact_index_client.rb +111 -0
  128. data/lib/rubygems/cooldown_settings.rb +57 -0
  129. data/lib/rubygems/credential_store/native/linux.rb +97 -0
  130. data/lib/rubygems/credential_store/native/macos.rb +88 -0
  131. data/lib/rubygems/credential_store/native/windows.rb +130 -0
  132. data/lib/rubygems/credential_store.rb +332 -0
  133. data/lib/{bundler → rubygems}/vendor/pub_grub/lib/pub_grub/assignment.rb +1 -1
  134. data/lib/{bundler → rubygems}/vendor/pub_grub/lib/pub_grub/basic_package_source.rb +7 -7
  135. data/lib/{bundler → rubygems}/vendor/pub_grub/lib/pub_grub/failure_writer.rb +1 -1
  136. data/lib/{bundler → rubygems}/vendor/pub_grub/lib/pub_grub/incompatibility.rb +4 -4
  137. data/lib/{bundler → rubygems}/vendor/pub_grub/lib/pub_grub/package.rb +1 -1
  138. data/lib/{bundler → rubygems}/vendor/pub_grub/lib/pub_grub/partial_solution.rb +1 -1
  139. data/lib/{bundler → rubygems}/vendor/pub_grub/lib/pub_grub/rubygems.rb +3 -3
  140. data/lib/{bundler → rubygems}/vendor/pub_grub/lib/pub_grub/solve_failure.rb +1 -1
  141. data/lib/{bundler → rubygems}/vendor/pub_grub/lib/pub_grub/static_package_source.rb +3 -3
  142. data/lib/{bundler → rubygems}/vendor/pub_grub/lib/pub_grub/strategy.rb +2 -2
  143. data/lib/{bundler → rubygems}/vendor/pub_grub/lib/pub_grub/term.rb +1 -1
  144. data/lib/{bundler → rubygems}/vendor/pub_grub/lib/pub_grub/version.rb +1 -1
  145. data/lib/{bundler → rubygems}/vendor/pub_grub/lib/pub_grub/version_constraint.rb +3 -3
  146. data/lib/{bundler → rubygems}/vendor/pub_grub/lib/pub_grub/version_range.rb +1 -1
  147. data/lib/{bundler → rubygems}/vendor/pub_grub/lib/pub_grub/version_solver.rb +2 -2
  148. data/lib/{bundler → rubygems}/vendor/pub_grub/lib/pub_grub/version_union.rb +1 -1
  149. data/lib/rubygems/vendor/pub_grub/lib/pub_grub.rb +57 -0
  150. data/lib/{bundler → rubygems}/vendor/securerandom/lib/securerandom.rb +10 -6
  151. data/lib/{bundler → rubygems}/vendor/uri/lib/uri/common.rb +119 -119
  152. data/lib/{bundler → rubygems}/vendor/uri/lib/uri/file.rb +13 -13
  153. data/lib/{bundler → rubygems}/vendor/uri/lib/uri/ftp.rb +24 -24
  154. data/lib/{bundler → rubygems}/vendor/uri/lib/uri/generic.rb +132 -132
  155. data/lib/{bundler → rubygems}/vendor/uri/lib/uri/http.rb +18 -18
  156. data/lib/{bundler → rubygems}/vendor/uri/lib/uri/https.rb +4 -4
  157. data/lib/{bundler → rubygems}/vendor/uri/lib/uri/ldap.rb +14 -14
  158. data/lib/{bundler → rubygems}/vendor/uri/lib/uri/ldaps.rb +4 -4
  159. data/lib/{bundler → rubygems}/vendor/uri/lib/uri/mailto.rb +21 -21
  160. data/lib/{bundler → rubygems}/vendor/uri/lib/uri/rfc2396_parser.rb +39 -39
  161. data/lib/{bundler → rubygems}/vendor/uri/lib/uri/rfc3986_parser.rb +14 -14
  162. data/lib/{bundler → rubygems}/vendor/uri/lib/uri/version.rb +1 -1
  163. data/lib/{bundler → rubygems}/vendor/uri/lib/uri/ws.rb +12 -12
  164. data/lib/{bundler → rubygems}/vendor/uri/lib/uri/wss.rb +4 -4
  165. data/lib/{bundler → rubygems}/vendor/uri/lib/uri.rb +35 -31
  166. data/lib/rubygems/yaml_serializer.rb +880 -0
  167. metadata +77 -68
  168. data/CHANGELOG.md +0 -5784
  169. data/LICENSE.md +0 -22
  170. data/README.md +0 -58
  171. data/lib/bundler/compact_index_client/cache.rb +0 -107
  172. data/lib/bundler/compact_index_client/cache_file.rb +0 -148
  173. data/lib/bundler/compact_index_client/parser.rb +0 -87
  174. data/lib/bundler/compact_index_client/updater.rb +0 -105
  175. data/lib/bundler/compact_index_client.rb +0 -92
  176. data/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +0 -227
  177. data/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +0 -3
  178. data/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb +0 -56
  179. data/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +0 -230
  180. data/lib/bundler/vendor/net-http-persistent/README.rdoc +0 -82
  181. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb +0 -41
  182. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb +0 -65
  183. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb +0 -80
  184. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +0 -1153
  185. data/lib/bundler/vendor/pub_grub/lib/pub_grub.rb +0 -31
  186. data/lib/bundler/vendored_persistent.rb +0 -11
  187. data/lib/bundler/yaml_serializer.rb +0 -98
  188. /data/lib/{bundler → rubygems}/vendor/pub_grub/LICENSE.txt +0 -0
  189. /data/lib/{bundler → rubygems}/vendor/securerandom/COPYING +0 -0
  190. /data/lib/{bundler → rubygems}/vendor/uri/COPYING +0 -0
@@ -5,24 +5,24 @@
5
5
  # Author:: Akira Yamada <akira@ruby-lang.org>
6
6
  # License:: You can redistribute it and/or modify it under the same term as Ruby.
7
7
  #
8
- # See Bundler::URI for general documentation
8
+ # See Gem::URI for general documentation
9
9
  #
10
10
 
11
11
  require_relative 'common'
12
12
  autoload :IPSocket, 'socket'
13
13
  autoload :IPAddr, 'ipaddr'
14
14
 
15
- module Bundler::URI
15
+ module Gem::URI
16
16
 
17
17
  #
18
- # Base class for all Bundler::URI classes.
19
- # Implements generic Bundler::URI syntax as per RFC 2396.
18
+ # Base class for all Gem::URI classes.
19
+ # Implements generic Gem::URI syntax as per RFC 2396.
20
20
  #
21
21
  class Generic
22
- include Bundler::URI
22
+ include Gem::URI
23
23
 
24
24
  #
25
- # A Default port of nil for Bundler::URI::Generic.
25
+ # A Default port of nil for Gem::URI::Generic.
26
26
  #
27
27
  DEFAULT_PORT = nil
28
28
 
@@ -41,7 +41,7 @@ module Bundler::URI
41
41
  end
42
42
 
43
43
  #
44
- # An Array of the available components for Bundler::URI::Generic.
44
+ # An Array of the available components for Gem::URI::Generic.
45
45
  #
46
46
  COMPONENT = [
47
47
  :scheme,
@@ -52,7 +52,7 @@ module Bundler::URI
52
52
  ].freeze
53
53
 
54
54
  #
55
- # Components of the Bundler::URI in the order.
55
+ # Components of the Gem::URI in the order.
56
56
  #
57
57
  def self.component
58
58
  self::COMPONENT
@@ -71,9 +71,9 @@ module Bundler::URI
71
71
  #
72
72
  # == Description
73
73
  #
74
- # At first, tries to create a new Bundler::URI::Generic instance using
75
- # Bundler::URI::Generic::build. But, if exception Bundler::URI::InvalidComponentError is raised,
76
- # then it does Bundler::URI::RFC2396_PARSER.escape all Bundler::URI components and tries again.
74
+ # At first, tries to create a new Gem::URI::Generic instance using
75
+ # Gem::URI::Generic::build. But, if exception Gem::URI::InvalidComponentError is raised,
76
+ # then it does Gem::URI::RFC2396_PARSER.escape all Gem::URI components and tries again.
77
77
  #
78
78
  def self.build2(args)
79
79
  begin
@@ -82,7 +82,7 @@ module Bundler::URI
82
82
  if args.kind_of?(Array)
83
83
  return self.build(args.collect{|x|
84
84
  if x.is_a?(String)
85
- Bundler::URI::RFC2396_PARSER.escape(x)
85
+ Gem::URI::RFC2396_PARSER.escape(x)
86
86
  else
87
87
  x
88
88
  end
@@ -91,7 +91,7 @@ module Bundler::URI
91
91
  tmp = {}
92
92
  args.each do |key, value|
93
93
  tmp[key] = if value
94
- Bundler::URI::RFC2396_PARSER.escape(value)
94
+ Gem::URI::RFC2396_PARSER.escape(value)
95
95
  else
96
96
  value
97
97
  end
@@ -108,17 +108,17 @@ module Bundler::URI
108
108
  #
109
109
  # == Description
110
110
  #
111
- # Creates a new Bundler::URI::Generic instance from components of Bundler::URI::Generic
111
+ # Creates a new Gem::URI::Generic instance from components of Gem::URI::Generic
112
112
  # with check. Components are: scheme, userinfo, host, port, registry, path,
113
113
  # opaque, query, and fragment. You can provide arguments either by an Array or a Hash.
114
114
  # See ::new for hash keys to use or for order of array items.
115
115
  #
116
116
  def self.build(args)
117
117
  if args.kind_of?(Array) &&
118
- args.size == ::Bundler::URI::Generic::COMPONENT.size
118
+ args.size == ::Gem::URI::Generic::COMPONENT.size
119
119
  tmp = args.dup
120
120
  elsif args.kind_of?(Hash)
121
- tmp = ::Bundler::URI::Generic::COMPONENT.collect do |c|
121
+ tmp = ::Gem::URI::Generic::COMPONENT.collect do |c|
122
122
  if args.include?(c)
123
123
  args[c]
124
124
  else
@@ -126,7 +126,7 @@ module Bundler::URI
126
126
  end
127
127
  end
128
128
  else
129
- component = self.component rescue ::Bundler::URI::Generic::COMPONENT
129
+ component = self.component rescue ::Gem::URI::Generic::COMPONENT
130
130
  raise ArgumentError,
131
131
  "expected Array of or Hash of components of #{self} (#{component.join(', ')})"
132
132
  end
@@ -156,15 +156,15 @@ module Bundler::URI
156
156
  # +query+::
157
157
  # Query data.
158
158
  # +fragment+::
159
- # Part of the Bundler::URI after '#' character.
159
+ # Part of the Gem::URI after '#' character.
160
160
  # +parser+::
161
- # Parser for internal use [Bundler::URI::DEFAULT_PARSER by default].
161
+ # Parser for internal use [Gem::URI::DEFAULT_PARSER by default].
162
162
  # +arg_check+::
163
163
  # Check arguments [false by default].
164
164
  #
165
165
  # == Description
166
166
  #
167
- # Creates a new Bundler::URI::Generic instance from ``generic'' components without check.
167
+ # Creates a new Gem::URI::Generic instance from ``generic'' components without check.
168
168
  #
169
169
  def initialize(scheme,
170
170
  userinfo, host, port, registry,
@@ -214,38 +214,38 @@ module Bundler::URI
214
214
  end
215
215
 
216
216
  #
217
- # Returns the scheme component of the Bundler::URI.
217
+ # Returns the scheme component of the Gem::URI.
218
218
  #
219
- # Bundler::URI("http://foo/bar/baz").scheme #=> "http"
219
+ # Gem::URI("http://foo/bar/baz").scheme #=> "http"
220
220
  #
221
221
  attr_reader :scheme
222
222
 
223
- # Returns the host component of the Bundler::URI.
223
+ # Returns the host component of the Gem::URI.
224
224
  #
225
- # Bundler::URI("http://foo/bar/baz").host #=> "foo"
225
+ # Gem::URI("http://foo/bar/baz").host #=> "foo"
226
226
  #
227
227
  # It returns nil if no host component exists.
228
228
  #
229
- # Bundler::URI("mailto:foo@example.org").host #=> nil
229
+ # Gem::URI("mailto:foo@example.org").host #=> nil
230
230
  #
231
231
  # The component does not contain the port number.
232
232
  #
233
- # Bundler::URI("http://foo:8080/bar/baz").host #=> "foo"
233
+ # Gem::URI("http://foo:8080/bar/baz").host #=> "foo"
234
234
  #
235
235
  # Since IPv6 addresses are wrapped with brackets in URIs,
236
236
  # this method returns IPv6 addresses wrapped with brackets.
237
237
  # This form is not appropriate to pass to socket methods such as TCPSocket.open.
238
238
  # If unwrapped host names are required, use the #hostname method.
239
239
  #
240
- # Bundler::URI("http://[::1]/bar/baz").host #=> "[::1]"
241
- # Bundler::URI("http://[::1]/bar/baz").hostname #=> "::1"
240
+ # Gem::URI("http://[::1]/bar/baz").host #=> "[::1]"
241
+ # Gem::URI("http://[::1]/bar/baz").hostname #=> "::1"
242
242
  #
243
243
  attr_reader :host
244
244
 
245
- # Returns the port component of the Bundler::URI.
245
+ # Returns the port component of the Gem::URI.
246
246
  #
247
- # Bundler::URI("http://foo/bar/baz").port #=> 80
248
- # Bundler::URI("http://foo:8080/bar/baz").port #=> 8080
247
+ # Gem::URI("http://foo/bar/baz").port #=> 80
248
+ # Gem::URI("http://foo:8080/bar/baz").port #=> 8080
249
249
  #
250
250
  attr_reader :port
251
251
 
@@ -253,22 +253,22 @@ module Bundler::URI
253
253
  nil
254
254
  end
255
255
 
256
- # Returns the path component of the Bundler::URI.
256
+ # Returns the path component of the Gem::URI.
257
257
  #
258
- # Bundler::URI("http://foo/bar/baz").path #=> "/bar/baz"
258
+ # Gem::URI("http://foo/bar/baz").path #=> "/bar/baz"
259
259
  #
260
260
  attr_reader :path
261
261
 
262
- # Returns the query component of the Bundler::URI.
262
+ # Returns the query component of the Gem::URI.
263
263
  #
264
- # Bundler::URI("http://foo/bar/baz?search=FooBar").query #=> "search=FooBar"
264
+ # Gem::URI("http://foo/bar/baz?search=FooBar").query #=> "search=FooBar"
265
265
  #
266
266
  attr_reader :query
267
267
 
268
- # Returns the opaque part of the Bundler::URI.
268
+ # Returns the opaque part of the Gem::URI.
269
269
  #
270
- # Bundler::URI("mailto:foo@example.org").opaque #=> "foo@example.org"
271
- # Bundler::URI("http://foo/bar/baz").opaque #=> nil
270
+ # Gem::URI("mailto:foo@example.org").opaque #=> "foo@example.org"
271
+ # Gem::URI("http://foo/bar/baz").opaque #=> nil
272
272
  #
273
273
  # The portion of the path that does not make use of the slash '/'.
274
274
  # The path typically refers to an absolute path or an opaque part.
@@ -276,9 +276,9 @@ module Bundler::URI
276
276
  #
277
277
  attr_reader :opaque
278
278
 
279
- # Returns the fragment component of the Bundler::URI.
279
+ # Returns the fragment component of the Gem::URI.
280
280
  #
281
- # Bundler::URI("http://foo/bar/baz?search=FooBar#ponies").fragment #=> "ponies"
281
+ # Gem::URI("http://foo/bar/baz?search=FooBar#ponies").fragment #=> "ponies"
282
282
  #
283
283
  attr_reader :fragment
284
284
 
@@ -294,7 +294,7 @@ module Bundler::URI
294
294
  end
295
295
  end
296
296
 
297
- # Replaces self by other Bundler::URI object.
297
+ # Replaces self by other Gem::URI object.
298
298
  #
299
299
  def replace!(oth)
300
300
  if self.class != oth.class
@@ -308,7 +308,7 @@ module Bundler::URI
308
308
  private :replace!
309
309
 
310
310
  #
311
- # Components of the Bundler::URI in the order.
311
+ # Components of the Gem::URI in the order.
312
312
  #
313
313
  def component
314
314
  self.class.component
@@ -329,7 +329,7 @@ module Bundler::URI
329
329
 
330
330
  # Protected setter for the scheme component +v+.
331
331
  #
332
- # See also Bundler::URI::Generic.scheme=.
332
+ # See also Gem::URI::Generic.scheme=.
333
333
  #
334
334
  def set_scheme(v)
335
335
  @scheme = v&.downcase
@@ -347,13 +347,13 @@ module Bundler::URI
347
347
  # Public setter for the scheme component +v+
348
348
  # (with validation).
349
349
  #
350
- # See also Bundler::URI::Generic.check_scheme.
350
+ # See also Gem::URI::Generic.check_scheme.
351
351
  #
352
352
  # == Usage
353
353
  #
354
- # require 'bundler/vendor/uri/lib/uri'
354
+ # require 'rubygems/vendor/uri/lib/uri'
355
355
  #
356
- # uri = Bundler::URI.parse("http://my.example.com")
356
+ # uri = Gem::URI.parse("http://my.example.com")
357
357
  # uri.scheme = "https"
358
358
  # uri.to_s #=> "https://my.example.com"
359
359
  #
@@ -367,10 +367,10 @@ module Bundler::URI
367
367
  # Checks the +user+ and +password+.
368
368
  #
369
369
  # If +password+ is not provided, then +user+ is
370
- # split, using Bundler::URI::Generic.split_userinfo, to
370
+ # split, using Gem::URI::Generic.split_userinfo, to
371
371
  # pull +user+ and +password.
372
372
  #
373
- # See also Bundler::URI::Generic.check_user, Bundler::URI::Generic.check_password.
373
+ # See also Gem::URI::Generic.check_user, Gem::URI::Generic.check_password.
374
374
  #
375
375
  def check_userinfo(user, password = nil)
376
376
  if !password
@@ -458,13 +458,13 @@ module Bundler::URI
458
458
  # Public setter for the +user+ component
459
459
  # (with validation).
460
460
  #
461
- # See also Bundler::URI::Generic.check_user.
461
+ # See also Gem::URI::Generic.check_user.
462
462
  #
463
463
  # == Usage
464
464
  #
465
- # require 'bundler/vendor/uri/lib/uri'
465
+ # require 'rubygems/vendor/uri/lib/uri'
466
466
  #
467
- # uri = Bundler::URI.parse("http://john:S3nsit1ve@my.example.com")
467
+ # uri = Gem::URI.parse("http://john:S3nsit1ve@my.example.com")
468
468
  # uri.user = "sam"
469
469
  # uri.to_s #=> "http://sam:V3ry_S3nsit1ve@my.example.com"
470
470
  #
@@ -485,13 +485,13 @@ module Bundler::URI
485
485
  # Public setter for the +password+ component
486
486
  # (with validation).
487
487
  #
488
- # See also Bundler::URI::Generic.check_password.
488
+ # See also Gem::URI::Generic.check_password.
489
489
  #
490
490
  # == Usage
491
491
  #
492
- # require 'bundler/vendor/uri/lib/uri'
492
+ # require 'rubygems/vendor/uri/lib/uri'
493
493
  #
494
- # uri = Bundler::URI.parse("http://john:S3nsit1ve@my.example.com")
494
+ # uri = Gem::URI.parse("http://john:S3nsit1ve@my.example.com")
495
495
  # uri.password = "V3ry_S3nsit1ve"
496
496
  # uri.to_s #=> "http://john:V3ry_S3nsit1ve@my.example.com"
497
497
  #
@@ -504,7 +504,7 @@ module Bundler::URI
504
504
  # Protected setter for the +user+ component, and +password+ if available
505
505
  # (with validation).
506
506
  #
507
- # See also Bundler::URI::Generic.userinfo=.
507
+ # See also Gem::URI::Generic.userinfo=.
508
508
  #
509
509
  def set_userinfo(user, password = nil)
510
510
  unless password
@@ -519,7 +519,7 @@ module Bundler::URI
519
519
 
520
520
  # Protected setter for the user component +v+.
521
521
  #
522
- # See also Bundler::URI::Generic.user=.
522
+ # See also Gem::URI::Generic.user=.
523
523
  #
524
524
  def set_user(v)
525
525
  set_userinfo(v, nil)
@@ -529,7 +529,7 @@ module Bundler::URI
529
529
 
530
530
  # Protected setter for the password component +v+.
531
531
  #
532
- # See also Bundler::URI::Generic.password=.
532
+ # See also Gem::URI::Generic.password=.
533
533
  #
534
534
  def set_password(v)
535
535
  @password = v
@@ -564,12 +564,12 @@ module Bundler::URI
564
564
  end
565
565
  end
566
566
 
567
- # Returns the user component (without Bundler::URI decoding).
567
+ # Returns the user component (without Gem::URI decoding).
568
568
  def user
569
569
  @user
570
570
  end
571
571
 
572
- # Returns the password component (without Bundler::URI decoding).
572
+ # Returns the password component (without Gem::URI decoding).
573
573
  def password
574
574
  @password
575
575
  end
@@ -580,14 +580,14 @@ module Bundler::URI
580
580
  return @user, @password, @host, @port if @user || @password || @host || @port
581
581
  end
582
582
 
583
- # Returns the user component after Bundler::URI decoding.
583
+ # Returns the user component after Gem::URI decoding.
584
584
  def decoded_user
585
- Bundler::URI.decode_uri_component(@user) if @user
585
+ Gem::URI.decode_uri_component(@user) if @user
586
586
  end
587
587
 
588
- # Returns the password component after Bundler::URI decoding.
588
+ # Returns the password component after Gem::URI decoding.
589
589
  def decoded_password
590
- Bundler::URI.decode_uri_component(@password) if @password
590
+ Gem::URI.decode_uri_component(@password) if @password
591
591
  end
592
592
 
593
593
  #
@@ -614,7 +614,7 @@ module Bundler::URI
614
614
 
615
615
  # Protected setter for the host component +v+.
616
616
  #
617
- # See also Bundler::URI::Generic.host=.
617
+ # See also Gem::URI::Generic.host=.
618
618
  #
619
619
  def set_host(v)
620
620
  @host = v
@@ -639,13 +639,13 @@ module Bundler::URI
639
639
  # Public setter for the host component +v+
640
640
  # (with validation).
641
641
  #
642
- # See also Bundler::URI::Generic.check_host.
642
+ # See also Gem::URI::Generic.check_host.
643
643
  #
644
644
  # == Usage
645
645
  #
646
- # require 'bundler/vendor/uri/lib/uri'
646
+ # require 'rubygems/vendor/uri/lib/uri'
647
647
  #
648
- # uri = Bundler::URI.parse("http://my.example.com")
648
+ # uri = Gem::URI.parse("http://my.example.com")
649
649
  # uri.host = "foo.com"
650
650
  # uri.to_s #=> "http://foo.com"
651
651
  #
@@ -656,12 +656,12 @@ module Bundler::URI
656
656
  v
657
657
  end
658
658
 
659
- # Extract the host part of the Bundler::URI and unwrap brackets for IPv6 addresses.
659
+ # Extract the host part of the Gem::URI and unwrap brackets for IPv6 addresses.
660
660
  #
661
- # This method is the same as Bundler::URI::Generic#host except
661
+ # This method is the same as Gem::URI::Generic#host except
662
662
  # brackets for IPv6 (and future IP) addresses are removed.
663
663
  #
664
- # uri = Bundler::URI("http://[::1]/bar")
664
+ # uri = Gem::URI("http://[::1]/bar")
665
665
  # uri.hostname #=> "::1"
666
666
  # uri.host #=> "[::1]"
667
667
  #
@@ -670,12 +670,12 @@ module Bundler::URI
670
670
  v&.start_with?('[') && v.end_with?(']') ? v[1..-2] : v
671
671
  end
672
672
 
673
- # Sets the host part of the Bundler::URI as the argument with brackets for IPv6 addresses.
673
+ # Sets the host part of the Gem::URI as the argument with brackets for IPv6 addresses.
674
674
  #
675
- # This method is the same as Bundler::URI::Generic#host= except
675
+ # This method is the same as Gem::URI::Generic#host= except
676
676
  # the argument can be a bare IPv6 address.
677
677
  #
678
- # uri = Bundler::URI("http://foo/bar")
678
+ # uri = Gem::URI("http://foo/bar")
679
679
  # uri.hostname = "::1"
680
680
  # uri.to_s #=> "http://[::1]/bar"
681
681
  #
@@ -711,7 +711,7 @@ module Bundler::URI
711
711
 
712
712
  # Protected setter for the port component +v+.
713
713
  #
714
- # See also Bundler::URI::Generic.port=.
714
+ # See also Gem::URI::Generic.port=.
715
715
  #
716
716
  def set_port(v)
717
717
  v = v.empty? ? nil : v.to_i unless !v || v.kind_of?(Integer)
@@ -730,13 +730,13 @@ module Bundler::URI
730
730
  # Public setter for the port component +v+
731
731
  # (with validation).
732
732
  #
733
- # See also Bundler::URI::Generic.check_port.
733
+ # See also Gem::URI::Generic.check_port.
734
734
  #
735
735
  # == Usage
736
736
  #
737
- # require 'bundler/vendor/uri/lib/uri'
737
+ # require 'rubygems/vendor/uri/lib/uri'
738
738
  #
739
- # uri = Bundler::URI.parse("http://my.example.com")
739
+ # uri = Gem::URI.parse("http://my.example.com")
740
740
  # uri.port = 8080
741
741
  # uri.to_s #=> "http://my.example.com:8080"
742
742
  #
@@ -799,7 +799,7 @@ module Bundler::URI
799
799
 
800
800
  # Protected setter for the path component +v+.
801
801
  #
802
- # See also Bundler::URI::Generic.path=.
802
+ # See also Gem::URI::Generic.path=.
803
803
  #
804
804
  def set_path(v)
805
805
  @path = v
@@ -817,13 +817,13 @@ module Bundler::URI
817
817
  # Public setter for the path component +v+
818
818
  # (with validation).
819
819
  #
820
- # See also Bundler::URI::Generic.check_path.
820
+ # See also Gem::URI::Generic.check_path.
821
821
  #
822
822
  # == Usage
823
823
  #
824
- # require 'bundler/vendor/uri/lib/uri'
824
+ # require 'rubygems/vendor/uri/lib/uri'
825
825
  #
826
- # uri = Bundler::URI.parse("http://my.example.com/pub/files")
826
+ # uri = Gem::URI.parse("http://my.example.com/pub/files")
827
827
  # uri.path = "/faq/"
828
828
  # uri.to_s #=> "http://my.example.com/faq/"
829
829
  #
@@ -845,9 +845,9 @@ module Bundler::URI
845
845
  #
846
846
  # == Usage
847
847
  #
848
- # require 'bundler/vendor/uri/lib/uri'
848
+ # require 'rubygems/vendor/uri/lib/uri'
849
849
  #
850
- # uri = Bundler::URI.parse("http://my.example.com/?id=25")
850
+ # uri = Gem::URI.parse("http://my.example.com/?id=25")
851
851
  # uri.query = "id=1"
852
852
  # uri.to_s #=> "http://my.example.com/?id=1"
853
853
  #
@@ -893,7 +893,7 @@ module Bundler::URI
893
893
 
894
894
  # Protected setter for the opaque component +v+.
895
895
  #
896
- # See also Bundler::URI::Generic.opaque=.
896
+ # See also Gem::URI::Generic.opaque=.
897
897
  #
898
898
  def set_opaque(v)
899
899
  @opaque = v
@@ -911,7 +911,7 @@ module Bundler::URI
911
911
  # Public setter for the opaque component +v+
912
912
  # (with validation).
913
913
  #
914
- # See also Bundler::URI::Generic.check_opaque.
914
+ # See also Gem::URI::Generic.check_opaque.
915
915
  #
916
916
  def opaque=(v)
917
917
  check_opaque(v)
@@ -935,9 +935,9 @@ module Bundler::URI
935
935
  #
936
936
  # == Usage
937
937
  #
938
- # require 'bundler/vendor/uri/lib/uri'
938
+ # require 'rubygems/vendor/uri/lib/uri'
939
939
  #
940
- # uri = Bundler::URI.parse("http://my.example.com/?id=25#time=1305212049")
940
+ # uri = Gem::URI.parse("http://my.example.com/?id=25#time=1305212049")
941
941
  # uri.fragment = "time=1305212086"
942
942
  # uri.to_s #=> "http://my.example.com/?id=25#time=1305212086"
943
943
  #
@@ -955,21 +955,21 @@ module Bundler::URI
955
955
  end
956
956
 
957
957
  #
958
- # Returns true if Bundler::URI is hierarchical.
958
+ # Returns true if Gem::URI is hierarchical.
959
959
  #
960
960
  # == Description
961
961
  #
962
- # Bundler::URI has components listed in order of decreasing significance from left to right,
962
+ # Gem::URI has components listed in order of decreasing significance from left to right,
963
963
  # see RFC3986 https://www.rfc-editor.org/rfc/rfc3986 1.2.3.
964
964
  #
965
965
  # == Usage
966
966
  #
967
- # require 'bundler/vendor/uri/lib/uri'
967
+ # require 'rubygems/vendor/uri/lib/uri'
968
968
  #
969
- # uri = Bundler::URI.parse("http://my.example.com/")
969
+ # uri = Gem::URI.parse("http://my.example.com/")
970
970
  # uri.hierarchical?
971
971
  # #=> true
972
- # uri = Bundler::URI.parse("mailto:joe@example.com")
972
+ # uri = Gem::URI.parse("mailto:joe@example.com")
973
973
  # uri.hierarchical?
974
974
  # #=> false
975
975
  #
@@ -982,7 +982,7 @@ module Bundler::URI
982
982
  end
983
983
 
984
984
  #
985
- # Returns true if Bundler::URI has a scheme (e.g. http:// or https://) specified.
985
+ # Returns true if Gem::URI has a scheme (e.g. http:// or https://) specified.
986
986
  #
987
987
  def absolute?
988
988
  if @scheme
@@ -994,7 +994,7 @@ module Bundler::URI
994
994
  alias absolute absolute?
995
995
 
996
996
  #
997
- # Returns true if Bundler::URI does not have a scheme (e.g. http:// or https://) specified.
997
+ # Returns true if Gem::URI does not have a scheme (e.g. http:// or https://) specified.
998
998
  #
999
999
  def relative?
1000
1000
  !absolute?
@@ -1079,7 +1079,7 @@ module Bundler::URI
1079
1079
  # == Args
1080
1080
  #
1081
1081
  # +oth+::
1082
- # Bundler::URI or String
1082
+ # Gem::URI or String
1083
1083
  #
1084
1084
  # == Description
1085
1085
  #
@@ -1087,9 +1087,9 @@ module Bundler::URI
1087
1087
  #
1088
1088
  # == Usage
1089
1089
  #
1090
- # require 'bundler/vendor/uri/lib/uri'
1090
+ # require 'rubygems/vendor/uri/lib/uri'
1091
1091
  #
1092
- # uri = Bundler::URI.parse("http://my.example.com")
1092
+ # uri = Gem::URI.parse("http://my.example.com")
1093
1093
  # uri.merge!("/main.rbx?page=1")
1094
1094
  # uri.to_s # => "http://my.example.com/main.rbx?page=1"
1095
1095
  #
@@ -1107,7 +1107,7 @@ module Bundler::URI
1107
1107
  # == Args
1108
1108
  #
1109
1109
  # +oth+::
1110
- # Bundler::URI or String
1110
+ # Gem::URI or String
1111
1111
  #
1112
1112
  # == Description
1113
1113
  #
@@ -1115,9 +1115,9 @@ module Bundler::URI
1115
1115
  #
1116
1116
  # == Usage
1117
1117
  #
1118
- # require 'bundler/vendor/uri/lib/uri'
1118
+ # require 'rubygems/vendor/uri/lib/uri'
1119
1119
  #
1120
- # uri = Bundler::URI.parse("http://my.example.com")
1120
+ # uri = Gem::URI.parse("http://my.example.com")
1121
1121
  # uri.merge("/main.rbx?page=1")
1122
1122
  # # => "http://my.example.com/main.rbx?page=1"
1123
1123
  #
@@ -1125,13 +1125,13 @@ module Bundler::URI
1125
1125
  rel = parser.__send__(:convert_to_uri, oth)
1126
1126
 
1127
1127
  if rel.absolute?
1128
- #raise BadURIError, "both Bundler::URI are absolute" if absolute?
1128
+ #raise BadURIError, "both Gem::URI are absolute" if absolute?
1129
1129
  # hmm... should return oth for usability?
1130
1130
  return rel
1131
1131
  end
1132
1132
 
1133
1133
  unless self.absolute?
1134
- raise BadURIError, "both Bundler::URI are relative"
1134
+ raise BadURIError, "both Gem::URI are relative"
1135
1135
  end
1136
1136
 
1137
1137
  base = self.dup
@@ -1207,17 +1207,17 @@ module Bundler::URI
1207
1207
  oth = parser.__send__(:convert_to_uri, oth)
1208
1208
  if self.relative?
1209
1209
  raise BadURIError,
1210
- "relative Bundler::URI: #{self}"
1210
+ "relative Gem::URI: #{self}"
1211
1211
  end
1212
1212
  if oth.relative?
1213
1213
  raise BadURIError,
1214
- "relative Bundler::URI: #{oth}"
1214
+ "relative Gem::URI: #{oth}"
1215
1215
  end
1216
1216
 
1217
1217
  if self.scheme != oth.scheme
1218
1218
  return self, self.dup
1219
1219
  end
1220
- rel = Bundler::URI::Generic.new(nil, # it is relative Bundler::URI
1220
+ rel = Gem::URI::Generic.new(nil, # it is relative Gem::URI
1221
1221
  self.userinfo, self.host, self.port,
1222
1222
  nil, self.path, self.opaque,
1223
1223
  self.query, self.fragment, parser)
@@ -1257,7 +1257,7 @@ module Bundler::URI
1257
1257
  # == Args
1258
1258
  #
1259
1259
  # +oth+::
1260
- # Bundler::URI or String
1260
+ # Gem::URI or String
1261
1261
  #
1262
1262
  # == Description
1263
1263
  #
@@ -1265,11 +1265,11 @@ module Bundler::URI
1265
1265
  #
1266
1266
  # == Usage
1267
1267
  #
1268
- # require 'bundler/vendor/uri/lib/uri'
1268
+ # require 'rubygems/vendor/uri/lib/uri'
1269
1269
  #
1270
- # uri = Bundler::URI.parse('http://my.example.com/main.rbx?page=1')
1270
+ # uri = Gem::URI.parse('http://my.example.com/main.rbx?page=1')
1271
1271
  # uri.route_from('http://my.example.com')
1272
- # #=> #<Bundler::URI::Generic /main.rbx?page=1>
1272
+ # #=> #<Gem::URI::Generic /main.rbx?page=1>
1273
1273
  #
1274
1274
  def route_from(oth)
1275
1275
  # you can modify `rel', but cannot `oth'.
@@ -1297,7 +1297,7 @@ module Bundler::URI
1297
1297
  # == Args
1298
1298
  #
1299
1299
  # +oth+::
1300
- # Bundler::URI or String
1300
+ # Gem::URI or String
1301
1301
  #
1302
1302
  # == Description
1303
1303
  #
@@ -1305,23 +1305,23 @@ module Bundler::URI
1305
1305
  #
1306
1306
  # == Usage
1307
1307
  #
1308
- # require 'bundler/vendor/uri/lib/uri'
1308
+ # require 'rubygems/vendor/uri/lib/uri'
1309
1309
  #
1310
- # uri = Bundler::URI.parse('http://my.example.com')
1310
+ # uri = Gem::URI.parse('http://my.example.com')
1311
1311
  # uri.route_to('http://my.example.com/main.rbx?page=1')
1312
- # #=> #<Bundler::URI::Generic /main.rbx?page=1>
1312
+ # #=> #<Gem::URI::Generic /main.rbx?page=1>
1313
1313
  #
1314
1314
  def route_to(oth)
1315
1315
  parser.__send__(:convert_to_uri, oth).route_from(self)
1316
1316
  end
1317
1317
 
1318
1318
  #
1319
- # Returns normalized Bundler::URI.
1319
+ # Returns normalized Gem::URI.
1320
1320
  #
1321
- # require 'bundler/vendor/uri/lib/uri'
1321
+ # require 'rubygems/vendor/uri/lib/uri'
1322
1322
  #
1323
- # Bundler::URI("HTTP://my.EXAMPLE.com").normalize
1324
- # #=> #<Bundler::URI::HTTP http://my.example.com/>
1323
+ # Gem::URI("HTTP://my.EXAMPLE.com").normalize
1324
+ # #=> #<Gem::URI::HTTP http://my.example.com/>
1325
1325
  #
1326
1326
  # Normalization here means:
1327
1327
  #
@@ -1350,7 +1350,7 @@ module Bundler::URI
1350
1350
  end
1351
1351
 
1352
1352
  #
1353
- # Constructs String from Bundler::URI.
1353
+ # Constructs String from Gem::URI.
1354
1354
  #
1355
1355
  def to_s
1356
1356
  str = ''.dup
@@ -1427,17 +1427,17 @@ module Bundler::URI
1427
1427
  # == Args
1428
1428
  #
1429
1429
  # +components+::
1430
- # Multiple Symbol arguments defined in Bundler::URI::HTTP.
1430
+ # Multiple Symbol arguments defined in Gem::URI::HTTP.
1431
1431
  #
1432
1432
  # == Description
1433
1433
  #
1434
- # Selects specified components from Bundler::URI.
1434
+ # Selects specified components from Gem::URI.
1435
1435
  #
1436
1436
  # == Usage
1437
1437
  #
1438
- # require 'bundler/vendor/uri/lib/uri'
1438
+ # require 'rubygems/vendor/uri/lib/uri'
1439
1439
  #
1440
- # uri = Bundler::URI.parse('http://myuser:mypass@my.example.com/test.rbx')
1440
+ # uri = Gem::URI.parse('http://myuser:mypass@my.example.com/test.rbx')
1441
1441
  # uri.select(:userinfo, :host, :path)
1442
1442
  # # => ["myuser:mypass", "my.example.com", "/test.rbx"]
1443
1443
  #
@@ -1460,20 +1460,20 @@ module Bundler::URI
1460
1460
  # == Args
1461
1461
  #
1462
1462
  # +v+::
1463
- # Bundler::URI or String
1463
+ # Gem::URI or String
1464
1464
  #
1465
1465
  # == Description
1466
1466
  #
1467
- # Attempts to parse other Bundler::URI +oth+,
1467
+ # Attempts to parse other Gem::URI +oth+,
1468
1468
  # returns [parsed_oth, self].
1469
1469
  #
1470
1470
  # == Usage
1471
1471
  #
1472
- # require 'bundler/vendor/uri/lib/uri'
1472
+ # require 'rubygems/vendor/uri/lib/uri'
1473
1473
  #
1474
- # uri = Bundler::URI.parse("http://my.example.com")
1474
+ # uri = Gem::URI.parse("http://my.example.com")
1475
1475
  # uri.coerce("http://foo.com")
1476
- # #=> [#<Bundler::URI::HTTP http://foo.com>, #<Bundler::URI::HTTP http://my.example.com>]
1476
+ # #=> [#<Gem::URI::HTTP http://foo.com>, #<Gem::URI::HTTP http://my.example.com>]
1477
1477
  #
1478
1478
  def coerce(oth)
1479
1479
  case oth
@@ -1486,8 +1486,8 @@ module Bundler::URI
1486
1486
  return oth, self
1487
1487
  end
1488
1488
 
1489
- # Returns a proxy Bundler::URI.
1490
- # The proxy Bundler::URI is obtained from environment variables such as http_proxy,
1489
+ # Returns a proxy Gem::URI.
1490
+ # The proxy Gem::URI is obtained from environment variables such as http_proxy,
1491
1491
  # ftp_proxy, no_proxy, etc.
1492
1492
  # If there is no proper proxy, nil is returned.
1493
1493
  #
@@ -1502,7 +1502,7 @@ module Bundler::URI
1502
1502
  # http_proxy is not used too if the variable is case insensitive.
1503
1503
  # CGI_HTTP_PROXY can be used instead.
1504
1504
  def find_proxy(env=ENV)
1505
- raise BadURIError, "relative Bundler::URI: #{self}" if self.relative?
1505
+ raise BadURIError, "relative Gem::URI: #{self}" if self.relative?
1506
1506
  name = self.scheme.downcase + '_proxy'
1507
1507
  proxy_uri = nil
1508
1508
  if name == 'http_proxy' && env.include?('REQUEST_METHOD') # CGI?
@@ -1562,9 +1562,9 @@ module Bundler::URI
1562
1562
 
1563
1563
  name = 'no_proxy'
1564
1564
  if no_proxy = env[name] || env[name.upcase]
1565
- return nil unless Bundler::URI::Generic.use_proxy?(self.hostname, addr, self.port, no_proxy)
1565
+ return nil unless Gem::URI::Generic.use_proxy?(self.hostname, addr, self.port, no_proxy)
1566
1566
  end
1567
- Bundler::URI.parse(proxy_uri)
1567
+ Gem::URI.parse(proxy_uri)
1568
1568
  end
1569
1569
 
1570
1570
  def self.use_proxy?(hostname, addr, port, no_proxy) # :nodoc: