summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--lib/rubygems/test_case.rb8
-rw-r--r--test/rubygems/test_gem_security_signer.rb9
3 files changed, 14 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 5896e16..4103273 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb
index 8d34a03..a652cec 100644
--- a/lib/rubygems/test_case.rb
+++ b/lib/rubygems/test_case.rb
@@ -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
diff --git a/test/rubygems/test_gem_security_signer.rb b/test/rubygems/test_gem_security_signer.rb
index cf9ea21..1db023b 100644
--- a/test/rubygems/test_gem_security_signer.rb
+++ b/test/rubygems/test_gem_security_signer.rb
@@ -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