<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/111401/">http://git.reviewboard.kde.org/r/111401/</a>
     </td>
    </tr>
   </table>
   <br />



 <p>Ship it!</p>



 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">One small issue below, fix that and then push.</pre>
 <br />







<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="http://git.reviewboard.kde.org/r/111401/diff/5/?file=173791#file173791line577" style="color: black; font-weight: bold; text-decoration: underline;">sql/testdata.sql</a>
    <span style="font-weight: normal;">

     (Diff revision 5)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">577</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="k">INSERT</span> <span class="k">INTO</span> <span class="n">ratingAttributes</span> <span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">lowDesc</span><span class="p">,</span> <span class="n">highDesc</span><span class="p">,</span> <span class="n">assetType</span><span class="p">)</span> <span class="k">VALUES</span> <span class="p">(</span><span class="s1">'Usability'</span><span class="p">,</span> <span class="s1">'completely unusable'</span><span class="p">,</span> <span class="s1">'Wonderfully'</span><span class="p">,</span> <span class="n">ct_testing_tagByName</span><span class="p">(</span><span class="s1">'game'</span><span class="p">));</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">578</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="k">INSERT</span> <span class="k">INTO</span> <span class="n">ratingAttributes</span> <span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">lowDesc</span><span class="p">,</span> <span class="n">highDesc</span><span class="p">,</span> <span class="n">assetType</span><span class="p">)</span> <span class="k">VALUES</span> <span class="p">(</span><span class="s1">'funny'</span><span class="p">,</span> <span class="s1">'not funny at all'</span><span class="p">,</span> <span class="s1">'too much funny'</span><span class="p">,</span> <span class="n">ct_testing_tagByName</span><span class="p">(</span><span class="s1">'game'</span><span class="p">));</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">579</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="k">INSERT</span> <span class="k">INTO</span> <span class="n">ratingAttributes</span> <span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">lowDesc</span><span class="p">,</span> <span class="n">highDesc</span><span class="p">,</span> <span class="n">assetType</span><span class="p">)</span> <span class="k">VALUES</span> <span class="p">(</span><span class="s1">'funny'</span><span class="p">,</span> <span class="s1">'not funny at all'</span><span class="p">,</span> <span class="s1">'too much funny'</span><span class="p">,</span> <span class="n">ct_testing_tagByName</span><span class="p">(</span><span class="s1">'book'</span><span class="p">));</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">580</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="k">INSERT</span> <span class="k">INTO</span> <span class="n">ratingAttributes</span> <span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">lowDesc</span><span class="p">,</span> <span class="n">highDesc</span><span class="p">,</span> <span class="n">assetType</span><span class="p">)</span> <span class="k">VALUES</span> <span class="p">(</span><span class="s1">'perfomance'</span><span class="p">,</span> <span class="s1">'laggy'</span><span class="p">,</span> <span class="s1">'super smooth'</span><span class="p">,</span> <span class="n">ct_testing_tagByName</span><span class="p">(</span><span class="s1">'application'</span><span class="p">));</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">581</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">582</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="k">INSERT</span> <span class="k">INTO</span> <span class="n">ratings</span> <span class="p">(</span><span class="n">asset</span><span class="p">,</span> <span class="n">attribute</span><span class="p">,</span> <span class="n">person</span><span class="p">,</span> <span class="n">rating</span><span class="p">)</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">583</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">VALUES</span> <span class="p">(</span><span class="n">ct_testing_assetByName</span><span class="p">(</span><span class="s1">'Poker1'</span><span class="p">),</span> <span class="n">ct_testing_ratingAttributeByName</span><span class="p">(</span><span class="s1">'Usability'</span><span class="p">),</span> <span class="n">ct_testing_personByEmail</span><span class="p">(</span><span class="s1">'aseigo@kde.org'</span><span class="p">),</span> <span class="mi">1</span><span class="p">);</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">584</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="k">INSERT</span> <span class="k">INTO</span> <span class="n">ratings</span> <span class="p">(</span><span class="n">asset</span><span class="p">,</span> <span class="n">attribute</span><span class="p">,</span> <span class="n">person</span><span class="p">,</span> <span class="n">rating</span><span class="p">)</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">585</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">VALUES</span> <span class="p">(</span><span class="n">ct_testing_assetByName</span><span class="p">(</span><span class="s1">'Poker1'</span><span class="p">),</span> <span class="n">ct_testing_ratingAttributeByName</span><span class="p">(</span><span class="s1">'Usability'</span><span class="p">),</span> <span class="n">ct_testing_personByEmail</span><span class="p">(</span><span class="s1">'zack@kde.org'</span><span class="p">),</span> <span class="mi">5</span><span class="p">);</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">586</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="k">INSERT</span> <span class="k">INTO</span> <span class="n">ratings</span> <span class="p">(</span><span class="n">asset</span><span class="p">,</span> <span class="n">attribute</span><span class="p">,</span> <span class="n">person</span><span class="p">,</span> <span class="n">rating</span><span class="p">)</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">587</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">VALUES</span> <span class="p">(</span><span class="n">ct_testing_assetByName</span><span class="p">(</span><span class="s1">'Aquarium'</span><span class="p">),</span> <span class="n">ct_testing_ratingAttributeByName</span><span class="p">(</span><span class="s1">'perfomance'</span><span class="p">),</span> <span class="n">ct_testing_personByEmail</span><span class="p">(</span><span class="s1">'zack@kde.org'</span><span class="p">),</span> <span class="mi">1</span><span class="p">);</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">588</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="k">INSERT</span> <span class="k">INTO</span> <span class="n">ratings</span> <span class="p">(</span><span class="n">asset</span><span class="p">,</span> <span class="n">attribute</span><span class="p">,</span> <span class="n">person</span><span class="p">,</span> <span class="n">rating</span><span class="p">)</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">589</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">VALUES</span> <span class="p">(</span><span class="n">ct_testing_assetByName</span><span class="p">(</span><span class="s1">'Poker2'</span><span class="p">),</span> <span class="n">ct_testing_ratingAttributeByName</span><span class="p">(</span><span class="s1">'funny'</span><span class="p">),</span> <span class="n">ct_testing_personByEmail</span><span class="p">(</span><span class="s1">'aseigo@kde.org'</span><span class="p">),</span> <span class="mi">2</span><span class="p">);</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">590</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="k">INSERT</span> <span class="k">INTO</span> <span class="n">ratings</span> <span class="p">(</span><span class="n">asset</span><span class="p">,</span> <span class="n">attribute</span><span class="p">,</span> <span class="n">person</span><span class="p">,</span> <span class="n">rating</span><span class="p">)</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">591</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">VALUES</span> <span class="p">(</span><span class="n">ct_testing_assetByName</span><span class="p">(</span><span class="s1">'Poker2'</span><span class="p">),</span> <span class="n">ct_testing_ratingAttributeByName</span><span class="p">(</span><span class="s1">'funny'</span><span class="p">),</span> <span class="n">ct_testing_personByEmail</span><span class="p">(</span><span class="s1">'zack@kde.org'</span><span class="p">),</span> <span class="mi">3</span><span class="p">);</span></pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">because you are inserting new values to these tables, you also need to clear the tables first (so `make test_data` produces the *same* results each time)

this should be done earlier in the file where other tables are cleared with delete statements.</pre>
</div>
<br />



<p>- Aaron J.</p>


<br />
<p>On July 26th, 2013, 10:12 a.m. UTC, Giorgos Tsiapaliokas wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Bodega.</div>
<div>By Giorgos Tsiapaliokas.</div>


<p style="color: grey;"><i>Updated July 26, 2013, 10:12 a.m.</i></p>






<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This patch implements the ratings feature in the bodega-server.

I have also attached a screenshot of the apidocs.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">./node_modules/.bin/mocha test/ratings.js --reporter spec
WARNING: Setting up server with no ssl!
Bodega server listening on localhost:3000 in devel mode


  Ratings
    needs to authorize first
      ? authorize correctly. (107ms)
    List Attributes
      ? it should fail because the asset is invalid 
      ? it should succeed 
    Remove asset rate
      ? it should fail because the asset is invalid 
      ? it should succeed 
    Asset Ratings
      ? it should fail because the asset is invalid 
      ? it should succeed 
      ? it should be empty because there are no ratings for the asset 
    Participant
      ? it should succeed 
      ? it should have no ratings 
    Add asset rate
      ? it should fail because the asset is invalid 
      ? it should succeed 


  12 passing (219 ms)
</pre>
  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>server/bodegaDbHelper <span style="color: grey">(ba740cb)</span></li>

 <li>server/doc/bodega.json <span style="color: grey">(59c14e3)</span></li>

 <li>server/lib/bodegadb.js <span style="color: grey">(3be8d81)</span></li>

 <li>server/lib/db/ratings.js <span style="color: grey">(PRE-CREATION)</span></li>

 <li>server/lib/errors.js <span style="color: grey">(356d7c4)</span></li>

 <li>server/routes.js <span style="color: grey">(726fc80)</span></li>

 <li>server/test/ratings.js <span style="color: grey">(PRE-CREATION)</span></li>

 <li>server/test/support/http.js <span style="color: grey">(84a5fee)</span></li>

 <li>sql/core.plsql <span style="color: grey">(7b92784)</span></li>

 <li>sql/ratings.sql <span style="color: grey">(PRE-CREATION)</span></li>

 <li>sql/testdata.sql <span style="color: grey">(dd15d57)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/111401/diff/" style="margin-left: 3em;">View Diff</a></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments </h1>

<ul>

 <li><a href="http://git.reviewboard.kde.org/media/uploaded/files/2013/07/05/bodega-ratings-apidocs.png">bodega-ratings-apidocs.png</a></li>

</ul>





  </td>
 </tr>
</table>








  </div>
 </body>
</html>