mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rubygems/test_case.rb: Disable loading of keys and certificates
outside rubygems or ruby tests as the files are not available (or necessary). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e8af0046b7
commit
d9422d8721
2 changed files with 18 additions and 3 deletions
|
@ -1006,9 +1006,18 @@ Also, a list:
|
|||
File.expand_path "../../../test/rubygems/#{key_name}_key.pem", __FILE__
|
||||
end
|
||||
|
||||
PRIVATE_KEY = load_key 'private'
|
||||
PUBLIC_KEY = PRIVATE_KEY.public_key
|
||||
# :stopdoc:
|
||||
# only available in RubyGems tests
|
||||
|
||||
PUBLIC_CERT = load_cert 'public'
|
||||
begin
|
||||
PRIVATE_KEY = load_key 'private'
|
||||
PUBLIC_KEY = PRIVATE_KEY.public_key
|
||||
|
||||
PUBLIC_CERT = load_cert 'public'
|
||||
rescue Errno::ENOENT
|
||||
PRIVATE_KEY = nil
|
||||
PUBLIC_KEY = nil
|
||||
PUBLIC_CERT = nil
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue