* lib/rubygems/test_case.rb: Determine path to certificates to avoid
build-dir problems. * test/rubygems/test_gem_security_signer.rb: Use predetermined paths to avoid build-dir problems. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d9422d8721
commit
0a7d24cc5a
@ -1,3 +1,10 @@
|
|||||||
|
Thu Nov 29 17:03:38 2012 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
|
* lib/rubygems/test_case.rb: Determine path to certificates to avoid
|
||||||
|
build-dir problems.
|
||||||
|
* test/rubygems/test_gem_security_signer.rb: Use predetermined paths
|
||||||
|
to avoid build-dir problems.
|
||||||
|
|
||||||
Thu Nov 29 16:18:14 2012 Eric Hodel <drbrain@segment7.net>
|
Thu Nov 29 16:18:14 2012 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
* lib/rubygems/test_case.rb: Disable loading of keys and certificates
|
* lib/rubygems/test_case.rb: Disable loading of keys and certificates
|
||||||
|
@ -1011,9 +1011,11 @@ Also, a list:
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
PRIVATE_KEY = load_key 'private'
|
PRIVATE_KEY = load_key 'private'
|
||||||
|
PRIVATE_KEY_PATH = key_path 'private'
|
||||||
PUBLIC_KEY = PRIVATE_KEY.public_key
|
PUBLIC_KEY = PRIVATE_KEY.public_key
|
||||||
|
|
||||||
PUBLIC_CERT = load_cert 'public'
|
PUBLIC_CERT = load_cert 'public'
|
||||||
|
PUBLIC_CERT_PATH = cert_path 'public'
|
||||||
rescue Errno::ENOENT
|
rescue Errno::ENOENT
|
||||||
PRIVATE_KEY = nil
|
PRIVATE_KEY = nil
|
||||||
PUBLIC_KEY = nil
|
PUBLIC_KEY = nil
|
||||||
|
@ -13,12 +13,7 @@ class TestGemSecuritySigner < Gem::TestCase
|
|||||||
def setup
|
def setup
|
||||||
super
|
super
|
||||||
|
|
||||||
@cert_file =
|
@cert_file = PUBLIC_CERT
|
||||||
if 32 == (Time.at(2**32) rescue 32) then
|
|
||||||
File.expand_path 'test/rubygems/public_cert_32.pem', @current_dir
|
|
||||||
else
|
|
||||||
File.expand_path 'test/rubygems/public_cert.pem', @current_dir
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_initialize
|
def test_initialize
|
||||||
@ -68,7 +63,7 @@ class TestGemSecuritySigner < Gem::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_initialize_key_path
|
def test_initialize_key_path
|
||||||
key_file = File.expand_path 'test/rubygems/private_key.pem', @current_dir
|
key_file = PRIVATE_KEY_PATH
|
||||||
|
|
||||||
signer = Gem::Security::Signer.new key_file, nil
|
signer = Gem::Security::Signer.new key_file, nil
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user