diff options
Diffstat (limited to 'lib/leap_cli/util')
-rw-r--r-- | lib/leap_cli/util/remote_command.rb | 12 | ||||
-rw-r--r-- | lib/leap_cli/util/secret.rb | 2 | ||||
-rw-r--r-- | lib/leap_cli/util/x509.rb | 5 |
3 files changed, 15 insertions, 4 deletions
diff --git a/lib/leap_cli/util/remote_command.rb b/lib/leap_cli/util/remote_command.rb index 6b4d75f..6353e36 100644 --- a/lib/leap_cli/util/remote_command.rb +++ b/lib/leap_cli/util/remote_command.rb @@ -78,10 +78,20 @@ module LeapCli; module Util; module RemoteCommand :keys_only => false, # Don't you dare change this. :global_known_hosts_file => path(:known_hosts), :user_known_hosts_file => '/dev/null', - :paranoid => true + :paranoid => true, + :verbose => net_ssh_log_level } end + def net_ssh_log_level + case LeapCli.log_level + when 1 then 3 + when 2 then 2 + when 3 then 1 + else 0 + end + end + # # For notes on advanced ways to set server-specific options, see # http://railsware.com/blog/2011/11/02/advanced-server-definitions-in-capistrano/ 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' |