coverage/index.html in net-ssh-simple-1.6.18 vs coverage/index.html in net-ssh-simple-1.7.0
- old
+ new
@@ -12,31 +12,31 @@
<body>
<div id="loading">
<img src="./assets/0.10.0/loading.gif" alt="loading"/>
</div>
<div id="wrapper" style="display:none;">
- <div class="timestamp">Generated <abbr class="timeago" title="2017-02-17T14:14:22+01:00">2017-02-17T14:14:22+01:00</abbr></div>
+ <div class="timestamp">Generated <abbr class="timeago" title="2017-04-03T12:15:16+02:00">2017-04-03T12:15:16+02: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">98.8%</span></span>
+ (<span class="covered_percent"><span class="green">100.0%</span></span>
covered at
<span class="covered_strength">
<span class="green">
- 72.4
+ 101.0
</span>
</span> hits/line)
</h2>
<a name="AllFiles"></a>
<div>
<b>1</b> files in total.
- <b>166</b> relevant lines.
- <span class="green"><b>164</b> lines covered</span> and
- <span class="red"><b>2</b> lines missed </span>
+ <b>167</b> relevant lines.
+ <span class="green"><b>167</b> lines covered</span> and
+ <span class="red"><b>0</b> lines missed </span>
</div>
<table class="file_list">
<thead>
<tr>
<th>File</th>
@@ -49,17 +49,17 @@
</tr>
</thead>
<tbody>
<tr>
- <td class="strong"><a href="#88c716d6274c3299a209db753fb48b66248bc05e" class="src_link" title="lib/net/ssh/simple.rb">lib/net/ssh/simple.rb</a></td>
- <td class="green strong">98.8 %</td>
- <td>744</td>
- <td>166</td>
- <td>164</td>
- <td>2</td>
- <td>72.4</td>
+ <td class="strong"><a href="#d0ec2a569d1de04ed3493abc0da5a4a708c29c28" class="src_link" title="lib/net/ssh/simple.rb">lib/net/ssh/simple.rb</a></td>
+ <td class="green strong">100.0 %</td>
+ <td>752</td>
+ <td>167</td>
+ <td>167</td>
+ <td>0</td>
+ <td>101.0</td>
</tr>
</tbody>
</table>
</div>
@@ -67,25 +67,25 @@
</div>
<div id="footer">
- Generated by <a href="http://github.com/colszowka/simplecov">simplecov</a> v0.12.0
+ Generated by <a href="http://github.com/colszowka/simplecov">simplecov</a> v0.14.1
and simplecov-html v0.10.0<br/>
using RSpec
</div>
<div class="source_files">
- <div class="source_table" id="88c716d6274c3299a209db753fb48b66248bc05e">
+ <div class="source_table" id="d0ec2a569d1de04ed3493abc0da5a4a708c29c28">
<div class="header">
<h3>lib/net/ssh/simple.rb</h3>
- <h4><span class="green">98.8 %</span> covered</h4>
+ <h4><span class="green">100.0 %</span> covered</h4>
<div>
- <b>166</b> relevant lines.
- <span class="green"><b>164</b> lines covered</span> and
- <span class="red"><b>2</b> lines missed.</span>
+ <b>167</b> relevant lines.
+ <span class="green"><b>167</b> lines covered</span> and
+ <span class="red"><b>0</b> lines missed.</span>
</div>
</div>
<pre>
<ol>
@@ -3016,24 +3016,24 @@
<span class="hits">1</span>
<code class="ruby"> def ssh(host, cmd, opts={}, &block)</code>
</li>
- <li class="covered" data-hits="68" data-linenumber="489">
- <span class="hits">68</span>
+ <li class="covered" data-hits="71" data-linenumber="489">
+ <span class="hits">71</span>
<code class="ruby"> opts = @opts.merge(opts)</code>
</li>
- <li class="covered" data-hits="68" data-linenumber="490">
- <span class="hits">68</span>
+ <li class="covered" data-hits="71" data-linenumber="490">
+ <span class="hits">71</span>
<code class="ruby"> with_session(host, opts) do |session|</code>
</li>
- <li class="covered" data-hits="67" data-linenumber="491">
- <span class="hits">67</span>
+ <li class="covered" data-hits="70" data-linenumber="491">
+ <span class="hits">70</span>
<code class="ruby"> @result = Result.new(</code>
</li>
<li class="never" data-hits="" data-linenumber="492">
@@ -3064,126 +3064,126 @@
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="67" data-linenumber="497">
- <span class="hits">67</span>
+ <li class="covered" data-hits="70" data-linenumber="497">
+ <span class="hits">70</span>
<code class="ruby"> channel = session.open_channel do |chan|</code>
</li>
- <li class="covered" data-hits="67" data-linenumber="498">
- <span class="hits">67</span>
+ <li class="covered" data-hits="70" data-linenumber="498">
+ <span class="hits">70</span>
<code class="ruby"> chan.exec cmd do |ch, success|</code>
</li>
- <li class="covered" data-hits="67" data-linenumber="499">
- <span class="hits">67</span>
+ <li class="covered" data-hits="70" data-linenumber="499">
+ <span class="hits">70</span>
<code class="ruby"> @result[:success] = success</code>
</li>
- <li class="covered" data-hits="67" data-linenumber="500">
- <span class="hits">67</span>
+ <li class="covered" data-hits="70" data-linenumber="500">
+ <span class="hits">70</span>
<code class="ruby"> ch.on_data do |c, data|</code>
</li>
- <li class="covered" data-hits="237" data-linenumber="501">
- <span class="hits">237</span>
+ <li class="covered" data-hits="952" data-linenumber="501">
+ <span class="hits">952</span>
<code class="ruby"> @result[:last_event_at] = Time.new</code>
</li>
- <li class="covered" data-hits="237" data-linenumber="502">
- <span class="hits">237</span>
+ <li class="covered" data-hits="952" data-linenumber="502">
+ <span class="hits">952</span>
<code class="ruby"> r = block.call(:stdout, ch, data) if block</code>
</li>
- <li class="covered" data-hits="237" data-linenumber="503">
- <span class="hits">237</span>
+ <li class="covered" data-hits="952" data-linenumber="503">
+ <span class="hits">952</span>
<code class="ruby"> @result[:stdout] += data.to_s unless r == :no_append</code>
</li>
<li class="never" data-hits="" data-linenumber="504">
<code class="ruby"> end</code>
</li>
- <li class="covered" data-hits="67" data-linenumber="505">
- <span class="hits">67</span>
+ <li class="covered" data-hits="70" data-linenumber="505">
+ <span class="hits">70</span>
<code class="ruby"> ch.on_extended_data do |c, type, data|</code>
</li>
- <li class="covered" data-hits="198" data-linenumber="506">
- <span class="hits">198</span>
+ <li class="covered" data-hits="892" data-linenumber="506">
+ <span class="hits">892</span>
<code class="ruby"> @result[:last_event_at] = Time.new</code>
</li>
- <li class="covered" data-hits="198" data-linenumber="507">
- <span class="hits">198</span>
+ <li class="covered" data-hits="892" data-linenumber="507">
+ <span class="hits">892</span>
<code class="ruby"> r = block.call(:stderr, ch, data) if block</code>
</li>
- <li class="covered" data-hits="198" data-linenumber="508">
- <span class="hits">198</span>
+ <li class="covered" data-hits="892" data-linenumber="508">
+ <span class="hits">892</span>
<code class="ruby"> @result[:stderr] += data.to_s unless r == :no_append</code>
</li>
<li class="never" data-hits="" data-linenumber="509">
<code class="ruby"> end</code>
</li>
- <li class="covered" data-hits="67" data-linenumber="510">
- <span class="hits">67</span>
+ <li class="covered" data-hits="70" data-linenumber="510">
+ <span class="hits">70</span>
<code class="ruby"> ch.on_request('exit-status') do |c, data|</code>
</li>
- <li class="covered" data-hits="62" data-linenumber="511">
- <span class="hits">62</span>
+ <li class="covered" data-hits="65" data-linenumber="511">
+ <span class="hits">65</span>
<code class="ruby"> @result[:last_event_at] = Time.new</code>
</li>
- <li class="covered" data-hits="62" data-linenumber="512">
- <span class="hits">62</span>
+ <li class="covered" data-hits="65" data-linenumber="512">
+ <span class="hits">65</span>
<code class="ruby"> exit_code = data.read_long</code>
</li>
- <li class="covered" data-hits="62" data-linenumber="513">
- <span class="hits">62</span>
+ <li class="covered" data-hits="65" data-linenumber="513">
+ <span class="hits">65</span>
<code class="ruby"> block.call(:exit_code, ch, exit_code) if block</code>
</li>
- <li class="covered" data-hits="62" data-linenumber="514">
- <span class="hits">62</span>
+ <li class="covered" data-hits="65" data-linenumber="514">
+ <span class="hits">65</span>
<code class="ruby"> @result[:exit_code] = exit_code</code>
</li>
<li class="never" data-hits="" data-linenumber="515">
<code class="ruby"> end</code>
</li>
- <li class="covered" data-hits="67" data-linenumber="516">
- <span class="hits">67</span>
+ <li class="covered" data-hits="70" data-linenumber="516">
+ <span class="hits">70</span>
<code class="ruby"> ch.on_request('exit-signal') do |c, data|</code>
</li>
<li class="covered" data-hits="3" data-linenumber="517">
@@ -3238,12 +3238,12 @@
<code class="ruby"> end</code>
</li>
- <li class="covered" data-hits="67" data-linenumber="526">
- <span class="hits">67</span>
+ <li class="covered" data-hits="70" data-linenumber="526">
+ <span class="hits">70</span>
<code class="ruby"> block.call(:start, ch, nil) if block</code>
</li>
<li class="never" data-hits="" data-linenumber="527">
@@ -3256,30 +3256,30 @@
<code class="ruby"> end</code>
</li>
- <li class="covered" data-hits="67" data-linenumber="529">
- <span class="hits">67</span>
+ <li class="covered" data-hits="70" data-linenumber="529">
+ <span class="hits">70</span>
<code class="ruby"> wait_for_channel session, channel, @result, opts</code>
</li>
- <li class="covered" data-hits="63" data-linenumber="530">
- <span class="hits">63</span>
+ <li class="covered" data-hits="66" data-linenumber="530">
+ <span class="hits">66</span>
<code class="ruby"> @result[:finish_at] = Time.new</code>
</li>
- <li class="covered" data-hits="63" data-linenumber="531">
- <span class="hits">63</span>
+ <li class="covered" data-hits="66" data-linenumber="531">
+ <span class="hits">66</span>
<code class="ruby"> block.call(:finish, channel, nil) if block</code>
</li>
- <li class="covered" data-hits="63" data-linenumber="532">
- <span class="hits">63</span>
+ <li class="covered" data-hits="66" data-linenumber="532">
+ <span class="hits">66</span>
<code class="ruby"> @result</code>
</li>
<li class="never" data-hits="" data-linenumber="533">
@@ -3697,859 +3697,907 @@
</li>
<li class="covered" data-hits="1" data-linenumber="602">
<span class="hits">1</span>
- <code class="ruby"> MAX_TIMEOUT = ([''].pack('p').size == 8) ? 2**32 : 2**16</code>
+ <code class="ruby"> is_64bit_platform = true</code>
</li>
<li class="covered" data-hits="1" data-linenumber="603">
<span class="hits">1</span>
- <code class="ruby"> if MAX_TIMEOUT == 2**16 and $SUPPRESS_32BIT_WARNING.nil?</code>
+ <code class="ruby"> begin</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="604">
+ <li class="covered" data-hits="1" data-linenumber="604">
+ <span class="hits">1</span>
+ <code class="ruby"> Socket.tcp('127.0.0.1', 1, connect_timeout: 2**32).close</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="605">
- <code class="ruby"> warn "WARNING: 32bit platform detected; Net::SSH::Simple timeout defaults to 65536s (~18 hours)."</code>
+
+ <code class="ruby"> rescue Errno::EINVAL</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="605">
+ <li class="covered" data-hits="1" data-linenumber="606">
+ <span class="hits">1</span>
+ <code class="ruby"> is_64bit_platform = false</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="607">
- <code class="ruby"> warn "To suppress this warning set $SUPPRESS_32BIT_WARNING=1 before you require 'net/ssh/simple'."</code>
+
+ <code class="ruby"> rescue</code>
</li>
- <li class="never" data-hits="" data-linenumber="606">
+ <li class="never" data-hits="" data-linenumber="608">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="607">
+ <li class="covered" data-hits="1" data-linenumber="609">
+ <span class="hits">1</span>
+ <code class="ruby"> MAX_TIMEOUT = is_64bit_platform ? 2**32 : 2**16</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="610">
+
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="608">
+ <li class="never" data-hits="" data-linenumber="611">
+
+
+ <code class="ruby"> # if MAX_TIMEOUT == 2**16 and $SUPPRESS_32BIT_WARNING.nil?</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="612">
+
+
+ <code class="ruby"> # warn "WARNING: 32bit platform detected; Net::SSH::Simple timeout defaults to 65536s (~18 hours)."</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="613">
+
+
+ <code class="ruby"> # warn "To suppress this warning set $SUPPRESS_32BIT_WARNING=1 before you require 'net/ssh/simple'."</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="614">
+
+
+ <code class="ruby"> # end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="615">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="616">
<span class="hits">1</span>
<code class="ruby"> private</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="609">
+ <li class="covered" data-hits="1" data-linenumber="617">
<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="610">
+ <li class="never" data-hits="" data-linenumber="618">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="611">
+ <li class="covered" data-hits="1" data-linenumber="619">
<span class="hits">1</span>
<code class="ruby"> def with_session(host, opts={}, &block)</code>
</li>
- <li class="covered" data-hits="101" data-linenumber="612">
- <span class="hits">101</span>
+ <li class="covered" data-hits="104" data-linenumber="620">
+ <span class="hits">104</span>
<code class="ruby"> opts[:timeout] ||= 60</code>
</li>
- <li class="covered" data-hits="101" data-linenumber="613">
- <span class="hits">101</span>
+ <li class="covered" data-hits="104" data-linenumber="621">
+ <span class="hits">104</span>
<code class="ruby"> opts[:timeout] = MAX_TIMEOUT if opts[:timeout] == 0</code>
</li>
- <li class="covered" data-hits="101" data-linenumber="614">
- <span class="hits">101</span>
+ <li class="covered" data-hits="104" data-linenumber="622">
+ <span class="hits">104</span>
<code class="ruby"> opts[:operation_timeout] ||= 3600</code>
</li>
- <li class="covered" data-hits="101" data-linenumber="615">
- <span class="hits">101</span>
+ <li class="covered" data-hits="104" data-linenumber="623">
+ <span class="hits">104</span>
<code class="ruby"> opts[:operation_timeout] = MAX_TIMEOUT if opts[:operation_timeout] == 0</code>
</li>
- <li class="covered" data-hits="101" data-linenumber="616">
- <span class="hits">101</span>
+ <li class="covered" data-hits="104" data-linenumber="624">
+ <span class="hits">104</span>
<code class="ruby"> opts[:close_timeout] ||= 5</code>
</li>
- <li class="covered" data-hits="101" data-linenumber="617">
- <span class="hits">101</span>
+ <li class="covered" data-hits="104" data-linenumber="625">
+ <span class="hits">104</span>
<code class="ruby"> opts[:keepalive_interval] ||= 60</code>
</li>
- <li class="covered" data-hits="101" data-linenumber="618">
- <span class="hits">101</span>
+ <li class="covered" data-hits="104" data-linenumber="626">
+ <span class="hits">104</span>
<code class="ruby"> begin</code>
</li>
- <li class="covered" data-hits="584" data-linenumber="619">
- <span class="hits">584</span>
+ <li class="covered" data-hits="599" data-linenumber="627">
+ <span class="hits">599</span>
<code class="ruby"> net_ssh_opts = opts.reject{|k,v| EXTRA_OPTS.include? k }</code>
</li>
- <li class="covered" data-hits="101" data-linenumber="620">
- <span class="hits">101</span>
+ <li class="covered" data-hits="104" data-linenumber="628">
+ <span class="hits">104</span>
<code class="ruby"> ::Timeout.timeout(opts[:operation_timeout]) do</code>
</li>
- <li class="covered" data-hits="101" data-linenumber="621">
- <span class="hits">101</span>
+ <li class="covered" data-hits="104" data-linenumber="629">
+ <span class="hits">104</span>
<code class="ruby"> session = Thread.current[:ssh_simple_sessions][host.hash] \</code>
</li>
- <li class="never" data-hits="" data-linenumber="622">
+ <li class="never" data-hits="" data-linenumber="630">
<code class="ruby"> = Thread.current[:ssh_simple_sessions][host.hash] \</code>
</li>
- <li class="never" data-hits="" data-linenumber="623">
+ <li class="never" data-hits="" data-linenumber="631">
<code class="ruby"> || Net::SSH.start(*[host, opts[:user], net_ssh_opts])</code>
</li>
- <li class="covered" data-hits="100" data-linenumber="624">
- <span class="hits">100</span>
+ <li class="covered" data-hits="103" data-linenumber="632">
+ <span class="hits">103</span>
<code class="ruby"> block.call(session)</code>
</li>
- <li class="never" data-hits="" data-linenumber="625">
+ <li class="never" data-hits="" data-linenumber="633">
<code class="ruby"> end</code>
</li>
- <li class="covered" data-hits="7" data-linenumber="626">
+ <li class="covered" data-hits="7" data-linenumber="634">
<span class="hits">7</span>
<code class="ruby"> rescue => e</code>
</li>
- <li class="covered" data-hits="7" data-linenumber="627">
+ <li class="covered" data-hits="7" data-linenumber="635">
<span class="hits">7</span>
<code class="ruby"> opts[:password].gsub!(/./,'*') if opts.include? :password</code>
</li>
- <li class="covered" data-hits="7" data-linenumber="628">
+ <li class="covered" data-hits="7" data-linenumber="636">
<span class="hits">7</span>
<code class="ruby"> @result[:exception] = e</code>
</li>
- <li class="covered" data-hits="7" data-linenumber="629">
+ <li class="covered" data-hits="7" data-linenumber="637">
<span class="hits">7</span>
<code class="ruby"> @result[:success] = false</code>
</li>
- <li class="covered" data-hits="7" data-linenumber="630">
+ <li class="covered" data-hits="7" data-linenumber="638">
<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="7" data-linenumber="631">
+ <li class="covered" data-hits="7" data-linenumber="639">
<span class="hits">7</span>
<code class="ruby"> @result[:finish_at] = Time.new</code>
</li>
- <li class="covered" data-hits="7" data-linenumber="632">
+ <li class="covered" data-hits="7" data-linenumber="640">
<span class="hits">7</span>
<code class="ruby"> raise Net::SSH::Simple::Error, [e, @result]</code>
</li>
- <li class="never" data-hits="" data-linenumber="633">
+ <li class="never" data-hits="" data-linenumber="641">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="634">
+ <li class="never" data-hits="" data-linenumber="642">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="635">
+ <li class="never" data-hits="" data-linenumber="643">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="636">
+ <li class="covered" data-hits="1" data-linenumber="644">
<span class="hits">1</span>
<code class="ruby"> def wait_for_channel(session, channel, result, opts)</code>
</li>
- <li class="covered" data-hits="100" data-linenumber="637">
- <span class="hits">100</span>
+ <li class="covered" data-hits="103" data-linenumber="645">
+ <span class="hits">103</span>
<code class="ruby"> session.loop(1) do</code>
</li>
- <li class="covered" data-hits="1991" data-linenumber="638">
- <span class="hits">1991</span>
+ <li class="covered" data-hits="2159" data-linenumber="646">
+ <span class="hits">2159</span>
<code class="ruby"> if opts[:timeout] < Time.now - result[:last_event_at]</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="639">
+ <li class="covered" data-hits="1" data-linenumber="647">
<span class="hits">1</span>
<code class="ruby"> raise ::Timeout::Error, 'idle timeout'</code>
</li>
- <li class="never" data-hits="" data-linenumber="640">
+ <li class="never" data-hits="" data-linenumber="648">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="641">
+ <li class="never" data-hits="" data-linenumber="649">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="642">
+ <li class="never" data-hits="" data-linenumber="650">
<code class="ruby"> # Send keep-alive probes at the configured interval.</code>
</li>
- <li class="covered" data-hits="1990" data-linenumber="643">
- <span class="hits">1990</span>
+ <li class="covered" data-hits="2158" data-linenumber="651">
+ <span class="hits">2158</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="103" data-linenumber="644">
- <span class="hits">103</span>
+ <li class="covered" data-hits="107" data-linenumber="652">
+ <span class="hits">107</span>
<code class="ruby"> session.send_global_request('keep-alive@openssh.com')</code>
</li>
- <li class="covered" data-hits="103" data-linenumber="645">
- <span class="hits">103</span>
+ <li class="covered" data-hits="107" data-linenumber="653">
+ <span class="hits">107</span>
<code class="ruby"> @result[:last_keepalive_at] = Time.now</code>
</li>
- <li class="never" data-hits="" data-linenumber="646">
+ <li class="never" data-hits="" data-linenumber="654">
<code class="ruby"> end</code>
</li>
- <li class="covered" data-hits="1990" data-linenumber="647">
- <span class="hits">1990</span>
+ <li class="covered" data-hits="2158" data-linenumber="655">
+ <span class="hits">2158</span>
<code class="ruby"> channel.active?</code>
</li>
- <li class="never" data-hits="" data-linenumber="648">
+ <li class="never" data-hits="" data-linenumber="656">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="649">
+ <li class="never" data-hits="" data-linenumber="657">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="650">
+ <li class="never" data-hits="" data-linenumber="658">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="651">
+ <li class="covered" data-hits="1" data-linenumber="659">
<span class="hits">1</span>
<code class="ruby"> def scp(mode, host, src, dst, opts={}, &block)</code>
</li>
- <li class="covered" data-hits="33" data-linenumber="652">
+ <li class="covered" data-hits="33" data-linenumber="660">
<span class="hits">33</span>
<code class="ruby"> opts[:scp_src] = src</code>
</li>
- <li class="covered" data-hits="33" data-linenumber="653">
+ <li class="covered" data-hits="33" data-linenumber="661">
<span class="hits">33</span>
<code class="ruby"> opts[:scp_dst] = dst</code>
</li>
- <li class="covered" data-hits="33" data-linenumber="654">
+ <li class="covered" data-hits="33" data-linenumber="662">
<span class="hits">33</span>
<code class="ruby"> @result = Result.new(</code>
</li>
- <li class="never" data-hits="" data-linenumber="655">
+ <li class="never" data-hits="" data-linenumber="663">
<code class="ruby"> { :op => :scp, :host => host, :opts => opts, :cmd => mode,</code>
</li>
- <li class="never" data-hits="" data-linenumber="656">
+ <li class="never" data-hits="" data-linenumber="664">
<code class="ruby"> :last_event_at => Time.new, :start_at => Time.new, :success => false</code>
</li>
- <li class="never" data-hits="" data-linenumber="657">
+ <li class="never" data-hits="" data-linenumber="665">
<code class="ruby"> } )</code>
</li>
- <li class="covered" data-hits="33" data-linenumber="658">
+ <li class="covered" data-hits="33" data-linenumber="666">
<span class="hits">33</span>
<code class="ruby"> with_session(host, opts) do |session|</code>
</li>
- <li class="covered" data-hits="33" data-linenumber="659">
+ <li class="covered" data-hits="33" data-linenumber="667">
<span class="hits">33</span>
<code class="ruby"> lt = 0</code>
</li>
- <li class="covered" data-hits="33" data-linenumber="660">
+ <li class="covered" data-hits="33" data-linenumber="668">
<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="64" data-linenumber="661">
+ <li class="covered" data-hits="64" data-linenumber="669">
<span class="hits">64</span>
<code class="ruby"> @result[:total] ||= total</code>
</li>
- <li class="covered" data-hits="64" data-linenumber="662">
+ <li class="covered" data-hits="64" data-linenumber="670">
<span class="hits">64</span>
<code class="ruby"> @result[:sent] = sent</code>
</li>
- <li class="covered" data-hits="64" data-linenumber="663">
+ <li class="covered" data-hits="64" data-linenumber="671">
<span class="hits">64</span>
<code class="ruby"> @result[:last_event_at] = Time.new</code>
</li>
- <li class="covered" data-hits="64" data-linenumber="664">
+ <li class="covered" data-hits="64" data-linenumber="672">
<span class="hits">64</span>
<code class="ruby"> block.call(sent, total) unless block.nil?</code>
</li>
- <li class="never" data-hits="" data-linenumber="665">
+ <li class="never" data-hits="" data-linenumber="673">
<code class="ruby"> end</code>
</li>
- <li class="covered" data-hits="33" data-linenumber="666">
+ <li class="covered" data-hits="33" data-linenumber="674">
<span class="hits">33</span>
<code class="ruby"> wait_for_channel session, channel, @result, opts</code>
</li>
- <li class="covered" data-hits="31" data-linenumber="667">
+ <li class="covered" data-hits="31" data-linenumber="675">
<span class="hits">31</span>
<code class="ruby"> @result[:finish_at] = Time.new</code>
</li>
- <li class="covered" data-hits="31" data-linenumber="668">
+ <li class="covered" data-hits="31" data-linenumber="676">
<span class="hits">31</span>
<code class="ruby"> @result[:success] = @result[:sent] == @result[:total]</code>
</li>
- <li class="covered" data-hits="31" data-linenumber="669">
+ <li class="covered" data-hits="31" data-linenumber="677">
<span class="hits">31</span>
<code class="ruby"> @result</code>
</li>
- <li class="never" data-hits="" data-linenumber="670">
+ <li class="never" data-hits="" data-linenumber="678">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="671">
+ <li class="never" data-hits="" data-linenumber="679">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="672">
+ <li class="never" data-hits="" data-linenumber="680">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="673">
+ <li class="never" data-hits="" data-linenumber="681">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="674">
+ <li class="never" data-hits="" data-linenumber="682">
<code class="ruby">end</code>
</li>
- <li class="never" data-hits="" data-linenumber="675">
+ <li class="never" data-hits="" data-linenumber="683">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="676">
+ <li class="covered" data-hits="1" data-linenumber="684">
<span class="hits">1</span>
<code class="ruby">module Net</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="677">
+ <li class="covered" data-hits="1" data-linenumber="685">
<span class="hits">1</span>
<code class="ruby"> module SSH</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="678">
+ <li class="covered" data-hits="1" data-linenumber="686">
<span class="hits">1</span>
<code class="ruby"> class Simple</code>
</li>
- <li class="never" data-hits="" data-linenumber="679">
+ <li class="never" data-hits="" data-linenumber="687">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="680">
+ <li class="never" data-hits="" data-linenumber="688">
<code class="ruby"> # Error that occured during a Net::SSH::Simple operation.</code>
</li>
- <li class="never" data-hits="" data-linenumber="681">
+ <li class="never" data-hits="" data-linenumber="689">
<code class="ruby"> #</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="682">
+ <li class="covered" data-hits="1" data-linenumber="690">
<span class="hits">1</span>
<code class="ruby"> class Error < RuntimeError</code>
</li>
- <li class="never" data-hits="" data-linenumber="683">
+ <li class="never" data-hits="" data-linenumber="691">
<code class="ruby"> # Reference to the underlying Exception</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="684">
+ <li class="covered" data-hits="1" data-linenumber="692">
<span class="hits">1</span>
<code class="ruby"> attr_reader :wrapped</code>
</li>
- <li class="never" data-hits="" data-linenumber="685">
+ <li class="never" data-hits="" data-linenumber="693">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="686">
+ <li class="never" data-hits="" data-linenumber="694">
<code class="ruby"> # {Net::SSH::Simple::Result} of the interrupted operation (may be incomplete!).</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="687">
+ <li class="covered" data-hits="1" data-linenumber="695">
<span class="hits">1</span>
<code class="ruby"> attr_reader :result</code>
</li>
- <li class="never" data-hits="" data-linenumber="688">
+ <li class="never" data-hits="" data-linenumber="696">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="689">
+ <li class="covered" data-hits="1" data-linenumber="697">
<span class="hits">1</span>
<code class="ruby"> def initialize(msg, e=$!)</code>
</li>
- <li class="covered" data-hits="7" data-linenumber="690">
+ <li class="covered" data-hits="7" data-linenumber="698">
<span class="hits">7</span>
<code class="ruby"> super(msg)</code>
</li>
- <li class="covered" data-hits="7" data-linenumber="691">
+ <li class="covered" data-hits="7" data-linenumber="699">
<span class="hits">7</span>
<code class="ruby"> @wrapped = e</code>
</li>
- <li class="covered" data-hits="7" data-linenumber="692">
+ <li class="covered" data-hits="7" data-linenumber="700">
<span class="hits">7</span>
<code class="ruby"> @result = msg[1]</code>
</li>
- <li class="never" data-hits="" data-linenumber="693">
+ <li class="never" data-hits="" data-linenumber="701">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="694">
+ <li class="never" data-hits="" data-linenumber="702">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="695">
+ <li class="covered" data-hits="1" data-linenumber="703">
<span class="hits">1</span>
<code class="ruby"> def to_s</code>
</li>
- <li class="covered" data-hits="7" data-linenumber="696">
+ <li class="covered" data-hits="7" data-linenumber="704">
<span class="hits">7</span>
<code class="ruby"> "#{@wrapped} @ #{@result}"</code>
</li>
- <li class="never" data-hits="" data-linenumber="697">
+ <li class="never" data-hits="" data-linenumber="705">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="698">
+ <li class="never" data-hits="" data-linenumber="706">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="699">
+ <li class="never" data-hits="" data-linenumber="707">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="700">
+ <li class="never" data-hits="" data-linenumber="708">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="701">
+ <li class="never" data-hits="" data-linenumber="709">
<code class="ruby"> # Result of a Net::SSH::Simple operation.</code>
</li>
- <li class="never" data-hits="" data-linenumber="702">
+ <li class="never" data-hits="" data-linenumber="710">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="703">
+ <li class="never" data-hits="" data-linenumber="711">
<code class="ruby"> # @attr [String] host Hostname/IP address</code>
</li>
- <li class="never" data-hits="" data-linenumber="704">
+ <li class="never" data-hits="" data-linenumber="712">
<code class="ruby"> # @attr [Symbol] op :ssh or :scp</code>
</li>
- <li class="never" data-hits="" data-linenumber="705">
+ <li class="never" data-hits="" data-linenumber="713">
<code class="ruby"> # @attr [String] cmd Shell command (ssh) or :upload/:download (scp)</code>
</li>
- <li class="never" data-hits="" data-linenumber="706">
+ <li class="never" data-hits="" data-linenumber="714">
<code class="ruby"> # @attr [Time] start_at Timestamp of operation start</code>
</li>
- <li class="never" data-hits="" data-linenumber="707">
+ <li class="never" data-hits="" data-linenumber="715">
<code class="ruby"> # @attr [Time] finish_at Timestamp of operation finish</code>
</li>
- <li class="never" data-hits="" data-linenumber="708">
+ <li class="never" data-hits="" data-linenumber="716">
<code class="ruby"> # @attr [Time] last_keepalive_at Timestamp of last keepalive (if any)</code>
</li>
- <li class="never" data-hits="" data-linenumber="709">
+ <li class="never" data-hits="" data-linenumber="717">
<code class="ruby"> # @attr [Time] last_event_at Timestamp of last activity</code>
</li>
- <li class="never" data-hits="" data-linenumber="710">
+ <li class="never" data-hits="" data-linenumber="718">
<code class="ruby"> # @attr [Boolean] timed_out True if the operation timed out</code>
</li>
- <li class="never" data-hits="" data-linenumber="711">
+ <li class="never" data-hits="" data-linenumber="719">
<code class="ruby"> # @attr [String] stdout Output captured on stdout (SSH only)</code>
</li>
- <li class="never" data-hits="" data-linenumber="712">
+ <li class="never" data-hits="" data-linenumber="720">
<code class="ruby"> # @attr [String] stderr Output captured on stderr (SSH only)</code>
</li>
- <li class="never" data-hits="" data-linenumber="713">
+ <li class="never" data-hits="" data-linenumber="721">
<code class="ruby"> # @attr [boolean] success Indicates whether the transport-connection was successful</code>
</li>
- <li class="never" data-hits="" data-linenumber="714">
+ <li class="never" data-hits="" data-linenumber="722">
<code class="ruby"> # @attr [String] exit_code UNIX exit code (SSH only)</code>
</li>
- <li class="never" data-hits="" data-linenumber="715">
+ <li class="never" data-hits="" data-linenumber="723">
<code class="ruby"> # @attr [Integer] total Size of requested file (in bytes, SCP only)</code>
</li>
- <li class="never" data-hits="" data-linenumber="716">
+ <li class="never" data-hits="" data-linenumber="724">
<code class="ruby"> # @attr [Integer] sent Number of bytes transferred (SCP only)</code>
</li>
- <li class="never" data-hits="" data-linenumber="717">
+ <li class="never" data-hits="" data-linenumber="725">
<code class="ruby"> # @attr [Hash] opts The options that the operation was parametrized with</code>
</li>
- <li class="never" data-hits="" data-linenumber="718">
+ <li class="never" data-hits="" data-linenumber="726">
<code class="ruby"> # @attr [Exception] exception Exception that occurred during this operation (if any)</code>
</li>
- <li class="never" data-hits="" data-linenumber="719">
+ <li class="never" data-hits="" data-linenumber="727">
<code class="ruby"> # @attr [String] exit_signal</code>
</li>
- <li class="never" data-hits="" data-linenumber="720">
+ <li class="never" data-hits="" data-linenumber="728">
<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="721">
+ <li class="never" data-hits="" data-linenumber="729">
<code class="ruby"> #</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="722">
+ <li class="covered" data-hits="1" data-linenumber="730">
<span class="hits">1</span>
<code class="ruby"> class Result < Hashie::Dash</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="723">
+ <li class="covered" data-hits="1" data-linenumber="731">
<span class="hits">1</span>
<code class="ruby"> property :host</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="724">
+ <li class="covered" data-hits="1" data-linenumber="732">
<span class="hits">1</span>
<code class="ruby"> property :op</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="725">
+ <li class="covered" data-hits="1" data-linenumber="733">
<span class="hits">1</span>
<code class="ruby"> property :cmd</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="726">
+ <li class="covered" data-hits="1" data-linenumber="734">
<span class="hits">1</span>
<code class="ruby"> property :start_at</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="727">
+ <li class="covered" data-hits="1" data-linenumber="735">
<span class="hits">1</span>
<code class="ruby"> property :finish_at</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="728">
+ <li class="covered" data-hits="1" data-linenumber="736">
<span class="hits">1</span>
<code class="ruby"> property :last_keepalive_at</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="729">
+ <li class="covered" data-hits="1" data-linenumber="737">
<span class="hits">1</span>
<code class="ruby"> property :last_event_at</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="730">
+ <li class="covered" data-hits="1" data-linenumber="738">
<span class="hits">1</span>
<code class="ruby"> property :timed_out</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="731">
+ <li class="covered" data-hits="1" data-linenumber="739">
<span class="hits">1</span>
<code class="ruby"> property :stdout, :default => ''</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="732">
+ <li class="covered" data-hits="1" data-linenumber="740">
<span class="hits">1</span>
<code class="ruby"> property :stderr, :default => ''</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="733">
+ <li class="covered" data-hits="1" data-linenumber="741">
<span class="hits">1</span>
<code class="ruby"> property :success, :default => false</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="734">
+ <li class="covered" data-hits="1" data-linenumber="742">
<span class="hits">1</span>
<code class="ruby"> property :exit_code</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="735">
+ <li class="covered" data-hits="1" data-linenumber="743">
<span class="hits">1</span>
<code class="ruby"> property :total</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="736">
+ <li class="covered" data-hits="1" data-linenumber="744">
<span class="hits">1</span>
<code class="ruby"> property :sent</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="737">
+ <li class="covered" data-hits="1" data-linenumber="745">
<span class="hits">1</span>
<code class="ruby"> property :opts</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="738">
+ <li class="covered" data-hits="1" data-linenumber="746">
<span class="hits">1</span>
<code class="ruby"> property :exception</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="739">
+ <li class="covered" data-hits="1" data-linenumber="747">
<span class="hits">1</span>
<code class="ruby"> property :exit_signal</code>
</li>
- <li class="never" data-hits="" data-linenumber="740">
+ <li class="never" data-hits="" data-linenumber="748">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="741">
+ <li class="never" data-hits="" data-linenumber="749">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="742">
+ <li class="never" data-hits="" data-linenumber="750">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="743">
+ <li class="never" data-hits="" data-linenumber="751">
<code class="ruby">end</code>
</li>
- <li class="never" data-hits="" data-linenumber="744">
+ <li class="never" data-hits="" data-linenumber="752">
<code class="ruby"></code>
</li>