rubygems-update 1.8.30 → 2.0.0.preview2
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 +6 -6
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +3 -0
- data/.autotest +6 -3
- data/History.txt +137 -63
- data/LICENSE.txt +1 -5
- data/Manifest.txt +69 -32
- data/README.rdoc +11 -9
- data/Rakefile +24 -38
- data/bin/gem +0 -9
- data/bin/update_rubygems +1 -0
- data/lib/rubygems.rb +193 -405
- data/lib/rubygems/available_set.rb +95 -0
- data/lib/rubygems/command.rb +88 -45
- data/lib/rubygems/command_manager.rb +67 -40
- data/lib/rubygems/commands/build_command.rb +5 -23
- data/lib/rubygems/commands/cert_command.rb +199 -57
- data/lib/rubygems/commands/check_command.rb +14 -39
- data/lib/rubygems/commands/cleanup_command.rb +9 -1
- data/lib/rubygems/commands/contents_command.rb +30 -12
- data/lib/rubygems/commands/dependency_command.rb +3 -8
- data/lib/rubygems/commands/environment_command.rb +13 -8
- data/lib/rubygems/commands/fetch_command.rb +3 -16
- data/lib/rubygems/commands/generate_index_command.rb +7 -47
- data/lib/rubygems/commands/help_command.rb +1 -1
- data/lib/rubygems/commands/install_command.rb +69 -36
- data/lib/rubygems/commands/list_command.rb +6 -4
- data/lib/rubygems/commands/lock_command.rb +1 -1
- data/lib/rubygems/commands/mirror_command.rb +17 -0
- data/lib/rubygems/commands/outdated_command.rb +6 -3
- data/lib/rubygems/commands/owner_command.rb +13 -5
- data/lib/rubygems/commands/pristine_command.rb +19 -4
- data/lib/rubygems/commands/push_command.rb +12 -1
- data/lib/rubygems/commands/query_command.rb +43 -27
- data/lib/rubygems/commands/rdoc_command.rb +23 -28
- data/lib/rubygems/commands/search_command.rb +4 -18
- data/lib/rubygems/commands/server_command.rb +1 -1
- data/lib/rubygems/commands/setup_command.rb +124 -38
- data/lib/rubygems/commands/sources_command.rb +16 -16
- data/lib/rubygems/commands/specification_command.rb +11 -13
- data/lib/rubygems/commands/uninstall_command.rb +24 -7
- data/lib/rubygems/commands/unpack_command.rb +7 -3
- data/lib/rubygems/commands/update_command.rb +22 -36
- data/lib/rubygems/commands/yank_command.rb +98 -0
- data/lib/rubygems/compatibility.rb +51 -0
- data/lib/rubygems/config_file.rb +82 -54
- data/lib/rubygems/core_ext/kernel_gem.rb +53 -0
- data/lib/rubygems/core_ext/kernel_require.rb +119 -0
- data/lib/rubygems/defaults.rb +10 -21
- data/lib/rubygems/dependency.rb +61 -10
- data/lib/rubygems/dependency_installer.rb +157 -69
- data/lib/rubygems/dependency_list.rb +11 -19
- data/lib/rubygems/dependency_resolver.rb +562 -0
- data/lib/rubygems/deprecate.rb +40 -40
- data/lib/rubygems/errors.rb +77 -24
- data/lib/rubygems/exceptions.rb +25 -7
- data/lib/rubygems/ext/builder.rb +20 -23
- data/lib/rubygems/ext/configure_builder.rb +2 -2
- data/lib/rubygems/ext/ext_conf_builder.rb +5 -45
- data/lib/rubygems/ext/rake_builder.rb +2 -2
- data/lib/rubygems/gem_runner.rb +3 -16
- data/lib/rubygems/gemcutter_utilities.rb +22 -7
- data/lib/rubygems/indexer.rb +6 -159
- data/lib/rubygems/install_message.rb +12 -0
- data/lib/rubygems/install_update_options.rb +56 -18
- data/lib/rubygems/installer.rb +244 -134
- data/lib/rubygems/installer_test_case.rb +71 -19
- data/lib/rubygems/mock_gem_ui.rb +17 -0
- data/lib/rubygems/name_tuple.rb +110 -0
- data/lib/rubygems/package.rb +514 -43
- data/lib/rubygems/package/digest_io.rb +64 -0
- data/lib/rubygems/package/old.rb +147 -0
- data/lib/rubygems/package/tar_header.rb +18 -55
- data/lib/rubygems/package/tar_reader.rb +20 -3
- data/lib/rubygems/package/tar_writer.rb +63 -7
- data/lib/rubygems/package_task.rb +3 -4
- data/lib/rubygems/path_support.rb +14 -7
- data/lib/rubygems/platform.rb +19 -26
- data/lib/rubygems/rdoc.rb +316 -0
- data/lib/rubygems/remote_fetcher.rb +117 -54
- data/lib/rubygems/request_set.rb +182 -0
- data/lib/rubygems/requirement.rb +63 -26
- data/lib/rubygems/security.rb +295 -555
- data/lib/rubygems/security/policies.rb +115 -0
- data/lib/rubygems/security/policy.rb +227 -0
- data/lib/rubygems/security/signer.rb +136 -0
- data/lib/rubygems/security/trust_dir.rb +104 -0
- data/lib/rubygems/server.rb +45 -55
- data/lib/rubygems/source.rb +144 -0
- data/lib/rubygems/source_list.rb +87 -0
- data/lib/rubygems/source_local.rb +92 -0
- data/lib/rubygems/source_specific_file.rb +28 -0
- data/lib/rubygems/spec_fetcher.rb +116 -184
- data/lib/rubygems/specification.rb +731 -335
- data/lib/rubygems/ssl_certs/AddTrustExternalCARoot.pem +88 -30
- data/lib/rubygems/ssl_certs/Entrust_net-Secure-Server-Certification-Authority.pem +90 -0
- data/lib/rubygems/ssl_certs/VerisignClass3PublicPrimaryCertificationAuthority-G2.pem +57 -0
- data/lib/rubygems/syck_hack.rb +2 -0
- data/lib/rubygems/test_case.rb +199 -109
- data/lib/rubygems/test_utilities.rb +25 -5
- data/lib/rubygems/uninstaller.rb +62 -20
- data/lib/rubygems/user_interaction.rb +10 -0
- data/lib/rubygems/validator.rb +33 -40
- data/lib/rubygems/version.rb +19 -8
- data/setup.rb +8 -1
- data/test/rubygems/alternate_cert.pem +9 -0
- data/test/rubygems/alternate_cert_32.pem +9 -0
- data/test/rubygems/alternate_key.pem +9 -0
- data/test/rubygems/bad_rake.rb +1 -0
- data/test/rubygems/child_cert.pem +9 -0
- data/test/rubygems/child_cert_32.pem +9 -0
- data/test/rubygems/child_key.pem +9 -0
- data/test/rubygems/data/null-type.gemspec.rz +0 -0
- data/test/rubygems/expired_cert.pem +9 -0
- data/test/rubygems/future_cert.pem +9 -0
- data/test/rubygems/future_cert_32.pem +9 -0
- data/test/rubygems/good_rake.rb +1 -0
- data/test/rubygems/grandchild_cert.pem +9 -0
- data/test/rubygems/grandchild_cert_32.pem +9 -0
- data/test/rubygems/grandchild_key.pem +9 -0
- data/test/rubygems/invalid_issuer_cert.pem +9 -0
- data/test/rubygems/invalid_issuer_cert_32.pem +9 -0
- data/test/rubygems/invalid_key.pem +9 -0
- data/test/rubygems/invalid_signer_cert.pem +9 -0
- data/test/rubygems/invalid_signer_cert_32.pem +9 -0
- data/test/rubygems/invalidchild_cert.pem +9 -0
- data/test/rubygems/invalidchild_cert_32.pem +9 -0
- data/test/rubygems/invalidchild_key.pem +9 -0
- data/test/rubygems/plugin/exception/rubygems_plugin.rb +1 -1
- data/test/rubygems/plugin/standarderror/rubygems_plugin.rb +1 -1
- data/test/rubygems/private_key.pem +7 -25
- data/test/rubygems/public_cert.pem +8 -18
- data/test/rubygems/public_cert_32.pem +10 -0
- data/test/rubygems/public_key.pem +4 -0
- data/test/rubygems/rubygems/commands/crash_command.rb +1 -1
- data/test/rubygems/test_config.rb +4 -6
- data/test/rubygems/test_deprecate.rb +76 -0
- data/test/rubygems/test_gem.rb +318 -83
- data/test/rubygems/test_gem_available_set.rb +106 -0
- data/test/rubygems/test_gem_command.rb +10 -0
- data/test/rubygems/test_gem_command_manager.rb +55 -9
- data/test/rubygems/test_gem_commands_build_command.rb +11 -19
- data/test/rubygems/test_gem_commands_cert_command.rb +441 -42
- data/test/rubygems/test_gem_commands_cleanup_command.rb +29 -1
- data/test/rubygems/test_gem_commands_contents_command.rb +23 -0
- data/test/rubygems/test_gem_commands_dependency_command.rb +5 -0
- data/test/rubygems/test_gem_commands_fetch_command.rb +19 -20
- data/test/rubygems/test_gem_commands_generate_index_command.rb +2 -83
- data/test/rubygems/test_gem_commands_help_command.rb +2 -1
- data/test/rubygems/test_gem_commands_install_command.rb +647 -48
- data/test/rubygems/test_gem_commands_mirror.rb +32 -0
- data/test/rubygems/test_gem_commands_owner_command.rb +4 -8
- data/test/rubygems/test_gem_commands_pristine_command.rb +99 -4
- data/test/rubygems/test_gem_commands_push_command.rb +62 -8
- data/test/rubygems/test_gem_commands_query_command.rb +51 -0
- data/test/rubygems/test_gem_commands_search_command.rb +25 -0
- data/test/rubygems/test_gem_commands_setup_command.rb +45 -0
- data/test/rubygems/test_gem_commands_sources_command.rb +21 -6
- data/test/rubygems/test_gem_commands_specification_command.rb +33 -1
- data/test/rubygems/test_gem_commands_uninstall_command.rb +91 -31
- data/test/rubygems/test_gem_commands_unpack_command.rb +3 -3
- data/test/rubygems/test_gem_commands_update_command.rb +56 -38
- data/test/rubygems/test_gem_commands_which_command.rb +4 -4
- data/test/rubygems/test_gem_commands_yank_command.rb +97 -0
- data/test/rubygems/test_gem_config_file.rb +66 -21
- data/test/rubygems/test_gem_dependency.rb +46 -0
- data/test/rubygems/test_gem_dependency_installer.rb +228 -18
- data/test/rubygems/test_gem_dependency_list.rb +0 -9
- data/test/rubygems/test_gem_dependency_resolver.rb +327 -0
- data/test/rubygems/test_gem_ext_configure_builder.rb +4 -4
- data/test/rubygems/test_gem_ext_ext_conf_builder.rb +21 -49
- data/test/rubygems/test_gem_ext_rake_builder.rb +13 -13
- data/test/rubygems/test_gem_gem_runner.rb +27 -5
- data/test/rubygems/test_gem_gemcutter_utilities.rb +19 -0
- data/test/rubygems/test_gem_indexer.rb +14 -227
- data/test/rubygems/test_gem_install_update_options.rb +83 -3
- data/test/rubygems/test_gem_installer.rb +211 -236
- data/test/rubygems/test_gem_local_remote_options.rb +8 -2
- data/test/rubygems/test_gem_name_tuple.rb +15 -0
- data/test/rubygems/test_gem_package.rb +547 -0
- data/test/rubygems/test_gem_package_old.rb +37 -0
- data/test/rubygems/test_gem_package_tar_reader.rb +32 -0
- data/test/rubygems/test_gem_package_tar_writer.rb +84 -1
- data/test/rubygems/test_gem_path_support.rb +4 -30
- data/test/rubygems/test_gem_platform.rb +3 -6
- data/test/rubygems/test_gem_rdoc.rb +245 -0
- data/test/rubygems/test_gem_remote_fetcher.rb +51 -5
- data/test/rubygems/test_gem_request_set.rb +70 -0
- data/test/rubygems/test_gem_requirement.rb +53 -24
- data/test/rubygems/test_gem_security.rb +189 -43
- data/test/rubygems/test_gem_security_policy.rb +376 -0
- data/test/rubygems/test_gem_security_signer.rb +184 -0
- data/test/rubygems/test_gem_security_trust_dir.rb +94 -0
- data/test/rubygems/test_gem_server.rb +31 -36
- data/test/rubygems/test_gem_silent_ui.rb +2 -2
- data/test/rubygems/test_gem_source.rb +188 -0
- data/test/rubygems/test_gem_source_list.rb +87 -0
- data/test/rubygems/test_gem_source_local.rb +83 -0
- data/test/rubygems/test_gem_source_specific_file.rb +33 -0
- data/test/rubygems/test_gem_spec_fetcher.rb +91 -255
- data/test/rubygems/test_gem_specification.rb +293 -39
- data/test/rubygems/test_gem_uninstaller.rb +136 -13
- data/test/rubygems/test_gem_validator.rb +14 -41
- data/test/rubygems/test_gem_version.rb +15 -21
- data/test/rubygems/test_require.rb +193 -0
- data/test/rubygems/wrong_key_cert.pem +9 -0
- data/test/rubygems/wrong_key_cert_32.pem +9 -0
- metadata +171 -83
- metadata.gz.sig +1 -0
- data/CVE-2013-4287.txt +0 -36
- data/CVE-2013-4363.txt +0 -45
- data/ci_build.sh +0 -27
- data/cruise_config.rb +0 -32
- data/lib/rbconfig/datadir.rb +0 -13
- data/lib/rubygems/builder.rb +0 -99
- data/lib/rubygems/custom_require.rb +0 -69
- data/lib/rubygems/doc_manager.rb +0 -243
- data/lib/rubygems/format.rb +0 -82
- data/lib/rubygems/gem_openssl.rb +0 -90
- data/lib/rubygems/gem_path_searcher.rb +0 -172
- data/lib/rubygems/old_format.rb +0 -153
- data/lib/rubygems/package/f_sync_dir.rb +0 -23
- data/lib/rubygems/package/tar_input.rb +0 -234
- data/lib/rubygems/package/tar_output.rb +0 -146
- data/lib/rubygems/require_paths_builder.rb +0 -18
- data/lib/rubygems/source_index.rb +0 -406
- data/lib/rubygems/ssl_certs/AddTrustExternalCARoot-2048.pem +0 -25
- data/lib/rubygems/ssl_certs/Class3PublicPrimaryCertificationAuthority.pem +0 -14
- data/lib/rubygems/ssl_certs/DigiCertHighAssuranceEVRootCA.pem +0 -23
- data/lib/rubygems/ssl_certs/EntrustnetSecureServerCertificationAuthority.pem +0 -28
- data/lib/rubygems/ssl_certs/GeoTrustGlobalCA.pem +0 -20
- data/test/rubygems/test_bundled_ca.rb +0 -59
- data/test/rubygems/test_gem_builder.rb +0 -44
- data/test/rubygems/test_gem_doc_manager.rb +0 -32
- data/test/rubygems/test_gem_ext_builder.rb +0 -58
- data/test/rubygems/test_gem_format.rb +0 -88
- data/test/rubygems/test_gem_gem_path_searcher.rb +0 -94
- data/test/rubygems/test_gem_package_tar_input.rb +0 -129
- data/test/rubygems/test_gem_package_tar_output.rb +0 -101
- data/test/rubygems/test_gem_source_index.rb +0 -250
- data/util/update_bundled_ca_certificates.rb +0 -103
data/setup.rb
CHANGED
@@ -5,6 +5,11 @@
|
|
5
5
|
# See LICENSE.txt for permissions.
|
6
6
|
#++
|
7
7
|
|
8
|
+
if RUBY_VERSION < "1.8.7"
|
9
|
+
$stderr.puts "Rubygems now requires Ruby 1.8.7 or later"
|
10
|
+
exit 1
|
11
|
+
end
|
12
|
+
|
8
13
|
# Make sure rubygems isn't already loaded.
|
9
14
|
if ENV['RUBYOPT'] or defined? Gem then
|
10
15
|
ENV.delete 'RUBYOPT'
|
@@ -31,7 +36,9 @@ require 'rubygems/exceptions'
|
|
31
36
|
Gem::CommandManager.instance.register_command :setup
|
32
37
|
|
33
38
|
args = ARGV.clone
|
34
|
-
|
39
|
+
if ENV["GEM_PREV_VER"]
|
40
|
+
args = [ '--previous-version', ENV["GEM_PREV_VER"] ] + args
|
41
|
+
end
|
35
42
|
args.unshift 'setup'
|
36
43
|
|
37
44
|
begin
|
@@ -0,0 +1,9 @@
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
2
|
+
MIIBSjCB9aADAgECAgEBMA0GCSqGSIb3DQEBBQUAMC0xEjAQBgNVBAMMCWFsdGVy
|
3
|
+
bmF0ZTEXMBUGCgmSJomT8ixkARkWB2V4YW1wbGUwIBcNMTIwMTIzMjM0MzIzWhgP
|
4
|
+
OTk5OTEyMzEyMzU5NTlaMC0xEjAQB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AgMBAAEwDQYJKoZIhvcNAQEFBQADQQCjqL4JaoRhCAExVddloKxNajAh
|
8
|
+
VIpjw8FC7bdNhpCrf8bgOHR7UU8r42JdeJ0wR7TyV8a8pXxtd6GLPZvKaZbK
|
9
|
+
-----END CERTIFICATE-----
|
@@ -0,0 +1,9 @@
|
|
1
|
+
-----BEGIN RSA PRIVATE KEY-----
|
2
|
+
MIIBOgIBAAJBAL60XLp5UqlKYdbpB5kbUSBu3PaZw3LBS9Rm9dBUAyH/upbJaQps
|
3
|
+
cBd4B4XDpmFHeMLoywRcIQLBH6OcfSEinakCAwEAAQJAPdi0ce1Ct5Bd5pqwUiEf
|
4
|
+
0Erj8j2vuxmhBANYGPYGBhIe/W4I6JGvaeZgY8/vLHdBSqxYDa417+N1TkgnC8U0
|
5
|
+
GQIhAPpE9Tx4AYxI6EhtS5RSv+yXjNmuGV3iNk9CwZy8WenLAiEAwxI+ejSU2qhn
|
6
|
+
+JhbUd2AhCwokzHPYLIln5NzG1FXN9sCIQC4FTLA+JBC7HmWlHXMMpWi49IhZzKX
|
7
|
+
YMWLxVF+BPipwwIgbd/u1QKc/XRx67JVbY0oAEqnKBGcT0jIrFNvOGneiJUCIB6d
|
8
|
+
vHfEsN61hepd+BWOnw6ProEhPAYnOIAl1eNwdVqI
|
9
|
+
-----END RSA PRIVATE KEY-----
|
@@ -1,2 +1,2 @@
|
|
1
1
|
TestGem::TEST_PLUGIN_EXCEPTION = :loaded
|
2
|
-
raise Exception.new('boom')
|
2
|
+
raise Exception.new('boom')
|
@@ -1,2 +1,2 @@
|
|
1
1
|
TestGem::TEST_PLUGIN_STANDARDERROR = :loaded
|
2
|
-
raise StandardError.new('boom')
|
2
|
+
raise StandardError.new('boom')
|
@@ -1,27 +1,9 @@
|
|
1
1
|
-----BEGIN RSA PRIVATE KEY-----
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
px/l2zJ6F1HM8/bqn4aDXD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ICATE-----
|
2
|
+
MIIBZDCCAQ6gAwIBAgIBATANBgkqhkiG9w0BAQUFADAqMQ8wDQYDVQQDDAZub2Jv
|
3
|
+
ZHkxFzAVBgoJkiaJk/IsZAEZFgdleGFtcGxlMCAXDTEyMDEyNjIzNTYzOFoYDzIw
|
4
|
+
MzgwMTE5MDMxNDA3WjAqMQ8wDQYDVQQDDAZub2JvZHkxFzAVBgoJkiaJk/IsZAEZ
|
5
|
+
FgdleGFtcGxlMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALHKBD9e+mrCnQ7Xs2fd
|
6
|
+
Ehxa+0mpObjlK7dL6hoNF190aoLwQ6xwiCAMT7WPVs4/XW81Nssq2RkHGiWGxIXn
|
7
|
+
MlsCAwEAAaMdMBswGQYDVR0RBBIwEIEObm9ib2R5QGV4YW1wbGUwDQYJKoZIhvcN
|
8
|
+
AQEFBQADQQAMNCoCiTAT4+e+vVeHwdN2HXh+L4YhAm8OCkVtEwX7aJWe/JV6S6Ma
|
9
|
+
XNq1DX0kl6CENeztHU1EZx0CrMn1lyYg
|
10
|
+
-----END CERTIFICATE-----
|
@@ -4,12 +4,10 @@ require 'rubygems'
|
|
4
4
|
class TestConfig < Gem::TestCase
|
5
5
|
|
6
6
|
def test_datadir
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
assert_match(/deprecate/, err)
|
7
|
+
util_make_gems
|
8
|
+
spec = Gem::Specification.find_by_name("a")
|
9
|
+
spec.activate
|
10
|
+
assert_equal "#{spec.full_gem_path}/data/a", Gem.datadir('a')
|
13
11
|
end
|
14
12
|
|
15
13
|
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
require 'rubygems/test_case'
|
2
|
+
# require 'rubygems/builder'
|
3
|
+
# require 'rubygems/package'
|
4
|
+
require 'rubygems/deprecate'
|
5
|
+
|
6
|
+
class TestDeprecate < Gem::TestCase
|
7
|
+
|
8
|
+
def setup
|
9
|
+
super
|
10
|
+
|
11
|
+
# Gem::Deprecate.saved_warnings.clear
|
12
|
+
@original_skip = Gem::Deprecate.skip
|
13
|
+
Gem::Deprecate.skip = false
|
14
|
+
end
|
15
|
+
|
16
|
+
def teardown
|
17
|
+
super
|
18
|
+
|
19
|
+
# Gem::Deprecate.saved_warnings.clear
|
20
|
+
Gem::Deprecate.skip = @original_skip
|
21
|
+
end
|
22
|
+
|
23
|
+
def test_defaults
|
24
|
+
assert_equal false, @original_skip
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_assignment
|
28
|
+
Gem::Deprecate.skip = false
|
29
|
+
assert_equal false, Gem::Deprecate.skip
|
30
|
+
|
31
|
+
Gem::Deprecate.skip = true
|
32
|
+
assert_equal true, Gem::Deprecate.skip
|
33
|
+
|
34
|
+
Gem::Deprecate.skip = nil
|
35
|
+
assert([true,false].include? Gem::Deprecate.skip)
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_skip
|
39
|
+
Gem::Deprecate.skip_during do
|
40
|
+
assert_equal true, Gem::Deprecate.skip
|
41
|
+
end
|
42
|
+
|
43
|
+
Gem::Deprecate.skip = nil
|
44
|
+
end
|
45
|
+
|
46
|
+
class Thing
|
47
|
+
extend Gem::Deprecate
|
48
|
+
attr_accessor :message
|
49
|
+
def foo
|
50
|
+
@message = "foo"
|
51
|
+
end
|
52
|
+
def bar
|
53
|
+
@message = "bar"
|
54
|
+
end
|
55
|
+
deprecate :foo, :bar, 2099, 3
|
56
|
+
end
|
57
|
+
|
58
|
+
def test_deprecated_method_calls_the_old_method
|
59
|
+
capture_io do
|
60
|
+
thing = Thing.new
|
61
|
+
thing.foo
|
62
|
+
assert_equal "foo", thing.message
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
def test_deprecated_method_outputs_a_warning
|
67
|
+
out, err = capture_io do
|
68
|
+
thing = Thing.new
|
69
|
+
thing.foo
|
70
|
+
end
|
71
|
+
|
72
|
+
assert_equal "", out
|
73
|
+
assert_match(/Thing#foo is deprecated; use bar instead\./, err)
|
74
|
+
assert_match(/on or after 2099-03-01/, err)
|
75
|
+
end
|
76
|
+
end
|
data/test/rubygems/test_gem.rb
CHANGED
@@ -1,21 +1,22 @@
|
|
1
1
|
require 'rubygems/test_case'
|
2
2
|
require 'rubygems'
|
3
|
-
require 'rubygems/gem_openssl'
|
4
3
|
require 'rubygems/installer'
|
5
4
|
require 'pathname'
|
6
5
|
require 'tmpdir'
|
7
6
|
|
7
|
+
# TODO: push this up to test_case.rb once battle tested
|
8
|
+
$SAFE=1
|
9
|
+
$LOAD_PATH.map! do |path|
|
10
|
+
path.dup.untaint
|
11
|
+
end
|
12
|
+
|
8
13
|
class TestGem < Gem::TestCase
|
9
14
|
|
10
15
|
def setup
|
11
16
|
super
|
12
17
|
|
18
|
+
ENV.delete 'RUBYGEMS_GEMDEPS'
|
13
19
|
@additional = %w[a b].map { |d| File.join @tempdir, d }
|
14
|
-
@default_dir_re = if RUBY_VERSION > '1.9' then
|
15
|
-
%r|/.*?[Rr]uby.*?/[Gg]ems/[0-9.]+|
|
16
|
-
else
|
17
|
-
%r|/[Rr]uby/[Gg]ems/[0-9.]+|
|
18
|
-
end
|
19
20
|
|
20
21
|
util_remove_interrupt_command
|
21
22
|
end
|
@@ -48,7 +49,7 @@ class TestGem < Gem::TestCase
|
|
48
49
|
end
|
49
50
|
|
50
51
|
def unresolved_names
|
51
|
-
Gem.unresolved_deps.values.map(&:to_s).sort
|
52
|
+
Gem::Specification.unresolved_deps.values.map(&:to_s).sort
|
52
53
|
end
|
53
54
|
|
54
55
|
# TODO: move these to specification
|
@@ -60,7 +61,9 @@ class TestGem < Gem::TestCase
|
|
60
61
|
install_specs a1, b1, b2
|
61
62
|
|
62
63
|
a1.activate
|
63
|
-
|
64
|
+
save_loaded_features do
|
65
|
+
require "b/c"
|
66
|
+
end
|
64
67
|
|
65
68
|
assert_equal %w(a-1 b-1), loaded_spec_names
|
66
69
|
end
|
@@ -131,6 +134,82 @@ class TestGem < Gem::TestCase
|
|
131
134
|
end
|
132
135
|
end
|
133
136
|
|
137
|
+
def test_self_finish_resolve
|
138
|
+
save_loaded_features do
|
139
|
+
a1 = new_spec "a", "1", "b" => "> 0"
|
140
|
+
b1 = new_spec "b", "1", "c" => ">= 1"
|
141
|
+
b2 = new_spec "b", "2", "c" => ">= 2"
|
142
|
+
c1 = new_spec "c", "1"
|
143
|
+
c2 = new_spec "c", "2"
|
144
|
+
|
145
|
+
install_specs a1, b1, b2, c1, c2
|
146
|
+
|
147
|
+
a1.activate
|
148
|
+
|
149
|
+
assert_equal %w(a-1), loaded_spec_names
|
150
|
+
assert_equal ["b (> 0)"], unresolved_names
|
151
|
+
|
152
|
+
Gem.finish_resolve
|
153
|
+
|
154
|
+
assert_equal %w(a-1 b-2 c-2), loaded_spec_names
|
155
|
+
assert_equal [], unresolved_names
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
def test_self_activate_via_require_wtf
|
160
|
+
save_loaded_features do
|
161
|
+
a1 = new_spec "a", "1", "b" => "> 0", "d" => "> 0" # this
|
162
|
+
b1 = new_spec "b", "1", { "c" => ">= 1" }, "lib/b.rb"
|
163
|
+
b2 = new_spec "b", "2", { "c" => ">= 2" }, "lib/b.rb" # this
|
164
|
+
c1 = new_spec "c", "1"
|
165
|
+
c2 = new_spec "c", "2" # this
|
166
|
+
d1 = new_spec "d", "1", { "c" => "< 2" }, "lib/d.rb"
|
167
|
+
d2 = new_spec "d", "2", { "c" => "< 2" }, "lib/d.rb" # this
|
168
|
+
|
169
|
+
install_specs a1, b1, b2, c1, c2, d1, d2
|
170
|
+
|
171
|
+
a1.activate
|
172
|
+
|
173
|
+
assert_equal %w(a-1), loaded_spec_names
|
174
|
+
assert_equal ["b (> 0)", "d (> 0)"], unresolved_names
|
175
|
+
|
176
|
+
require "b"
|
177
|
+
|
178
|
+
e = assert_raises Gem::LoadError do
|
179
|
+
require "d"
|
180
|
+
end
|
181
|
+
|
182
|
+
assert_equal "unable to find a version of 'd' to activate", e.message
|
183
|
+
|
184
|
+
assert_equal %w(a-1 b-2 c-2), loaded_spec_names
|
185
|
+
assert_equal ["d (> 0)"], unresolved_names
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
def test_self_finish_resolve_wtf
|
190
|
+
save_loaded_features do
|
191
|
+
a1 = new_spec "a", "1", "b" => "> 0", "d" => "> 0" # this
|
192
|
+
b1 = new_spec "b", "1", { "c" => ">= 1" }, "lib/b.rb" # this
|
193
|
+
b2 = new_spec "b", "2", { "c" => ">= 2" }, "lib/b.rb"
|
194
|
+
c1 = new_spec "c", "1" # this
|
195
|
+
c2 = new_spec "c", "2"
|
196
|
+
d1 = new_spec "d", "1", { "c" => "< 2" }, "lib/d.rb"
|
197
|
+
d2 = new_spec "d", "2", { "c" => "< 2" }, "lib/d.rb" # this
|
198
|
+
|
199
|
+
install_specs a1, b1, b2, c1, c2, d1, d2
|
200
|
+
|
201
|
+
a1.activate
|
202
|
+
|
203
|
+
assert_equal %w(a-1), loaded_spec_names
|
204
|
+
assert_equal ["b (> 0)", "d (> 0)"], unresolved_names
|
205
|
+
|
206
|
+
Gem.finish_resolve
|
207
|
+
|
208
|
+
assert_equal %w(a-1 b-1 c-1 d-2), loaded_spec_names
|
209
|
+
assert_equal [], unresolved_names
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
134
213
|
# TODO: move these to specification
|
135
214
|
def test_self_activate_ambiguous_unrelated
|
136
215
|
save_loaded_features do
|
@@ -456,16 +535,6 @@ class TestGem < Gem::TestCase
|
|
456
535
|
assert_activate %w[d-1 e-1], e1, "d"
|
457
536
|
end
|
458
537
|
|
459
|
-
def test_self_available?
|
460
|
-
util_make_gems
|
461
|
-
Gem::Deprecate.skip_during do
|
462
|
-
assert(Gem.available?("a"))
|
463
|
-
assert(Gem.available?("a", "1"))
|
464
|
-
assert(Gem.available?("a", ">1"))
|
465
|
-
assert(!Gem.available?("monkeys"))
|
466
|
-
end
|
467
|
-
end
|
468
|
-
|
469
538
|
def test_self_bin_path_no_exec_name
|
470
539
|
e = assert_raises ArgumentError do
|
471
540
|
Gem.bin_path 'a'
|
@@ -523,14 +592,8 @@ class TestGem < Gem::TestCase
|
|
523
592
|
|
524
593
|
def test_self_bindir_default_dir
|
525
594
|
default = Gem.default_dir
|
526
|
-
bindir = if defined?(RUBY_FRAMEWORK_VERSION) then
|
527
|
-
'/usr/bin'
|
528
|
-
else
|
529
|
-
RbConfig::CONFIG['bindir']
|
530
|
-
end
|
531
595
|
|
532
|
-
assert_equal
|
533
|
-
assert_equal bindir, Gem.bindir(Pathname.new(default))
|
596
|
+
assert_equal Gem.default_bindir, Gem.bindir(default)
|
534
597
|
end
|
535
598
|
|
536
599
|
def test_self_clear_paths
|
@@ -573,10 +636,6 @@ class TestGem < Gem::TestCase
|
|
573
636
|
assert_nil Gem.datadir('xyzzy')
|
574
637
|
end
|
575
638
|
|
576
|
-
def test_self_default_dir
|
577
|
-
assert_match @default_dir_re, Gem.default_dir
|
578
|
-
end
|
579
|
-
|
580
639
|
def test_self_default_exec_format
|
581
640
|
orig_RUBY_INSTALL_NAME = Gem::ConfigMap[:ruby_install_name]
|
582
641
|
Gem::ConfigMap[:ruby_install_name] = 'ruby'
|
@@ -681,19 +740,6 @@ class TestGem < Gem::TestCase
|
|
681
740
|
end
|
682
741
|
end
|
683
742
|
|
684
|
-
def test_ensure_ssl_available
|
685
|
-
orig_Gem_ssl_available = Gem.ssl_available?
|
686
|
-
|
687
|
-
Gem.ssl_available = true
|
688
|
-
Gem.ensure_ssl_available
|
689
|
-
|
690
|
-
Gem.ssl_available = false
|
691
|
-
e = assert_raises Gem::Exception do Gem.ensure_ssl_available end
|
692
|
-
assert_equal 'SSL is not installed on this system', e.message
|
693
|
-
ensure
|
694
|
-
Gem.ssl_available = orig_Gem_ssl_available
|
695
|
-
end
|
696
|
-
|
697
743
|
def test_self_find_files
|
698
744
|
cwd = File.expand_path("test/rubygems", @@project_dir)
|
699
745
|
$LOAD_PATH.unshift cwd
|
@@ -756,7 +802,7 @@ class TestGem < Gem::TestCase
|
|
756
802
|
|
757
803
|
Gem.instance_variable_set :@paths, nil
|
758
804
|
|
759
|
-
assert_equal [Gem.
|
805
|
+
assert_equal [Gem.default_path, Gem.dir].flatten.uniq, Gem.path
|
760
806
|
ensure
|
761
807
|
Object.const_set :APPLE_GEM_HOME, orig_APPLE_GEM_HOME if orig_APPLE_GEM_HOME
|
762
808
|
end
|
@@ -795,10 +841,11 @@ class TestGem < Gem::TestCase
|
|
795
841
|
|
796
842
|
ENV['GEM_PATH'] = @additional.join(File::PATH_SEPARATOR)
|
797
843
|
|
798
|
-
assert_equal
|
844
|
+
assert_equal @additional, Gem.path[0,2]
|
799
845
|
|
800
846
|
assert_equal path_count + @additional.size, Gem.path.size,
|
801
847
|
"extra path components: #{Gem.path[2..-1].inspect}"
|
848
|
+
assert_equal Gem.dir, Gem.path.last
|
802
849
|
end
|
803
850
|
|
804
851
|
def test_self_path_duplicate
|
@@ -811,7 +858,8 @@ class TestGem < Gem::TestCase
|
|
811
858
|
|
812
859
|
assert_equal @gemhome, Gem.dir
|
813
860
|
|
814
|
-
|
861
|
+
paths = [Gem.dir]
|
862
|
+
assert_equal @additional + paths, Gem.path
|
815
863
|
end
|
816
864
|
|
817
865
|
def test_self_path_overlap
|
@@ -823,7 +871,8 @@ class TestGem < Gem::TestCase
|
|
823
871
|
|
824
872
|
assert_equal @gemhome, Gem.dir
|
825
873
|
|
826
|
-
|
874
|
+
paths = [Gem.dir]
|
875
|
+
assert_equal @additional + paths, Gem.path
|
827
876
|
end
|
828
877
|
|
829
878
|
def test_self_platforms
|
@@ -933,6 +982,10 @@ class TestGem < Gem::TestCase
|
|
933
982
|
util_restore_RUBY_VERSION
|
934
983
|
end
|
935
984
|
|
985
|
+
def test_self_rubygems_version
|
986
|
+
assert_equal Gem::Version.new(Gem::VERSION), Gem.rubygems_version
|
987
|
+
end
|
988
|
+
|
936
989
|
def test_self_paths_eq
|
937
990
|
other = File.join @tempdir, 'other'
|
938
991
|
path = [@userhome, other].join File::PATH_SEPARATOR
|
@@ -943,7 +996,7 @@ class TestGem < Gem::TestCase
|
|
943
996
|
ENV["GEM_HOME"] = @gemhome
|
944
997
|
Gem.paths = { "GEM_PATH" => path }
|
945
998
|
|
946
|
-
assert_equal [@
|
999
|
+
assert_equal [@userhome, other, @gemhome], Gem.path
|
947
1000
|
end
|
948
1001
|
|
949
1002
|
def test_self_paths_eq_nonexistent_home
|
@@ -956,13 +1009,71 @@ class TestGem < Gem::TestCase
|
|
956
1009
|
|
957
1010
|
Gem.paths = { "GEM_PATH" => other }
|
958
1011
|
|
959
|
-
assert_equal [@gemhome
|
1012
|
+
assert_equal [other, @gemhome], Gem.path
|
960
1013
|
end
|
961
1014
|
|
962
|
-
def
|
963
|
-
Gem
|
964
|
-
|
965
|
-
end
|
1015
|
+
def test_self_post_build
|
1016
|
+
assert_equal 1, Gem.post_build_hooks.length
|
1017
|
+
|
1018
|
+
Gem.post_build do |installer| end
|
1019
|
+
|
1020
|
+
assert_equal 2, Gem.post_build_hooks.length
|
1021
|
+
end
|
1022
|
+
|
1023
|
+
def test_self_post_install
|
1024
|
+
assert_equal 1, Gem.post_install_hooks.length
|
1025
|
+
|
1026
|
+
Gem.post_install do |installer| end
|
1027
|
+
|
1028
|
+
assert_equal 2, Gem.post_install_hooks.length
|
1029
|
+
end
|
1030
|
+
|
1031
|
+
def test_self_done_installing
|
1032
|
+
assert_empty Gem.done_installing_hooks
|
1033
|
+
|
1034
|
+
Gem.done_installing do |gems| end
|
1035
|
+
|
1036
|
+
assert_equal 1, Gem.done_installing_hooks.length
|
1037
|
+
end
|
1038
|
+
|
1039
|
+
def test_self_post_reset
|
1040
|
+
assert_empty Gem.post_reset_hooks
|
1041
|
+
|
1042
|
+
Gem.post_reset { }
|
1043
|
+
|
1044
|
+
assert_equal 1, Gem.post_reset_hooks.length
|
1045
|
+
end
|
1046
|
+
|
1047
|
+
def test_self_post_uninstall
|
1048
|
+
assert_equal 1, Gem.post_uninstall_hooks.length
|
1049
|
+
|
1050
|
+
Gem.post_uninstall do |installer| end
|
1051
|
+
|
1052
|
+
assert_equal 2, Gem.post_uninstall_hooks.length
|
1053
|
+
end
|
1054
|
+
|
1055
|
+
def test_self_pre_install
|
1056
|
+
assert_equal 1, Gem.pre_install_hooks.length
|
1057
|
+
|
1058
|
+
Gem.pre_install do |installer| end
|
1059
|
+
|
1060
|
+
assert_equal 2, Gem.pre_install_hooks.length
|
1061
|
+
end
|
1062
|
+
|
1063
|
+
def test_self_pre_reset
|
1064
|
+
assert_empty Gem.pre_reset_hooks
|
1065
|
+
|
1066
|
+
Gem.pre_reset { }
|
1067
|
+
|
1068
|
+
assert_equal 1, Gem.pre_reset_hooks.length
|
1069
|
+
end
|
1070
|
+
|
1071
|
+
def test_self_pre_uninstall
|
1072
|
+
assert_equal 1, Gem.pre_uninstall_hooks.length
|
1073
|
+
|
1074
|
+
Gem.pre_uninstall do |installer| end
|
1075
|
+
|
1076
|
+
assert_equal 2, Gem.pre_uninstall_hooks.length
|
966
1077
|
end
|
967
1078
|
|
968
1079
|
def test_self_sources
|
@@ -982,19 +1093,7 @@ class TestGem < Gem::TestCase
|
|
982
1093
|
Gem.try_activate 'a_file'
|
983
1094
|
end
|
984
1095
|
|
985
|
-
assert_match %r%Could not find b %, e.message
|
986
|
-
end
|
987
|
-
|
988
|
-
def test_ssl_available_eh
|
989
|
-
orig_Gem_ssl_available = Gem.ssl_available?
|
990
|
-
|
991
|
-
Gem.ssl_available = true
|
992
|
-
assert_equal true, Gem.ssl_available?
|
993
|
-
|
994
|
-
Gem.ssl_available = false
|
995
|
-
assert_equal false, Gem.ssl_available?
|
996
|
-
ensure
|
997
|
-
Gem.ssl_available = orig_Gem_ssl_available
|
1096
|
+
assert_match %r%Could not find 'b' %, e.message
|
998
1097
|
end
|
999
1098
|
|
1000
1099
|
def test_self_use_paths
|
@@ -1003,7 +1102,7 @@ class TestGem < Gem::TestCase
|
|
1003
1102
|
Gem.use_paths @gemhome, @additional
|
1004
1103
|
|
1005
1104
|
assert_equal @gemhome, Gem.dir
|
1006
|
-
assert_equal [Gem.dir
|
1105
|
+
assert_equal @additional + [Gem.dir], Gem.path
|
1007
1106
|
end
|
1008
1107
|
|
1009
1108
|
def test_self_user_dir
|
@@ -1019,6 +1118,46 @@ class TestGem < Gem::TestCase
|
|
1019
1118
|
end
|
1020
1119
|
end
|
1021
1120
|
|
1121
|
+
def test_self_needs
|
1122
|
+
util_clear_gems
|
1123
|
+
a = util_spec "a", "1"
|
1124
|
+
b = util_spec "b", "1", "c" => nil
|
1125
|
+
c = util_spec "c", "2"
|
1126
|
+
|
1127
|
+
install_specs a, b, c
|
1128
|
+
|
1129
|
+
Gem.needs do |r|
|
1130
|
+
r.gem "a"
|
1131
|
+
r.gem "b", "= 1"
|
1132
|
+
end
|
1133
|
+
|
1134
|
+
activated = Gem::Specification.map { |x| x.full_name }
|
1135
|
+
|
1136
|
+
assert_equal %w!a-1 b-1 c-2!, activated.sort
|
1137
|
+
end
|
1138
|
+
|
1139
|
+
def test_self_needs_picks_up_unresolved_deps
|
1140
|
+
save_loaded_features do
|
1141
|
+
util_clear_gems
|
1142
|
+
a = util_spec "a", "1"
|
1143
|
+
b = util_spec "b", "1", "c" => nil
|
1144
|
+
c = util_spec "c", "2"
|
1145
|
+
d = new_spec "d", "1", {'e' => '= 1'}, "lib/d.rb"
|
1146
|
+
e = util_spec "e", "1"
|
1147
|
+
|
1148
|
+
install_specs a, b, c, d, e
|
1149
|
+
|
1150
|
+
Gem.needs do |r|
|
1151
|
+
r.gem "a"
|
1152
|
+
r.gem "b", "= 1"
|
1153
|
+
|
1154
|
+
require 'd'
|
1155
|
+
end
|
1156
|
+
|
1157
|
+
assert_equal %w!a-1 b-1 c-2 d-1 e-1!, loaded_spec_names
|
1158
|
+
end
|
1159
|
+
end
|
1160
|
+
|
1022
1161
|
if Gem.win_platform? && '1.9' > RUBY_VERSION
|
1023
1162
|
# Ruby 1.9 properly handles ~ path expansion, so no need to run such tests.
|
1024
1163
|
def test_self_user_home_userprofile
|
@@ -1105,23 +1244,6 @@ class TestGem < Gem::TestCase
|
|
1105
1244
|
assert_equal :loaded, TEST_PLUGIN_EXCEPTION rescue nil
|
1106
1245
|
end
|
1107
1246
|
|
1108
|
-
def test_latest_load_paths
|
1109
|
-
spec = quick_spec 'a', '4' do |s|
|
1110
|
-
s.require_paths = ["lib"]
|
1111
|
-
end
|
1112
|
-
|
1113
|
-
install_gem spec
|
1114
|
-
|
1115
|
-
# @exec_path = File.join spec.full_gem_path, spec.bindir, 'exec'
|
1116
|
-
# @abin_path = File.join spec.full_gem_path, spec.bindir, 'abin'
|
1117
|
-
# FileUtils.mkdir_p File.join(stem, "gems", "test-3")
|
1118
|
-
|
1119
|
-
Gem::Deprecate.skip_during do
|
1120
|
-
expected = [File.join(@gemhome, "gems", "a-4", "lib")]
|
1121
|
-
assert_equal expected, Gem.latest_load_paths
|
1122
|
-
end
|
1123
|
-
end
|
1124
|
-
|
1125
1247
|
def test_gem_path_ordering
|
1126
1248
|
refute_equal Gem.dir, Gem.user_dir
|
1127
1249
|
|
@@ -1202,6 +1324,119 @@ class TestGem < Gem::TestCase
|
|
1202
1324
|
"Wrong spec selected"
|
1203
1325
|
end
|
1204
1326
|
|
1327
|
+
def test_auto_activation_of_specific_gemdeps_file
|
1328
|
+
util_clear_gems
|
1329
|
+
|
1330
|
+
a = new_spec "a", "1", nil, "lib/a.rb"
|
1331
|
+
b = new_spec "b", "1", nil, "lib/b.rb"
|
1332
|
+
c = new_spec "c", "1", nil, "lib/c.rb"
|
1333
|
+
|
1334
|
+
install_specs a, b, c
|
1335
|
+
|
1336
|
+
path = File.join @tempdir, "gem.deps.rb"
|
1337
|
+
|
1338
|
+
File.open path, "w" do |f|
|
1339
|
+
f.puts "gem 'a'"
|
1340
|
+
f.puts "gem 'b'"
|
1341
|
+
f.puts "gem 'c'"
|
1342
|
+
end
|
1343
|
+
|
1344
|
+
ENV['RUBYGEMS_GEMDEPS'] = path
|
1345
|
+
|
1346
|
+
Gem.detect_gemdeps
|
1347
|
+
|
1348
|
+
assert_equal %w!a-1 b-1 c-1!, loaded_spec_names
|
1349
|
+
end
|
1350
|
+
|
1351
|
+
def test_auto_activation_of_detected_gemdeps_file
|
1352
|
+
util_clear_gems
|
1353
|
+
|
1354
|
+
a = new_spec "a", "1", nil, "lib/a.rb"
|
1355
|
+
b = new_spec "b", "1", nil, "lib/b.rb"
|
1356
|
+
c = new_spec "c", "1", nil, "lib/c.rb"
|
1357
|
+
|
1358
|
+
install_specs a, b, c
|
1359
|
+
|
1360
|
+
path = File.join @tempdir, "gem.deps.rb"
|
1361
|
+
|
1362
|
+
File.open path, "w" do |f|
|
1363
|
+
f.puts "gem 'a'"
|
1364
|
+
f.puts "gem 'b'"
|
1365
|
+
f.puts "gem 'c'"
|
1366
|
+
end
|
1367
|
+
|
1368
|
+
ENV['RUBYGEMS_GEMDEPS'] = "-"
|
1369
|
+
|
1370
|
+
assert_equal [a,b,c], Gem.detect_gemdeps
|
1371
|
+
end
|
1372
|
+
|
1373
|
+
LIB_PATH = File.expand_path "../../../lib".untaint, __FILE__.untaint
|
1374
|
+
|
1375
|
+
def test_looks_for_gemdeps_files_automatically_on_start
|
1376
|
+
util_clear_gems
|
1377
|
+
|
1378
|
+
a = new_spec "a", "1", nil, "lib/a.rb"
|
1379
|
+
b = new_spec "b", "1", nil, "lib/b.rb"
|
1380
|
+
c = new_spec "c", "1", nil, "lib/c.rb"
|
1381
|
+
|
1382
|
+
install_specs a, b, c
|
1383
|
+
|
1384
|
+
path = File.join @tempdir, "gem.deps.rb"
|
1385
|
+
|
1386
|
+
File.open path, "w" do |f|
|
1387
|
+
f.puts "gem 'a'"
|
1388
|
+
f.puts "gem 'b'"
|
1389
|
+
f.puts "gem 'c'"
|
1390
|
+
end
|
1391
|
+
|
1392
|
+
path = File.join(@tempdir, "gd-tmp")
|
1393
|
+
install_gem a, :install_dir => path
|
1394
|
+
install_gem b, :install_dir => path
|
1395
|
+
install_gem c, :install_dir => path
|
1396
|
+
|
1397
|
+
ENV['GEM_PATH'] = path
|
1398
|
+
ENV['RUBYGEMS_GEMDEPS'] = "-"
|
1399
|
+
|
1400
|
+
out = `#{Gem.ruby.untaint} -I #{LIB_PATH.untaint} -rubygems -e "p Gem.loaded_specs.values.map(&:full_name).sort"`
|
1401
|
+
|
1402
|
+
assert_equal '["a-1", "b-1", "c-1"]', out.strip
|
1403
|
+
end
|
1404
|
+
|
1405
|
+
def test_looks_for_gemdeps_files_automatically_on_start_in_parent_dir
|
1406
|
+
util_clear_gems
|
1407
|
+
|
1408
|
+
a = new_spec "a", "1", nil, "lib/a.rb"
|
1409
|
+
b = new_spec "b", "1", nil, "lib/b.rb"
|
1410
|
+
c = new_spec "c", "1", nil, "lib/c.rb"
|
1411
|
+
|
1412
|
+
install_specs a, b, c
|
1413
|
+
|
1414
|
+
path = File.join @tempdir, "gem.deps.rb"
|
1415
|
+
|
1416
|
+
File.open path, "w" do |f|
|
1417
|
+
f.puts "gem 'a'"
|
1418
|
+
f.puts "gem 'b'"
|
1419
|
+
f.puts "gem 'c'"
|
1420
|
+
end
|
1421
|
+
|
1422
|
+
path = File.join(@tempdir, "gd-tmp")
|
1423
|
+
install_gem a, :install_dir => path
|
1424
|
+
install_gem b, :install_dir => path
|
1425
|
+
install_gem c, :install_dir => path
|
1426
|
+
|
1427
|
+
ENV['GEM_PATH'] = path
|
1428
|
+
ENV['RUBYGEMS_GEMDEPS'] = "-"
|
1429
|
+
|
1430
|
+
Dir.mkdir "sub1"
|
1431
|
+
out = Dir.chdir "sub1" do
|
1432
|
+
`#{Gem.ruby.untaint} -I #{LIB_PATH.untaint} -rubygems -e "p Gem.loaded_specs.values.map(&:full_name).sort"`
|
1433
|
+
end
|
1434
|
+
|
1435
|
+
Dir.rmdir "sub1"
|
1436
|
+
|
1437
|
+
assert_equal '["a-1", "b-1", "c-1"]', out.strip
|
1438
|
+
end
|
1439
|
+
|
1205
1440
|
def with_plugin(path)
|
1206
1441
|
test_plugin_path = File.expand_path("test/rubygems/plugin/#{path}",
|
1207
1442
|
@@project_dir)
|