fga-gpp-mds/2017.1-Escola-X

View on GitHub
coverage/rcov/app-helpers-sessions_helper_rb.html

Summary

Maintainability
Test Coverage
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
  <head>
    <title>app/helpers/sessions_helper.rb</title>
    <link href="./assets/0.2.3/screen.css" media="all" rel="stylesheet" type="text/css" />
    <link href="./assets/0.2.3/print.css" media="print" rel="stylesheet" type="text/css" />
    <meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
    <script type="text/javascript" src="./assets/0.2.3/rcov.js"></script>
  </head>
  <body>
    <h1>2017.1-escola-x C0 Coverage Information - Simploco - RCov</h1>
    <h2>app/helpers/sessions_helper.rb</h2>

    <div class="report_table_wrapper">
      <table class='report' id='report_table'>
        <thead>
          <tr>
            <th class="left_align">Name</th>
            <th class="right_align">Total Lines</th>
            <th class="right_align">Lines of Code</th>
            <th class="left_align">Total Coverage</th>
            <th class="left_align">Code Coverage</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td class="left_align"><a href="app-helpers-sessions_helper_rb.html">app/helpers/sessions_helper.rb</a></td>
            <td class='right_align'><tt>73</tt></td>
            <td class='right_align'><tt>37</tt></td>
            <td class="left_align"><div class="percent_graph_legend"><tt class=''>61.64%</tt></div>
      <div class="percent_graph">
        <div class="covered" style="width:62px"></div>
        <div class="uncovered" style="width:38px"></div>
      </div></td>
            <td class="left_align"><div class="percent_graph_legend"><tt class=''>24.32%</tt></div>
      <div class="percent_graph">
        <div class="covered" style="width:24px"></div>
        <div class="uncovered" style="width:76px"></div>
      </div></td>
          </tr>
        </tbody>
      </table>
    </div>

    <h3>Key</h3>

    <div class="key"><pre><span class='marked'>Code reported as executed by Ruby looks like this...</span><span class='marked1'>and this: this line is also marked as covered.</span><span class='inferred'>Lines considered as run by rcov, but not reported by Ruby, look like this,</span><span class='inferred1'>and this: these lines were inferred by rcov (using simple heuristics).</span><span class='uncovered'>Finally, here's a line marked as not executed.</span></pre></div>

    <h3>Coverage Details</h3>

    <table class="details">
      <tbody>
        <tr class="marked">
          <td><pre><a name="line2">2</a> module SessionsHelper</pre></td>
        </tr>
        <tr class="marked">
          <td><pre><a name="line3">3</a>   def current_user</pre></td>
        </tr>
        <tr class="uncovered">
          <td><pre><a name="line4">4</a>     if !@current_user.nil?</pre></td>
        </tr>
        <tr class="uncovered">
          <td><pre><a name="line5">5</a>       @current_user = @current_user</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line6">6</a>     else</pre></td>
        </tr>
        <tr class="uncovered">
          <td><pre><a name="line7">7</a>       if ( !(@current_user = Employee.find_by_authorization_token(cookies[:authorization_token])).nil? )</pre></td>
        </tr>
        <tr class="uncovered">
          <td><pre><a name="line8">8</a>         return @current_user</pre></td>
        </tr>
        <tr class="uncovered">
          <td><pre><a name="line9">9</a>       elsif ( !(@current_user = Parent.find_by_authorization_token(cookies[:authorization_token])).nil? )</pre></td>
        </tr>
        <tr class="uncovered">
          <td><pre><a name="line10">10</a>           return @current_user</pre></td>
        </tr>
        <tr class="uncovered">
          <td><pre><a name="line11">11</a>       elsif ( !(@current_user = Alumn.find_by_authorization_token(cookies[:authorization_token])).nil? )</pre></td>
        </tr>
        <tr class="uncovered">
          <td><pre><a name="line12">12</a>         return @current_user</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line13">13</a>       else</pre></td>
        </tr>
        <tr class="uncovered">
          <td><pre><a name="line14">14</a>         @current_user = nil</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line15">15</a>     end</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line16">16</a> end</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line17">17</a>   end</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line18">18</a> </pre></td>
        </tr>
        <tr class="marked">
          <td><pre><a name="line19">19</a>   def logged_in?</pre></td>
        </tr>
        <tr class="uncovered">
          <td><pre><a name="line20">20</a>     if ( current_user.nil? )</pre></td>
        </tr>
        <tr class="uncovered">
          <td><pre><a name="line21">21</a>       raise &#39;Not logged in&#39;</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line22">22</a>     else</pre></td>
        </tr>
        <tr class="uncovered">
          <td><pre><a name="line23">23</a>       !current_user.nil?</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line24">24</a>     end</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line25">25</a>   end</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line26">26</a> </pre></td>
        </tr>
        <tr class="marked">
          <td><pre><a name="line27">27</a>   def is_principal?</pre></td>
        </tr>
        <tr class="uncovered">
          <td><pre><a name="line28">28</a>     if ( (logged_in?) and (current_user.is_a?(Principal)) )</pre></td>
        </tr>
        <tr class="uncovered">
          <td><pre><a name="line29">29</a>       return true</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line30">30</a>     else</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line31">31</a>       # raise &#39;Not principal&#39;</pre></td>
        </tr>
        <tr class="uncovered">
          <td><pre><a name="line32">32</a>       return false</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line33">33</a>     end</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line34">34</a>   end</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line35">35</a> </pre></td>
        </tr>
        <tr class="marked">
          <td><pre><a name="line36">36</a>   def is_alumn?</pre></td>
        </tr>
        <tr class="uncovered">
          <td><pre><a name="line37">37</a>     if ( (logged_in?) and (current_user.is_a?(Alumn)) )</pre></td>
        </tr>
        <tr class="uncovered">
          <td><pre><a name="line38">38</a>       return true</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line39">39</a>     else</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line40">40</a>       # raise &#39;Not alumn&#39;</pre></td>
        </tr>
        <tr class="uncovered">
          <td><pre><a name="line41">41</a>       return false</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line42">42</a>     end</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line43">43</a>   end</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line44">44</a> </pre></td>
        </tr>
        <tr class="marked">
          <td><pre><a name="line45">45</a>   def is_parent?</pre></td>
        </tr>
        <tr class="uncovered">
          <td><pre><a name="line46">46</a>     if ( (logged_in?) and (current_user.is_a?(Parent)))</pre></td>
        </tr>
        <tr class="uncovered">
          <td><pre><a name="line47">47</a>       return true</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line48">48</a>     else</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line49">49</a>       # raise &#39;Not parent&#39;</pre></td>
        </tr>
        <tr class="uncovered">
          <td><pre><a name="line50">50</a>       return false</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line51">51</a>     end</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line52">52</a>   end</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line53">53</a> </pre></td>
        </tr>
        <tr class="marked">
          <td><pre><a name="line54">54</a>   def is_teacher?</pre></td>
        </tr>
        <tr class="uncovered">
          <td><pre><a name="line55">55</a>     if ( (logged_in?) and (current_user.is_a?(Teacher)))</pre></td>
        </tr>
        <tr class="uncovered">
          <td><pre><a name="line56">56</a>       return true</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line57">57</a>     else</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line58">58</a>       # raise &#39;Not teacher&#39;</pre></td>
        </tr>
        <tr class="uncovered">
          <td><pre><a name="line59">59</a>       return false</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line60">60</a>     end</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line61">61</a>   end</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line62">62</a> </pre></td>
        </tr>
        <tr class="marked">
          <td><pre><a name="line63">63</a>   def is_secretary?</pre></td>
        </tr>
        <tr class="uncovered">
          <td><pre><a name="line64">64</a>     if ( (logged_in?) and (current_user.is_a?(Secretary)))</pre></td>
        </tr>
        <tr class="uncovered">
          <td><pre><a name="line65">65</a>       return true</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line66">66</a>     else</pre></td>
        </tr>
        <tr class="uncovered">
          <td><pre><a name="line67">67</a>       return false</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line68">68</a>     end</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line69">69</a>   end</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line70">70</a> </pre></td>
        </tr>
        <tr class="marked">
          <td><pre><a name="line71">71</a>   def is_employee?</pre></td>
        </tr>
        <tr class="uncovered">
          <td><pre><a name="line72">72</a>     return ( is_principal? or is_secretary? or is_teacher? )</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line73">73</a>   end</pre></td>
        </tr>
        <tr class="inferred">
          <td><pre><a name="line74">74</a> end</pre></td>
        </tr>
      </tbody>
    </table>

    <p>Generated on 2017-06-02 19:20:17 -0300 with <a href="https://github.com/fguillen/simplecov-rcov">SimpleCov-RCov 0.2.3</a></p>

  </body>
</html>