ruby-changes:25925
From: drbrain <ko1@a...>
Date: Thu, 29 Nov 2012 17:04:16 +0900 (JST)
Subject: [ruby-changes:25925] drbrain:r37982 (trunk): * lib/rubygems/test_case.rb: Determine path to certificates to avoid
drbrain 2012-11-29 17:04:04 +0900 (Thu, 29 Nov 2012) New Revision: 37982 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=37982 Log: * 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. Modified files: trunk/ChangeLog trunk/lib/rubygems/test_case.rb trunk/test/rubygems/test_gem_security_signer.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 37981) +++ ChangeLog (revision 37982) @@ -1,3 +1,10 @@ +Thu Nov 29 17:03:38 2012 Eric Hodel <drbrain@s...> + + * 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@s...> * lib/rubygems/test_case.rb: Disable loading of keys and certificates Index: lib/rubygems/test_case.rb =================================================================== --- lib/rubygems/test_case.rb (revision 37981) +++ lib/rubygems/test_case.rb (revision 37982) @@ -1010,10 +1010,12 @@ # 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 Index: test/rubygems/test_gem_security_signer.rb =================================================================== --- test/rubygems/test_gem_security_signer.rb (revision 37981) +++ test/rubygems/test_gem_security_signer.rb (revision 37982) @@ -13,12 +13,7 @@ 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 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/