1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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:
drbrain 2012-11-29 08:04:04 +00:00
parent d9422d8721
commit 0a7d24cc5a
3 changed files with 14 additions and 10 deletions

View file

@ -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>
* lib/rubygems/test_case.rb: Disable loading of keys and certificates

View file

@ -1010,10 +1010,12 @@ Also, a list:
# only available in RubyGems tests
begin
PRIVATE_KEY = load_key 'private'
PUBLIC_KEY = PRIVATE_KEY.public_key
PRIVATE_KEY = load_key 'private'
PRIVATE_KEY_PATH = key_path 'private'
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
PRIVATE_KEY = nil
PUBLIC_KEY = nil

View file

@ -13,12 +13,7 @@ class TestGemSecuritySigner < Gem::TestCase
def setup
super
@cert_file =
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
@cert_file = PUBLIC_CERT
end
def test_initialize
@ -68,7 +63,7 @@ class TestGemSecuritySigner < Gem::TestCase
end
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