rubygems-update 2.5.1 → 2.5.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rubygems-update might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.travis.yml +46 -0
- data/CONTRIBUTING.rdoc +98 -27
- data/History.txt +44 -1
- data/MAINTAINERS.md +4 -0
- data/Manifest.txt +4 -0
- data/POLICIES.rdoc +61 -0
- data/appveyor.yml +6 -1
- data/lib/gauntlet_rubygems.rb +1 -0
- data/lib/rubygems.rb +3 -2
- data/lib/rubygems/available_set.rb +1 -0
- data/lib/rubygems/basic_specification.rb +4 -4
- data/lib/rubygems/command.rb +7 -2
- data/lib/rubygems/command_manager.rb +1 -0
- data/lib/rubygems/commands/build_command.rb +5 -0
- data/lib/rubygems/commands/cert_command.rb +1 -0
- data/lib/rubygems/commands/check_command.rb +1 -0
- data/lib/rubygems/commands/cleanup_command.rb +1 -0
- data/lib/rubygems/commands/contents_command.rb +1 -0
- data/lib/rubygems/commands/dependency_command.rb +3 -2
- data/lib/rubygems/commands/environment_command.rb +3 -3
- data/lib/rubygems/commands/fetch_command.rb +1 -0
- data/lib/rubygems/commands/generate_index_command.rb +1 -0
- data/lib/rubygems/commands/help_command.rb +1 -0
- data/lib/rubygems/commands/install_command.rb +1 -0
- data/lib/rubygems/commands/list_command.rb +1 -0
- data/lib/rubygems/commands/lock_command.rb +1 -0
- data/lib/rubygems/commands/mirror_command.rb +1 -0
- data/lib/rubygems/commands/open_command.rb +1 -0
- data/lib/rubygems/commands/outdated_command.rb +1 -0
- data/lib/rubygems/commands/owner_command.rb +1 -0
- data/lib/rubygems/commands/pristine_command.rb +1 -0
- data/lib/rubygems/commands/push_command.rb +1 -0
- data/lib/rubygems/commands/query_command.rb +12 -5
- data/lib/rubygems/commands/rdoc_command.rb +1 -0
- data/lib/rubygems/commands/search_command.rb +1 -0
- data/lib/rubygems/commands/server_command.rb +1 -0
- data/lib/rubygems/commands/setup_command.rb +1 -0
- data/lib/rubygems/commands/sources_command.rb +1 -0
- data/lib/rubygems/commands/specification_command.rb +1 -0
- data/lib/rubygems/commands/stale_command.rb +1 -0
- data/lib/rubygems/commands/uninstall_command.rb +1 -0
- data/lib/rubygems/commands/unpack_command.rb +1 -0
- data/lib/rubygems/commands/update_command.rb +1 -0
- data/lib/rubygems/commands/which_command.rb +1 -0
- data/lib/rubygems/commands/yank_command.rb +11 -15
- data/lib/rubygems/compatibility.rb +1 -0
- data/lib/rubygems/config_file.rb +6 -4
- data/lib/rubygems/core_ext/kernel_gem.rb +1 -0
- data/lib/rubygems/core_ext/kernel_require.rb +1 -0
- data/lib/rubygems/defaults.rb +1 -0
- data/lib/rubygems/dependency.rb +3 -2
- data/lib/rubygems/dependency_installer.rb +1 -0
- data/lib/rubygems/dependency_list.rb +1 -0
- data/lib/rubygems/deprecate.rb +1 -0
- data/lib/rubygems/doctor.rb +1 -0
- data/lib/rubygems/errors.rb +1 -0
- data/lib/rubygems/exceptions.rb +2 -2
- data/lib/rubygems/ext.rb +1 -0
- data/lib/rubygems/ext/build_error.rb +1 -0
- data/lib/rubygems/ext/builder.rb +1 -0
- data/lib/rubygems/ext/cmake_builder.rb +1 -0
- data/lib/rubygems/ext/configure_builder.rb +1 -0
- data/lib/rubygems/ext/ext_conf_builder.rb +15 -4
- data/lib/rubygems/ext/rake_builder.rb +1 -0
- data/lib/rubygems/gem_runner.rb +1 -0
- data/lib/rubygems/gemcutter_utilities.rb +9 -3
- data/lib/rubygems/indexer.rb +1 -0
- data/lib/rubygems/install_default_message.rb +1 -0
- data/lib/rubygems/install_message.rb +1 -0
- data/lib/rubygems/install_update_options.rb +6 -0
- data/lib/rubygems/installer.rb +12 -5
- data/lib/rubygems/installer_test_case.rb +1 -0
- data/lib/rubygems/local_remote_options.rb +2 -1
- data/lib/rubygems/mock_gem_ui.rb +1 -0
- data/lib/rubygems/name_tuple.rb +2 -1
- data/lib/rubygems/package.rb +3 -2
- data/lib/rubygems/package/digest_io.rb +1 -0
- data/lib/rubygems/package/file_source.rb +1 -0
- data/lib/rubygems/package/io_source.rb +1 -0
- data/lib/rubygems/package/old.rb +4 -4
- data/lib/rubygems/package/source.rb +1 -0
- data/lib/rubygems/package/tar_header.rb +1 -0
- data/lib/rubygems/package/tar_reader.rb +1 -0
- data/lib/rubygems/package/tar_reader/entry.rb +1 -0
- data/lib/rubygems/package/tar_test_case.rb +1 -0
- data/lib/rubygems/package/tar_writer.rb +1 -0
- data/lib/rubygems/package_task.rb +1 -0
- data/lib/rubygems/path_support.rb +15 -5
- data/lib/rubygems/platform.rb +1 -0
- data/lib/rubygems/psych_additions.rb +1 -0
- data/lib/rubygems/psych_tree.rb +1 -0
- data/lib/rubygems/rdoc.rb +1 -0
- data/lib/rubygems/remote_fetcher.rb +1 -0
- data/lib/rubygems/request.rb +3 -2
- data/lib/rubygems/request/connection_pools.rb +1 -0
- data/lib/rubygems/request/http_pool.rb +1 -0
- data/lib/rubygems/request/https_pool.rb +1 -0
- data/lib/rubygems/request_set.rb +14 -8
- data/lib/rubygems/request_set/gem_dependency_api.rb +54 -6
- data/lib/rubygems/request_set/lockfile.rb +3 -3
- data/lib/rubygems/request_set/lockfile/parser.rb +18 -9
- data/lib/rubygems/request_set/lockfile/tokenizer.rb +1 -0
- data/lib/rubygems/requirement.rb +1 -0
- data/lib/rubygems/resolver.rb +2 -0
- data/lib/rubygems/resolver/activation_request.rb +18 -5
- data/lib/rubygems/resolver/api_set.rb +1 -0
- data/lib/rubygems/resolver/api_specification.rb +1 -0
- data/lib/rubygems/resolver/best_set.rb +1 -0
- data/lib/rubygems/resolver/composed_set.rb +1 -0
- data/lib/rubygems/resolver/conflict.rb +1 -0
- data/lib/rubygems/resolver/current_set.rb +1 -0
- data/lib/rubygems/resolver/dependency_request.rb +1 -0
- data/lib/rubygems/resolver/git_set.rb +1 -0
- data/lib/rubygems/resolver/git_specification.rb +1 -0
- data/lib/rubygems/resolver/index_set.rb +1 -0
- data/lib/rubygems/resolver/index_specification.rb +1 -0
- data/lib/rubygems/resolver/installed_specification.rb +1 -0
- data/lib/rubygems/resolver/installer_set.rb +1 -0
- data/lib/rubygems/resolver/local_specification.rb +1 -0
- data/lib/rubygems/resolver/lock_set.rb +4 -5
- data/lib/rubygems/resolver/lock_specification.rb +6 -2
- data/lib/rubygems/resolver/molinillo.rb +1 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo.rb +5 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb +10 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/errors.rb +6 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/gem_metadata.rb +3 -1
- data/lib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb +1 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/modules/ui.rb +1 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb +2 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/resolver.rb +3 -1
- data/lib/rubygems/resolver/molinillo/lib/molinillo/state.rb +8 -7
- data/lib/rubygems/resolver/requirement_list.rb +1 -0
- data/lib/rubygems/resolver/set.rb +1 -0
- data/lib/rubygems/resolver/source_set.rb +48 -0
- data/lib/rubygems/resolver/spec_specification.rb +1 -0
- data/lib/rubygems/resolver/specification.rb +1 -0
- data/lib/rubygems/resolver/stats.rb +1 -0
- data/lib/rubygems/resolver/vendor_set.rb +1 -0
- data/lib/rubygems/resolver/vendor_specification.rb +1 -0
- data/lib/rubygems/security.rb +3 -2
- data/lib/rubygems/security/policies.rb +1 -0
- data/lib/rubygems/security/policy.rb +2 -2
- data/lib/rubygems/security/signer.rb +1 -0
- data/lib/rubygems/security/trust_dir.rb +1 -0
- data/lib/rubygems/server.rb +1 -0
- data/lib/rubygems/source.rb +1 -0
- data/lib/rubygems/source/git.rb +1 -0
- data/lib/rubygems/source/installed.rb +1 -0
- data/lib/rubygems/source/local.rb +1 -0
- data/lib/rubygems/source/lock.rb +1 -0
- data/lib/rubygems/source/specific_file.rb +1 -0
- data/lib/rubygems/source/vendor.rb +1 -0
- data/lib/rubygems/source_list.rb +2 -1
- data/lib/rubygems/source_local.rb +1 -0
- data/lib/rubygems/source_specific_file.rb +1 -0
- data/lib/rubygems/spec_fetcher.rb +1 -0
- data/lib/rubygems/specification.rb +11 -6
- data/lib/rubygems/stub_specification.rb +1 -0
- data/lib/rubygems/syck_hack.rb +1 -0
- data/lib/rubygems/test_case.rb +15 -3
- data/lib/rubygems/test_utilities.rb +1 -0
- data/lib/rubygems/text.rb +1 -1
- data/lib/rubygems/uninstaller.rb +1 -0
- data/lib/rubygems/uri_formatter.rb +1 -0
- data/lib/rubygems/user_interaction.rb +1 -0
- data/lib/rubygems/util.rb +2 -1
- data/lib/rubygems/util/licenses.rb +14 -0
- data/lib/rubygems/util/list.rb +1 -0
- data/lib/rubygems/validator.rb +1 -0
- data/lib/rubygems/version.rb +5 -1
- data/lib/rubygems/version_option.rb +1 -0
- data/lib/ubygems.rb +1 -0
- data/setup.rb +1 -0
- data/test/rubygems/bad_rake.rb +1 -0
- data/test/rubygems/bogussources.rb +1 -0
- data/test/rubygems/fake_certlib/openssl.rb +1 -0
- data/test/rubygems/fix_openssl_warnings.rb +1 -0
- data/test/rubygems/foo/discover.rb +1 -0
- data/test/rubygems/good_rake.rb +1 -0
- data/test/rubygems/plugin/exception/rubygems_plugin.rb +1 -0
- data/test/rubygems/plugin/load/rubygems_plugin.rb +1 -0
- data/test/rubygems/plugin/standarderror/rubygems_plugin.rb +1 -0
- data/test/rubygems/rubygems/commands/crash_command.rb +1 -0
- data/test/rubygems/rubygems_plugin.rb +1 -0
- data/test/rubygems/sff/discover.rb +1 -0
- data/test/rubygems/simple_gem.rb +1 -0
- data/test/rubygems/test_bundled_ca.rb +39 -40
- data/test/rubygems/test_config.rb +1 -0
- data/test/rubygems/test_deprecate.rb +1 -0
- data/test/rubygems/test_gem.rb +1 -1
- data/test/rubygems/test_gem_available_set.rb +1 -0
- data/test/rubygems/test_gem_command.rb +1 -0
- data/test/rubygems/test_gem_command_manager.rb +1 -0
- data/test/rubygems/test_gem_commands_build_command.rb +11 -0
- data/test/rubygems/test_gem_commands_cert_command.rb +1 -0
- data/test/rubygems/test_gem_commands_check_command.rb +1 -0
- data/test/rubygems/test_gem_commands_cleanup_command.rb +1 -0
- data/test/rubygems/test_gem_commands_contents_command.rb +1 -0
- data/test/rubygems/test_gem_commands_dependency_command.rb +1 -0
- data/test/rubygems/test_gem_commands_environment_command.rb +1 -0
- data/test/rubygems/test_gem_commands_fetch_command.rb +1 -0
- data/test/rubygems/test_gem_commands_generate_index_command.rb +1 -0
- data/test/rubygems/test_gem_commands_help_command.rb +1 -0
- data/test/rubygems/test_gem_commands_install_command.rb +1 -0
- data/test/rubygems/test_gem_commands_list_command.rb +1 -0
- data/test/rubygems/test_gem_commands_lock_command.rb +1 -0
- data/test/rubygems/test_gem_commands_mirror.rb +1 -0
- data/test/rubygems/test_gem_commands_open_command.rb +1 -0
- data/test/rubygems/test_gem_commands_outdated_command.rb +1 -0
- data/test/rubygems/test_gem_commands_owner_command.rb +1 -0
- data/test/rubygems/test_gem_commands_pristine_command.rb +1 -0
- data/test/rubygems/test_gem_commands_push_command.rb +28 -0
- data/test/rubygems/test_gem_commands_query_command.rb +24 -0
- data/test/rubygems/test_gem_commands_search_command.rb +1 -0
- data/test/rubygems/test_gem_commands_server_command.rb +1 -0
- data/test/rubygems/test_gem_commands_setup_command.rb +1 -1
- data/test/rubygems/test_gem_commands_sources_command.rb +1 -0
- data/test/rubygems/test_gem_commands_specification_command.rb +1 -0
- data/test/rubygems/test_gem_commands_stale_command.rb +1 -0
- data/test/rubygems/test_gem_commands_uninstall_command.rb +1 -0
- data/test/rubygems/test_gem_commands_unpack_command.rb +1 -0
- data/test/rubygems/test_gem_commands_update_command.rb +1 -0
- data/test/rubygems/test_gem_commands_which_command.rb +1 -0
- data/test/rubygems/test_gem_commands_yank_command.rb +13 -10
- data/test/rubygems/test_gem_config_file.rb +24 -0
- data/test/rubygems/test_gem_dependency.rb +1 -0
- data/test/rubygems/test_gem_dependency_installer.rb +1 -0
- data/test/rubygems/test_gem_dependency_list.rb +1 -0
- data/test/rubygems/test_gem_dependency_resolution_error.rb +1 -0
- data/test/rubygems/test_gem_doctor.rb +1 -0
- data/test/rubygems/test_gem_ext_builder.rb +6 -1
- data/test/rubygems/test_gem_ext_cmake_builder.rb +1 -0
- data/test/rubygems/test_gem_ext_configure_builder.rb +1 -0
- data/test/rubygems/test_gem_ext_ext_conf_builder.rb +1 -0
- data/test/rubygems/test_gem_ext_rake_builder.rb +1 -0
- data/test/rubygems/test_gem_gem_runner.rb +1 -0
- data/test/rubygems/test_gem_gemcutter_utilities.rb +1 -0
- data/test/rubygems/test_gem_impossible_dependencies_error.rb +1 -0
- data/test/rubygems/test_gem_indexer.rb +1 -0
- data/test/rubygems/test_gem_install_update_options.rb +13 -0
- data/test/rubygems/test_gem_installer.rb +17 -4
- data/test/rubygems/test_gem_local_remote_options.rb +1 -0
- data/test/rubygems/test_gem_name_tuple.rb +1 -0
- data/test/rubygems/test_gem_package.rb +16 -9
- data/test/rubygems/test_gem_package_old.rb +1 -0
- data/test/rubygems/test_gem_package_tar_header.rb +1 -0
- data/test/rubygems/test_gem_package_tar_reader.rb +1 -0
- data/test/rubygems/test_gem_package_tar_reader_entry.rb +2 -1
- data/test/rubygems/test_gem_package_tar_writer.rb +1 -0
- data/test/rubygems/test_gem_package_task.rb +1 -0
- data/test/rubygems/test_gem_path_support.rb +1 -0
- data/test/rubygems/test_gem_platform.rb +1 -0
- data/test/rubygems/test_gem_rdoc.rb +1 -0
- data/test/rubygems/test_gem_remote_fetcher.rb +1 -0
- data/test/rubygems/test_gem_request.rb +1 -0
- data/test/rubygems/test_gem_request_connection_pools.rb +1 -0
- data/test/rubygems/test_gem_request_set.rb +3 -2
- data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +34 -45
- data/test/rubygems/test_gem_request_set_lockfile.rb +1 -0
- data/test/rubygems/test_gem_request_set_lockfile_parser.rb +9 -3
- data/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb +1 -0
- data/test/rubygems/test_gem_requirement.rb +1 -0
- data/test/rubygems/test_gem_resolver.rb +1 -0
- data/test/rubygems/test_gem_resolver_activation_request.rb +1 -0
- data/test/rubygems/test_gem_resolver_api_set.rb +1 -0
- data/test/rubygems/test_gem_resolver_api_specification.rb +1 -0
- data/test/rubygems/test_gem_resolver_best_set.rb +1 -0
- data/test/rubygems/test_gem_resolver_composed_set.rb +1 -0
- data/test/rubygems/test_gem_resolver_conflict.rb +1 -0
- data/test/rubygems/test_gem_resolver_dependency_request.rb +1 -0
- data/test/rubygems/test_gem_resolver_git_set.rb +1 -0
- data/test/rubygems/test_gem_resolver_git_specification.rb +1 -0
- data/test/rubygems/test_gem_resolver_index_set.rb +1 -0
- data/test/rubygems/test_gem_resolver_index_specification.rb +1 -0
- data/test/rubygems/test_gem_resolver_installed_specification.rb +1 -0
- data/test/rubygems/test_gem_resolver_installer_set.rb +1 -0
- data/test/rubygems/test_gem_resolver_local_specification.rb +1 -0
- data/test/rubygems/test_gem_resolver_lock_set.rb +1 -0
- data/test/rubygems/test_gem_resolver_lock_specification.rb +7 -6
- data/test/rubygems/test_gem_resolver_requirement_list.rb +1 -0
- data/test/rubygems/test_gem_resolver_specification.rb +1 -0
- data/test/rubygems/test_gem_resolver_vendor_set.rb +1 -0
- data/test/rubygems/test_gem_resolver_vendor_specification.rb +1 -0
- data/test/rubygems/test_gem_security.rb +1 -0
- data/test/rubygems/test_gem_security_policy.rb +1 -0
- data/test/rubygems/test_gem_security_signer.rb +1 -0
- data/test/rubygems/test_gem_security_trust_dir.rb +1 -0
- data/test/rubygems/test_gem_server.rb +1 -0
- data/test/rubygems/test_gem_silent_ui.rb +1 -0
- data/test/rubygems/test_gem_source.rb +1 -0
- data/test/rubygems/test_gem_source_fetch_problem.rb +1 -0
- data/test/rubygems/test_gem_source_git.rb +1 -0
- data/test/rubygems/test_gem_source_installed.rb +1 -0
- data/test/rubygems/test_gem_source_list.rb +1 -0
- data/test/rubygems/test_gem_source_local.rb +1 -0
- data/test/rubygems/test_gem_source_lock.rb +1 -0
- data/test/rubygems/test_gem_source_specific_file.rb +1 -0
- data/test/rubygems/test_gem_source_vendor.rb +1 -0
- data/test/rubygems/test_gem_spec_fetcher.rb +1 -0
- data/test/rubygems/test_gem_specification.rb +80 -64
- data/test/rubygems/test_gem_stream_ui.rb +1 -0
- data/test/rubygems/test_gem_stub_specification.rb +1 -0
- data/test/rubygems/test_gem_text.rb +1 -0
- data/test/rubygems/test_gem_uninstaller.rb +1 -0
- data/test/rubygems/test_gem_unsatisfiable_dependency_error.rb +1 -0
- data/test/rubygems/test_gem_uri_formatter.rb +1 -0
- data/test/rubygems/test_gem_util.rb +1 -0
- data/test/rubygems/test_gem_validator.rb +1 -0
- data/test/rubygems/test_gem_version.rb +1 -0
- data/test/rubygems/test_gem_version_option.rb +1 -0
- data/test/rubygems/test_kernel.rb +1 -0
- data/test/rubygems/test_require.rb +2 -1
- data/util/create_certs.rb +1 -0
- data/util/create_encrypted_key.rb +1 -0
- data/util/generate_spdx_license_list.rb +15 -0
- data/util/update_bundled_ca_certificates.rb +1 -1
- metadata +12 -28
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.gemtest +0 -0
- metadata.gz.sig +0 -2
data/lib/rubygems/exceptions.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# TODO: the documentation in here is terrible.
|
2
3
|
#
|
3
4
|
# Each exception needs a brief description and the scenarios where it is
|
@@ -137,7 +138,7 @@ class Gem::ImpossibleDependenciesError < Gem::Exception
|
|
137
138
|
requester = requester ? requester.spec.full_name : 'The user'
|
138
139
|
dependency = @request.dependency
|
139
140
|
|
140
|
-
message = "#{requester} requires #{dependency} but it conflicted:\n"
|
141
|
+
message = "#{requester} requires #{dependency} but it conflicted:\n".dup
|
141
142
|
|
142
143
|
@conflicts.each do |_, conflict|
|
143
144
|
message << conflict.explanation
|
@@ -267,4 +268,3 @@ end
|
|
267
268
|
# Backwards compatible typo'd exception class for early RubyGems 2.0.x
|
268
269
|
|
269
270
|
Gem::UnsatisfiableDepedencyError = Gem::UnsatisfiableDependencyError # :nodoc:
|
270
|
-
|
data/lib/rubygems/ext.rb
CHANGED
data/lib/rubygems/ext/builder.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
#--
|
2
3
|
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
|
3
4
|
# All rights reserved.
|
@@ -11,9 +12,20 @@ class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder
|
|
11
12
|
FileEntry = FileUtils::Entry_ # :nodoc:
|
12
13
|
|
13
14
|
def self.build(extension, directory, dest_path, results, args=[], lib_dir=nil)
|
14
|
-
|
15
|
-
|
16
|
-
|
15
|
+
tmp_dest = Dir.mktmpdir(".gem.", ".")
|
16
|
+
|
17
|
+
# Some versions of `mktmpdir` return absolute paths, which will break make
|
18
|
+
# if the paths contain spaces. However, on Ruby 1.9.x on Windows, relative
|
19
|
+
# paths cause all C extension builds to fail.
|
20
|
+
#
|
21
|
+
# As such, we convert to a relative path unless we are using Ruby 1.9.x on
|
22
|
+
# Windows. This means that when using Ruby 1.9.x on Windows, paths with
|
23
|
+
# spaces do not work.
|
24
|
+
#
|
25
|
+
# Details: https://github.com/rubygems/rubygems/issues/977#issuecomment-171544940
|
26
|
+
#
|
27
|
+
# TODO: Make this unconditional when rubygems no longer supports Ruby 1.9.x.
|
28
|
+
tmp_dest = get_relative_path(tmp_dest) unless Gem.win_platform? && RUBY_VERSION <= '2.0'
|
17
29
|
|
18
30
|
t = nil
|
19
31
|
Tempfile.open %w"siteconf .rb", "." do |siteconf|
|
@@ -80,4 +92,3 @@ class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder
|
|
80
92
|
end
|
81
93
|
|
82
94
|
end
|
83
|
-
|
data/lib/rubygems/gem_runner.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require 'rubygems/remote_fetcher'
|
2
3
|
|
3
4
|
##
|
@@ -68,9 +69,14 @@ module Gem::GemcutterUtilities
|
|
68
69
|
terminate_interaction 1 # TODO: question this
|
69
70
|
end
|
70
71
|
|
71
|
-
if allowed_push_host
|
72
|
-
|
73
|
-
|
72
|
+
if allowed_push_host
|
73
|
+
allowed_host_uri = URI.parse(allowed_push_host)
|
74
|
+
host_uri = URI.parse(self.host)
|
75
|
+
|
76
|
+
unless (host_uri.scheme == allowed_host_uri.scheme) && (host_uri.host == allowed_host_uri.host)
|
77
|
+
alert_error "#{self.host.inspect} is not allowed by the gemspec, which only allows #{allowed_push_host.inspect}"
|
78
|
+
terminate_interaction 1
|
79
|
+
end
|
74
80
|
end
|
75
81
|
|
76
82
|
uri = URI.parse "#{self.host}/#{path}"
|
data/lib/rubygems/indexer.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
#--
|
2
3
|
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
|
3
4
|
# All rights reserved.
|
@@ -173,6 +174,11 @@ module Gem::InstallUpdateOptions
|
|
173
174
|
"meet version requirements") do |value, options|
|
174
175
|
options[:minimal_deps] = true
|
175
176
|
end
|
177
|
+
|
178
|
+
add_option(:"Install/Update", "--[no-]post-install-message",
|
179
|
+
"Print post install message") do |value, options|
|
180
|
+
options[:post_install_message] = value
|
181
|
+
end
|
176
182
|
end
|
177
183
|
|
178
184
|
##
|
data/lib/rubygems/installer.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
#--
|
2
3
|
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
|
3
4
|
# All rights reserved.
|
@@ -212,7 +213,13 @@ class Gem::Installer
|
|
212
213
|
next unless io.gets =~ /This file was generated by RubyGems/
|
213
214
|
|
214
215
|
ruby_executable = true
|
215
|
-
existing = io.read.slice(
|
216
|
+
existing = io.read.slice(%r{
|
217
|
+
^(
|
218
|
+
gem \s |
|
219
|
+
load \s Gem\.bin_path\(
|
220
|
+
)
|
221
|
+
(['"])(.*?)(\2),
|
222
|
+
}x, 3)
|
216
223
|
end
|
217
224
|
|
218
225
|
return if spec.name == existing
|
@@ -220,7 +227,7 @@ class Gem::Installer
|
|
220
227
|
# somebody has written to RubyGems' directory, overwrite, too bad
|
221
228
|
return if Gem.default_bindir != @bin_dir and not ruby_executable
|
222
229
|
|
223
|
-
question = "#{spec.name}'s executable \"#{filename}\" conflicts with "
|
230
|
+
question = "#{spec.name}'s executable \"#{filename}\" conflicts with ".dup
|
224
231
|
|
225
232
|
if ruby_executable then
|
226
233
|
question << existing
|
@@ -296,7 +303,7 @@ class Gem::Installer
|
|
296
303
|
write_cache_file
|
297
304
|
end
|
298
305
|
|
299
|
-
say spec.post_install_message
|
306
|
+
say spec.post_install_message if options[:post_install_message] && !spec.post_install_message.nil?
|
300
307
|
|
301
308
|
Gem::Installer.install_lock.synchronize { Gem::Specification.reset }
|
302
309
|
|
@@ -626,7 +633,8 @@ class Gem::Installer
|
|
626
633
|
:bin_dir => nil,
|
627
634
|
:env_shebang => false,
|
628
635
|
:force => false,
|
629
|
-
:only_install_dir => false
|
636
|
+
:only_install_dir => false,
|
637
|
+
:post_install_message => true
|
630
638
|
}.merge options
|
631
639
|
|
632
640
|
@env_shebang = options[:env_shebang]
|
@@ -711,7 +719,6 @@ if ARGV.first
|
|
711
719
|
end
|
712
720
|
end
|
713
721
|
|
714
|
-
gem '#{spec.name}', version
|
715
722
|
load Gem.bin_path('#{spec.name}', '#{bin_file_name}', version)
|
716
723
|
TEXT
|
717
724
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
#--
|
2
3
|
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
|
3
4
|
# All rights reserved.
|
@@ -23,7 +24,7 @@ module Gem::LocalRemoteOptions
|
|
23
24
|
raise OptionParser::InvalidArgument, value
|
24
25
|
end
|
25
26
|
|
26
|
-
unless ['http', 'https', 'file'].include?(uri.scheme)
|
27
|
+
unless ['http', 'https', 'file', 's3'].include?(uri.scheme)
|
27
28
|
raise OptionParser::InvalidArgument, value
|
28
29
|
end
|
29
30
|
|
data/lib/rubygems/mock_gem_ui.rb
CHANGED
data/lib/rubygems/name_tuple.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
##
|
2
3
|
#
|
3
4
|
# Represents a gem of name +name+ at +version+ of +platform+. These
|
@@ -53,7 +54,7 @@ class Gem::NameTuple
|
|
53
54
|
"#{@name}-#{@version}"
|
54
55
|
else
|
55
56
|
"#{@name}-#{@version}-#{@platform}"
|
56
|
-
end.untaint
|
57
|
+
end.dup.untaint
|
57
58
|
end
|
58
59
|
|
59
60
|
##
|
data/lib/rubygems/package.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# -*- coding: utf-8 -*-
|
2
3
|
#--
|
3
4
|
# Copyright (C) 2004 Mauricio Julio Fernández Pradier
|
@@ -58,7 +59,7 @@ class Gem::Package
|
|
58
59
|
if source
|
59
60
|
@path = source.path
|
60
61
|
|
61
|
-
message
|
62
|
+
message = message + " in #{path}" if path
|
62
63
|
end
|
63
64
|
|
64
65
|
super message
|
@@ -382,7 +383,7 @@ EOM
|
|
382
383
|
FileUtils.chmod entry.header.mode, destination
|
383
384
|
end if entry.file?
|
384
385
|
|
385
|
-
File.symlink(
|
386
|
+
File.symlink(entry.header.linkname, destination) if entry.symlink?
|
386
387
|
|
387
388
|
verbose destination
|
388
389
|
end
|
data/lib/rubygems/package/old.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
#--
|
2
3
|
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
|
3
4
|
# All rights reserved.
|
@@ -63,7 +64,7 @@ class Gem::Package::Old < Gem::Package
|
|
63
64
|
|
64
65
|
destination = install_location full_name, destination_dir
|
65
66
|
|
66
|
-
file_data =
|
67
|
+
file_data = String.new
|
67
68
|
|
68
69
|
read_until_dashes io do |line|
|
69
70
|
file_data << line
|
@@ -94,7 +95,7 @@ class Gem::Package::Old < Gem::Package
|
|
94
95
|
# Reads the file list section from the old-format gem +io+
|
95
96
|
|
96
97
|
def file_list io # :nodoc:
|
97
|
-
header =
|
98
|
+
header = String.new
|
98
99
|
|
99
100
|
read_until_dashes io do |line|
|
100
101
|
header << line
|
@@ -134,7 +135,7 @@ class Gem::Package::Old < Gem::Package
|
|
134
135
|
|
135
136
|
return @spec if @spec
|
136
137
|
|
137
|
-
yaml =
|
138
|
+
yaml = String.new
|
138
139
|
|
139
140
|
@gem.with_read_io do |io|
|
140
141
|
skip_ruby io
|
@@ -175,4 +176,3 @@ class Gem::Package::Old < Gem::Package
|
|
175
176
|
end
|
176
177
|
|
177
178
|
end
|
178
|
-
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
##
|
2
3
|
#
|
3
4
|
# Gem::PathSupport facilitates the GEM_HOME and GEM_PATH environment settings
|
@@ -58,6 +59,9 @@ class Gem::PathSupport
|
|
58
59
|
gem_path = gpaths.dup
|
59
60
|
else
|
60
61
|
gem_path = gpaths.split(Gem.path_separator)
|
62
|
+
if gpaths.end_with?(Gem.path_separator)
|
63
|
+
gem_path += default_path
|
64
|
+
end
|
61
65
|
end
|
62
66
|
|
63
67
|
if File::ALT_SEPARATOR then
|
@@ -68,13 +72,19 @@ class Gem::PathSupport
|
|
68
72
|
|
69
73
|
gem_path << @home
|
70
74
|
else
|
71
|
-
gem_path =
|
72
|
-
|
73
|
-
if defined?(APPLE_GEM_HOME)
|
74
|
-
gem_path << APPLE_GEM_HOME
|
75
|
-
end
|
75
|
+
gem_path = default_path
|
76
76
|
end
|
77
77
|
|
78
78
|
@path = gem_path.uniq
|
79
79
|
end
|
80
|
+
|
81
|
+
# Return the default Gem path
|
82
|
+
def default_path
|
83
|
+
gem_path = Gem.default_path + [@home]
|
84
|
+
|
85
|
+
if defined?(APPLE_GEM_HOME)
|
86
|
+
gem_path << APPLE_GEM_HOME
|
87
|
+
end
|
88
|
+
gem_path
|
89
|
+
end
|
80
90
|
end
|
data/lib/rubygems/platform.rb
CHANGED
data/lib/rubygems/psych_tree.rb
CHANGED
data/lib/rubygems/rdoc.rb
CHANGED
data/lib/rubygems/request.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require 'net/http'
|
2
3
|
require 'thread'
|
3
4
|
require 'time'
|
@@ -155,7 +156,7 @@ class Gem::Request
|
|
155
156
|
if Net::HTTPOK === incomplete_response
|
156
157
|
reporter.fetch(file_name, incomplete_response.content_length)
|
157
158
|
downloaded = 0
|
158
|
-
data =
|
159
|
+
data = String.new
|
159
160
|
|
160
161
|
incomplete_response.read_body do |segment|
|
161
162
|
data << segment
|
@@ -222,7 +223,7 @@ class Gem::Request
|
|
222
223
|
end
|
223
224
|
|
224
225
|
def user_agent
|
225
|
-
ua = "RubyGems/#{Gem::VERSION} #{Gem::Platform.local}"
|
226
|
+
ua = "RubyGems/#{Gem::VERSION} #{Gem::Platform.local}".dup
|
226
227
|
|
227
228
|
ruby_version = RUBY_VERSION
|
228
229
|
ruby_version += 'dev' if RUBY_PATCHLEVEL == -1
|