matschaffer/knife-solo — pull request #265 by matschaffer (2013-07-20 18:17:48+00:00)
Title: Small refactor to cache SSH connections

In the interest of iteration I thought it might make sense to start
merging this now.

All this does is pull the basic command running mechanism into a cached
SshConnection object so we can re-use them and get a speed gain.

Testing on my local ubuntu instance
(test/performance/ssh_performance_test.rb) yielded good results when
testing cached & uncached behavior:

```
Rehearsal ----------------------------------------------
cached: 0.260000 0.040000 0.300000 ( 2.814596)
uncached: 0.780000 0.100000 0.880000 ( 11.084209)
------------------------------------- total: 1.180000sec

user system total real
cached: 0.260000 0.040000 0.300000 ( 2.886833)
uncached: 0.760000 0.100000 0.860000 ( 10.811572)
```