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

Update to RubyGems 1.3.4 r2223

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2009-06-09 21:38:59 +00:00
parent a6afbaeb3b
commit 31c94ffeb5
126 changed files with 7610 additions and 3747 deletions

View file

@ -4,23 +4,30 @@
# See LICENSE.txt for permissions.
#++
#--
# Some system might not have OpenSSL installed, therefore the core
# library file openssl might not be available. We localize testing
# for the presence of OpenSSL in this file.
#++
module Gem
class << self
##
# Is SSL (used by the signing commands) available on this
# platform?
def ssl_available?
require 'rubygems/gem_openssl'
@ssl_available
end
# Set the value of the ssl_available flag.
##
# Is SSL available?
attr_writer :ssl_available
##
# Ensure that SSL is available. Throw an exception if it is not.
def ensure_ssl_available
unless ssl_available?
fail Gem::Exception, "SSL is not installed on this system"
@ -61,6 +68,8 @@ rescue LoadError, StandardError
Gem.ssl_available = false
end
# :stopdoc:
module Gem::SSL
# We make our own versions of the constants here. This allows us
@ -70,7 +79,7 @@ module Gem::SSL
# These constants are only used during load time. At runtime, any
# method that makes a direct reference to SSL software must be
# protected with a Gem.ensure_ssl_available call.
#
if Gem.ssl_available? then
PKEY_RSA = OpenSSL::PKey::RSA
DIGEST_SHA1 = OpenSSL::Digest::SHA1
@ -81,3 +90,5 @@ module Gem::SSL
end
# :startdoc: