rubygems-update 3.5.23 → 3.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +74 -0
- data/Manifest.txt +23 -16
- data/README.md +15 -10
- data/bundler/CHANGELOG.md +66 -0
- data/bundler/bundler.gemspec +2 -2
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli/console.rb +0 -4
- data/bundler/lib/bundler/cli/doctor.rb +4 -4
- data/bundler/lib/bundler/cli/exec.rb +1 -0
- data/bundler/lib/bundler/cli/gem.rb +1 -1
- data/bundler/lib/bundler/cli/info.rb +2 -2
- data/bundler/lib/bundler/cli/inject.rb +1 -1
- data/bundler/lib/bundler/cli/install.rb +4 -0
- data/bundler/lib/bundler/cli/lock.rb +20 -1
- data/bundler/lib/bundler/cli/pristine.rb +1 -1
- data/bundler/lib/bundler/cli/show.rb +2 -2
- data/bundler/lib/bundler/cli.rb +22 -53
- data/bundler/lib/bundler/compact_index_client/cache_file.rb +0 -5
- data/bundler/lib/bundler/compact_index_client/updater.rb +0 -11
- data/bundler/lib/bundler/definition.rb +155 -74
- data/bundler/lib/bundler/dependency.rb +1 -1
- data/bundler/lib/bundler/dsl.rb +2 -13
- data/bundler/lib/bundler/endpoint_specification.rb +10 -1
- data/bundler/lib/bundler/errors.rb +10 -0
- data/bundler/lib/bundler/feature_flag.rb +1 -0
- data/bundler/lib/bundler/fetcher/compact_index.rb +1 -1
- data/bundler/lib/bundler/fetcher.rb +10 -3
- data/bundler/lib/bundler/gem_helpers.rb +21 -5
- data/bundler/lib/bundler/injector.rb +2 -2
- data/bundler/lib/bundler/installer/standalone.rb +2 -2
- data/bundler/lib/bundler/installer.rb +4 -38
- data/bundler/lib/bundler/lazy_specification.rb +65 -24
- data/bundler/lib/bundler/lockfile_parser.rb +9 -1
- data/bundler/lib/bundler/man/bundle-add.1 +13 -10
- data/bundler/lib/bundler/man/bundle-add.1.ronn +12 -9
- data/bundler/lib/bundler/man/bundle-binstubs.1 +7 -4
- data/bundler/lib/bundler/man/bundle-binstubs.1.ronn +6 -3
- data/bundler/lib/bundler/man/bundle-cache.1 +30 -2
- data/bundler/lib/bundler/man/bundle-cache.1.ronn +31 -2
- data/bundler/lib/bundler/man/bundle-check.1 +3 -3
- data/bundler/lib/bundler/man/bundle-check.1.ronn +4 -2
- data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
- data/bundler/lib/bundler/man/bundle-config.1 +3 -1
- data/bundler/lib/bundler/man/bundle-config.1.ronn +2 -0
- data/bundler/lib/bundler/man/bundle-console.1 +2 -4
- data/bundler/lib/bundler/man/bundle-console.1.ronn +2 -7
- data/bundler/lib/bundler/man/bundle-doctor.1 +2 -2
- data/bundler/lib/bundler/man/bundle-doctor.1.ronn +1 -1
- data/bundler/lib/bundler/man/bundle-env.1 +9 -0
- data/bundler/lib/bundler/man/bundle-env.1.ronn +10 -0
- data/bundler/lib/bundler/man/bundle-exec.1 +5 -2
- data/bundler/lib/bundler/man/bundle-exec.1.ronn +4 -1
- data/bundler/lib/bundler/man/bundle-fund.1 +22 -0
- data/bundler/lib/bundler/man/bundle-fund.1.ronn +25 -0
- data/bundler/lib/bundler/man/bundle-gem.1 +17 -5
- data/bundler/lib/bundler/man/bundle-gem.1.ronn +27 -6
- data/bundler/lib/bundler/man/bundle-help.1 +1 -1
- data/bundler/lib/bundler/man/bundle-info.1 +5 -2
- data/bundler/lib/bundler/man/bundle-info.1.ronn +6 -2
- data/bundler/lib/bundler/man/bundle-init.1 +3 -3
- data/bundler/lib/bundler/man/bundle-init.1.ronn +3 -2
- data/bundler/lib/bundler/man/bundle-inject.1 +10 -2
- data/bundler/lib/bundler/man/bundle-inject.1.ronn +9 -1
- data/bundler/lib/bundler/man/bundle-install.1 +14 -11
- data/bundler/lib/bundler/man/bundle-install.1.ronn +21 -16
- data/bundler/lib/bundler/man/bundle-issue.1 +45 -0
- data/bundler/lib/bundler/man/bundle-issue.1.ronn +37 -0
- data/bundler/lib/bundler/man/bundle-licenses.1 +9 -0
- data/bundler/lib/bundler/man/bundle-licenses.1.ronn +10 -0
- data/bundler/lib/bundler/man/bundle-list.1 +1 -1
- data/bundler/lib/bundler/man/bundle-list.1.ronn +4 -1
- data/bundler/lib/bundler/man/bundle-lock.1 +21 -6
- data/bundler/lib/bundler/man/bundle-lock.1.ronn +25 -4
- data/bundler/lib/bundler/man/bundle-open.1 +2 -2
- data/bundler/lib/bundler/man/bundle-open.1.ronn +2 -1
- data/bundler/lib/bundler/man/bundle-outdated.1 +8 -5
- data/bundler/lib/bundler/man/bundle-outdated.1.ronn +8 -4
- data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
- data/bundler/lib/bundler/man/bundle-plugin.1 +1 -1
- data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
- data/bundler/lib/bundler/man/bundle-pristine.1.ronn +1 -1
- data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
- data/bundler/lib/bundler/man/bundle-remove.1.ronn +1 -1
- data/bundler/lib/bundler/man/bundle-show.1 +5 -2
- data/bundler/lib/bundler/man/bundle-show.1.ronn +4 -0
- data/bundler/lib/bundler/man/bundle-update.1 +13 -7
- data/bundler/lib/bundler/man/bundle-update.1.ronn +14 -6
- data/bundler/lib/bundler/man/bundle-version.1 +1 -1
- data/bundler/lib/bundler/man/bundle-viz.1 +4 -4
- data/bundler/lib/bundler/man/bundle-viz.1.ronn +7 -3
- data/bundler/lib/bundler/man/bundle.1 +1 -1
- data/bundler/lib/bundler/man/gemfile.5 +1 -1
- data/bundler/lib/bundler/man/index.txt +4 -0
- data/bundler/lib/bundler/materialization.rb +59 -0
- data/bundler/lib/bundler/plugin/events.rb +24 -0
- data/bundler/lib/bundler/plugin/installer.rb +1 -1
- data/bundler/lib/bundler/process_lock.rb +1 -1
- data/bundler/lib/bundler/remote_specification.rb +6 -1
- data/bundler/lib/bundler/resolver/base.rb +2 -6
- data/bundler/lib/bundler/resolver/candidate.rb +2 -2
- data/bundler/lib/bundler/resolver/spec_group.rb +4 -3
- data/bundler/lib/bundler/resolver.rb +5 -5
- data/bundler/lib/bundler/rubygems_ext.rb +28 -28
- data/bundler/lib/bundler/rubygems_gem_installer.rb +0 -1
- data/bundler/lib/bundler/rubygems_integration.rb +21 -11
- data/bundler/lib/bundler/runtime.rb +27 -7
- data/bundler/lib/bundler/self_manager.rb +2 -3
- data/bundler/lib/bundler/settings.rb +1 -0
- data/bundler/lib/bundler/shared_helpers.rb +2 -2
- data/bundler/lib/bundler/source/git/git_proxy.rb +0 -6
- data/bundler/lib/bundler/source/git.rb +56 -31
- data/bundler/lib/bundler/source/path.rb +2 -2
- data/bundler/lib/bundler/source_list.rb +1 -1
- data/bundler/lib/bundler/spec_set.rb +81 -56
- data/bundler/lib/bundler/stub_specification.rb +8 -0
- data/bundler/lib/bundler/templates/newgem/README.md.tt +1 -1
- data/bundler/lib/bundler/uri_credentials_filter.rb +1 -1
- data/bundler/lib/bundler/vendor/fileutils/COPYING +56 -0
- data/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb +15 -13
- data/bundler/lib/bundler/vendor/securerandom/COPYING +56 -0
- data/bundler/lib/bundler/vendor/securerandom/lib/securerandom.rb +11 -5
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +3 -5
- data/bundler/lib/bundler/vendor/thor/lib/thor/group.rb +11 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +1 -4
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/option.rb +2 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/options.rb +2 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +9 -9
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/html.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/table_printer.rb +5 -21
- data/bundler/lib/bundler/vendor/thor/lib/thor/util.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor.rb +11 -0
- data/bundler/lib/bundler/vendor/uri/COPYING +56 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/common.rb +37 -16
- data/bundler/lib/bundler/vendor/uri/lib/uri/file.rb +3 -3
- data/bundler/lib/bundler/vendor/uri/lib/uri/ftp.rb +1 -1
- data/bundler/lib/bundler/vendor/uri/lib/uri/generic.rb +16 -26
- data/bundler/lib/bundler/vendor/uri/lib/uri/http.rb +2 -2
- data/bundler/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +10 -3
- data/bundler/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +26 -3
- data/bundler/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
- data/bundler/lib/bundler/vendor/uri/lib/uri.rb +9 -9
- data/bundler/lib/bundler/vendored_securerandom.rb +0 -2
- data/bundler/lib/bundler/version.rb +1 -1
- data/bundler/lib/bundler.rb +37 -13
- data/{CONTRIBUTING.md → doc/rubygems/CONTRIBUTING.md} +9 -9
- data/{POLICIES.md → doc/rubygems/POLICIES.md} +11 -11
- data/lib/rubygems/basic_specification.rb +5 -4
- data/lib/rubygems/commands/cleanup_command.rb +2 -2
- data/lib/rubygems/commands/contents_command.rb +4 -4
- data/lib/rubygems/commands/exec_command.rb +3 -0
- data/lib/rubygems/commands/pristine_command.rb +2 -2
- data/lib/rubygems/commands/push_command.rb +29 -5
- data/lib/rubygems/commands/rdoc_command.rb +2 -2
- data/lib/rubygems/commands/rebuild_command.rb +0 -2
- data/lib/rubygems/commands/setup_command.rb +1 -16
- data/lib/rubygems/commands/unpack_command.rb +0 -6
- data/lib/rubygems/commands/update_command.rb +2 -8
- data/lib/rubygems/config_file.rb +12 -0
- data/lib/rubygems/core_ext/kernel_warn.rb +2 -6
- data/lib/rubygems/defaults.rb +1 -1
- data/lib/rubygems/exceptions.rb +0 -6
- data/lib/rubygems/ext/builder.rb +6 -4
- data/lib/rubygems/ext/cargo_builder.rb +7 -4
- data/lib/rubygems/ext/cmake_builder.rb +7 -2
- data/lib/rubygems/ext/configure_builder.rb +7 -2
- data/lib/rubygems/ext/ext_conf_builder.rb +9 -5
- data/lib/rubygems/ext/rake_builder.rb +6 -1
- data/lib/rubygems/install_update_options.rb +5 -0
- data/lib/rubygems/installer.rb +2 -2
- data/lib/rubygems/platform.rb +4 -3
- data/lib/rubygems/psych_tree.rb +4 -0
- data/lib/rubygems/query_utils.rb +1 -1
- data/lib/rubygems/request_set/gem_dependency_api.rb +1 -1
- data/lib/rubygems/requirement.rb +0 -4
- data/lib/rubygems/resolver/composed_set.rb +3 -3
- data/lib/rubygems/resolver/git_set.rb +0 -1
- data/lib/rubygems/resolver/index_set.rb +2 -2
- data/lib/rubygems/resolver.rb +3 -3
- data/lib/rubygems/source/git.rb +13 -10
- data/lib/rubygems/spec_fetcher.rb +16 -5
- data/lib/rubygems/specification.rb +37 -31
- data/lib/rubygems/target_rbconfig.rb +50 -0
- data/lib/rubygems/uri.rb +1 -1
- data/lib/rubygems/util/licenses.rb +10 -1
- data/lib/rubygems/vendor/net-http/COPYING +56 -0
- data/lib/rubygems/vendor/net-http/lib/net/http/header.rb +1 -1
- data/lib/rubygems/vendor/net-http/lib/net/http/requests.rb +5 -0
- data/lib/rubygems/vendor/net-http/lib/net/http.rb +120 -36
- data/lib/rubygems/vendor/optparse/lib/optparse/ac.rb +16 -0
- data/lib/rubygems/vendor/optparse/lib/optparse/kwargs.rb +8 -3
- data/lib/rubygems/vendor/optparse/lib/optparse/version.rb +9 -0
- data/lib/rubygems/vendor/optparse/lib/optparse.rb +147 -51
- data/lib/rubygems/vendor/resolv/COPYING +56 -0
- data/lib/rubygems/vendor/resolv/lib/resolv.rb +50 -37
- data/lib/rubygems/vendor/securerandom/COPYING +56 -0
- data/lib/rubygems/vendor/securerandom/lib/securerandom.rb +11 -5
- data/lib/rubygems/vendor/timeout/COPYING +56 -0
- data/lib/rubygems/vendor/timeout/lib/timeout.rb +9 -10
- data/lib/rubygems/vendor/uri/COPYING +56 -0
- data/lib/rubygems/vendor/uri/lib/uri/common.rb +37 -16
- data/lib/rubygems/vendor/uri/lib/uri/file.rb +3 -3
- data/lib/rubygems/vendor/uri/lib/uri/ftp.rb +1 -1
- data/lib/rubygems/vendor/uri/lib/uri/generic.rb +16 -26
- data/lib/rubygems/vendor/uri/lib/uri/http.rb +2 -2
- data/lib/rubygems/vendor/uri/lib/uri/rfc2396_parser.rb +10 -3
- data/lib/rubygems/vendor/uri/lib/uri/rfc3986_parser.rb +26 -3
- data/lib/rubygems/vendor/uri/lib/uri/version.rb +1 -1
- data/lib/rubygems/vendor/uri/lib/uri.rb +9 -9
- data/lib/rubygems/vendored_securerandom.rb +0 -1
- data/lib/rubygems/version.rb +0 -4
- data/lib/rubygems.rb +30 -21
- data/rubygems-update.gemspec +5 -5
- data/setup.rb +1 -1
- metadata +36 -27
- data/bundler/lib/bundler/vendor/fileutils/LICENSE.txt +0 -22
- data/bundler/lib/bundler/vendor/securerandom/LICENSE.txt +0 -22
- data/bundler/lib/bundler/vendor/securerandom/lib/random/formatter.rb +0 -373
- data/bundler/lib/bundler/vendor/uri/LICENSE.txt +0 -22
- data/lib/rubygems/vendor/net-http/LICENSE.txt +0 -22
- data/lib/rubygems/vendor/net-http/lib/net/http/backward.rb +0 -40
- data/lib/rubygems/vendor/resolv/LICENSE.txt +0 -22
- data/lib/rubygems/vendor/securerandom/LICENSE.txt +0 -22
- data/lib/rubygems/vendor/securerandom/lib/random/formatter.rb +0 -373
- data/lib/rubygems/vendor/timeout/LICENSE.txt +0 -22
- data/lib/rubygems/vendor/uri/LICENSE.txt +0 -22
- /data/{MAINTAINERS.txt → doc/MAINTAINERS.txt} +0 -0
- /data/{bundler → doc/bundler}/UPGRADING.md +0 -0
- /data/{UPGRADING.md → doc/rubygems/UPGRADING.md} +0 -0
@@ -82,7 +82,7 @@ module Gem::URI
|
|
82
82
|
if args.kind_of?(Array)
|
83
83
|
return self.build(args.collect{|x|
|
84
84
|
if x.is_a?(String)
|
85
|
-
|
85
|
+
Gem::URI::RFC2396_PARSER.escape(x)
|
86
86
|
else
|
87
87
|
x
|
88
88
|
end
|
@@ -91,7 +91,7 @@ module Gem::URI
|
|
91
91
|
tmp = {}
|
92
92
|
args.each do |key, value|
|
93
93
|
tmp[key] = if value
|
94
|
-
|
94
|
+
Gem::URI::RFC2396_PARSER.escape(value)
|
95
95
|
else
|
96
96
|
value
|
97
97
|
end
|
@@ -393,7 +393,7 @@ module Gem::URI
|
|
393
393
|
def check_user(v)
|
394
394
|
if @opaque
|
395
395
|
raise InvalidURIError,
|
396
|
-
"
|
396
|
+
"cannot set user with opaque"
|
397
397
|
end
|
398
398
|
|
399
399
|
return v unless v
|
@@ -417,7 +417,7 @@ module Gem::URI
|
|
417
417
|
def check_password(v, user = @user)
|
418
418
|
if @opaque
|
419
419
|
raise InvalidURIError,
|
420
|
-
"
|
420
|
+
"cannot set password with opaque"
|
421
421
|
end
|
422
422
|
return v unless v
|
423
423
|
|
@@ -596,7 +596,7 @@ module Gem::URI
|
|
596
596
|
|
597
597
|
if @opaque
|
598
598
|
raise InvalidURIError,
|
599
|
-
"
|
599
|
+
"cannot set host with registry or opaque"
|
600
600
|
elsif parser.regexp[:HOST] !~ v
|
601
601
|
raise InvalidComponentError,
|
602
602
|
"bad component(expected host component): #{v}"
|
@@ -685,7 +685,7 @@ module Gem::URI
|
|
685
685
|
|
686
686
|
if @opaque
|
687
687
|
raise InvalidURIError,
|
688
|
-
"
|
688
|
+
"cannot set port with registry or opaque"
|
689
689
|
elsif !v.kind_of?(Integer) && parser.regexp[:PORT] !~ v
|
690
690
|
raise InvalidComponentError,
|
691
691
|
"bad component(expected port component): #{v.inspect}"
|
@@ -733,17 +733,17 @@ module Gem::URI
|
|
733
733
|
end
|
734
734
|
|
735
735
|
def check_registry(v) # :nodoc:
|
736
|
-
raise InvalidURIError, "
|
736
|
+
raise InvalidURIError, "cannot set registry"
|
737
737
|
end
|
738
738
|
private :check_registry
|
739
739
|
|
740
740
|
def set_registry(v) #:nodoc:
|
741
|
-
raise InvalidURIError, "
|
741
|
+
raise InvalidURIError, "cannot set registry"
|
742
742
|
end
|
743
743
|
protected :set_registry
|
744
744
|
|
745
745
|
def registry=(v)
|
746
|
-
raise InvalidURIError, "
|
746
|
+
raise InvalidURIError, "cannot set registry"
|
747
747
|
end
|
748
748
|
|
749
749
|
#
|
@@ -866,7 +866,7 @@ module Gem::URI
|
|
866
866
|
# hier_part = ( net_path | abs_path ) [ "?" query ]
|
867
867
|
if @host || @port || @user || @path # userinfo = @user + ':' + @password
|
868
868
|
raise InvalidURIError,
|
869
|
-
"
|
869
|
+
"cannot set opaque with host, port, userinfo or path"
|
870
870
|
elsif v && parser.regexp[:OPAQUE] !~ v
|
871
871
|
raise InvalidComponentError,
|
872
872
|
"bad component(expected opaque component): #{v}"
|
@@ -945,7 +945,7 @@ module Gem::URI
|
|
945
945
|
# == Description
|
946
946
|
#
|
947
947
|
# Gem::URI has components listed in order of decreasing significance from left to right,
|
948
|
-
# see RFC3986 https://
|
948
|
+
# see RFC3986 https://www.rfc-editor.org/rfc/rfc3986 1.2.3.
|
949
949
|
#
|
950
950
|
# == Usage
|
951
951
|
#
|
@@ -1235,7 +1235,7 @@ module Gem::URI
|
|
1235
1235
|
return rel, rel
|
1236
1236
|
end
|
1237
1237
|
|
1238
|
-
# you can modify `rel', but
|
1238
|
+
# you can modify `rel', but cannot `oth'.
|
1239
1239
|
return oth, rel
|
1240
1240
|
end
|
1241
1241
|
private :route_from0
|
@@ -1260,7 +1260,7 @@ module Gem::URI
|
|
1260
1260
|
# #=> #<Gem::URI::Generic /main.rbx?page=1>
|
1261
1261
|
#
|
1262
1262
|
def route_from(oth)
|
1263
|
-
# you can modify `rel', but
|
1263
|
+
# you can modify `rel', but cannot `oth'.
|
1264
1264
|
begin
|
1265
1265
|
oth, rel = route_from0(oth)
|
1266
1266
|
rescue
|
@@ -1364,6 +1364,9 @@ module Gem::URI
|
|
1364
1364
|
str << ':'
|
1365
1365
|
str << @port.to_s
|
1366
1366
|
end
|
1367
|
+
if (@host || @port) && !@path.empty? && !@path.start_with?('/')
|
1368
|
+
str << '/'
|
1369
|
+
end
|
1367
1370
|
str << @path
|
1368
1371
|
if @query
|
1369
1372
|
str << '?'
|
@@ -1399,19 +1402,6 @@ module Gem::URI
|
|
1399
1402
|
self.component_ary.eql?(oth.component_ary)
|
1400
1403
|
end
|
1401
1404
|
|
1402
|
-
=begin
|
1403
|
-
|
1404
|
-
--- Gem::URI::Generic#===(oth)
|
1405
|
-
|
1406
|
-
=end
|
1407
|
-
# def ===(oth)
|
1408
|
-
# raise NotImplementedError
|
1409
|
-
# end
|
1410
|
-
|
1411
|
-
=begin
|
1412
|
-
=end
|
1413
|
-
|
1414
|
-
|
1415
1405
|
# Returns an Array of the components defined from the COMPONENT Array.
|
1416
1406
|
def component_ary
|
1417
1407
|
component.collect do |x|
|
@@ -85,7 +85,7 @@ module Gem::URI
|
|
85
85
|
# == Description
|
86
86
|
#
|
87
87
|
# Returns the authority for an HTTP uri, as defined in
|
88
|
-
# https://
|
88
|
+
# https://www.rfc-editor.org/rfc/rfc3986#section-3.2.
|
89
89
|
#
|
90
90
|
#
|
91
91
|
# Example:
|
@@ -106,7 +106,7 @@ module Gem::URI
|
|
106
106
|
# == Description
|
107
107
|
#
|
108
108
|
# Returns the origin for an HTTP uri, as defined in
|
109
|
-
# https://
|
109
|
+
# https://www.rfc-editor.org/rfc/rfc6454.
|
110
110
|
#
|
111
111
|
#
|
112
112
|
# Example:
|
@@ -140,11 +140,11 @@ module Gem::URI
|
|
140
140
|
|
141
141
|
if !scheme
|
142
142
|
raise InvalidURIError,
|
143
|
-
"bad Gem::URI(absolute but no scheme): #{uri}"
|
143
|
+
"bad Gem::URI (absolute but no scheme): #{uri}"
|
144
144
|
end
|
145
145
|
if !opaque && (!path && (!host && !registry))
|
146
146
|
raise InvalidURIError,
|
147
|
-
"bad Gem::URI(absolute but no path): #{uri}"
|
147
|
+
"bad Gem::URI (absolute but no path): #{uri}"
|
148
148
|
end
|
149
149
|
|
150
150
|
when @regexp[:REL_URI]
|
@@ -173,7 +173,7 @@ module Gem::URI
|
|
173
173
|
# server = [ [ userinfo "@" ] hostport ]
|
174
174
|
|
175
175
|
else
|
176
|
-
raise InvalidURIError, "bad Gem::URI(is not Gem::URI?): #{uri}"
|
176
|
+
raise InvalidURIError, "bad Gem::URI (is not Gem::URI?): #{uri}"
|
177
177
|
end
|
178
178
|
|
179
179
|
path = '' if !path && !opaque # (see RFC2396 Section 5.2)
|
@@ -536,4 +536,11 @@ module Gem::URI
|
|
536
536
|
end
|
537
537
|
|
538
538
|
end # class Parser
|
539
|
+
|
540
|
+
# Backward compatibility for Gem::URI::REGEXP::PATTERN::*
|
541
|
+
RFC2396_Parser.new.pattern.each_pair do |sym, str|
|
542
|
+
unless RFC2396_REGEXP::PATTERN.const_defined?(sym, false)
|
543
|
+
RFC2396_REGEXP::PATTERN.const_set(sym, str)
|
544
|
+
end
|
545
|
+
end
|
539
546
|
end # module Gem::URI
|
@@ -78,7 +78,7 @@ module Gem::URI
|
|
78
78
|
begin
|
79
79
|
uri = uri.to_str
|
80
80
|
rescue NoMethodError
|
81
|
-
raise InvalidURIError, "bad Gem::URI(is not Gem::URI?): #{uri.inspect}"
|
81
|
+
raise InvalidURIError, "bad Gem::URI (is not Gem::URI?): #{uri.inspect}"
|
82
82
|
end
|
83
83
|
uri.ascii_only? or
|
84
84
|
raise InvalidURIError, "Gem::URI must be ascii only #{uri.dump}"
|
@@ -127,7 +127,7 @@ module Gem::URI
|
|
127
127
|
m["fragment"]
|
128
128
|
]
|
129
129
|
else
|
130
|
-
raise InvalidURIError, "bad Gem::URI(is not Gem::URI?): #{uri.inspect}"
|
130
|
+
raise InvalidURIError, "bad Gem::URI (is not Gem::URI?): #{uri.inspect}"
|
131
131
|
end
|
132
132
|
end
|
133
133
|
|
@@ -135,12 +135,35 @@ module Gem::URI
|
|
135
135
|
Gem::URI.for(*self.split(uri), self)
|
136
136
|
end
|
137
137
|
|
138
|
-
|
139
138
|
def join(*uris) # :nodoc:
|
140
139
|
uris[0] = convert_to_uri(uris[0])
|
141
140
|
uris.inject :merge
|
142
141
|
end
|
143
142
|
|
143
|
+
# Compatibility for RFC2396 parser
|
144
|
+
def extract(str, schemes = nil, &block) # :nodoc:
|
145
|
+
warn "Gem::URI::RFC3986_PARSER.extract is obsolete. Use Gem::URI::RFC2396_PARSER.extract explicitly.", uplevel: 1 if $VERBOSE
|
146
|
+
RFC2396_PARSER.extract(str, schemes, &block)
|
147
|
+
end
|
148
|
+
|
149
|
+
# Compatibility for RFC2396 parser
|
150
|
+
def make_regexp(schemes = nil) # :nodoc:
|
151
|
+
warn "Gem::URI::RFC3986_PARSER.make_regexp is obsolete. Use Gem::URI::RFC2396_PARSER.make_regexp explicitly.", uplevel: 1 if $VERBOSE
|
152
|
+
RFC2396_PARSER.make_regexp(schemes)
|
153
|
+
end
|
154
|
+
|
155
|
+
# Compatibility for RFC2396 parser
|
156
|
+
def escape(str, unsafe = nil) # :nodoc:
|
157
|
+
warn "Gem::URI::RFC3986_PARSER.escape is obsolete. Use Gem::URI::RFC2396_PARSER.escape explicitly.", uplevel: 1 if $VERBOSE
|
158
|
+
unsafe ? RFC2396_PARSER.escape(str, unsafe) : RFC2396_PARSER.escape(str)
|
159
|
+
end
|
160
|
+
|
161
|
+
# Compatibility for RFC2396 parser
|
162
|
+
def unescape(str, escaped = nil) # :nodoc:
|
163
|
+
warn "Gem::URI::RFC3986_PARSER.unescape is obsolete. Use Gem::URI::RFC2396_PARSER.unescape explicitly.", uplevel: 1 if $VERBOSE
|
164
|
+
escaped ? RFC2396_PARSER.unescape(str, escaped) : RFC2396_PARSER.unescape(str)
|
165
|
+
end
|
166
|
+
|
144
167
|
@@to_s = Kernel.instance_method(:to_s)
|
145
168
|
if @@to_s.respond_to?(:bind_call)
|
146
169
|
def inspect
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: false
|
2
2
|
# Gem::URI is a module providing classes to handle Uniform Resource Identifiers
|
3
|
-
# (RFC2396[
|
3
|
+
# (RFC2396[https://www.rfc-editor.org/rfc/rfc2396]).
|
4
4
|
#
|
5
5
|
# == Features
|
6
6
|
#
|
@@ -47,14 +47,14 @@
|
|
47
47
|
# A good place to view an RFC spec is http://www.ietf.org/rfc.html.
|
48
48
|
#
|
49
49
|
# Here is a list of all related RFC's:
|
50
|
-
# - RFC822[
|
51
|
-
# - RFC1738[
|
52
|
-
# - RFC2255[
|
53
|
-
# - RFC2368[
|
54
|
-
# - RFC2373[
|
55
|
-
# - RFC2396[
|
56
|
-
# - RFC2732[
|
57
|
-
# - RFC3986[
|
50
|
+
# - RFC822[https://www.rfc-editor.org/rfc/rfc822]
|
51
|
+
# - RFC1738[https://www.rfc-editor.org/rfc/rfc1738]
|
52
|
+
# - RFC2255[https://www.rfc-editor.org/rfc/rfc2255]
|
53
|
+
# - RFC2368[https://www.rfc-editor.org/rfc/rfc2368]
|
54
|
+
# - RFC2373[https://www.rfc-editor.org/rfc/rfc2373]
|
55
|
+
# - RFC2396[https://www.rfc-editor.org/rfc/rfc2396]
|
56
|
+
# - RFC2732[https://www.rfc-editor.org/rfc/rfc2732]
|
57
|
+
# - RFC3986[https://www.rfc-editor.org/rfc/rfc3986]
|
58
58
|
#
|
59
59
|
# == Class tree
|
60
60
|
#
|
data/lib/rubygems/version.rb
CHANGED
data/lib/rubygems.rb
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
require "rbconfig"
|
10
10
|
|
11
11
|
module Gem
|
12
|
-
VERSION = "3.
|
12
|
+
VERSION = "3.6.1"
|
13
13
|
end
|
14
14
|
|
15
15
|
# Must be first since it unloads the prelude from 1.9.2
|
@@ -18,6 +18,7 @@ require_relative "rubygems/compatibility"
|
|
18
18
|
require_relative "rubygems/defaults"
|
19
19
|
require_relative "rubygems/deprecate"
|
20
20
|
require_relative "rubygems/errors"
|
21
|
+
require_relative "rubygems/target_rbconfig"
|
21
22
|
|
22
23
|
##
|
23
24
|
# RubyGems is the Ruby standard for publishing and managing third party
|
@@ -106,7 +107,7 @@ require_relative "rubygems/errors"
|
|
106
107
|
#
|
107
108
|
# == License
|
108
109
|
#
|
109
|
-
# See {LICENSE.txt}[
|
110
|
+
# See {LICENSE.txt}[https://github.com/rubygems/rubygems/blob/master/LICENSE.txt] for permissions.
|
110
111
|
#
|
111
112
|
# Thanks!
|
112
113
|
#
|
@@ -179,6 +180,8 @@ module Gem
|
|
179
180
|
|
180
181
|
@discover_gems_on_require = true
|
181
182
|
|
183
|
+
@target_rbconfig = nil
|
184
|
+
|
182
185
|
##
|
183
186
|
# Try to activate a gem containing +path+. Returns true if
|
184
187
|
# activation succeeded or wasn't needed because it was already
|
@@ -396,6 +399,23 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
396
399
|
paths.spec_cache_dir
|
397
400
|
end
|
398
401
|
|
402
|
+
##
|
403
|
+
# The RbConfig object for the deployment target platform.
|
404
|
+
#
|
405
|
+
# This is usually the same as the running platform, but may be
|
406
|
+
# different if you are cross-compiling.
|
407
|
+
|
408
|
+
def self.target_rbconfig
|
409
|
+
@target_rbconfig || Gem::TargetRbConfig.for_running_ruby
|
410
|
+
end
|
411
|
+
|
412
|
+
def self.set_target_rbconfig(rbconfig_path)
|
413
|
+
@target_rbconfig = Gem::TargetRbConfig.from_path(rbconfig_path)
|
414
|
+
Gem::Platform.local(refresh: true)
|
415
|
+
Gem.platforms << Gem::Platform.local unless Gem.platforms.include? Gem::Platform.local
|
416
|
+
@target_rbconfig
|
417
|
+
end
|
418
|
+
|
399
419
|
##
|
400
420
|
# Quietly ensure the Gem directory +dir+ contains all the proper
|
401
421
|
# subdirectories. If we can't create a directory due to a permission
|
@@ -450,7 +470,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
450
470
|
# distinction as extensions cannot be shared between the two.
|
451
471
|
|
452
472
|
def self.extension_api_version # :nodoc:
|
453
|
-
if
|
473
|
+
if target_rbconfig["ENABLE_SHARED"] == "no"
|
454
474
|
"#{ruby_api_version}-static"
|
455
475
|
else
|
456
476
|
ruby_api_version
|
@@ -476,9 +496,9 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
476
496
|
|
477
497
|
gem_specifications = @gemdeps ? Gem.loaded_specs.values : Gem::Specification.stubs
|
478
498
|
|
479
|
-
files.concat gem_specifications.
|
499
|
+
files.concat gem_specifications.flat_map {|spec|
|
480
500
|
spec.matches_for_glob("#{glob}#{Gem.suffix_pattern}")
|
481
|
-
}
|
501
|
+
}
|
482
502
|
|
483
503
|
# $LOAD_PATH might contain duplicate entries or reference
|
484
504
|
# the spec dirs directly, so we prune.
|
@@ -489,9 +509,9 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
489
509
|
|
490
510
|
def self.find_files_from_load_path(glob) # :nodoc:
|
491
511
|
glob_with_suffixes = "#{glob}#{Gem.suffix_pattern}"
|
492
|
-
$LOAD_PATH.
|
512
|
+
$LOAD_PATH.flat_map do |load_path|
|
493
513
|
Gem::Util.glob_files_in_dir(glob_with_suffixes, load_path)
|
494
|
-
end.
|
514
|
+
end.select {|file| File.file? file }
|
495
515
|
end
|
496
516
|
|
497
517
|
##
|
@@ -511,9 +531,9 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
511
531
|
|
512
532
|
files = find_files_from_load_path glob if check_load_path
|
513
533
|
|
514
|
-
files.concat Gem::Specification.latest_specs(true).
|
534
|
+
files.concat Gem::Specification.latest_specs(true).flat_map {|spec|
|
515
535
|
spec.matches_for_glob("#{glob}#{Gem.suffix_pattern}")
|
516
|
-
}
|
536
|
+
}
|
517
537
|
|
518
538
|
# $LOAD_PATH might contain duplicate entries or reference
|
519
539
|
# the spec dirs directly, so we prune.
|
@@ -819,7 +839,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
819
839
|
# Returns a String containing the API compatibility version of Ruby
|
820
840
|
|
821
841
|
def self.ruby_api_version
|
822
|
-
@ruby_api_version ||=
|
842
|
+
@ruby_api_version ||= target_rbconfig["ruby_version"].dup
|
823
843
|
end
|
824
844
|
|
825
845
|
def self.env_requirement(gem_name)
|
@@ -1367,17 +1387,6 @@ begin
|
|
1367
1387
|
rescue LoadError
|
1368
1388
|
end
|
1369
1389
|
|
1370
|
-
# TruffleRuby >= 24 defines REUSE_AS_BINARY_ON_TRUFFLERUBY in defaults/truffleruby.
|
1371
|
-
# However, TruffleRuby < 24 defines REUSE_AS_BINARY_ON_TRUFFLERUBY directly in its copy
|
1372
|
-
# of lib/rubygems/platform.rb, so it is not defined if RubyGems is updated (gem update --system).
|
1373
|
-
# Instead, we define it here in that case, similar to bundler/lib/bundler/rubygems_ext.rb.
|
1374
|
-
# We must define it here and not in platform.rb because platform.rb is loaded before defaults/truffleruby.
|
1375
|
-
class Gem::Platform
|
1376
|
-
if RUBY_ENGINE == "truffleruby" && !defined?(REUSE_AS_BINARY_ON_TRUFFLERUBY)
|
1377
|
-
REUSE_AS_BINARY_ON_TRUFFLERUBY = %w[libv8 libv8-node sorbet-static].freeze
|
1378
|
-
end
|
1379
|
-
end
|
1380
|
-
|
1381
1390
|
##
|
1382
1391
|
# Loads the default specs.
|
1383
1392
|
Gem::Specification.load_defaults
|
data/rubygems-update.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "rubygems-update"
|
5
|
-
s.version = "3.
|
5
|
+
s.version = "3.6.1"
|
6
6
|
s.authors = ["Jim Weirich", "Chad Fowler", "Eric Hodel", "Luis Lavena", "Aaron Patterson", "Samuel Giddins", "André Arko", "Evan Phoenix", "Hiroshi SHIBATA"]
|
7
7
|
s.email = ["", "", "drbrain@segment7.net", "luislavena@gmail.com", "aaron@tenderlovemaking.com", "segiddins@segiddins.me", "andre@arko.net", "evan@phx.io", "hsbt@ruby-lang.org"]
|
8
8
|
|
@@ -28,15 +28,15 @@ Gem::Specification.new do |s|
|
|
28
28
|
s.require_paths = ["hide_lib_for_update"]
|
29
29
|
s.rdoc_options = ["--main", "README.md", "--title=RubyGems Update Documentation"]
|
30
30
|
s.extra_rdoc_files = [
|
31
|
-
"LICENSE.txt", "MAINTAINERS.txt",
|
31
|
+
"LICENSE.txt", "doc/MAINTAINERS.txt",
|
32
32
|
"MIT.txt", "Manifest.txt", "README.md",
|
33
|
-
"UPGRADING.md", "POLICIES.md", "CODE_OF_CONDUCT.md",
|
34
|
-
"CONTRIBUTING.md",
|
33
|
+
"doc/rubygems/UPGRADING.md", "doc/rubygems/POLICIES.md", "CODE_OF_CONDUCT.md",
|
34
|
+
"doc/rubygems/CONTRIBUTING.md",
|
35
35
|
"bundler/LICENSE.md", "bundler/README.md",
|
36
36
|
"hide_lib_for_update/note.txt", *Dir["bundler/lib/bundler/man/*.1", base: __dir__]
|
37
37
|
]
|
38
38
|
|
39
|
-
s.required_ruby_version = Gem::Requirement.new(">= 3.
|
39
|
+
s.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
|
40
40
|
s.required_rubygems_version = Gem::Requirement.new(">= 0")
|
41
41
|
|
42
42
|
s.specification_version = 4
|
data/setup.rb
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
# See LICENSE.txt for permissions.
|
8
8
|
#++
|
9
9
|
|
10
|
-
abort "RubyGems only supports Ruby 3.
|
10
|
+
abort "RubyGems only supports Ruby 3.1 or higher" if RUBY_VERSION < "3.1.0"
|
11
11
|
|
12
12
|
# Make sure rubygems isn't already loaded.
|
13
13
|
if ENV["RUBYOPT"] || defined? Gem
|