diff options
author | Brice Figureau <brice-puppet@daysofwonder.com> | 2011-05-07 17:43:58 +0200 |
---|---|---|
committer | Brice Figureau <brice-puppet@daysofwonder.com> | 2011-05-07 17:43:58 +0200 |
commit | 37225200eb39af65dc9eeabb7ae3e6e7571fa602 (patch) | |
tree | 40495430f0f4ca5d4161b7cbc4f64a4350449752 | |
parent | b983386ece1b9816e6d3d59a316ad589e35773df (diff) | |
download | puppet-37225200eb39af65dc9eeabb7ae3e6e7571fa602.tar.gz puppet-37225200eb39af65dc9eeabb7ae3e6e7571fa602.tar.xz puppet-37225200eb39af65dc9eeabb7ae3e6e7571fa602.zip |
Fix #7299 - do not require net/ssh for running rake spec
This is a different fix than the one proposed by Stefan Schulte, based
on Luke comments.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
-rw-r--r-- | lib/puppet/util/network_device/transport/ssh.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/puppet/util/network_device/transport/ssh.rb b/lib/puppet/util/network_device/transport/ssh.rb index bf0e7193c..3d7976543 100644 --- a/lib/puppet/util/network_device/transport/ssh.rb +++ b/lib/puppet/util/network_device/transport/ssh.rb @@ -2,7 +2,6 @@ require 'puppet/util/network_device' require 'puppet/util/network_device/transport' require 'puppet/util/network_device/transport/base' -require 'net/ssh' # This is an adaptation/simplification of gem net-ssh-telnet, which aims to have # a sane interface to Net::SSH. Credits goes to net-ssh-telnet authors @@ -12,6 +11,9 @@ class Puppet::Util::NetworkDevice::Transport::Ssh < Puppet::Util::NetworkDevice: def initialize super + unless Puppet.features.ssh? + raise 'Connecting with ssh to a network device requires the \'net/ssh\' ruby library' + end end def handles_login? |