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
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require 'rubygems/command'
|
2
3
|
require 'rubygems/package'
|
3
4
|
|
@@ -41,6 +42,10 @@ with gem spec:
|
|
41
42
|
def execute
|
42
43
|
gemspec = get_one_gem_name
|
43
44
|
|
45
|
+
unless File.exist? gemspec
|
46
|
+
gemspec += '.gemspec' if File.exist? gemspec + '.gemspec'
|
47
|
+
end
|
48
|
+
|
44
49
|
if File.exist? gemspec then
|
45
50
|
spec = Gem::Specification.load gemspec
|
46
51
|
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require 'rubygems/command'
|
2
3
|
require 'rubygems/local_remote_options'
|
3
4
|
require 'rubygems/version_option'
|
@@ -99,7 +100,7 @@ use with other commands.
|
|
99
100
|
end
|
100
101
|
|
101
102
|
def display_readable specs, reverse # :nodoc:
|
102
|
-
response =
|
103
|
+
response = String.new
|
103
104
|
|
104
105
|
specs.each do |spec|
|
105
106
|
response << print_dependencies(spec)
|
@@ -152,7 +153,7 @@ use with other commands.
|
|
152
153
|
end
|
153
154
|
|
154
155
|
def print_dependencies(spec, level = 0) # :nodoc:
|
155
|
-
response =
|
156
|
+
response = String.new
|
156
157
|
response << ' ' * level + "Gem #{spec.full_name}\n"
|
157
158
|
unless spec.dependencies.empty? then
|
158
159
|
spec.dependencies.sort_by { |dep| dep.name }.each do |dep|
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require 'rubygems/command'
|
2
3
|
|
3
4
|
class Gem::Commands::EnvironmentCommand < Gem::Command
|
@@ -71,7 +72,7 @@ lib/rubygems/defaults/operating_system.rb
|
|
71
72
|
end
|
72
73
|
|
73
74
|
def execute
|
74
|
-
out =
|
75
|
+
out = String.new
|
75
76
|
arg = options[:args][0]
|
76
77
|
out <<
|
77
78
|
case arg
|
@@ -103,7 +104,7 @@ lib/rubygems/defaults/operating_system.rb
|
|
103
104
|
end
|
104
105
|
|
105
106
|
def show_environment # :nodoc:
|
106
|
-
out = "RubyGems Environment:\n"
|
107
|
+
out = "RubyGems Environment:\n".dup
|
107
108
|
|
108
109
|
out << " - RUBYGEMS VERSION: #{Gem::VERSION}\n"
|
109
110
|
|
@@ -157,4 +158,3 @@ lib/rubygems/defaults/operating_system.rb
|
|
157
158
|
end
|
158
159
|
|
159
160
|
end
|
160
|
-
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require 'rubygems/command'
|
2
3
|
require 'rubygems/local_remote_options'
|
3
4
|
require 'rubygems/spec_fetcher'
|
@@ -49,6 +50,12 @@ class Gem::Commands::QueryCommand < Gem::Command
|
|
49
50
|
options[:all] = value
|
50
51
|
end
|
51
52
|
|
53
|
+
add_option('-e', '--exact',
|
54
|
+
'Name of gem(s) to query on matches the',
|
55
|
+
'provided STRING') do |value, options|
|
56
|
+
options[:exact] = value
|
57
|
+
end
|
58
|
+
|
52
59
|
add_option( '--[no-]prerelease',
|
53
60
|
'Display prerelease versions') do |value, options|
|
54
61
|
options[:prerelease] = value
|
@@ -78,7 +85,8 @@ is too hard to use.
|
|
78
85
|
elsif !options[:name].source.empty?
|
79
86
|
name = Array(options[:name])
|
80
87
|
else
|
81
|
-
|
88
|
+
args = options[:args].to_a
|
89
|
+
name = options[:exact] ? args : args.map{|arg| /#{arg}/i }
|
82
90
|
end
|
83
91
|
|
84
92
|
prerelease = options[:prerelease]
|
@@ -161,7 +169,7 @@ is too hard to use.
|
|
161
169
|
:latest
|
162
170
|
end
|
163
171
|
|
164
|
-
if name.source.empty?
|
172
|
+
if name.respond_to?(:source) && name.source.empty?
|
165
173
|
spec_tuples = fetcher.detect(type) { true }
|
166
174
|
else
|
167
175
|
spec_tuples = fetcher.detect(type) do |name_tuple|
|
@@ -276,7 +284,7 @@ is too hard to use.
|
|
276
284
|
end
|
277
285
|
|
278
286
|
def spec_authors entry, spec
|
279
|
-
authors = "Author#{spec.authors.length > 1 ? 's' : ''}: "
|
287
|
+
authors = "Author#{spec.authors.length > 1 ? 's' : ''}: ".dup
|
280
288
|
authors << spec.authors.join(', ')
|
281
289
|
entry << format_text(authors, 68, 4)
|
282
290
|
end
|
@@ -290,7 +298,7 @@ is too hard to use.
|
|
290
298
|
def spec_license entry, spec
|
291
299
|
return if spec.license.nil? or spec.license.empty?
|
292
300
|
|
293
|
-
licenses = "License#{spec.licenses.length > 1 ? 's' : ''}: "
|
301
|
+
licenses = "License#{spec.licenses.length > 1 ? 's' : ''}: ".dup
|
294
302
|
licenses << spec.licenses.join(', ')
|
295
303
|
entry << "\n" << format_text(licenses, 68, 4)
|
296
304
|
end
|
@@ -340,4 +348,3 @@ is too hard to use.
|
|
340
348
|
end
|
341
349
|
|
342
350
|
end
|
343
|
-
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require 'rubygems/command'
|
2
3
|
require 'rubygems/local_remote_options'
|
3
4
|
require 'rubygems/version_option'
|
@@ -31,7 +32,7 @@ as the reason for the removal request.
|
|
31
32
|
end
|
32
33
|
|
33
34
|
def usage # :nodoc:
|
34
|
-
"#{program_name} GEM -v VERSION [-p PLATFORM] [--
|
35
|
+
"#{program_name} GEM -v VERSION [-p PLATFORM] [--key KEY_NAME] [--host HOST]"
|
35
36
|
end
|
36
37
|
|
37
38
|
def initialize
|
@@ -40,25 +41,25 @@ as the reason for the removal request.
|
|
40
41
|
add_version_option("remove")
|
41
42
|
add_platform_option("remove")
|
42
43
|
|
43
|
-
add_option('--
|
44
|
-
|
44
|
+
add_option('--host HOST',
|
45
|
+
'Yank from another gemcutter-compatible host') do |value, options|
|
46
|
+
options[:host] = value
|
45
47
|
end
|
46
48
|
|
47
49
|
add_key_option
|
50
|
+
@host = nil
|
48
51
|
end
|
49
52
|
|
50
53
|
def execute
|
51
|
-
|
54
|
+
@host = options[:host]
|
55
|
+
|
56
|
+
sign_in @host
|
52
57
|
|
53
58
|
version = get_version_from_requirements(options[:version])
|
54
59
|
platform = get_platform_from_requirements(options)
|
55
60
|
|
56
61
|
if version then
|
57
|
-
|
58
|
-
unyank_gem(version, platform)
|
59
|
-
else
|
60
|
-
yank_gem(version, platform)
|
61
|
-
end
|
62
|
+
yank_gem(version, platform)
|
62
63
|
else
|
63
64
|
say "A version argument is required: #{usage}"
|
64
65
|
terminate_interaction
|
@@ -70,16 +71,11 @@ as the reason for the removal request.
|
|
70
71
|
yank_api_request(:delete, version, platform, "api/v1/gems/yank")
|
71
72
|
end
|
72
73
|
|
73
|
-
def unyank_gem(version, platform)
|
74
|
-
say "Unyanking gem from #{host}..."
|
75
|
-
yank_api_request(:put, version, platform, "api/v1/gems/unyank")
|
76
|
-
end
|
77
|
-
|
78
74
|
private
|
79
75
|
|
80
76
|
def yank_api_request(method, version, platform, api)
|
81
77
|
name = get_one_gem_name
|
82
|
-
response = rubygems_api_request(method, api) do |request|
|
78
|
+
response = rubygems_api_request(method, api, host) do |request|
|
83
79
|
request.add_field("Authorization", api_key)
|
84
80
|
|
85
81
|
data = {
|
data/lib/rubygems/config_file.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.
|
@@ -200,11 +201,12 @@ class Gem::ConfigFile
|
|
200
201
|
result.merge load_file file
|
201
202
|
end
|
202
203
|
|
203
|
-
|
204
204
|
@hash = operating_system_config.merge platform_config
|
205
|
-
|
206
|
-
|
207
|
-
|
205
|
+
unless arg_list.index '--norc'
|
206
|
+
@hash = @hash.merge system_config
|
207
|
+
@hash = @hash.merge user_config
|
208
|
+
@hash = @hash.merge environment_config
|
209
|
+
end
|
208
210
|
|
209
211
|
# HACK these override command-line args, which is bad
|
210
212
|
@backtrace = @hash[:backtrace] if @hash.key? :backtrace
|
data/lib/rubygems/defaults.rb
CHANGED
data/lib/rubygems/dependency.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
##
|
2
3
|
# The Dependency class holds a Gem name and a Gem::Requirement.
|
3
4
|
|
@@ -306,9 +307,9 @@ class Gem::Dependency
|
|
306
307
|
|
307
308
|
if specs.empty?
|
308
309
|
total = Gem::Specification.to_a.size
|
309
|
-
msg = "Could not find '#{name}' (#{requirement}) among #{total} total gem(s)\n"
|
310
|
+
msg = "Could not find '#{name}' (#{requirement}) among #{total} total gem(s)\n".dup
|
310
311
|
else
|
311
|
-
msg = "Could not find '#{name}' (#{requirement}) - did find: [#{specs.join ','}]\n"
|
312
|
+
msg = "Could not find '#{name}' (#{requirement}) - did find: [#{specs.join ','}]\n".dup
|
312
313
|
end
|
313
314
|
msg << "Checked in 'GEM_PATH=#{Gem.path.join(File::PATH_SEPARATOR)}', execute `gem env` for more information"
|
314
315
|
|
data/lib/rubygems/deprecate.rb
CHANGED
data/lib/rubygems/doctor.rb
CHANGED
data/lib/rubygems/errors.rb
CHANGED