Skip to content

Commit

Permalink
[rubygems/rubygems] Move openssl require to a separate file
Browse files Browse the repository at this point in the history
So it can be reused.

rubygems/rubygems@b9fc6e40db
  • Loading branch information
deivid-rodriguez authored and hsbt committed Jul 31, 2020
1 parent 6b14249 commit 69fa0d6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 7 additions & 0 deletions lib/rubygems/openssl.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

begin
require "openssl"
rescue LoadError => e
raise unless e.path == 'openssl'
end
7 changes: 1 addition & 6 deletions lib/rubygems/security.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@

require 'rubygems/exceptions'
require 'fileutils'

begin
require 'openssl'
rescue LoadError => e
raise unless e.path == 'openssl'
end
require_relative 'openssl'

##
# = Signing gems
Expand Down

0 comments on commit 69fa0d6

Please sign in to comment.