coverage/index.html in net-ssh-simple-1.6.2 vs coverage/index.html in net-ssh-simple-1.6.3
- old
+ new
@@ -12,30 +12,30 @@
<body>
<div id="loading">
<img src="./assets/0.7.1/loading.gif" alt="loading"/>
</div>
<div id="wrapper" style="display:none;">
- <div class="timestamp">Generated <abbr class="timeago" title="2013-01-26T17:18:45+01:00">2013-01-26T17:18:45+01:00</abbr></div>
+ <div class="timestamp">Generated <abbr class="timeago" title="2013-12-08T10:30:04+01:00">2013-12-08T10:30:04+01:00</abbr></div>
<ul class="group_tabs"></ul>
<div id="content">
<div class="file_list_container" id="AllFiles">
<h2>
<span class="group_name">All Files</span>
(<span class="covered_percent"><span class="green">100.0%</span></span>
covered at
<span class="covered_strength">
<span class="green">
- 106.3
+ 84.6
</span>
</span> hits/line)
</h2>
<a name="AllFiles"></a>
<div>
<b>1</b> files in total.
- <b>174</b> relevant lines.
- <span class="green"><b>174</b> lines covered</span> and
+ <b>162</b> relevant lines.
+ <span class="green"><b>162</b> lines covered</span> and
<span class="red"><b>0</b> lines missed </span>
</div>
<table class="file_list">
<thead>
<tr>
@@ -51,15 +51,15 @@
<tbody>
<tr>
<td class="strong"><a href="#ebc1c40297fe09a20539f3d0e94180d9c9008e93" class="src_link" title="lib/net/ssh/simple.rb">lib/net/ssh/simple.rb</a></td>
<td class="green strong">100.0 %</td>
- <td>762</td>
- <td>174</td>
- <td>174</td>
+ <td>738</td>
+ <td>162</td>
+ <td>162</td>
<td>0</td>
- <td>106.3</td>
+ <td>84.6</td>
</tr>
</tbody>
</table>
</div>
@@ -79,12 +79,12 @@
<div class="source_table" id="ebc1c40297fe09a20539f3d0e94180d9c9008e93">
<div class="header">
<h3>lib/net/ssh/simple.rb</h3>
<h4><span class="green">100.0 %</span> covered</h4>
<div>
- <b>174</b> relevant lines.
- <span class="green"><b>174</b> lines covered</span> and
+ <b>162</b> relevant lines.
+ <span class="green"><b>162</b> lines covered</span> and
<span class="red"><b>0</b> lines missed.</span>
</div>
</div>
<pre>
@@ -1840,30 +1840,30 @@
<span class="hits">1</span>
<code class="ruby"> def self.scp_put(*args, &block)</code>
</li>
- <li class="covered" data-hits="4" data-linenumber="293">
- <span class="hits">4</span>
+ <li class="covered" data-hits="2" data-linenumber="293">
+ <span class="hits">2</span>
<code class="ruby"> s = self.new</code>
</li>
- <li class="covered" data-hits="4" data-linenumber="294">
- <span class="hits">4</span>
+ <li class="covered" data-hits="2" data-linenumber="294">
+ <span class="hits">2</span>
<code class="ruby"> r = s.scp_put(*args, &block)</code>
</li>
- <li class="covered" data-hits="2" data-linenumber="295">
- <span class="hits">2</span>
+ <li class="covered" data-hits="1" data-linenumber="295">
+ <span class="hits">1</span>
<code class="ruby"> s.close</code>
</li>
- <li class="covered" data-hits="2" data-linenumber="296">
- <span class="hits">2</span>
+ <li class="covered" data-hits="1" data-linenumber="296">
+ <span class="hits">1</span>
<code class="ruby"> r</code>
</li>
<li class="never" data-hits="" data-linenumber="297">
@@ -1990,30 +1990,30 @@
<span class="hits">1</span>
<code class="ruby"> def self.scp_get(*args, &block)</code>
</li>
- <li class="covered" data-hits="4" data-linenumber="318">
- <span class="hits">4</span>
+ <li class="covered" data-hits="2" data-linenumber="318">
+ <span class="hits">2</span>
<code class="ruby"> s = self.new</code>
</li>
- <li class="covered" data-hits="4" data-linenumber="319">
- <span class="hits">4</span>
+ <li class="covered" data-hits="2" data-linenumber="319">
+ <span class="hits">2</span>
<code class="ruby"> r = s.scp_get(*args, &block)</code>
</li>
- <li class="covered" data-hits="2" data-linenumber="320">
- <span class="hits">2</span>
+ <li class="covered" data-hits="1" data-linenumber="320">
+ <span class="hits">1</span>
<code class="ruby"> s.close</code>
</li>
- <li class="covered" data-hits="2" data-linenumber="321">
- <span class="hits">2</span>
+ <li class="covered" data-hits="1" data-linenumber="321">
+ <span class="hits">1</span>
<code class="ruby"> r</code>
</li>
<li class="never" data-hits="" data-linenumber="322">
@@ -2029,2635 +2029,2491 @@
</li>
<li class="never" data-hits="" data-linenumber="324">
- <code class="ruby"> # @deprecated Use scp_put instead.</code>
- </li>
-
- <li class="covered" data-hits="1" data-linenumber="325">
- <span class="hits">1</span>
-
- <code class="ruby"> def self.scp_ul(*args, &block)</code>
- </li>
-
- <li class="covered" data-hits="2" data-linenumber="326">
- <span class="hits">2</span>
-
- <code class="ruby"> warn "[DEPRECATION] Net::SSH::Simple.scp_ul is deprecated. Please use .scp_put instead (usage is identical, the method was only renamed)."</code>
- </li>
-
- <li class="covered" data-hits="2" data-linenumber="327">
- <span class="hits">2</span>
-
- <code class="ruby"> self.scp_put(*args, &block)</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="328">
-
-
- <code class="ruby"> end</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="329">
-
-
- <code class="ruby"></code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="330">
-
-
- <code class="ruby"> # @deprecated Use scp_get instead.</code>
- </li>
-
- <li class="covered" data-hits="1" data-linenumber="331">
- <span class="hits">1</span>
-
- <code class="ruby"> def self.scp_dl(*args, &block)</code>
- </li>
-
- <li class="covered" data-hits="2" data-linenumber="332">
- <span class="hits">2</span>
-
- <code class="ruby"> warn "[DEPRECATION] Net::SSH::Simple.scp_dl is deprecated. Please use .scp_get instead (usage is identical, the method was only renamed)."</code>
- </li>
-
- <li class="covered" data-hits="2" data-linenumber="333">
- <span class="hits">2</span>
-
- <code class="ruby"> self.scp_get(*args, &block)</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="334">
-
-
- <code class="ruby"> end</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="335">
-
-
- <code class="ruby"></code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="336">
-
-
<code class="ruby"> # </code>
</li>
- <li class="never" data-hits="" data-linenumber="337">
+ <li class="never" data-hits="" data-linenumber="325">
<code class="ruby"> # SCP upload to a remote host.</code>
</li>
- <li class="never" data-hits="" data-linenumber="338">
+ <li class="never" data-hits="" data-linenumber="326">
<code class="ruby"> # The underlying Net::SSH::Simple instance will re-use</code>
</li>
- <li class="never" data-hits="" data-linenumber="339">
+ <li class="never" data-hits="" data-linenumber="327">
<code class="ruby"> # existing connections for optimal performance.</code>
</li>
- <li class="never" data-hits="" data-linenumber="340">
+ <li class="never" data-hits="" data-linenumber="328">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="341">
+ <li class="never" data-hits="" data-linenumber="329">
<code class="ruby"> # @param [String] host Destination hostname or ip-address</code>
</li>
- <li class="never" data-hits="" data-linenumber="342">
+ <li class="never" data-hits="" data-linenumber="330">
<code class="ruby"> # @param [String] src Source path (on localhost)</code>
</li>
- <li class="never" data-hits="" data-linenumber="343">
+ <li class="never" data-hits="" data-linenumber="331">
<code class="ruby"> # @param [String] dst Destination path (on remote host)</code>
</li>
- <li class="never" data-hits="" data-linenumber="344">
+ <li class="never" data-hits="" data-linenumber="332">
<code class="ruby"> # @param opts (see Net::SSH::Simple#ssh)</code>
</li>
- <li class="never" data-hits="" data-linenumber="345">
+ <li class="never" data-hits="" data-linenumber="333">
<code class="ruby"> # @param [Block] block Progress callback (optional)</code>
</li>
- <li class="never" data-hits="" data-linenumber="346">
+ <li class="never" data-hits="" data-linenumber="334">
<code class="ruby"> # @return [Net::SSH::Simple::Result] Result</code>
</li>
- <li class="never" data-hits="" data-linenumber="347">
+ <li class="never" data-hits="" data-linenumber="335">
<code class="ruby"> #</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="348">
+ <li class="covered" data-hits="1" data-linenumber="336">
<span class="hits">1</span>
<code class="ruby"> def scp_put(host, src, dst, opts={}, &block)</code>
</li>
- <li class="covered" data-hits="24" data-linenumber="349">
- <span class="hits">24</span>
+ <li class="covered" data-hits="16" data-linenumber="337">
+ <span class="hits">16</span>
<code class="ruby"> opts = @opts.merge(opts)</code>
</li>
- <li class="covered" data-hits="24" data-linenumber="350">
- <span class="hits">24</span>
+ <li class="covered" data-hits="16" data-linenumber="338">
+ <span class="hits">16</span>
<code class="ruby"> scp(:upload, host, src, dst, opts, &block)</code>
</li>
- <li class="never" data-hits="" data-linenumber="351">
+ <li class="never" data-hits="" data-linenumber="339">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="352">
+ <li class="never" data-hits="" data-linenumber="340">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="353">
+ <li class="never" data-hits="" data-linenumber="341">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="354">
+ <li class="never" data-hits="" data-linenumber="342">
<code class="ruby"> # SCP download from a remote host.</code>
</li>
- <li class="never" data-hits="" data-linenumber="355">
+ <li class="never" data-hits="" data-linenumber="343">
<code class="ruby"> # The underlying Net::SSH::Simple instance will re-use</code>
</li>
- <li class="never" data-hits="" data-linenumber="356">
+ <li class="never" data-hits="" data-linenumber="344">
<code class="ruby"> # existing connections for optimal performance.</code>
</li>
- <li class="never" data-hits="" data-linenumber="357">
+ <li class="never" data-hits="" data-linenumber="345">
<code class="ruby"> # </code>
</li>
- <li class="never" data-hits="" data-linenumber="358">
+ <li class="never" data-hits="" data-linenumber="346">
<code class="ruby"> # @param [String] host Destination hostname or ip-address</code>
</li>
- <li class="never" data-hits="" data-linenumber="359">
+ <li class="never" data-hits="" data-linenumber="347">
<code class="ruby"> # @param [String] src Source path (on remote host)</code>
</li>
- <li class="never" data-hits="" data-linenumber="360">
+ <li class="never" data-hits="" data-linenumber="348">
<code class="ruby"> # @param [String] dst Destination path (on localhost)</code>
</li>
- <li class="never" data-hits="" data-linenumber="361">
+ <li class="never" data-hits="" data-linenumber="349">
<code class="ruby"> # @param opts (see Net::SSH::Simple#ssh)</code>
</li>
- <li class="never" data-hits="" data-linenumber="362">
+ <li class="never" data-hits="" data-linenumber="350">
<code class="ruby"> # @param [Block] block Progress callback (optional)</code>
</li>
- <li class="never" data-hits="" data-linenumber="363">
+ <li class="never" data-hits="" data-linenumber="351">
<code class="ruby"> # @return [Net::SSH::Simple::Result] Result</code>
</li>
- <li class="never" data-hits="" data-linenumber="364">
+ <li class="never" data-hits="" data-linenumber="352">
<code class="ruby"> # @see Net::SSH::Simple#scp_put</code>
</li>
- <li class="never" data-hits="" data-linenumber="365">
+ <li class="never" data-hits="" data-linenumber="353">
<code class="ruby"> #</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="366">
+ <li class="covered" data-hits="1" data-linenumber="354">
<span class="hits">1</span>
<code class="ruby"> def scp_get(host, src, dst, opts={}, &block)</code>
</li>
- <li class="covered" data-hits="25" data-linenumber="367">
- <span class="hits">25</span>
+ <li class="covered" data-hits="17" data-linenumber="355">
+ <span class="hits">17</span>
<code class="ruby"> opts = @opts.merge(opts)</code>
</li>
- <li class="covered" data-hits="25" data-linenumber="368">
- <span class="hits">25</span>
+ <li class="covered" data-hits="17" data-linenumber="356">
+ <span class="hits">17</span>
<code class="ruby"> scp(:download, host, src, dst, opts, &block)</code>
</li>
- <li class="never" data-hits="" data-linenumber="369">
+ <li class="never" data-hits="" data-linenumber="357">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="370">
+ <li class="never" data-hits="" data-linenumber="358">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="371">
+ <li class="never" data-hits="" data-linenumber="359">
- <code class="ruby"> # @deprecated Use scp_put instead.</code>
- </li>
-
- <li class="covered" data-hits="1" data-linenumber="372">
- <span class="hits">1</span>
-
- <code class="ruby"> def scp_ul(host, src, dst, opts={}, &block)</code>
- </li>
-
- <li class="covered" data-hits="6" data-linenumber="373">
- <span class="hits">6</span>
-
- <code class="ruby"> warn "[DEPRECATION] Net::SSH::Simple#scp_ul is deprecated. Please use #scp_put instead (usage is identical, the method was only renamed)."</code>
- </li>
-
- <li class="covered" data-hits="6" data-linenumber="374">
- <span class="hits">6</span>
-
- <code class="ruby"> scp_put(host, src, dst, opts, &block)</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="375">
-
-
- <code class="ruby"> end</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="376">
-
-
- <code class="ruby"></code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="377">
-
-
- <code class="ruby"> # @deprecated Use scp_get instead.</code>
- </li>
-
- <li class="covered" data-hits="1" data-linenumber="378">
- <span class="hits">1</span>
-
- <code class="ruby"> def scp_dl(host, src, dst, opts={}, &block)</code>
- </li>
-
- <li class="covered" data-hits="6" data-linenumber="379">
- <span class="hits">6</span>
-
- <code class="ruby"> warn "[DEPRECATION] Net::SSH::Simple#scp_dl is deprecated. Please use #scp_get instead (usage is identical, the method was only renamed)."</code>
- </li>
-
- <li class="covered" data-hits="6" data-linenumber="380">
- <span class="hits">6</span>
-
- <code class="ruby"> scp_get(host, src, dst, opts, &block)</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="381">
-
-
- <code class="ruby"> end</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="382">
-
-
- <code class="ruby"></code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="383">
-
-
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="384">
+ <li class="never" data-hits="" data-linenumber="360">
<code class="ruby"> # Perform SSH operation on a remote host and capture the result.</code>
</li>
- <li class="never" data-hits="" data-linenumber="385">
+ <li class="never" data-hits="" data-linenumber="361">
<code class="ruby"> # The underlying Net::SSH::Simple instance will re-use</code>
</li>
- <li class="never" data-hits="" data-linenumber="386">
+ <li class="never" data-hits="" data-linenumber="362">
<code class="ruby"> # existing connections for optimal performance.</code>
</li>
- <li class="never" data-hits="" data-linenumber="387">
+ <li class="never" data-hits="" data-linenumber="363">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="388">
+ <li class="never" data-hits="" data-linenumber="364">
<code class="ruby"> # @return [Net::SSH::Simple::Result] Result</code>
</li>
- <li class="never" data-hits="" data-linenumber="389">
+ <li class="never" data-hits="" data-linenumber="365">
<code class="ruby"> # @param [String] host Destination hostname or ip-address</code>
</li>
- <li class="never" data-hits="" data-linenumber="390">
+ <li class="never" data-hits="" data-linenumber="366">
<code class="ruby"> # @param [String] cmd Shell command to execute</code>
</li>
- <li class="never" data-hits="" data-linenumber="391">
+ <li class="never" data-hits="" data-linenumber="367">
<code class="ruby"> # @param [Block] block Use the event-API (see example above)</code>
</li>
- <li class="never" data-hits="" data-linenumber="392">
+ <li class="never" data-hits="" data-linenumber="368">
<code class="ruby"> # @param [Hash] opts SSH options</code>
</li>
- <li class="never" data-hits="" data-linenumber="393">
+ <li class="never" data-hits="" data-linenumber="369">
<code class="ruby"> # @option opts [Array] :auth_methods</code>
</li>
- <li class="never" data-hits="" data-linenumber="394">
+ <li class="never" data-hits="" data-linenumber="370">
<code class="ruby"> # an array of authentication methods to try</code>
</li>
- <li class="never" data-hits="" data-linenumber="395">
+ <li class="never" data-hits="" data-linenumber="371">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="396">
+ <li class="never" data-hits="" data-linenumber="372">
<code class="ruby"> # @option opts [String] :compression</code>
</li>
- <li class="never" data-hits="" data-linenumber="397">
+ <li class="never" data-hits="" data-linenumber="373">
<code class="ruby"> # the compression algorithm to use,</code>
</li>
- <li class="never" data-hits="" data-linenumber="398">
+ <li class="never" data-hits="" data-linenumber="374">
<code class="ruby"> # or true to use whatever is supported.</code>
</li>
- <li class="never" data-hits="" data-linenumber="399">
+ <li class="never" data-hits="" data-linenumber="375">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="400">
+ <li class="never" data-hits="" data-linenumber="376">
<code class="ruby"> # @option opts [Number] :compression_level</code>
</li>
- <li class="never" data-hits="" data-linenumber="401">
+ <li class="never" data-hits="" data-linenumber="377">
<code class="ruby"> # the compression level to use when sending data</code>
</li>
- <li class="never" data-hits="" data-linenumber="402">
+ <li class="never" data-hits="" data-linenumber="378">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="403">
+ <li class="never" data-hits="" data-linenumber="379">
<code class="ruby"> # @option opts [String/boolean] :opts (true)</code>
</li>
- <li class="never" data-hits="" data-linenumber="404">
+ <li class="never" data-hits="" data-linenumber="380">
<code class="ruby"> # set to true to load the default OpenSSH opts files</code>
</li>
- <li class="never" data-hits="" data-linenumber="405">
+ <li class="never" data-hits="" data-linenumber="381">
<code class="ruby"> # (~/.ssh/opts, /etc/ssh_opts), or to false to not load them,</code>
</li>
- <li class="never" data-hits="" data-linenumber="406">
+ <li class="never" data-hits="" data-linenumber="382">
<code class="ruby"> # or to a file-name (or array of file-names) to load those</code>
</li>
- <li class="never" data-hits="" data-linenumber="407">
+ <li class="never" data-hits="" data-linenumber="383">
<code class="ruby"> # specific configuration files.</code>
</li>
- <li class="never" data-hits="" data-linenumber="408">
+ <li class="never" data-hits="" data-linenumber="384">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="409">
+ <li class="never" data-hits="" data-linenumber="385">
<code class="ruby"> # @option opts [Array] :encryption</code>
</li>
- <li class="never" data-hits="" data-linenumber="410">
+ <li class="never" data-hits="" data-linenumber="386">
<code class="ruby"> # the encryption cipher (or ciphers) to use</code>
</li>
- <li class="never" data-hits="" data-linenumber="411">
+ <li class="never" data-hits="" data-linenumber="387">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="412">
+ <li class="never" data-hits="" data-linenumber="388">
<code class="ruby"> # @option opts [boolean] :forward_agent</code>
</li>
- <li class="never" data-hits="" data-linenumber="413">
+ <li class="never" data-hits="" data-linenumber="389">
<code class="ruby"> # set to true if you want the SSH agent connection to be forwarded</code>
</li>
- <li class="never" data-hits="" data-linenumber="414">
+ <li class="never" data-hits="" data-linenumber="390">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="415">
+ <li class="never" data-hits="" data-linenumber="391">
<code class="ruby"> # @option opts [String/Array] :global_known_hosts_file </code>
</li>
- <li class="never" data-hits="" data-linenumber="416">
+ <li class="never" data-hits="" data-linenumber="392">
<code class="ruby"> # (['/etc/ssh/known_hosts','/etc/ssh/known_hosts2'])</code>
</li>
- <li class="never" data-hits="" data-linenumber="417">
+ <li class="never" data-hits="" data-linenumber="393">
<code class="ruby"> # the location of the global known hosts file.</code>
</li>
- <li class="never" data-hits="" data-linenumber="418">
+ <li class="never" data-hits="" data-linenumber="394">
<code class="ruby"> # Set to an array if you want to specify multiple</code>
</li>
- <li class="never" data-hits="" data-linenumber="419">
+ <li class="never" data-hits="" data-linenumber="395">
<code class="ruby"> # global known hosts files.</code>
</li>
- <li class="never" data-hits="" data-linenumber="420">
+ <li class="never" data-hits="" data-linenumber="396">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="421">
+ <li class="never" data-hits="" data-linenumber="397">
<code class="ruby"> # @option opts [String/Array] :hmac</code>
</li>
- <li class="never" data-hits="" data-linenumber="422">
+ <li class="never" data-hits="" data-linenumber="398">
<code class="ruby"> # the hmac algorithm (or algorithms) to use</code>
</li>
- <li class="never" data-hits="" data-linenumber="423">
+ <li class="never" data-hits="" data-linenumber="399">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="424">
+ <li class="never" data-hits="" data-linenumber="400">
<code class="ruby"> # @option opts [String] :host_key</code>
</li>
- <li class="never" data-hits="" data-linenumber="425">
+ <li class="never" data-hits="" data-linenumber="401">
<code class="ruby"> # the host key algorithm (or algorithms) to use</code>
</li>
- <li class="never" data-hits="" data-linenumber="426">
+ <li class="never" data-hits="" data-linenumber="402">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="427">
+ <li class="never" data-hits="" data-linenumber="403">
<code class="ruby"> # @option opts [String] :host_key_alias</code>
</li>
- <li class="never" data-hits="" data-linenumber="428">
+ <li class="never" data-hits="" data-linenumber="404">
<code class="ruby"> # the host name to use when looking up or adding a host to a known_hosts dictionary file</code>
</li>
- <li class="never" data-hits="" data-linenumber="429">
+ <li class="never" data-hits="" data-linenumber="405">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="430">
+ <li class="never" data-hits="" data-linenumber="406">
<code class="ruby"> # @option opts [String] :host_name</code>
</li>
- <li class="never" data-hits="" data-linenumber="431">
+ <li class="never" data-hits="" data-linenumber="407">
<code class="ruby"> # the real host name or IP to log into. This is used instead of the host parameter,</code>
</li>
- <li class="never" data-hits="" data-linenumber="432">
+ <li class="never" data-hits="" data-linenumber="408">
<code class="ruby"> # and is primarily only useful when specified in an SSH configuration file.</code>
</li>
- <li class="never" data-hits="" data-linenumber="433">
+ <li class="never" data-hits="" data-linenumber="409">
<code class="ruby"> # It lets you specify an alias, similarly to adding an entry in /etc/hosts but</code>
</li>
- <li class="never" data-hits="" data-linenumber="434">
+ <li class="never" data-hits="" data-linenumber="410">
<code class="ruby"> # without needing to modify /etc/hosts.</code>
</li>
- <li class="never" data-hits="" data-linenumber="435">
+ <li class="never" data-hits="" data-linenumber="411">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="436">
+ <li class="never" data-hits="" data-linenumber="412">
<code class="ruby"> # @option opts [String/Array] :kex</code>
</li>
- <li class="never" data-hits="" data-linenumber="437">
+ <li class="never" data-hits="" data-linenumber="413">
<code class="ruby"> # the key exchange algorithm (or algorithms) to use</code>
</li>
- <li class="never" data-hits="" data-linenumber="438">
+ <li class="never" data-hits="" data-linenumber="414">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="439">
+ <li class="never" data-hits="" data-linenumber="415">
<code class="ruby"> # @option opts [Array] :keys</code>
</li>
- <li class="never" data-hits="" data-linenumber="440">
+ <li class="never" data-hits="" data-linenumber="416">
<code class="ruby"> # an array of file names of private keys to use for publickey and hostbased authentication</code>
</li>
- <li class="never" data-hits="" data-linenumber="441">
+ <li class="never" data-hits="" data-linenumber="417">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="442">
+ <li class="never" data-hits="" data-linenumber="418">
<code class="ruby"> # @option opts [Array] :key_data</code>
</li>
- <li class="never" data-hits="" data-linenumber="443">
+ <li class="never" data-hits="" data-linenumber="419">
<code class="ruby"> # an array of strings, with each element of the array being a raw private key in PEM format.</code>
</li>
- <li class="never" data-hits="" data-linenumber="444">
+ <li class="never" data-hits="" data-linenumber="420">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="445">
+ <li class="never" data-hits="" data-linenumber="421">
<code class="ruby"> # @option opts [boolean] :keys_only</code>
</li>
- <li class="never" data-hits="" data-linenumber="446">
+ <li class="never" data-hits="" data-linenumber="422">
<code class="ruby"> # set to true to use only private keys from keys and key_data parameters, even if</code>
</li>
- <li class="never" data-hits="" data-linenumber="447">
+ <li class="never" data-hits="" data-linenumber="423">
<code class="ruby"> # ssh-agent offers more identities. This option is intended for situations where</code>
</li>
- <li class="never" data-hits="" data-linenumber="448">
+ <li class="never" data-hits="" data-linenumber="424">
<code class="ruby"> # ssh-agent offers many different identites.</code>
</li>
- <li class="never" data-hits="" data-linenumber="449">
+ <li class="never" data-hits="" data-linenumber="425">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="450">
+ <li class="never" data-hits="" data-linenumber="426">
<code class="ruby"> # @option opts [Logger] :logger</code>
</li>
- <li class="never" data-hits="" data-linenumber="451">
+ <li class="never" data-hits="" data-linenumber="427">
<code class="ruby"> # the logger instance to use when logging</code>
</li>
- <li class="never" data-hits="" data-linenumber="452">
+ <li class="never" data-hits="" data-linenumber="428">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="453">
+ <li class="never" data-hits="" data-linenumber="429">
<code class="ruby"> # @option opts [boolean/:very] :paranoid</code>
</li>
- <li class="never" data-hits="" data-linenumber="454">
+ <li class="never" data-hits="" data-linenumber="430">
<code class="ruby"> # either true, false, or :very, specifying how strict host-key verification should be</code>
</li>
- <li class="never" data-hits="" data-linenumber="455">
+ <li class="never" data-hits="" data-linenumber="431">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="456">
+ <li class="never" data-hits="" data-linenumber="432">
<code class="ruby"> # @option opts [String] :passphrase (nil)</code>
</li>
- <li class="never" data-hits="" data-linenumber="457">
+ <li class="never" data-hits="" data-linenumber="433">
<code class="ruby"> # the passphrase to use when loading a private key (default is nil, for no passphrase)</code>
</li>
- <li class="never" data-hits="" data-linenumber="458">
+ <li class="never" data-hits="" data-linenumber="434">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="459">
+ <li class="never" data-hits="" data-linenumber="435">
<code class="ruby"> # @option opts [String] :password</code>
</li>
- <li class="never" data-hits="" data-linenumber="460">
+ <li class="never" data-hits="" data-linenumber="436">
<code class="ruby"> # the password to use to login</code>
</li>
- <li class="never" data-hits="" data-linenumber="461">
+ <li class="never" data-hits="" data-linenumber="437">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="462">
+ <li class="never" data-hits="" data-linenumber="438">
<code class="ruby"> # @option opts [Integer] :port</code>
</li>
- <li class="never" data-hits="" data-linenumber="463">
+ <li class="never" data-hits="" data-linenumber="439">
<code class="ruby"> # the port to use when connecting to the remote host</code>
</li>
- <li class="never" data-hits="" data-linenumber="464">
+ <li class="never" data-hits="" data-linenumber="440">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="465">
+ <li class="never" data-hits="" data-linenumber="441">
<code class="ruby"> # @option opts [Hash] :properties</code>
</li>
- <li class="never" data-hits="" data-linenumber="466">
+ <li class="never" data-hits="" data-linenumber="442">
<code class="ruby"> # a hash of key/value pairs to add to the new connection's properties</code>
</li>
- <li class="never" data-hits="" data-linenumber="467">
+ <li class="never" data-hits="" data-linenumber="443">
<code class="ruby"> # (see Net::SSH::Connection::Session#properties)</code>
</li>
- <li class="never" data-hits="" data-linenumber="468">
+ <li class="never" data-hits="" data-linenumber="444">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="469">
+ <li class="never" data-hits="" data-linenumber="445">
<code class="ruby"> # @option opts [String] :proxy</code>
</li>
- <li class="never" data-hits="" data-linenumber="470">
+ <li class="never" data-hits="" data-linenumber="446">
<code class="ruby"> # a proxy instance (see Proxy) to use when connecting</code>
</li>
- <li class="never" data-hits="" data-linenumber="471">
+ <li class="never" data-hits="" data-linenumber="447">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="472">
+ <li class="never" data-hits="" data-linenumber="448">
<code class="ruby"> # @option opts [Integer] :rekey_blocks_limit</code>
</li>
- <li class="never" data-hits="" data-linenumber="473">
+ <li class="never" data-hits="" data-linenumber="449">
<code class="ruby"> # the max number of blocks to process before rekeying</code>
</li>
- <li class="never" data-hits="" data-linenumber="474">
+ <li class="never" data-hits="" data-linenumber="450">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="475">
+ <li class="never" data-hits="" data-linenumber="451">
<code class="ruby"> # @option opts [Integer] :rekey_limit</code>
</li>
- <li class="never" data-hits="" data-linenumber="476">
+ <li class="never" data-hits="" data-linenumber="452">
<code class="ruby"> # the max number of bytes to process before rekeying</code>
</li>
- <li class="never" data-hits="" data-linenumber="477">
+ <li class="never" data-hits="" data-linenumber="453">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="478">
+ <li class="never" data-hits="" data-linenumber="454">
<code class="ruby"> # @option opts [Integer] :rekey_packet_limit</code>
</li>
- <li class="never" data-hits="" data-linenumber="479">
+ <li class="never" data-hits="" data-linenumber="455">
<code class="ruby"> # the max number of packets to process before rekeying</code>
</li>
- <li class="never" data-hits="" data-linenumber="480">
+ <li class="never" data-hits="" data-linenumber="456">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="481">
+ <li class="never" data-hits="" data-linenumber="457">
<code class="ruby"> # @option opts [Integer] :timeout (60)</code>
</li>
- <li class="never" data-hits="" data-linenumber="482">
+ <li class="never" data-hits="" data-linenumber="458">
<code class="ruby"> # maximum idle time before a connection will time out (0 = disable).</code>
</li>
- <li class="never" data-hits="" data-linenumber="483">
+ <li class="never" data-hits="" data-linenumber="459">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="484">
+ <li class="never" data-hits="" data-linenumber="460">
<code class="ruby"> # @option opts [Integer] :operation_timeout (3600)</code>
</li>
- <li class="never" data-hits="" data-linenumber="485">
+ <li class="never" data-hits="" data-linenumber="461">
<code class="ruby"> # maximum time before aborting an operation (0 = disable).</code>
</li>
- <li class="never" data-hits="" data-linenumber="486">
+ <li class="never" data-hits="" data-linenumber="462">
<code class="ruby"> # you may use this to guard against run-away processes.</code>
</li>
- <li class="never" data-hits="" data-linenumber="487">
+ <li class="never" data-hits="" data-linenumber="463">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="488">
+ <li class="never" data-hits="" data-linenumber="464">
<code class="ruby"> # @option opts [Integer] :keepalive_interval (60)</code>
</li>
- <li class="never" data-hits="" data-linenumber="489">
+ <li class="never" data-hits="" data-linenumber="465">
<code class="ruby"> # send keep-alive probes at this interval to prevent connections</code>
</li>
- <li class="never" data-hits="" data-linenumber="490">
+ <li class="never" data-hits="" data-linenumber="466">
<code class="ruby"> # from timing out unexpectedly.</code>
</li>
- <li class="never" data-hits="" data-linenumber="491">
+ <li class="never" data-hits="" data-linenumber="467">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="492">
+ <li class="never" data-hits="" data-linenumber="468">
<code class="ruby"> # @option opts [Integer] :close_timeout (5)</code>
</li>
- <li class="never" data-hits="" data-linenumber="493">
+ <li class="never" data-hits="" data-linenumber="469">
<code class="ruby"> # grace-period on close before the connection will be terminated forcefully</code>
</li>
- <li class="never" data-hits="" data-linenumber="494">
+ <li class="never" data-hits="" data-linenumber="470">
<code class="ruby"> # (0 = terminate immediately).</code>
</li>
- <li class="never" data-hits="" data-linenumber="495">
+ <li class="never" data-hits="" data-linenumber="471">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="496">
+ <li class="never" data-hits="" data-linenumber="472">
<code class="ruby"> # @option opts [String] :user</code>
</li>
- <li class="never" data-hits="" data-linenumber="497">
+ <li class="never" data-hits="" data-linenumber="473">
<code class="ruby"> # the username to log in as</code>
</li>
- <li class="never" data-hits="" data-linenumber="498">
+ <li class="never" data-hits="" data-linenumber="474">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="499">
+ <li class="never" data-hits="" data-linenumber="475">
<code class="ruby"> # @option opts [String/Array] :user_known_hosts_file</code>
</li>
- <li class="never" data-hits="" data-linenumber="500">
+ <li class="never" data-hits="" data-linenumber="476">
<code class="ruby"> # (['~/.ssh/known_hosts, ~/.ssh/known_hosts2'])</code>
</li>
- <li class="never" data-hits="" data-linenumber="501">
+ <li class="never" data-hits="" data-linenumber="477">
<code class="ruby"> # the location of the user known hosts file. Set to an array to specify multiple</code>
</li>
- <li class="never" data-hits="" data-linenumber="502">
+ <li class="never" data-hits="" data-linenumber="478">
<code class="ruby"> # user known hosts files.</code>
</li>
- <li class="never" data-hits="" data-linenumber="503">
+ <li class="never" data-hits="" data-linenumber="479">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="504">
+ <li class="never" data-hits="" data-linenumber="480">
<code class="ruby"> # @option opts [Symbol] :verbose</code>
</li>
- <li class="never" data-hits="" data-linenumber="505">
+ <li class="never" data-hits="" data-linenumber="481">
<code class="ruby"> # how verbose to be (Logger verbosity constants, Logger::DEBUG is very verbose,</code>
</li>
- <li class="never" data-hits="" data-linenumber="506">
+ <li class="never" data-hits="" data-linenumber="482">
<code class="ruby"> # Logger::FATAL is all but silent). Logger::FATAL is the default. The symbols</code>
</li>
- <li class="never" data-hits="" data-linenumber="507">
+ <li class="never" data-hits="" data-linenumber="483">
<code class="ruby"> # :debug, :info, :warn, :error, and :fatal are also supported and are translated</code>
</li>
- <li class="never" data-hits="" data-linenumber="508">
+ <li class="never" data-hits="" data-linenumber="484">
<code class="ruby"> # to the corresponding Logger constant.</code>
</li>
- <li class="never" data-hits="" data-linenumber="509">
+ <li class="never" data-hits="" data-linenumber="485">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="510">
+ <li class="never" data-hits="" data-linenumber="486">
<code class="ruby"> # @see http://net-ssh.github.com/ssh/v2/api/classes/Net/SSH.html#M000002 </code>
</li>
- <li class="never" data-hits="" data-linenumber="511">
+ <li class="never" data-hits="" data-linenumber="487">
<code class="ruby"> # Net::SSH documentation for the 'opts'-hash</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="512">
+ <li class="covered" data-hits="1" data-linenumber="488">
<span class="hits">1</span>
<code class="ruby"> def ssh(host, cmd, opts={}, &block)</code>
</li>
- <li class="covered" data-hits="68" data-linenumber="513">
+ <li class="covered" data-hits="68" data-linenumber="489">
<span class="hits">68</span>
<code class="ruby"> opts = @opts.merge(opts)</code>
</li>
- <li class="covered" data-hits="68" data-linenumber="514">
+ <li class="covered" data-hits="68" data-linenumber="490">
<span class="hits">68</span>
<code class="ruby"> with_session(host, opts) do |session|</code>
</li>
- <li class="covered" data-hits="67" data-linenumber="515">
+ <li class="covered" data-hits="67" data-linenumber="491">
<span class="hits">67</span>
<code class="ruby"> @result = Result.new(</code>
</li>
- <li class="never" data-hits="" data-linenumber="516">
+ <li class="never" data-hits="" data-linenumber="492">
<code class="ruby"> { :op => :ssh, :host => host, :cmd => cmd, :start_at => Time.new,</code>
</li>
- <li class="never" data-hits="" data-linenumber="517">
+ <li class="never" data-hits="" data-linenumber="493">
<code class="ruby"> :last_event_at => Time.new, :opts => opts, :stdout => '', :stderr => '',</code>
</li>
- <li class="never" data-hits="" data-linenumber="518">
+ <li class="never" data-hits="" data-linenumber="494">
<code class="ruby"> :success => nil </code>
</li>
- <li class="never" data-hits="" data-linenumber="519">
+ <li class="never" data-hits="" data-linenumber="495">
<code class="ruby"> } )</code>
</li>
- <li class="never" data-hits="" data-linenumber="520">
+ <li class="never" data-hits="" data-linenumber="496">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="67" data-linenumber="521">
+ <li class="covered" data-hits="67" data-linenumber="497">
<span class="hits">67</span>
<code class="ruby"> channel = session.open_channel do |chan|</code>
</li>
- <li class="covered" data-hits="67" data-linenumber="522">
+ <li class="covered" data-hits="67" data-linenumber="498">
<span class="hits">67</span>
<code class="ruby"> chan.exec cmd do |ch, success|</code>
</li>
- <li class="covered" data-hits="67" data-linenumber="523">
+ <li class="covered" data-hits="67" data-linenumber="499">
<span class="hits">67</span>
<code class="ruby"> @result[:success] = success</code>
</li>
- <li class="covered" data-hits="67" data-linenumber="524">
+ <li class="covered" data-hits="67" data-linenumber="500">
<span class="hits">67</span>
<code class="ruby"> ch.on_data do |c, data|</code>
</li>
- <li class="covered" data-hits="991" data-linenumber="525">
- <span class="hits">991</span>
+ <li class="covered" data-hits="571" data-linenumber="501">
+ <span class="hits">571</span>
<code class="ruby"> @result[:last_event_at] = Time.new</code>
</li>
- <li class="covered" data-hits="991" data-linenumber="526">
- <span class="hits">991</span>
+ <li class="covered" data-hits="571" data-linenumber="502">
+ <span class="hits">571</span>
<code class="ruby"> r = block.call(:stdout, ch, data) if block</code>
</li>
- <li class="covered" data-hits="991" data-linenumber="527">
- <span class="hits">991</span>
+ <li class="covered" data-hits="571" data-linenumber="503">
+ <span class="hits">571</span>
<code class="ruby"> @result[:stdout] += data.to_s unless r == :no_append</code>
</li>
- <li class="never" data-hits="" data-linenumber="528">
+ <li class="never" data-hits="" data-linenumber="504">
<code class="ruby"> end</code>
</li>
- <li class="covered" data-hits="67" data-linenumber="529">
+ <li class="covered" data-hits="67" data-linenumber="505">
<span class="hits">67</span>
<code class="ruby"> ch.on_extended_data do |c, type, data|</code>
</li>
- <li class="covered" data-hits="957" data-linenumber="530">
- <span class="hits">957</span>
+ <li class="covered" data-hits="520" data-linenumber="506">
+ <span class="hits">520</span>
<code class="ruby"> @result[:last_event_at] = Time.new</code>
</li>
- <li class="covered" data-hits="957" data-linenumber="531">
- <span class="hits">957</span>
+ <li class="covered" data-hits="520" data-linenumber="507">
+ <span class="hits">520</span>
<code class="ruby"> r = block.call(:stderr, ch, data) if block</code>
</li>
- <li class="covered" data-hits="957" data-linenumber="532">
- <span class="hits">957</span>
+ <li class="covered" data-hits="520" data-linenumber="508">
+ <span class="hits">520</span>
<code class="ruby"> @result[:stderr] += data.to_s unless r == :no_append</code>
</li>
- <li class="never" data-hits="" data-linenumber="533">
+ <li class="never" data-hits="" data-linenumber="509">
<code class="ruby"> end</code>
</li>
- <li class="covered" data-hits="67" data-linenumber="534">
+ <li class="covered" data-hits="67" data-linenumber="510">
<span class="hits">67</span>
<code class="ruby"> ch.on_request('exit-status') do |c, data|</code>
</li>
- <li class="covered" data-hits="62" data-linenumber="535">
+ <li class="covered" data-hits="62" data-linenumber="511">
<span class="hits">62</span>
<code class="ruby"> @result[:last_event_at] = Time.new</code>
</li>
- <li class="covered" data-hits="62" data-linenumber="536">
+ <li class="covered" data-hits="62" data-linenumber="512">
<span class="hits">62</span>
<code class="ruby"> exit_code = data.read_long</code>
</li>
- <li class="covered" data-hits="62" data-linenumber="537">
+ <li class="covered" data-hits="62" data-linenumber="513">
<span class="hits">62</span>
<code class="ruby"> block.call(:exit_code, ch, exit_code) if block</code>
</li>
- <li class="covered" data-hits="62" data-linenumber="538">
+ <li class="covered" data-hits="62" data-linenumber="514">
<span class="hits">62</span>
<code class="ruby"> @result[:exit_code] = exit_code</code>
</li>
- <li class="never" data-hits="" data-linenumber="539">
+ <li class="never" data-hits="" data-linenumber="515">
<code class="ruby"> end</code>
</li>
- <li class="covered" data-hits="67" data-linenumber="540">
+ <li class="covered" data-hits="67" data-linenumber="516">
<span class="hits">67</span>
<code class="ruby"> ch.on_request('exit-signal') do |c, data|</code>
</li>
- <li class="covered" data-hits="3" data-linenumber="541">
+ <li class="covered" data-hits="3" data-linenumber="517">
<span class="hits">3</span>
<code class="ruby"> @result[:last_event_at] = Time.new</code>
</li>
- <li class="covered" data-hits="3" data-linenumber="542">
+ <li class="covered" data-hits="3" data-linenumber="518">
<span class="hits">3</span>
<code class="ruby"> exit_signal = data.read_string</code>
</li>
- <li class="covered" data-hits="3" data-linenumber="543">
+ <li class="covered" data-hits="3" data-linenumber="519">
<span class="hits">3</span>
<code class="ruby"> r = block.call(:exit_signal, ch, exit_signal) if block</code>
</li>
- <li class="covered" data-hits="3" data-linenumber="544">
+ <li class="covered" data-hits="3" data-linenumber="520">
<span class="hits">3</span>
<code class="ruby"> @result[:exit_signal] = exit_signal</code>
</li>
- <li class="covered" data-hits="3" data-linenumber="545">
+ <li class="covered" data-hits="3" data-linenumber="521">
<span class="hits">3</span>
<code class="ruby"> @result[:success] = false</code>
</li>
- <li class="covered" data-hits="3" data-linenumber="546">
+ <li class="covered" data-hits="3" data-linenumber="522">
<span class="hits">3</span>
<code class="ruby"> unless r == :no_raise</code>
</li>
- <li class="covered" data-hits="2" data-linenumber="547">
+ <li class="covered" data-hits="2" data-linenumber="523">
<span class="hits">2</span>
<code class="ruby"> raise "Killed by SIG#{@result[:exit_signal]}"</code>
</li>
- <li class="never" data-hits="" data-linenumber="548">
+ <li class="never" data-hits="" data-linenumber="524">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="549">
+ <li class="never" data-hits="" data-linenumber="525">
<code class="ruby"> end</code>
</li>
- <li class="covered" data-hits="67" data-linenumber="550">
+ <li class="covered" data-hits="67" data-linenumber="526">
<span class="hits">67</span>
<code class="ruby"> block.call(:start, ch, nil) if block</code>
</li>
- <li class="never" data-hits="" data-linenumber="551">
+ <li class="never" data-hits="" data-linenumber="527">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="552">
+ <li class="never" data-hits="" data-linenumber="528">
<code class="ruby"> end</code>
</li>
- <li class="covered" data-hits="67" data-linenumber="553">
+ <li class="covered" data-hits="67" data-linenumber="529">
<span class="hits">67</span>
<code class="ruby"> wait_for_channel session, channel, @result, opts</code>
</li>
- <li class="covered" data-hits="63" data-linenumber="554">
+ <li class="covered" data-hits="63" data-linenumber="530">
<span class="hits">63</span>
<code class="ruby"> @result[:finish_at] = Time.new</code>
</li>
- <li class="covered" data-hits="63" data-linenumber="555">
+ <li class="covered" data-hits="63" data-linenumber="531">
<span class="hits">63</span>
<code class="ruby"> block.call(:finish, channel, nil) if block</code>
</li>
- <li class="covered" data-hits="63" data-linenumber="556">
+ <li class="covered" data-hits="63" data-linenumber="532">
<span class="hits">63</span>
<code class="ruby"> @result</code>
</li>
- <li class="never" data-hits="" data-linenumber="557">
+ <li class="never" data-hits="" data-linenumber="533">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="558">
+ <li class="never" data-hits="" data-linenumber="534">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="559">
+ <li class="never" data-hits="" data-linenumber="535">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="560">
+ <li class="covered" data-hits="1" data-linenumber="536">
<span class="hits">1</span>
<code class="ruby"> dsl_methods false</code>
</li>
- <li class="never" data-hits="" data-linenumber="561">
+ <li class="never" data-hits="" data-linenumber="537">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="562">
+ <li class="covered" data-hits="1" data-linenumber="538">
<span class="hits">1</span>
<code class="ruby"> def initialize(opts={})</code>
</li>
- <li class="covered" data-hits="77" data-linenumber="563">
- <span class="hits">77</span>
+ <li class="covered" data-hits="69" data-linenumber="539">
+ <span class="hits">69</span>
<code class="ruby"> @opts = opts</code>
</li>
- <li class="covered" data-hits="77" data-linenumber="564">
- <span class="hits">77</span>
+ <li class="covered" data-hits="69" data-linenumber="540">
+ <span class="hits">69</span>
<code class="ruby"> Thread.current[:ssh_simple_sessions] = {}</code>
</li>
- <li class="covered" data-hits="77" data-linenumber="565">
- <span class="hits">77</span>
+ <li class="covered" data-hits="69" data-linenumber="541">
+ <span class="hits">69</span>
<code class="ruby"> @result = Result.new</code>
</li>
- <li class="never" data-hits="" data-linenumber="566">
+ <li class="never" data-hits="" data-linenumber="542">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="567">
+ <li class="never" data-hits="" data-linenumber="543">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="568">
+ <li class="never" data-hits="" data-linenumber="544">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="569">
+ <li class="never" data-hits="" data-linenumber="545">
<code class="ruby"> # Spawn a Thread to perform a sequence of ssh/scp operations.</code>
</li>
- <li class="never" data-hits="" data-linenumber="570">
+ <li class="never" data-hits="" data-linenumber="546">
<code class="ruby"> # </code>
</li>
- <li class="never" data-hits="" data-linenumber="571">
+ <li class="never" data-hits="" data-linenumber="547">
<code class="ruby"> # @param [Block] block </code>
</li>
- <li class="never" data-hits="" data-linenumber="572">
+ <li class="never" data-hits="" data-linenumber="548">
<code class="ruby"> # @param opts (see Net::SSH::Simple#ssh)</code>
</li>
- <li class="never" data-hits="" data-linenumber="573">
+ <li class="never" data-hits="" data-linenumber="549">
<code class="ruby"> # @return [Thread] Thread executing the SSH-Block.</code>
</li>
- <li class="never" data-hits="" data-linenumber="574">
+ <li class="never" data-hits="" data-linenumber="550">
<code class="ruby"> #</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="575">
+ <li class="covered" data-hits="1" data-linenumber="551">
<span class="hits">1</span>
<code class="ruby"> def self.async(opts={}, &block)</code>
</li>
- <li class="covered" data-hits="28" data-linenumber="576">
+ <li class="covered" data-hits="28" data-linenumber="552">
<span class="hits">28</span>
<code class="ruby"> Thread.new do</code>
</li>
- <li class="covered" data-hits="28" data-linenumber="577">
+ <li class="covered" data-hits="28" data-linenumber="553">
<span class="hits">28</span>
<code class="ruby"> self.sync(opts, &block)</code>
</li>
- <li class="never" data-hits="" data-linenumber="578">
+ <li class="never" data-hits="" data-linenumber="554">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="579">
+ <li class="never" data-hits="" data-linenumber="555">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="580">
+ <li class="never" data-hits="" data-linenumber="556">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="581">
+ <li class="never" data-hits="" data-linenumber="557">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="582">
+ <li class="never" data-hits="" data-linenumber="558">
<code class="ruby"> # Spawn a Thread to perform a sequence of ssh/scp operations.</code>
</li>
- <li class="never" data-hits="" data-linenumber="583">
+ <li class="never" data-hits="" data-linenumber="559">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="584">
+ <li class="never" data-hits="" data-linenumber="560">
<code class="ruby"> # @param [Block] block</code>
</li>
- <li class="never" data-hits="" data-linenumber="585">
+ <li class="never" data-hits="" data-linenumber="561">
<code class="ruby"> # @param opts (see Net::SSH::Simple#ssh)</code>
</li>
- <li class="never" data-hits="" data-linenumber="586">
+ <li class="never" data-hits="" data-linenumber="562">
<code class="ruby"> # @return [Thread] Thread executing the SSH-Block.</code>
</li>
- <li class="never" data-hits="" data-linenumber="587">
+ <li class="never" data-hits="" data-linenumber="563">
<code class="ruby"> #</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="588">
+ <li class="covered" data-hits="1" data-linenumber="564">
<span class="hits">1</span>
<code class="ruby"> def async(opts={}, &block)</code>
</li>
- <li class="covered" data-hits="3" data-linenumber="589">
+ <li class="covered" data-hits="3" data-linenumber="565">
<span class="hits">3</span>
<code class="ruby"> opts = @opts.merge(opts)</code>
</li>
- <li class="covered" data-hits="3" data-linenumber="590">
+ <li class="covered" data-hits="3" data-linenumber="566">
<span class="hits">3</span>
<code class="ruby"> self.class.async(opts, &block)</code>
</li>
- <li class="never" data-hits="" data-linenumber="591">
+ <li class="never" data-hits="" data-linenumber="567">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="592">
+ <li class="never" data-hits="" data-linenumber="568">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="593">
+ <li class="never" data-hits="" data-linenumber="569">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="594">
+ <li class="never" data-hits="" data-linenumber="570">
<code class="ruby"> # Perform a sequence of ssh/scp operations.</code>
</li>
- <li class="never" data-hits="" data-linenumber="595">
+ <li class="never" data-hits="" data-linenumber="571">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="596">
+ <li class="never" data-hits="" data-linenumber="572">
<code class="ruby"> # @param opts (see Net::SSH::Simple#ssh)</code>
</li>
- <li class="never" data-hits="" data-linenumber="597">
+ <li class="never" data-hits="" data-linenumber="573">
<code class="ruby"> # @return [Net::SSH::Simple::Result] Result</code>
</li>
- <li class="never" data-hits="" data-linenumber="598">
+ <li class="never" data-hits="" data-linenumber="574">
<code class="ruby"> #</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="599">
+ <li class="covered" data-hits="1" data-linenumber="575">
<span class="hits">1</span>
<code class="ruby"> def self.sync(opts={}, &block)</code>
</li>
- <li class="covered" data-hits="42" data-linenumber="600">
- <span class="hits">42</span>
+ <li class="covered" data-hits="40" data-linenumber="576">
+ <span class="hits">40</span>
<code class="ruby"> s = self.new(opts)</code>
</li>
- <li class="covered" data-hits="42" data-linenumber="601">
- <span class="hits">42</span>
+ <li class="covered" data-hits="40" data-linenumber="577">
+ <span class="hits">40</span>
<code class="ruby"> r = Blockenspiel.invoke(block, s)</code>
</li>
- <li class="covered" data-hits="42" data-linenumber="602">
- <span class="hits">42</span>
+ <li class="covered" data-hits="40" data-linenumber="578">
+ <span class="hits">40</span>
<code class="ruby"> s.close</code>
</li>
- <li class="covered" data-hits="42" data-linenumber="603">
- <span class="hits">42</span>
+ <li class="covered" data-hits="40" data-linenumber="579">
+ <span class="hits">40</span>
<code class="ruby"> r</code>
</li>
- <li class="never" data-hits="" data-linenumber="604">
+ <li class="never" data-hits="" data-linenumber="580">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="605">
+ <li class="never" data-hits="" data-linenumber="581">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="606">
+ <li class="never" data-hits="" data-linenumber="582">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="607">
+ <li class="never" data-hits="" data-linenumber="583">
<code class="ruby"> # Close and cleanup.</code>
</li>
- <li class="never" data-hits="" data-linenumber="608">
+ <li class="never" data-hits="" data-linenumber="584">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="609">
+ <li class="never" data-hits="" data-linenumber="585">
<code class="ruby"> # @return [Net::SSH::Simple::Result] Result</code>
</li>
- <li class="never" data-hits="" data-linenumber="610">
+ <li class="never" data-hits="" data-linenumber="586">
<code class="ruby"> # </code>
</li>
- <li class="covered" data-hits="1" data-linenumber="611">
+ <li class="covered" data-hits="1" data-linenumber="587">
<span class="hits">1</span>
<code class="ruby"> def close</code>
</li>
- <li class="covered" data-hits="68" data-linenumber="612">
- <span class="hits">68</span>
+ <li class="covered" data-hits="62" data-linenumber="588">
+ <span class="hits">62</span>
<code class="ruby"> Thread.current[:ssh_simple_sessions].values.each do |session|</code>
</li>
- <li class="covered" data-hits="67" data-linenumber="613">
- <span class="hits">67</span>
+ <li class="covered" data-hits="61" data-linenumber="589">
+ <span class="hits">61</span>
<code class="ruby"> begin</code>
</li>
- <li class="covered" data-hits="133" data-linenumber="614">
- <span class="hits">133</span>
+ <li class="covered" data-hits="121" data-linenumber="590">
+ <span class="hits">121</span>
<code class="ruby"> Timeout.timeout(@opts[:close_timeout] || 5) { session.close }</code>
</li>
- <li class="never" data-hits="" data-linenumber="615">
+ <li class="never" data-hits="" data-linenumber="591">
<code class="ruby"> rescue => e</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="616">
+ <li class="covered" data-hits="1" data-linenumber="592">
<span class="hits">1</span>
<code class="ruby"> begin</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="617">
+ <li class="covered" data-hits="1" data-linenumber="593">
<span class="hits">1</span>
<code class="ruby"> session.shutdown!</code>
</li>
- <li class="never" data-hits="" data-linenumber="618">
+ <li class="never" data-hits="" data-linenumber="594">
<code class="ruby"> rescue</code>
</li>
- <li class="never" data-hits="" data-linenumber="619">
+ <li class="never" data-hits="" data-linenumber="595">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="620">
+ <li class="never" data-hits="" data-linenumber="596">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="621">
+ <li class="never" data-hits="" data-linenumber="597">
<code class="ruby"> end</code>
</li>
- <li class="covered" data-hits="68" data-linenumber="622">
- <span class="hits">68</span>
+ <li class="covered" data-hits="62" data-linenumber="598">
+ <span class="hits">62</span>
<code class="ruby"> @result</code>
</li>
- <li class="never" data-hits="" data-linenumber="623">
+ <li class="never" data-hits="" data-linenumber="599">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="624">
+ <li class="never" data-hits="" data-linenumber="600">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="625">
+ <li class="never" data-hits="" data-linenumber="601">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="626">
+ <li class="covered" data-hits="1" data-linenumber="602">
<span class="hits">1</span>
<code class="ruby"> private</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="627">
+ <li class="covered" data-hits="1" data-linenumber="603">
<span class="hits">1</span>
<code class="ruby"> EXTRA_OPTS = [:operation_timeout, :close_timeout, :keepalive_interval, :scp_src, :scp_dst]</code>
</li>
- <li class="never" data-hits="" data-linenumber="628">
+ <li class="never" data-hits="" data-linenumber="604">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="629">
+ <li class="covered" data-hits="1" data-linenumber="605">
<span class="hits">1</span>
<code class="ruby"> def with_session(host, opts={}, &block)</code>
</li>
- <li class="covered" data-hits="117" data-linenumber="630">
- <span class="hits">117</span>
+ <li class="covered" data-hits="101" data-linenumber="606">
+ <span class="hits">101</span>
<code class="ruby"> opts[:timeout] ||= 60</code>
</li>
- <li class="covered" data-hits="117" data-linenumber="631">
- <span class="hits">117</span>
+ <li class="covered" data-hits="101" data-linenumber="607">
+ <span class="hits">101</span>
<code class="ruby"> opts[:timeout] = 2**32 if opts[:timeout] == 0</code>
</li>
- <li class="covered" data-hits="117" data-linenumber="632">
- <span class="hits">117</span>
+ <li class="covered" data-hits="101" data-linenumber="608">
+ <span class="hits">101</span>
<code class="ruby"> opts[:operation_timeout] ||= 3600</code>
</li>
- <li class="covered" data-hits="117" data-linenumber="633">
- <span class="hits">117</span>
+ <li class="covered" data-hits="101" data-linenumber="609">
+ <span class="hits">101</span>
<code class="ruby"> opts[:operation_timeout] = 2**32 if opts[:operation_timeout] == 0</code>
</li>
- <li class="covered" data-hits="117" data-linenumber="634">
- <span class="hits">117</span>
+ <li class="covered" data-hits="101" data-linenumber="610">
+ <span class="hits">101</span>
<code class="ruby"> opts[:close_timeout] ||= 5</code>
</li>
- <li class="covered" data-hits="117" data-linenumber="635">
- <span class="hits">117</span>
+ <li class="covered" data-hits="101" data-linenumber="611">
+ <span class="hits">101</span>
<code class="ruby"> opts[:keepalive_interval] ||= 60</code>
</li>
- <li class="covered" data-hits="117" data-linenumber="636">
- <span class="hits">117</span>
+ <li class="covered" data-hits="101" data-linenumber="612">
+ <span class="hits">101</span>
<code class="ruby"> begin</code>
</li>
- <li class="covered" data-hits="704" data-linenumber="637">
- <span class="hits">704</span>
+ <li class="covered" data-hits="584" data-linenumber="613">
+ <span class="hits">584</span>
<code class="ruby"> net_ssh_opts = opts.reject{|k,v| EXTRA_OPTS.include? k }</code>
</li>
- <li class="covered" data-hits="117" data-linenumber="638">
- <span class="hits">117</span>
+ <li class="covered" data-hits="101" data-linenumber="614">
+ <span class="hits">101</span>
<code class="ruby"> Timeout.timeout(opts[:operation_timeout]) do</code>
</li>
- <li class="covered" data-hits="117" data-linenumber="639">
- <span class="hits">117</span>
+ <li class="covered" data-hits="101" data-linenumber="615">
+ <span class="hits">101</span>
<code class="ruby"> session = Thread.current[:ssh_simple_sessions][host.hash] \</code>
</li>
- <li class="never" data-hits="" data-linenumber="640">
+ <li class="never" data-hits="" data-linenumber="616">
<code class="ruby"> = Thread.current[:ssh_simple_sessions][host.hash] \</code>
</li>
- <li class="never" data-hits="" data-linenumber="641">
+ <li class="never" data-hits="" data-linenumber="617">
<code class="ruby"> || Net::SSH.start(*[host, opts[:user], net_ssh_opts])</code>
</li>
- <li class="covered" data-hits="116" data-linenumber="642">
- <span class="hits">116</span>
+ <li class="covered" data-hits="100" data-linenumber="618">
+ <span class="hits">100</span>
<code class="ruby"> block.call(session)</code>
</li>
- <li class="never" data-hits="" data-linenumber="643">
+ <li class="never" data-hits="" data-linenumber="619">
<code class="ruby"> end</code>
</li>
- <li class="covered" data-hits="9" data-linenumber="644">
- <span class="hits">9</span>
+ <li class="covered" data-hits="7" data-linenumber="620">
+ <span class="hits">7</span>
<code class="ruby"> rescue => e</code>
</li>
- <li class="covered" data-hits="9" data-linenumber="645">
- <span class="hits">9</span>
+ <li class="covered" data-hits="7" data-linenumber="621">
+ <span class="hits">7</span>
<code class="ruby"> opts[:password].gsub!(/./,'*') if opts.include? :password</code>
</li>
- <li class="covered" data-hits="9" data-linenumber="646">
- <span class="hits">9</span>
+ <li class="covered" data-hits="7" data-linenumber="622">
+ <span class="hits">7</span>
<code class="ruby"> @result[:exception] = e</code>
</li>
- <li class="covered" data-hits="9" data-linenumber="647">
- <span class="hits">9</span>
+ <li class="covered" data-hits="7" data-linenumber="623">
+ <span class="hits">7</span>
<code class="ruby"> @result[:success] = false</code>
</li>
- <li class="covered" data-hits="9" data-linenumber="648">
- <span class="hits">9</span>
+ <li class="covered" data-hits="7" data-linenumber="624">
+ <span class="hits">7</span>
<code class="ruby"> @result[:timed_out] = true if e.is_a? Timeout::Error</code>
</li>
- <li class="covered" data-hits="9" data-linenumber="649">
- <span class="hits">9</span>
+ <li class="covered" data-hits="7" data-linenumber="625">
+ <span class="hits">7</span>
<code class="ruby"> @result[:finish_at] = Time.new</code>
</li>
- <li class="covered" data-hits="9" data-linenumber="650">
- <span class="hits">9</span>
+ <li class="covered" data-hits="7" data-linenumber="626">
+ <span class="hits">7</span>
<code class="ruby"> raise Net::SSH::Simple::Error, [e, @result]</code>
</li>
- <li class="never" data-hits="" data-linenumber="651">
+ <li class="never" data-hits="" data-linenumber="627">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="652">
+ <li class="never" data-hits="" data-linenumber="628">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="653">
+ <li class="never" data-hits="" data-linenumber="629">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="654">
+ <li class="covered" data-hits="1" data-linenumber="630">
<span class="hits">1</span>
<code class="ruby"> def wait_for_channel(session, channel, result, opts)</code>
</li>
- <li class="covered" data-hits="116" data-linenumber="655">
- <span class="hits">116</span>
+ <li class="covered" data-hits="100" data-linenumber="631">
+ <span class="hits">100</span>
<code class="ruby"> session.loop(1) do</code>
</li>
- <li class="covered" data-hits="2383" data-linenumber="656">
- <span class="hits">2383</span>
+ <li class="covered" data-hits="1897" data-linenumber="632">
+ <span class="hits">1897</span>
<code class="ruby"> if opts[:timeout] < Time.now - result[:last_event_at]</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="657">
+ <li class="covered" data-hits="1" data-linenumber="633">
<span class="hits">1</span>
<code class="ruby"> raise Timeout::Error, 'idle timeout'</code>
</li>
- <li class="never" data-hits="" data-linenumber="658">
+ <li class="never" data-hits="" data-linenumber="634">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="659">
+ <li class="never" data-hits="" data-linenumber="635">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="660">
+ <li class="never" data-hits="" data-linenumber="636">
<code class="ruby"> # Send keep-alive probes at the configured interval.</code>
</li>
- <li class="covered" data-hits="2382" data-linenumber="661">
- <span class="hits">2382</span>
+ <li class="covered" data-hits="1896" data-linenumber="637">
+ <span class="hits">1896</span>
<code class="ruby"> if opts[:keepalive_interval] < Time.now.to_i - (@result[:last_keepalive_at]||0).to_i</code>
</li>
- <li class="covered" data-hits="119" data-linenumber="662">
- <span class="hits">119</span>
+ <li class="covered" data-hits="103" data-linenumber="638">
+ <span class="hits">103</span>
<code class="ruby"> session.send_global_request('keep-alive@openssh.com')</code>
</li>
- <li class="covered" data-hits="119" data-linenumber="663">
- <span class="hits">119</span>
+ <li class="covered" data-hits="103" data-linenumber="639">
+ <span class="hits">103</span>
<code class="ruby"> @result[:last_keepalive_at] = Time.now</code>
</li>
- <li class="never" data-hits="" data-linenumber="664">
+ <li class="never" data-hits="" data-linenumber="640">
<code class="ruby"> end</code>
</li>
- <li class="covered" data-hits="2382" data-linenumber="665">
- <span class="hits">2382</span>
+ <li class="covered" data-hits="1896" data-linenumber="641">
+ <span class="hits">1896</span>
<code class="ruby"> channel.active?</code>
</li>
- <li class="never" data-hits="" data-linenumber="666">
+ <li class="never" data-hits="" data-linenumber="642">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="667">
+ <li class="never" data-hits="" data-linenumber="643">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="668">
+ <li class="never" data-hits="" data-linenumber="644">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="669">
+ <li class="covered" data-hits="1" data-linenumber="645">
<span class="hits">1</span>
<code class="ruby"> def scp(mode, host, src, dst, opts={}, &block)</code>
</li>
- <li class="covered" data-hits="49" data-linenumber="670">
- <span class="hits">49</span>
+ <li class="covered" data-hits="33" data-linenumber="646">
+ <span class="hits">33</span>
<code class="ruby"> opts[:scp_src] = src</code>
</li>
- <li class="covered" data-hits="49" data-linenumber="671">
- <span class="hits">49</span>
+ <li class="covered" data-hits="33" data-linenumber="647">
+ <span class="hits">33</span>
<code class="ruby"> opts[:scp_dst] = dst</code>
</li>
- <li class="covered" data-hits="49" data-linenumber="672">
- <span class="hits">49</span>
+ <li class="covered" data-hits="33" data-linenumber="648">
+ <span class="hits">33</span>
<code class="ruby"> @result = Result.new(</code>
</li>
- <li class="never" data-hits="" data-linenumber="673">
+ <li class="never" data-hits="" data-linenumber="649">
<code class="ruby"> { :op => :scp, :host => host, :opts => opts, :cmd => mode,</code>
</li>
- <li class="never" data-hits="" data-linenumber="674">
+ <li class="never" data-hits="" data-linenumber="650">
<code class="ruby"> :last_event_at => Time.new, :start_at => Time.new, :success => false</code>
</li>
- <li class="never" data-hits="" data-linenumber="675">
+ <li class="never" data-hits="" data-linenumber="651">
<code class="ruby"> } )</code>
</li>
- <li class="covered" data-hits="49" data-linenumber="676">
- <span class="hits">49</span>
+ <li class="covered" data-hits="33" data-linenumber="652">
+ <span class="hits">33</span>
<code class="ruby"> with_session(host, opts) do |session|</code>
</li>
- <li class="covered" data-hits="49" data-linenumber="677">
- <span class="hits">49</span>
+ <li class="covered" data-hits="33" data-linenumber="653">
+ <span class="hits">33</span>
<code class="ruby"> lt = 0</code>
</li>
- <li class="covered" data-hits="49" data-linenumber="678">
- <span class="hits">49</span>
+ <li class="covered" data-hits="33" data-linenumber="654">
+ <span class="hits">33</span>
<code class="ruby"> channel = session.scp.send(mode, src, dst) do |ch, name, sent, total|</code>
</li>
- <li class="covered" data-hits="94" data-linenumber="679">
- <span class="hits">94</span>
+ <li class="covered" data-hits="64" data-linenumber="655">
+ <span class="hits">64</span>
<code class="ruby"> @result[:total] ||= total</code>
</li>
- <li class="covered" data-hits="94" data-linenumber="680">
- <span class="hits">94</span>
+ <li class="covered" data-hits="64" data-linenumber="656">
+ <span class="hits">64</span>
<code class="ruby"> @result[:sent] = sent</code>
</li>
- <li class="covered" data-hits="94" data-linenumber="681">
- <span class="hits">94</span>
+ <li class="covered" data-hits="64" data-linenumber="657">
+ <span class="hits">64</span>
<code class="ruby"> @result[:last_event_at] = Time.new</code>
</li>
- <li class="covered" data-hits="94" data-linenumber="682">
- <span class="hits">94</span>
+ <li class="covered" data-hits="64" data-linenumber="658">
+ <span class="hits">64</span>
<code class="ruby"> block.call(sent, total) unless block.nil?</code>
</li>
- <li class="never" data-hits="" data-linenumber="683">
+ <li class="never" data-hits="" data-linenumber="659">
<code class="ruby"> end</code>
</li>
- <li class="covered" data-hits="49" data-linenumber="684">
- <span class="hits">49</span>
+ <li class="covered" data-hits="33" data-linenumber="660">
+ <span class="hits">33</span>
<code class="ruby"> wait_for_channel session, channel, @result, opts</code>
</li>
- <li class="covered" data-hits="45" data-linenumber="685">
- <span class="hits">45</span>
+ <li class="covered" data-hits="31" data-linenumber="661">
+ <span class="hits">31</span>
<code class="ruby"> @result[:finish_at] = Time.new</code>
</li>
- <li class="covered" data-hits="45" data-linenumber="686">
- <span class="hits">45</span>
+ <li class="covered" data-hits="31" data-linenumber="662">
+ <span class="hits">31</span>
<code class="ruby"> @result[:success] = @result[:sent] == @result[:total]</code>
</li>
- <li class="covered" data-hits="45" data-linenumber="687">
- <span class="hits">45</span>
+ <li class="covered" data-hits="31" data-linenumber="663">
+ <span class="hits">31</span>
<code class="ruby"> @result</code>
</li>
- <li class="never" data-hits="" data-linenumber="688">
+ <li class="never" data-hits="" data-linenumber="664">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="689">
+ <li class="never" data-hits="" data-linenumber="665">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="690">
+ <li class="never" data-hits="" data-linenumber="666">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="691">
+ <li class="never" data-hits="" data-linenumber="667">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="692">
+ <li class="never" data-hits="" data-linenumber="668">
<code class="ruby">end</code>
</li>
- <li class="never" data-hits="" data-linenumber="693">
+ <li class="never" data-hits="" data-linenumber="669">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="694">
+ <li class="covered" data-hits="1" data-linenumber="670">
<span class="hits">1</span>
<code class="ruby">module Net</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="695">
+ <li class="covered" data-hits="1" data-linenumber="671">
<span class="hits">1</span>
<code class="ruby"> module SSH</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="696">
+ <li class="covered" data-hits="1" data-linenumber="672">
<span class="hits">1</span>
<code class="ruby"> class Simple</code>
</li>
- <li class="never" data-hits="" data-linenumber="697">
+ <li class="never" data-hits="" data-linenumber="673">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="698">
+ <li class="never" data-hits="" data-linenumber="674">
<code class="ruby"> # Error that occured during a Net::SSH::Simple operation.</code>
</li>
- <li class="never" data-hits="" data-linenumber="699">
+ <li class="never" data-hits="" data-linenumber="675">
<code class="ruby"> #</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="700">
+ <li class="covered" data-hits="1" data-linenumber="676">
<span class="hits">1</span>
<code class="ruby"> class Error < RuntimeError</code>
</li>
- <li class="never" data-hits="" data-linenumber="701">
+ <li class="never" data-hits="" data-linenumber="677">
<code class="ruby"> # Reference to the underlying Exception</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="702">
+ <li class="covered" data-hits="1" data-linenumber="678">
<span class="hits">1</span>
<code class="ruby"> attr_reader :wrapped</code>
</li>
- <li class="never" data-hits="" data-linenumber="703">
+ <li class="never" data-hits="" data-linenumber="679">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="704">
+ <li class="never" data-hits="" data-linenumber="680">
- <code class="ruby"> # {Net::SSH::Simple::Result} of the interrupted operation.</code>
+ <code class="ruby"> # {Net::SSH::Simple::Result} of the interrupted operation (may be incomplete!).</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="705">
+ <li class="covered" data-hits="1" data-linenumber="681">
<span class="hits">1</span>
<code class="ruby"> attr_reader :result</code>
</li>
- <li class="never" data-hits="" data-linenumber="706">
+ <li class="never" data-hits="" data-linenumber="682">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="707">
+ <li class="covered" data-hits="1" data-linenumber="683">
<span class="hits">1</span>
<code class="ruby"> def initialize(msg, e=$!)</code>
</li>
- <li class="covered" data-hits="9" data-linenumber="708">
- <span class="hits">9</span>
+ <li class="covered" data-hits="7" data-linenumber="684">
+ <span class="hits">7</span>
<code class="ruby"> super(msg)</code>
</li>
- <li class="covered" data-hits="9" data-linenumber="709">
- <span class="hits">9</span>
+ <li class="covered" data-hits="7" data-linenumber="685">
+ <span class="hits">7</span>
<code class="ruby"> @wrapped = e</code>
</li>
- <li class="covered" data-hits="9" data-linenumber="710">
- <span class="hits">9</span>
+ <li class="covered" data-hits="7" data-linenumber="686">
+ <span class="hits">7</span>
<code class="ruby"> @result = msg[1]</code>
</li>
- <li class="never" data-hits="" data-linenumber="711">
+ <li class="never" data-hits="" data-linenumber="687">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="712">
+ <li class="never" data-hits="" data-linenumber="688">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="713">
+ <li class="covered" data-hits="1" data-linenumber="689">
<span class="hits">1</span>
<code class="ruby"> def to_s</code>
</li>
- <li class="covered" data-hits="9" data-linenumber="714">
- <span class="hits">9</span>
+ <li class="covered" data-hits="7" data-linenumber="690">
+ <span class="hits">7</span>
<code class="ruby"> "#{@wrapped} @ #{@result}"</code>
</li>
- <li class="never" data-hits="" data-linenumber="715">
+ <li class="never" data-hits="" data-linenumber="691">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="716">
+ <li class="never" data-hits="" data-linenumber="692">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="717">
+ <li class="never" data-hits="" data-linenumber="693">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="718">
+ <li class="never" data-hits="" data-linenumber="694">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="719">
+ <li class="never" data-hits="" data-linenumber="695">
<code class="ruby"> # Result of a Net::SSH::Simple operation.</code>
</li>
- <li class="never" data-hits="" data-linenumber="720">
+ <li class="never" data-hits="" data-linenumber="696">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="721">
+ <li class="never" data-hits="" data-linenumber="697">
<code class="ruby"> # @attr [String] host Hostname/IP address</code>
</li>
- <li class="never" data-hits="" data-linenumber="722">
+ <li class="never" data-hits="" data-linenumber="698">
<code class="ruby"> # @attr [Symbol] op :ssh or :scp</code>
</li>
- <li class="never" data-hits="" data-linenumber="723">
+ <li class="never" data-hits="" data-linenumber="699">
- <code class="ruby"> # @attr [String] cmd Shell command (SSH only)</code>
+ <code class="ruby"> # @attr [String] cmd Shell command (ssh) or :upload/:download (scp)</code>
</li>
- <li class="never" data-hits="" data-linenumber="724">
+ <li class="never" data-hits="" data-linenumber="700">
<code class="ruby"> # @attr [Time] start_at Timestamp of operation start</code>
</li>
- <li class="never" data-hits="" data-linenumber="725">
+ <li class="never" data-hits="" data-linenumber="701">
<code class="ruby"> # @attr [Time] finish_at Timestamp of operation finish</code>
</li>
- <li class="never" data-hits="" data-linenumber="726">
+ <li class="never" data-hits="" data-linenumber="702">
<code class="ruby"> # @attr [Time] last_keepalive_at Timestamp of last keepalive (if any)</code>
</li>
- <li class="never" data-hits="" data-linenumber="727">
+ <li class="never" data-hits="" data-linenumber="703">
<code class="ruby"> # @attr [Time] last_event_at Timestamp of last activity</code>
</li>
- <li class="never" data-hits="" data-linenumber="728">
+ <li class="never" data-hits="" data-linenumber="704">
<code class="ruby"> # @attr [Boolean] timed_out True if the operation timed out</code>
</li>
- <li class="never" data-hits="" data-linenumber="729">
+ <li class="never" data-hits="" data-linenumber="705">
<code class="ruby"> # @attr [String] stdout Output captured on stdout (SSH only)</code>
</li>
- <li class="never" data-hits="" data-linenumber="730">
+ <li class="never" data-hits="" data-linenumber="706">
<code class="ruby"> # @attr [String] stderr Output captured on stderr (SSH only)</code>
</li>
- <li class="never" data-hits="" data-linenumber="731">
+ <li class="never" data-hits="" data-linenumber="707">
<code class="ruby"> # @attr [boolean] success Indicates whether the transport-connection was successful</code>
</li>
- <li class="never" data-hits="" data-linenumber="732">
+ <li class="never" data-hits="" data-linenumber="708">
<code class="ruby"> # @attr [String] exit_code UNIX exit code (SSH only)</code>
</li>
- <li class="never" data-hits="" data-linenumber="733">
+ <li class="never" data-hits="" data-linenumber="709">
<code class="ruby"> # @attr [Integer] total Size of requested file (in bytes, SCP only)</code>
</li>
- <li class="never" data-hits="" data-linenumber="734">
+ <li class="never" data-hits="" data-linenumber="710">
<code class="ruby"> # @attr [Integer] sent Number of bytes transferred (SCP only)</code>
</li>
- <li class="never" data-hits="" data-linenumber="735">
+ <li class="never" data-hits="" data-linenumber="711">
<code class="ruby"> # @attr [Hash] opts The options that the operation was parametrized with</code>
</li>
- <li class="never" data-hits="" data-linenumber="736">
+ <li class="never" data-hits="" data-linenumber="712">
<code class="ruby"> # @attr [Exception] exception Exception that occurred during this operation (if any)</code>
</li>
- <li class="never" data-hits="" data-linenumber="737">
+ <li class="never" data-hits="" data-linenumber="713">
<code class="ruby"> # @attr [String] exit_signal</code>
</li>
- <li class="never" data-hits="" data-linenumber="738">
+ <li class="never" data-hits="" data-linenumber="714">
<code class="ruby"> # Only present if the remote command terminated due to a signal (SSH only)</code>
</li>
- <li class="never" data-hits="" data-linenumber="739">
+ <li class="never" data-hits="" data-linenumber="715">
<code class="ruby"> #</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="740">
+ <li class="covered" data-hits="1" data-linenumber="716">
<span class="hits">1</span>
<code class="ruby"> class Result < Hashie::Dash</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="741">
+ <li class="covered" data-hits="1" data-linenumber="717">
<span class="hits">1</span>
<code class="ruby"> property :host</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="742">
+ <li class="covered" data-hits="1" data-linenumber="718">
<span class="hits">1</span>
<code class="ruby"> property :op</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="743">
+ <li class="covered" data-hits="1" data-linenumber="719">
<span class="hits">1</span>
<code class="ruby"> property :cmd</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="744">
+ <li class="covered" data-hits="1" data-linenumber="720">
<span class="hits">1</span>
<code class="ruby"> property :start_at</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="745">
+ <li class="covered" data-hits="1" data-linenumber="721">
<span class="hits">1</span>
<code class="ruby"> property :finish_at</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="746">
+ <li class="covered" data-hits="1" data-linenumber="722">
<span class="hits">1</span>
<code class="ruby"> property :last_keepalive_at</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="747">
+ <li class="covered" data-hits="1" data-linenumber="723">
<span class="hits">1</span>
<code class="ruby"> property :last_event_at</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="748">
+ <li class="covered" data-hits="1" data-linenumber="724">
<span class="hits">1</span>
<code class="ruby"> property :timed_out</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="749">
+ <li class="covered" data-hits="1" data-linenumber="725">
<span class="hits">1</span>
<code class="ruby"> property :stdout, :default => ''</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="750">
+ <li class="covered" data-hits="1" data-linenumber="726">
<span class="hits">1</span>
<code class="ruby"> property :stderr, :default => ''</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="751">
+ <li class="covered" data-hits="1" data-linenumber="727">
<span class="hits">1</span>
<code class="ruby"> property :success, :default => false</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="752">
+ <li class="covered" data-hits="1" data-linenumber="728">
<span class="hits">1</span>
<code class="ruby"> property :exit_code</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="753">
+ <li class="covered" data-hits="1" data-linenumber="729">
<span class="hits">1</span>
<code class="ruby"> property :total</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="754">
+ <li class="covered" data-hits="1" data-linenumber="730">
<span class="hits">1</span>
<code class="ruby"> property :sent</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="755">
+ <li class="covered" data-hits="1" data-linenumber="731">
<span class="hits">1</span>
<code class="ruby"> property :opts</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="756">
+ <li class="covered" data-hits="1" data-linenumber="732">
<span class="hits">1</span>
<code class="ruby"> property :exception</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="757">
+ <li class="covered" data-hits="1" data-linenumber="733">
<span class="hits">1</span>
<code class="ruby"> property :exit_signal</code>
</li>
- <li class="never" data-hits="" data-linenumber="758">
+ <li class="never" data-hits="" data-linenumber="734">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="759">
+ <li class="never" data-hits="" data-linenumber="735">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="760">
+ <li class="never" data-hits="" data-linenumber="736">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="761">
+ <li class="never" data-hits="" data-linenumber="737">
<code class="ruby">end</code>
</li>
- <li class="never" data-hits="" data-linenumber="762">
+ <li class="never" data-hits="" data-linenumber="738">
<code class="ruby"></code>
</li>