coverage/index.html in trusty-cms-2.0.24 vs coverage/index.html in trusty-cms-2.0.25
- old
+ new
@@ -12,31 +12,31 @@
<body>
<div id="loading">
<img src="./assets/0.10.0/loading.gif" alt="loading"/>
</div>
<div id="wrapper" style="display:none;">
- <div class="timestamp">Generated <abbr class="timeago" title="2016-11-01T11:22:57-04:00">2016-11-01T11:22:57-04:00</abbr></div>
+ <div class="timestamp">Generated <abbr class="timeago" title="2016-11-07T15:34:50-05:00">2016-11-07T15:34:50-05: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="yellow">82.89%</span></span>
+ (<span class="covered_percent"><span class="yellow">84.15%</span></span>
covered at
<span class="covered_strength">
<span class="green">
- 15.4
+ 15.78
</span>
</span> hits/line)
</h2>
<a name="AllFiles"></a>
<div>
<b>54</b> files in total.
- <b>1461</b> relevant lines.
- <span class="green"><b>1211</b> lines covered</span> and
- <span class="red"><b>250</b> lines missed </span>
+ <b>1426</b> relevant lines.
+ <span class="green"><b>1200</b> lines covered</span> and
+ <span class="red"><b>226</b> lines missed </span>
</div>
<table class="file_list">
<thead>
<tr>
<th>File</th>
@@ -140,16 +140,16 @@
<td>10.7</td>
</tr>
<tr>
<td class="strong"><a href="#24df5092852a2bbf884d9a6bfe4815b19056ea68" class="src_link" title="app/controllers/application_controller.rb">app/controllers/application_controller.rb</a></td>
- <td class="red strong">78.57 %</td>
- <td>108</td>
- <td>56</td>
- <td>44</td>
- <td>12</td>
- <td>34.9</td>
+ <td class="yellow strong">82.69 %</td>
+ <td>99</td>
+ <td>52</td>
+ <td>43</td>
+ <td>9</td>
+ <td>37.6</td>
</tr>
<tr>
<td class="strong"><a href="#41a9856bd8ee68d9d8cbdb50d567363cd4411956" class="src_link" title="app/controllers/site_controller.rb">app/controllers/site_controller.rb</a></td>
<td class="red strong">53.33 %</td>
@@ -190,26 +190,26 @@
<td>1.0</td>
</tr>
<tr>
<td class="strong"><a href="#352ca55a4f63d046b73dfeec822cb6b55487185d" class="src_link" title="app/helpers/admin/node_helper.rb">app/helpers/admin/node_helper.rb</a></td>
- <td class="red strong">60.71 %</td>
- <td>110</td>
- <td>56</td>
- <td>34</td>
- <td>22</td>
- <td>1.8</td>
+ <td class="red strong">67.39 %</td>
+ <td>90</td>
+ <td>46</td>
+ <td>31</td>
+ <td>15</td>
+ <td>2.2</td>
</tr>
<tr>
<td class="strong"><a href="#07cdad2482cd19a92b6c1e2ed1c9d59c7b7b0a2a" class="src_link" title="app/helpers/admin/pages_helper.rb">app/helpers/admin/pages_helper.rb</a></td>
- <td class="red strong">75.0 %</td>
- <td>29</td>
- <td>16</td>
- <td>12</td>
- <td>4</td>
- <td>3.1</td>
+ <td class="red strong">78.57 %</td>
+ <td>25</td>
+ <td>14</td>
+ <td>11</td>
+ <td>3</td>
+ <td>3.4</td>
</tr>
<tr>
<td class="strong"><a href="#781d9751547430b5f53e45c0a93bbe1399c262fa" class="src_link" title="app/helpers/admin/preferences_helper.rb">app/helpers/admin/preferences_helper.rb</a></td>
<td class="green strong">100.0 %</td>
@@ -270,16 +270,16 @@
<td>1.0</td>
</tr>
<tr>
<td class="strong"><a href="#e8ceba241b247e5465fc091266d42235281b188b" class="src_link" title="app/helpers/application_helper.rb">app/helpers/application_helper.rb</a></td>
- <td class="yellow strong">80.16 %</td>
- <td>239</td>
- <td>126</td>
- <td>101</td>
- <td>25</td>
- <td>36.9</td>
+ <td class="yellow strong">85.84 %</td>
+ <td>213</td>
+ <td>113</td>
+ <td>97</td>
+ <td>16</td>
+ <td>41.1</td>
</tr>
<tr>
<td class="strong"><a href="#a39d78c4fc93191de03915ecd09328b64f41b587" class="src_link" title="app/helpers/site_helper.rb">app/helpers/site_helper.rb</a></td>
<td class="green strong">100.0 %</td>
@@ -310,16 +310,16 @@
<td>4.4</td>
</tr>
<tr>
<td class="strong"><a href="#802c290d3237e413d582c6e3df59d0b1a783c364" class="src_link" title="app/models/page_context.rb">app/models/page_context.rb</a></td>
- <td class="red strong">59.38 %</td>
- <td>53</td>
- <td>32</td>
- <td>19</td>
- <td>13</td>
- <td>5.8</td>
+ <td class="red strong">62.07 %</td>
+ <td>47</td>
+ <td>29</td>
+ <td>18</td>
+ <td>11</td>
+ <td>6.3</td>
</tr>
<tr>
<td class="strong"><a href="#ee99abb95d276df654be743872e18cebe9cd7a76" class="src_link" title="app/models/page_field.rb">app/models/page_field.rb</a></td>
<td class="green strong">100.0 %</td>
@@ -350,16 +350,16 @@
<td>15.5</td>
</tr>
<tr>
<td class="strong"><a href="#a3d0e95dccc6cc402608c949f61537589888f7d7" class="src_link" title="app/models/text_filter.rb">app/models/text_filter.rb</a></td>
- <td class="red strong">63.16 %</td>
- <td>36</td>
- <td>19</td>
- <td>12</td>
- <td>7</td>
- <td>0.6</td>
+ <td class="red strong">68.75 %</td>
+ <td>31</td>
+ <td>16</td>
+ <td>11</td>
+ <td>5</td>
+ <td>0.7</td>
</tr>
<tr>
<td class="strong"><a href="#3245bdc6bf68c4799ba1a1df23d11fe7c154286c" class="src_link" title="app/models/user.rb">app/models/user.rb</a></td>
<td class="yellow strong">82.69 %</td>
@@ -375,11 +375,11 @@
<td class="green strong">100.0 %</td>
<td>25</td>
<td>14</td>
<td>14</td>
<td>0</td>
- <td>24.1</td>
+ <td>24.3</td>
</tr>
<tr>
<td class="strong"><a href="#d68b3b291e170af9809ca2750a36de47a6d1f510" class="src_link" title="lib/login_system.rb">lib/login_system.rb</a></td>
<td class="red strong">78.95 %</td>
@@ -4087,15 +4087,15 @@
</div>
<div class="source_table" id="24df5092852a2bbf884d9a6bfe4815b19056ea68">
<div class="header">
<h3>app/controllers/application_controller.rb</h3>
- <h4><span class="red">78.57 %</span> covered</h4>
+ <h4><span class="yellow">82.69 %</span> covered</h4>
<div>
- <b>56</b> relevant lines.
- <span class="green"><b>44</b> lines covered</span> and
- <span class="red"><b>12</b> lines missed.</span>
+ <b>52</b> relevant lines.
+ <span class="green"><b>43</b> lines covered</span> and
+ <span class="red"><b>9</b> lines missed.</span>
</div>
</div>
<pre>
<ol>
@@ -4365,386 +4365,332 @@
</li>
<li class="covered" data-hits="1" data-linenumber="45">
<span class="hits">1</span>
- <code class="ruby"> def rescue_action_in_public(exception)</code>
- </li>
-
- <li class="missed" data-hits="0" data-linenumber="46">
-
-
- <code class="ruby"> case exception</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="47">
-
-
- <code class="ruby"> when ActiveRecord::RecordNotFound, ActionController::UnknownController, ActionController::UnknownAction, ActionController::RoutingError</code>
- </li>
-
- <li class="missed" data-hits="0" data-linenumber="48">
-
-
- <code class="ruby"> render :template => "site/not_found", :status => 404</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="49">
-
-
- <code class="ruby"> else</code>
- </li>
-
- <li class="missed" data-hits="0" data-linenumber="50">
-
-
- <code class="ruby"> super</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="51">
-
-
- <code class="ruby"> end</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="52">
-
-
- <code class="ruby"> end</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="53">
-
-
- <code class="ruby"></code>
- </li>
-
- <li class="covered" data-hits="1" data-linenumber="54">
- <span class="hits">1</span>
-
<code class="ruby"> private</code>
</li>
- <li class="never" data-hits="" data-linenumber="55">
+ <li class="never" data-hits="" data-linenumber="46">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="56">
+ <li class="covered" data-hits="1" data-linenumber="47">
<span class="hits">1</span>
<code class="ruby"> def set_mailer</code>
</li>
- <li class="covered" data-hits="151" data-linenumber="57">
+ <li class="covered" data-hits="151" data-linenumber="48">
<span class="hits">151</span>
<code class="ruby"> ActionMailer::Base.default_url_options[:host] = request.host_with_port</code>
</li>
- <li class="never" data-hits="" data-linenumber="58">
+ <li class="never" data-hits="" data-linenumber="49">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="59">
+ <li class="never" data-hits="" data-linenumber="50">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="60">
+ <li class="covered" data-hits="1" data-linenumber="51">
<span class="hits">1</span>
<code class="ruby"> def set_current_user</code>
</li>
- <li class="covered" data-hits="151" data-linenumber="61">
+ <li class="covered" data-hits="151" data-linenumber="52">
<span class="hits">151</span>
<code class="ruby"> UserActionObserver.instance.current_user = current_user</code>
</li>
- <li class="never" data-hits="" data-linenumber="62">
+ <li class="never" data-hits="" data-linenumber="53">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="63">
+ <li class="never" data-hits="" data-linenumber="54">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="64">
+ <li class="covered" data-hits="1" data-linenumber="55">
<span class="hits">1</span>
<code class="ruby"> def set_user_locale</code>
</li>
- <li class="covered" data-hits="151" data-linenumber="65">
+ <li class="covered" data-hits="151" data-linenumber="56">
<span class="hits">151</span>
<code class="ruby"> I18n.locale = current_user && !current_user.locale.blank? ? current_user.locale : TrustyCms::Config['default_locale']</code>
</li>
- <li class="never" data-hits="" data-linenumber="66">
+ <li class="never" data-hits="" data-linenumber="57">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="67">
+ <li class="never" data-hits="" data-linenumber="58">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="68">
+ <li class="covered" data-hits="1" data-linenumber="59">
<span class="hits">1</span>
<code class="ruby"> def set_timezone</code>
</li>
- <li class="covered" data-hits="153" data-linenumber="69">
+ <li class="covered" data-hits="153" data-linenumber="60">
<span class="hits">153</span>
<code class="ruby"> Time.zone = TrustyCms::Config['local.timezone'] != nil && TrustyCms::Config['local.timezone'].empty? ? Time.zone_default : TrustyCms::Config['local.timezone']</code>
</li>
- <li class="never" data-hits="" data-linenumber="70">
+ <li class="never" data-hits="" data-linenumber="61">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="71">
+ <li class="never" data-hits="" data-linenumber="62">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="72">
+ <li class="covered" data-hits="1" data-linenumber="63">
<span class="hits">1</span>
<code class="ruby"> def set_javascripts_and_stylesheets</code>
</li>
- <li class="covered" data-hits="152" data-linenumber="73">
+ <li class="covered" data-hits="152" data-linenumber="64">
<span class="hits">152</span>
<code class="ruby"> @stylesheets ||= []</code>
</li>
- <li class="covered" data-hits="152" data-linenumber="74">
+ <li class="covered" data-hits="152" data-linenumber="65">
<span class="hits">152</span>
<code class="ruby"> @stylesheets.concat %w(admin/main)</code>
</li>
- <li class="covered" data-hits="152" data-linenumber="75">
+ <li class="covered" data-hits="152" data-linenumber="66">
<span class="hits">152</span>
<code class="ruby"> @javascripts ||= []</code>
</li>
- <li class="never" data-hits="" data-linenumber="76">
+ <li class="never" data-hits="" data-linenumber="67">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="77">
+ <li class="never" data-hits="" data-linenumber="68">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="78">
+ <li class="covered" data-hits="1" data-linenumber="69">
<span class="hits">1</span>
<code class="ruby"> def set_standard_body_style</code>
</li>
- <li class="covered" data-hits="15" data-linenumber="79">
+ <li class="covered" data-hits="15" data-linenumber="70">
<span class="hits">15</span>
<code class="ruby"> @body_classes ||= []</code>
</li>
- <li class="covered" data-hits="15" data-linenumber="80">
+ <li class="covered" data-hits="15" data-linenumber="71">
<span class="hits">15</span>
<code class="ruby"> @body_classes.concat(%w(reversed))</code>
</li>
- <li class="never" data-hits="" data-linenumber="81">
+ <li class="never" data-hits="" data-linenumber="72">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="82">
+ <li class="never" data-hits="" data-linenumber="73">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="83">
+ <li class="never" data-hits="" data-linenumber="74">
<code class="ruby"> # When using TrustyCms with Ruby 1.9, the strings that come in from forms are ASCII-8BIT encoded.</code>
</li>
- <li class="never" data-hits="" data-linenumber="84">
+ <li class="never" data-hits="" data-linenumber="75">
<code class="ruby"> # That causes problems, especially when using special chars and with certain DBs, like DB2</code>
</li>
- <li class="never" data-hits="" data-linenumber="85">
+ <li class="never" data-hits="" data-linenumber="76">
<code class="ruby"> # That's why we force the encoding of the params to UTF-8</code>
</li>
- <li class="never" data-hits="" data-linenumber="86">
+ <li class="never" data-hits="" data-linenumber="77">
<code class="ruby"> # That's what's happening in Rails 3, too: https://github.com/rails/rails/commit/25215d7285db10e2c04d903f251b791342e4dd6a</code>
</li>
- <li class="never" data-hits="" data-linenumber="87">
+ <li class="never" data-hits="" data-linenumber="78">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="88">
+ <li class="never" data-hits="" data-linenumber="79">
<code class="ruby"> # See http://stackoverflow.com/questions/8268778/rails-2-3-9-encoding-of-query-parameters</code>
</li>
- <li class="never" data-hits="" data-linenumber="89">
+ <li class="never" data-hits="" data-linenumber="80">
<code class="ruby"> # See https://rails.lighthouseapp.com/projects/8994/tickets/4807</code>
</li>
- <li class="never" data-hits="" data-linenumber="90">
+ <li class="never" data-hits="" data-linenumber="81">
<code class="ruby"> # See http://jasoncodes.com/posts/ruby19-rails2-encodings (thanks for the following code, Jason!)</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="91">
+ <li class="covered" data-hits="1" data-linenumber="82">
<span class="hits">1</span>
<code class="ruby"> def force_utf8_params</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="92">
+ <li class="missed" data-hits="0" data-linenumber="83">
<code class="ruby"> traverse = lambda do |object, block|</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="93">
+ <li class="missed" data-hits="0" data-linenumber="84">
<code class="ruby"> if object.kind_of?(Hash)</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="94">
+ <li class="missed" data-hits="0" data-linenumber="85">
<code class="ruby"> object.each_value { |o| traverse.call(o, block) }</code>
</li>
- <li class="never" data-hits="" data-linenumber="95">
+ <li class="never" data-hits="" data-linenumber="86">
<code class="ruby"> elsif object.kind_of?(Array)</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="96">
+ <li class="missed" data-hits="0" data-linenumber="87">
<code class="ruby"> object.each { |o| traverse.call(o, block) }</code>
</li>
- <li class="never" data-hits="" data-linenumber="97">
+ <li class="never" data-hits="" data-linenumber="88">
<code class="ruby"> else</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="98">
+ <li class="missed" data-hits="0" data-linenumber="89">
<code class="ruby"> block.call(object)</code>
</li>
- <li class="never" data-hits="" data-linenumber="99">
+ <li class="never" data-hits="" data-linenumber="90">
<code class="ruby"> end</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="100">
+ <li class="missed" data-hits="0" data-linenumber="91">
<code class="ruby"> object</code>
</li>
- <li class="never" data-hits="" data-linenumber="101">
+ <li class="never" data-hits="" data-linenumber="92">
<code class="ruby"> end</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="102">
+ <li class="missed" data-hits="0" data-linenumber="93">
<code class="ruby"> force_encoding = lambda do |o|</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="103">
+ <li class="missed" data-hits="0" data-linenumber="94">
<code class="ruby"> o.force_encoding(Encoding::UTF_8) if o.respond_to?(:force_encoding)</code>
</li>
- <li class="never" data-hits="" data-linenumber="104">
+ <li class="never" data-hits="" data-linenumber="95">
<code class="ruby"> end</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="105">
+ <li class="missed" data-hits="0" data-linenumber="96">
<code class="ruby"> traverse.call(params, force_encoding)</code>
</li>
- <li class="never" data-hits="" data-linenumber="106">
+ <li class="never" data-hits="" data-linenumber="97">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="107">
+ <li class="never" data-hits="" data-linenumber="98">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="108">
+ <li class="never" data-hits="" data-linenumber="99">
<code class="ruby">end</code>
</li>
@@ -5965,15 +5911,15 @@
</div>
<div class="source_table" id="352ca55a4f63d046b73dfeec822cb6b55487185d">
<div class="header">
<h3>app/helpers/admin/node_helper.rb</h3>
- <h4><span class="red">60.71 %</span> covered</h4>
+ <h4><span class="red">67.39 %</span> covered</h4>
<div>
- <b>56</b> relevant lines.
- <span class="green"><b>34</b> lines covered</span> and
- <span class="red"><b>22</b> lines missed.</span>
+ <b>46</b> relevant lines.
+ <span class="green"><b>31</b> lines covered</span> and
+ <span class="red"><b>15</b> lines missed.</span>
</div>
</div>
<pre>
<ol>
@@ -6309,332 +6255,212 @@
</li>
<li class="covered" data-hits="1" data-linenumber="56">
<span class="hits">1</span>
- <code class="ruby"> def padding_left(level)</code>
+ <code class="ruby"> def expander(level)</code>
</li>
<li class="missed" data-hits="0" data-linenumber="57">
- <code class="ruby"> (level * 23) + 9</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="58">
-
-
- <code class="ruby"> end</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="59">
-
-
- <code class="ruby"></code>
- </li>
-
- <li class="covered" data-hits="1" data-linenumber="60">
- <span class="hits">1</span>
-
- <code class="ruby"> def children_class</code>
- </li>
-
- <li class="missed" data-hits="0" data-linenumber="61">
-
-
- <code class="ruby"> unless @current_node.children.empty?</code>
- </li>
-
- <li class="missed" data-hits="0" data-linenumber="62">
-
-
- <code class="ruby"> if expanded</code>
- </li>
-
- <li class="missed" data-hits="0" data-linenumber="63">
-
-
- <code class="ruby"> " children_visible"</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="64">
-
-
- <code class="ruby"> else</code>
- </li>
-
- <li class="missed" data-hits="0" data-linenumber="65">
-
-
- <code class="ruby"> " children_hidden"</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="66">
-
-
- <code class="ruby"> end</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="67">
-
-
- <code class="ruby"> else</code>
- </li>
-
- <li class="missed" data-hits="0" data-linenumber="68">
-
-
- <code class="ruby"> " no_children"</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="69">
-
-
- <code class="ruby"> end</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="70">
-
-
- <code class="ruby"> end</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="71">
-
-
- <code class="ruby"></code>
- </li>
-
- <li class="covered" data-hits="1" data-linenumber="72">
- <span class="hits">1</span>
-
- <code class="ruby"> def virtual_class</code>
- </li>
-
- <li class="missed" data-hits="0" data-linenumber="73">
-
-
- <code class="ruby"> @current_node.virtual? ? " virtual": ""</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="74">
-
-
- <code class="ruby"> end</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="75">
-
-
- <code class="ruby"></code>
- </li>
-
- <li class="covered" data-hits="1" data-linenumber="76">
- <span class="hits">1</span>
-
- <code class="ruby"> def expander(level)</code>
- </li>
-
- <li class="missed" data-hits="0" data-linenumber="77">
-
-
<code class="ruby"> unless @current_node.children.empty? or level == 0</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="78">
+ <li class="missed" data-hits="0" data-linenumber="58">
<code class="ruby"> image((expanded ? "collapse" : "expand"),</code>
</li>
- <li class="never" data-hits="" data-linenumber="79">
+ <li class="never" data-hits="" data-linenumber="59">
<code class="ruby"> :class => "expander", :alt => 'toggle children',</code>
</li>
- <li class="never" data-hits="" data-linenumber="80">
+ <li class="never" data-hits="" data-linenumber="60">
<code class="ruby"> :title => '')</code>
</li>
- <li class="never" data-hits="" data-linenumber="81">
+ <li class="never" data-hits="" data-linenumber="61">
<code class="ruby"> else</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="82">
+ <li class="missed" data-hits="0" data-linenumber="62">
<code class="ruby"> ""</code>
</li>
- <li class="never" data-hits="" data-linenumber="83">
+ <li class="never" data-hits="" data-linenumber="63">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="84">
+ <li class="never" data-hits="" data-linenumber="64">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="85">
+ <li class="never" data-hits="" data-linenumber="65">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="86">
+ <li class="covered" data-hits="1" data-linenumber="66">
<span class="hits">1</span>
<code class="ruby"> def icon</code>
</li>
- <li class="covered" data-hits="5" data-linenumber="87">
+ <li class="covered" data-hits="5" data-linenumber="67">
<span class="hits">5</span>
<code class="ruby"> icon_name = @current_node.virtual? ? 'virtual_page' : 'page'</code>
</li>
- <li class="covered" data-hits="5" data-linenumber="88">
+ <li class="covered" data-hits="5" data-linenumber="68">
<span class="hits">5</span>
<code class="ruby"> image(icon_name, :class => "icon", :alt => '', :title => '')</code>
</li>
- <li class="never" data-hits="" data-linenumber="89">
+ <li class="never" data-hits="" data-linenumber="69">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="90">
+ <li class="never" data-hits="" data-linenumber="70">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="91">
+ <li class="covered" data-hits="1" data-linenumber="71">
<span class="hits">1</span>
<code class="ruby"> def node_title</code>
</li>
- <li class="covered" data-hits="5" data-linenumber="92">
+ <li class="covered" data-hits="5" data-linenumber="72">
<span class="hits">5</span>
<code class="ruby"> %{<span class="title">#{ h(@current_node.title) }</span>}.html_safe</code>
</li>
- <li class="never" data-hits="" data-linenumber="93">
+ <li class="never" data-hits="" data-linenumber="73">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="94">
+ <li class="never" data-hits="" data-linenumber="74">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="95">
+ <li class="covered" data-hits="1" data-linenumber="75">
<span class="hits">1</span>
<code class="ruby"> def page_type</code>
</li>
- <li class="covered" data-hits="4" data-linenumber="96">
+ <li class="covered" data-hits="4" data-linenumber="76">
<span class="hits">4</span>
<code class="ruby"> display_name = @current_node.class.display_name</code>
</li>
- <li class="covered" data-hits="4" data-linenumber="97">
+ <li class="covered" data-hits="4" data-linenumber="77">
<span class="hits">4</span>
<code class="ruby"> if display_name == 'Page'</code>
</li>
- <li class="covered" data-hits="4" data-linenumber="98">
+ <li class="covered" data-hits="4" data-linenumber="78">
<span class="hits">4</span>
<code class="ruby"> ""</code>
</li>
- <li class="never" data-hits="" data-linenumber="99">
+ <li class="never" data-hits="" data-linenumber="79">
<code class="ruby"> else</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="100">
+ <li class="missed" data-hits="0" data-linenumber="80">
<code class="ruby"> %{<span class="info">(#{ h(display_name) })</span>}.html_safe</code>
</li>
- <li class="never" data-hits="" data-linenumber="101">
+ <li class="never" data-hits="" data-linenumber="81">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="102">
+ <li class="never" data-hits="" data-linenumber="82">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="103">
+ <li class="never" data-hits="" data-linenumber="83">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="104">
+ <li class="covered" data-hits="1" data-linenumber="84">
<span class="hits">1</span>
<code class="ruby"> def spinner</code>
</li>
- <li class="covered" data-hits="4" data-linenumber="105">
+ <li class="covered" data-hits="4" data-linenumber="85">
<span class="hits">4</span>
<code class="ruby"> image('spinner.gif',</code>
</li>
- <li class="never" data-hits="" data-linenumber="106">
+ <li class="never" data-hits="" data-linenumber="86">
<code class="ruby"> :class => 'busy', :id => "busy_#{@current_node.id}",</code>
</li>
- <li class="never" data-hits="" data-linenumber="107">
+ <li class="never" data-hits="" data-linenumber="87">
<code class="ruby"> :alt => "", :title => "",</code>
</li>
- <li class="never" data-hits="" data-linenumber="108">
+ <li class="never" data-hits="" data-linenumber="88">
<code class="ruby"> :style => 'display: none;')</code>
</li>
- <li class="never" data-hits="" data-linenumber="109">
+ <li class="never" data-hits="" data-linenumber="89">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="110">
+ <li class="never" data-hits="" data-linenumber="90">
<code class="ruby">end</code>
</li>
@@ -6643,15 +6469,15 @@
</div>
<div class="source_table" id="07cdad2482cd19a92b6c1e2ed1c9d59c7b7b0a2a">
<div class="header">
<h3>app/helpers/admin/pages_helper.rb</h3>
- <h4><span class="red">75.0 %</span> covered</h4>
+ <h4><span class="red">78.57 %</span> covered</h4>
<div>
- <b>16</b> relevant lines.
- <span class="green"><b>12</b> lines covered</span> and
- <span class="red"><b>4</b> lines missed.</span>
+ <b>14</b> relevant lines.
+ <span class="green"><b>11</b> lines covered</span> and
+ <span class="red"><b>3</b> lines missed.</span>
</div>
</div>
<pre>
<ol>
@@ -6753,80 +6579,56 @@
</li>
<li class="covered" data-hits="1" data-linenumber="17">
<span class="hits">1</span>
- <code class="ruby"> def default_filter_name</code>
- </li>
-
- <li class="missed" data-hits="0" data-linenumber="18">
-
-
- <code class="ruby"> @page.parts.empty? ? "" : @page.parts[0].filter_id</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="19">
-
-
- <code class="ruby"> end</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="20">
-
-
- <code class="ruby"></code>
- </li>
-
- <li class="covered" data-hits="1" data-linenumber="21">
- <span class="hits">1</span>
-
<code class="ruby"> def status_to_display</code>
</li>
- <li class="covered" data-hits="5" data-linenumber="22">
+ <li class="covered" data-hits="5" data-linenumber="18">
<span class="hits">5</span>
<code class="ruby"> @page.status_id = 100 if @page.status_id == 90</code>
</li>
- <li class="covered" data-hits="25" data-linenumber="23">
+ <li class="covered" data-hits="25" data-linenumber="19">
<span class="hits">25</span>
<code class="ruby"> @display_status = Status.selectable.map{ |s| [I18n.translate(s.name.downcase), s.id] }</code>
</li>
- <li class="never" data-hits="" data-linenumber="24">
+ <li class="never" data-hits="" data-linenumber="20">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="25">
+ <li class="never" data-hits="" data-linenumber="21">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="26">
+ <li class="covered" data-hits="1" data-linenumber="22">
<span class="hits">1</span>
<code class="ruby"> def clean_page_description(page)</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="27">
+ <li class="missed" data-hits="0" data-linenumber="23">
<code class="ruby"> page.description.to_s.strip.gsub(/\t/,'').gsub(/\s+/,' ')</code>
</li>
- <li class="never" data-hits="" data-linenumber="28">
+ <li class="never" data-hits="" data-linenumber="24">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="29">
+ <li class="never" data-hits="" data-linenumber="25">
<code class="ruby">end</code>
</li>
@@ -7483,15 +7285,15 @@
</div>
<div class="source_table" id="e8ceba241b247e5465fc091266d42235281b188b">
<div class="header">
<h3>app/helpers/application_helper.rb</h3>
- <h4><span class="yellow">80.16 %</span> covered</h4>
+ <h4><span class="yellow">85.84 %</span> covered</h4>
<div>
- <b>126</b> relevant lines.
- <span class="green"><b>101</b> lines covered</span> and
- <span class="red"><b>25</b> lines missed.</span>
+ <b>113</b> relevant lines.
+ <span class="green"><b>97</b> lines covered</span> and
+ <span class="red"><b>16</b> lines missed.</span>
</div>
</div>
<pre>
<ol>
@@ -7929,1004 +7731,848 @@
</li>
<li class="covered" data-hits="1" data-linenumber="73">
<span class="hits">1</span>
- <code class="ruby"> def nav_link_to(name, options)</code>
- </li>
-
- <li class="missed" data-hits="0" data-linenumber="74">
-
-
- <code class="ruby"> if current_url?(options)</code>
- </li>
-
- <li class="missed" data-hits="0" data-linenumber="75">
-
-
- <code class="ruby"> %{<strong>#{ link_to translate_with_default(name), options }</strong>}</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="76">
-
-
- <code class="ruby"> else</code>
- </li>
-
- <li class="missed" data-hits="0" data-linenumber="77">
-
-
- <code class="ruby"> link_to translate_with_default(name), options</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="78">
-
-
- <code class="ruby"> end</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="79">
-
-
- <code class="ruby"> end</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="80">
-
-
- <code class="ruby"></code>
- </li>
-
- <li class="covered" data-hits="1" data-linenumber="81">
- <span class="hits">1</span>
-
<code class="ruby"> def admin?</code>
</li>
- <li class="covered" data-hits="5" data-linenumber="82">
+ <li class="covered" data-hits="5" data-linenumber="74">
<span class="hits">5</span>
<code class="ruby"> current_user and current_user.admin?</code>
</li>
- <li class="never" data-hits="" data-linenumber="83">
+ <li class="never" data-hits="" data-linenumber="75">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="84">
+ <li class="never" data-hits="" data-linenumber="76">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="85">
+ <li class="covered" data-hits="1" data-linenumber="77">
<span class="hits">1</span>
<code class="ruby"> def designer?</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="86">
+ <li class="missed" data-hits="0" data-linenumber="78">
<code class="ruby"> current_user and (current_user.designer? or current_user.admin?)</code>
</li>
- <li class="never" data-hits="" data-linenumber="87">
+ <li class="never" data-hits="" data-linenumber="79">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="88">
+ <li class="never" data-hits="" data-linenumber="80">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="89">
+ <li class="covered" data-hits="1" data-linenumber="81">
<span class="hits">1</span>
<code class="ruby"> def updated_stamp(model)</code>
</li>
- <li class="covered" data-hits="7" data-linenumber="90">
+ <li class="covered" data-hits="7" data-linenumber="82">
<span class="hits">7</span>
<code class="ruby"> unless model.new_record?</code>
</li>
- <li class="covered" data-hits="2" data-linenumber="91">
+ <li class="covered" data-hits="2" data-linenumber="83">
<span class="hits">2</span>
<code class="ruby"> updated_by = (model.updated_by || model.created_by)</code>
</li>
- <li class="covered" data-hits="2" data-linenumber="92">
+ <li class="covered" data-hits="2" data-linenumber="84">
<span class="hits">2</span>
<code class="ruby"> name = updated_by ? updated_by.name : nil</code>
</li>
- <li class="covered" data-hits="2" data-linenumber="93">
+ <li class="covered" data-hits="2" data-linenumber="85">
<span class="hits">2</span>
<code class="ruby"> time = (model.updated_at || model.created_at)</code>
</li>
- <li class="covered" data-hits="2" data-linenumber="94">
+ <li class="covered" data-hits="2" data-linenumber="86">
<span class="hits">2</span>
<code class="ruby"> if name or time</code>
</li>
- <li class="covered" data-hits="2" data-linenumber="95">
+ <li class="covered" data-hits="2" data-linenumber="87">
<span class="hits">2</span>
<code class="ruby"> html = %{<p class="updated_line">#{t('timestamp.last_updated')} }</code>
</li>
- <li class="covered" data-hits="2" data-linenumber="96">
+ <li class="covered" data-hits="2" data-linenumber="88">
<span class="hits">2</span>
<code class="ruby"> html << %{#{t('timestamp.by')} <strong>#{name}</strong> } if name</code>
</li>
- <li class="covered" data-hits="2" data-linenumber="97">
+ <li class="covered" data-hits="2" data-linenumber="89">
<span class="hits">2</span>
<code class="ruby"> html << %{#{t('timestamp.at')} #{timestamp(time)}} if time</code>
</li>
- <li class="covered" data-hits="2" data-linenumber="98">
+ <li class="covered" data-hits="2" data-linenumber="90">
<span class="hits">2</span>
<code class="ruby"> html << %{</p>}</code>
</li>
- <li class="covered" data-hits="2" data-linenumber="99">
+ <li class="covered" data-hits="2" data-linenumber="91">
<span class="hits">2</span>
<code class="ruby"> html.html_safe</code>
</li>
- <li class="never" data-hits="" data-linenumber="100">
+ <li class="never" data-hits="" data-linenumber="92">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="101">
+ <li class="never" data-hits="" data-linenumber="93">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="102">
+ <li class="never" data-hits="" data-linenumber="94">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="103">
+ <li class="never" data-hits="" data-linenumber="95">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="104">
+ <li class="covered" data-hits="1" data-linenumber="96">
<span class="hits">1</span>
<code class="ruby"> def timestamp(time)</code>
</li>
- <li class="never" data-hits="" data-linenumber="105">
+ <li class="never" data-hits="" data-linenumber="97">
<code class="ruby"> # time.strftime("%I:%M %p on %B %e, %Y").sub("AM", 'am').sub("PM", 'pm')</code>
</li>
- <li class="covered" data-hits="2" data-linenumber="106">
+ <li class="covered" data-hits="2" data-linenumber="98">
<span class="hits">2</span>
<code class="ruby"> I18n.localize(time, :format => :timestamp)</code>
</li>
- <li class="never" data-hits="" data-linenumber="107">
+ <li class="never" data-hits="" data-linenumber="99">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="108">
+ <li class="never" data-hits="" data-linenumber="100">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="109">
+ <li class="covered" data-hits="1" data-linenumber="101">
<span class="hits">1</span>
- <code class="ruby"> def meta_visible(symbol)</code>
- </li>
-
- <li class="missed" data-hits="0" data-linenumber="110">
-
-
- <code class="ruby"> v = case symbol</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="111">
-
-
- <code class="ruby"> when :meta_more</code>
- </li>
-
- <li class="missed" data-hits="0" data-linenumber="112">
-
-
- <code class="ruby"> not meta_errors?</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="113">
-
-
- <code class="ruby"> when :meta, :meta_less</code>
- </li>
-
- <li class="missed" data-hits="0" data-linenumber="114">
-
-
- <code class="ruby"> meta_errors?</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="115">
-
-
- <code class="ruby"> end</code>
- </li>
-
- <li class="missed" data-hits="0" data-linenumber="116">
-
-
- <code class="ruby"> v ? {} : {:style => "display: none"}</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="117">
-
-
- <code class="ruby"> end</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="118">
-
-
- <code class="ruby"></code>
- </li>
-
- <li class="covered" data-hits="1" data-linenumber="119">
- <span class="hits">1</span>
-
<code class="ruby"> def meta_errors?</code>
</li>
- <li class="covered" data-hits="4" data-linenumber="120">
+ <li class="covered" data-hits="4" data-linenumber="102">
<span class="hits">4</span>
<code class="ruby"> false</code>
</li>
- <li class="never" data-hits="" data-linenumber="121">
+ <li class="never" data-hits="" data-linenumber="103">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="122">
+ <li class="never" data-hits="" data-linenumber="104">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="123">
+ <li class="covered" data-hits="1" data-linenumber="105">
<span class="hits">1</span>
<code class="ruby"> def meta_label</code>
</li>
- <li class="covered" data-hits="7" data-linenumber="124">
+ <li class="covered" data-hits="7" data-linenumber="106">
<span class="hits">7</span>
<code class="ruby"> meta_errors? ? 'Less' : 'More'</code>
</li>
- <li class="never" data-hits="" data-linenumber="125">
+ <li class="never" data-hits="" data-linenumber="107">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="126">
+ <li class="never" data-hits="" data-linenumber="108">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="127">
+ <li class="covered" data-hits="1" data-linenumber="109">
<span class="hits">1</span>
<code class="ruby"> def image(name, options = {})</code>
</li>
- <li class="covered" data-hits="89" data-linenumber="128">
+ <li class="covered" data-hits="89" data-linenumber="110">
<span class="hits">89</span>
<code class="ruby"> image_tag(append_image_extension("admin/#{name}"), options)</code>
</li>
- <li class="never" data-hits="" data-linenumber="129">
+ <li class="never" data-hits="" data-linenumber="111">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="130">
+ <li class="never" data-hits="" data-linenumber="112">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="131">
+ <li class="covered" data-hits="1" data-linenumber="113">
<span class="hits">1</span>
- <code class="ruby"> def image_submit(name, options = {})</code>
- </li>
-
- <li class="missed" data-hits="0" data-linenumber="132">
-
-
- <code class="ruby"> image_submit_tag(append_image_extension("admin/#{name}"), options)</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="133">
-
-
- <code class="ruby"> end</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="134">
-
-
- <code class="ruby"></code>
- </li>
-
- <li class="covered" data-hits="1" data-linenumber="135">
- <span class="hits">1</span>
-
<code class="ruby"> def admin</code>
</li>
- <li class="covered" data-hits="125" data-linenumber="136">
+ <li class="covered" data-hits="125" data-linenumber="114">
<span class="hits">125</span>
<code class="ruby"> TrustyCms::AdminUI.instance</code>
</li>
- <li class="never" data-hits="" data-linenumber="137">
+ <li class="never" data-hits="" data-linenumber="115">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="138">
+ <li class="never" data-hits="" data-linenumber="116">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="139">
+ <li class="covered" data-hits="1" data-linenumber="117">
<span class="hits">1</span>
- <code class="ruby"> def filter_options_for_select(selected=nil)</code>
- </li>
-
- <li class="missed" data-hits="0" data-linenumber="140">
-
-
- <code class="ruby"> options_for_select([[t('select.none'), '']] + TextFilter.descendants_names, selected)</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="141">
-
-
- <code class="ruby"> end</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="142">
-
-
- <code class="ruby"></code>
- </li>
-
- <li class="covered" data-hits="1" data-linenumber="143">
- <span class="hits">1</span>
-
<code class="ruby"> def body_classes</code>
</li>
- <li class="covered" data-hits="108" data-linenumber="144">
+ <li class="covered" data-hits="108" data-linenumber="118">
<span class="hits">108</span>
<code class="ruby"> @body_classes ||= []</code>
</li>
- <li class="never" data-hits="" data-linenumber="145">
+ <li class="never" data-hits="" data-linenumber="119">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="146">
+ <li class="never" data-hits="" data-linenumber="120">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="147">
+ <li class="covered" data-hits="1" data-linenumber="121">
<span class="hits">1</span>
<code class="ruby"> def nav_tabs</code>
</li>
- <li class="covered" data-hits="49" data-linenumber="148">
+ <li class="covered" data-hits="49" data-linenumber="122">
<span class="hits">49</span>
<code class="ruby"> admin.nav</code>
</li>
- <li class="never" data-hits="" data-linenumber="149">
+ <li class="never" data-hits="" data-linenumber="123">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="150">
+ <li class="never" data-hits="" data-linenumber="124">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="151">
+ <li class="covered" data-hits="1" data-linenumber="125">
<span class="hits">1</span>
<code class="ruby"> def translate_with_default(name)</code>
</li>
- <li class="covered" data-hits="173" data-linenumber="152">
+ <li class="covered" data-hits="173" data-linenumber="126">
<span class="hits">173</span>
<code class="ruby"> t(name.underscore.downcase, :default => name)</code>
</li>
- <li class="never" data-hits="" data-linenumber="153">
+ <li class="never" data-hits="" data-linenumber="127">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="154">
+ <li class="never" data-hits="" data-linenumber="128">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="155">
+ <li class="covered" data-hits="1" data-linenumber="129">
<span class="hits">1</span>
<code class="ruby"> def available_locales_select</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="156">
+ <li class="covered" data-hits="1" data-linenumber="130">
<span class="hits">1</span>
<code class="ruby"> [[t('select.default'),'']] + TrustyCms::AvailableLocales.locales</code>
</li>
- <li class="never" data-hits="" data-linenumber="157">
+ <li class="never" data-hits="" data-linenumber="131">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="158">
+ <li class="never" data-hits="" data-linenumber="132">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="159">
+ <li class="covered" data-hits="1" data-linenumber="133">
<span class="hits">1</span>
<code class="ruby"> def stylesheet_overrides</code>
</li>
- <li class="covered" data-hits="75" data-linenumber="160">
+ <li class="covered" data-hits="75" data-linenumber="134">
<span class="hits">75</span>
<code class="ruby"> overrides = []</code>
</li>
- <li class="covered" data-hits="75" data-linenumber="161">
+ <li class="covered" data-hits="75" data-linenumber="135">
<span class="hits">75</span>
<code class="ruby"> if File.exist?("#{Rails.root}/public/stylesheets/admin/overrides.css") || File.exist?("#{Rails.root}/public/stylesheets/sass/admin/overrides.sass")</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="162">
+ <li class="missed" data-hits="0" data-linenumber="136">
<code class="ruby"> overrides << 'admin/overrides'</code>
</li>
- <li class="never" data-hits="" data-linenumber="163">
+ <li class="never" data-hits="" data-linenumber="137">
<code class="ruby"> end</code>
</li>
- <li class="covered" data-hits="75" data-linenumber="164">
+ <li class="covered" data-hits="75" data-linenumber="138">
<span class="hits">75</span>
<code class="ruby"> overrides</code>
</li>
- <li class="never" data-hits="" data-linenumber="165">
+ <li class="never" data-hits="" data-linenumber="139">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="166">
+ <li class="never" data-hits="" data-linenumber="140">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="167">
+ <li class="covered" data-hits="1" data-linenumber="141">
<span class="hits">1</span>
<code class="ruby"> def javascript_overrides</code>
</li>
- <li class="covered" data-hits="75" data-linenumber="168">
+ <li class="covered" data-hits="75" data-linenumber="142">
<span class="hits">75</span>
<code class="ruby"> overrides = []</code>
</li>
- <li class="covered" data-hits="75" data-linenumber="169">
+ <li class="covered" data-hits="75" data-linenumber="143">
<span class="hits">75</span>
<code class="ruby"> if File.exist?("#{Rails.root}/public/javascripts/admin/overrides.js")</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="170">
+ <li class="missed" data-hits="0" data-linenumber="144">
<code class="ruby"> overrides << 'admin/overrides'</code>
</li>
- <li class="never" data-hits="" data-linenumber="171">
+ <li class="never" data-hits="" data-linenumber="145">
<code class="ruby"> end</code>
</li>
- <li class="covered" data-hits="75" data-linenumber="172">
+ <li class="covered" data-hits="75" data-linenumber="146">
<span class="hits">75</span>
<code class="ruby"> overrides</code>
</li>
- <li class="never" data-hits="" data-linenumber="173">
+ <li class="never" data-hits="" data-linenumber="147">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="174">
+ <li class="never" data-hits="" data-linenumber="148">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="175">
+ <li class="never" data-hits="" data-linenumber="149">
<code class="ruby"> # Returns a Gravatar URL associated with the email parameter.</code>
</li>
- <li class="never" data-hits="" data-linenumber="176">
+ <li class="never" data-hits="" data-linenumber="150">
<code class="ruby"> # See: http://douglasfshearer.com/blog/gravatar-for-ruby-and-ruby-on-rails</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="177">
+ <li class="covered" data-hits="1" data-linenumber="151">
<span class="hits">1</span>
<code class="ruby"> def gravatar_url(email, options={})</code>
</li>
- <li class="never" data-hits="" data-linenumber="178">
+ <li class="never" data-hits="" data-linenumber="152">
<code class="ruby"> # Default to highest rating. Rating can be one of G, PG, R X.</code>
</li>
- <li class="covered" data-hits="6" data-linenumber="179">
+ <li class="covered" data-hits="6" data-linenumber="153">
<span class="hits">6</span>
<code class="ruby"> options[:rating] ||= "G"</code>
</li>
- <li class="never" data-hits="" data-linenumber="180">
+ <li class="never" data-hits="" data-linenumber="154">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="181">
+ <li class="never" data-hits="" data-linenumber="155">
<code class="ruby"> # Default size of the image.</code>
</li>
- <li class="covered" data-hits="6" data-linenumber="182">
+ <li class="covered" data-hits="6" data-linenumber="156">
<span class="hits">6</span>
<code class="ruby"> options[:size] ||= "32px"</code>
</li>
- <li class="never" data-hits="" data-linenumber="183">
+ <li class="never" data-hits="" data-linenumber="157">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="184">
+ <li class="never" data-hits="" data-linenumber="158">
<code class="ruby"> # Default image url to be used when no gravatar is found</code>
</li>
- <li class="never" data-hits="" data-linenumber="185">
+ <li class="never" data-hits="" data-linenumber="159">
<code class="ruby"> # or when an image exceeds the rating parameter.</code>
</li>
- <li class="covered" data-hits="6" data-linenumber="186">
+ <li class="covered" data-hits="6" data-linenumber="160">
<span class="hits">6</span>
<code class="ruby"> local_avatar_url = "/assets/admin/avatar_#{([options[:size].to_i] * 2).join('x')}.png"</code>
</li>
- <li class="covered" data-hits="6" data-linenumber="187">
+ <li class="covered" data-hits="6" data-linenumber="161">
<span class="hits">6</span>
<code class="ruby"> default_avatar_url = "#{request.protocol}#{request.host_with_port}#{ActionController::Base.relative_url_root}#{local_avatar_url}"</code>
</li>
- <li class="covered" data-hits="6" data-linenumber="188">
+ <li class="covered" data-hits="6" data-linenumber="162">
<span class="hits">6</span>
<code class="ruby"> options[:default] ||= default_avatar_url</code>
</li>
- <li class="never" data-hits="" data-linenumber="189">
+ <li class="never" data-hits="" data-linenumber="163">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="6" data-linenumber="190">
+ <li class="covered" data-hits="6" data-linenumber="164">
<span class="hits">6</span>
<code class="ruby"> unless email.blank?</code>
</li>
- <li class="never" data-hits="" data-linenumber="191">
+ <li class="never" data-hits="" data-linenumber="165">
<code class="ruby"> # Build the Gravatar url.</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="192">
+ <li class="missed" data-hits="0" data-linenumber="166">
<code class="ruby"> url = '//gravatar.com/avatar/'</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="193">
+ <li class="missed" data-hits="0" data-linenumber="167">
<code class="ruby"> url << "#{Digest::MD5.new.update(email)}?"</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="194">
+ <li class="missed" data-hits="0" data-linenumber="168">
<code class="ruby"> url << "rating=#{options[:rating]}" if options[:rating]</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="195">
+ <li class="missed" data-hits="0" data-linenumber="169">
<code class="ruby"> url << "&size=#{options[:size]}" if options[:size]</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="196">
+ <li class="missed" data-hits="0" data-linenumber="170">
<code class="ruby"> url << "&default=#{options[:default]}" if options[:default]</code>
</li>
- <li class="never" data-hits="" data-linenumber="197">
+ <li class="never" data-hits="" data-linenumber="171">
<code class="ruby"> # Test the Gravatar url</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="198">
+ <li class="missed" data-hits="0" data-linenumber="172">
<code class="ruby"> require 'open-uri'</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="199">
+ <li class="missed" data-hits="0" data-linenumber="173">
<code class="ruby"> begin; open "http:#{url}", :proxy => true</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="200">
+ <li class="missed" data-hits="0" data-linenumber="174">
<code class="ruby"> rescue; local_avatar_url</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="201">
+ <li class="missed" data-hits="0" data-linenumber="175">
<code class="ruby"> else; url</code>
</li>
- <li class="never" data-hits="" data-linenumber="202">
+ <li class="never" data-hits="" data-linenumber="176">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="203">
+ <li class="never" data-hits="" data-linenumber="177">
<code class="ruby"> else</code>
</li>
- <li class="covered" data-hits="6" data-linenumber="204">
+ <li class="covered" data-hits="6" data-linenumber="178">
<span class="hits">6</span>
<code class="ruby"> local_avatar_url</code>
</li>
- <li class="never" data-hits="" data-linenumber="205">
+ <li class="never" data-hits="" data-linenumber="179">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="206">
+ <li class="never" data-hits="" data-linenumber="180">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="207">
+ <li class="never" data-hits="" data-linenumber="181">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="208">
+ <li class="never" data-hits="" data-linenumber="182">
<code class="ruby"> # returns the usual set of pagination links.</code>
</li>
- <li class="never" data-hits="" data-linenumber="209">
+ <li class="never" data-hits="" data-linenumber="183">
<code class="ruby"> # options are passed through to will_paginate</code>
</li>
- <li class="never" data-hits="" data-linenumber="210">
+ <li class="never" data-hits="" data-linenumber="184">
<code class="ruby"> # and a 'show all' depagination link is added if relevant.</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="211">
+ <li class="covered" data-hits="1" data-linenumber="185">
<span class="hits">1</span>
<code class="ruby"> def pagination_for(list, options={})</code>
</li>
- <li class="covered" data-hits="8" data-linenumber="212">
+ <li class="covered" data-hits="8" data-linenumber="186">
<span class="hits">8</span>
<code class="ruby"> if list.respond_to? :total_pages</code>
</li>
- <li class="covered" data-hits="8" data-linenumber="213">
+ <li class="covered" data-hits="8" data-linenumber="187">
<span class="hits">8</span>
<code class="ruby"> options = {</code>
</li>
- <li class="never" data-hits="" data-linenumber="214">
+ <li class="never" data-hits="" data-linenumber="188">
<code class="ruby"> :max_per_page => @trusty_config['pagination.max_per_page'] || 500,</code>
</li>
- <li class="never" data-hits="" data-linenumber="215">
+ <li class="never" data-hits="" data-linenumber="189">
<code class="ruby"> :depaginate => true</code>
</li>
- <li class="never" data-hits="" data-linenumber="216">
+ <li class="never" data-hits="" data-linenumber="190">
<code class="ruby"> }.merge(options.symbolize_keys)</code>
</li>
- <li class="covered" data-hits="8" data-linenumber="217">
+ <li class="covered" data-hits="8" data-linenumber="191">
<span class="hits">8</span>
<code class="ruby"> depaginate = options.delete(:depaginate) # supply :depaginate => false to omit the 'show all' link</code>
</li>
- <li class="covered" data-hits="8" data-linenumber="218">
+ <li class="covered" data-hits="8" data-linenumber="192">
<span class="hits">8</span>
<code class="ruby"> depagination_limit = options.delete(:max_per_page) # supply :max_per_page => false to include the 'show all' link no matter how large the collection</code>
</li>
- <li class="covered" data-hits="8" data-linenumber="219">
+ <li class="covered" data-hits="8" data-linenumber="193">
<span class="hits">8</span>
<code class="ruby"> html = will_paginate(list, will_paginate_options.merge(options))</code>
</li>
- <li class="covered" data-hits="8" data-linenumber="220">
+ <li class="covered" data-hits="8" data-linenumber="194">
<span class="hits">8</span>
<code class="ruby"> if depaginate && list.total_pages > 1 && (!depagination_limit.blank? || list.total_entries <= depagination_limit.to_i)</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="221">
+ <li class="missed" data-hits="0" data-linenumber="195">
<code class="ruby"> html << content_tag(:div, link_to(t('show_all'), :pp => 'all'), :class => 'depaginate')</code>
</li>
- <li class="never" data-hits="" data-linenumber="222">
+ <li class="never" data-hits="" data-linenumber="196">
<code class="ruby"> elsif depaginate && list.total_entries > depagination_limit.to_i</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="223">
+ <li class="missed" data-hits="0" data-linenumber="197">
<code class="ruby"> html = content_tag(:div, link_to("paginate", :p => 1), :class => 'pagination')</code>
</li>
- <li class="never" data-hits="" data-linenumber="224">
+ <li class="never" data-hits="" data-linenumber="198">
<code class="ruby"> end</code>
</li>
- <li class="covered" data-hits="8" data-linenumber="225">
+ <li class="covered" data-hits="8" data-linenumber="199">
<span class="hits">8</span>
<code class="ruby"> html</code>
</li>
- <li class="never" data-hits="" data-linenumber="226">
+ <li class="never" data-hits="" data-linenumber="200">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="227">
+ <li class="never" data-hits="" data-linenumber="201">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="228">
+ <li class="never" data-hits="" data-linenumber="202">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="229">
+ <li class="covered" data-hits="1" data-linenumber="203">
<span class="hits">1</span>
<code class="ruby"> private</code>
</li>
- <li class="never" data-hits="" data-linenumber="230">
+ <li class="never" data-hits="" data-linenumber="204">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="231">
+ <li class="covered" data-hits="1" data-linenumber="205">
<span class="hits">1</span>
<code class="ruby"> def append_image_extension(name)</code>
</li>
- <li class="covered" data-hits="89" data-linenumber="232">
+ <li class="covered" data-hits="89" data-linenumber="206">
<span class="hits">89</span>
<code class="ruby"> unless name =~ /\.(.*?)$/</code>
</li>
- <li class="covered" data-hits="75" data-linenumber="233">
+ <li class="covered" data-hits="75" data-linenumber="207">
<span class="hits">75</span>
<code class="ruby"> name + '.png'</code>
</li>
- <li class="never" data-hits="" data-linenumber="234">
+ <li class="never" data-hits="" data-linenumber="208">
<code class="ruby"> else</code>
</li>
- <li class="covered" data-hits="14" data-linenumber="235">
+ <li class="covered" data-hits="14" data-linenumber="209">
<span class="hits">14</span>
<code class="ruby"> name</code>
</li>
- <li class="never" data-hits="" data-linenumber="236">
+ <li class="never" data-hits="" data-linenumber="210">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="237">
+ <li class="never" data-hits="" data-linenumber="211">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="238">
+ <li class="never" data-hits="" data-linenumber="212">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="239">
+ <li class="never" data-hits="" data-linenumber="213">
<code class="ruby">end</code>
</li>
@@ -9937,15 +9583,15 @@
</div>
<div class="source_table" id="802c290d3237e413d582c6e3df59d0b1a783c364">
<div class="header">
<h3>app/models/page_context.rb</h3>
- <h4><span class="red">59.38 %</span> covered</h4>
+ <h4><span class="red">62.07 %</span> covered</h4>
<div>
- <b>32</b> relevant lines.
- <span class="green"><b>19</b> lines covered</span> and
- <span class="red"><b>13</b> lines missed.</span>
+ <b>29</b> relevant lines.
+ <span class="green"><b>18</b> lines covered</span> and
+ <span class="red"><b>11</b> lines missed.</span>
</div>
</div>
<pre>
<ol>
@@ -10137,134 +9783,98 @@
</li>
<li class="covered" data-hits="1" data-linenumber="32">
<span class="hits">1</span>
- <code class="ruby"> def tag_missing(name, attributes = {}, &block)</code>
- </li>
-
- <li class="missed" data-hits="0" data-linenumber="33">
-
-
- <code class="ruby"> super</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="34">
-
-
- <code class="ruby"> rescue Radius::UndefinedTagError => e</code>
- </li>
-
- <li class="missed" data-hits="0" data-linenumber="35">
-
-
- <code class="ruby"> raise StandardTags::TagError.new(e.message)</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="36">
-
-
- <code class="ruby"> end</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="37">
-
-
- <code class="ruby"></code>
- </li>
-
- <li class="covered" data-hits="1" data-linenumber="38">
- <span class="hits">1</span>
-
<code class="ruby"> private</code>
</li>
- <li class="never" data-hits="" data-linenumber="39">
+ <li class="never" data-hits="" data-linenumber="33">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="40">
+ <li class="covered" data-hits="1" data-linenumber="34">
<span class="hits">1</span>
<code class="ruby"> def render_error_message(message)</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="41">
+ <li class="missed" data-hits="0" data-linenumber="35">
<code class="ruby"> "<div><strong>#{message}</strong></div>"</code>
</li>
- <li class="never" data-hits="" data-linenumber="42">
+ <li class="never" data-hits="" data-linenumber="36">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="43">
+ <li class="never" data-hits="" data-linenumber="37">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="44">
+ <li class="covered" data-hits="1" data-linenumber="38">
<span class="hits">1</span>
<code class="ruby"> def set_process_variables(page)</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="45">
+ <li class="missed" data-hits="0" data-linenumber="39">
<code class="ruby"> page.request ||= @page.request</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="46">
+ <li class="missed" data-hits="0" data-linenumber="40">
<code class="ruby"> page.response ||= @page.response</code>
</li>
- <li class="never" data-hits="" data-linenumber="47">
+ <li class="never" data-hits="" data-linenumber="41">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="48">
+ <li class="never" data-hits="" data-linenumber="42">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="49">
+ <li class="covered" data-hits="1" data-linenumber="43">
<span class="hits">1</span>
<code class="ruby"> def raise_errors?</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="50">
+ <li class="missed" data-hits="0" data-linenumber="44">
<code class="ruby"> Rails.env != 'production'</code>
</li>
- <li class="never" data-hits="" data-linenumber="51">
+ <li class="never" data-hits="" data-linenumber="45">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="52">
+ <li class="never" data-hits="" data-linenumber="46">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="53">
+ <li class="never" data-hits="" data-linenumber="47">
<code class="ruby">end</code>
</li>
@@ -10717,15 +10327,15 @@
</div>
<div class="source_table" id="a3d0e95dccc6cc402608c949f61537589888f7d7">
<div class="header">
<h3>app/models/text_filter.rb</h3>
- <h4><span class="red">63.16 %</span> covered</h4>
+ <h4><span class="red">68.75 %</span> covered</h4>
<div>
- <b>19</b> relevant lines.
- <span class="green"><b>12</b> lines covered</span> and
- <span class="red"><b>7</b> lines missed.</span>
+ <b>16</b> relevant lines.
+ <span class="green"><b>11</b> lines covered</span> and
+ <span class="red"><b>5</b> lines missed.</span>
</div>
</div>
<pre>
<ol>
@@ -10845,104 +10455,74 @@
</li>
<li class="covered" data-hits="1" data-linenumber="20">
<span class="hits">1</span>
- <code class="ruby"> def description_file(filename)</code>
+ <code class="ruby"> def descendants_names</code>
</li>
<li class="missed" data-hits="0" data-linenumber="21">
- <code class="ruby"> text = File.read(filename) rescue ""</code>
- </li>
-
- <li class="missed" data-hits="0" data-linenumber="22">
-
-
- <code class="ruby"> self.description text</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="23">
-
-
- <code class="ruby"> end</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="24">
-
-
- <code class="ruby"></code>
- </li>
-
- <li class="covered" data-hits="1" data-linenumber="25">
- <span class="hits">1</span>
-
- <code class="ruby"> def descendants_names</code>
- </li>
-
- <li class="missed" data-hits="0" data-linenumber="26">
-
-
<code class="ruby"> descendants.map { |s| s.filter_name }.sort</code>
</li>
- <li class="never" data-hits="" data-linenumber="27">
+ <li class="never" data-hits="" data-linenumber="22">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="28">
+ <li class="never" data-hits="" data-linenumber="23">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="29">
+ <li class="covered" data-hits="1" data-linenumber="24">
<span class="hits">1</span>
<code class="ruby"> def find_descendant(filter_name)</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="30">
+ <li class="missed" data-hits="0" data-linenumber="25">
<code class="ruby"> descendants.each do |s|</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="31">
+ <li class="missed" data-hits="0" data-linenumber="26">
<code class="ruby"> return s if s.filter_name == filter_name</code>
</li>
- <li class="never" data-hits="" data-linenumber="32">
+ <li class="never" data-hits="" data-linenumber="27">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="33">
+ <li class="never" data-hits="" data-linenumber="28">
<code class="ruby"> nil</code>
</li>
- <li class="never" data-hits="" data-linenumber="34">
+ <li class="never" data-hits="" data-linenumber="29">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="35">
+ <li class="never" data-hits="" data-linenumber="30">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="36">
+ <li class="never" data-hits="" data-linenumber="31">
<code class="ruby">end</code>
</li>
@@ -11628,12 +11208,12 @@
<span class="hits">1</span>
<code class="ruby"> def current_user</code>
</li>
- <li class="covered" data-hits="9" data-linenumber="12">
- <span class="hits">9</span>
+ <li class="covered" data-hits="10" data-linenumber="12">
+ <span class="hits">10</span>
<code class="ruby"> self.class.current_user</code>
</li>
<li class="never" data-hits="" data-linenumber="13">
@@ -11646,12 +11226,12 @@
<span class="hits">1</span>
<code class="ruby"> def self.current_user</code>
</li>
- <li class="covered" data-hits="9" data-linenumber="15">
- <span class="hits">9</span>
+ <li class="covered" data-hits="10" data-linenumber="15">
+ <span class="hits">10</span>
<code class="ruby"> Thread.current[:current_user]</code>
</li>
<li class="never" data-hits="" data-linenumber="16">
@@ -11670,12 +11250,12 @@
<span class="hits">1</span>
<code class="ruby"> def before_create(model)</code>
</li>
- <li class="covered" data-hits="7" data-linenumber="19">
- <span class="hits">7</span>
+ <li class="covered" data-hits="8" data-linenumber="19">
+ <span class="hits">8</span>
<code class="ruby"> model.created_by = self.current_user</code>
</li>
<li class="never" data-hits="" data-linenumber="20">
@@ -12453,34 +12033,34 @@
</li>
<li class="never" data-hits="" data-linenumber="121">
- <code class="ruby"> when allowed_roles = permissions[:when]</code>
+ <code class="ruby"> when condition_method = permissions[:if]</code>
</li>
- <li class="covered" data-hits="78" data-linenumber="122">
- <span class="hits">78</span>
+ <li class="missed" data-hits="0" data-linenumber="122">
- <code class="ruby"> allowed_roles = [allowed_roles].flatten</code>
+
+ <code class="ruby"> instance.send(condition_method)</code>
</li>
- <li class="covered" data-hits="218" data-linenumber="123">
- <span class="hits">218</span>
+ <li class="never" data-hits="" data-linenumber="123">
- <code class="ruby"> allowed_roles.any? { |role| user.has_role?(role) }</code>
+
+ <code class="ruby"> when allowed_roles = permissions[:when]</code>
</li>
- <li class="never" data-hits="" data-linenumber="124">
+ <li class="covered" data-hits="78" data-linenumber="124">
+ <span class="hits">78</span>
-
- <code class="ruby"> when condition_method = permissions[:if]</code>
+ <code class="ruby"> allowed_roles = [allowed_roles].flatten</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="125">
+ <li class="covered" data-hits="218" data-linenumber="125">
+ <span class="hits">218</span>
-
- <code class="ruby"> instance.send(condition_method)</code>
+ <code class="ruby"> allowed_roles.any? { |role| user.has_role?(role) }</code>
</li>
<li class="never" data-hits="" data-linenumber="126">