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.
- checksums.yaml +4 -4
- data/.bundle/config +2 -0
- data/CONTRIBUTING.md +1 -1
- data/Gemfile +8 -0
- data/Gemfile.lock +43 -0
- data/History.txt +97 -2
- data/Manifest.txt +21 -3
- data/README.md +4 -4
- data/Rakefile +11 -10
- data/bin/update_rubygems +1 -1
- data/bundler/CHANGELOG.md +56 -3
- data/bundler/lib/bundler.rb +0 -1
- data/bundler/lib/bundler/build_metadata.rb +2 -0
- data/bundler/lib/bundler/cli.rb +1 -1
- data/bundler/lib/bundler/cli/config.rb +1 -1
- data/bundler/lib/bundler/cli/install.rb +3 -2
- data/bundler/lib/bundler/cli/update.rb +1 -1
- data/bundler/lib/bundler/feature_flag.rb +1 -1
- data/bundler/lib/bundler/fetcher.rb +2 -2
- data/bundler/lib/bundler/fetcher/downloader.rb +1 -1
- data/bundler/lib/bundler/fetcher/index.rb +1 -1
- data/bundler/lib/bundler/friendly_errors.rb +1 -1
- data/bundler/lib/bundler/gem_helper.rb +13 -12
- data/bundler/lib/bundler/inline.rb +36 -31
- data/bundler/lib/bundler/lazy_specification.rb +0 -1
- data/bundler/lib/bundler/mirror.rb +3 -3
- data/bundler/lib/bundler/plugin/api/source.rb +2 -4
- data/bundler/lib/bundler/remote_specification.rb +0 -2
- data/bundler/lib/bundler/rubygems_integration.rb +15 -13
- data/bundler/lib/bundler/settings.rb +7 -4
- data/bundler/lib/bundler/setup.rb +5 -0
- data/bundler/lib/bundler/source/git.rb +5 -5
- data/bundler/lib/bundler/source/git/git_proxy.rb +3 -2
- data/bundler/lib/bundler/source/rubygems.rb +3 -3
- data/bundler/lib/bundler/source/rubygems/remote.rb +1 -1
- data/bundler/lib/bundler/uri_credentials_filter.rb +7 -3
- data/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb +3 -3
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +26 -48
- data/bundler/lib/bundler/vendor/thor/lib/thor.rb +7 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions.rb +10 -6
- data/bundler/lib/bundler/vendor/thor/lib/thor/base.rb +29 -19
- data/bundler/lib/bundler/vendor/thor/lib/thor/nested_context.rb +29 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/option.rb +13 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/runner.rb +8 -9
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +10 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/html.rb +2 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/util.rb +17 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
- data/bundler/lib/bundler/vendor/uri/lib/uri.rb +104 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/common.rb +744 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/file.rb +94 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/ftp.rb +267 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/generic.rb +1568 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/http.rb +88 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/https.rb +23 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/ldap.rb +261 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/ldaps.rb +21 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/mailto.rb +294 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +546 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +125 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/version.rb +6 -0
- data/bundler/lib/bundler/vendored_uri.rb +4 -0
- data/bundler/lib/bundler/version.rb +1 -1
- data/bundler/man/bundle-add.1 +1 -1
- data/bundler/man/bundle-add.1.txt +1 -1
- data/bundler/man/bundle-binstubs.1 +1 -1
- data/bundler/man/bundle-binstubs.1.txt +1 -1
- data/bundler/man/bundle-cache.1 +1 -1
- data/bundler/man/bundle-cache.1.txt +1 -1
- data/bundler/man/bundle-check.1 +1 -1
- data/bundler/man/bundle-check.1.txt +1 -1
- data/bundler/man/bundle-clean.1 +1 -1
- data/bundler/man/bundle-clean.1.txt +1 -1
- data/bundler/man/bundle-config.1 +1 -1
- data/bundler/man/bundle-config.1.txt +1 -1
- data/bundler/man/bundle-doctor.1 +1 -1
- data/bundler/man/bundle-doctor.1.txt +1 -1
- data/bundler/man/bundle-exec.1 +1 -1
- data/bundler/man/bundle-exec.1.txt +1 -1
- data/bundler/man/bundle-gem.1 +1 -1
- data/bundler/man/bundle-gem.1.txt +1 -1
- data/bundler/man/bundle-info.1 +1 -1
- data/bundler/man/bundle-info.1.txt +1 -1
- data/bundler/man/bundle-init.1 +1 -1
- data/bundler/man/bundle-init.1.txt +1 -1
- data/bundler/man/bundle-inject.1 +1 -1
- data/bundler/man/bundle-inject.1.txt +1 -1
- data/bundler/man/bundle-install.1 +1 -1
- data/bundler/man/bundle-install.1.txt +1 -1
- data/bundler/man/bundle-list.1 +1 -1
- data/bundler/man/bundle-list.1.txt +1 -1
- data/bundler/man/bundle-lock.1 +1 -1
- data/bundler/man/bundle-lock.1.txt +1 -1
- data/bundler/man/bundle-open.1 +1 -1
- data/bundler/man/bundle-open.1.txt +1 -1
- data/bundler/man/bundle-outdated.1 +1 -1
- data/bundler/man/bundle-outdated.1.txt +1 -1
- data/bundler/man/bundle-platform.1 +1 -1
- data/bundler/man/bundle-platform.1.txt +1 -1
- data/bundler/man/bundle-pristine.1 +1 -1
- data/bundler/man/bundle-pristine.1.txt +1 -1
- data/bundler/man/bundle-remove.1 +1 -1
- data/bundler/man/bundle-remove.1.txt +1 -1
- data/bundler/man/bundle-show.1 +1 -1
- data/bundler/man/bundle-show.1.txt +1 -1
- data/bundler/man/bundle-update.1 +1 -1
- data/bundler/man/bundle-update.1.txt +1 -1
- data/bundler/man/bundle-viz.1 +1 -1
- data/bundler/man/bundle-viz.1.txt +1 -1
- data/bundler/man/bundle.1 +1 -1
- data/bundler/man/bundle.1.txt +1 -1
- data/bundler/man/gemfile.5 +1 -1
- data/bundler/man/gemfile.5.txt +1 -1
- data/lib/rubygems.rb +64 -47
- data/lib/rubygems/basic_specification.rb +1 -1
- data/lib/rubygems/command.rb +29 -7
- data/lib/rubygems/commands/generate_index_command.rb +3 -0
- data/lib/rubygems/commands/help_command.rb +1 -1
- data/lib/rubygems/commands/setup_command.rb +30 -15
- data/lib/rubygems/commands/sources_command.rb +17 -3
- data/lib/rubygems/commands/uninstall_command.rb +1 -1
- data/lib/rubygems/core_ext/kernel_require.rb +1 -1
- data/lib/rubygems/core_ext/kernel_warn.rb +8 -4
- data/lib/rubygems/ext/builder.rb +4 -2
- data/lib/rubygems/remote_fetcher.rb +20 -31
- data/lib/rubygems/request.rb +2 -0
- data/lib/rubygems/request_set/gem_dependency_api.rb +1 -1
- data/lib/rubygems/resolver/api_set.rb +1 -1
- data/lib/rubygems/resolver/api_specification.rb +1 -1
- data/lib/rubygems/server.rb +1 -1
- data/lib/rubygems/source.rb +7 -1
- data/lib/rubygems/source_list.rb +2 -0
- data/lib/rubygems/specification.rb +12 -8
- data/lib/rubygems/specification_policy.rb +53 -30
- data/lib/rubygems/test_case.rb +60 -0
- data/lib/rubygems/uri_formatter.rb +0 -1
- data/lib/rubygems/uri_parser.rb +36 -0
- data/lib/rubygems/uri_parsing.rb +23 -0
- data/lib/rubygems/util.rb +7 -1
- data/lib/rubygems/version.rb +1 -1
- data/rubygems-update.gemspec +1 -8
- data/test/rubygems/specifications/rubyforge-0.0.1.gemspec +14 -0
- data/test/rubygems/test_gem.rb +90 -46
- data/test/rubygems/test_gem_command.rb +38 -9
- data/test/rubygems/test_gem_commands_build_command.rb +18 -1
- data/test/rubygems/test_gem_commands_generate_index_command.rb +37 -1
- data/test/rubygems/test_gem_commands_help_command.rb +1 -6
- data/test/rubygems/test_gem_commands_server_command.rb +6 -2
- data/test/rubygems/test_gem_commands_setup_command.rb +56 -10
- data/test/rubygems/test_gem_commands_sources_command.rb +113 -1
- data/test/rubygems/test_gem_commands_uninstall_command.rb +1 -0
- data/test/rubygems/test_gem_gem_runner.rb +3 -1
- data/test/rubygems/test_gem_indexer.rb +1 -1
- data/test/rubygems/test_gem_installer.rb +10 -23
- data/test/rubygems/test_gem_package.rb +3 -8
- data/test/rubygems/test_gem_package_tar_writer.rb +5 -0
- data/test/rubygems/test_gem_request_set.rb +52 -0
- data/test/rubygems/test_gem_source.rb +14 -0
- data/test/rubygems/test_gem_specification.rb +74 -54
- data/test/rubygems/test_gem_stub_specification.rb +0 -1
- data/test/rubygems/test_project_sanity.rb +0 -43
- data/test/rubygems/test_remote_fetch_error.rb +1 -1
- data/test/rubygems/test_require.rb +41 -42
- data/util/bisect +0 -21
- data/util/ci.sh +1 -1
- data/util/update_changelog.rb +7 -10
- metadata +27 -93
- data/bundler/lib/bundler/gem_remote_fetcher.rb +0 -43
- data/bundler/lib/bundler/vendor/fileutils/lib/fileutils/version.rb +0 -5
- 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,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
|