diff options
author | elijah <elijah@riseup.net> | 2014-10-28 11:21:21 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2014-10-28 11:21:21 -0700 |
commit | dddbaa40ed9abb1031ccdce21c3d6769dbc5b112 (patch) | |
tree | adec8224af0906c291cd7daa63f1dc1c359851fd /lib/leap_cli/util | |
parent | 8067a244be533aac273725bef70618bae6f557cc (diff) |
autoload some of the external dependencies that are rarely used, so that we don't need to load them every time.
Diffstat (limited to 'lib/leap_cli/util')
-rw-r--r-- | lib/leap_cli/util/secret.rb | 2 | ||||
-rw-r--r-- | lib/leap_cli/util/x509.rb | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/leap_cli/util/secret.rb b/lib/leap_cli/util/secret.rb index a6bd7a3..837a0af 100644 --- a/lib/leap_cli/util/secret.rb +++ b/lib/leap_cli/util/secret.rb @@ -4,7 +4,7 @@ # # Uses OpenSSL random number generator instead of Ruby's rand function # -require 'openssl' +autoload :OpenSSL, 'openssl' module LeapCli; module Util class Secret diff --git a/lib/leap_cli/util/x509.rb b/lib/leap_cli/util/x509.rb index 9ecd92d..787fdfa 100644 --- a/lib/leap_cli/util/x509.rb +++ b/lib/leap_cli/util/x509.rb @@ -1,5 +1,6 @@ -require 'openssl' -require 'certificate_authority' +autoload :OpenSSL, 'openssl' +autoload :CertificateAuthority, 'certificate_authority' + require 'digest' require 'digest/md5' require 'digest/sha1' |