rubygems-update 3.1.4 → 3.2.0.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CODE_OF_CONDUCT.md +55 -19
- data/CONTRIBUTING.md +1 -2
- data/History.txt +130 -5
- data/Manifest.txt +10 -23
- data/POLICIES.md +2 -9
- data/README.md +1 -1
- data/Rakefile +30 -32
- data/bin/update_rubygems +1 -1
- data/bundler/CHANGELOG.md +806 -741
- data/bundler/README.md +6 -8
- data/bundler/UPGRADING.md +16 -30
- data/bundler/bundler.gemspec +3 -3
- data/bundler/exe/bundle +3 -0
- data/bundler/lib/bundler.rb +15 -4
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli.rb +32 -11
- data/bundler/lib/bundler/cli/console.rb +1 -1
- data/bundler/lib/bundler/cli/gem.rb +83 -10
- data/bundler/lib/bundler/cli/info.rb +13 -3
- data/bundler/lib/bundler/cli/init.rb +1 -1
- data/bundler/lib/bundler/cli/install.rb +5 -14
- data/bundler/lib/bundler/cli/issue.rb +2 -2
- data/bundler/lib/bundler/cli/list.rb +11 -9
- data/bundler/lib/bundler/cli/outdated.rb +88 -65
- data/bundler/lib/bundler/cli/plugin.rb +10 -0
- data/bundler/lib/bundler/cli/pristine.rb +5 -0
- data/bundler/lib/bundler/definition.rb +32 -32
- data/bundler/lib/bundler/dependency.rb +0 -9
- data/bundler/lib/bundler/dsl.rb +1 -5
- data/bundler/lib/bundler/environment_preserver.rb +26 -2
- data/bundler/lib/bundler/errors.rb +1 -0
- data/bundler/lib/bundler/feature_flag.rb +0 -2
- data/bundler/lib/bundler/fetcher.rb +1 -0
- data/bundler/lib/bundler/friendly_errors.rb +4 -10
- data/bundler/lib/bundler/gem_helper.rb +17 -10
- data/bundler/lib/bundler/gem_version_promoter.rb +1 -1
- data/bundler/lib/bundler/injector.rb +14 -3
- data/bundler/lib/bundler/inline.rb +1 -1
- data/bundler/lib/bundler/installer.rb +29 -28
- data/bundler/lib/bundler/installer/gem_installer.rb +2 -2
- data/bundler/lib/bundler/installer/parallel_installer.rb +9 -9
- data/bundler/lib/bundler/lazy_specification.rb +16 -3
- data/bundler/lib/bundler/plugin.rb +26 -0
- data/bundler/lib/bundler/plugin/index.rb +9 -0
- data/bundler/lib/bundler/psyched_yaml.rb +0 -15
- data/bundler/lib/bundler/remote_specification.rb +4 -1
- data/bundler/lib/bundler/resolver.rb +31 -8
- data/bundler/lib/bundler/resolver/spec_group.rb +26 -5
- data/bundler/lib/bundler/rubygems_ext.rb +7 -8
- data/bundler/lib/bundler/rubygems_gem_installer.rb +1 -7
- data/bundler/lib/bundler/rubygems_integration.rb +3 -48
- data/bundler/lib/bundler/runtime.rb +2 -12
- data/bundler/lib/bundler/settings.rb +0 -3
- data/bundler/lib/bundler/shared_helpers.rb +1 -1
- data/bundler/lib/bundler/source/git.rb +4 -4
- data/bundler/lib/bundler/source/git/git_proxy.rb +53 -58
- data/bundler/lib/bundler/source/path.rb +5 -1
- data/bundler/lib/bundler/source/path/installer.rb +7 -9
- data/bundler/lib/bundler/source/rubygems.rb +11 -14
- data/bundler/lib/bundler/stub_specification.rb +16 -4
- data/bundler/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +57 -47
- data/bundler/lib/bundler/templates/newgem/Gemfile.tt +9 -1
- data/bundler/lib/bundler/templates/newgem/Rakefile.tt +19 -5
- data/bundler/lib/bundler/templates/newgem/bin/console.tt +2 -0
- data/bundler/lib/bundler/templates/newgem/circleci/config.yml.tt +13 -0
- data/bundler/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt +2 -0
- data/bundler/lib/bundler/templates/newgem/github/workflows/main.yml.tt +18 -0
- data/bundler/lib/bundler/templates/newgem/gitlab-ci.yml.tt +9 -0
- data/bundler/lib/bundler/templates/newgem/lib/newgem.rb.tt +2 -0
- data/bundler/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +2 -0
- data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +6 -4
- data/bundler/lib/bundler/templates/newgem/rubocop.yml.tt +10 -0
- data/bundler/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +2 -0
- data/bundler/lib/bundler/templates/newgem/spec/spec_helper.rb.tt +2 -0
- data/bundler/lib/bundler/templates/newgem/test/{newgem_test.rb.tt → minitest/newgem_test.rb.tt} +2 -0
- data/bundler/lib/bundler/templates/newgem/test/{test_helper.rb.tt → minitest/test_helper.rb.tt} +2 -0
- data/bundler/lib/bundler/templates/newgem/test/test-unit/newgem_test.rb.tt +15 -0
- data/bundler/lib/bundler/templates/newgem/test/test-unit/test_helper.rb.tt +6 -0
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +75 -189
- data/bundler/lib/bundler/vendor/thor/lib/thor.rb +0 -7
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb +2 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/base.rb +9 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
- data/bundler/lib/bundler/version.rb +1 -1
- data/bundler/man/bundle-add.1 +1 -1
- data/bundler/man/bundle-add.1.txt +15 -15
- data/bundler/man/bundle-binstubs.1 +1 -1
- data/bundler/man/bundle-binstubs.1.txt +10 -10
- data/bundler/man/bundle-cache.1 +1 -1
- data/bundler/man/bundle-cache.1.txt +15 -15
- data/bundler/man/bundle-check.1 +1 -1
- data/bundler/man/bundle-check.1.txt +8 -8
- data/bundler/man/bundle-clean.1 +1 -1
- data/bundler/man/bundle-clean.1.txt +6 -6
- data/bundler/man/bundle-config.1 +3 -9
- data/bundler/man/bundle-config.1.txt +271 -272
- data/bundler/man/bundle-config.ronn +5 -9
- data/bundler/man/bundle-doctor.1 +1 -1
- data/bundler/man/bundle-doctor.1.txt +9 -9
- data/bundler/man/bundle-exec.1 +1 -1
- data/bundler/man/bundle-exec.1.txt +84 -81
- data/bundler/man/bundle-gem.1 +25 -3
- data/bundler/man/bundle-gem.1.txt +65 -39
- data/bundler/man/bundle-gem.ronn +30 -7
- data/bundler/man/bundle-info.1 +1 -1
- data/bundler/man/bundle-info.1.txt +2 -2
- data/bundler/man/bundle-init.1 +1 -1
- data/bundler/man/bundle-init.1.txt +9 -9
- data/bundler/man/bundle-inject.1 +1 -1
- data/bundler/man/bundle-inject.1.txt +4 -4
- data/bundler/man/bundle-install.1 +1 -1
- data/bundler/man/bundle-install.1.txt +169 -169
- data/bundler/man/bundle-list.1 +7 -7
- data/bundler/man/bundle-list.1.txt +12 -11
- data/bundler/man/bundle-list.ronn +6 -6
- data/bundler/man/bundle-lock.1 +1 -1
- data/bundler/man/bundle-lock.1.txt +28 -28
- data/bundler/man/bundle-open.1 +1 -1
- data/bundler/man/bundle-open.1.txt +3 -3
- data/bundler/man/bundle-outdated.1 +1 -1
- data/bundler/man/bundle-outdated.1.txt +34 -34
- data/bundler/man/bundle-platform.1 +1 -1
- data/bundler/man/bundle-platform.1.txt +16 -16
- data/bundler/man/bundle-pristine.1 +1 -1
- data/bundler/man/bundle-pristine.1.txt +8 -8
- data/bundler/man/bundle-remove.1 +1 -1
- data/bundler/man/bundle-remove.1.txt +9 -9
- data/bundler/man/bundle-show.1 +1 -1
- data/bundler/man/bundle-show.1.txt +8 -8
- data/bundler/man/bundle-update.1 +1 -1
- data/bundler/man/bundle-update.1.txt +149 -148
- data/bundler/man/bundle-viz.1 +1 -1
- data/bundler/man/bundle-viz.1.txt +11 -11
- data/bundler/man/bundle.1 +1 -1
- data/bundler/man/bundle.1.txt +31 -31
- data/bundler/man/gemfile.5 +1 -1
- data/bundler/man/gemfile.5.txt +218 -216
- data/lib/rubygems.rb +80 -157
- data/lib/rubygems/available_set.rb +4 -4
- data/lib/rubygems/basic_specification.rb +11 -5
- data/lib/rubygems/bundler_version_finder.rb +14 -9
- data/lib/rubygems/command.rb +16 -14
- data/lib/rubygems/command_manager.rb +4 -3
- data/lib/rubygems/commands/cert_command.rb +1 -1
- data/lib/rubygems/commands/cleanup_command.rb +3 -3
- data/lib/rubygems/commands/contents_command.rb +4 -4
- data/lib/rubygems/commands/dependency_command.rb +6 -6
- data/lib/rubygems/commands/fetch_command.rb +2 -2
- data/lib/rubygems/commands/help_command.rb +1 -1
- data/lib/rubygems/commands/info_command.rb +9 -4
- data/lib/rubygems/commands/install_command.rb +3 -3
- data/lib/rubygems/commands/list_command.rb +9 -6
- data/lib/rubygems/commands/lock_command.rb +1 -1
- data/lib/rubygems/commands/open_command.rb +0 -2
- data/lib/rubygems/commands/pristine_command.rb +10 -2
- data/lib/rubygems/commands/push_command.rb +4 -42
- data/lib/rubygems/commands/query_command.rb +7 -352
- data/lib/rubygems/commands/search_command.rb +8 -6
- data/lib/rubygems/commands/setup_command.rb +128 -32
- data/lib/rubygems/commands/specification_command.rb +2 -2
- data/lib/rubygems/commands/stale_command.rb +1 -1
- data/lib/rubygems/commands/uninstall_command.rb +1 -1
- data/lib/rubygems/commands/unpack_command.rb +1 -1
- data/lib/rubygems/commands/update_command.rb +40 -10
- data/lib/rubygems/config_file.rb +11 -2
- data/lib/rubygems/core_ext/kernel_require.rb +26 -36
- data/lib/rubygems/defaults.rb +99 -5
- data/lib/rubygems/dependency.rb +2 -5
- data/lib/rubygems/dependency_installer.rb +1 -73
- data/lib/rubygems/dependency_list.rb +7 -7
- data/lib/rubygems/deprecate.rb +46 -1
- data/lib/rubygems/doctor.rb +4 -2
- data/lib/rubygems/errors.rb +3 -2
- data/lib/rubygems/exceptions.rb +2 -13
- data/lib/rubygems/ext.rb +6 -6
- data/lib/rubygems/ext/build_error.rb +2 -0
- data/lib/rubygems/ext/builder.rb +1 -1
- data/lib/rubygems/ext/cmake_builder.rb +1 -1
- data/lib/rubygems/ext/ext_conf_builder.rb +6 -7
- data/lib/rubygems/gem_runner.rb +3 -8
- data/lib/rubygems/gemcutter_utilities.rb +1 -1
- data/lib/rubygems/indexer.rb +1 -19
- data/lib/rubygems/install_update_options.rb +5 -5
- data/lib/rubygems/installer.rb +45 -42
- data/lib/rubygems/installer_test_case.rb +19 -2
- data/lib/rubygems/installer_uninstaller_utils.rb +24 -0
- data/lib/rubygems/local_remote_options.rb +1 -1
- data/lib/rubygems/name_tuple.rb +2 -4
- data/lib/rubygems/package.rb +8 -13
- data/lib/rubygems/package/old.rb +1 -1
- data/lib/rubygems/package/tar_header.rb +3 -3
- data/lib/rubygems/package/tar_reader.rb +0 -1
- data/lib/rubygems/package/tar_reader/entry.rb +0 -1
- data/lib/rubygems/package/tar_test_case.rb +1 -1
- data/lib/rubygems/package/tar_writer.rb +2 -6
- data/lib/rubygems/package_task.rb +1 -5
- data/lib/rubygems/path_support.rb +1 -1
- data/lib/rubygems/platform.rb +3 -3
- data/lib/rubygems/query_utils.rb +362 -0
- data/lib/rubygems/rdoc.rb +0 -12
- data/lib/rubygems/remote_fetcher.rb +5 -19
- data/lib/rubygems/request/connection_pools.rb +1 -1
- data/lib/rubygems/request_set.rb +5 -5
- data/lib/rubygems/request_set/gem_dependency_api.rb +1 -1
- data/lib/rubygems/request_set/lockfile.rb +8 -8
- data/lib/rubygems/request_set/lockfile/tokenizer.rb +1 -1
- data/lib/rubygems/requirement.rb +14 -15
- data/lib/rubygems/resolver.rb +7 -8
- data/lib/rubygems/resolver/api_set.rb +3 -3
- data/lib/rubygems/resolver/composed_set.rb +3 -3
- data/lib/rubygems/resolver/conflict.rb +1 -1
- data/lib/rubygems/resolver/index_set.rb +1 -1
- data/lib/rubygems/resolver/installer_set.rb +3 -3
- data/lib/rubygems/resolver/lock_set.rb +1 -1
- data/lib/rubygems/safe_yaml.rb +4 -4
- data/lib/rubygems/security.rb +25 -25
- data/lib/rubygems/security/policy.rb +3 -3
- data/lib/rubygems/security/signer.rb +4 -4
- data/lib/rubygems/security/trust_dir.rb +1 -1
- data/lib/rubygems/server.rb +8 -8
- data/lib/rubygems/source/git.rb +7 -6
- data/lib/rubygems/source/local.rb +2 -2
- data/lib/rubygems/source_list.rb +4 -5
- data/lib/rubygems/spec_fetcher.rb +18 -15
- data/lib/rubygems/specification.rb +79 -104
- data/lib/rubygems/specification_policy.rb +79 -27
- data/lib/rubygems/test_case.rb +64 -83
- data/lib/rubygems/test_utilities.rb +6 -6
- data/lib/rubygems/uninstaller.rb +35 -14
- data/lib/rubygems/user_interaction.rb +1 -10
- data/lib/rubygems/util.rb +10 -2
- data/lib/rubygems/util/licenses.rb +4 -4
- data/lib/rubygems/validator.rb +1 -1
- data/lib/rubygems/version.rb +4 -4
- data/rubygems-update.gemspec +2 -2
- data/setup.rb +2 -7
- data/test/rubygems/specifications/bar-0.0.2.gemspec +0 -2
- data/test/rubygems/specifications/rubyforge-0.0.1.gemspec +0 -2
- data/test/rubygems/test_bundled_ca.rb +1 -5
- data/test/rubygems/test_deprecate.rb +43 -4
- data/test/rubygems/test_gem.rb +79 -74
- data/test/rubygems/test_gem_available_set.rb +3 -3
- data/test/rubygems/test_gem_bundler_version_finder.rb +19 -1
- data/test/rubygems/test_gem_command.rb +24 -3
- data/test/rubygems/test_gem_command_manager.rb +37 -4
- data/test/rubygems/test_gem_commands_build_command.rb +7 -2
- data/test/rubygems/test_gem_commands_cert_command.rb +2 -2
- data/test/rubygems/test_gem_commands_cleanup_command.rb +1 -1
- data/test/rubygems/test_gem_commands_contents_command.rb +48 -15
- data/test/rubygems/test_gem_commands_environment_command.rb +21 -21
- data/test/rubygems/test_gem_commands_generate_index_command.rb +1 -5
- data/test/rubygems/test_gem_commands_info_command.rb +6 -6
- data/test/rubygems/test_gem_commands_install_command.rb +31 -31
- data/test/rubygems/test_gem_commands_mirror.rb +1 -1
- data/test/rubygems/test_gem_commands_open_command.rb +4 -4
- data/test/rubygems/test_gem_commands_owner_command.rb +11 -3
- data/test/rubygems/test_gem_commands_pristine_command.rb +41 -8
- data/test/rubygems/test_gem_commands_push_command.rb +7 -2
- data/test/rubygems/test_gem_commands_query_command.rb +9 -5
- data/test/rubygems/test_gem_commands_setup_command.rb +160 -108
- data/test/rubygems/test_gem_commands_signin_command.rb +6 -4
- data/test/rubygems/test_gem_commands_signout_command.rb +0 -5
- data/test/rubygems/test_gem_commands_specification_command.rb +18 -18
- data/test/rubygems/test_gem_commands_uninstall_command.rb +1 -1
- data/test/rubygems/test_gem_commands_update_command.rb +68 -5
- data/test/rubygems/test_gem_commands_which_command.rb +3 -3
- data/test/rubygems/test_gem_commands_yank_command.rb +14 -6
- data/test/rubygems/test_gem_config_file.rb +7 -10
- data/test/rubygems/test_gem_dependency_installer.rb +52 -189
- data/test/rubygems/test_gem_dependency_list.rb +8 -8
- data/test/rubygems/test_gem_dependency_resolution_error.rb +1 -1
- data/test/rubygems/test_gem_doctor.rb +28 -0
- data/test/rubygems/test_gem_ext_builder.rb +14 -25
- data/test/rubygems/test_gem_ext_cmake_builder.rb +13 -12
- data/test/rubygems/test_gem_ext_configure_builder.rb +1 -9
- data/test/rubygems/test_gem_ext_ext_conf_builder.rb +0 -1
- data/test/rubygems/test_gem_ext_rake_builder.rb +9 -9
- data/test/rubygems/test_gem_gem_runner.rb +42 -0
- data/test/rubygems/test_gem_gemcutter_utilities.rb +5 -0
- data/test/rubygems/test_gem_indexer.rb +9 -13
- data/test/rubygems/test_gem_installer.rb +149 -45
- data/test/rubygems/test_gem_package.rb +13 -12
- data/test/rubygems/test_gem_package_tar_header.rb +19 -0
- data/test/rubygems/test_gem_package_tar_writer.rb +3 -3
- data/test/rubygems/test_gem_package_task.rb +46 -11
- data/test/rubygems/test_gem_remote_fetcher.rb +152 -190
- data/test/rubygems/test_gem_request.rb +11 -11
- data/test/rubygems/test_gem_request_set.rb +20 -20
- data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +3 -3
- data/test/rubygems/test_gem_request_set_lockfile_parser.rb +9 -9
- data/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb +118 -118
- data/test/rubygems/test_gem_requirement.rb +2 -2
- data/test/rubygems/test_gem_resolver.rb +6 -6
- data/test/rubygems/test_gem_resolver_api_set.rb +3 -3
- data/test/rubygems/test_gem_resolver_best_set.rb +2 -2
- data/test/rubygems/test_gem_resolver_index_set.rb +2 -2
- data/test/rubygems/test_gem_resolver_installer_set.rb +7 -7
- data/test/rubygems/test_gem_resolver_lock_set.rb +3 -3
- data/test/rubygems/test_gem_security.rb +20 -20
- data/test/rubygems/test_gem_security_policy.rb +5 -8
- data/test/rubygems/test_gem_security_signer.rb +8 -8
- data/test/rubygems/test_gem_security_trust_dir.rb +2 -2
- data/test/rubygems/test_gem_server.rb +10 -10
- data/test/rubygems/test_gem_source.rb +12 -14
- data/test/rubygems/test_gem_source_git.rb +12 -11
- data/test/rubygems/test_gem_source_installed.rb +7 -7
- data/test/rubygems/test_gem_source_local.rb +8 -8
- data/test/rubygems/test_gem_source_lock.rb +10 -10
- data/test/rubygems/test_gem_source_specific_file.rb +7 -7
- data/test/rubygems/test_gem_source_vendor.rb +7 -7
- data/test/rubygems/test_gem_spec_fetcher.rb +11 -2
- data/test/rubygems/test_gem_specification.rb +143 -113
- data/test/rubygems/test_gem_stream_ui.rb +3 -1
- data/test/rubygems/test_gem_text.rb +1 -1
- data/test/rubygems/test_gem_uninstaller.rb +134 -10
- data/test/rubygems/test_gem_util.rb +7 -5
- data/test/rubygems/test_gem_version.rb +1 -1
- data/test/rubygems/test_kernel.rb +25 -8
- data/test/rubygems/test_project_sanity.rb +8 -1
- data/test/rubygems/test_require.rb +242 -40
- metadata +29 -43
- data/.bundle/config +0 -2
- data/.rubocop.yml +0 -91
- data/Gemfile +0 -8
- data/Gemfile.lock +0 -43
- data/bundler/CODE_OF_CONDUCT.md +0 -136
- data/lib/rubygems/source_local.rb +0 -7
- data/lib/rubygems/source_specific_file.rb +0 -6
- data/lib/ubygems.rb +0 -14
- data/tmp/.keep +0 -0
- data/util/CL2notes +0 -55
- data/util/bisect +0 -10
- data/util/ci.sh +0 -62
- data/util/cops/deprecations.rb +0 -52
- data/util/create_certs.rb +0 -171
- data/util/create_certs.sh +0 -27
- data/util/create_encrypted_key.rb +0 -16
- data/util/generate_spdx_license_list.rb +0 -63
- data/util/patch_with_prs.rb +0 -77
- data/util/rubocop +0 -8
- data/util/update_bundled_ca_certificates.rb +0 -139
- data/util/update_changelog.rb +0 -64
@@ -37,12 +37,12 @@ class TestGemAvailableSet < Gem::TestCase
|
|
37
37
|
|
38
38
|
dep = Gem::Resolver::DependencyRequest.new dep('a'), nil
|
39
39
|
|
40
|
-
assert_equal %w[a-1], set.find_all(dep).map {
|
40
|
+
assert_equal %w[a-1], set.find_all(dep).map {|spec| spec.full_name }
|
41
41
|
|
42
42
|
dep = Gem::Resolver::DependencyRequest.new dep('a', '>= 0.a'), nil
|
43
43
|
|
44
44
|
assert_equal %w[a-1 a-1.a],
|
45
|
-
set.find_all(dep).map {
|
45
|
+
set.find_all(dep).map {|spec| spec.full_name }.sort
|
46
46
|
end
|
47
47
|
|
48
48
|
def test_match_platform
|
@@ -123,7 +123,7 @@ class TestGemAvailableSet < Gem::TestCase
|
|
123
123
|
set.add a2a, @source
|
124
124
|
set.add a2, @source
|
125
125
|
|
126
|
-
g = set.sorted.map {
|
126
|
+
g = set.sorted.map {|t| t.spec }
|
127
127
|
|
128
128
|
assert_equal [a3a, a2, a2a, a1, a1a], g
|
129
129
|
end
|
@@ -78,6 +78,24 @@ class TestGemBundlerVersionFinder < Gem::TestCase
|
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
81
|
+
def test_deleted_directory
|
82
|
+
skip "Cannot perform this test on windows" if win_platform?
|
83
|
+
skip "Cannot perform this test on Solaris" if /solaris/ =~ RUBY_PLATFORM
|
84
|
+
require "tmpdir"
|
85
|
+
|
86
|
+
orig_dir = Dir.pwd
|
87
|
+
|
88
|
+
begin
|
89
|
+
Dir.mktmpdir("some_dir") do |dir|
|
90
|
+
Dir.chdir(dir)
|
91
|
+
end
|
92
|
+
ensure
|
93
|
+
Dir.chdir(orig_dir)
|
94
|
+
end
|
95
|
+
|
96
|
+
assert_nil bvf.bundler_version_with_reason
|
97
|
+
end
|
98
|
+
|
81
99
|
def test_compatible
|
82
100
|
assert bvf.compatible?(util_spec("foo"))
|
83
101
|
assert bvf.compatible?(util_spec("bundler", 1.1))
|
@@ -102,7 +120,7 @@ class TestGemBundlerVersionFinder < Gem::TestCase
|
|
102
120
|
|
103
121
|
def test_filter
|
104
122
|
versions = %w[1 1.0 1.0.1.1 2 2.a 2.0 2.1.1 3 3.a 3.0 3.1.1]
|
105
|
-
specs = versions.map {
|
123
|
+
specs = versions.map {|v| util_spec("bundler", v) }
|
106
124
|
|
107
125
|
assert_equal %w[1 1.0 1.0.1.1 2 2.a 2.0 2.1.1 3 3.a 3.0 3.1.1], util_filter_specs(specs).map(&:version).map(&:to_s)
|
108
126
|
|
@@ -34,7 +34,7 @@ class TestGemCommand < Gem::TestCase
|
|
34
34
|
|
35
35
|
def test_self_add_specific_extra_args
|
36
36
|
added_args = %w[--all]
|
37
|
-
@cmd.add_option('--all') {
|
37
|
+
@cmd.add_option('--all') {|v,o| }
|
38
38
|
|
39
39
|
Gem::Command.add_specific_extra_args @cmd_name, added_args
|
40
40
|
|
@@ -57,6 +57,27 @@ class TestGemCommand < Gem::TestCase
|
|
57
57
|
assert_equal [], h
|
58
58
|
end
|
59
59
|
|
60
|
+
def test_self_extra_args
|
61
|
+
verbose, $VERBOSE, separator = $VERBOSE, nil, $;
|
62
|
+
extra_args = Gem::Command.extra_args
|
63
|
+
|
64
|
+
Gem::Command.extra_args = %w[--all]
|
65
|
+
assert_equal %w[--all], Gem::Command.extra_args
|
66
|
+
|
67
|
+
Gem::Command.extra_args = "--file --help"
|
68
|
+
assert_equal %w[--file --help], Gem::Command.extra_args
|
69
|
+
|
70
|
+
$; = "="
|
71
|
+
|
72
|
+
Gem::Command.extra_args = "--awesome=true --verbose"
|
73
|
+
assert_equal %w[--awesome=true --verbose], Gem::Command.extra_args
|
74
|
+
|
75
|
+
ensure
|
76
|
+
Gem::Command.extra_args = extra_args
|
77
|
+
$; = separator
|
78
|
+
$VERBOSE = verbose
|
79
|
+
end
|
80
|
+
|
60
81
|
def test_basic_accessors
|
61
82
|
assert_equal "doit", @cmd.command
|
62
83
|
assert_equal "gem doit", @cmd.program_name
|
@@ -82,7 +103,7 @@ class TestGemCommand < Gem::TestCase
|
|
82
103
|
@cmd.invoke
|
83
104
|
end
|
84
105
|
|
85
|
-
assert_match %r
|
106
|
+
assert_match %r{Usage: gem doit}, @ui.output
|
86
107
|
end
|
87
108
|
|
88
109
|
def test_invoke
|
@@ -168,7 +189,7 @@ class TestGemCommand < Gem::TestCase
|
|
168
189
|
@cmd.invoke '-h'
|
169
190
|
end
|
170
191
|
|
171
|
-
assert_match %r
|
192
|
+
assert_match %r{Usage: gem doit}, @ui.output
|
172
193
|
end
|
173
194
|
|
174
195
|
def test_option_recognition
|
@@ -224,26 +224,34 @@ class TestGemCommandManager < Gem::TestCase
|
|
224
224
|
end
|
225
225
|
|
226
226
|
#check defaults
|
227
|
-
|
227
|
+
Gem::Deprecate.skip_during do
|
228
|
+
@command_manager.process_args %w[query]
|
229
|
+
end
|
228
230
|
assert_equal(//, check_options[:name])
|
229
231
|
assert_equal :local, check_options[:domain]
|
230
232
|
assert_equal false, check_options[:details]
|
231
233
|
|
232
234
|
#check settings
|
233
235
|
check_options = nil
|
234
|
-
|
236
|
+
Gem::Deprecate.skip_during do
|
237
|
+
@command_manager.process_args %w[query --name foobar --local --details]
|
238
|
+
end
|
235
239
|
assert_equal(/foobar/i, check_options[:name])
|
236
240
|
assert_equal :local, check_options[:domain]
|
237
241
|
assert_equal true, check_options[:details]
|
238
242
|
|
239
243
|
#remote domain
|
240
244
|
check_options = nil
|
241
|
-
|
245
|
+
Gem::Deprecate.skip_during do
|
246
|
+
@command_manager.process_args %w[query --remote]
|
247
|
+
end
|
242
248
|
assert_equal :remote, check_options[:domain]
|
243
249
|
|
244
250
|
#both (local/remote) domains
|
245
251
|
check_options = nil
|
246
|
-
|
252
|
+
Gem::Deprecate.skip_during do
|
253
|
+
@command_manager.process_args %w[query --both]
|
254
|
+
end
|
247
255
|
assert_equal :both, check_options[:domain]
|
248
256
|
end
|
249
257
|
|
@@ -268,4 +276,29 @@ class TestGemCommandManager < Gem::TestCase
|
|
268
276
|
assert_equal Dir.pwd, check_options[:install_dir]
|
269
277
|
end
|
270
278
|
|
279
|
+
def test_deprecated_command
|
280
|
+
require 'rubygems/command'
|
281
|
+
foo_command = Class.new(Gem::Command) do
|
282
|
+
extend Gem::Deprecate
|
283
|
+
|
284
|
+
rubygems_deprecate_command
|
285
|
+
|
286
|
+
def execute
|
287
|
+
say "pew pew!"
|
288
|
+
end
|
289
|
+
end
|
290
|
+
|
291
|
+
Gem::Commands.send(:const_set, :FooCommand, foo_command)
|
292
|
+
@command_manager.register_command(:foo, foo_command.new("foo"))
|
293
|
+
|
294
|
+
use_ui @ui do
|
295
|
+
@command_manager.process_args(%w[foo])
|
296
|
+
end
|
297
|
+
|
298
|
+
assert_equal "pew pew!\n", @ui.output
|
299
|
+
assert_match(/WARNING: foo command is deprecated. It will be removed in Rubygems [0-9]+/, @ui.error)
|
300
|
+
ensure
|
301
|
+
Gem::Commands.send(:remove_const, :FooCommand)
|
302
|
+
end
|
303
|
+
|
271
304
|
end
|
@@ -17,8 +17,13 @@ class TestGemCommandsBuildCommand < Gem::TestCase
|
|
17
17
|
|
18
18
|
readme_file = File.join(@tempdir, 'README.md')
|
19
19
|
|
20
|
-
|
21
|
-
|
20
|
+
begin
|
21
|
+
umask_orig = File.umask(2)
|
22
|
+
File.open readme_file, 'w' do |f|
|
23
|
+
f.write 'My awesome gem'
|
24
|
+
end
|
25
|
+
ensure
|
26
|
+
File.umask(umask_orig)
|
22
27
|
end
|
23
28
|
|
24
29
|
@gem = util_spec 'some_gem' do |s|
|
@@ -675,12 +675,12 @@ ERROR: --private-key not specified and ~/.gem/gem-private_key.pem does not exis
|
|
675
675
|
]
|
676
676
|
|
677
677
|
assert_equal [PUBLIC_CERT.to_pem, ALTERNATE_CERT.to_pem],
|
678
|
-
@cmd.options[:add].map {
|
678
|
+
@cmd.options[:add].map {|cert| cert.to_pem }
|
679
679
|
|
680
680
|
assert_equal %w[nobody example], @cmd.options[:remove]
|
681
681
|
|
682
682
|
assert_equal %w[nobody@example other@example],
|
683
|
-
@cmd.options[:build].map {
|
683
|
+
@cmd.options[:build].map {|name| name.to_s }
|
684
684
|
|
685
685
|
assert_equal ['', 'example'], @cmd.options[:list]
|
686
686
|
end
|
@@ -27,8 +27,8 @@ class TestGemCommandsContentsCommand < Gem::TestCase
|
|
27
27
|
@cmd.execute
|
28
28
|
end
|
29
29
|
|
30
|
-
assert_match %r
|
31
|
-
assert_match %r
|
30
|
+
assert_match %r{lib/foo\.rb}, @ui.output
|
31
|
+
assert_match %r{Rakefile}, @ui.output
|
32
32
|
assert_equal "", @ui.error
|
33
33
|
end
|
34
34
|
|
@@ -42,9 +42,9 @@ class TestGemCommandsContentsCommand < Gem::TestCase
|
|
42
42
|
@cmd.execute
|
43
43
|
end
|
44
44
|
|
45
|
-
assert_match %r
|
46
|
-
assert_match %r
|
47
|
-
assert_match %r
|
45
|
+
assert_match %r{lib/foo\.rb}, @ui.output
|
46
|
+
assert_match %r{lib/bar\.rb}, @ui.output
|
47
|
+
assert_match %r{Rakefile}, @ui.output
|
48
48
|
assert_equal "", @ui.error
|
49
49
|
end
|
50
50
|
|
@@ -57,8 +57,8 @@ class TestGemCommandsContentsCommand < Gem::TestCase
|
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
60
|
-
assert_match %r
|
61
|
-
assert_match %r
|
60
|
+
assert_match %r{Unable to find gem 'foo' in default gem paths}, @ui.output
|
61
|
+
assert_match %r{Directories searched:}, @ui.output
|
62
62
|
assert_equal "", @ui.error
|
63
63
|
end
|
64
64
|
|
@@ -71,8 +71,8 @@ class TestGemCommandsContentsCommand < Gem::TestCase
|
|
71
71
|
@cmd.execute
|
72
72
|
end
|
73
73
|
|
74
|
-
assert_match %r
|
75
|
-
assert_match %r
|
74
|
+
assert_match %r{lib/foo\.rb}, @ui.output
|
75
|
+
assert_match %r{Rakefile}, @ui.output
|
76
76
|
assert_equal "", @ui.error
|
77
77
|
end
|
78
78
|
|
@@ -86,8 +86,8 @@ class TestGemCommandsContentsCommand < Gem::TestCase
|
|
86
86
|
@cmd.execute
|
87
87
|
end
|
88
88
|
|
89
|
-
assert_match %r
|
90
|
-
refute_match %r
|
89
|
+
assert_match %r{lib/foo\.rb}, @ui.output
|
90
|
+
refute_match %r{Rakefile}, @ui.output
|
91
91
|
|
92
92
|
assert_equal "", @ui.error
|
93
93
|
end
|
@@ -105,6 +105,22 @@ class TestGemCommandsContentsCommand < Gem::TestCase
|
|
105
105
|
assert_empty @ui.error
|
106
106
|
end
|
107
107
|
|
108
|
+
def test_execute_missing_version
|
109
|
+
@cmd.options[:args] = %w[foo]
|
110
|
+
@cmd.options[:version] = Gem::Requirement.new '= 2'
|
111
|
+
|
112
|
+
gem 'foo', 1
|
113
|
+
|
114
|
+
assert_raises Gem::MockGemUi::TermError do
|
115
|
+
use_ui @ui do
|
116
|
+
@cmd.execute
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
assert_match "Unable to find gem 'foo'", @ui.output
|
121
|
+
assert_empty @ui.error
|
122
|
+
end
|
123
|
+
|
108
124
|
def test_execute_missing_multiple
|
109
125
|
@cmd.options[:args] = %w[foo bar]
|
110
126
|
|
@@ -130,9 +146,9 @@ class TestGemCommandsContentsCommand < Gem::TestCase
|
|
130
146
|
@cmd.execute
|
131
147
|
end
|
132
148
|
|
133
|
-
assert_match %r
|
134
|
-
assert_match %r
|
135
|
-
assert_match %r
|
149
|
+
assert_match %r{lib/foo\.rb}, @ui.output
|
150
|
+
assert_match %r{lib/bar\.rb}, @ui.output
|
151
|
+
assert_match %r{Rakefile}, @ui.output
|
136
152
|
assert_equal "", @ui.error
|
137
153
|
end
|
138
154
|
|
@@ -152,6 +168,23 @@ class TestGemCommandsContentsCommand < Gem::TestCase
|
|
152
168
|
assert_equal "", @ui.error
|
153
169
|
end
|
154
170
|
|
171
|
+
def test_execute_show_install_dir_latest_version
|
172
|
+
@cmd.options[:args] = %w[foo]
|
173
|
+
@cmd.options[:show_install_dir] = true
|
174
|
+
|
175
|
+
gem 'foo', 1
|
176
|
+
gem 'foo', 2
|
177
|
+
|
178
|
+
use_ui @ui do
|
179
|
+
@cmd.execute
|
180
|
+
end
|
181
|
+
|
182
|
+
expected = File.join @gemhome, 'gems', 'foo-2'
|
183
|
+
|
184
|
+
assert_equal "#{expected}\n", @ui.output
|
185
|
+
assert_equal "", @ui.error
|
186
|
+
end
|
187
|
+
|
155
188
|
def test_execute_show_install_dir_version
|
156
189
|
@cmd.options[:args] = %w[foo]
|
157
190
|
@cmd.options[:show_install_dir] = true
|
@@ -207,7 +240,7 @@ lib/foo.rb
|
|
207
240
|
[RbConfig::CONFIG['bindir'], 'default_command'],
|
208
241
|
[RbConfig::CONFIG['rubylibdir'], 'default/gem.rb'],
|
209
242
|
[RbConfig::CONFIG['archdir'], 'default_gem.so']
|
210
|
-
].sort.map{|a|File.join a}.join "\n"
|
243
|
+
].sort.map{|a|File.join a }.join "\n"
|
211
244
|
|
212
245
|
assert_equal expected, @ui.output.chomp
|
213
246
|
assert_equal "", @ui.error
|
@@ -22,29 +22,29 @@ class TestGemCommandsEnvironmentCommand < Gem::TestCase
|
|
22
22
|
@cmd.execute
|
23
23
|
end
|
24
24
|
|
25
|
-
assert_match %r
|
26
|
-
assert_match %r
|
27
|
-
assert_match %r
|
25
|
+
assert_match %r{RUBYGEMS VERSION: (\d\.)+\d}, @ui.output
|
26
|
+
assert_match %r{RUBY VERSION: \d+\.\d+\.\d+ \(.*\) \[.*\]}, @ui.output
|
27
|
+
assert_match %r{INSTALLATION DIRECTORY: #{Regexp.escape @gemhome}},
|
28
28
|
@ui.output
|
29
|
-
assert_match %r
|
30
|
-
assert_match %r
|
29
|
+
assert_match %r{RUBYGEMS PREFIX: }, @ui.output
|
30
|
+
assert_match %r{RUBY EXECUTABLE:.*#{RbConfig::CONFIG['ruby_install_name']}},
|
31
31
|
@ui.output
|
32
|
-
assert_match %r
|
33
|
-
assert_match %r
|
34
|
-
assert_match %r
|
35
|
-
assert_match %r
|
36
|
-
assert_match %r
|
37
|
-
assert_match %r
|
38
|
-
assert_match %r
|
39
|
-
assert_match %r
|
40
|
-
assert_match %r
|
41
|
-
assert_match %r
|
42
|
-
assert_match %r
|
43
|
-
|
44
|
-
assert_match %r
|
45
|
-
assert_match %r
|
46
|
-
assert_match %r
|
47
|
-
assert_match %r
|
32
|
+
assert_match %r{GIT EXECUTABLE: #{@cmd.send(:git_path)}}, @ui.output
|
33
|
+
assert_match %r{SYSTEM CONFIGURATION DIRECTORY:}, @ui.output
|
34
|
+
assert_match %r{EXECUTABLE DIRECTORY:}, @ui.output
|
35
|
+
assert_match %r{RUBYGEMS PLATFORMS:}, @ui.output
|
36
|
+
assert_match %r{- #{Gem::Platform.local}}, @ui.output
|
37
|
+
assert_match %r{GEM PATHS:}, @ui.output
|
38
|
+
assert_match %r{- #{Regexp.escape @gemhome}}, @ui.output
|
39
|
+
assert_match %r{GEM CONFIGURATION:}, @ui.output
|
40
|
+
assert_match %r{"gemcutter_key" => "\*\*\*\*"}, @ui.output
|
41
|
+
assert_match %r{:verbose => }, @ui.output
|
42
|
+
assert_match %r{REMOTE SOURCES:}, @ui.output
|
43
|
+
|
44
|
+
assert_match %r{- SHELL PATH:}, @ui.output
|
45
|
+
assert_match %r{- /usr/local/bin$}, @ui.output
|
46
|
+
assert_match %r{- /usr/bin$}, @ui.output
|
47
|
+
assert_match %r{- /bin$}, @ui.output
|
48
48
|
|
49
49
|
assert_empty @ui.error
|
50
50
|
|
@@ -3,10 +3,6 @@ require 'rubygems/test_case'
|
|
3
3
|
require 'rubygems/indexer'
|
4
4
|
require 'rubygems/commands/generate_index_command'
|
5
5
|
|
6
|
-
unless defined?(Builder::XChar)
|
7
|
-
warn "generate_index tests are being skipped. Install builder gem."
|
8
|
-
end
|
9
|
-
|
10
6
|
class TestGemCommandsGenerateIndexCommand < Gem::TestCase
|
11
7
|
|
12
8
|
def setup
|
@@ -83,4 +79,4 @@ class TestGemCommandsGenerateIndexCommand < Gem::TestCase
|
|
83
79
|
@ui.error
|
84
80
|
end
|
85
81
|
|
86
|
-
end
|
82
|
+
end
|
@@ -33,12 +33,12 @@ class TestGemCommandsInfoCommand < Gem::TestCase
|
|
33
33
|
@cmd.execute
|
34
34
|
end
|
35
35
|
|
36
|
-
assert_match %r
|
37
|
-
assert_match %r
|
38
|
-
assert_match %r
|
39
|
-
assert_match %r
|
40
|
-
assert_match %r
|
41
|
-
assert_match %r
|
36
|
+
assert_match %r{#{@gem.name} \(#{@gem.version}\)\n}, @ui.output
|
37
|
+
assert_match %r{Authors: #{@gem.authors.join(', ')}\n}, @ui.output
|
38
|
+
assert_match %r{Homepage: #{@gem.homepage}\n}, @ui.output
|
39
|
+
assert_match %r{License: #{@gem.license}\n}, @ui.output
|
40
|
+
assert_match %r{Installed at: #{@gem.base_dir}\n}, @ui.output
|
41
|
+
assert_match %r{#{@gem.summary}\n}, @ui.output
|
42
42
|
assert_match "", @ui.error
|
43
43
|
end
|
44
44
|
|
@@ -43,7 +43,7 @@ class TestGemCommandsInstallCommand < Gem::TestCase
|
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
46
|
-
assert_equal %w[a-2], @cmd.installed_specs.map {
|
46
|
+
assert_equal %w[a-2], @cmd.installed_specs.map {|spec| spec.full_name }
|
47
47
|
end
|
48
48
|
|
49
49
|
def test_execute_explicit_version_includes_prerelease
|
@@ -65,7 +65,7 @@ class TestGemCommandsInstallCommand < Gem::TestCase
|
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
|
-
assert_equal %w[a-2.a], @cmd.installed_specs.map {
|
68
|
+
assert_equal %w[a-2.a], @cmd.installed_specs.map {|spec| spec.full_name }
|
69
69
|
end
|
70
70
|
|
71
71
|
def test_execute_local
|
@@ -91,7 +91,7 @@ class TestGemCommandsInstallCommand < Gem::TestCase
|
|
91
91
|
end
|
92
92
|
end
|
93
93
|
|
94
|
-
assert_equal %w[a-2], @cmd.installed_specs.map {
|
94
|
+
assert_equal %w[a-2], @cmd.installed_specs.map {|spec| spec.full_name }
|
95
95
|
|
96
96
|
assert_match "1 gem installed", @ui.output
|
97
97
|
end
|
@@ -182,7 +182,7 @@ ERROR: Could not find a valid gem 'bar' (= 0.5) (required by 'foo' (>= 0)) in a
|
|
182
182
|
end
|
183
183
|
end
|
184
184
|
|
185
|
-
assert_equal %w[a-2 b-2.a c-3], @cmd.installed_specs.map {
|
185
|
+
assert_equal %w[a-2 b-2.a c-3], @cmd.installed_specs.map {|spec| spec.full_name }.sort
|
186
186
|
|
187
187
|
assert_match "3 gems installed", @ui.output
|
188
188
|
end
|
@@ -337,7 +337,7 @@ ERROR: Could not find a valid gem 'bar' (= 0.5) (required by 'foo' (>= 0)) in a
|
|
337
337
|
errs = @ui.error.split("\n")
|
338
338
|
|
339
339
|
assert_match(/ould not find a valid gem 'nonexistent'/, errs.shift)
|
340
|
-
assert_match(%r
|
340
|
+
assert_match(%r{Unable to download data from http://not-there.nothing}, errs.shift)
|
341
341
|
end
|
342
342
|
|
343
343
|
def test_execute_nonexistent_hint_disabled
|
@@ -449,7 +449,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
449
449
|
end
|
450
450
|
end
|
451
451
|
|
452
|
-
assert_equal %w[a-1], @cmd.installed_specs.map {
|
452
|
+
assert_equal %w[a-1], @cmd.installed_specs.map {|spec| spec.full_name }
|
453
453
|
end
|
454
454
|
|
455
455
|
def test_execute_prerelease_wins_over_previous_ver
|
@@ -467,7 +467,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
467
467
|
end
|
468
468
|
end
|
469
469
|
|
470
|
-
assert_equal %w[a-2.a], @cmd.installed_specs.map {
|
470
|
+
assert_equal %w[a-2.a], @cmd.installed_specs.map {|spec| spec.full_name }
|
471
471
|
end
|
472
472
|
|
473
473
|
def test_execute_with_version_specified_by_colon
|
@@ -484,7 +484,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
484
484
|
end
|
485
485
|
end
|
486
486
|
|
487
|
-
assert_equal %w[a-1], @cmd.installed_specs.map {
|
487
|
+
assert_equal %w[a-1], @cmd.installed_specs.map {|spec| spec.full_name }
|
488
488
|
end
|
489
489
|
|
490
490
|
def test_execute_prerelease_skipped_when_non_pre_available
|
@@ -502,7 +502,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
502
502
|
end
|
503
503
|
end
|
504
504
|
|
505
|
-
assert_equal %w[a-2], @cmd.installed_specs.map {
|
505
|
+
assert_equal %w[a-2], @cmd.installed_specs.map {|spec| spec.full_name }
|
506
506
|
end
|
507
507
|
|
508
508
|
def test_execute_rdoc
|
@@ -582,7 +582,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
582
582
|
fetcher.gem 'a', 2
|
583
583
|
end
|
584
584
|
|
585
|
-
args = %w
|
585
|
+
args = %w[--with-awesome=true --more-awesome=yes]
|
586
586
|
|
587
587
|
Gem::Command.build_args = args
|
588
588
|
|
@@ -627,7 +627,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
627
627
|
end
|
628
628
|
end
|
629
629
|
|
630
|
-
assert_equal %w[a-2], @cmd.installed_specs.map {
|
630
|
+
assert_equal %w[a-2], @cmd.installed_specs.map {|spec| spec.full_name }
|
631
631
|
|
632
632
|
assert_match "1 gem installed", @ui.output
|
633
633
|
end
|
@@ -647,7 +647,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
647
647
|
end
|
648
648
|
end
|
649
649
|
|
650
|
-
assert_equal %w[a-2], @cmd.installed_specs.map {
|
650
|
+
assert_equal %w[a-2], @cmd.installed_specs.map {|spec| spec.full_name }
|
651
651
|
|
652
652
|
assert_match "1 gem installed", @ui.output
|
653
653
|
end
|
@@ -688,7 +688,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
688
688
|
end
|
689
689
|
end
|
690
690
|
|
691
|
-
assert_equal %w[a-1], @cmd.installed_specs.map {
|
691
|
+
assert_equal %w[a-1], @cmd.installed_specs.map {|spec| spec.full_name }
|
692
692
|
|
693
693
|
assert_match "1 gem installed", @ui.output
|
694
694
|
|
@@ -722,7 +722,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
722
722
|
end
|
723
723
|
end
|
724
724
|
|
725
|
-
assert_equal %w[a-2 b-2], @cmd.installed_specs.map {
|
725
|
+
assert_equal %w[a-2 b-2], @cmd.installed_specs.map {|spec| spec.full_name }
|
726
726
|
|
727
727
|
assert_match "2 gems installed", @ui.output
|
728
728
|
end
|
@@ -764,7 +764,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
764
764
|
end
|
765
765
|
end
|
766
766
|
|
767
|
-
assert_equal %w[a-1 b-1], @cmd.installed_specs.map {
|
767
|
+
assert_equal %w[a-1 b-1], @cmd.installed_specs.map {|spec| spec.full_name }
|
768
768
|
end
|
769
769
|
|
770
770
|
def test_execute_conservative
|
@@ -790,7 +790,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
790
790
|
end
|
791
791
|
end
|
792
792
|
|
793
|
-
assert_equal %w[b-2], @cmd.installed_specs.map {
|
793
|
+
assert_equal %w[b-2], @cmd.installed_specs.map {|spec| spec.full_name }
|
794
794
|
|
795
795
|
assert_equal "", @ui.error
|
796
796
|
assert_match "1 gem installed", @ui.output
|
@@ -812,7 +812,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
812
812
|
|
813
813
|
@cmd.install_gem 'a', '>= 0'
|
814
814
|
|
815
|
-
assert_equal %w[a-2], @cmd.installed_specs.map {
|
815
|
+
assert_equal %w[a-2], @cmd.installed_specs.map {|s| s.full_name }
|
816
816
|
|
817
817
|
assert done_installing, 'documentation was not generated'
|
818
818
|
end
|
@@ -826,7 +826,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
826
826
|
|
827
827
|
@cmd.install_gem 'a', '>= 0'
|
828
828
|
|
829
|
-
assert_equal %w[a-2], @cmd.installed_specs.map {
|
829
|
+
assert_equal %w[a-2], @cmd.installed_specs.map {|spec| spec.full_name }
|
830
830
|
end
|
831
831
|
|
832
832
|
def test_install_gem_ignore_dependencies_remote_platform_local
|
@@ -843,7 +843,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
843
843
|
|
844
844
|
@cmd.install_gem 'a', '>= 0'
|
845
845
|
|
846
|
-
assert_equal %W[a-3-#{local}], @cmd.installed_specs.map {
|
846
|
+
assert_equal %W[a-3-#{local}], @cmd.installed_specs.map {|spec| spec.full_name }
|
847
847
|
end
|
848
848
|
|
849
849
|
def test_install_gem_ignore_dependencies_specific_file
|
@@ -857,7 +857,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
857
857
|
|
858
858
|
@cmd.install_gem File.join(@tempdir, spec.file_name), nil
|
859
859
|
|
860
|
-
assert_equal %w[a-2], @cmd.installed_specs.map {
|
860
|
+
assert_equal %w[a-2], @cmd.installed_specs.map {|s| s.full_name }
|
861
861
|
end
|
862
862
|
|
863
863
|
def test_parses_requirement_from_gemname
|
@@ -886,7 +886,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
886
886
|
end
|
887
887
|
|
888
888
|
assert_equal 2, e.exit_code
|
889
|
-
assert_match %r
|
889
|
+
assert_match %r{Could not find a valid gem 'a' \(= 10.0\)}, @ui.error
|
890
890
|
end
|
891
891
|
|
892
892
|
def test_show_errors_on_failure
|
@@ -927,7 +927,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
927
927
|
end
|
928
928
|
end
|
929
929
|
|
930
|
-
assert_equal %w[a-2], @cmd.installed_specs.map {
|
930
|
+
assert_equal %w[a-2], @cmd.installed_specs.map {|spec| spec.full_name }
|
931
931
|
|
932
932
|
assert_match "1 gem installed", @ui.output
|
933
933
|
|
@@ -954,7 +954,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
954
954
|
end
|
955
955
|
end
|
956
956
|
|
957
|
-
assert_equal %w[], @cmd.installed_specs.map {
|
957
|
+
assert_equal %w[], @cmd.installed_specs.map {|spec| spec.full_name }
|
958
958
|
|
959
959
|
assert_match "Using a (2)", @ui.output
|
960
960
|
assert File.exist?("#{@gemdeps}.lock")
|
@@ -978,7 +978,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
978
978
|
end
|
979
979
|
end
|
980
980
|
|
981
|
-
assert_equal %w[], @cmd.installed_specs.map {
|
981
|
+
assert_equal %w[], @cmd.installed_specs.map {|spec| spec.full_name }
|
982
982
|
|
983
983
|
assert_match "Using a (2)", @ui.output
|
984
984
|
assert !File.exist?("#{@gemdeps}.lock")
|
@@ -1003,7 +1003,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
1003
1003
|
end
|
1004
1004
|
end
|
1005
1005
|
|
1006
|
-
assert_equal %w[], @cmd.installed_specs.map {
|
1006
|
+
assert_equal %w[], @cmd.installed_specs.map {|spec| spec.full_name }
|
1007
1007
|
|
1008
1008
|
assert_match "Using a (1)", @ui.output
|
1009
1009
|
end
|
@@ -1025,7 +1025,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
1025
1025
|
end
|
1026
1026
|
end
|
1027
1027
|
|
1028
|
-
assert_equal %w[a-2], @cmd.installed_specs.map {
|
1028
|
+
assert_equal %w[a-2], @cmd.installed_specs.map {|spec| spec.full_name }
|
1029
1029
|
|
1030
1030
|
assert_match "Installing a (2)", @ui.output
|
1031
1031
|
end
|
@@ -1048,7 +1048,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
1048
1048
|
end
|
1049
1049
|
end
|
1050
1050
|
|
1051
|
-
names = @cmd.installed_specs.map {
|
1051
|
+
names = @cmd.installed_specs.map {|spec| spec.full_name }
|
1052
1052
|
|
1053
1053
|
assert_equal %w[q-1.0 r-2.0], names
|
1054
1054
|
|
@@ -1075,7 +1075,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
1075
1075
|
end
|
1076
1076
|
end
|
1077
1077
|
|
1078
|
-
names = @cmd.installed_specs.map {
|
1078
|
+
names = @cmd.installed_specs.map {|spec| spec.full_name }
|
1079
1079
|
|
1080
1080
|
assert_equal %w[r-2.0], names
|
1081
1081
|
|
@@ -1102,7 +1102,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
1102
1102
|
end
|
1103
1103
|
end
|
1104
1104
|
|
1105
|
-
names = @cmd.installed_specs.map {
|
1105
|
+
names = @cmd.installed_specs.map {|spec| spec.full_name }
|
1106
1106
|
|
1107
1107
|
assert_equal %w[q-1.0 r-2.0], names
|
1108
1108
|
|
@@ -1134,7 +1134,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
1134
1134
|
end
|
1135
1135
|
end
|
1136
1136
|
|
1137
|
-
names = @cmd.installed_specs.map {
|
1137
|
+
names = @cmd.installed_specs.map {|spec| spec.full_name }
|
1138
1138
|
|
1139
1139
|
assert_equal %w[q-1.0 r-2.0], names
|
1140
1140
|
|
@@ -1169,7 +1169,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
1169
1169
|
end
|
1170
1170
|
end
|
1171
1171
|
|
1172
|
-
names = @cmd.installed_specs.map {
|
1172
|
+
names = @cmd.installed_specs.map {|spec| spec.full_name }
|
1173
1173
|
|
1174
1174
|
assert_equal %w[r-2.0], names
|
1175
1175
|
|