rubygems-update 3.2.24 → 3.2.28
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +57 -0
- data/Manifest.txt +7 -7
- data/bundler/CHANGELOG.md +62 -0
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli/cache.rb +1 -1
- data/bundler/lib/bundler/cli/doctor.rb +1 -1
- data/bundler/lib/bundler/cli/exec.rb +1 -6
- data/bundler/lib/bundler/cli/gem.rb +3 -2
- data/bundler/lib/bundler/cli/install.rb +4 -17
- data/bundler/lib/bundler/cli/list.rb +7 -1
- data/bundler/lib/bundler/cli/open.rb +1 -2
- data/bundler/lib/bundler/cli/remove.rb +1 -2
- data/bundler/lib/bundler/cli/update.rb +1 -1
- data/bundler/lib/bundler/cli.rb +12 -9
- data/bundler/lib/bundler/definition.rb +25 -29
- data/bundler/lib/bundler/dsl.rb +14 -1
- data/bundler/lib/bundler/errors.rb +1 -1
- data/bundler/lib/bundler/installer/gem_installer.rb +3 -16
- data/bundler/lib/bundler/installer/standalone.rb +13 -8
- data/bundler/lib/bundler/installer.rb +0 -1
- data/bundler/lib/bundler/lockfile_parser.rb +1 -0
- data/bundler/lib/bundler/plugin/installer.rb +2 -0
- data/bundler/lib/bundler/plugin.rb +23 -6
- data/bundler/lib/bundler/resolver.rb +10 -17
- data/bundler/lib/bundler/rubygems_gem_installer.rb +5 -1
- data/bundler/lib/bundler/rubygems_integration.rb +2 -0
- data/bundler/lib/bundler/runtime.rb +15 -6
- data/bundler/lib/bundler/settings.rb +13 -1
- data/bundler/lib/bundler/setup.rb +2 -2
- data/bundler/lib/bundler/shared_helpers.rb +0 -7
- data/bundler/lib/bundler/source/git/git_proxy.rb +1 -2
- data/bundler/lib/bundler/source/rubygems.rb +23 -2
- data/bundler/lib/bundler/source/rubygems_aggregate.rb +4 -0
- data/bundler/lib/bundler/source.rb +4 -0
- data/bundler/lib/bundler/source_list.rb +16 -3
- data/bundler/lib/bundler/spec_set.rb +13 -35
- data/bundler/lib/bundler/templates/Executable.bundler +6 -6
- data/bundler/lib/bundler/templates/newgem/github/workflows/main.yml.tt +13 -2
- data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +4 -2
- data/bundler/lib/bundler/version.rb +1 -1
- data/bundler/lib/bundler/worker.rb +17 -2
- data/bundler/lib/bundler.rb +11 -21
- data/lib/rubygems/command_manager.rb +3 -3
- data/lib/rubygems/commands/build_command.rb +3 -3
- data/lib/rubygems/commands/cert_command.rb +2 -2
- data/lib/rubygems/commands/check_command.rb +4 -4
- data/lib/rubygems/commands/cleanup_command.rb +3 -3
- data/lib/rubygems/commands/contents_command.rb +2 -2
- data/lib/rubygems/commands/dependency_command.rb +3 -3
- data/lib/rubygems/commands/environment_command.rb +1 -1
- data/lib/rubygems/commands/fetch_command.rb +3 -3
- data/lib/rubygems/commands/generate_index_command.rb +2 -2
- data/lib/rubygems/commands/help_command.rb +1 -1
- data/lib/rubygems/commands/info_command.rb +2 -2
- data/lib/rubygems/commands/install_command.rb +12 -11
- data/lib/rubygems/commands/list_command.rb +2 -2
- data/lib/rubygems/commands/lock_command.rb +1 -1
- data/lib/rubygems/commands/mirror_command.rb +1 -1
- data/lib/rubygems/commands/open_command.rb +2 -2
- data/lib/rubygems/commands/outdated_command.rb +4 -4
- data/lib/rubygems/commands/owner_command.rb +4 -4
- data/lib/rubygems/commands/pristine_command.rb +5 -5
- data/lib/rubygems/commands/push_command.rb +4 -4
- data/lib/rubygems/commands/query_command.rb +3 -3
- data/lib/rubygems/commands/rdoc_command.rb +3 -3
- data/lib/rubygems/commands/search_command.rb +2 -2
- data/lib/rubygems/commands/server_command.rb +3 -3
- data/lib/rubygems/commands/setup_command.rb +5 -5
- data/lib/rubygems/commands/signin_command.rb +2 -2
- data/lib/rubygems/commands/signout_command.rb +1 -1
- data/lib/rubygems/commands/sources_command.rb +4 -4
- data/lib/rubygems/commands/specification_command.rb +4 -4
- data/lib/rubygems/commands/stale_command.rb +1 -1
- data/lib/rubygems/commands/uninstall_command.rb +3 -3
- data/lib/rubygems/commands/unpack_command.rb +5 -5
- data/lib/rubygems/commands/update_command.rb +9 -9
- data/lib/rubygems/commands/which_command.rb +1 -1
- data/lib/rubygems/commands/yank_command.rb +4 -4
- data/lib/rubygems/config_file.rb +5 -5
- data/lib/rubygems/dependency_installer.rb +8 -8
- data/lib/rubygems/dependency_list.rb +1 -1
- data/lib/rubygems/doctor.rb +2 -2
- data/lib/rubygems/exceptions.rb +1 -1
- data/lib/rubygems/ext/builder.rb +1 -0
- data/lib/rubygems/ext/ext_conf_builder.rb +1 -2
- data/lib/rubygems/ext/rake_builder.rb +1 -2
- data/lib/rubygems/gem_runner.rb +3 -3
- data/lib/rubygems/gemcutter_utilities.rb +2 -2
- data/lib/rubygems/indexer.rb +2 -2
- data/lib/rubygems/install_default_message.rb +2 -2
- data/lib/rubygems/install_message.rb +2 -2
- data/lib/rubygems/install_update_options.rb +2 -2
- data/lib/rubygems/installer.rb +17 -8
- data/lib/rubygems/local_remote_options.rb +1 -1
- data/lib/rubygems/mock_gem_ui.rb +1 -1
- data/lib/rubygems/package/tar_reader.rb +1 -1
- data/lib/rubygems/package.rb +12 -12
- data/lib/rubygems/package_task.rb +2 -2
- data/lib/rubygems/platform.rb +2 -1
- data/lib/rubygems/rdoc.rb +1 -1
- data/lib/rubygems/remote_fetcher.rb +14 -21
- data/lib/rubygems/request.rb +5 -5
- data/lib/rubygems/request_set/lockfile/tokenizer.rb +1 -1
- data/lib/rubygems/request_set/lockfile.rb +1 -1
- data/lib/rubygems/request_set.rb +4 -4
- data/lib/rubygems/requirement.rb +3 -22
- data/lib/rubygems/resolver/git_specification.rb +1 -1
- data/lib/rubygems/resolver/installer_set.rb +3 -3
- data/lib/rubygems/resolver/molinillo.rb +1 -1
- data/lib/rubygems/resolver/set.rb +0 -1
- data/lib/rubygems/resolver/specification.rb +1 -1
- data/lib/rubygems/resolver.rb +31 -31
- data/lib/rubygems/s3_uri_signer.rb +0 -1
- data/lib/rubygems/safe_yaml.rb +0 -2
- data/lib/rubygems/security/policy.rb +1 -1
- data/lib/rubygems/security/signer.rb +1 -1
- data/lib/rubygems/security.rb +5 -5
- data/lib/rubygems/security_option.rb +2 -2
- data/lib/rubygems/server.rb +2 -2
- data/lib/rubygems/source.rb +6 -6
- data/lib/rubygems/spec_fetcher.rb +5 -5
- data/lib/rubygems/specification.rb +9 -15
- data/lib/rubygems/specification_policy.rb +2 -2
- data/lib/rubygems/uninstaller.rb +6 -6
- data/lib/rubygems/uri.rb +111 -0
- data/lib/rubygems/user_interaction.rb +2 -2
- data/lib/rubygems/util/licenses.rb +1 -1
- data/lib/rubygems/validator.rb +2 -2
- data/lib/rubygems/version_option.rb +1 -1
- data/lib/rubygems.rb +37 -47
- data/rubygems-update.gemspec +1 -1
- data/test/rubygems/data/null-type.gemspec.rz +0 -0
- data/{lib/rubygems/test_case.rb → test/rubygems/helper.rb} +16 -19
- data/{lib → test}/rubygems/installer_test_case.rb +1 -1
- data/{lib → test}/rubygems/package/tar_test_case.rb +1 -1
- data/test/rubygems/test_bundled_ca.rb +1 -1
- data/test/rubygems/test_config.rb +1 -1
- data/test/rubygems/test_deprecate.rb +1 -1
- data/test/rubygems/test_gem.rb +190 -136
- data/test/rubygems/test_gem_available_set.rb +1 -1
- data/test/rubygems/test_gem_bundler_version_finder.rb +1 -1
- data/test/rubygems/test_gem_command.rb +1 -1
- data/test/rubygems/test_gem_command_manager.rb +1 -1
- data/test/rubygems/test_gem_commands_build_command.rb +1 -1
- data/test/rubygems/test_gem_commands_cert_command.rb +1 -1
- data/test/rubygems/test_gem_commands_check_command.rb +1 -1
- data/test/rubygems/test_gem_commands_cleanup_command.rb +1 -1
- data/test/rubygems/test_gem_commands_contents_command.rb +1 -1
- data/test/rubygems/test_gem_commands_dependency_command.rb +1 -1
- data/test/rubygems/test_gem_commands_environment_command.rb +1 -1
- data/test/rubygems/test_gem_commands_fetch_command.rb +1 -1
- data/test/rubygems/test_gem_commands_generate_index_command.rb +1 -1
- data/test/rubygems/test_gem_commands_help_command.rb +1 -1
- data/test/rubygems/test_gem_commands_info_command.rb +1 -1
- data/test/rubygems/test_gem_commands_install_command.rb +26 -1
- data/test/rubygems/test_gem_commands_list_command.rb +1 -1
- data/test/rubygems/test_gem_commands_lock_command.rb +1 -1
- data/test/rubygems/test_gem_commands_mirror.rb +1 -1
- data/test/rubygems/test_gem_commands_open_command.rb +1 -1
- data/test/rubygems/test_gem_commands_outdated_command.rb +1 -1
- data/test/rubygems/test_gem_commands_owner_command.rb +1 -1
- data/test/rubygems/test_gem_commands_pristine_command.rb +1 -1
- data/test/rubygems/test_gem_commands_push_command.rb +1 -1
- data/test/rubygems/test_gem_commands_query_command.rb +1 -1
- data/test/rubygems/test_gem_commands_search_command.rb +1 -1
- data/test/rubygems/test_gem_commands_server_command.rb +1 -1
- data/test/rubygems/test_gem_commands_setup_command.rb +3 -3
- data/test/rubygems/test_gem_commands_signin_command.rb +1 -1
- data/test/rubygems/test_gem_commands_signout_command.rb +1 -1
- data/test/rubygems/test_gem_commands_sources_command.rb +1 -1
- data/test/rubygems/test_gem_commands_specification_command.rb +1 -1
- data/test/rubygems/test_gem_commands_stale_command.rb +1 -1
- data/test/rubygems/test_gem_commands_uninstall_command.rb +1 -1
- data/test/rubygems/test_gem_commands_unpack_command.rb +1 -1
- data/test/rubygems/test_gem_commands_update_command.rb +1 -1
- data/test/rubygems/test_gem_commands_which_command.rb +1 -1
- data/test/rubygems/test_gem_commands_yank_command.rb +1 -1
- data/test/rubygems/test_gem_config_file.rb +1 -1
- data/test/rubygems/test_gem_dependency.rb +1 -1
- data/test/rubygems/test_gem_dependency_installer.rb +1 -1
- data/test/rubygems/test_gem_dependency_list.rb +1 -1
- data/test/rubygems/test_gem_dependency_resolution_error.rb +1 -1
- data/test/rubygems/test_gem_doctor.rb +1 -1
- data/test/rubygems/test_gem_ext_builder.rb +4 -1
- data/test/rubygems/test_gem_ext_cmake_builder.rb +1 -1
- data/test/rubygems/test_gem_ext_configure_builder.rb +1 -1
- data/test/rubygems/test_gem_ext_ext_conf_builder.rb +1 -1
- data/test/rubygems/test_gem_ext_rake_builder.rb +1 -1
- data/test/rubygems/test_gem_gem_runner.rb +1 -1
- data/test/rubygems/test_gem_gemcutter_utilities.rb +1 -1
- data/test/rubygems/test_gem_impossible_dependencies_error.rb +1 -1
- data/test/rubygems/test_gem_indexer.rb +1 -1
- data/test/rubygems/test_gem_install_update_options.rb +1 -1
- data/test/rubygems/test_gem_installer.rb +4 -2
- data/test/rubygems/test_gem_local_remote_options.rb +1 -1
- data/test/rubygems/test_gem_name_tuple.rb +1 -1
- data/test/rubygems/test_gem_package.rb +1 -1
- data/test/rubygems/test_gem_package_old.rb +1 -1
- data/test/rubygems/test_gem_package_tar_header.rb +1 -1
- data/test/rubygems/test_gem_package_tar_reader.rb +1 -1
- data/test/rubygems/test_gem_package_tar_reader_entry.rb +1 -1
- data/test/rubygems/test_gem_package_tar_writer.rb +1 -1
- data/test/rubygems/test_gem_package_task.rb +1 -1
- data/test/rubygems/test_gem_path_support.rb +1 -1
- data/test/rubygems/test_gem_platform.rb +2 -1
- data/test/rubygems/test_gem_rdoc.rb +1 -1
- data/test/rubygems/test_gem_remote_fetcher.rb +31 -1
- data/test/rubygems/test_gem_request.rb +36 -10
- data/test/rubygems/test_gem_request_connection_pools.rb +1 -1
- data/test/rubygems/test_gem_request_set.rb +1 -1
- data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +1 -1
- data/test/rubygems/test_gem_request_set_lockfile.rb +1 -1
- data/test/rubygems/test_gem_request_set_lockfile_parser.rb +1 -1
- data/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb +1 -1
- data/test/rubygems/test_gem_requirement.rb +35 -1
- data/test/rubygems/test_gem_resolver.rb +1 -1
- data/test/rubygems/test_gem_resolver_activation_request.rb +1 -1
- data/test/rubygems/test_gem_resolver_api_set.rb +1 -1
- data/test/rubygems/test_gem_resolver_api_specification.rb +1 -1
- data/test/rubygems/test_gem_resolver_best_set.rb +1 -1
- data/test/rubygems/test_gem_resolver_composed_set.rb +1 -1
- data/test/rubygems/test_gem_resolver_conflict.rb +1 -1
- data/test/rubygems/test_gem_resolver_dependency_request.rb +1 -1
- data/test/rubygems/test_gem_resolver_git_set.rb +1 -1
- data/test/rubygems/test_gem_resolver_git_specification.rb +2 -1
- data/test/rubygems/test_gem_resolver_index_set.rb +1 -1
- data/test/rubygems/test_gem_resolver_index_specification.rb +1 -1
- data/test/rubygems/test_gem_resolver_installed_specification.rb +1 -1
- data/test/rubygems/test_gem_resolver_installer_set.rb +19 -1
- data/test/rubygems/test_gem_resolver_local_specification.rb +1 -1
- data/test/rubygems/test_gem_resolver_lock_set.rb +1 -1
- data/test/rubygems/test_gem_resolver_lock_specification.rb +1 -1
- data/test/rubygems/test_gem_resolver_requirement_list.rb +1 -1
- data/test/rubygems/test_gem_resolver_specification.rb +1 -1
- data/test/rubygems/test_gem_resolver_vendor_set.rb +1 -1
- data/test/rubygems/test_gem_resolver_vendor_specification.rb +1 -1
- data/test/rubygems/test_gem_security.rb +1 -1
- data/test/rubygems/test_gem_security_policy.rb +1 -1
- data/test/rubygems/test_gem_security_signer.rb +1 -1
- data/test/rubygems/test_gem_security_trust_dir.rb +1 -1
- data/test/rubygems/test_gem_server.rb +1 -1
- data/test/rubygems/test_gem_silent_ui.rb +1 -1
- data/test/rubygems/test_gem_source.rb +1 -1
- data/test/rubygems/test_gem_source_fetch_problem.rb +1 -1
- data/test/rubygems/test_gem_source_git.rb +1 -1
- data/test/rubygems/test_gem_source_installed.rb +1 -1
- data/test/rubygems/test_gem_source_list.rb +1 -1
- data/test/rubygems/test_gem_source_local.rb +1 -1
- data/test/rubygems/test_gem_source_lock.rb +1 -1
- data/test/rubygems/test_gem_source_specific_file.rb +1 -1
- data/test/rubygems/test_gem_source_subpath_problem.rb +1 -1
- data/test/rubygems/test_gem_source_vendor.rb +1 -1
- data/test/rubygems/test_gem_spec_fetcher.rb +1 -1
- data/test/rubygems/test_gem_specification.rb +15 -165
- data/test/rubygems/test_gem_stream_ui.rb +1 -1
- data/test/rubygems/test_gem_stub_specification.rb +1 -1
- data/test/rubygems/test_gem_text.rb +1 -1
- data/test/rubygems/test_gem_uninstaller.rb +1 -1
- data/test/rubygems/test_gem_unsatisfiable_dependency_error.rb +1 -1
- data/test/rubygems/test_gem_uri.rb +39 -0
- data/test/rubygems/test_gem_uri_formatter.rb +1 -1
- data/test/rubygems/test_gem_util.rb +1 -1
- data/test/rubygems/test_gem_validator.rb +1 -1
- data/test/rubygems/test_gem_version.rb +1 -1
- data/test/rubygems/test_gem_version_option.rb +1 -1
- data/test/rubygems/test_kernel.rb +1 -1
- data/test/rubygems/test_project_sanity.rb +1 -1
- data/test/rubygems/test_remote_fetch_error.rb +1 -1
- data/test/rubygems/test_require.rb +1 -1
- data/test/rubygems/test_rubygems.rb +44 -0
- data/{lib/rubygems/test_utilities.rb → test/rubygems/utilities.rb} +0 -2
- metadata +10 -10
- data/lib/rubygems/syck_hack.rb +0 -77
- data/lib/rubygems/uri_parser.rb +0 -34
- data/lib/rubygems/uri_parsing.rb +0 -23
data/lib/rubygems/safe_yaml.rb
CHANGED
data/lib/rubygems/security.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
# See LICENSE.txt for permissions.
|
6
6
|
#++
|
7
7
|
|
8
|
-
|
8
|
+
require_relative 'exceptions'
|
9
9
|
require_relative 'openssl'
|
10
10
|
|
11
11
|
##
|
@@ -592,9 +592,9 @@ module Gem::Security
|
|
592
592
|
end
|
593
593
|
|
594
594
|
if Gem::HAVE_OPENSSL
|
595
|
-
|
596
|
-
|
597
|
-
|
595
|
+
require_relative 'security/policy'
|
596
|
+
require_relative 'security/policies'
|
597
|
+
require_relative 'security/trust_dir'
|
598
598
|
end
|
599
599
|
|
600
|
-
|
600
|
+
require_relative 'security/signer'
|
@@ -5,7 +5,7 @@
|
|
5
5
|
# See LICENSE.txt for permissions.
|
6
6
|
#++
|
7
7
|
|
8
|
-
|
8
|
+
require_relative '../rubygems'
|
9
9
|
|
10
10
|
# forward-declare
|
11
11
|
|
@@ -20,7 +20,7 @@ end
|
|
20
20
|
module Gem::SecurityOption
|
21
21
|
def add_security_option
|
22
22
|
OptionParser.accept Gem::Security::Policy do |value|
|
23
|
-
|
23
|
+
require_relative 'security'
|
24
24
|
|
25
25
|
raise OptionParser::InvalidArgument, 'OpenSSL not installed' unless
|
26
26
|
defined?(Gem::Security::HighSecurity)
|
data/lib/rubygems/server.rb
CHANGED
data/lib/rubygems/source.rb
CHANGED
@@ -238,9 +238,9 @@ class Gem::Source
|
|
238
238
|
end
|
239
239
|
end
|
240
240
|
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
241
|
+
require_relative 'source/git'
|
242
|
+
require_relative 'source/installed'
|
243
|
+
require_relative 'source/specific_file'
|
244
|
+
require_relative 'source/local'
|
245
|
+
require_relative 'source/lock'
|
246
|
+
require_relative 'source/vendor'
|
@@ -1,9 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
2
|
+
require_relative 'remote_fetcher'
|
3
|
+
require_relative 'user_interaction'
|
4
|
+
require_relative 'errors'
|
5
|
+
require_relative 'text'
|
6
|
+
require_relative 'name_tuple'
|
7
7
|
|
8
8
|
##
|
9
9
|
# SpecFetcher handles metadata updates from remote gem repositories.
|
@@ -6,11 +6,11 @@
|
|
6
6
|
# See LICENSE.txt for permissions.
|
7
7
|
#++
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
require_relative 'deprecate'
|
10
|
+
require_relative 'basic_specification'
|
11
|
+
require_relative 'stub_specification'
|
12
|
+
require_relative 'specification_policy'
|
13
|
+
require_relative 'util/list'
|
14
14
|
|
15
15
|
##
|
16
16
|
# The Specification class contains the information for a gem. Typically
|
@@ -1568,9 +1568,9 @@ class Gem::Specification < Gem::BasicSpecification
|
|
1568
1568
|
unresolved_deps = Gem::Specification.unresolved_deps.dup
|
1569
1569
|
Gem::Specification.unresolved_deps.clear
|
1570
1570
|
|
1571
|
-
|
1572
|
-
|
1573
|
-
|
1571
|
+
require_relative 'config_file'
|
1572
|
+
require_relative 'ext'
|
1573
|
+
require_relative 'user_interaction'
|
1574
1574
|
|
1575
1575
|
ui = Gem::SilentUI.new
|
1576
1576
|
Gem::DefaultUserInteraction.use_ui ui do
|
@@ -1690,12 +1690,6 @@ class Gem::Specification < Gem::BasicSpecification
|
|
1690
1690
|
when String then
|
1691
1691
|
if DateTimeFormat =~ date
|
1692
1692
|
Time.utc($1.to_i, $2.to_i, $3.to_i)
|
1693
|
-
|
1694
|
-
# Workaround for where the date format output from psych isn't
|
1695
|
-
# parsed as a Time object by syck and thus comes through as a
|
1696
|
-
# string.
|
1697
|
-
elsif /\A(\d{4})-(\d{2})-(\d{2}) \d{2}:\d{2}:\d{2}\.\d+?Z\z/ =~ date
|
1698
|
-
Time.utc($1.to_i, $2.to_i, $3.to_i)
|
1699
1693
|
else
|
1700
1694
|
raise(Gem::InvalidSpecificationException,
|
1701
1695
|
"invalid date format in specification: #{date.inspect}")
|
@@ -2531,7 +2525,7 @@ class Gem::Specification < Gem::BasicSpecification
|
|
2531
2525
|
# back, we have to check again here to make sure that our
|
2532
2526
|
# psych code was properly loaded, and load it if not.
|
2533
2527
|
unless Gem.const_defined?(:NoAliasYAMLTree)
|
2534
|
-
|
2528
|
+
require_relative 'psych_tree'
|
2535
2529
|
end
|
2536
2530
|
|
2537
2531
|
builder = Gem::NoAliasYAMLTree.create
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
require_relative 'user_interaction'
|
2
2
|
|
3
3
|
class Gem::SpecificationPolicy
|
4
4
|
include Gem::UserInteraction
|
@@ -381,7 +381,7 @@ http://spdx.org/licenses or '#{Gem::Licenses::NONSTANDARD}' for a nonstandard li
|
|
381
381
|
end
|
382
382
|
|
383
383
|
LAZY = '"FIxxxXME" or "TOxxxDO"'.gsub(/xxx/, '')
|
384
|
-
LAZY_PATTERN =
|
384
|
+
LAZY_PATTERN = /^FI XME|^TO DO/x.freeze
|
385
385
|
HOMEPAGE_URI_PATTERN = /\A[a-z][a-z\d+.-]*:/i.freeze
|
386
386
|
|
387
387
|
def validate_lazy_metadata
|
data/lib/rubygems/uninstaller.rb
CHANGED
@@ -6,11 +6,11 @@
|
|
6
6
|
#++
|
7
7
|
|
8
8
|
require 'fileutils'
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
require_relative '../rubygems'
|
10
|
+
require_relative 'installer_uninstaller_utils'
|
11
|
+
require_relative 'dependency_list'
|
12
|
+
require_relative 'rdoc'
|
13
|
+
require_relative 'user_interaction'
|
14
14
|
|
15
15
|
##
|
16
16
|
# An Uninstaller.
|
@@ -357,7 +357,7 @@ class Gem::Uninstaller
|
|
357
357
|
# of what it did for us to find rather than trying to recreate
|
358
358
|
# it again.
|
359
359
|
if @format_executable
|
360
|
-
|
360
|
+
require_relative 'installer'
|
361
361
|
Gem::Installer.exec_format % File.basename(filename)
|
362
362
|
else
|
363
363
|
filename
|
data/lib/rubygems/uri.rb
ADDED
@@ -0,0 +1,111 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
##
|
4
|
+
# The Uri handles rubygems source URIs.
|
5
|
+
#
|
6
|
+
|
7
|
+
class Gem::Uri
|
8
|
+
def initialize(source_uri)
|
9
|
+
@parsed_uri = parse(source_uri)
|
10
|
+
end
|
11
|
+
|
12
|
+
def redacted
|
13
|
+
return self unless valid_uri?
|
14
|
+
|
15
|
+
if token? || oauth_basic?
|
16
|
+
with_redacted_user
|
17
|
+
elsif password?
|
18
|
+
with_redacted_password
|
19
|
+
else
|
20
|
+
self
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def to_s
|
25
|
+
@parsed_uri.to_s
|
26
|
+
end
|
27
|
+
|
28
|
+
def redact_credentials_from(text)
|
29
|
+
return text unless valid_uri? && password?
|
30
|
+
|
31
|
+
text.sub(password, 'REDACTED')
|
32
|
+
end
|
33
|
+
|
34
|
+
def method_missing(method_name, *args, &blk)
|
35
|
+
if @parsed_uri.respond_to?(method_name)
|
36
|
+
@parsed_uri.send(method_name, *args, &blk)
|
37
|
+
else
|
38
|
+
super
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def respond_to_missing?(method_name, include_private = false)
|
43
|
+
@parsed_uri.respond_to?(method_name, include_private) || super
|
44
|
+
end
|
45
|
+
|
46
|
+
protected
|
47
|
+
|
48
|
+
# Add a protected reader for the cloned instance to access the original object's parsed uri
|
49
|
+
attr_reader :parsed_uri
|
50
|
+
|
51
|
+
private
|
52
|
+
|
53
|
+
##
|
54
|
+
# Parses the #uri, raising if it's invalid
|
55
|
+
|
56
|
+
def parse!(uri)
|
57
|
+
require "uri"
|
58
|
+
|
59
|
+
raise URI::InvalidURIError unless uri
|
60
|
+
|
61
|
+
# Always escape URI's to deal with potential spaces and such
|
62
|
+
# It should also be considered that source_uri may already be
|
63
|
+
# a valid URI with escaped characters. e.g. "{DESede}" is encoded
|
64
|
+
# as "%7BDESede%7D". If this is escaped again the percentage
|
65
|
+
# symbols will be escaped.
|
66
|
+
begin
|
67
|
+
URI.parse(uri)
|
68
|
+
rescue URI::InvalidURIError
|
69
|
+
URI.parse(URI::DEFAULT_PARSER.escape(uri))
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
##
|
74
|
+
# Parses the #uri, returning the original uri if it's invalid
|
75
|
+
|
76
|
+
def parse(uri)
|
77
|
+
return uri unless uri.is_a?(String)
|
78
|
+
|
79
|
+
parse!(uri)
|
80
|
+
rescue URI::InvalidURIError
|
81
|
+
uri
|
82
|
+
end
|
83
|
+
|
84
|
+
def with_redacted_user
|
85
|
+
clone.tap {|uri| uri.user = 'REDACTED' }
|
86
|
+
end
|
87
|
+
|
88
|
+
def with_redacted_password
|
89
|
+
clone.tap {|uri| uri.password = 'REDACTED' }
|
90
|
+
end
|
91
|
+
|
92
|
+
def valid_uri?
|
93
|
+
!@parsed_uri.is_a?(String)
|
94
|
+
end
|
95
|
+
|
96
|
+
def password?
|
97
|
+
!!password
|
98
|
+
end
|
99
|
+
|
100
|
+
def oauth_basic?
|
101
|
+
password == 'x-oauth-basic'
|
102
|
+
end
|
103
|
+
|
104
|
+
def token?
|
105
|
+
!user.nil? && password.nil?
|
106
|
+
end
|
107
|
+
|
108
|
+
def initialize_copy(original)
|
109
|
+
@parsed_uri = original.parsed_uri.clone
|
110
|
+
end
|
111
|
+
end
|
data/lib/rubygems/validator.rb
CHANGED
data/lib/rubygems.rb
CHANGED
@@ -8,15 +8,15 @@
|
|
8
8
|
require 'rbconfig'
|
9
9
|
|
10
10
|
module Gem
|
11
|
-
VERSION = "3.2.
|
11
|
+
VERSION = "3.2.28".freeze
|
12
12
|
end
|
13
13
|
|
14
14
|
# Must be first since it unloads the prelude from 1.9.2
|
15
|
-
|
15
|
+
require_relative 'rubygems/compatibility'
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
require_relative 'rubygems/defaults'
|
18
|
+
require_relative 'rubygems/deprecate'
|
19
|
+
require_relative 'rubygems/errors'
|
20
20
|
|
21
21
|
##
|
22
22
|
# RubyGems is the Ruby standard for publishing and managing third party
|
@@ -249,9 +249,6 @@ module Gem
|
|
249
249
|
# you to specify specific gem versions.
|
250
250
|
|
251
251
|
def self.bin_path(name, exec_name = nil, *requirements)
|
252
|
-
# TODO: fails test_self_bin_path_bin_file_gone_in_latest
|
253
|
-
# Gem::Specification.find_by_name(name, *requirements).bin_file exec_name
|
254
|
-
|
255
252
|
requirements = Gem::Requirement.default if
|
256
253
|
requirements.empty?
|
257
254
|
|
@@ -562,7 +559,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
562
559
|
# => [#<Gem::Specification:0x1013b4528 @name="minitest", ...>]
|
563
560
|
|
564
561
|
def self.install(name, version = Gem::Requirement.default, *options)
|
565
|
-
|
562
|
+
require_relative "rubygems/dependency_installer"
|
566
563
|
inst = Gem::DependencyInstaller.new(*options)
|
567
564
|
inst.install name, version
|
568
565
|
inst.installed_gems
|
@@ -628,22 +625,12 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
628
625
|
rescue ::LoadError
|
629
626
|
# If we can't load psych, that's fine, go on.
|
630
627
|
else
|
631
|
-
|
632
|
-
|
633
|
-
if defined?(YAML::ENGINE) && YAML::ENGINE.yamler != "psych"
|
634
|
-
YAML::ENGINE.yamler = "psych"
|
635
|
-
end
|
636
|
-
|
637
|
-
require 'rubygems/psych_additions'
|
638
|
-
require 'rubygems/psych_tree'
|
628
|
+
require_relative 'rubygems/psych_additions'
|
629
|
+
require_relative 'rubygems/psych_tree'
|
639
630
|
end
|
640
631
|
|
641
632
|
require 'yaml'
|
642
|
-
|
643
|
-
|
644
|
-
# Now that we're sure some kind of yaml library is loaded, pull
|
645
|
-
# in our hack to deal with Syck's DefaultKey ugliness.
|
646
|
-
require 'rubygems/syck_hack'
|
633
|
+
require_relative 'rubygems/safe_yaml'
|
647
634
|
|
648
635
|
@yaml_loaded = true
|
649
636
|
end
|
@@ -1003,7 +990,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
1003
990
|
# Lazily loads DefaultUserInteraction and returns the default UI.
|
1004
991
|
|
1005
992
|
def self.ui
|
1006
|
-
|
993
|
+
require_relative 'rubygems/user_interaction'
|
1007
994
|
|
1008
995
|
Gem::DefaultUserInteraction.ui
|
1009
996
|
end
|
@@ -1063,7 +1050,9 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
1063
1050
|
# Find rubygems plugin files in the standard location and load them
|
1064
1051
|
|
1065
1052
|
def self.load_plugins
|
1066
|
-
|
1053
|
+
Gem.path.each do |gem_path|
|
1054
|
+
load_plugin_files Gem::Util.glob_files_in_dir("*#{Gem.plugin_suffix_pattern}", plugindir(gem_path))
|
1055
|
+
end
|
1067
1056
|
end
|
1068
1057
|
|
1069
1058
|
##
|
@@ -1121,27 +1110,22 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
1121
1110
|
end
|
1122
1111
|
|
1123
1112
|
ENV["BUNDLE_GEMFILE"] ||= File.expand_path(path)
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1113
|
+
require_relative 'rubygems/user_interaction'
|
1114
|
+
require "bundler"
|
1115
|
+
begin
|
1116
|
+
Gem::DefaultUserInteraction.use_ui(ui) do
|
1117
|
+
begin
|
1118
|
+
Bundler.ui.silence do
|
1119
|
+
@gemdeps = Bundler.setup
|
1120
|
+
end
|
1121
|
+
ensure
|
1122
|
+
Gem::DefaultUserInteraction.ui.close
|
1130
1123
|
end
|
1131
|
-
ensure
|
1132
|
-
Gem::DefaultUserInteraction.ui.close
|
1133
1124
|
end
|
1134
|
-
|
1135
|
-
end
|
1136
|
-
|
1137
|
-
rescue => e
|
1138
|
-
case e
|
1139
|
-
when Gem::LoadError, Gem::UnsatisfiableDependencyError, (defined?(Bundler::GemNotFound) ? Bundler::GemNotFound : Gem::LoadError)
|
1125
|
+
rescue Bundler::BundlerError => e
|
1140
1126
|
warn e.message
|
1141
|
-
warn "You may need to `
|
1127
|
+
warn "You may need to `bundle install` to install missing gems"
|
1142
1128
|
warn ""
|
1143
|
-
else
|
1144
|
-
raise
|
1145
1129
|
end
|
1146
1130
|
end
|
1147
1131
|
|
@@ -1338,7 +1322,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
1338
1322
|
autoload :Version, File.expand_path('rubygems/version', __dir__)
|
1339
1323
|
end
|
1340
1324
|
|
1341
|
-
|
1325
|
+
require_relative 'rubygems/exceptions'
|
1342
1326
|
|
1343
1327
|
# REFACTOR: This should be pulled out into some kind of hacks file.
|
1344
1328
|
begin
|
@@ -1347,6 +1331,14 @@ begin
|
|
1347
1331
|
|
1348
1332
|
require 'rubygems/defaults/operating_system'
|
1349
1333
|
rescue LoadError
|
1334
|
+
# Ignored
|
1335
|
+
rescue StandardError => e
|
1336
|
+
msg = "#{e.message}\n" \
|
1337
|
+
"Loading the rubygems/defaults/operating_system.rb file caused an error. " \
|
1338
|
+
"This file is owned by your OS, not by rubygems upstream. " \
|
1339
|
+
"Please find out which OS package this file belongs to and follow the guidelines from your OS to report " \
|
1340
|
+
"the problem and ask for help."
|
1341
|
+
raise e.class, msg
|
1350
1342
|
end
|
1351
1343
|
|
1352
1344
|
begin
|
@@ -1361,8 +1353,6 @@ end
|
|
1361
1353
|
# Loads the default specs.
|
1362
1354
|
Gem::Specification.load_defaults
|
1363
1355
|
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1367
|
-
|
1368
|
-
Gem.use_gemdeps
|
1356
|
+
require_relative 'rubygems/core_ext/kernel_gem'
|
1357
|
+
require_relative 'rubygems/core_ext/kernel_require'
|
1358
|
+
require_relative 'rubygems/core_ext/kernel_warn'
|
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.2.
|
5
|
+
s.version = "3.2.28"
|
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
|
|
Binary file
|
@@ -52,32 +52,28 @@ require 'rubygems/mock_gem_ui'
|
|
52
52
|
module Gem
|
53
53
|
|
54
54
|
##
|
55
|
-
# Allows setting the gem path searcher.
|
56
|
-
# requiring 'rubygems/test_case'
|
55
|
+
# Allows setting the gem path searcher.
|
57
56
|
|
58
57
|
def self.searcher=(searcher)
|
59
58
|
@searcher = searcher
|
60
59
|
end
|
61
60
|
|
62
61
|
##
|
63
|
-
# Allows toggling Windows behavior.
|
64
|
-
# 'rubygems/test_case'
|
62
|
+
# Allows toggling Windows behavior.
|
65
63
|
|
66
64
|
def self.win_platform=(val)
|
67
65
|
@@win_platform = val
|
68
66
|
end
|
69
67
|
|
70
68
|
##
|
71
|
-
# Allows setting path to Ruby.
|
72
|
-
# 'rubygems/test_case'
|
69
|
+
# Allows setting path to Ruby.
|
73
70
|
|
74
71
|
def self.ruby=(ruby)
|
75
72
|
@ruby = ruby
|
76
73
|
end
|
77
74
|
|
78
75
|
##
|
79
|
-
#
|
80
|
-
# MockGemUi.
|
76
|
+
# Sets the default user interaction to a MockGemUi.
|
81
77
|
|
82
78
|
module DefaultUserInteraction
|
83
79
|
@ui = Gem::MockGemUi.new
|
@@ -88,8 +84,7 @@ require "rubygems/command"
|
|
88
84
|
|
89
85
|
class Gem::Command
|
90
86
|
##
|
91
|
-
# Allows resetting the hash of specific args per command.
|
92
|
-
# available when requiring 'rubygems/test_case'
|
87
|
+
# Allows resetting the hash of specific args per command.
|
93
88
|
|
94
89
|
def self.specific_extra_args_hash=(value)
|
95
90
|
@specific_extra_args_hash = value
|
@@ -111,8 +106,6 @@ class Gem::TestCase < Test::Unit::TestCase
|
|
111
106
|
|
112
107
|
attr_accessor :uri # :nodoc:
|
113
108
|
|
114
|
-
TEST_PATH = ENV.fetch('RUBYGEMS_TEST_PATH', File.expand_path('../../../test/rubygems', __FILE__))
|
115
|
-
|
116
109
|
def assert_activate(expected, *specs)
|
117
110
|
specs.each do |spec|
|
118
111
|
case spec
|
@@ -1304,7 +1297,11 @@ Also, a list:
|
|
1304
1297
|
end
|
1305
1298
|
|
1306
1299
|
def ruby_with_rubygems_in_load_path
|
1307
|
-
[Gem.ruby, "-I",
|
1300
|
+
[Gem.ruby, "-I", rubygems_path]
|
1301
|
+
end
|
1302
|
+
|
1303
|
+
def rubygems_path
|
1304
|
+
$LOAD_PATH.find{|p| p == File.dirname($LOADED_FEATURES.find{|f| f.end_with?("/rubygems.rb") }) }
|
1308
1305
|
end
|
1309
1306
|
|
1310
1307
|
def with_clean_path_to_ruby
|
@@ -1335,8 +1332,8 @@ Also, a list:
|
|
1335
1332
|
end
|
1336
1333
|
end
|
1337
1334
|
|
1338
|
-
@@good_rake = "#{rubybin} #{escape_path(
|
1339
|
-
@@bad_rake = "#{rubybin} #{escape_path(
|
1335
|
+
@@good_rake = "#{rubybin} #{escape_path(__dir__, 'good_rake.rb')}"
|
1336
|
+
@@bad_rake = "#{rubybin} #{escape_path(__dir__, 'bad_rake.rb')}"
|
1340
1337
|
|
1341
1338
|
##
|
1342
1339
|
# Construct a new Gem::Dependency.
|
@@ -1523,12 +1520,12 @@ Also, a list:
|
|
1523
1520
|
|
1524
1521
|
def self.cert_path(cert_name)
|
1525
1522
|
if 32 == (Time.at(2**32) rescue 32)
|
1526
|
-
cert_file = "#{
|
1523
|
+
cert_file = "#{__dir__}/#{cert_name}_cert_32.pem"
|
1527
1524
|
|
1528
1525
|
return cert_file if File.exist? cert_file
|
1529
1526
|
end
|
1530
1527
|
|
1531
|
-
"#{
|
1528
|
+
"#{__dir__}/#{cert_name}_cert.pem"
|
1532
1529
|
end
|
1533
1530
|
|
1534
1531
|
##
|
@@ -1546,7 +1543,7 @@ Also, a list:
|
|
1546
1543
|
# Returns the path to the key named +key_name+ from <tt>test/rubygems</tt>
|
1547
1544
|
|
1548
1545
|
def self.key_path(key_name)
|
1549
|
-
"#{
|
1546
|
+
"#{__dir__}/#{key_name}_key.pem"
|
1550
1547
|
end
|
1551
1548
|
|
1552
1549
|
# :stopdoc:
|
@@ -1607,4 +1604,4 @@ class Object
|
|
1607
1604
|
end
|
1608
1605
|
end
|
1609
1606
|
|
1610
|
-
|
1607
|
+
require_relative 'utilities'
|