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/commands | |
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/commands')
-rw-r--r-- | lib/leap_cli/commands/ca.rb | 6 | ||||
-rw-r--r-- | lib/leap_cli/commands/node.rb | 4 | ||||
-rw-r--r-- | lib/leap_cli/commands/user.rb | 2 | ||||
-rw-r--r-- | lib/leap_cli/commands/vagrant.rb | 2 |
4 files changed, 6 insertions, 8 deletions
diff --git a/lib/leap_cli/commands/ca.rb b/lib/leap_cli/commands/ca.rb index ecc324b..579e305 100644 --- a/lib/leap_cli/commands/ca.rb +++ b/lib/leap_cli/commands/ca.rb @@ -1,6 +1,6 @@ -require 'openssl' -require 'certificate_authority' -require 'date' +autoload :OpenSSL, 'openssl' +autoload :CertificateAuthority, 'certificate_authority' +autoload :Date, 'date' require 'digest/md5' module LeapCli; module Commands diff --git a/lib/leap_cli/commands/node.rb b/lib/leap_cli/commands/node.rb index 304d86b..ba637f8 100644 --- a/lib/leap_cli/commands/node.rb +++ b/lib/leap_cli/commands/node.rb @@ -1,6 +1,4 @@ -require 'net/ssh/known_hosts' -require 'tempfile' -require 'ipaddr' +autoload :IPAddr, 'ipaddr' module LeapCli; module Commands diff --git a/lib/leap_cli/commands/user.rb b/lib/leap_cli/commands/user.rb index d7c21db..a1b4c43 100644 --- a/lib/leap_cli/commands/user.rb +++ b/lib/leap_cli/commands/user.rb @@ -1,4 +1,4 @@ -require 'gpgme' +autoload :GPGME, 'gpgme' # # perhaps we want to verify that the key files are actually the key files we expect. diff --git a/lib/leap_cli/commands/vagrant.rb b/lib/leap_cli/commands/vagrant.rb index 24310e2..6227ece 100644 --- a/lib/leap_cli/commands/vagrant.rb +++ b/lib/leap_cli/commands/vagrant.rb @@ -1,4 +1,4 @@ -require 'ipaddr' +autoload :IPAddr, 'ipaddr' require 'fileutils' module LeapCli; module Commands |