gem_openssl.rb
来自「Amarok是一款在LINUX或其他类UNIX操作系统中运行的音频播放器软件。 」· RB 代码 · 共 47 行
RB
47 行
#--# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.# All rights reserved.# 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_avilable flag. 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" end end endendbegin require 'openssl' # Reference a constant defined in the .rb portion of ssl (just to # make sure that part is loaded too). dummy = OpenSSL::Digest::SHA1 Gem.ssl_available = truerescue LoadError Gem.ssl_available = falserescue Gem.ssl_available = falseend
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?