mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] Make sure tests at least load without openssl
https://github.com/rubygems/rubygems/commit/054d57f74b
This commit is contained in:
parent
779f1a9c69
commit
e1494145d9
Notes:
git
2020-07-31 21:08:15 +09:00
4 changed files with 13 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
require 'base64'
|
||||
require 'digest'
|
||||
require 'openssl'
|
||||
require 'rubygems/openssl'
|
||||
|
||||
##
|
||||
# S3URISigner implements AWS SigV4 for S3 Source to avoid a dependency on the aws-sdk-* gems
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/test_case'
|
||||
require 'net/http'
|
||||
require 'rubygems/openssl'
|
||||
|
||||
unless defined?(OpenSSL::SSL)
|
||||
warn 'Skipping bundled certificates tests. openssl not found.'
|
||||
end
|
||||
|
||||
require 'rubygems/request'
|
||||
|
||||
# = Testing Bundled CA
|
||||
|
@ -52,4 +58,4 @@ class TestBundledCA < Gem::TestCase
|
|||
def test_accessing_new_index
|
||||
assert_https('fastly.rubygems.org')
|
||||
end
|
||||
end
|
||||
end if defined?(OpenSSL::SSL)
|
||||
|
|
|
@ -840,6 +840,8 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|||
assert_equal %w[a-1-cpu-other_platform-1], inst.installed_gems.map {|s| s.full_name }
|
||||
end
|
||||
|
||||
require 'rubygems/openssl'
|
||||
|
||||
if defined? OpenSSL
|
||||
def test_install_security_policy
|
||||
util_setup_gems
|
||||
|
|
|
@ -2431,6 +2431,9 @@ end
|
|||
end
|
||||
|
||||
def test_to_ruby_with_rsa_key
|
||||
require 'rubygems/openssl'
|
||||
skip 'openssl is missing' unless defined?(OpenSSL::PKey::RSA)
|
||||
|
||||
rsa_key = OpenSSL::PKey::RSA.new(2048)
|
||||
@a2.signing_key = rsa_key
|
||||
ruby_code = @a2.to_ruby
|
||||
|
|
Loading…
Reference in a new issue