[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-active
Subject:    Re: Review Request 112965: add asset/forum/:assetId
From:       "Aaron J. Seigo" <aseigo () kde ! org>
Date:       2013-09-27 21:18:24
Message-ID: 20130927211824.20446.24428 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112965/#review40922
-----------------------------------------------------------


> Probably something is wrong here. It takes 3 seconds

indeed; have you done any profiling to see where the time is being used?


server/lib/db/forum.js
<http://git.reviewboard.kde.org/r/112965/#comment30063>

    externalUrl; incorrect.



server/lib/db/forum.js
<http://git.reviewboard.kde.org/r/112965/#comment30065>

    why push the topics here, just to pull them out again one-by-one later in \
findPost? that seems extremely inefficient.  
    is there any reason why you can't simply fetch the post for the topic right here?



server/lib/db/forum.js
<http://git.reviewboard.kde.org/r/112965/#comment30064>

    why does it error if you run out of items in the array? it seems to me that this \
is a valid result: more posts were requested than exist, but that's not an error



server/lib/db/forum.js
<http://git.reviewboard.kde.org/r/112965/#comment30061>

    externalUrl is wrong; bodega and discourse are not external to each other. this \
will cause the request to exit the local network and come back in through e.g.the \
load ballancer



server/lib/db/forum.js
<http://git.reviewboard.kde.org/r/112965/#comment30060>

    externalUrl is wrong; bodega and discourse are not external to each other. this \
will cause the request to exit the local network and come back in through e.g.the \
load ballancer



server/lib/utils.js
<http://git.reviewboard.kde.org/r/112965/#comment30062>

    this is only used in forum.js, so put it there. util.js is for things that are \
used in more than one place.


- Aaron J. Seigo


On Sept. 27, 2013, 11:05 a.m., Giorgos Tsiapaliokas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112965/
> -----------------------------------------------------------
> 
> (Updated Sept. 27, 2013, 11:05 a.m.)
> 
> 
> Review request for Bodega.
> 
> 
> Description
> -------
> 
> Add a new route which returns the messages from the forum.
> The json looks like this
> 
> {
> "authStatus": true,
> "device": "KDE-1",
> "store": "KDE-1",
> "points": 10000,
> "success": true,
> "topics": [
> {
> "title": "Foo bar linux12342425",
> "message": "<p>foo bar linux123423235235235</p>"
> },
> {
> "title": "Foo bar linux123424566",
> "message": "<p>foo bar linux1234578896666</p>"
> },
> {
> "title": "Foo bar linux1234245",
> "message": "<p>foo bar linux12342245</p>"
> },
> {
> "title": "Foo bar linux1234",
> "message": "<p>foo bar linux1234566</p>"
> },
> {
> "title": "Foo bar ioanna maria 1foo bar ioanna maria 1adsasd",
> "message": "<p>88971238912389()(<em>()DAS</em>()A*(DS()<em>ADS(</em>()ADS908foo bar \
> ioanna maria 1foo bar ioanna maria 1foo bar ioanna maria 1foo bar ioanna maria \
> 1</p>" }
> ]
> }
> 
> 
> Diffs
> -----
> 
> server/doc/bodega.json 4efa14e 
> server/lib/bodegadb.js 6d0c367 
> server/lib/db/forum.js PRE-CREATION 
> server/lib/utils.js e95b6ba 
> server/routes.js f0be1b4 
> server/test/forum.js PRE-CREATION 
> 
> Diff: http://git.reviewboard.kde.org/r/112965/diff/
> 
> 
> Testing
> -------
> 
> $ make test/forum
> ./node_modules/.bin/mocha test/forum.js --reporter spec
> WARNING: Setting up server with no ssl!
> Bodega server listening on localhost:3001 in devel mode
> 
> 
> Forum
> Authorization
> ? succeeds (75ms)
> List Messages
> ? should fail because the asset is invalid 
> ? should succeed (3313ms) <------------------------------------------------------ \
> Probably something is wrong here. It takes 3 seconds and both bodega-server and the \
> forum are in localhost. I did this.timeout(15000) in order to pass the test
> 
> 3 passing (3 seconds)
> 
> 
> Thanks,
> 
> Giorgos Tsiapaliokas
> 
> 


[Attachment #5 (text/html)]

<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/112965/">http://git.reviewboard.kde.org/r/112965/</a>
  </td>
    </tr>
   </table>
   <br />





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">&gt; Probably something \
is wrong here. It takes 3 seconds

indeed; have you done any profiling to see where the time is being used?</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/112965/diff/1/?file=192869#file192869line51" \
style="color: black; font-weight: bold; text-decoration: \
underline;">server/lib/db/forum.js</a>  <span style="font-weight: normal;">

     (Diff revision 1)

    </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">51</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            \
<span class="nx">categoryUrl</span> <span class="o">=</span>  <span \
class="nx">app</span><span class="p">.</span><span class="nx">config</span><span \
class="p">.</span><span class="nx">service</span><span class="p">.</span><span \
class="nx">discourse</span><span class="p">.</span><span \
class="nx">externalUrl</span> <span class="o">+</span> <span \
class="s1">&#39;category/&#39;</span> <span class="o">+</span> <span \
class="nx">url</span><span class="p">.</span><span class="nx">format</span><span \
class="p">(</span><span class="nx">result</span><span class="p">.</span><span \
class="nx">rows</span><span class="p">[</span><span class="mi">0</span><span \
class="p">].</span><span class="nx">categoryname</span><span class="o">+</span> <span \
class="s1">&#39;.json&#39;</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;">externalUrl; incorrect.</pre> </div>
<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/112965/diff/1/?file=192869#file192869line102" \
style="color: black; font-weight: bold; text-decoration: \
underline;">server/lib/db/forum.js</a>  <span style="font-weight: normal;">

     (Diff revision 1)

    </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">102</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">              \
<span class="nx">json</span><span class="p">.</span><span \
class="nx">topics</span><span class="p">.</span><span class="nx">push</span><span \
class="p">(</span><span class="nx">topic</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;">why push \
the topics here, just to pull them out again one-by-one later in findPost? that seems \
extremely inefficient.

is there any reason why you can&#39;t simply fetch the post for the topic right \
here?</pre> </div>
<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/112965/diff/1/?file=192869#file192869line105" \
style="color: black; font-weight: bold; text-decoration: \
underline;">server/lib/db/forum.js</a>  <span style="font-weight: normal;">

     (Diff revision 1)

    </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">105</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">              \
<span class="nx">callback</span><span class="p">(</span><span \
class="nx">err</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;">why does it \
error if you run out of items in the array? it seems to me that this is a valid \
result: more posts were requested than exist, but that&#39;s not an error</pre> \
</div> <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/112965/diff/1/?file=192869#file192869line109" \
style="color: black; font-weight: bold; text-decoration: \
underline;">server/lib/db/forum.js</a>  <span style="font-weight: normal;">

     (Diff revision 1)

    </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">109</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">              \
<span class="p">(</span><span class="nx">app</span><span class="p">.</span><span \
class="nx">config</span><span class="p">.</span><span class="nx">service</span><span \
class="p">.</span><span class="nx">discourse</span><span class="p">.</span><span \
class="nx">externalUrl</span> <span class="o">+</span> <span \
class="nx">info</span><span class="p">.</span><span class="nx">topic_list</span><span \
class="p">.</span><span class="nx">more_topics_url</span><span class="p">)</span> \
<span class="o">:</span> <span class="kc">null</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;">externalUrl \
is wrong; bodega and discourse are not external to each other. this will cause the \
request to exit the local network and come back in through e.g.the load \
ballancer</pre> </div>
<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/112965/diff/1/?file=192869#file192869line128" \
style="color: black; font-weight: bold; text-decoration: \
underline;">server/lib/db/forum.js</a>  <span style="font-weight: normal;">

     (Diff revision 1)

    </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">128</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            \
<span class="kd">var</span> <span class="nx">url</span> <span class="o">=</span> \
<span class="nx">app</span><span class="p">.</span><span \
class="nx">config</span><span class="p">.</span><span class="nx">service</span><span \
class="p">.</span><span class="nx">discourse</span><span class="p">.</span><span \
class="nx">externalUrl</span> <span class="o">+</span> <span \
class="s1">&#39;t/&#39;</span> <span class="o">+</span> <span \
class="nx">topic</span><span class="p">.</span><span class="nx">slug</span> <span \
class="o">+</span> <span class="s1">&#39;/&#39;</span> <span class="o">+</span> <span \
class="nx">topic</span><span class="p">.</span><span class="nx">id</span> <span \
class="o">+</span> <span class="s1">&#39;.json&#39;</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;">externalUrl \
is wrong; bodega and discourse are not external to each other. this will cause the \
request to exit the local network and come back in through e.g.the load \
ballancer</pre> </div>
<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/112965/diff/1/?file=192870#file192870line340" \
style="color: black; font-weight: bold; text-decoration: \
underline;">server/lib/utils.js</a>  <span style="font-weight: normal;">

     (Diff revision 1)

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

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
">function done(err) {</pre></td>

  </tr>
 </tbody>



 
 

 <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">340</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">341</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="nx">module</span><span class="p">.</span><span class="nx">exports</span><span \
class="p">.</span><span class="nx">get</span> <span class="o">=</span> <span \
class="kd">function</span> <span class="nx">get</span><span class="p">(</span><span \
class="nx">url</span><span class="p">,</span> <span class="nx">cb</span><span \
class="p">)</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">342</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="nx">request</span><span class="p">(</span><span class="nx">url</span><span \
class="p">,</span> <span class="kd">function</span> <span class="p">(</span><span \
class="nx">error</span><span class="p">,</span> <span class="nx">response</span><span \
class="p">,</span> <span class="nx">body</span><span class="p">)</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">343</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="k">if</span> <span class="p">(</span><span class="o">!</span><span \
class="nx">error</span> <span class="o">&amp;&amp;</span> <span \
class="nx">response</span><span class="p">.</span><span class="nx">statusCode</span> \
<span class="o">==</span> <span class="mi">200</span><span class="p">)</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">344</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            \
<span class="nx">cb</span><span class="p">(</span><span class="kc">null</span><span \
class="p">,</span> <span class="nx">JSON</span><span class="p">.</span><span \
class="nx">parse</span><span class="p">(</span><span class="nx">body</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">345</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="p">}</span> <span class="k">else</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">346</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            \
<span class="c1">//FIXME</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">347</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            \
<span class="nx">cb</span><span class="p">(</span><span class="nx">error</span><span \
class="p">,</span> <span class="kc">null</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">348</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            \
<span class="nx">console</span><span class="p">.</span><span \
class="nx">log</span><span class="p">(</span><span class="nx">error</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">349</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <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">350</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <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">351</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><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">352</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></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;">this is \
only used in forum.js, so put it there. util.js is for things that are used in more \
than one place.</pre> </div>
<br />



<p>- Aaron J.</p>


<br />
<p>On September 27th, 2013, 11:05 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 Sept. 27, 2013, 11:05 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;">Add a new route which returns the messages from the forum. The json \
looks like this

{
  &quot;authStatus&quot;: true,
  &quot;device&quot;: &quot;KDE-1&quot;,
  &quot;store&quot;: &quot;KDE-1&quot;,
  &quot;points&quot;: 10000,
  &quot;success&quot;: true,
  &quot;topics&quot;: [
    {
      &quot;title&quot;: &quot;Foo bar linux12342425&quot;,
      &quot;message&quot;: &quot;&lt;p&gt;foo bar \
linux123423235235235&lt;/p&gt;&quot;  },
    {
      &quot;title&quot;: &quot;Foo bar linux123424566&quot;,
      &quot;message&quot;: &quot;&lt;p&gt;foo bar linux1234578896666&lt;/p&gt;&quot;
    },
    {
      &quot;title&quot;: &quot;Foo bar linux1234245&quot;,
      &quot;message&quot;: &quot;&lt;p&gt;foo bar linux12342245&lt;/p&gt;&quot;
    },
    {
      &quot;title&quot;: &quot;Foo bar linux1234&quot;,
      &quot;message&quot;: &quot;&lt;p&gt;foo bar linux1234566&lt;/p&gt;&quot;
    },
    {
      &quot;title&quot;: &quot;Foo bar ioanna maria 1foo bar ioanna maria \
1adsasd&quot;,  &quot;message&quot;: \
&quot;&lt;p&gt;88971238912389()(&lt;em&gt;()DAS&lt;/em&gt;()A*(DS()&lt;em&gt;ADS(&lt;/em&gt;()ADS908foo \
bar ioanna maria 1foo bar ioanna maria 1foo bar ioanna maria 1foo bar ioanna maria \
1&lt;/p&gt;&quot;  }
  ]
}</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;">$ make test/forum
./node_modules/.bin/mocha test/forum.js --reporter spec
WARNING: Setting up server with no ssl!
Bodega server listening on localhost:3001 in devel mode


  Forum
    Authorization
      ? succeeds (75ms)
    List Messages
      ? should fail because the asset is invalid 
      ? should succeed (3313ms) \
&lt;------------------------------------------------------ Probably something is \
                wrong here. It takes 3 seconds and both bodega-server and the forum \
                are in localhost.
                                                                                      \
I did this.timeout(15000) in order to pass the test

  3 passing (3 seconds)
</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/doc/bodega.json <span style="color: grey">(4efa14e)</span></li>

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

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

 <li>server/lib/utils.js <span style="color: grey">(e95b6ba)</span></li>

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

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

</ul>

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







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








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



_______________________________________________
Active mailing list
Active@kde.org
https://mail.kde.org/mailman/listinfo/active


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic