coverage/index.html in ruby-link-checker-0.1.0 vs coverage/index.html in ruby-link-checker-0.2.0
- old
+ new
@@ -12,27 +12,27 @@
<body>
<div id="loading">
<img src="./assets/0.12.3/loading.gif" alt="loading"/>
</div>
<div id="wrapper" class="hide">
- <div class="timestamp">Generated <abbr class="timeago" title="2023-04-02T15:48:28-04:00">2023-04-02T15:48:28-04:00</abbr></div>
+ <div class="timestamp">Generated <abbr class="timeago" title="2023-04-02T21:03:25-04:00">2023-04-02T21:03:25-04: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">
- 97.64%
+ 97.84%
</span>
</span>
covered at
<span class="covered_strength">
<span class="green">
- 22.02
+ 25.66
</span>
</span> hits/line
)
</h2>
@@ -41,15 +41,15 @@
<div>
<b>29</b> files in total.
</div>
<div class="t-line-summary">
- <b>677</b> relevant lines,
- <span class="green"><b>661</b> lines covered</span> and
- <span class="red"><b>16</b> lines missed. </span>
+ <b>693</b> relevant lines,
+ <span class="green"><b>678</b> lines covered</span> and
+ <span class="red"><b>15</b> lines missed. </span>
(<span class="green">
- 97.64%
+ 97.84%
</span>
)
</div>
@@ -86,33 +86,33 @@
<td class="yellow strong cell--number t-file__coverage">88.46 %</td>
<td class="cell--number">50</td>
<td class="cell--number">26</td>
<td class="cell--number">23</td>
<td class="cell--number">3</td>
- <td class="cell--number">197.54</td>
+ <td class="cell--number">232.15</td>
</tr>
<tr class="t-file">
<td class="strong t-file__name"><a href="#ea68a7dc1a50abd67c2b12e9391489dc4d83f524" class="src_link" title="lib/ruby-link-checker/checker.rb">lib/ruby-link-checker/checker.rb</a></td>
<td class="green strong cell--number t-file__coverage">100.00 %</td>
<td class="cell--number">42</td>
<td class="cell--number">22</td>
<td class="cell--number">22</td>
<td class="cell--number">0</td>
- <td class="cell--number">49.77</td>
+ <td class="cell--number">55.23</td>
</tr>
<tr class="t-file">
<td class="strong t-file__name"><a href="#8f9f4671c9d1604e67e4a502a95739c9e1e437b6" class="src_link" title="lib/ruby-link-checker/config.rb">lib/ruby-link-checker/config.rb</a></td>
<td class="green strong cell--number t-file__coverage">100.00 %</td>
<td class="cell--number">41</td>
<td class="cell--number">19</td>
<td class="cell--number">19</td>
<td class="cell--number">0</td>
- <td class="cell--number">29.68</td>
+ <td class="cell--number">31.47</td>
</tr>
<tr class="t-file">
<td class="strong t-file__name"><a href="#b71c966a277f6becbf8ef6d9ab529ada752d5b8b" class="src_link" title="lib/ruby-link-checker/errors.rb">lib/ruby-link-checker/errors.rb</a></td>
@@ -152,11 +152,11 @@
<td class="green strong cell--number t-file__coverage">100.00 %</td>
<td class="cell--number">14</td>
<td class="cell--number">8</td>
<td class="cell--number">8</td>
<td class="cell--number">0</td>
- <td class="cell--number">15.63</td>
+ <td class="cell--number">16.63</td>
</tr>
<tr class="t-file">
<td class="strong t-file__name"><a href="#524fc71ea305cec82ae2e0794e12c73135034c24" class="src_link" title="lib/ruby-link-checker/net/http.rb">lib/ruby-link-checker/net/http.rb</a></td>
@@ -170,70 +170,70 @@
</tr>
<tr class="t-file">
<td class="strong t-file__name"><a href="#49813dd7a1ac04fd4ae7137277e3e634fd15dd21" class="src_link" title="lib/ruby-link-checker/net/http/checker.rb">lib/ruby-link-checker/net/http/checker.rb</a></td>
<td class="green strong cell--number t-file__coverage">100.00 %</td>
- <td class="cell--number">31</td>
- <td class="cell--number">20</td>
- <td class="cell--number">20</td>
+ <td class="cell--number">30</td>
+ <td class="cell--number">19</td>
+ <td class="cell--number">19</td>
<td class="cell--number">0</td>
- <td class="cell--number">21.65</td>
+ <td class="cell--number">24.16</td>
</tr>
<tr class="t-file">
<td class="strong t-file__name"><a href="#9ff16d270bb8f07afaaa0725cdef1da69ea018ff" class="src_link" title="lib/ruby-link-checker/net/http/config.rb">lib/ruby-link-checker/net/http/config.rb</a></td>
<td class="green strong cell--number t-file__coverage">93.75 %</td>
<td class="cell--number">35</td>
<td class="cell--number">16</td>
<td class="cell--number">15</td>
<td class="cell--number">1</td>
- <td class="cell--number">4.31</td>
+ <td class="cell--number">4.56</td>
</tr>
<tr class="t-file">
<td class="strong t-file__name"><a href="#1a502777c9394c85510bd53d5b3ae9161c8a0f24" class="src_link" title="lib/ruby-link-checker/net/http/result.rb">lib/ruby-link-checker/net/http/result.rb</a></td>
<td class="green strong cell--number t-file__coverage">96.43 %</td>
<td class="cell--number">53</td>
<td class="cell--number">28</td>
<td class="cell--number">27</td>
<td class="cell--number">1</td>
- <td class="cell--number">35.29</td>
+ <td class="cell--number">45.54</td>
</tr>
<tr class="t-file">
<td class="strong t-file__name"><a href="#27cead58d5301f0ac1dc83c33d070f828b1abec1" class="src_link" title="lib/ruby-link-checker/result.rb">lib/ruby-link-checker/result.rb</a></td>
<td class="green strong cell--number t-file__coverage">94.87 %</td>
<td class="cell--number">74</td>
<td class="cell--number">39</td>
<td class="cell--number">37</td>
<td class="cell--number">2</td>
- <td class="cell--number">22.41</td>
+ <td class="cell--number">25.85</td>
</tr>
<tr class="t-file">
<td class="strong t-file__name"><a href="#9aab8a09c8e31c800cc66b8928518ea63938effb" class="src_link" title="lib/ruby-link-checker/task.rb">lib/ruby-link-checker/task.rb</a></td>
<td class="green strong cell--number t-file__coverage">92.31 %</td>
<td class="cell--number">20</td>
<td class="cell--number">13</td>
<td class="cell--number">12</td>
<td class="cell--number">1</td>
- <td class="cell--number">37.38</td>
+ <td class="cell--number">44.77</td>
</tr>
<tr class="t-file">
<td class="strong t-file__name"><a href="#fc4085f4953cdfcc8b5c75334f6bd877da492565" class="src_link" title="lib/ruby-link-checker/tasks.rb">lib/ruby-link-checker/tasks.rb</a></td>
- <td class="green strong cell--number t-file__coverage">98.46 %</td>
- <td class="cell--number">99</td>
- <td class="cell--number">65</td>
- <td class="cell--number">64</td>
+ <td class="green strong cell--number t-file__coverage">98.59 %</td>
+ <td class="cell--number">110</td>
+ <td class="cell--number">71</td>
+ <td class="cell--number">70</td>
<td class="cell--number">1</td>
- <td class="cell--number">35.25</td>
+ <td class="cell--number">44.03</td>
</tr>
<tr class="t-file">
<td class="strong t-file__name"><a href="#3e363e6420a21b7d36b407e640531089e6fa0e1f" class="src_link" title="lib/ruby-link-checker/typhoeus/hydra.rb">lib/ruby-link-checker/typhoeus/hydra.rb</a></td>
@@ -246,16 +246,16 @@
</tr>
<tr class="t-file">
<td class="strong t-file__name"><a href="#8d163249e55ef6ba47d16da70e1d0dc67dbe54e6" class="src_link" title="lib/ruby-link-checker/typhoeus/hydra/checker.rb">lib/ruby-link-checker/typhoeus/hydra/checker.rb</a></td>
- <td class="green strong cell--number t-file__coverage">96.00 %</td>
- <td class="cell--number">52</td>
- <td class="cell--number">25</td>
- <td class="cell--number">24</td>
+ <td class="green strong cell--number t-file__coverage">95.65 %</td>
+ <td class="cell--number">50</td>
+ <td class="cell--number">23</td>
+ <td class="cell--number">22</td>
<td class="cell--number">1</td>
- <td class="cell--number">17.04</td>
+ <td class="cell--number">19.30</td>
</tr>
<tr class="t-file">
<td class="strong t-file__name"><a href="#6d7aca89ce0a6647ef3446f4b307cfbf3ae59bbc" class="src_link" title="lib/ruby-link-checker/typhoeus/hydra/config.rb">lib/ruby-link-checker/typhoeus/hydra/config.rb</a></td>
@@ -273,11 +273,11 @@
<td class="green strong cell--number t-file__coverage">96.43 %</td>
<td class="cell--number">53</td>
<td class="cell--number">28</td>
<td class="cell--number">27</td>
<td class="cell--number">1</td>
- <td class="cell--number">36.11</td>
+ <td class="cell--number">46.75</td>
</tr>
<tr class="t-file">
<td class="strong t-file__name"><a href="#64d274d8624515ce28ba8ecc0050bec9efa77528" class="src_link" title="spec/ruby-link-checker/checker_spec.rb">spec/ruby-link-checker/checker_spec.rb</a></td>
@@ -306,22 +306,22 @@
<td class="green strong cell--number t-file__coverage">100.00 %</td>
<td class="cell--number">61</td>
<td class="cell--number">33</td>
<td class="cell--number">33</td>
<td class="cell--number">0</td>
- <td class="cell--number">1.94</td>
+ <td class="cell--number">2.00</td>
</tr>
<tr class="t-file">
<td class="strong t-file__name"><a href="#f461c9d0278d19573c5409460091e448ee91f64e" class="src_link" title="spec/ruby-link-checker/typhoeus/hydra/checker_spec.rb">spec/ruby-link-checker/typhoeus/hydra/checker_spec.rb</a></td>
<td class="green strong cell--number t-file__coverage">100.00 %</td>
<td class="cell--number">67</td>
<td class="cell--number">35</td>
<td class="cell--number">35</td>
<td class="cell--number">0</td>
- <td class="cell--number">2.49</td>
+ <td class="cell--number">2.60</td>
</tr>
<tr class="t-file">
<td class="strong t-file__name"><a href="#55ad4d0c3645ff4a11af2a8380580ebfca12eded" class="src_link" title="spec/ruby-link-checker/version_spec.rb">spec/ruby-link-checker/version_spec.rb</a></td>
@@ -339,44 +339,44 @@
<td class="green strong cell--number t-file__coverage">100.00 %</td>
<td class="cell--number">8</td>
<td class="cell--number">5</td>
<td class="cell--number">5</td>
<td class="cell--number">0</td>
- <td class="cell--number">26.20</td>
+ <td class="cell--number">27.80</td>
</tr>
<tr class="t-file">
<td class="strong t-file__name"><a href="#14f6854041b193c79b7f1303483e86078b6c1fa2" class="src_link" title="spec/support/link_checker.rb">spec/support/link_checker.rb</a></td>
- <td class="green strong cell--number t-file__coverage">98.97 %</td>
- <td class="cell--number">322</td>
- <td class="cell--number">194</td>
- <td class="cell--number">192</td>
+ <td class="green strong cell--number t-file__coverage">99.03 %</td>
+ <td class="cell--number">343</td>
+ <td class="cell--number">206</td>
+ <td class="cell--number">204</td>
<td class="cell--number">2</td>
<td class="cell--number">2.69</td>
</tr>
<tr class="t-file">
<td class="strong t-file__name"><a href="#8afbf65f225448f2566a3328833594ecb9496b47" class="src_link" title="spec/support/vcr.rb">spec/support/vcr.rb</a></td>
- <td class="yellow strong cell--number t-file__coverage">85.71 %</td>
+ <td class="green strong cell--number t-file__coverage">100.00 %</td>
<td class="cell--number">13</td>
- <td class="cell--number">7</td>
- <td class="cell--number">6</td>
- <td class="cell--number">1</td>
- <td class="cell--number">0.86</td>
+ <td class="cell--number">8</td>
+ <td class="cell--number">8</td>
+ <td class="cell--number">0</td>
+ <td class="cell--number">1.38</td>
</tr>
<tr class="t-file">
<td class="strong t-file__name"><a href="#d6b5ed7318274e80931692d08013ffbb0d52c17a" class="src_link" title="spec/support/with_result.rb">spec/support/with_result.rb</a></td>
<td class="green strong cell--number t-file__coverage">100.00 %</td>
<td class="cell--number">15</td>
<td class="cell--number">9</td>
<td class="cell--number">9</td>
<td class="cell--number">0</td>
- <td class="cell--number">52.78</td>
+ <td class="cell--number">59.89</td>
</tr>
<tr class="t-file">
<td class="strong t-file__name"><a href="#ce97fe9f3ce67fe5a26f438bb46d34273564acf0" class="src_link" title="spec/support/with_url.rb">spec/support/with_url.rb</a></td>
@@ -660,12 +660,12 @@
<code class="ruby"> def callbacks</code>
</li>
</div>
<div>
- <li class="covered" data-hits="888" data-linenumber="6">
- <span class="hits">888</span>
+ <li class="covered" data-hits="1032" data-linenumber="6">
+ <span class="hits">1032</span>
<code class="ruby"> @callbacks ||= Hash.new { |h, k| h[k] = [] }</code>
@@ -704,12 +704,12 @@
<code class="ruby"> def delegates</code>
</li>
</div>
<div>
- <li class="covered" data-hits="525" data-linenumber="10">
- <span class="hits">525</span>
+ <li class="covered" data-hits="613" data-linenumber="10">
+ <span class="hits">613</span>
<code class="ruby"> @delegates ||= []</code>
@@ -748,34 +748,34 @@
<code class="ruby"> def on(*events, &block)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="238" data-linenumber="14">
- <span class="hits">238</span>
+ <li class="covered" data-hits="266" data-linenumber="14">
+ <span class="hits">266</span>
<code class="ruby"> if events && Array(events).any?</code>
</li>
</div>
<div>
- <li class="covered" data-hits="134" data-linenumber="15">
- <span class="hits">134</span>
+ <li class="covered" data-hits="154" data-linenumber="15">
+ <span class="hits">154</span>
<code class="ruby"> Array(events).each do |event|</code>
</li>
</div>
<div>
- <li class="covered" data-hits="135" data-linenumber="16">
- <span class="hits">135</span>
+ <li class="covered" data-hits="155" data-linenumber="16">
+ <span class="hits">155</span>
<code class="ruby"> callbacks[event.to_s] << block</code>
@@ -803,12 +803,12 @@
<code class="ruby"> else</code>
</li>
</div>
<div>
- <li class="covered" data-hits="104" data-linenumber="19">
- <span class="hits">104</span>
+ <li class="covered" data-hits="112" data-linenumber="19">
+ <span class="hits">112</span>
<code class="ruby"> delegates << block</code>
@@ -858,23 +858,23 @@
<code class="ruby"> def method_missing(m, *args, &block)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="246" data-linenumber="24">
- <span class="hits">246</span>
+ <li class="covered" data-hits="294" data-linenumber="24">
+ <span class="hits">294</span>
<code class="ruby"> if m.to_s[-1] == '!'</code>
</li>
</div>
<div>
- <li class="covered" data-hits="246" data-linenumber="25">
- <span class="hits">246</span>
+ <li class="covered" data-hits="294" data-linenumber="25">
+ <span class="hits">294</span>
<code class="ruby"> callback(m.to_s[...-1].to_sym, *args)</code>
@@ -968,23 +968,23 @@
<code class="ruby"> def callback(event, *data)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="421" data-linenumber="34">
- <span class="hits">421</span>
+ <li class="covered" data-hits="501" data-linenumber="34">
+ <span class="hits">501</span>
<code class="ruby"> delegates.each do |c|</code>
</li>
</div>
<div>
- <li class="covered" data-hits="336" data-linenumber="35">
- <span class="hits">336</span>
+ <li class="covered" data-hits="400" data-linenumber="35">
+ <span class="hits">400</span>
<code class="ruby"> c.call(event, *data)</code>
@@ -1012,23 +1012,23 @@
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="421" data-linenumber="38">
- <span class="hits">421</span>
+ <li class="covered" data-hits="501" data-linenumber="38">
+ <span class="hits">501</span>
<code class="ruby"> callbacks = self.callbacks[event.to_s]</code>
</li>
</div>
<div>
- <li class="covered" data-hits="421" data-linenumber="39">
- <span class="hits">421</span>
+ <li class="covered" data-hits="501" data-linenumber="39">
+ <span class="hits">501</span>
<code class="ruby"> return false unless callbacks</code>
@@ -1045,23 +1045,23 @@
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="421" data-linenumber="41">
- <span class="hits">421</span>
+ <li class="covered" data-hits="501" data-linenumber="41">
+ <span class="hits">501</span>
<code class="ruby"> callbacks.each do |c|</code>
</li>
</div>
<div>
- <li class="covered" data-hits="171" data-linenumber="42">
- <span class="hits">171</span>
+ <li class="covered" data-hits="203" data-linenumber="42">
+ <span class="hits">203</span>
<code class="ruby"> c.call(*data)</code>
@@ -1078,12 +1078,12 @@
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="covered" data-hits="421" data-linenumber="44">
- <span class="hits">421</span>
+ <li class="covered" data-hits="501" data-linenumber="44">
+ <span class="hits">501</span>
<code class="ruby"> true</code>
@@ -1307,23 +1307,23 @@
<code class="ruby"> def initialize(options = {})</code>
</li>
</div>
<div>
- <li class="covered" data-hits="55" data-linenumber="12">
- <span class="hits">55</span>
+ <li class="covered" data-hits="59" data-linenumber="12">
+ <span class="hits">59</span>
<code class="ruby"> LinkChecker::Config::ATTRIBUTES.each do |key|</code>
</li>
</div>
<div>
- <li class="covered" data-hits="220" data-linenumber="13">
- <span class="hits">220</span>
+ <li class="covered" data-hits="236" data-linenumber="13">
+ <span class="hits">236</span>
<code class="ruby"> send("#{key}=", options[key] || LinkChecker.config.send(key))</code>
@@ -1340,34 +1340,34 @@
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="covered" data-hits="55" data-linenumber="15">
- <span class="hits">55</span>
+ <li class="covered" data-hits="59" data-linenumber="15">
+ <span class="hits">59</span>
<code class="ruby"> raise ArgumentError, "Missing methods." if methods&.none?</code>
</li>
</div>
<div>
- <li class="covered" data-hits="54" data-linenumber="16">
- <span class="hits">54</span>
+ <li class="covered" data-hits="58" data-linenumber="16">
+ <span class="hits">58</span>
<code class="ruby"> @logger ||= options[:logger] || LinkChecker::Config.logger || LinkChecker::Logger.default</code>
</li>
</div>
<div>
- <li class="covered" data-hits="54" data-linenumber="17">
- <span class="hits">54</span>
+ <li class="covered" data-hits="58" data-linenumber="17">
+ <span class="hits">58</span>
<code class="ruby"> @results = { error: [], failure: [], success: [] } unless options.key?(:results) && !options[:results]</code>
@@ -1406,34 +1406,34 @@
<code class="ruby"> def task_klass</code>
</li>
</div>
<div>
- <li class="covered" data-hits="52" data-linenumber="21">
- <span class="hits">52</span>
+ <li class="covered" data-hits="56" data-linenumber="21">
+ <span class="hits">56</span>
<code class="ruby"> @task_klass ||= begin</code>
</li>
</div>
<div>
- <li class="covered" data-hits="52" data-linenumber="22">
- <span class="hits">52</span>
+ <li class="covered" data-hits="56" data-linenumber="22">
+ <span class="hits">56</span>
<code class="ruby"> module_name = self.class.name.split("::")[...-1].join('::')</code>
</li>
</div>
<div>
- <li class="covered" data-hits="52" data-linenumber="23">
- <span class="hits">52</span>
+ <li class="covered" data-hits="56" data-linenumber="23">
+ <span class="hits">56</span>
<code class="ruby"> Object.const_get("#{module_name}::Task")</code>
@@ -1483,12 +1483,12 @@
<code class="ruby"> def check(uri, options = {})</code>
</li>
</div>
<div>
- <li class="covered" data-hits="52" data-linenumber="28">
- <span class="hits">52</span>
+ <li class="covered" data-hits="56" data-linenumber="28">
+ <span class="hits">56</span>
<code class="ruby"> tasks = Tasks.new(</code>
@@ -1560,34 +1560,34 @@
<code class="ruby"> )</code>
</li>
</div>
<div>
- <li class="covered" data-hits="52" data-linenumber="35">
- <span class="hits">52</span>
+ <li class="covered" data-hits="56" data-linenumber="35">
+ <span class="hits">56</span>
<code class="ruby"> tasks.on do |event, *args|</code>
</li>
</div>
<div>
- <li class="covered" data-hits="168" data-linenumber="36">
- <span class="hits">168</span>
+ <li class="covered" data-hits="200" data-linenumber="36">
+ <span class="hits">200</span>
<code class="ruby"> results[event] << args.first if @results && %i[error failure success].include?(event)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="168" data-linenumber="37">
- <span class="hits">168</span>
+ <li class="covered" data-hits="200" data-linenumber="37">
+ <span class="hits">200</span>
<code class="ruby"> callback event, *args</code>
@@ -1604,12 +1604,12 @@
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="covered" data-hits="52" data-linenumber="39">
- <span class="hits">52</span>
+ <li class="covered" data-hits="56" data-linenumber="39">
+ <span class="hits">56</span>
<code class="ruby"> tasks.execute!</code>
@@ -1855,45 +1855,45 @@
<code class="ruby"> def reset</code>
</li>
</div>
<div>
- <li class="covered" data-hits="65" data-linenumber="17">
- <span class="hits">65</span>
+ <li class="covered" data-hits="69" data-linenumber="17">
+ <span class="hits">69</span>
<code class="ruby"> self.methods = %w[HEAD GET]</code>
</li>
</div>
<div>
- <li class="covered" data-hits="65" data-linenumber="18">
- <span class="hits">65</span>
+ <li class="covered" data-hits="69" data-linenumber="18">
+ <span class="hits">69</span>
<code class="ruby"> self.user_agent = "Ruby Link Checker/#{LinkChecker::VERSION}"</code>
</li>
</div>
<div>
- <li class="covered" data-hits="65" data-linenumber="19">
- <span class="hits">65</span>
+ <li class="covered" data-hits="69" data-linenumber="19">
+ <span class="hits">69</span>
<code class="ruby"> self.logger = nil</code>
</li>
</div>
<div>
- <li class="covered" data-hits="65" data-linenumber="20">
- <span class="hits">65</span>
+ <li class="covered" data-hits="69" data-linenumber="20">
+ <span class="hits">69</span>
<code class="ruby"> self.retries = 0</code>
@@ -1932,12 +1932,12 @@
<code class="ruby"> def retries=(value)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="66" data-linenumber="24">
- <span class="hits">66</span>
+ <li class="covered" data-hits="70" data-linenumber="24">
+ <span class="hits">70</span>
<code class="ruby"> raise ArgumentError, "Invalid number of retries: #{value}" unless value.is_a?(Integer) && value >= 0</code>
@@ -1954,12 +1954,12 @@
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="65" data-linenumber="26">
- <span class="hits">65</span>
+ <li class="covered" data-hits="69" data-linenumber="26">
+ <span class="hits">69</span>
<code class="ruby"> @retries = value</code>
@@ -2064,12 +2064,12 @@
<code class="ruby"> def config</code>
</li>
</div>
<div>
- <li class="covered" data-hits="161" data-linenumber="36">
- <span class="hits">161</span>
+ <li class="covered" data-hits="171" data-linenumber="36">
+ <span class="hits">171</span>
<code class="ruby"> Config</code>
@@ -2628,12 +2628,12 @@
<code class="ruby"> def self.default</code>
</li>
</div>
<div>
- <li class="covered" data-hits="118" data-linenumber="7">
- <span class="hits">118</span>
+ <li class="covered" data-hits="126" data-linenumber="7">
+ <span class="hits">126</span>
<code class="ruby"> return @default if @default</code>
@@ -2798,12 +2798,12 @@
</h4>
<div class="t-line-summary">
- <b>20</b> relevant lines.
- <span class="green"><b>20</b> lines covered</span> and
+ <b>19</b> relevant lines.
+ <span class="green"><b>19</b> lines covered</span> and
<span class="red"><b>0</b> lines missed.</span>
</div>
@@ -2866,286 +2866,275 @@
<code class="ruby"> def run!</code>
</li>
</div>
<div>
- <li class="covered" data-hits="40" data-linenumber="6">
- <span class="hits">40</span>
+ <li class="covered" data-hits="48" data-linenumber="6">
+ <span class="hits">48</span>
<code class="ruby"> ::Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|</code>
</li>
</div>
<div>
- <li class="covered" data-hits="40" data-linenumber="7">
- <span class="hits">40</span>
+ <li class="covered" data-hits="48" data-linenumber="7">
+ <span class="hits">48</span>
<code class="ruby"> http.read_timeout = checker.read_timeout if checker.read_timeout</code>
</li>
</div>
<div>
- <li class="covered" data-hits="40" data-linenumber="8">
- <span class="hits">40</span>
+ <li class="covered" data-hits="48" data-linenumber="8">
+ <span class="hits">48</span>
<code class="ruby"> http.open_timeout = checker.open_timeout if checker.open_timeout</code>
</li>
</div>
<div>
- <li class="covered" data-hits="40" data-linenumber="9">
- <span class="hits">40</span>
+ <li class="covered" data-hits="48" data-linenumber="9">
+ <span class="hits">48</span>
<code class="ruby"> request = ::Net::HTTPGenericRequest.new(method, false, true, uri)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="40" data-linenumber="10">
- <span class="hits">40</span>
+ <li class="covered" data-hits="48" data-linenumber="10">
+ <span class="hits">48</span>
<code class="ruby"> request['User-Agent'] = checker.user_agent</code>
</li>
</div>
<div>
- <li class="covered" data-hits="40" data-linenumber="11">
- <span class="hits">40</span>
+ <li class="covered" data-hits="48" data-linenumber="11">
+ <span class="hits">48</span>
<code class="ruby"> response = http.request(request)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="38" data-linenumber="12">
- <span class="hits">38</span>
+ <li class="covered" data-hits="46" data-linenumber="12">
+ <span class="hits">46</span>
- <code class="ruby"> logger.debug "#{method} #{uri}: #{response.code}"</code>
- </li>
- </div>
-
- <div>
- <li class="covered" data-hits="38" data-linenumber="13">
- <span class="hits">38</span>
-
-
-
-
<code class="ruby"> result! Result.new(uri, method, original_uri, request, response, options)</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="14">
+ <li class="never" data-hits="" data-linenumber="13">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="15">
+ <li class="never" data-hits="" data-linenumber="14">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="16">
+ <li class="never" data-hits="" data-linenumber="15">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="17">
+ <li class="never" data-hits="" data-linenumber="16">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="1" data-linenumber="18">
+ <li class="covered" data-hits="1" data-linenumber="17">
<span class="hits">1</span>
<code class="ruby"> class Checker < LinkChecker::Checker</code>
</li>
</div>
<div>
- <li class="covered" data-hits="1" data-linenumber="19">
+ <li class="covered" data-hits="1" data-linenumber="18">
<span class="hits">1</span>
<code class="ruby"> extend ::LinkChecker::Net::HTTP::Config</code>
</li>
</div>
<div>
- <li class="covered" data-hits="1" data-linenumber="20">
+ <li class="covered" data-hits="1" data-linenumber="19">
<span class="hits">1</span>
<code class="ruby"> attr_accessor(*LinkChecker::Net::HTTP::Config::ATTRIBUTES)</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="21">
+ <li class="never" data-hits="" data-linenumber="20">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="1" data-linenumber="22">
+ <li class="covered" data-hits="1" data-linenumber="21">
<span class="hits">1</span>
<code class="ruby"> def initialize(options = {})</code>
</li>
</div>
<div>
- <li class="covered" data-hits="27" data-linenumber="23">
- <span class="hits">27</span>
+ <li class="covered" data-hits="29" data-linenumber="22">
+ <span class="hits">29</span>
<code class="ruby"> LinkChecker::Net::HTTP::Config::ATTRIBUTES.each do |key|</code>
</li>
</div>
<div>
- <li class="covered" data-hits="54" data-linenumber="24">
- <span class="hits">54</span>
+ <li class="covered" data-hits="58" data-linenumber="23">
+ <span class="hits">58</span>
<code class="ruby"> send("#{key}=", options[key] || LinkChecker::Net::HTTP::Config.send(key))</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="25">
+ <li class="never" data-hits="" data-linenumber="24">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="covered" data-hits="27" data-linenumber="26">
- <span class="hits">27</span>
+ <li class="covered" data-hits="29" data-linenumber="25">
+ <span class="hits">29</span>
<code class="ruby"> super options</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="27">
+ <li class="never" data-hits="" data-linenumber="26">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="28">
+ <li class="never" data-hits="" data-linenumber="27">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="29">
+ <li class="never" data-hits="" data-linenumber="28">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="30">
+ <li class="never" data-hits="" data-linenumber="29">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="31">
+ <li class="never" data-hits="" data-linenumber="30">
@@ -3359,23 +3348,23 @@
<code class="ruby"> def reset</code>
</li>
</div>
<div>
- <li class="covered" data-hits="28" data-linenumber="17">
- <span class="hits">28</span>
+ <li class="covered" data-hits="30" data-linenumber="17">
+ <span class="hits">30</span>
<code class="ruby"> self.read_timeout = nil</code>
</li>
</div>
<div>
- <li class="covered" data-hits="28" data-linenumber="18">
- <span class="hits">28</span>
+ <li class="covered" data-hits="30" data-linenumber="18">
+ <span class="hits">30</span>
<code class="ruby"> self.open_timeout = nil</code>
@@ -3676,34 +3665,34 @@
<code class="ruby"> def initialize(uri, method, original_uri, request, response, options)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="38" data-linenumber="8">
- <span class="hits">38</span>
+ <li class="covered" data-hits="46" data-linenumber="8">
+ <span class="hits">46</span>
<code class="ruby"> @request = request</code>
</li>
</div>
<div>
- <li class="covered" data-hits="38" data-linenumber="9">
- <span class="hits">38</span>
+ <li class="covered" data-hits="46" data-linenumber="9">
+ <span class="hits">46</span>
<code class="ruby"> @response = response</code>
</li>
</div>
<div>
- <li class="covered" data-hits="38" data-linenumber="10">
- <span class="hits">38</span>
+ <li class="covered" data-hits="46" data-linenumber="10">
+ <span class="hits">46</span>
<code class="ruby"> super uri, method, original_uri, options</code>
@@ -3742,12 +3731,12 @@
<code class="ruby"> def error?</code>
</li>
</div>
<div>
- <li class="covered" data-hits="15" data-linenumber="14">
- <span class="hits">15</span>
+ <li class="covered" data-hits="26" data-linenumber="14">
+ <span class="hits">26</span>
<code class="ruby"> false</code>
@@ -3786,12 +3775,12 @@
<code class="ruby"> def failure?</code>
</li>
</div>
<div>
- <li class="covered" data-hits="37" data-linenumber="18">
- <span class="hits">37</span>
+ <li class="covered" data-hits="54" data-linenumber="18">
+ <span class="hits">54</span>
<code class="ruby"> !success? && !redirect?</code>
@@ -3830,23 +3819,23 @@
<code class="ruby"> def code</code>
</li>
</div>
<div>
- <li class="covered" data-hits="354" data-linenumber="22">
- <span class="hits">354</span>
+ <li class="covered" data-hits="453" data-linenumber="22">
+ <span class="hits">453</span>
<code class="ruby"> @code ||= begin</code>
</li>
</div>
<div>
- <li class="covered" data-hits="38" data-linenumber="23">
- <span class="hits">38</span>
+ <li class="covered" data-hits="46" data-linenumber="23">
+ <span class="hits">46</span>
<code class="ruby"> response.code.to_i</code>
@@ -3962,12 +3951,12 @@
<code class="ruby"> def redirect_to</code>
</li>
</div>
<div>
- <li class="covered" data-hits="9" data-linenumber="34">
- <span class="hits">9</span>
+ <li class="covered" data-hits="13" data-linenumber="34">
+ <span class="hits">13</span>
<code class="ruby"> return nil unless response</code>
@@ -3984,12 +3973,12 @@
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="9" data-linenumber="36">
- <span class="hits">9</span>
+ <li class="covered" data-hits="13" data-linenumber="36">
+ <span class="hits">13</span>
<code class="ruby"> response['Location']</code>
@@ -4028,12 +4017,12 @@
<code class="ruby"> def redirect?</code>
</li>
</div>
<div>
- <li class="covered" data-hits="82" data-linenumber="40">
- <span class="hits">82</span>
+ <li class="covered" data-hits="111" data-linenumber="40">
+ <span class="hits">111</span>
<code class="ruby"> return false unless response</code>
@@ -4050,12 +4039,12 @@
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="82" data-linenumber="42">
- <span class="hits">82</span>
+ <li class="covered" data-hits="111" data-linenumber="42">
+ <span class="hits">111</span>
<code class="ruby"> [301, 302, 303, 307, 308].include?(code)</code>
@@ -4094,12 +4083,12 @@
<code class="ruby"> def success?</code>
</li>
</div>
<div>
- <li class="covered" data-hits="117" data-linenumber="46">
- <span class="hits">117</span>
+ <li class="covered" data-hits="148" data-linenumber="46">
+ <span class="hits">148</span>
<code class="ruby"> return false unless response</code>
@@ -4116,12 +4105,12 @@
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="117" data-linenumber="48">
- <span class="hits">117</span>
+ <li class="covered" data-hits="148" data-linenumber="48">
+ <span class="hits">148</span>
<code class="ruby"> code >= 200 && code <= 299</code>
@@ -4268,45 +4257,45 @@
<code class="ruby"> def initialize(current_uri, method, original_uri, options = {})</code>
</li>
</div>
<div>
- <li class="covered" data-hits="88" data-linenumber="6">
- <span class="hits">88</span>
+ <li class="covered" data-hits="104" data-linenumber="6">
+ <span class="hits">104</span>
<code class="ruby"> @uri = original_uri</code>
</li>
</div>
<div>
- <li class="covered" data-hits="88" data-linenumber="7">
- <span class="hits">88</span>
+ <li class="covered" data-hits="104" data-linenumber="7">
+ <span class="hits">104</span>
<code class="ruby"> @result_uri = current_uri</code>
</li>
</div>
<div>
- <li class="covered" data-hits="88" data-linenumber="8">
- <span class="hits">88</span>
+ <li class="covered" data-hits="104" data-linenumber="8">
+ <span class="hits">104</span>
<code class="ruby"> @method = method</code>
</li>
</div>
<div>
- <li class="covered" data-hits="88" data-linenumber="9">
- <span class="hits">88</span>
+ <li class="covered" data-hits="104" data-linenumber="9">
+ <span class="hits">104</span>
<code class="ruby"> @options = options</code>
@@ -4697,67 +4686,67 @@
<code class="ruby"> def to_s</code>
</li>
</div>
<div>
- <li class="covered" data-hits="90" data-linenumber="45">
- <span class="hits">90</span>
+ <li class="covered" data-hits="106" data-linenumber="45">
+ <span class="hits">106</span>
<code class="ruby"> status_s = if success?</code>
</li>
</div>
<div>
- <li class="covered" data-hits="24" data-linenumber="46">
- <span class="hits">24</span>
+ <li class="covered" data-hits="26" data-linenumber="46">
+ <span class="hits">26</span>
<code class="ruby"> 'OK'</code>
</li>
</div>
<div>
- <li class="covered" data-hits="66" data-linenumber="47">
- <span class="hits">66</span>
+ <li class="covered" data-hits="80" data-linenumber="47">
+ <span class="hits">80</span>
<code class="ruby"> elsif failure?</code>
</li>
</div>
<div>
- <li class="covered" data-hits="34" data-linenumber="48">
- <span class="hits">34</span>
+ <li class="covered" data-hits="40" data-linenumber="48">
+ <span class="hits">40</span>
<code class="ruby"> 'FAIL'</code>
</li>
</div>
<div>
- <li class="covered" data-hits="32" data-linenumber="49">
- <span class="hits">32</span>
+ <li class="covered" data-hits="40" data-linenumber="49">
+ <span class="hits">40</span>
<code class="ruby"> elsif redirect?</code>
</li>
</div>
<div>
- <li class="covered" data-hits="18" data-linenumber="50">
- <span class="hits">18</span>
+ <li class="covered" data-hits="26" data-linenumber="50">
+ <span class="hits">26</span>
<code class="ruby"> 'REDIRECT'</code>
@@ -4796,12 +4785,12 @@
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="covered" data-hits="90" data-linenumber="54">
- <span class="hits">90</span>
+ <li class="covered" data-hits="106" data-linenumber="54">
+ <span class="hits">106</span>
<code class="ruby"> "#{method} #{uri}#{result_uri == uri ? nil : ' (' + result_uri.to_s + ')'}: #{status_s} (#{code})"</code>
@@ -5135,67 +5124,67 @@
<code class="ruby"> def initialize(checker, uri, method, original_uri, options = {})</code>
</li>
</div>
<div>
- <li class="covered" data-hits="80" data-linenumber="8">
- <span class="hits">80</span>
+ <li class="covered" data-hits="96" data-linenumber="8">
+ <span class="hits">96</span>
<code class="ruby"> @checker = checker</code>
</li>
</div>
<div>
- <li class="covered" data-hits="80" data-linenumber="9">
- <span class="hits">80</span>
+ <li class="covered" data-hits="96" data-linenumber="9">
+ <span class="hits">96</span>
<code class="ruby"> @logger = checker.logger</code>
</li>
</div>
<div>
- <li class="covered" data-hits="80" data-linenumber="10">
- <span class="hits">80</span>
+ <li class="covered" data-hits="96" data-linenumber="10">
+ <span class="hits">96</span>
<code class="ruby"> @uri = uri</code>
</li>
</div>
<div>
- <li class="covered" data-hits="80" data-linenumber="11">
- <span class="hits">80</span>
+ <li class="covered" data-hits="96" data-linenumber="11">
+ <span class="hits">96</span>
<code class="ruby"> @original_uri = original_uri || @uri</code>
</li>
</div>
<div>
- <li class="covered" data-hits="80" data-linenumber="12">
- <span class="hits">80</span>
+ <li class="covered" data-hits="96" data-linenumber="12">
+ <span class="hits">96</span>
<code class="ruby"> @method = method</code>
</li>
</div>
<div>
- <li class="covered" data-hits="80" data-linenumber="13">
- <span class="hits">80</span>
+ <li class="covered" data-hits="96" data-linenumber="13">
+ <span class="hits">96</span>
<code class="ruby"> @options = options</code>
@@ -5287,21 +5276,21 @@
<div class="source_table" id="fc4085f4953cdfcc8b5c75334f6bd877da492565">
<div class="header">
<h3>lib/ruby-link-checker/tasks.rb</h3>
<h4>
<span class="green">
- 98.46%
+ 98.59%
</span>
lines covered
</h4>
<div class="t-line-summary">
- <b>65</b> relevant lines.
- <span class="green"><b>64</b> lines covered</span> and
+ <b>71</b> relevant lines.
+ <span class="green"><b>70</b> lines covered</span> and
<span class="red"><b>1</b> lines missed.</span>
</div>
@@ -5386,111 +5375,111 @@
<code class="ruby"> def initialize(checker, task_klass, uri, methods, options = {})</code>
</li>
</div>
<div>
- <li class="covered" data-hits="52" data-linenumber="8">
- <span class="hits">52</span>
+ <li class="covered" data-hits="56" data-linenumber="8">
+ <span class="hits">56</span>
<code class="ruby"> @uri = uri</code>
</li>
</div>
<div>
- <li class="covered" data-hits="52" data-linenumber="9">
- <span class="hits">52</span>
+ <li class="covered" data-hits="56" data-linenumber="9">
+ <span class="hits">56</span>
<code class="ruby"> @retries_left = checker.retries</code>
</li>
</div>
<div>
- <li class="covered" data-hits="52" data-linenumber="10">
- <span class="hits">52</span>
+ <li class="covered" data-hits="56" data-linenumber="10">
+ <span class="hits">56</span>
<code class="ruby"> @methods_left = methods.dup</code>
</li>
</div>
<div>
- <li class="covered" data-hits="52" data-linenumber="11">
- <span class="hits">52</span>
+ <li class="covered" data-hits="56" data-linenumber="11">
+ <span class="hits">56</span>
<code class="ruby"> @methods = methods.dup</code>
</li>
</div>
<div>
- <li class="covered" data-hits="52" data-linenumber="12">
- <span class="hits">52</span>
+ <li class="covered" data-hits="56" data-linenumber="12">
+ <span class="hits">56</span>
<code class="ruby"> @task_klass = task_klass</code>
</li>
</div>
<div>
- <li class="covered" data-hits="52" data-linenumber="13">
- <span class="hits">52</span>
+ <li class="covered" data-hits="56" data-linenumber="13">
+ <span class="hits">56</span>
<code class="ruby"> @checker = checker</code>
</li>
</div>
<div>
- <li class="covered" data-hits="52" data-linenumber="14">
- <span class="hits">52</span>
+ <li class="covered" data-hits="56" data-linenumber="14">
+ <span class="hits">56</span>
<code class="ruby"> @logger = checker.logger</code>
</li>
</div>
<div>
- <li class="covered" data-hits="52" data-linenumber="15">
- <span class="hits">52</span>
+ <li class="covered" data-hits="56" data-linenumber="15">
+ <span class="hits">56</span>
<code class="ruby"> @redirects = [uri]</code>
</li>
</div>
<div>
- <li class="covered" data-hits="52" data-linenumber="16">
- <span class="hits">52</span>
+ <li class="covered" data-hits="56" data-linenumber="16">
+ <span class="hits">56</span>
<code class="ruby"> @options = options</code>
</li>
</div>
<div>
- <li class="covered" data-hits="52" data-linenumber="17">
- <span class="hits">52</span>
+ <li class="covered" data-hits="56" data-linenumber="17">
+ <span class="hits">56</span>
<code class="ruby"> raise ArgumentError, :tasks_klass unless @task_klass && @task_klass < ::LinkChecker::Task</code>
@@ -5529,12 +5518,12 @@
<code class="ruby"> def new_task(uri, method, original_uri, options)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="80" data-linenumber="21">
- <span class="hits">80</span>
+ <li class="covered" data-hits="96" data-linenumber="21">
+ <span class="hits">96</span>
<code class="ruby"> task_klass.new(checker, uri, method, original_uri, options)</code>
@@ -5573,825 +5562,946 @@
<code class="ruby"> def execute!</code>
</li>
</div>
<div>
- <li class="covered" data-hits="98" data-linenumber="25">
- <span class="hits">98</span>
+ <li class="covered" data-hits="108" data-linenumber="25">
+ <span class="hits">108</span>
<code class="ruby"> if retry?</code>
</li>
</div>
<div>
- <li class="covered" data-hits="10" data-linenumber="26">
- <span class="hits">10</span>
+ <li class="covered" data-hits="14" data-linenumber="26">
+ <span class="hits">14</span>
<code class="ruby"> @retries_left -= 1</code>
</li>
</div>
<div>
- <li class="covered" data-hits="10" data-linenumber="27">
- <span class="hits">10</span>
+ <li class="covered" data-hits="14" data-linenumber="27">
+ <span class="hits">14</span>
<code class="ruby"> retry! @result</code>
</li>
</div>
<div>
- <li class="covered" data-hits="10" data-linenumber="28">
- <span class="hits">10</span>
+ <li class="covered" data-hits="14" data-linenumber="28">
+ <span class="hits">14</span>
<code class="ruby"> _queue_task(uri, method, original_uri || uri, options)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="88" data-linenumber="29">
- <span class="hits">88</span>
+ <li class="covered" data-hits="94" data-linenumber="29">
+ <span class="hits">94</span>
<code class="ruby"> elsif methods_left.any?</code>
</li>
</div>
<div>
- <li class="covered" data-hits="60" data-linenumber="30">
- <span class="hits">60</span>
+ <li class="covered" data-hits="64" data-linenumber="30">
+ <span class="hits">64</span>
<code class="ruby"> @method = methods_left.shift</code>
</li>
</div>
<div>
- <li class="covered" data-hits="60" data-linenumber="31">
- <span class="hits">60</span>
+ <li class="covered" data-hits="64" data-linenumber="31">
+ <span class="hits">64</span>
- <code class="ruby"> @redirects = [uri]</code>
+ <code class="ruby"> @uri = URI(@uri) unless @uri.is_a?(URI)</code>
</li>
</div>
<div>
<li class="covered" data-hits="60" data-linenumber="32">
<span class="hits">60</span>
- <code class="ruby"> @uri = URI(@uri) unless @uri.is_a?(URI)</code>
- </li>
- </div>
-
- <div>
- <li class="covered" data-hits="56" data-linenumber="33">
- <span class="hits">56</span>
-
-
-
-
<code class="ruby"> _queue_task(uri, method, original_uri || uri, options)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="28" data-linenumber="34">
- <span class="hits">28</span>
+ <li class="covered" data-hits="30" data-linenumber="33">
+ <span class="hits">30</span>
<code class="ruby"> elsif @result && result.error?</code>
</li>
</div>
<div>
- <li class="covered" data-hits="12" data-linenumber="35">
+ <li class="covered" data-hits="12" data-linenumber="34">
<span class="hits">12</span>
<code class="ruby"> error! @result</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="36">
+ <li class="never" data-hits="" data-linenumber="35">
<code class="ruby"> else</code>
</li>
</div>
<div>
- <li class="covered" data-hits="16" data-linenumber="37">
- <span class="hits">16</span>
+ <li class="covered" data-hits="18" data-linenumber="36">
+ <span class="hits">18</span>
<code class="ruby"> failure! @result</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="38">
+ <li class="never" data-hits="" data-linenumber="37">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="39">
+ <li class="never" data-hits="" data-linenumber="38">
<code class="ruby"> rescue StandardError => e</code>
</li>
</div>
<div>
- <li class="covered" data-hits="8" data-linenumber="40">
+ <li class="covered" data-hits="8" data-linenumber="39">
<span class="hits">8</span>
<code class="ruby"> logger.error("#{self}##{__method__}") { e }</code>
</li>
</div>
<div>
- <li class="covered" data-hits="4" data-linenumber="41">
+ <li class="covered" data-hits="4" data-linenumber="40">
<span class="hits">4</span>
<code class="ruby"> _handle_result ResultError.new(uri, method, original_uri || uri, e, options)</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="42">
+ <li class="never" data-hits="" data-linenumber="41">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="43">
+ <li class="never" data-hits="" data-linenumber="42">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="1" data-linenumber="44">
+ <li class="covered" data-hits="1" data-linenumber="43">
<span class="hits">1</span>
<code class="ruby"> private</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="45">
+ <li class="never" data-hits="" data-linenumber="44">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="1" data-linenumber="46">
+ <li class="covered" data-hits="1" data-linenumber="45">
<span class="hits">1</span>
<code class="ruby"> attr_reader :logger, :methods_left, :options, :task_klass, :redirects, :checker, :method</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="47">
+ <li class="never" data-hits="" data-linenumber="46">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="1" data-linenumber="48">
+ <li class="covered" data-hits="1" data-linenumber="47">
<span class="hits">1</span>
<code class="ruby"> def retries</code>
</li>
</div>
<div>
- <li class="missed" data-hits="0" data-linenumber="49">
+ <li class="missed" data-hits="0" data-linenumber="48">
<code class="ruby"> checker.retries</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="50">
+ <li class="never" data-hits="" data-linenumber="49">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="51">
+ <li class="never" data-hits="" data-linenumber="50">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="1" data-linenumber="52">
+ <li class="covered" data-hits="1" data-linenumber="51">
<span class="hits">1</span>
<code class="ruby"> def first_time?</code>
</li>
</div>
<div>
- <li class="covered" data-hits="98" data-linenumber="53">
- <span class="hits">98</span>
+ <li class="covered" data-hits="226" data-linenumber="52">
+ <span class="hits">226</span>
<code class="ruby"> !!method.nil?</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="54">
+ <li class="never" data-hits="" data-linenumber="53">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="55">
+ <li class="never" data-hits="" data-linenumber="54">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="1" data-linenumber="56">
+ <li class="covered" data-hits="1" data-linenumber="55">
<span class="hits">1</span>
<code class="ruby"> def retries_left</code>
</li>
</div>
<div>
- <li class="covered" data-hits="46" data-linenumber="57">
- <span class="hits">46</span>
+ <li class="covered" data-hits="202" data-linenumber="56">
+ <span class="hits">202</span>
<code class="ruby"> @retries_left ||= retries</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="58">
+ <li class="never" data-hits="" data-linenumber="57">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="59">
+ <li class="never" data-hits="" data-linenumber="58">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="1" data-linenumber="60">
+ <li class="covered" data-hits="1" data-linenumber="59">
<span class="hits">1</span>
<code class="ruby"> def retry?</code>
</li>
</div>
<div>
- <li class="covered" data-hits="98" data-linenumber="61">
- <span class="hits">98</span>
+ <li class="covered" data-hits="226" data-linenumber="60">
+ <span class="hits">226</span>
<code class="ruby"> !first_time? && retries_left > 0</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="62">
+ <li class="never" data-hits="" data-linenumber="61">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="63">
+ <li class="never" data-hits="" data-linenumber="62">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="1" data-linenumber="64">
+ <li class="covered" data-hits="1" data-linenumber="63">
<span class="hits">1</span>
<code class="ruby"> def _queue_task(uri, method, original_uri, options = {})</code>
</li>
</div>
<div>
- <li class="covered" data-hits="80" data-linenumber="65">
- <span class="hits">80</span>
+ <li class="covered" data-hits="96" data-linenumber="64">
+ <span class="hits">96</span>
<code class="ruby"> task = new_task(uri, method, original_uri, options)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="80" data-linenumber="66">
- <span class="hits">80</span>
+ <li class="covered" data-hits="96" data-linenumber="65">
+ <span class="hits">96</span>
<code class="ruby"> task.on :result do |result|</code>
</li>
</div>
<div>
- <li class="covered" data-hits="78" data-linenumber="67">
- <span class="hits">78</span>
+ <li class="covered" data-hits="94" data-linenumber="66">
+ <span class="hits">94</span>
<code class="ruby"> _handle_result result</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="68">
+ <li class="never" data-hits="" data-linenumber="67">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="covered" data-hits="80" data-linenumber="69">
- <span class="hits">80</span>
+ <li class="covered" data-hits="96" data-linenumber="68">
+ <span class="hits">96</span>
<code class="ruby"> task.run!</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="70">
+ <li class="never" data-hits="" data-linenumber="69">
<code class="ruby"> rescue StandardError => e</code>
</li>
</div>
<div>
- <li class="covered" data-hits="4" data-linenumber="71">
+ <li class="covered" data-hits="4" data-linenumber="70">
<span class="hits">4</span>
<code class="ruby"> logger.error("#{self}##{__method__}") { e }</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="72">
+ <li class="covered" data-hits="2" data-linenumber="71">
<span class="hits">2</span>
<code class="ruby"> _handle_result ResultError.new(uri, method, original_uri, e, options)</code>
</li>
</div>
<div>
+ <li class="never" data-hits="" data-linenumber="72">
+
+
+
+
+
+ <code class="ruby"> end</code>
+ </li>
+ </div>
+
+ <div>
<li class="never" data-hits="" data-linenumber="73">
+ <code class="ruby"></code>
+ </li>
+ </div>
+
+ <div>
+ <li class="covered" data-hits="1" data-linenumber="74">
+ <span class="hits">1</span>
+
+
+
+
+ <code class="ruby"> def _retries_left_s</code>
+ </li>
+ </div>
+
+ <div>
+ <li class="covered" data-hits="14" data-linenumber="75">
+ <span class="hits">14</span>
+
+
+
+
+ <code class="ruby"> return nil unless retry? && retries_left > 0</code>
+ </li>
+ </div>
+
+ <div>
+ <li class="never" data-hits="" data-linenumber="76">
+
+
+
+
+
+ <code class="ruby"></code>
+ </li>
+ </div>
+
+ <div>
+ <li class="covered" data-hits="14" data-linenumber="77">
+ <span class="hits">14</span>
+
+
+
+
+ <code class="ruby"> if retries_left == 1</code>
+ </li>
+ </div>
+
+ <div>
+ <li class="covered" data-hits="10" data-linenumber="78">
+ <span class="hits">10</span>
+
+
+
+
+ <code class="ruby"> '1 retry left'</code>
+ </li>
+ </div>
+
+ <div>
+ <li class="never" data-hits="" data-linenumber="79">
+
+
+
+
+
+ <code class="ruby"> else</code>
+ </li>
+ </div>
+
+ <div>
+ <li class="covered" data-hits="4" data-linenumber="80">
+ <span class="hits">4</span>
+
+
+
+
+ <code class="ruby"> "#{retries_left} retries left"</code>
+ </li>
+ </div>
+
+ <div>
+ <li class="never" data-hits="" data-linenumber="81">
+
+
+
+
+
+ <code class="ruby"> end</code>
+ </li>
+ </div>
+
+ <div>
+ <li class="never" data-hits="" data-linenumber="82">
+
+
+
+
+
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="74">
+ <li class="never" data-hits="" data-linenumber="83">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="1" data-linenumber="75">
+ <li class="covered" data-hits="1" data-linenumber="84">
<span class="hits">1</span>
<code class="ruby"> def _handle_result(result)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="88" data-linenumber="76">
- <span class="hits">88</span>
+ <li class="covered" data-hits="104" data-linenumber="85">
+ <span class="hits">104</span>
<code class="ruby"> @result = result</code>
</li>
</div>
<div>
- <li class="covered" data-hits="88" data-linenumber="77">
- <span class="hits">88</span>
+ <li class="covered" data-hits="104" data-linenumber="86">
+ <span class="hits">104</span>
- <code class="ruby"> logger.info "#{' ' * (redirects.count - 1)}#{result}"</code>
+ <code class="ruby"> retry_text = " (#{_retries_left_s})" if retry? && (result.error? || result.failure?)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="88" data-linenumber="78">
- <span class="hits">88</span>
+ <li class="covered" data-hits="104" data-linenumber="87">
+ <span class="hits">104</span>
+ <code class="ruby"> logger.info "#{' ' * (redirects.count - 1)}#{result}#{retry_text}"</code>
+ </li>
+ </div>
+
+ <div>
+ <li class="covered" data-hits="104" data-linenumber="88">
+ <span class="hits">104</span>
+
+
+
+
<code class="ruby"> result! result</code>
</li>
</div>
<div>
- <li class="covered" data-hits="88" data-linenumber="79">
- <span class="hits">88</span>
+ <li class="covered" data-hits="104" data-linenumber="89">
+ <span class="hits">104</span>
<code class="ruby"> if result.redirect?</code>
</li>
</div>
<div>
- <li class="covered" data-hits="18" data-linenumber="80">
- <span class="hits">18</span>
+ <li class="covered" data-hits="26" data-linenumber="90">
+ <span class="hits">26</span>
<code class="ruby"> redirect! result</code>
</li>
</div>
<div>
- <li class="covered" data-hits="18" data-linenumber="81">
- <span class="hits">18</span>
+ <li class="covered" data-hits="26" data-linenumber="91">
+ <span class="hits">26</span>
<code class="ruby"> redirected_to_uri = URI.join(uri, result.redirect_to)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="18" data-linenumber="82">
- <span class="hits">18</span>
+ <li class="covered" data-hits="26" data-linenumber="92">
+ <span class="hits">26</span>
<code class="ruby"> if redirects.include?(redirected_to_uri)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="4" data-linenumber="83">
+ <li class="covered" data-hits="4" data-linenumber="93">
<span class="hits">4</span>
<code class="ruby"> raise LinkChecker::Errors::RedirectLoopError,</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="84">
+ <li class="never" data-hits="" data-linenumber="94">
<code class="ruby"> redirects.push(redirected_to_uri)</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="85">
+ <li class="never" data-hits="" data-linenumber="95">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="86">
+ <li class="never" data-hits="" data-linenumber="96">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="14" data-linenumber="87">
- <span class="hits">14</span>
+ <li class="covered" data-hits="22" data-linenumber="97">
+ <span class="hits">22</span>
<code class="ruby"> redirects << redirected_to_uri</code>
</li>
</div>
<div>
- <li class="covered" data-hits="14" data-linenumber="88">
- <span class="hits">14</span>
+ <li class="covered" data-hits="22" data-linenumber="98">
+ <span class="hits">22</span>
<code class="ruby"> _queue_task(redirected_to_uri, result.method, uri, options)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="70" data-linenumber="89">
- <span class="hits">70</span>
+ <li class="covered" data-hits="78" data-linenumber="99">
+ <span class="hits">78</span>
<code class="ruby"> elsif result.success?</code>
</li>
</div>
<div>
- <li class="covered" data-hits="24" data-linenumber="90">
- <span class="hits">24</span>
+ <li class="covered" data-hits="26" data-linenumber="100">
+ <span class="hits">26</span>
<code class="ruby"> success! result</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="91">
+ <li class="never" data-hits="" data-linenumber="101">
<code class="ruby"> else</code>
</li>
</div>
<div>
- <li class="covered" data-hits="46" data-linenumber="92">
- <span class="hits">46</span>
+ <li class="covered" data-hits="52" data-linenumber="102">
+ <span class="hits">52</span>
+ <code class="ruby"> @redirects = [uri]</code>
+ </li>
+ </div>
+
+ <div>
+ <li class="covered" data-hits="52" data-linenumber="103">
+ <span class="hits">52</span>
+
+
+
+
<code class="ruby"> execute!</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="93">
+ <li class="never" data-hits="" data-linenumber="104">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="94">
+ <li class="never" data-hits="" data-linenumber="105">
<code class="ruby"> rescue StandardError => e</code>
</li>
</div>
<div>
- <li class="covered" data-hits="8" data-linenumber="95">
+ <li class="covered" data-hits="8" data-linenumber="106">
<span class="hits">8</span>
<code class="ruby"> logger.error("#{self}##{__method__}") { e }</code>
</li>
</div>
<div>
- <li class="covered" data-hits="4" data-linenumber="96">
+ <li class="covered" data-hits="4" data-linenumber="107">
<span class="hits">4</span>
<code class="ruby"> _handle_result ResultError.new(result.uri, result.method, result.result_uri, e, options)</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="97">
+ <li class="never" data-hits="" data-linenumber="108">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="98">
+ <li class="never" data-hits="" data-linenumber="109">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="99">
+ <li class="never" data-hits="" data-linenumber="110">
@@ -6471,21 +6581,21 @@
<div class="source_table" id="8d163249e55ef6ba47d16da70e1d0dc67dbe54e6">
<div class="header">
<h3>lib/ruby-link-checker/typhoeus/hydra/checker.rb</h3>
<h4>
<span class="green">
- 96.0%
+ 95.65%
</span>
lines covered
</h4>
<div class="t-line-summary">
- <b>25</b> relevant lines.
- <span class="green"><b>24</b> lines covered</span> and
+ <b>23</b> relevant lines.
+ <span class="green"><b>22</b> lines covered</span> and
<span class="red"><b>1</b> lines missed.</span>
</div>
@@ -6548,12 +6658,12 @@
<code class="ruby"> def run!</code>
</li>
</div>
<div>
- <li class="covered" data-hits="40" data-linenumber="6">
- <span class="hits">40</span>
+ <li class="covered" data-hits="48" data-linenumber="6">
+ <span class="hits">48</span>
<code class="ruby"> request = ::Typhoeus::Request.new(</code>
@@ -6669,23 +6779,23 @@
<code class="ruby"> )</code>
</li>
</div>
<div>
- <li class="covered" data-hits="40" data-linenumber="17">
- <span class="hits">40</span>
+ <li class="covered" data-hits="48" data-linenumber="17">
+ <span class="hits">48</span>
<code class="ruby"> request.on_complete do |response|</code>
</li>
</div>
<div>
- <li class="covered" data-hits="40" data-linenumber="18">
- <span class="hits">40</span>
+ <li class="covered" data-hits="48" data-linenumber="18">
+ <span class="hits">48</span>
<code class="ruby"> if response.timed_out?</code>
@@ -6697,368 +6807,346 @@
<span class="hits">2</span>
- <code class="ruby"> logger.debug "#{method} #{uri}: #{response.return_code}"</code>
- </li>
- </div>
-
- <div>
- <li class="covered" data-hits="2" data-linenumber="20">
- <span class="hits">2</span>
-
-
-
-
<code class="ruby"> result! ResultError.new(uri, method, original_uri, Timeout::Error.new, options)</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="21">
+ <li class="never" data-hits="" data-linenumber="20">
<code class="ruby"> else</code>
</li>
</div>
<div>
- <li class="covered" data-hits="38" data-linenumber="22">
- <span class="hits">38</span>
+ <li class="covered" data-hits="46" data-linenumber="21">
+ <span class="hits">46</span>
- <code class="ruby"> logger.debug "#{method} #{uri}: #{response.code}"</code>
- </li>
- </div>
-
- <div>
- <li class="covered" data-hits="38" data-linenumber="23">
- <span class="hits">38</span>
-
-
-
-
<code class="ruby"> result! Result.new(uri, method, original_uri, request, response, options)</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="24">
+ <li class="never" data-hits="" data-linenumber="22">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="25">
+ <li class="never" data-hits="" data-linenumber="23">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="covered" data-hits="40" data-linenumber="26">
- <span class="hits">40</span>
+ <li class="covered" data-hits="48" data-linenumber="24">
+ <span class="hits">48</span>
<code class="ruby"> checker._queue(request)</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="27">
+ <li class="never" data-hits="" data-linenumber="25">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="28">
+ <li class="never" data-hits="" data-linenumber="26">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="29">
+ <li class="never" data-hits="" data-linenumber="27">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="1" data-linenumber="30">
+ <li class="covered" data-hits="1" data-linenumber="28">
<span class="hits">1</span>
<code class="ruby"> class Checker < LinkChecker::Checker</code>
</li>
</div>
<div>
- <li class="covered" data-hits="1" data-linenumber="31">
+ <li class="covered" data-hits="1" data-linenumber="29">
<span class="hits">1</span>
<code class="ruby"> extend ::LinkChecker::Typhoeus::Hydra::Config</code>
</li>
</div>
<div>
- <li class="covered" data-hits="1" data-linenumber="32">
+ <li class="covered" data-hits="1" data-linenumber="30">
<span class="hits">1</span>
<code class="ruby"> attr_accessor(*LinkChecker::Typhoeus::Hydra::Config::ATTRIBUTES)</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="33">
+ <li class="never" data-hits="" data-linenumber="31">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="1" data-linenumber="34">
+ <li class="covered" data-hits="1" data-linenumber="32">
<span class="hits">1</span>
<code class="ruby"> def initialize(options = {})</code>
</li>
</div>
<div>
- <li class="covered" data-hits="27" data-linenumber="35">
- <span class="hits">27</span>
+ <li class="covered" data-hits="29" data-linenumber="33">
+ <span class="hits">29</span>
<code class="ruby"> LinkChecker::Typhoeus::Hydra::Config::ATTRIBUTES.each do |key|</code>
</li>
</div>
<div>
- <li class="covered" data-hits="54" data-linenumber="36">
- <span class="hits">54</span>
+ <li class="covered" data-hits="58" data-linenumber="34">
+ <span class="hits">58</span>
<code class="ruby"> send("#{key}=", options[key] || LinkChecker::Typhoeus::Hydra::Config.send(key))</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="37">
+ <li class="never" data-hits="" data-linenumber="35">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="covered" data-hits="27" data-linenumber="38">
- <span class="hits">27</span>
+ <li class="covered" data-hits="29" data-linenumber="36">
+ <span class="hits">29</span>
<code class="ruby"> @hydra = ::Typhoeus::Hydra.new(options[:hydra] || { max_concurrency: 10 })</code>
</li>
</div>
<div>
- <li class="covered" data-hits="27" data-linenumber="39">
- <span class="hits">27</span>
+ <li class="covered" data-hits="29" data-linenumber="37">
+ <span class="hits">29</span>
<code class="ruby"> super options</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="40">
+ <li class="never" data-hits="" data-linenumber="38">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="41">
+ <li class="never" data-hits="" data-linenumber="39">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="1" data-linenumber="42">
+ <li class="covered" data-hits="1" data-linenumber="40">
<span class="hits">1</span>
<code class="ruby"> def run</code>
</li>
</div>
<div>
- <li class="missed" data-hits="0" data-linenumber="43">
+ <li class="missed" data-hits="0" data-linenumber="41">
<code class="ruby"> @hydra.run</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="44">
+ <li class="never" data-hits="" data-linenumber="42">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="45">
+ <li class="never" data-hits="" data-linenumber="43">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="1" data-linenumber="46">
+ <li class="covered" data-hits="1" data-linenumber="44">
<span class="hits">1</span>
<code class="ruby"> def _queue(request)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="40" data-linenumber="47">
- <span class="hits">40</span>
+ <li class="covered" data-hits="48" data-linenumber="45">
+ <span class="hits">48</span>
<code class="ruby"> @hydra.queue(request)</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="48">
+ <li class="never" data-hits="" data-linenumber="46">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="49">
+ <li class="never" data-hits="" data-linenumber="47">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="50">
+ <li class="never" data-hits="" data-linenumber="48">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="51">
+ <li class="never" data-hits="" data-linenumber="49">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="52">
+ <li class="never" data-hits="" data-linenumber="50">
@@ -7589,34 +7677,34 @@
<code class="ruby"> def initialize(uri, method, original_uri, request, response, options)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="38" data-linenumber="8">
- <span class="hits">38</span>
+ <li class="covered" data-hits="46" data-linenumber="8">
+ <span class="hits">46</span>
<code class="ruby"> @request = request</code>
</li>
</div>
<div>
- <li class="covered" data-hits="38" data-linenumber="9">
- <span class="hits">38</span>
+ <li class="covered" data-hits="46" data-linenumber="9">
+ <span class="hits">46</span>
<code class="ruby"> @response = response</code>
</li>
</div>
<div>
- <li class="covered" data-hits="38" data-linenumber="10">
- <span class="hits">38</span>
+ <li class="covered" data-hits="46" data-linenumber="10">
+ <span class="hits">46</span>
<code class="ruby"> super uri, method, original_uri, options</code>
@@ -7655,12 +7743,12 @@
<code class="ruby"> def error?</code>
</li>
</div>
<div>
- <li class="covered" data-hits="38" data-linenumber="14">
- <span class="hits">38</span>
+ <li class="covered" data-hits="60" data-linenumber="14">
+ <span class="hits">60</span>
<code class="ruby"> false</code>
@@ -7699,12 +7787,12 @@
<code class="ruby"> def failure?</code>
</li>
</div>
<div>
- <li class="covered" data-hits="37" data-linenumber="18">
- <span class="hits">37</span>
+ <li class="covered" data-hits="54" data-linenumber="18">
+ <span class="hits">54</span>
<code class="ruby"> !success? && !redirect? && !error?</code>
@@ -7743,23 +7831,23 @@
<code class="ruby"> def code</code>
</li>
</div>
<div>
- <li class="covered" data-hits="354" data-linenumber="22">
- <span class="hits">354</span>
+ <li class="covered" data-hits="453" data-linenumber="22">
+ <span class="hits">453</span>
<code class="ruby"> @code ||= begin</code>
</li>
</div>
<div>
- <li class="covered" data-hits="38" data-linenumber="23">
- <span class="hits">38</span>
+ <li class="covered" data-hits="46" data-linenumber="23">
+ <span class="hits">46</span>
<code class="ruby"> response.code.to_i</code>
@@ -7875,12 +7963,12 @@
<code class="ruby"> def redirect_to</code>
</li>
</div>
<div>
- <li class="covered" data-hits="9" data-linenumber="34">
- <span class="hits">9</span>
+ <li class="covered" data-hits="13" data-linenumber="34">
+ <span class="hits">13</span>
<code class="ruby"> return nil unless response</code>
@@ -7897,12 +7985,12 @@
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="9" data-linenumber="36">
- <span class="hits">9</span>
+ <li class="covered" data-hits="13" data-linenumber="36">
+ <span class="hits">13</span>
<code class="ruby"> response.headers['Location']</code>
@@ -7941,12 +8029,12 @@
<code class="ruby"> def redirect?</code>
</li>
</div>
<div>
- <li class="covered" data-hits="82" data-linenumber="40">
- <span class="hits">82</span>
+ <li class="covered" data-hits="111" data-linenumber="40">
+ <span class="hits">111</span>
<code class="ruby"> return false unless response</code>
@@ -7963,12 +8051,12 @@
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="82" data-linenumber="42">
- <span class="hits">82</span>
+ <li class="covered" data-hits="111" data-linenumber="42">
+ <span class="hits">111</span>
<code class="ruby"> [301, 302, 303, 307, 308].include?(code)</code>
@@ -8007,12 +8095,12 @@
<code class="ruby"> def success?</code>
</li>
</div>
<div>
- <li class="covered" data-hits="117" data-linenumber="46">
- <span class="hits">117</span>
+ <li class="covered" data-hits="148" data-linenumber="46">
+ <span class="hits">148</span>
<code class="ruby"> return false unless response</code>
@@ -8029,12 +8117,12 @@
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="117" data-linenumber="48">
- <span class="hits">117</span>
+ <li class="covered" data-hits="148" data-linenumber="48">
+ <span class="hits">148</span>
<code class="ruby"> code >= 200 && code <= 299</code>
@@ -8859,12 +8947,12 @@
<code class="ruby"> after do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="27" data-linenumber="13">
- <span class="hits">27</span>
+ <li class="covered" data-hits="29" data-linenumber="13">
+ <span class="hits">29</span>
<code class="ruby"> LinkChecker::Net::HTTP::Config.reset</code>
@@ -9539,23 +9627,23 @@
<code class="ruby"> def check(url, options = {})</code>
</li>
</div>
<div>
- <li class="covered" data-hits="26" data-linenumber="11">
- <span class="hits">26</span>
+ <li class="covered" data-hits="28" data-linenumber="11">
+ <span class="hits">28</span>
<code class="ruby"> super url, options</code>
</li>
</div>
<div>
- <li class="covered" data-hits="26" data-linenumber="12">
- <span class="hits">26</span>
+ <li class="covered" data-hits="28" data-linenumber="12">
+ <span class="hits">28</span>
<code class="ruby"> @hydra.run</code>
@@ -10349,12 +10437,12 @@
<code class="ruby"> config.before do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="64" data-linenumber="3">
- <span class="hits">64</span>
+ <li class="covered" data-hits="68" data-linenumber="3">
+ <span class="hits">68</span>
<code class="ruby"> LinkChecker::Logger.default.level = Logger::DEBUG</code>
@@ -10382,12 +10470,12 @@
<code class="ruby"> config.after do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="64" data-linenumber="6">
- <span class="hits">64</span>
+ <li class="covered" data-hits="68" data-linenumber="6">
+ <span class="hits">68</span>
<code class="ruby"> LinkChecker::Config.reset</code>
@@ -10424,21 +10512,21 @@
<div class="source_table" id="14f6854041b193c79b7f1303483e86078b6c1fa2">
<div class="header">
<h3>spec/support/link_checker.rb</h3>
<h4>
<span class="green">
- 98.97%
+ 99.03%
</span>
lines covered
</h4>
<div class="t-line-summary">
- <b>194</b> relevant lines.
- <span class="green"><b>192</b> lines covered</span> and
+ <b>206</b> relevant lines.
+ <span class="green"><b>204</b> lines covered</span> and
<span class="red"><b>2</b> lines missed.</span>
</div>
@@ -10578,12 +10666,12 @@
<code class="ruby"> context 'check' do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="44" data-linenumber="13">
- <span class="hits">44</span>
+ <li class="covered" data-hits="46" data-linenumber="13">
+ <span class="hits">46</span>
<code class="ruby"> let(:url) { 'https://www.example.org' }</code>
@@ -11304,12 +11392,12 @@
<code class="ruby"> before do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="36" data-linenumber="79">
- <span class="hits">36</span>
+ <li class="covered" data-hits="40" data-linenumber="79">
+ <span class="hits">40</span>
<code class="ruby"> subject.check(url)</code>
@@ -11359,12 +11447,12 @@
<code class="ruby"> subject do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="20" data-linenumber="84">
- <span class="hits">20</span>
+ <li class="covered" data-hits="22" data-linenumber="84">
+ <span class="hits">22</span>
<code class="ruby"> described_class.new(methods: ['GET'])</code>
@@ -11728,2260 +11816,2491 @@
<span class="hits">2</span>
+ <code class="ruby"> context 'a redirect', vcr: { cassette_name: '301+200' } do</code>
+ </li>
+ </div>
+
+ <div>
+ <li class="covered" data-hits="4" data-linenumber="118">
+ <span class="hits">4</span>
+
+
+
+
+ <code class="ruby"> let(:url) { 'https://www.meetup.com/Open-Distro-for-Elasticsearch-Meetup-Group' }</code>
+ </li>
+ </div>
+
+ <div>
+ <li class="never" data-hits="" data-linenumber="119">
+
+
+
+
+
+ <code class="ruby"></code>
+ </li>
+ </div>
+
+ <div>
+ <li class="covered" data-hits="2" data-linenumber="120">
+ <span class="hits">2</span>
+
+
+
+
+ <code class="ruby"> it 'succeeds' do</code>
+ </li>
+ </div>
+
+ <div>
+ <li class="covered" data-hits="2" data-linenumber="121">
+ <span class="hits">2</span>
+
+
+
+
+ <code class="ruby"> expect(result.success?).to be true</code>
+ </li>
+ </div>
+
+ <div>
+ <li class="never" data-hits="" data-linenumber="122">
+
+
+
+
+
+ <code class="ruby"> end</code>
+ </li>
+ </div>
+
+ <div>
+ <li class="never" data-hits="" data-linenumber="123">
+
+
+
+
+
+ <code class="ruby"> end</code>
+ </li>
+ </div>
+
+ <div>
+ <li class="never" data-hits="" data-linenumber="124">
+
+
+
+
+
+ <code class="ruby"></code>
+ </li>
+ </div>
+
+ <div>
+ <li class="covered" data-hits="2" data-linenumber="125">
+ <span class="hits">2</span>
+
+
+
+
<code class="ruby"> context 'a 404', vcr: { cassette_name: '404', allow_playback_repeats: true } do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="118">
+ <li class="covered" data-hits="2" data-linenumber="126">
<span class="hits">2</span>
<code class="ruby"> it 'fails' do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="119">
+ <li class="covered" data-hits="2" data-linenumber="127">
<span class="hits">2</span>
<code class="ruby"> expect(result.success?).to be false</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="120">
+ <li class="covered" data-hits="2" data-linenumber="128">
<span class="hits">2</span>
<code class="ruby"> expect(result.error?).to be false</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="121">
+ <li class="covered" data-hits="2" data-linenumber="129">
<span class="hits">2</span>
<code class="ruby"> expect(result.failure?).to be true</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="122">
+ <li class="covered" data-hits="2" data-linenumber="130">
<span class="hits">2</span>
<code class="ruby"> expect(result.uri).to eq URI(url)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="123">
+ <li class="covered" data-hits="2" data-linenumber="131">
<span class="hits">2</span>
<code class="ruby"> expect(result.response.code.to_i).to eq 404</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="124">
+ <li class="covered" data-hits="2" data-linenumber="132">
<span class="hits">2</span>
<code class="ruby"> expect(subject).to have_received(:called!).with(:failure, result)</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="125">
+ <li class="never" data-hits="" data-linenumber="133">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="126">
+ <li class="never" data-hits="" data-linenumber="134">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="127">
+ <li class="covered" data-hits="2" data-linenumber="135">
<span class="hits">2</span>
<code class="ruby"> context 'with 0 retries' do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="128">
+ <li class="covered" data-hits="2" data-linenumber="136">
<span class="hits">2</span>
<code class="ruby"> subject do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="129">
+ <li class="covered" data-hits="2" data-linenumber="137">
<span class="hits">2</span>
<code class="ruby"> described_class.new(methods: ['GET'], retries: 0)</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="130">
+ <li class="never" data-hits="" data-linenumber="138">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="131">
+ <li class="never" data-hits="" data-linenumber="139">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="132">
+ <li class="covered" data-hits="2" data-linenumber="140">
<span class="hits">2</span>
<code class="ruby"> it 'fails' do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="133">
+ <li class="covered" data-hits="2" data-linenumber="141">
<span class="hits">2</span>
<code class="ruby"> expect(result.success?).to be false</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="134">
+ <li class="covered" data-hits="2" data-linenumber="142">
<span class="hits">2</span>
<code class="ruby"> expect(result.error?).to be false</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="135">
+ <li class="covered" data-hits="2" data-linenumber="143">
<span class="hits">2</span>
<code class="ruby"> expect(result.failure?).to be true</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="136">
+ <li class="covered" data-hits="2" data-linenumber="144">
<span class="hits">2</span>
<code class="ruby"> expect(result.uri).to eq URI(url)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="137">
+ <li class="covered" data-hits="2" data-linenumber="145">
<span class="hits">2</span>
<code class="ruby"> expect(result.response.code.to_i).to eq 404</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="138">
+ <li class="covered" data-hits="2" data-linenumber="146">
<span class="hits">2</span>
<code class="ruby"> expect(subject).to have_received(:called!).with(:failure, result).once</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="139">
+ <li class="covered" data-hits="2" data-linenumber="147">
<span class="hits">2</span>
<code class="ruby"> expect(subject).not_to have_received(:called!).with(:retry, anything)</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="140">
+ <li class="never" data-hits="" data-linenumber="148">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="141">
+ <li class="never" data-hits="" data-linenumber="149">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="142">
+ <li class="never" data-hits="" data-linenumber="150">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="143">
+ <li class="covered" data-hits="2" data-linenumber="151">
<span class="hits">2</span>
<code class="ruby"> context 'with 1 retry' do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="144">
+ <li class="covered" data-hits="2" data-linenumber="152">
<span class="hits">2</span>
<code class="ruby"> subject do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="145">
+ <li class="covered" data-hits="2" data-linenumber="153">
<span class="hits">2</span>
<code class="ruby"> described_class.new(methods: ['GET'], retries: 1)</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="146">
+ <li class="never" data-hits="" data-linenumber="154">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="147">
+ <li class="never" data-hits="" data-linenumber="155">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="148">
+ <li class="covered" data-hits="2" data-linenumber="156">
<span class="hits">2</span>
<code class="ruby"> it 'fails' do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="149">
+ <li class="covered" data-hits="2" data-linenumber="157">
<span class="hits">2</span>
<code class="ruby"> expect(result.success?).to be false</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="150">
+ <li class="covered" data-hits="2" data-linenumber="158">
<span class="hits">2</span>
<code class="ruby"> expect(result.error?).to be false</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="151">
+ <li class="covered" data-hits="2" data-linenumber="159">
<span class="hits">2</span>
<code class="ruby"> expect(result.failure?).to be true</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="152">
+ <li class="covered" data-hits="2" data-linenumber="160">
<span class="hits">2</span>
<code class="ruby"> expect(result.uri).to eq URI(url)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="153">
+ <li class="covered" data-hits="2" data-linenumber="161">
<span class="hits">2</span>
<code class="ruby"> expect(result.response.code.to_i).to eq 404</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="154">
+ <li class="covered" data-hits="2" data-linenumber="162">
<span class="hits">2</span>
<code class="ruby"> expect(subject).to have_received(:called!).with(:failure, result).once</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="155">
+ <li class="covered" data-hits="2" data-linenumber="163">
<span class="hits">2</span>
<code class="ruby"> expect(subject).to have_received(:called!).with(:retry, anything).once</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="156">
+ <li class="never" data-hits="" data-linenumber="164">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="157">
+ <li class="never" data-hits="" data-linenumber="165">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="158">
+ <li class="never" data-hits="" data-linenumber="166">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="159">
+ <li class="covered" data-hits="2" data-linenumber="167">
<span class="hits">2</span>
<code class="ruby"> context 'with 2 retries' do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="160">
+ <li class="covered" data-hits="2" data-linenumber="168">
<span class="hits">2</span>
<code class="ruby"> subject do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="161">
+ <li class="covered" data-hits="2" data-linenumber="169">
<span class="hits">2</span>
<code class="ruby"> described_class.new(methods: ['GET'], retries: 2)</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="162">
+ <li class="never" data-hits="" data-linenumber="170">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="163">
+ <li class="never" data-hits="" data-linenumber="171">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="164">
+ <li class="covered" data-hits="2" data-linenumber="172">
<span class="hits">2</span>
<code class="ruby"> it 'fails' do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="165">
+ <li class="covered" data-hits="2" data-linenumber="173">
<span class="hits">2</span>
<code class="ruby"> expect(result.success?).to be false</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="166">
+ <li class="covered" data-hits="2" data-linenumber="174">
<span class="hits">2</span>
<code class="ruby"> expect(result.error?).to be false</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="167">
+ <li class="covered" data-hits="2" data-linenumber="175">
<span class="hits">2</span>
<code class="ruby"> expect(result.failure?).to be true</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="168">
+ <li class="covered" data-hits="2" data-linenumber="176">
<span class="hits">2</span>
<code class="ruby"> expect(result.uri).to eq URI(url)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="169">
+ <li class="covered" data-hits="2" data-linenumber="177">
<span class="hits">2</span>
<code class="ruby"> expect(result.response.code.to_i).to eq 404</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="170">
+ <li class="covered" data-hits="2" data-linenumber="178">
<span class="hits">2</span>
<code class="ruby"> expect(subject).to have_received(:called!).with(:failure, result).once</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="171">
+ <li class="covered" data-hits="2" data-linenumber="179">
<span class="hits">2</span>
<code class="ruby"> expect(subject).to have_received(:called!).with(:retry, anything).twice</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="172">
+ <li class="never" data-hits="" data-linenumber="180">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="173">
+ <li class="never" data-hits="" data-linenumber="181">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="174">
+ <li class="never" data-hits="" data-linenumber="182">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="175">
+ <li class="never" data-hits="" data-linenumber="183">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="176">
+ <li class="covered" data-hits="2" data-linenumber="184">
<span class="hits">2</span>
<code class="ruby"> context 'a redirect on HEAD followed by a 403', vcr: { cassette_name: '301+403' } do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="177">
+ <li class="covered" data-hits="2" data-linenumber="185">
<span class="hits">2</span>
<code class="ruby"> it 'calls redirect callback' do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="178">
+ <li class="covered" data-hits="2" data-linenumber="186">
<span class="hits">2</span>
<code class="ruby"> expect(result.success?).to be false</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="179">
+ <li class="covered" data-hits="2" data-linenumber="187">
<span class="hits">2</span>
<code class="ruby"> expect(result.failure?).to be true</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="180">
+ <li class="covered" data-hits="2" data-linenumber="188">
<span class="hits">2</span>
<code class="ruby"> expect(subject).to have_received(:called!).with(:redirect, anything)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="181">
+ <li class="covered" data-hits="2" data-linenumber="189">
<span class="hits">2</span>
<code class="ruby"> expect(subject).to have_received(:called!).with(:failure, result).once</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="182">
+ <li class="never" data-hits="" data-linenumber="190">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="183">
+ <li class="never" data-hits="" data-linenumber="191">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="184">
+ <li class="covered" data-hits="2" data-linenumber="192">
<span class="hits">2</span>
<code class="ruby"> it 'reports its original and result urls' do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="185">
+ <li class="covered" data-hits="2" data-linenumber="193">
<span class="hits">2</span>
<code class="ruby"> expect(result.uri.to_s).to eq url</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="186">
+ <li class="covered" data-hits="2" data-linenumber="194">
<span class="hits">2</span>
<code class="ruby"> expect(result.result_uri.to_s).not_to eq url</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="187">
+ <li class="covered" data-hits="2" data-linenumber="195">
<span class="hits">2</span>
<code class="ruby"> expect(result.result_uri.to_s).to eq 'https://www.dblock.org/'</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="188">
+ <li class="never" data-hits="" data-linenumber="196">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="189">
+ <li class="never" data-hits="" data-linenumber="197">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="190">
+ <li class="never" data-hits="" data-linenumber="198">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="191">
+ <li class="covered" data-hits="2" data-linenumber="199">
<span class="hits">2</span>
<code class="ruby"> context 'a redirect on HEAD followed by a 200', vcr: { cassette_name: '301+200' } do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="192">
+ <li class="covered" data-hits="2" data-linenumber="200">
<span class="hits">2</span>
<code class="ruby"> it 'calls redirect callback' do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="193">
+ <li class="covered" data-hits="2" data-linenumber="201">
<span class="hits">2</span>
<code class="ruby"> expect(result.success?).to be true</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="194">
+ <li class="covered" data-hits="2" data-linenumber="202">
<span class="hits">2</span>
<code class="ruby"> expect(result.failure?).to be false</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="195">
+ <li class="covered" data-hits="2" data-linenumber="203">
<span class="hits">2</span>
<code class="ruby"> expect(result.redirect?).to be false</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="196">
+ <li class="covered" data-hits="2" data-linenumber="204">
<span class="hits">2</span>
<code class="ruby"> expect(subject).to have_received(:called!).with(:redirect, anything)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="197">
+ <li class="covered" data-hits="2" data-linenumber="205">
<span class="hits">2</span>
<code class="ruby"> expect(subject).to have_received(:called!).with(:success, result)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="198">
+ <li class="covered" data-hits="2" data-linenumber="206">
<span class="hits">2</span>
<code class="ruby"> expect(subject).not_to have_received(:called!).with(:failure, anything)</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="199">
+ <li class="never" data-hits="" data-linenumber="207">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="200">
+ <li class="never" data-hits="" data-linenumber="208">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="201">
+ <li class="never" data-hits="" data-linenumber="209">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="202">
+ <li class="covered" data-hits="2" data-linenumber="210">
<span class="hits">2</span>
<code class="ruby"> context 'a redirect loop', vcr: { cassette_name: '301+301' } do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="203">
+ <li class="covered" data-hits="2" data-linenumber="211">
<span class="hits">2</span>
<code class="ruby"> it 'calls redirect callback' do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="204">
+ <li class="covered" data-hits="2" data-linenumber="212">
<span class="hits">2</span>
<code class="ruby"> expect(result.success?).to be false</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="205">
+ <li class="covered" data-hits="2" data-linenumber="213">
<span class="hits">2</span>
<code class="ruby"> expect(result.failure?).to be false</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="206">
+ <li class="covered" data-hits="2" data-linenumber="214">
<span class="hits">2</span>
<code class="ruby"> expect(result.error?).to be true</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="207">
+ <li class="covered" data-hits="2" data-linenumber="215">
<span class="hits">2</span>
<code class="ruby"> expect(result.error).to be_a LinkChecker::Errors::RedirectLoopError</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="208">
+ <li class="covered" data-hits="2" data-linenumber="216">
<span class="hits">2</span>
<code class="ruby"> expect(result.redirect?).to be false</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="209">
+ <li class="covered" data-hits="2" data-linenumber="217">
<span class="hits">2</span>
<code class="ruby"> expect(subject).to have_received(:called!).with(:redirect, anything).twice</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="210">
+ <li class="covered" data-hits="2" data-linenumber="218">
<span class="hits">2</span>
<code class="ruby"> expect(subject).to have_received(:called!).with(:error, result)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="211">
+ <li class="covered" data-hits="2" data-linenumber="219">
<span class="hits">2</span>
<code class="ruby"> expect(subject).not_to have_received(:called!).with(:failure, result)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="212">
+ <li class="covered" data-hits="2" data-linenumber="220">
<span class="hits">2</span>
<code class="ruby"> expect(subject).not_to have_received(:called!).with(:success, result)</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="213">
+ <li class="never" data-hits="" data-linenumber="221">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="214">
+ <li class="never" data-hits="" data-linenumber="222">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="215">
+ <li class="never" data-hits="" data-linenumber="223">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="216">
+ <li class="covered" data-hits="2" data-linenumber="224">
<span class="hits">2</span>
<code class="ruby"> context 'a retry on 429', vcr: {</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="217">
+ <li class="never" data-hits="" data-linenumber="225">
<code class="ruby"> cassette_name: '429+200',</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="218">
+ <li class="never" data-hits="" data-linenumber="226">
<code class="ruby"> match_requests_on: [lambda { |_request, recorded_request|</code>
</li>
</div>
<div>
- <li class="covered" data-hits="4" data-linenumber="219">
+ <li class="covered" data-hits="4" data-linenumber="227">
<span class="hits">4</span>
<code class="ruby"> @matched ||= []</code>
</li>
</div>
<div>
- <li class="covered" data-hits="4" data-linenumber="220">
+ <li class="covered" data-hits="4" data-linenumber="228">
<span class="hits">4</span>
<code class="ruby"> if @matched.size + 1 === recorded_request.headers['Index'].first</code>
</li>
</div>
<div>
- <li class="covered" data-hits="4" data-linenumber="221">
+ <li class="covered" data-hits="4" data-linenumber="229">
<span class="hits">4</span>
<code class="ruby"> @matched << recorded_request</code>
</li>
</div>
<div>
- <li class="covered" data-hits="4" data-linenumber="222">
+ <li class="covered" data-hits="4" data-linenumber="230">
<span class="hits">4</span>
<code class="ruby"> true</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="223">
+ <li class="never" data-hits="" data-linenumber="231">
<code class="ruby"> else</code>
</li>
</div>
<div>
- <li class="missed" data-hits="0" data-linenumber="224">
+ <li class="missed" data-hits="0" data-linenumber="232">
<code class="ruby"> false</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="225">
+ <li class="never" data-hits="" data-linenumber="233">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="226">
+ <li class="never" data-hits="" data-linenumber="234">
<code class="ruby"> }]</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="227">
+ <li class="never" data-hits="" data-linenumber="235">
<code class="ruby"> } do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="228">
+ <li class="covered" data-hits="2" data-linenumber="236">
<span class="hits">2</span>
<code class="ruby"> subject do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="229">
+ <li class="covered" data-hits="2" data-linenumber="237">
<span class="hits">2</span>
<code class="ruby"> described_class.new(methods: ['GET'], retries: 1)</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="230">
+ <li class="never" data-hits="" data-linenumber="238">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="231">
+ <li class="never" data-hits="" data-linenumber="239">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="232">
+ <li class="covered" data-hits="2" data-linenumber="240">
<span class="hits">2</span>
<code class="ruby"> it 'calls a retry callback' do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="233">
+ <li class="covered" data-hits="2" data-linenumber="241">
<span class="hits">2</span>
<code class="ruby"> expect(result.success?).to be true</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="234">
+ <li class="covered" data-hits="2" data-linenumber="242">
<span class="hits">2</span>
<code class="ruby"> expect(result.failure?).to be false</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="235">
+ <li class="covered" data-hits="2" data-linenumber="243">
<span class="hits">2</span>
<code class="ruby"> expect(result.redirect?).to be false</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="236">
+ <li class="covered" data-hits="2" data-linenumber="244">
<span class="hits">2</span>
<code class="ruby"> expect(subject).to have_received(:called!).with(:retry, anything)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="237">
+ <li class="covered" data-hits="2" data-linenumber="245">
<span class="hits">2</span>
<code class="ruby"> expect(subject).to have_received(:called!).with(:success, result)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="238">
+ <li class="covered" data-hits="2" data-linenumber="246">
<span class="hits">2</span>
<code class="ruby"> expect(subject).not_to have_received(:called!).with(:failure, anything)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="239">
+ <li class="covered" data-hits="2" data-linenumber="247">
<span class="hits">2</span>
<code class="ruby"> expect(subject).not_to have_received(:called!).with(:error, anything)</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="240">
+ <li class="never" data-hits="" data-linenumber="248">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="241">
+ <li class="never" data-hits="" data-linenumber="249">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="242">
+ <li class="never" data-hits="" data-linenumber="250">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="243">
+ <li class="covered" data-hits="2" data-linenumber="251">
<span class="hits">2</span>
+ <code class="ruby"> context 'a failed retry on a redirect', vcr: { cassette_name: '308+429', allow_playback_repeats: true } do</code>
+ </li>
+ </div>
+
+ <div>
+ <li class="covered" data-hits="2" data-linenumber="252">
+ <span class="hits">2</span>
+
+
+
+
+ <code class="ruby"> subject do</code>
+ </li>
+ </div>
+
+ <div>
+ <li class="covered" data-hits="2" data-linenumber="253">
+ <span class="hits">2</span>
+
+
+
+
+ <code class="ruby"> described_class.new(methods: %w[HEAD], retries: 2)</code>
+ </li>
+ </div>
+
+ <div>
+ <li class="never" data-hits="" data-linenumber="254">
+
+
+
+
+
+ <code class="ruby"> end</code>
+ </li>
+ </div>
+
+ <div>
+ <li class="never" data-hits="" data-linenumber="255">
+
+
+
+
+
+ <code class="ruby"></code>
+ </li>
+ </div>
+
+ <div>
+ <li class="covered" data-hits="2" data-linenumber="256">
+ <span class="hits">2</span>
+
+
+
+
+ <code class="ruby"> it 'calls redirect callback' do</code>
+ </li>
+ </div>
+
+ <div>
+ <li class="covered" data-hits="2" data-linenumber="257">
+ <span class="hits">2</span>
+
+
+
+
+ <code class="ruby"> expect(result.success?).to be false</code>
+ </li>
+ </div>
+
+ <div>
+ <li class="covered" data-hits="2" data-linenumber="258">
+ <span class="hits">2</span>
+
+
+
+
+ <code class="ruby"> expect(result.failure?).to be true</code>
+ </li>
+ </div>
+
+ <div>
+ <li class="covered" data-hits="2" data-linenumber="259">
+ <span class="hits">2</span>
+
+
+
+
+ <code class="ruby"> expect(result.error?).to be false</code>
+ </li>
+ </div>
+
+ <div>
+ <li class="covered" data-hits="2" data-linenumber="260">
+ <span class="hits">2</span>
+
+
+
+
+ <code class="ruby"> expect(result.error).not_to be_a LinkChecker::Errors::RedirectLoopError</code>
+ </li>
+ </div>
+
+ <div>
+ <li class="never" data-hits="" data-linenumber="261">
+
+
+
+
+
+ <code class="ruby"> end</code>
+ </li>
+ </div>
+
+ <div>
+ <li class="never" data-hits="" data-linenumber="262">
+
+
+
+
+
+ <code class="ruby"> end</code>
+ </li>
+ </div>
+
+ <div>
+ <li class="never" data-hits="" data-linenumber="263">
+
+
+
+
+
+ <code class="ruby"></code>
+ </li>
+ </div>
+
+ <div>
+ <li class="covered" data-hits="2" data-linenumber="264">
+ <span class="hits">2</span>
+
+
+
+
<code class="ruby"> context 'an invalid URI' do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="4" data-linenumber="244">
+ <li class="covered" data-hits="4" data-linenumber="265">
<span class="hits">4</span>
<code class="ruby"> let(:url) { '\/invalid-url' }</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="245">
+ <li class="never" data-hits="" data-linenumber="266">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="246">
+ <li class="covered" data-hits="2" data-linenumber="267">
<span class="hits">2</span>
<code class="ruby"> it 'fails' do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="247">
+ <li class="covered" data-hits="2" data-linenumber="268">
<span class="hits">2</span>
<code class="ruby"> expect(result.success?).to be false</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="248">
+ <li class="covered" data-hits="2" data-linenumber="269">
<span class="hits">2</span>
<code class="ruby"> expect(result.failure?).to be false</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="249">
+ <li class="covered" data-hits="2" data-linenumber="270">
<span class="hits">2</span>
<code class="ruby"> expect(result.error?).to be true</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="250">
+ <li class="covered" data-hits="2" data-linenumber="271">
<span class="hits">2</span>
<code class="ruby"> expect(result.uri).to eq url</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="251">
+ <li class="covered" data-hits="2" data-linenumber="272">
<span class="hits">2</span>
<code class="ruby"> expect(subject).to have_received(:called!).with(:result, result)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="252">
+ <li class="covered" data-hits="2" data-linenumber="273">
<span class="hits">2</span>
<code class="ruby"> expect(subject).to have_received(:called!).with(:error, result)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="253">
+ <li class="covered" data-hits="2" data-linenumber="274">
<span class="hits">2</span>
<code class="ruby"> expect(subject).not_to have_received(:called!).with(:failure)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="254">
+ <li class="covered" data-hits="2" data-linenumber="275">
<span class="hits">2</span>
<code class="ruby"> expect(subject).not_to have_received(:called!).with(:success)</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="255">
+ <li class="never" data-hits="" data-linenumber="276">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="256">
+ <li class="never" data-hits="" data-linenumber="277">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="257">
+ <li class="never" data-hits="" data-linenumber="278">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="258">
+ <li class="never" data-hits="" data-linenumber="279">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="259">
+ <li class="covered" data-hits="2" data-linenumber="280">
<span class="hits">2</span>
<code class="ruby"> context 'HEAD,GET' do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="260">
+ <li class="covered" data-hits="2" data-linenumber="281">
<span class="hits">2</span>
<code class="ruby"> subject do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="6" data-linenumber="261">
+ <li class="covered" data-hits="6" data-linenumber="282">
<span class="hits">6</span>
<code class="ruby"> described_class.new(methods: %w[HEAD GET])</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="262">
+ <li class="never" data-hits="" data-linenumber="283">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="263">
+ <li class="never" data-hits="" data-linenumber="284">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="264">
+ <li class="covered" data-hits="2" data-linenumber="285">
<span class="hits">2</span>
<code class="ruby"> context 'a valid URI that fails on HEAD and succeeds on GET', vcr: { cassette_name: '404+200' } do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="265">
+ <li class="covered" data-hits="2" data-linenumber="286">
<span class="hits">2</span>
<code class="ruby"> it 'succeeds' do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="266">
+ <li class="covered" data-hits="2" data-linenumber="287">
<span class="hits">2</span>
<code class="ruby"> expect(result.success?).to be true</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="267">
+ <li class="covered" data-hits="2" data-linenumber="288">
<span class="hits">2</span>
<code class="ruby"> expect(result.error?).to be false</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="268">
+ <li class="covered" data-hits="2" data-linenumber="289">
<span class="hits">2</span>
<code class="ruby"> expect(result.failure?).to be false</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="269">
+ <li class="covered" data-hits="2" data-linenumber="290">
<span class="hits">2</span>
<code class="ruby"> expect(result.uri).to eq URI(url)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="270">
+ <li class="covered" data-hits="2" data-linenumber="291">
<span class="hits">2</span>
<code class="ruby"> expect(subject).to have_received(:called!).with(:success, result)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="271">
+ <li class="covered" data-hits="2" data-linenumber="292">
<span class="hits">2</span>
<code class="ruby"> expect(subject).not_to have_received(:called!).with(:failure, result)</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="272">
+ <li class="never" data-hits="" data-linenumber="293">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="273">
+ <li class="never" data-hits="" data-linenumber="294">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="274">
+ <li class="never" data-hits="" data-linenumber="295">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="275">
+ <li class="covered" data-hits="2" data-linenumber="296">
<span class="hits">2</span>
<code class="ruby"> context 'a valid URI that fails both on HEAD and GET', vcr: { cassette_name: '404+404' } do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="276">
+ <li class="covered" data-hits="2" data-linenumber="297">
<span class="hits">2</span>
<code class="ruby"> it 'fails' do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="277">
+ <li class="covered" data-hits="2" data-linenumber="298">
<span class="hits">2</span>
<code class="ruby"> expect(result.success?).to be false</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="278">
+ <li class="covered" data-hits="2" data-linenumber="299">
<span class="hits">2</span>
<code class="ruby"> expect(result.error?).to be false</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="279">
+ <li class="covered" data-hits="2" data-linenumber="300">
<span class="hits">2</span>
<code class="ruby"> expect(result.failure?).to be true</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="280">
+ <li class="covered" data-hits="2" data-linenumber="301">
<span class="hits">2</span>
<code class="ruby"> expect(result.uri).to eq URI(url)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="281">
+ <li class="covered" data-hits="2" data-linenumber="302">
<span class="hits">2</span>
<code class="ruby"> expect(result.response.code.to_i).to eq 404</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="282">
+ <li class="covered" data-hits="2" data-linenumber="303">
<span class="hits">2</span>
<code class="ruby"> expect(subject).to have_received(:called!).with(:failure, result).once</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="283">
+ <li class="never" data-hits="" data-linenumber="304">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="284">
+ <li class="never" data-hits="" data-linenumber="305">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="285">
+ <li class="never" data-hits="" data-linenumber="306">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="286">
+ <li class="covered" data-hits="2" data-linenumber="307">
<span class="hits">2</span>
<code class="ruby"> context 'a retry on 429', vcr: {</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="287">
+ <li class="never" data-hits="" data-linenumber="308">
<code class="ruby"> cassette_name: '429+429+200',</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="288">
+ <li class="never" data-hits="" data-linenumber="309">
<code class="ruby"> match_requests_on: [lambda { |request, recorded_request|</code>
</li>
</div>
<div>
- <li class="covered" data-hits="6" data-linenumber="289">
+ <li class="covered" data-hits="6" data-linenumber="310">
<span class="hits">6</span>
<code class="ruby"> @matched ||= []</code>
</li>
</div>
<div>
- <li class="covered" data-hits="6" data-linenumber="290">
+ <li class="covered" data-hits="6" data-linenumber="311">
<span class="hits">6</span>
<code class="ruby"> if recorded_request.method == request.method && @matched.size + 1 === recorded_request.headers['Index'].first</code>
</li>
</div>
<div>
- <li class="covered" data-hits="6" data-linenumber="291">
+ <li class="covered" data-hits="6" data-linenumber="312">
<span class="hits">6</span>
<code class="ruby"> @matched << recorded_request</code>
</li>
</div>
<div>
- <li class="covered" data-hits="6" data-linenumber="292">
+ <li class="covered" data-hits="6" data-linenumber="313">
<span class="hits">6</span>
<code class="ruby"> true</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="293">
+ <li class="never" data-hits="" data-linenumber="314">
<code class="ruby"> else</code>
</li>
</div>
<div>
- <li class="missed" data-hits="0" data-linenumber="294">
+ <li class="missed" data-hits="0" data-linenumber="315">
<code class="ruby"> false</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="295">
+ <li class="never" data-hits="" data-linenumber="316">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="296">
+ <li class="never" data-hits="" data-linenumber="317">
<code class="ruby"> }]</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="297">
+ <li class="never" data-hits="" data-linenumber="318">
<code class="ruby"> } do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="298">
+ <li class="covered" data-hits="2" data-linenumber="319">
<span class="hits">2</span>
<code class="ruby"> subject do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="299">
+ <li class="covered" data-hits="2" data-linenumber="320">
<span class="hits">2</span>
<code class="ruby"> described_class.new(methods: %w[HEAD GET], retries: 1)</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="300">
+ <li class="never" data-hits="" data-linenumber="321">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="301">
+ <li class="never" data-hits="" data-linenumber="322">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="302">
+ <li class="covered" data-hits="2" data-linenumber="323">
<span class="hits">2</span>
<code class="ruby"> it 'executes HEAD twice, then falls back to GET' do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="303">
+ <li class="covered" data-hits="2" data-linenumber="324">
<span class="hits">2</span>
<code class="ruby"> expect(result.success?).to be true</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="304">
+ <li class="never" data-hits="" data-linenumber="325">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="305">
+ <li class="never" data-hits="" data-linenumber="326">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="306">
+ <li class="never" data-hits="" data-linenumber="327">
<code class="ruby"></code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="307">
+ <li class="covered" data-hits="2" data-linenumber="328">
<span class="hits">2</span>
<code class="ruby"> context 'a redirect on HEAD followed by a 400 error succeeds on GET',</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="308">
+ <li class="never" data-hits="" data-linenumber="329">
<code class="ruby"> vcr: { cassette_name: '301+400+301+200' } do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="309">
+ <li class="covered" data-hits="2" data-linenumber="330">
<span class="hits">2</span>
<code class="ruby"> it 'calls redirect callback' do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="310">
+ <li class="covered" data-hits="2" data-linenumber="331">
<span class="hits">2</span>
<code class="ruby"> expect(result.success?).to be true</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="311">
+ <li class="covered" data-hits="2" data-linenumber="332">
<span class="hits">2</span>
<code class="ruby"> expect(result.failure?).to be false</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="312">
+ <li class="covered" data-hits="2" data-linenumber="333">
<span class="hits">2</span>
<code class="ruby"> expect(result.redirect?).to be false</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="313">
+ <li class="covered" data-hits="2" data-linenumber="334">
<span class="hits">2</span>
<code class="ruby"> expect(subject).to have_received(:called!).with(:redirect, anything).twice</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="314">
+ <li class="covered" data-hits="2" data-linenumber="335">
<span class="hits">2</span>
<code class="ruby"> expect(subject).to have_received(:called!).with(:success, result).once</code>
</li>
</div>
<div>
- <li class="covered" data-hits="2" data-linenumber="315">
+ <li class="covered" data-hits="2" data-linenumber="336">
<span class="hits">2</span>
<code class="ruby"> expect(subject).not_to have_received(:called!).with(:failure, anything)</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="316">
+ <li class="never" data-hits="" data-linenumber="337">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="317">
+ <li class="never" data-hits="" data-linenumber="338">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="318">
+ <li class="never" data-hits="" data-linenumber="339">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="319">
+ <li class="never" data-hits="" data-linenumber="340">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="320">
+ <li class="never" data-hits="" data-linenumber="341">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="321">
+ <li class="never" data-hits="" data-linenumber="342">
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="322">
+ <li class="never" data-hits="" data-linenumber="343">
@@ -13996,23 +14315,23 @@
<div class="source_table" id="8afbf65f225448f2566a3328833594ecb9496b47">
<div class="header">
<h3>spec/support/vcr.rb</h3>
<h4>
- <span class="yellow">
- 85.71%
+ <span class="green">
+ 100.0%
</span>
lines covered
</h4>
<div class="t-line-summary">
- <b>7</b> relevant lines.
- <span class="green"><b>6</b> lines covered</span> and
- <span class="red"><b>1</b> lines missed.</span>
+ <b>8</b> relevant lines.
+ <span class="green"><b>8</b> lines covered</span> and
+ <span class="red"><b>0</b> lines missed.</span>
</div>
</div>
@@ -14096,17 +14415,17 @@
<code class="ruby"> config.cassette_library_dir = 'spec/fixtures'</code>
</li>
</div>
<div>
- <li class="never" data-hits="" data-linenumber="8">
+ <li class="covered" data-hits="1" data-linenumber="8">
+ <span class="hits">1</span>
-
- <code class="ruby"> # config.default_cassette_options = { record: :new_episodes }</code>
+ <code class="ruby"> config.default_cassette_options = { record: :new_episodes }</code>
</li>
</div>
<div>
<li class="covered" data-hits="1" data-linenumber="9">
@@ -14129,13 +14448,13 @@
<code class="ruby"> config.before_record do |i|</code>
</li>
</div>
<div>
- <li class="missed" data-hits="0" data-linenumber="11">
+ <li class="covered" data-hits="4" data-linenumber="11">
+ <span class="hits">4</span>
-
<code class="ruby"> i.response.body.force_encoding('UTF-8')</code>
</li>
@@ -14215,34 +14534,34 @@
<code class="ruby"> before do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="52" data-linenumber="3">
- <span class="hits">52</span>
+ <li class="covered" data-hits="56" data-linenumber="3">
+ <span class="hits">56</span>
<code class="ruby"> allow(subject).to receive(:called!)</code>
</li>
</div>
<div>
- <li class="covered" data-hits="52" data-linenumber="4">
- <span class="hits">52</span>
+ <li class="covered" data-hits="56" data-linenumber="4">
+ <span class="hits">56</span>
<code class="ruby"> subject.on do |event, *data|</code>
</li>
</div>
<div>
- <li class="covered" data-hits="168" data-linenumber="5">
- <span class="hits">168</span>
+ <li class="covered" data-hits="200" data-linenumber="5">
+ <span class="hits">200</span>
<code class="ruby"> subject.called! event, *data</code>
@@ -14259,23 +14578,23 @@
<code class="ruby"> end</code>
</li>
</div>
<div>
- <li class="covered" data-hits="52" data-linenumber="7">
- <span class="hits">52</span>
+ <li class="covered" data-hits="56" data-linenumber="7">
+ <span class="hits">56</span>
<code class="ruby"> subject.on :result do |result|</code>
</li>
</div>
<div>
- <li class="covered" data-hits="88" data-linenumber="8">
- <span class="hits">88</span>
+ <li class="covered" data-hits="104" data-linenumber="8">
+ <span class="hits">104</span>
<code class="ruby"> @result = result</code>
@@ -14325,11 +14644,11 @@
<code class="ruby"> let(:result) do</code>
</li>
</div>
<div>
- <li class="covered" data-hits="50" data-linenumber="13">
- <span class="hits">50</span>
+ <li class="covered" data-hits="54" data-linenumber="13">
+ <span class="hits">54</span>
<code class="ruby"> @result</code>