rubygems-update 3.1.0.pre3 → 3.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (171) hide show
  1. checksums.yaml +4 -4
  2. data/.bundle/config +2 -0
  3. data/CONTRIBUTING.md +1 -1
  4. data/Gemfile +8 -0
  5. data/Gemfile.lock +43 -0
  6. data/History.txt +97 -2
  7. data/Manifest.txt +21 -3
  8. data/README.md +4 -4
  9. data/Rakefile +11 -10
  10. data/bin/update_rubygems +1 -1
  11. data/bundler/CHANGELOG.md +56 -3
  12. data/bundler/lib/bundler.rb +0 -1
  13. data/bundler/lib/bundler/build_metadata.rb +2 -0
  14. data/bundler/lib/bundler/cli.rb +1 -1
  15. data/bundler/lib/bundler/cli/config.rb +1 -1
  16. data/bundler/lib/bundler/cli/install.rb +3 -2
  17. data/bundler/lib/bundler/cli/update.rb +1 -1
  18. data/bundler/lib/bundler/feature_flag.rb +1 -1
  19. data/bundler/lib/bundler/fetcher.rb +2 -2
  20. data/bundler/lib/bundler/fetcher/downloader.rb +1 -1
  21. data/bundler/lib/bundler/fetcher/index.rb +1 -1
  22. data/bundler/lib/bundler/friendly_errors.rb +1 -1
  23. data/bundler/lib/bundler/gem_helper.rb +13 -12
  24. data/bundler/lib/bundler/inline.rb +36 -31
  25. data/bundler/lib/bundler/lazy_specification.rb +0 -1
  26. data/bundler/lib/bundler/mirror.rb +3 -3
  27. data/bundler/lib/bundler/plugin/api/source.rb +2 -4
  28. data/bundler/lib/bundler/remote_specification.rb +0 -2
  29. data/bundler/lib/bundler/rubygems_integration.rb +15 -13
  30. data/bundler/lib/bundler/settings.rb +7 -4
  31. data/bundler/lib/bundler/setup.rb +5 -0
  32. data/bundler/lib/bundler/source/git.rb +5 -5
  33. data/bundler/lib/bundler/source/git/git_proxy.rb +3 -2
  34. data/bundler/lib/bundler/source/rubygems.rb +3 -3
  35. data/bundler/lib/bundler/source/rubygems/remote.rb +1 -1
  36. data/bundler/lib/bundler/uri_credentials_filter.rb +7 -3
  37. data/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb +3 -3
  38. data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +26 -48
  39. data/bundler/lib/bundler/vendor/thor/lib/thor.rb +7 -0
  40. data/bundler/lib/bundler/vendor/thor/lib/thor/actions.rb +10 -6
  41. data/bundler/lib/bundler/vendor/thor/lib/thor/base.rb +29 -19
  42. data/bundler/lib/bundler/vendor/thor/lib/thor/nested_context.rb +29 -0
  43. data/bundler/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +1 -1
  44. data/bundler/lib/bundler/vendor/thor/lib/thor/parser/option.rb +13 -2
  45. data/bundler/lib/bundler/vendor/thor/lib/thor/runner.rb +8 -9
  46. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +10 -1
  47. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/html.rb +2 -2
  48. data/bundler/lib/bundler/vendor/thor/lib/thor/util.rb +17 -1
  49. data/bundler/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
  50. data/bundler/lib/bundler/vendor/uri/lib/uri.rb +104 -0
  51. data/bundler/lib/bundler/vendor/uri/lib/uri/common.rb +744 -0
  52. data/bundler/lib/bundler/vendor/uri/lib/uri/file.rb +94 -0
  53. data/bundler/lib/bundler/vendor/uri/lib/uri/ftp.rb +267 -0
  54. data/bundler/lib/bundler/vendor/uri/lib/uri/generic.rb +1568 -0
  55. data/bundler/lib/bundler/vendor/uri/lib/uri/http.rb +88 -0
  56. data/bundler/lib/bundler/vendor/uri/lib/uri/https.rb +23 -0
  57. data/bundler/lib/bundler/vendor/uri/lib/uri/ldap.rb +261 -0
  58. data/bundler/lib/bundler/vendor/uri/lib/uri/ldaps.rb +21 -0
  59. data/bundler/lib/bundler/vendor/uri/lib/uri/mailto.rb +294 -0
  60. data/bundler/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +546 -0
  61. data/bundler/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +125 -0
  62. data/bundler/lib/bundler/vendor/uri/lib/uri/version.rb +6 -0
  63. data/bundler/lib/bundler/vendored_uri.rb +4 -0
  64. data/bundler/lib/bundler/version.rb +1 -1
  65. data/bundler/man/bundle-add.1 +1 -1
  66. data/bundler/man/bundle-add.1.txt +1 -1
  67. data/bundler/man/bundle-binstubs.1 +1 -1
  68. data/bundler/man/bundle-binstubs.1.txt +1 -1
  69. data/bundler/man/bundle-cache.1 +1 -1
  70. data/bundler/man/bundle-cache.1.txt +1 -1
  71. data/bundler/man/bundle-check.1 +1 -1
  72. data/bundler/man/bundle-check.1.txt +1 -1
  73. data/bundler/man/bundle-clean.1 +1 -1
  74. data/bundler/man/bundle-clean.1.txt +1 -1
  75. data/bundler/man/bundle-config.1 +1 -1
  76. data/bundler/man/bundle-config.1.txt +1 -1
  77. data/bundler/man/bundle-doctor.1 +1 -1
  78. data/bundler/man/bundle-doctor.1.txt +1 -1
  79. data/bundler/man/bundle-exec.1 +1 -1
  80. data/bundler/man/bundle-exec.1.txt +1 -1
  81. data/bundler/man/bundle-gem.1 +1 -1
  82. data/bundler/man/bundle-gem.1.txt +1 -1
  83. data/bundler/man/bundle-info.1 +1 -1
  84. data/bundler/man/bundle-info.1.txt +1 -1
  85. data/bundler/man/bundle-init.1 +1 -1
  86. data/bundler/man/bundle-init.1.txt +1 -1
  87. data/bundler/man/bundle-inject.1 +1 -1
  88. data/bundler/man/bundle-inject.1.txt +1 -1
  89. data/bundler/man/bundle-install.1 +1 -1
  90. data/bundler/man/bundle-install.1.txt +1 -1
  91. data/bundler/man/bundle-list.1 +1 -1
  92. data/bundler/man/bundle-list.1.txt +1 -1
  93. data/bundler/man/bundle-lock.1 +1 -1
  94. data/bundler/man/bundle-lock.1.txt +1 -1
  95. data/bundler/man/bundle-open.1 +1 -1
  96. data/bundler/man/bundle-open.1.txt +1 -1
  97. data/bundler/man/bundle-outdated.1 +1 -1
  98. data/bundler/man/bundle-outdated.1.txt +1 -1
  99. data/bundler/man/bundle-platform.1 +1 -1
  100. data/bundler/man/bundle-platform.1.txt +1 -1
  101. data/bundler/man/bundle-pristine.1 +1 -1
  102. data/bundler/man/bundle-pristine.1.txt +1 -1
  103. data/bundler/man/bundle-remove.1 +1 -1
  104. data/bundler/man/bundle-remove.1.txt +1 -1
  105. data/bundler/man/bundle-show.1 +1 -1
  106. data/bundler/man/bundle-show.1.txt +1 -1
  107. data/bundler/man/bundle-update.1 +1 -1
  108. data/bundler/man/bundle-update.1.txt +1 -1
  109. data/bundler/man/bundle-viz.1 +1 -1
  110. data/bundler/man/bundle-viz.1.txt +1 -1
  111. data/bundler/man/bundle.1 +1 -1
  112. data/bundler/man/bundle.1.txt +1 -1
  113. data/bundler/man/gemfile.5 +1 -1
  114. data/bundler/man/gemfile.5.txt +1 -1
  115. data/lib/rubygems.rb +64 -47
  116. data/lib/rubygems/basic_specification.rb +1 -1
  117. data/lib/rubygems/command.rb +29 -7
  118. data/lib/rubygems/commands/generate_index_command.rb +3 -0
  119. data/lib/rubygems/commands/help_command.rb +1 -1
  120. data/lib/rubygems/commands/setup_command.rb +30 -15
  121. data/lib/rubygems/commands/sources_command.rb +17 -3
  122. data/lib/rubygems/commands/uninstall_command.rb +1 -1
  123. data/lib/rubygems/core_ext/kernel_require.rb +1 -1
  124. data/lib/rubygems/core_ext/kernel_warn.rb +8 -4
  125. data/lib/rubygems/ext/builder.rb +4 -2
  126. data/lib/rubygems/remote_fetcher.rb +20 -31
  127. data/lib/rubygems/request.rb +2 -0
  128. data/lib/rubygems/request_set/gem_dependency_api.rb +1 -1
  129. data/lib/rubygems/resolver/api_set.rb +1 -1
  130. data/lib/rubygems/resolver/api_specification.rb +1 -1
  131. data/lib/rubygems/server.rb +1 -1
  132. data/lib/rubygems/source.rb +7 -1
  133. data/lib/rubygems/source_list.rb +2 -0
  134. data/lib/rubygems/specification.rb +12 -8
  135. data/lib/rubygems/specification_policy.rb +53 -30
  136. data/lib/rubygems/test_case.rb +60 -0
  137. data/lib/rubygems/uri_formatter.rb +0 -1
  138. data/lib/rubygems/uri_parser.rb +36 -0
  139. data/lib/rubygems/uri_parsing.rb +23 -0
  140. data/lib/rubygems/util.rb +7 -1
  141. data/lib/rubygems/version.rb +1 -1
  142. data/rubygems-update.gemspec +1 -8
  143. data/test/rubygems/specifications/rubyforge-0.0.1.gemspec +14 -0
  144. data/test/rubygems/test_gem.rb +90 -46
  145. data/test/rubygems/test_gem_command.rb +38 -9
  146. data/test/rubygems/test_gem_commands_build_command.rb +18 -1
  147. data/test/rubygems/test_gem_commands_generate_index_command.rb +37 -1
  148. data/test/rubygems/test_gem_commands_help_command.rb +1 -6
  149. data/test/rubygems/test_gem_commands_server_command.rb +6 -2
  150. data/test/rubygems/test_gem_commands_setup_command.rb +56 -10
  151. data/test/rubygems/test_gem_commands_sources_command.rb +113 -1
  152. data/test/rubygems/test_gem_commands_uninstall_command.rb +1 -0
  153. data/test/rubygems/test_gem_gem_runner.rb +3 -1
  154. data/test/rubygems/test_gem_indexer.rb +1 -1
  155. data/test/rubygems/test_gem_installer.rb +10 -23
  156. data/test/rubygems/test_gem_package.rb +3 -8
  157. data/test/rubygems/test_gem_package_tar_writer.rb +5 -0
  158. data/test/rubygems/test_gem_request_set.rb +52 -0
  159. data/test/rubygems/test_gem_source.rb +14 -0
  160. data/test/rubygems/test_gem_specification.rb +74 -54
  161. data/test/rubygems/test_gem_stub_specification.rb +0 -1
  162. data/test/rubygems/test_project_sanity.rb +0 -43
  163. data/test/rubygems/test_remote_fetch_error.rb +1 -1
  164. data/test/rubygems/test_require.rb +41 -42
  165. data/util/bisect +0 -21
  166. data/util/ci.sh +1 -1
  167. data/util/update_changelog.rb +7 -10
  168. metadata +27 -93
  169. data/bundler/lib/bundler/gem_remote_fetcher.rb +0 -43
  170. data/bundler/lib/bundler/vendor/fileutils/lib/fileutils/version.rb +0 -5
  171. data/bundler/lib/bundler/vendor/thor/lib/thor/core_ext/io_binary_read.rb +0 -12
@@ -1,43 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "rubygems/remote_fetcher"
4
-
5
- module Bundler
6
- # Adds support for setting custom HTTP headers when fetching gems from the
7
- # server.
8
- #
9
- # TODO: Get rid of this when and if gemstash only supports RubyGems versions
10
- # that contain https://github.com/rubygems/rubygems/commit/3db265cc20b2f813.
11
- class GemRemoteFetcher < Gem::RemoteFetcher
12
- attr_accessor :headers
13
-
14
- # Extracted from RubyGems 2.4.
15
- def fetch_http(uri, last_modified = nil, head = false, depth = 0)
16
- fetch_type = head ? Net::HTTP::Head : Net::HTTP::Get
17
- # beginning of change
18
- response = request uri, fetch_type, last_modified do |req|
19
- headers.each {|k, v| req.add_field(k, v) } if headers
20
- end
21
- # end of change
22
-
23
- case response
24
- when Net::HTTPOK, Net::HTTPNotModified then
25
- response.uri = uri if response.respond_to? :uri
26
- head ? response : response.body
27
- when Net::HTTPMovedPermanently, Net::HTTPFound, Net::HTTPSeeOther,
28
- Net::HTTPTemporaryRedirect then
29
- raise FetchError.new("too many redirects", uri) if depth > 10
30
-
31
- location = URI.parse response["Location"]
32
-
33
- if https?(uri) && !https?(location)
34
- raise FetchError.new("redirecting to non-https resource: #{location}", uri)
35
- end
36
-
37
- fetch_http(location, last_modified, head, depth + 1)
38
- else
39
- raise FetchError.new("bad response #{response.message} #{response.code}", uri)
40
- end
41
- end
42
- end
43
- end
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Bundler::FileUtils
4
- VERSION = "1.3.0"
5
- end
@@ -1,12 +0,0 @@
1
- class IO #:nodoc:
2
- class << self
3
- unless method_defined? :binread
4
- def binread(file, *args)
5
- raise ArgumentError, "wrong number of arguments (#{1 + args.size} for 1..3)" unless args.size < 3
6
- File.open(file, "rb") do |f|
7
- f.read(*args)
8
- end
9
- end
10
- end
11
- end
12
- end