rubygems-update 3.3.25 → 3.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +36 -0
- data/CONTRIBUTING.md +24 -1
- data/Manifest.txt +30 -27
- data/POLICIES.md +10 -8
- data/README.md +2 -2
- data/bin/gem +1 -4
- data/bin/update_rubygems +1 -1
- data/bundler/CHANGELOG.md +58 -0
- data/bundler/README.md +2 -2
- data/bundler/bundler.gemspec +2 -2
- data/bundler/exe/bundle +1 -4
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli/add.rb +1 -1
- data/bundler/lib/bundler/cli/check.rb +1 -1
- data/bundler/lib/bundler/cli/common.rb +1 -0
- data/bundler/lib/bundler/cli/console.rb +2 -2
- data/bundler/lib/bundler/cli/doctor.rb +4 -6
- data/bundler/lib/bundler/cli/gem.rb +62 -40
- data/bundler/lib/bundler/cli/install.rb +2 -3
- data/bundler/lib/bundler/cli/lock.rb +8 -5
- data/bundler/lib/bundler/cli/outdated.rb +1 -3
- data/bundler/lib/bundler/cli/viz.rb +1 -1
- data/bundler/lib/bundler/cli.rb +44 -3
- data/bundler/lib/bundler/compact_index_client/cache.rb +1 -1
- data/bundler/lib/bundler/compact_index_client/updater.rb +40 -39
- data/bundler/lib/bundler/constants.rb +1 -1
- data/bundler/lib/bundler/definition.rb +61 -31
- data/bundler/lib/bundler/dependency.rb +12 -11
- data/bundler/lib/bundler/digest.rb +1 -1
- data/bundler/lib/bundler/dsl.rb +1 -1
- data/bundler/lib/bundler/env.rb +1 -1
- data/bundler/lib/bundler/environment_preserver.rb +1 -0
- data/bundler/lib/bundler/errors.rb +1 -11
- data/bundler/lib/bundler/fetcher/compact_index.rb +9 -11
- data/bundler/lib/bundler/fetcher/dependency.rb +1 -1
- data/bundler/lib/bundler/fetcher/downloader.rb +2 -5
- data/bundler/lib/bundler/fetcher.rb +2 -6
- data/bundler/lib/bundler/force_platform.rb +18 -0
- data/bundler/lib/bundler/friendly_errors.rb +0 -3
- data/bundler/lib/bundler/gem_version_promoter.rb +52 -86
- data/bundler/lib/bundler/graph.rb +3 -3
- data/bundler/lib/bundler/index.rb +5 -13
- data/bundler/lib/bundler/injector.rb +1 -1
- data/bundler/lib/bundler/inline.rb +2 -2
- data/bundler/lib/bundler/installer/parallel_installer.rb +0 -31
- data/bundler/lib/bundler/installer.rb +6 -16
- data/bundler/lib/bundler/lazy_specification.rb +5 -1
- data/bundler/lib/bundler/lockfile_parser.rb +5 -5
- data/bundler/lib/bundler/man/bundle-add.1 +1 -1
- data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
- data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
- data/bundler/lib/bundler/man/bundle-check.1 +1 -1
- data/bundler/lib/bundler/man/bundle-clean.1 +2 -2
- data/bundler/lib/bundler/man/bundle-clean.1.ronn +1 -1
- data/bundler/lib/bundler/man/bundle-config.1 +1 -1
- data/bundler/lib/bundler/man/bundle-console.1 +1 -1
- data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
- data/bundler/lib/bundler/man/bundle-exec.1 +1 -1
- data/bundler/lib/bundler/man/bundle-gem.1 +27 -37
- data/bundler/lib/bundler/man/bundle-gem.1.ronn +5 -5
- data/bundler/lib/bundler/man/bundle-help.1 +1 -1
- data/bundler/lib/bundler/man/bundle-info.1 +1 -1
- data/bundler/lib/bundler/man/bundle-init.1 +1 -1
- data/bundler/lib/bundler/man/bundle-inject.1 +1 -1
- data/bundler/lib/bundler/man/bundle-install.1 +1 -30
- data/bundler/lib/bundler/man/bundle-install.1.ronn +0 -29
- data/bundler/lib/bundler/man/bundle-list.1 +1 -1
- data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
- data/bundler/lib/bundler/man/bundle-open.1 +1 -1
- data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
- data/bundler/lib/bundler/man/bundle-platform.1 +2 -2
- data/bundler/lib/bundler/man/bundle-platform.1.ronn +1 -1
- data/bundler/lib/bundler/man/bundle-plugin.1 +1 -1
- data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
- data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
- data/bundler/lib/bundler/man/bundle-show.1 +1 -1
- data/bundler/lib/bundler/man/bundle-update.1 +1 -1
- data/bundler/lib/bundler/man/bundle-version.1 +1 -1
- data/bundler/lib/bundler/man/bundle-viz.1 +1 -1
- data/bundler/lib/bundler/man/bundle.1 +1 -1
- data/bundler/lib/bundler/man/gemfile.5 +1 -1
- data/bundler/lib/bundler/mirror.rb +5 -7
- data/bundler/lib/bundler/plugin/index.rb +4 -4
- data/bundler/lib/bundler/plugin/installer/rubygems.rb +0 -4
- data/bundler/lib/bundler/resolver/base.rb +7 -11
- data/bundler/lib/bundler/resolver/candidate.rb +92 -0
- data/bundler/lib/bundler/resolver/incompatibility.rb +15 -0
- data/bundler/lib/bundler/resolver/package.rb +63 -0
- data/bundler/lib/bundler/resolver/root.rb +25 -0
- data/bundler/lib/bundler/resolver/spec_group.rb +26 -36
- data/bundler/lib/bundler/resolver.rb +285 -277
- data/bundler/lib/bundler/rubygems_ext.rb +33 -6
- data/bundler/lib/bundler/rubygems_gem_installer.rb +4 -2
- data/bundler/lib/bundler/rubygems_integration.rb +1 -9
- data/bundler/lib/bundler/runtime.rb +1 -5
- data/bundler/lib/bundler/settings.rb +0 -6
- data/bundler/lib/bundler/shared_helpers.rb +1 -0
- data/bundler/lib/bundler/source/git/git_proxy.rb +190 -67
- data/bundler/lib/bundler/source/git.rb +15 -17
- data/bundler/lib/bundler/source/metadata.rb +0 -1
- data/bundler/lib/bundler/source/path/installer.rb +1 -22
- data/bundler/lib/bundler/source/path.rb +5 -5
- data/bundler/lib/bundler/source/rubygems.rb +13 -67
- data/bundler/lib/bundler/source_list.rb +8 -2
- data/bundler/lib/bundler/spec_set.rb +7 -9
- data/bundler/lib/bundler/templates/Executable +1 -1
- data/bundler/lib/bundler/templates/Executable.bundler +4 -9
- data/bundler/lib/bundler/templates/Executable.standalone +2 -0
- data/bundler/lib/bundler/templates/newgem/Cargo.toml.tt +7 -0
- data/bundler/lib/bundler/templates/newgem/Gemfile.tt +3 -0
- data/bundler/lib/bundler/templates/newgem/README.md.tt +6 -4
- data/bundler/lib/bundler/templates/newgem/Rakefile.tt +2 -1
- data/bundler/lib/bundler/templates/newgem/circleci/config.yml.tt +12 -0
- data/bundler/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +15 -0
- data/bundler/lib/bundler/templates/newgem/ext/newgem/{extconf.rb.tt → extconf-c.rb.tt} +0 -0
- data/bundler/lib/bundler/templates/newgem/ext/newgem/extconf-rust.rb.tt +6 -0
- data/bundler/lib/bundler/templates/newgem/ext/newgem/src/lib.rs.tt +12 -0
- data/bundler/lib/bundler/templates/newgem/github/workflows/main.yml.tt +10 -0
- data/bundler/lib/bundler/templates/newgem/gitignore.tt +3 -0
- data/bundler/lib/bundler/templates/newgem/gitlab-ci.yml.tt +8 -0
- data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +8 -2
- data/bundler/lib/bundler/ui/shell.rb +35 -12
- data/bundler/lib/bundler/ui/silent.rb +21 -5
- data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +3 -3
- data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb +0 -1
- data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +3 -1
- data/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb +1350 -408
- data/bundler/lib/bundler/vendor/net-http-persistent/README.rdoc +1 -1
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +1 -1
- data/bundler/lib/bundler/vendor/pub_grub/LICENSE.txt +21 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb +20 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb +189 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb +182 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb +151 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb +43 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/partial_solution.rb +121 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb +45 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb +19 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb +53 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/term.rb +105 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version.rb +3 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb +124 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb +409 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +240 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb +178 -0
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub.rb +31 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +1 -1
- data/bundler/lib/bundler/vendor/uri/lib/uri/common.rb +64 -16
- data/bundler/lib/bundler/vendor/uri/lib/uri/file.rb +7 -1
- data/bundler/lib/bundler/vendor/uri/lib/uri/ftp.rb +2 -1
- data/bundler/lib/bundler/vendor/uri/lib/uri/generic.rb +27 -7
- data/bundler/lib/bundler/vendor/uri/lib/uri/http.rb +40 -2
- data/bundler/lib/bundler/vendor/uri/lib/uri/https.rb +2 -1
- data/bundler/lib/bundler/vendor/uri/lib/uri/ldap.rb +1 -1
- data/bundler/lib/bundler/vendor/uri/lib/uri/ldaps.rb +2 -1
- data/bundler/lib/bundler/vendor/uri/lib/uri/mailto.rb +2 -2
- data/bundler/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +13 -7
- data/bundler/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +10 -5
- data/bundler/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
- data/bundler/lib/bundler/vendor/uri/lib/uri/ws.rb +1 -2
- data/bundler/lib/bundler/vendor/uri/lib/uri/wss.rb +2 -1
- data/bundler/lib/bundler/vendor/uri/lib/uri.rb +3 -2
- data/bundler/lib/bundler/vendored_persistent.rb +1 -33
- data/bundler/lib/bundler/{vendored_tmpdir.rb → vendored_pub_grub.rb} +1 -1
- data/bundler/lib/bundler/version.rb +5 -1
- data/bundler/lib/bundler/worker.rb +5 -7
- data/bundler/lib/bundler.rb +20 -64
- data/lib/rubygems/command_manager.rb +2 -2
- data/lib/rubygems/commands/fetch_command.rb +1 -1
- data/lib/rubygems/commands/install_command.rb +7 -3
- data/lib/rubygems/commands/rdoc_command.rb +3 -2
- data/lib/rubygems/commands/setup_command.rb +2 -2
- data/lib/rubygems/commands/unpack_command.rb +1 -1
- data/lib/rubygems/commands/update_command.rb +1 -7
- data/lib/rubygems/config_file.rb +33 -0
- data/lib/rubygems/core_ext/kernel_warn.rb +1 -2
- data/lib/rubygems/defaults.rb +15 -1
- data/lib/rubygems/dependency.rb +4 -1
- data/lib/rubygems/dependency_installer.rb +24 -24
- data/lib/rubygems/exceptions.rb +1 -3
- data/lib/rubygems/ext/builder.rb +3 -3
- data/lib/rubygems/ext/cargo_builder/link_flag_converter.rb +9 -5
- data/lib/rubygems/ext/cargo_builder.rb +18 -19
- data/lib/rubygems/ext/ext_conf_builder.rb +2 -0
- data/lib/rubygems/indexer.rb +1 -1
- data/lib/rubygems/installer.rb +5 -5
- data/lib/rubygems/optparse/lib/optparse.rb +20 -15
- data/lib/rubygems/package/tar_header.rb +11 -11
- data/lib/rubygems/platform.rb +0 -2
- data/lib/rubygems/request_set/gem_dependency_api.rb +104 -104
- data/lib/rubygems/requirement.rb +7 -7
- data/lib/rubygems/resolver/installer_set.rb +1 -1
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb +1 -1
- data/lib/rubygems/resolver/molinillo/lib/molinillo/errors.rb +32 -26
- data/lib/rubygems/resolver/molinillo/lib/molinillo/gem_metadata.rb +1 -1
- data/lib/rubygems/security/policies.rb +40 -40
- data/lib/rubygems/security/trust_dir.rb +1 -1
- data/lib/rubygems/security.rb +3 -16
- data/lib/rubygems/source.rb +2 -2
- data/lib/rubygems/specification.rb +37 -49
- data/lib/rubygems/specification_policy.rb +14 -0
- data/lib/rubygems/stub_specification.rb +2 -2
- data/lib/rubygems/text.rb +1 -1
- data/lib/rubygems/tsort/lib/tsort.rb +308 -310
- data/lib/rubygems/update_suggestion.rb +69 -0
- data/lib/rubygems/util.rb +1 -5
- data/lib/rubygems/validator.rb +1 -1
- data/lib/rubygems.rb +8 -3
- data/rubygems-update.gemspec +2 -2
- data/test/rubygems/helper.rb +7 -3
- data/test/rubygems/test_bundled_ca.rb +1 -1
- data/test/rubygems/test_exit.rb +6 -0
- data/test/rubygems/test_gem.rb +4 -9
- data/test/rubygems/test_gem_bundler_version_finder.rb +2 -1
- data/test/rubygems/test_gem_command_manager.rb +1 -1
- data/test/rubygems/test_gem_commands_install_command.rb +19 -0
- data/test/rubygems/test_gem_commands_setup_command.rb +1 -8
- data/test/rubygems/test_gem_commands_update_command.rb +6 -6
- data/test/rubygems/test_gem_config_file.rb +1 -1
- data/test/rubygems/test_gem_dependency.rb +2 -0
- data/test/rubygems/test_gem_ext_builder.rb +3 -3
- data/test/rubygems/test_gem_ext_cargo_builder/custom_name/Cargo.lock +22 -32
- data/test/rubygems/test_gem_ext_cargo_builder/custom_name/Cargo.toml +1 -1
- data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.lock +22 -32
- data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.toml +1 -1
- data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/src/lib.rs +12 -0
- data/test/rubygems/test_gem_ext_cargo_builder.rb +22 -27
- data/test/rubygems/test_gem_ext_cargo_builder_link_flag_converter.rb +16 -16
- data/test/rubygems/test_gem_ext_cargo_builder_unit.rb +0 -10
- data/test/rubygems/test_gem_indexer.rb +39 -20
- data/test/rubygems/test_gem_installer.rb +68 -2
- data/test/rubygems/test_gem_package_tar_header.rb +13 -13
- data/test/rubygems/test_gem_platform.rb +59 -60
- data/test/rubygems/test_gem_remote_fetcher.rb +4 -4
- data/test/rubygems/test_gem_request_set.rb +2 -2
- data/test/rubygems/test_gem_requirement.rb +1 -1
- data/test/rubygems/test_gem_resolver_api_set.rb +12 -12
- data/test/rubygems/test_gem_resolver_api_specification.rb +19 -19
- data/test/rubygems/test_gem_resolver_git_specification.rb +1 -1
- data/test/rubygems/test_gem_security_policy.rb +10 -10
- data/test/rubygems/test_gem_security_trust_dir.rb +2 -2
- data/test/rubygems/test_gem_specification.rb +50 -37
- data/test/rubygems/test_gem_uninstaller.rb +1 -1
- data/test/rubygems/test_gem_update_suggestion.rb +208 -0
- data/test/rubygems/test_kernel.rb +10 -8
- data/test/rubygems/test_require.rb +70 -55
- metadata +34 -31
- data/bundler/lib/bundler/templates/newgem/travis.yml.tt +0 -6
- data/bundler/lib/bundler/vendor/molinillo/LICENSE +0 -9
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +0 -57
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +0 -88
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb +0 -36
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +0 -66
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +0 -62
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +0 -63
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +0 -61
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb +0 -126
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb +0 -46
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +0 -36
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +0 -164
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +0 -255
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +0 -149
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +0 -6
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +0 -112
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb +0 -67
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +0 -839
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb +0 -46
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/state.rb +0 -58
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo.rb +0 -11
- data/bundler/lib/bundler/vendor/tmpdir/lib/tmpdir.rb +0 -154
- data/bundler/lib/bundler/vendored_molinillo.rb +0 -4
- data/bundler/lib/bundler/version_ranges.rb +0 -122
@@ -85,66 +85,65 @@ class TestGemPlatform < Gem::TestCase
|
|
85
85
|
|
86
86
|
def test_initialize
|
87
87
|
test_cases = {
|
88
|
-
"amd64-freebsd6"
|
89
|
-
"
|
90
|
-
"
|
91
|
-
"
|
92
|
-
"universal-
|
93
|
-
"universal-
|
94
|
-
"
|
95
|
-
"powerpc-
|
96
|
-
"powerpc-
|
97
|
-
"powerpc-
|
98
|
-
"
|
99
|
-
"
|
100
|
-
"sparc-solaris2.
|
101
|
-
"sparc-solaris2.
|
102
|
-
"
|
103
|
-
"universal-
|
104
|
-
"universal-
|
105
|
-
"
|
106
|
-
"
|
107
|
-
"i686-
|
108
|
-
"
|
109
|
-
"i386-
|
110
|
-
"i386-
|
111
|
-
"i386-
|
112
|
-
"i386-
|
113
|
-
"
|
114
|
-
"
|
115
|
-
"
|
116
|
-
"
|
117
|
-
"
|
118
|
-
"
|
119
|
-
"
|
120
|
-
"
|
121
|
-
"
|
122
|
-
"
|
123
|
-
"i386-
|
124
|
-
"
|
125
|
-
"
|
126
|
-
"i386-
|
127
|
-
"i386-
|
128
|
-
"
|
129
|
-
"x86-
|
130
|
-
"x86-
|
131
|
-
"
|
132
|
-
"i386-
|
133
|
-
"i386-
|
134
|
-
"i386-solaris2.
|
135
|
-
"
|
136
|
-
"
|
137
|
-
"x86_64-linux"
|
138
|
-
"x86_64-linux-
|
139
|
-
"x86_64-linux-
|
140
|
-
"
|
141
|
-
"arm-linux-
|
142
|
-
"arm-linux-
|
143
|
-
"arm-linux-
|
144
|
-
"
|
145
|
-
"x86_64-
|
146
|
-
"x86_64-
|
147
|
-
"x86_64-openbsd" => ["x86_64", "openbsd", nil],
|
88
|
+
"amd64-freebsd6" => ["amd64", "freebsd", "6"],
|
89
|
+
"java" => [nil, "java", nil],
|
90
|
+
"jruby" => [nil, "java", nil],
|
91
|
+
"universal-dotnet" => ["universal", "dotnet", nil],
|
92
|
+
"universal-dotnet2.0" => ["universal", "dotnet", "2.0"],
|
93
|
+
"universal-dotnet4.0" => ["universal", "dotnet", "4.0"],
|
94
|
+
"powerpc-aix5.3.0.0" => ["powerpc", "aix", "5"],
|
95
|
+
"powerpc-darwin7" => ["powerpc", "darwin", "7"],
|
96
|
+
"powerpc-darwin8" => ["powerpc", "darwin", "8"],
|
97
|
+
"powerpc-linux" => ["powerpc", "linux", nil],
|
98
|
+
"powerpc64-linux" => ["powerpc64", "linux", nil],
|
99
|
+
"sparc-solaris2.10" => ["sparc", "solaris", "2.10"],
|
100
|
+
"sparc-solaris2.8" => ["sparc", "solaris", "2.8"],
|
101
|
+
"sparc-solaris2.9" => ["sparc", "solaris", "2.9"],
|
102
|
+
"universal-darwin8" => ["universal", "darwin", "8"],
|
103
|
+
"universal-darwin9" => ["universal", "darwin", "9"],
|
104
|
+
"universal-macruby" => ["universal", "macruby", nil],
|
105
|
+
"i386-cygwin" => ["x86", "cygwin", nil],
|
106
|
+
"i686-darwin" => ["x86", "darwin", nil],
|
107
|
+
"i686-darwin8.4.1" => ["x86", "darwin", "8"],
|
108
|
+
"i386-freebsd4.11" => ["x86", "freebsd", "4"],
|
109
|
+
"i386-freebsd5" => ["x86", "freebsd", "5"],
|
110
|
+
"i386-freebsd6" => ["x86", "freebsd", "6"],
|
111
|
+
"i386-freebsd7" => ["x86", "freebsd", "7"],
|
112
|
+
"i386-freebsd" => ["x86", "freebsd", nil],
|
113
|
+
"universal-freebsd" => ["universal", "freebsd", nil],
|
114
|
+
"i386-java1.5" => ["x86", "java", "1.5"],
|
115
|
+
"x86-java1.6" => ["x86", "java", "1.6"],
|
116
|
+
"i386-java1.6" => ["x86", "java", "1.6"],
|
117
|
+
"i686-linux" => ["x86", "linux", nil],
|
118
|
+
"i586-linux" => ["x86", "linux", nil],
|
119
|
+
"i486-linux" => ["x86", "linux", nil],
|
120
|
+
"i386-linux" => ["x86", "linux", nil],
|
121
|
+
"i586-linux-gnu" => ["x86", "linux", "gnu"],
|
122
|
+
"i386-linux-gnu" => ["x86", "linux", "gnu"],
|
123
|
+
"i386-mingw32" => ["x86", "mingw32", nil],
|
124
|
+
"x64-mingw-ucrt" => ["x64", "mingw", "ucrt"],
|
125
|
+
"i386-mswin32" => ["x86", "mswin32", nil],
|
126
|
+
"i386-mswin32_80" => ["x86", "mswin32", "80"],
|
127
|
+
"i386-mswin32-80" => ["x86", "mswin32", "80"],
|
128
|
+
"x86-mswin32" => ["x86", "mswin32", nil],
|
129
|
+
"x86-mswin32_60" => ["x86", "mswin32", "60"],
|
130
|
+
"x86-mswin32-60" => ["x86", "mswin32", "60"],
|
131
|
+
"i386-netbsdelf" => ["x86", "netbsdelf", nil],
|
132
|
+
"i386-openbsd4.0" => ["x86", "openbsd", "4.0"],
|
133
|
+
"i386-solaris2.10" => ["x86", "solaris", "2.10"],
|
134
|
+
"i386-solaris2.8" => ["x86", "solaris", "2.8"],
|
135
|
+
"mswin32" => ["x86", "mswin32", nil],
|
136
|
+
"x86_64-linux" => ["x86_64", "linux", nil],
|
137
|
+
"x86_64-linux-gnu" => ["x86_64", "linux", "gnu"],
|
138
|
+
"x86_64-linux-musl" => ["x86_64", "linux", "musl"],
|
139
|
+
"x86_64-linux-uclibc" => ["x86_64", "linux", "uclibc"],
|
140
|
+
"arm-linux-eabi" => ["arm", "linux", "eabi"],
|
141
|
+
"arm-linux-gnueabi" => ["arm", "linux", "gnueabi"],
|
142
|
+
"arm-linux-musleabi" => ["arm", "linux", "musleabi"],
|
143
|
+
"arm-linux-uclibceabi" => ["arm", "linux", "uclibceabi"],
|
144
|
+
"x86_64-openbsd3.9" => ["x86_64", "openbsd", "3.9"],
|
145
|
+
"x86_64-openbsd4.0" => ["x86_64", "openbsd", "4.0"],
|
146
|
+
"x86_64-openbsd" => ["x86_64", "openbsd", nil],
|
148
147
|
}
|
149
148
|
|
150
149
|
test_cases.each do |arch, expected|
|
@@ -1174,10 +1174,10 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
|
|
1174
1174
|
def start_server(data)
|
1175
1175
|
null_logger = NilLog.new
|
1176
1176
|
s = WEBrick::HTTPServer.new(
|
1177
|
-
:Port
|
1178
|
-
:DocumentRoot
|
1179
|
-
:Logger
|
1180
|
-
:AccessLog
|
1177
|
+
:Port => 0,
|
1178
|
+
:DocumentRoot => nil,
|
1179
|
+
:Logger => null_logger,
|
1180
|
+
:AccessLog => null_logger
|
1181
1181
|
)
|
1182
1182
|
s.mount_proc("/kill") {|req, res| s.shutdown }
|
1183
1183
|
s.mount_proc("/yaml") do |req, res|
|
@@ -110,7 +110,7 @@ Gems to install:
|
|
110
110
|
end
|
111
111
|
|
112
112
|
options = {
|
113
|
-
:gemdeps
|
113
|
+
:gemdeps => "gem.deps.rb",
|
114
114
|
:install_dir => "#{@gemhome}2",
|
115
115
|
}
|
116
116
|
|
@@ -575,7 +575,7 @@ ruby "0"
|
|
575
575
|
rs.resolve
|
576
576
|
|
577
577
|
options = {
|
578
|
-
:development
|
578
|
+
:development => true,
|
579
579
|
:development_shallow => true,
|
580
580
|
}
|
581
581
|
|
@@ -83,7 +83,7 @@ class TestGemRequirement < Gem::TestCase
|
|
83
83
|
Gem::Requirement.parse(Gem::Version.new("2"))
|
84
84
|
end
|
85
85
|
|
86
|
-
if
|
86
|
+
if !(Gem.java_platform? && ENV["JRUBY_OPTS"].to_s.include?("--debug"))
|
87
87
|
def test_parse_deduplication
|
88
88
|
assert_same "~>", Gem::Requirement.parse("~> 1").first
|
89
89
|
end
|
@@ -36,9 +36,9 @@ class TestGemResolverAPISet < Gem::TestCase
|
|
36
36
|
spec_fetcher
|
37
37
|
|
38
38
|
data = [
|
39
|
-
{ :name
|
40
|
-
:number
|
41
|
-
:platform
|
39
|
+
{ :name => "a",
|
40
|
+
:number => "1",
|
41
|
+
:platform => "ruby",
|
42
42
|
:dependencies => [] },
|
43
43
|
]
|
44
44
|
|
@@ -59,13 +59,13 @@ class TestGemResolverAPISet < Gem::TestCase
|
|
59
59
|
spec_fetcher
|
60
60
|
|
61
61
|
data = [
|
62
|
-
{ :name
|
63
|
-
:number
|
64
|
-
:platform
|
62
|
+
{ :name => "a",
|
63
|
+
:number => "1",
|
64
|
+
:platform => "ruby",
|
65
65
|
:dependencies => [] },
|
66
|
-
{ :name
|
67
|
-
:number
|
68
|
-
:platform
|
66
|
+
{ :name => "a",
|
67
|
+
:number => "2.a",
|
68
|
+
:platform => "ruby",
|
69
69
|
:dependencies => [] },
|
70
70
|
]
|
71
71
|
|
@@ -88,9 +88,9 @@ class TestGemResolverAPISet < Gem::TestCase
|
|
88
88
|
spec_fetcher
|
89
89
|
|
90
90
|
data = [
|
91
|
-
{ :name
|
92
|
-
:number
|
93
|
-
:platform
|
91
|
+
{ :name => "a",
|
92
|
+
:number => "1",
|
93
|
+
:platform => "ruby",
|
94
94
|
:dependencies => [] },
|
95
95
|
]
|
96
96
|
|
@@ -5,8 +5,8 @@ class TestGemResolverAPISpecification < Gem::TestCase
|
|
5
5
|
def test_initialize
|
6
6
|
set = Gem::Resolver::APISet.new
|
7
7
|
data = {
|
8
|
-
:name
|
9
|
-
:number
|
8
|
+
:name => "rails",
|
9
|
+
:number => "3.0.3",
|
10
10
|
:platform => Gem::Platform.local.to_s,
|
11
11
|
:dependencies => [
|
12
12
|
["bundler", "~> 1.0"],
|
@@ -44,8 +44,8 @@ class TestGemResolverAPISpecification < Gem::TestCase
|
|
44
44
|
set = Gem::Resolver::APISet.new repo
|
45
45
|
|
46
46
|
data = {
|
47
|
-
:name
|
48
|
-
:number
|
47
|
+
:name => "rails",
|
48
|
+
:number => "3.0.3",
|
49
49
|
:platform => "ruby",
|
50
50
|
:dependencies => [
|
51
51
|
["bundler", "~> 1.0"],
|
@@ -71,8 +71,8 @@ class TestGemResolverAPISpecification < Gem::TestCase
|
|
71
71
|
def test_installable_platform_eh
|
72
72
|
set = Gem::Resolver::APISet.new
|
73
73
|
data = {
|
74
|
-
:name
|
75
|
-
:number
|
74
|
+
:name => "a",
|
75
|
+
:number => "1",
|
76
76
|
:platform => "ruby",
|
77
77
|
:dependencies => [],
|
78
78
|
}
|
@@ -82,8 +82,8 @@ class TestGemResolverAPISpecification < Gem::TestCase
|
|
82
82
|
assert a_spec.installable_platform?
|
83
83
|
|
84
84
|
data = {
|
85
|
-
:name
|
86
|
-
:number
|
85
|
+
:name => "b",
|
86
|
+
:number => "1",
|
87
87
|
:platform => "cpu-other_platform-1",
|
88
88
|
:dependencies => [],
|
89
89
|
}
|
@@ -93,8 +93,8 @@ class TestGemResolverAPISpecification < Gem::TestCase
|
|
93
93
|
refute b_spec.installable_platform?
|
94
94
|
|
95
95
|
data = {
|
96
|
-
:name
|
97
|
-
:number
|
96
|
+
:name => "c",
|
97
|
+
:number => "1",
|
98
98
|
:platform => Gem::Platform.local.to_s,
|
99
99
|
:dependencies => [],
|
100
100
|
}
|
@@ -107,9 +107,9 @@ class TestGemResolverAPISpecification < Gem::TestCase
|
|
107
107
|
def test_source
|
108
108
|
set = Gem::Resolver::APISet.new
|
109
109
|
data = {
|
110
|
-
:name
|
111
|
-
:number
|
112
|
-
:platform
|
110
|
+
:name => "a",
|
111
|
+
:number => "1",
|
112
|
+
:platform => "ruby",
|
113
113
|
:dependencies => [],
|
114
114
|
}
|
115
115
|
|
@@ -126,9 +126,9 @@ class TestGemResolverAPISpecification < Gem::TestCase
|
|
126
126
|
dep_uri = URI(@gem_repo) + "info"
|
127
127
|
set = Gem::Resolver::APISet.new dep_uri
|
128
128
|
data = {
|
129
|
-
:name
|
130
|
-
:number
|
131
|
-
:platform
|
129
|
+
:name => "a",
|
130
|
+
:number => "1",
|
131
|
+
:platform => "ruby",
|
132
132
|
:dependencies => [],
|
133
133
|
}
|
134
134
|
|
@@ -150,9 +150,9 @@ class TestGemResolverAPISpecification < Gem::TestCase
|
|
150
150
|
dep_uri = URI(@gem_repo) + "info"
|
151
151
|
set = Gem::Resolver::APISet.new dep_uri
|
152
152
|
data = {
|
153
|
-
:name
|
154
|
-
:number
|
155
|
-
:platform
|
153
|
+
:name => "j",
|
154
|
+
:number => "1",
|
155
|
+
:platform => "jruby",
|
156
156
|
:dependencies => [],
|
157
157
|
}
|
158
158
|
|
@@ -63,7 +63,7 @@ class TestGemResolverGitSpecification < Gem::TestCase
|
|
63
63
|
|
64
64
|
def test_install_extension
|
65
65
|
pend if Gem.java_platform?
|
66
|
-
pend if
|
66
|
+
pend if RUBY_PLATFORM.include?("mswin") && ENV.key?("GITHUB_ACTIONS") # not working from the beginning
|
67
67
|
name, _, repository, = git_gem "a", 1 do |s|
|
68
68
|
s.extensions << "ext/extconf.rb"
|
69
69
|
end
|
@@ -43,22 +43,22 @@ class TestGemSecurityPolicy < Gem::TestCase
|
|
43
43
|
|
44
44
|
@chain = Gem::Security::Policy.new(
|
45
45
|
"Chain",
|
46
|
-
:verify_data
|
46
|
+
:verify_data => true,
|
47
47
|
:verify_signer => true,
|
48
|
-
:verify_chain
|
49
|
-
:verify_root
|
50
|
-
:only_trusted
|
51
|
-
:only_signed
|
48
|
+
:verify_chain => true,
|
49
|
+
:verify_root => false,
|
50
|
+
:only_trusted => false,
|
51
|
+
:only_signed => false
|
52
52
|
)
|
53
53
|
|
54
54
|
@root = Gem::Security::Policy.new(
|
55
55
|
"Root",
|
56
|
-
:verify_data
|
56
|
+
:verify_data => true,
|
57
57
|
:verify_signer => true,
|
58
|
-
:verify_chain
|
59
|
-
:verify_root
|
60
|
-
:only_trusted
|
61
|
-
:only_signed
|
58
|
+
:verify_chain => true,
|
59
|
+
:verify_root => true,
|
60
|
+
:only_trusted => false,
|
61
|
+
:only_signed => false
|
62
62
|
)
|
63
63
|
end
|
64
64
|
|
@@ -70,7 +70,7 @@ class TestGemSecurityTrustDir < Gem::TestCase
|
|
70
70
|
assert_path_exist @dest_dir
|
71
71
|
|
72
72
|
mask = 040700 & (~File.umask)
|
73
|
-
mask |= 0200000 if
|
73
|
+
mask |= 0200000 if RUBY_PLATFORM.include?("aix")
|
74
74
|
|
75
75
|
assert_equal mask, File.stat(@dest_dir).mode unless win_platform?
|
76
76
|
end
|
@@ -91,7 +91,7 @@ class TestGemSecurityTrustDir < Gem::TestCase
|
|
91
91
|
@trust_dir.verify
|
92
92
|
|
93
93
|
mask = 040700 & (~File.umask)
|
94
|
-
mask |= 0200000 if
|
94
|
+
mask |= 0200000 if RUBY_PLATFORM.include?("aix")
|
95
95
|
|
96
96
|
assert_equal mask, File.stat(@dest_dir).mode unless win_platform?
|
97
97
|
end
|
@@ -1866,9 +1866,9 @@ dependencies: []
|
|
1866
1866
|
|
1867
1867
|
def test_full_name_windows
|
1868
1868
|
test_cases = {
|
1869
|
-
"i386-mswin32"
|
1870
|
-
"i386-mswin32_80"
|
1871
|
-
"i386-mingw32"
|
1869
|
+
"i386-mswin32" => "a-1-x86-mswin32-60",
|
1870
|
+
"i386-mswin32_80" => "a-1-x86-mswin32-80",
|
1871
|
+
"i386-mingw32" => "a-1-x86-mingw32",
|
1872
1872
|
}
|
1873
1873
|
|
1874
1874
|
test_cases.each do |arch, expected|
|
@@ -1969,10 +1969,10 @@ dependencies: []
|
|
1969
1969
|
assert_equal Gem::Platform::RUBY, @a1.platform
|
1970
1970
|
|
1971
1971
|
test_cases = {
|
1972
|
-
"i386-mswin32"
|
1972
|
+
"i386-mswin32" => ["x86", "mswin32", "60"],
|
1973
1973
|
"i386-mswin32_80" => ["x86", "mswin32", "80"],
|
1974
|
-
"i386-mingw32"
|
1975
|
-
"x86-darwin8"
|
1974
|
+
"i386-mingw32" => ["x86", "mingw32", nil ],
|
1975
|
+
"x86-darwin8" => ["x86", "darwin", "8" ],
|
1976
1976
|
}
|
1977
1977
|
|
1978
1978
|
test_cases.each do |arch, expected|
|
@@ -2276,15 +2276,9 @@ Gem::Specification.new do |s|
|
|
2276
2276
|
s.rubygems_version = "#{Gem::VERSION}".freeze
|
2277
2277
|
s.summary = "this is a summary".freeze
|
2278
2278
|
|
2279
|
-
|
2280
|
-
s.specification_version = #{Gem::Specification::CURRENT_SPECIFICATION_VERSION}
|
2281
|
-
end
|
2279
|
+
s.specification_version = #{Gem::Specification::CURRENT_SPECIFICATION_VERSION}
|
2282
2280
|
|
2283
|
-
|
2284
|
-
s.add_runtime_dependency(%q<b>.freeze, [\"= 1\"])
|
2285
|
-
else
|
2286
|
-
s.add_dependency(%q<b>.freeze, [\"= 1\"])
|
2287
|
-
end
|
2281
|
+
s.add_runtime_dependency(%q<b>.freeze, [\"= 1\"])
|
2288
2282
|
end
|
2289
2283
|
SPEC
|
2290
2284
|
|
@@ -2356,15 +2350,9 @@ Gem::Specification.new do |s|
|
|
2356
2350
|
|
2357
2351
|
s.installed_by_version = "#{Gem::VERSION}" if s.respond_to? :installed_by_version
|
2358
2352
|
|
2359
|
-
|
2360
|
-
s.specification_version = #{Gem::Specification::CURRENT_SPECIFICATION_VERSION}
|
2361
|
-
end
|
2353
|
+
s.specification_version = #{Gem::Specification::CURRENT_SPECIFICATION_VERSION}
|
2362
2354
|
|
2363
|
-
|
2364
|
-
s.add_runtime_dependency(%q<b>.freeze, [\"= 1\"])
|
2365
|
-
else
|
2366
|
-
s.add_dependency(%q<b>.freeze, [\"= 1\"])
|
2367
|
-
end
|
2355
|
+
s.add_runtime_dependency(%q<b>.freeze, [\"= 1\"])
|
2368
2356
|
end
|
2369
2357
|
SPEC
|
2370
2358
|
|
@@ -2415,19 +2403,11 @@ Gem::Specification.new do |s|
|
|
2415
2403
|
s.summary = "this is a summary".freeze
|
2416
2404
|
s.test_files = ["test/suite.rb".freeze]
|
2417
2405
|
|
2418
|
-
|
2419
|
-
s.specification_version = 4
|
2420
|
-
end
|
2406
|
+
s.specification_version = 4
|
2421
2407
|
|
2422
|
-
|
2423
|
-
|
2424
|
-
|
2425
|
-
s.add_runtime_dependency(%q<pqa>.freeze, [\"> 0.4\", \"<= 0.6\"])
|
2426
|
-
else
|
2427
|
-
s.add_dependency(%q<rake>.freeze, [\"> 0.4\"])
|
2428
|
-
s.add_dependency(%q<jabber4r>.freeze, [\"> 0.0.0\"])
|
2429
|
-
s.add_dependency(%q<pqa>.freeze, [\"> 0.4\", \"<= 0.6\"])
|
2430
|
-
end
|
2408
|
+
s.add_runtime_dependency(%q<rake>.freeze, [\"> 0.4\"])
|
2409
|
+
s.add_runtime_dependency(%q<jabber4r>.freeze, [\"> 0.0.0\"])
|
2410
|
+
s.add_runtime_dependency(%q<pqa>.freeze, [\"> 0.4\", \"<= 0.6\"])
|
2431
2411
|
end
|
2432
2412
|
SPEC
|
2433
2413
|
|
@@ -2728,6 +2708,39 @@ duplicate dependency on c (>= 1.2.3, development), (~> 1.2) use:
|
|
2728
2708
|
end
|
2729
2709
|
end
|
2730
2710
|
|
2711
|
+
def test_validate_rust_extension_have_missing_cargo_toml_error
|
2712
|
+
util_setup_validate
|
2713
|
+
|
2714
|
+
Dir.chdir @tempdir do
|
2715
|
+
@a1.extensions = ["Cargo.toml"]
|
2716
|
+
File.write File.join(@tempdir, "Cargo.toml"), ""
|
2717
|
+
|
2718
|
+
e = assert_raise Gem::InvalidSpecificationException do
|
2719
|
+
use_ui @ui do
|
2720
|
+
@a1.validate
|
2721
|
+
end
|
2722
|
+
end
|
2723
|
+
|
2724
|
+
assert_match(/but Cargo.lock is not part of the gem files/, e.message)
|
2725
|
+
end
|
2726
|
+
end
|
2727
|
+
|
2728
|
+
def test_validate_rust_extension_have_no_missing_cargo_toml_error
|
2729
|
+
util_setup_validate
|
2730
|
+
|
2731
|
+
Dir.chdir @tempdir do
|
2732
|
+
@a1.extensions = ["Cargo.toml"]
|
2733
|
+
@a1.files << "Cargo.toml"
|
2734
|
+
@a1.files << "Cargo.lock"
|
2735
|
+
File.write File.join(@tempdir, "Cargo.toml"), ""
|
2736
|
+
File.write File.join(@tempdir, "Cargo.lock"), ""
|
2737
|
+
|
2738
|
+
use_ui @ui do
|
2739
|
+
@a1.validate
|
2740
|
+
end
|
2741
|
+
end
|
2742
|
+
end
|
2743
|
+
|
2731
2744
|
def test_validate_description
|
2732
2745
|
util_setup_validate
|
2733
2746
|
|
@@ -3469,10 +3482,10 @@ Did you mean 'Ruby'?
|
|
3469
3482
|
@m1 = quick_gem "m", "1" do |s|
|
3470
3483
|
s.files = %w[lib/code.rb]
|
3471
3484
|
s.metadata = {
|
3472
|
-
"one"
|
3473
|
-
"home"
|
3485
|
+
"one" => "two",
|
3486
|
+
"home" => "three",
|
3474
3487
|
"homepage_uri" => "https://example.com/user/repo",
|
3475
|
-
"funding_uri"
|
3488
|
+
"funding_uri" => "https://example.com/donate",
|
3476
3489
|
}
|
3477
3490
|
end
|
3478
3491
|
|
@@ -372,7 +372,7 @@ create_makefile '#{@spec.name}'
|
|
372
372
|
@user_spec = Gem::Specification.find_by_name "b"
|
373
373
|
|
374
374
|
uninstaller = Gem::Uninstaller.new(@user_spec.name,
|
375
|
-
:executables
|
375
|
+
:executables => true,
|
376
376
|
:user_install => true)
|
377
377
|
|
378
378
|
gem_dir = File.join @user_spec.gem_dir
|