Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added whiskey tests and coverage support

  • Loading branch information...
commit 29b054b1a51c6d2e518f7395d169f5441bfacf40 1 parent 5760f4d
@devdazed devdazed authored
Showing with 8,563 additions and 130 deletions.
  1. +0 −13 test/column_family.js
  2. +41 −0 test/connection.js
  3. +279 −0 test/coverage/column.html
  4. +487 −0 test/coverage/column_family.html
  5. +1,755 −0 test/coverage/connection.html
  6. +372 −0 test/coverage/coverage_html.js
  7. +383 −0 test/coverage/helenus.html
  8. +157 −0 test/coverage/index.html
  9. +166 −0 test/coverage/jquery-1.4.3.min.js
  10. +99 −0 test/coverage/jquery.hotkeys.js
  11. +53 −0 test/coverage/jquery.isonscreen.js
  12. +2 −0  test/coverage/jquery.tablesorter.min.js
  13. BIN  test/coverage/keybd_closed.png
  14. BIN  test/coverage/keybd_open.png
  15. +659 −0 test/coverage/keyspace.html
  16. +583 −0 test/coverage/marshal_deserializers.html
  17. +887 −0 test/coverage/marshal_index.html
  18. +771 −0 test/coverage/marshal_serializers.html
  19. +787 −0 test/coverage/pool.html
  20. +603 −0 test/coverage/row.html
  21. +275 −0 test/coverage/style.css
  22. +135 −0 test/cql.js
  23. +7 −0 test/helpers/connection.json
  24. +14 −0 test/helpers/cql.json
  25. +7 −0 test/helpers/pool.json
  26. +0 −35 test/helpers/system_setup_teardown.js
  27. +0 −54 test/helpers/test_setup_teardown.js
  28. +0 −28 test/keyspace.js
  29. +41 −0 test/pool.js
View
13 test/column_family.js
@@ -1,13 +0,0 @@
-var sutd = require('./helpers/set_up_tear_down');
-
-/**
- * Tests creating the the oclumn family
- */
-exports['test create column family'] = function(test, assert){
- var conn = sutd.connection;
-
- test.finish();
-};
-
-exports.setUp = sutd.setUp;
-exports.tearDown = sutd.tearDown;
View
41 test/connection.js
@@ -0,0 +1,41 @@
+var config = require('./helpers/connection'), Helenus, conn;
+
+var ConnectionTest = {
+ 'setUp':function(test, assert){
+ Helenus = require('helenus');
+ conn = new Helenus.Connection(config);
+ test.finish();
+ },
+
+ 'test connect':function(test, assert){
+ conn.connect(function(err, keyspace){
+ assert.ifError(err);
+ assert.ok(keyspace.definition.name === 'system');
+ test.finish();
+ });
+ },
+
+ 'test createKeyspace':function(test, assert){
+ conn.createKeyspace('helenus_connection_test', function(err){
+ assert.ifError(err);
+ test.finish();
+ });
+ },
+
+ 'test dropKeyspace':function(test, assert){
+ conn.dropKeyspace('helenus_connection_test', function(err){
+ assert.ifError(err);
+ test.finish();
+ });
+ },
+
+ 'test close':function(test, assert){
+ assert.doesNotThrow(function(){ conn.close(); });
+ test.finish();
+ },
+
+ 'tearDown':function(test, assert){
+ test.finish();
+ }
+};
+module.exports = ConnectionTest;
View
279 test/coverage/column.html
@@ -0,0 +1,279 @@
+<!doctype html PUBLIC "-//W3C//DTD html 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
+
+
+ <meta http-equiv='X-UA-Compatible' content='IE=emulateIE7' />
+ <title>Coverage for column.js: 44.44%</title>
+ <link rel='stylesheet' href='style.css' type='text/css'>
+ <script type='text/javascript' src='jquery-1.4.3.min.js'></script>
+ <script type='text/javascript' src='jquery.hotkeys.js'></script>
+ <script type='text/javascript' src='jquery.isonscreen.js'></script>
+ <script type='text/javascript' src='coverage_html.js'></script>
+ <script type='text/javascript' charset='utf-8'>
+ jQuery(document).ready(coverage.pyfile_ready);
+ </script>
+</head>
+<body id='pyfile'>
+
+<div id='header'>
+ <div class='content'>
+ <h1>Coverage for <b>column.js</b> :
+ <span class='pc_cov'>44.44%</span>
+ </h1>
+ <img id='keyboard_icon' src='keybd_closed.png'>
+ <h2 class='stats'>
+ statements
+ <span class=' shortkey_r' onclick='coverage.toggle_lines(this, "run")'>4 hits</span>
+ <span class=' shortkey_m' onclick='coverage.toggle_lines(this, "mis")'>5 missing</span>
+ <span class=' shortkey_x' onclick='coverage.toggle_lines(this, "exc")'>9 lines</span>
+ </h2>
+ </div>
+</div>
+
+<div class='help_panel'>
+ <img id='panel_icon' src='keybd_open.png'>
+ <p class='legend'>Hot-keys on this page</p>
+ <div>
+ <p class='keyhelp'>
+ <span class='key'>r</span>
+ <span class='key'>m</span> &nbsp; toggle line displays
+ </p>
+ <p class='keyhelp'>
+ <span class='key'>j</span>
+ <span class='key'>k</span> &nbsp; next/prev highlighted chunk
+ </p>
+ <p class='keyhelp'>
+ <span class='key'>0</span> &nbsp; (zero) top of page
+ </p>
+ <p class='keyhelp'>
+ <span class='key'>1</span> &nbsp; (one) first highlighted chunk
+ </p>
+ </div>
+</div>
+
+<div id='source'>
+ <table cellspacing='0' cellpadding='0'>
+ <tr>
+ <td class='linenos' valign='top'>
+
+ <p id='n1' class='stm run'><a href='#n1'>1</a></p>
+
+ <p id='n2' class='pln'><a href='#n2'>2</a></p>
+
+ <p id='n3' class='pln'><a href='#n3'>3</a></p>
+
+ <p id='n4' class='pln'><a href='#n4'>4</a></p>
+
+ <p id='n5' class='pln'><a href='#n5'>5</a></p>
+
+ <p id='n6' class='pln'><a href='#n6'>6</a></p>
+
+ <p id='n7' class='pln'><a href='#n7'>7</a></p>
+
+ <p id='n8' class='pln'><a href='#n8'>8</a></p>
+
+ <p id='n9' class='pln'><a href='#n9'>9</a></p>
+
+ <p id='n10' class='pln'><a href='#n10'>10</a></p>
+
+ <p id='n11' class='pln'><a href='#n11'>11</a></p>
+
+ <p id='n12' class='stm run'><a href='#n12'>12</a></p>
+
+ <p id='n13' class='pln'><a href='#n13'>13</a></p>
+
+ <p id='n14' class='pln'><a href='#n14'>14</a></p>
+
+ <p id='n15' class='pln'><a href='#n15'>15</a></p>
+
+ <p id='n16' class='stm mis'><a href='#n16'>16</a></p>
+
+ <p id='n17' class='pln'><a href='#n17'>17</a></p>
+
+ <p id='n18' class='pln'><a href='#n18'>18</a></p>
+
+ <p id='n19' class='pln'><a href='#n19'>19</a></p>
+
+ <p id='n20' class='pln'><a href='#n20'>20</a></p>
+
+ <p id='n21' class='stm mis'><a href='#n21'>21</a></p>
+
+ <p id='n22' class='pln'><a href='#n22'>22</a></p>
+
+ <p id='n23' class='pln'><a href='#n23'>23</a></p>
+
+ <p id='n24' class='pln'><a href='#n24'>24</a></p>
+
+ <p id='n25' class='pln'><a href='#n25'>25</a></p>
+
+ <p id='n26' class='pln'><a href='#n26'>26</a></p>
+
+ <p id='n27' class='stm mis'><a href='#n27'>27</a></p>
+
+ <p id='n28' class='pln'><a href='#n28'>28</a></p>
+
+ <p id='n29' class='pln'><a href='#n29'>29</a></p>
+
+ <p id='n30' class='pln'><a href='#n30'>30</a></p>
+
+ <p id='n31' class='pln'><a href='#n31'>31</a></p>
+
+ <p id='n32' class='stm mis'><a href='#n32'>32</a></p>
+
+ <p id='n33' class='pln'><a href='#n33'>33</a></p>
+
+ <p id='n34' class='pln'><a href='#n34'>34</a></p>
+
+ <p id='n35' class='pln'><a href='#n35'>35</a></p>
+
+ <p id='n36' class='pln'><a href='#n36'>36</a></p>
+
+ <p id='n37' class='pln'><a href='#n37'>37</a></p>
+
+ <p id='n38' class='pln'><a href='#n38'>38</a></p>
+
+ <p id='n39' class='pln'><a href='#n39'>39</a></p>
+
+ <p id='n40' class='pln'><a href='#n40'>40</a></p>
+
+ <p id='n41' class='stm run'><a href='#n41'>41</a></p>
+
+ <p id='n42' class='stm mis'><a href='#n42'>42</a></p>
+
+ <p id='n43' class='pln'><a href='#n43'>43</a></p>
+
+ <p id='n44' class='pln'><a href='#n44'>44</a></p>
+
+ <p id='n45' class='pln'><a href='#n45'>45</a></p>
+
+ <p id='n46' class='pln'><a href='#n46'>46</a></p>
+
+ <p id='n47' class='pln'><a href='#n47'>47</a></p>
+
+ <p id='n48' class='pln'><a href='#n48'>48</a></p>
+
+ <p id='n49' class='pln'><a href='#n49'>49</a></p>
+
+ <p id='n50' class='stm run'><a href='#n50'>50</a></p>
+
+ </td>
+ <td class='text' valign='top'>
+
+ <p id='t1' class='stm run'>var&nbsp;util&nbsp;=&nbsp;require('util'),<span class='strut'>&nbsp;</span></p>
+
+ <p id='t2' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;ttypes&nbsp;=&nbsp;require('./cassandra/1.0/cassandra_types');<span class='strut'>&nbsp;</span></p>
+
+ <p id='t3' class='pln'><span class='strut'>&nbsp;</span></p>
+
+ <p id='t4' class='pln'>/**<span class='strut'>&nbsp;</span></p>
+
+ <p id='t5' class='pln'>&nbsp;*&nbsp;Cassandra&nbsp;Column&nbsp;object&nbsp;representation&nbsp;<span class='strut'>&nbsp;</span></p>
+
+ <p id='t6' class='pln'>&nbsp;*&nbsp;@param&nbsp;{Object}&nbsp;name&nbsp;The&nbsp;name&nbsp;of&nbsp;the&nbsp;column,&nbsp;can&nbsp;be&nbsp;any&nbsp;type,&nbsp;for&nbsp;composites&nbsp;use&nbsp;Array<span class='strut'>&nbsp;</span></p>
+
+ <p id='t7' class='pln'>&nbsp;*&nbsp;@param&nbsp;{Object}&nbsp;value&nbsp;The&nbsp;value&nbsp;of&nbsp;the&nbsp;column<span class='strut'>&nbsp;</span></p>
+
+ <p id='t8' class='pln'>&nbsp;*&nbsp;@param&nbsp;{Date}&nbsp;timestamp&nbsp;The&nbsp;timestamp&nbsp;of&nbsp;the&nbsp;value<span class='strut'>&nbsp;</span></p>
+
+ <p id='t9' class='pln'>&nbsp;*&nbsp;@param&nbsp;{Number}&nbsp;ttl&nbsp;The&nbsp;ttl&nbsp;for&nbsp;the&nbsp;column<span class='strut'>&nbsp;</span></p>
+
+ <p id='t10' class='pln'>&nbsp;*&nbsp;@constructor<span class='strut'>&nbsp;</span></p>
+
+ <p id='t11' class='pln'>&nbsp;*/&nbsp;&nbsp;&nbsp;&nbsp;<span class='strut'>&nbsp;</span></p>
+
+ <p id='t12' class='stm run'>var&nbsp;Column&nbsp;=&nbsp;function(name,&nbsp;value,&nbsp;timestamp,&nbsp;ttl){<span class='strut'>&nbsp;</span></p>
+
+ <p id='t13' class='pln'>&nbsp;&nbsp;/**<span class='strut'>&nbsp;</span></p>
+
+ <p id='t14' class='pln'>&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;name&nbsp;of&nbsp;the&nbsp;column,&nbsp;can&nbsp;be&nbsp;any&nbsp;type,&nbsp;for&nbsp;composites&nbsp;use&nbsp;Array<span class='strut'>&nbsp;</span></p>
+
+ <p id='t15' class='pln'>&nbsp;&nbsp;&nbsp;*/<span class='strut'>&nbsp;</span></p>
+
+ <p id='t16' class='stm mis'>&nbsp;&nbsp;this.name&nbsp;=&nbsp;name;<span class='strut'>&nbsp;</span></p>
+
+ <p id='t17' class='pln'>&nbsp;&nbsp;<span class='strut'>&nbsp;</span></p>
+
+ <p id='t18' class='pln'>&nbsp;&nbsp;/**<span class='strut'>&nbsp;</span></p>
+
+ <p id='t19' class='pln'>&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;value&nbsp;of&nbsp;the&nbsp;column<span class='strut'>&nbsp;</span></p>
+
+ <p id='t20' class='pln'>&nbsp;&nbsp;&nbsp;*/<span class='strut'>&nbsp;</span></p>
+
+ <p id='t21' class='stm mis'>&nbsp;&nbsp;this.value&nbsp;=&nbsp;value;<span class='strut'>&nbsp;</span></p>
+
+ <p id='t22' class='pln'>&nbsp;&nbsp;<span class='strut'>&nbsp;</span></p>
+
+ <p id='t23' class='pln'>&nbsp;&nbsp;/**<span class='strut'>&nbsp;</span></p>
+
+ <p id='t24' class='pln'>&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;timestamp&nbsp;of&nbsp;the&nbsp;value<span class='strut'>&nbsp;</span></p>
+
+ <p id='t25' class='pln'>&nbsp;&nbsp;&nbsp;*&nbsp;@default&nbsp;{Date}&nbsp;new&nbsp;Date();<span class='strut'>&nbsp;</span></p>
+
+ <p id='t26' class='pln'>&nbsp;&nbsp;&nbsp;*/<span class='strut'>&nbsp;</span></p>
+
+ <p id='t27' class='stm mis'>&nbsp;&nbsp;this.timestamp&nbsp;=&nbsp;timestamp&nbsp;||&nbsp;new&nbsp;Date();<span class='strut'>&nbsp;</span></p>
+
+ <p id='t28' class='pln'>&nbsp;&nbsp;<span class='strut'>&nbsp;</span></p>
+
+ <p id='t29' class='pln'>&nbsp;&nbsp;/**<span class='strut'>&nbsp;</span></p>
+
+ <p id='t30' class='pln'>&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;ttl&nbsp;for&nbsp;the&nbsp;column<span class='strut'>&nbsp;</span></p>
+
+ <p id='t31' class='pln'>&nbsp;&nbsp;&nbsp;*/<span class='strut'>&nbsp;</span></p>
+
+ <p id='t32' class='stm mis'>&nbsp;&nbsp;this.ttl&nbsp;=&nbsp;ttl;<span class='strut'>&nbsp;</span></p>
+
+ <p id='t33' class='pln'>};<span class='strut'>&nbsp;</span></p>
+
+ <p id='t34' class='pln'><span class='strut'>&nbsp;</span></p>
+
+ <p id='t35' class='pln'>/**<span class='strut'>&nbsp;</span></p>
+
+ <p id='t36' class='pln'>&nbsp;*&nbsp;Marshals&nbsp;the&nbsp;column&nbsp;to&nbsp;a&nbsp;thrift&nbsp;column&nbsp;using&nbsp;the&nbsp;marshallers&nbsp;for&nbsp;name&nbsp;and&nbsp;value<span class='strut'>&nbsp;</span></p>
+
+ <p id='t37' class='pln'>&nbsp;*&nbsp;@param&nbsp;{Marshal}&nbsp;nameMarshaller&nbsp;The&nbsp;marshaller&nbsp;for&nbsp;the&nbsp;column&nbsp;name<span class='strut'>&nbsp;</span></p>
+
+ <p id='t38' class='pln'>&nbsp;*&nbsp;@param&nbsp;{Marshal}&nbsp;valueMarshaller&nbsp;The&nbsp;marshaller&nbsp;for&nbsp;the&nbsp;column&nbsp;value<span class='strut'>&nbsp;</span></p>
+
+ <p id='t39' class='pln'>&nbsp;*&nbsp;@returns&nbsp;{Column}&nbsp;The&nbsp;thrift&nbsp;column&nbsp;with&nbsp;correctly&nbsp;marshalled&nbsp;name&nbsp;and&nbsp;value<span class='strut'>&nbsp;</span></p>
+
+ <p id='t40' class='pln'>&nbsp;*/<span class='strut'>&nbsp;</span></p>
+
+ <p id='t41' class='stm run'>Column.prototype.toThrift&nbsp;=&nbsp;function(nameMarshaller,&nbsp;valueMarshaller){<span class='strut'>&nbsp;</span></p>
+
+ <p id='t42' class='stm mis'>&nbsp;&nbsp;return&nbsp;new&nbsp;ttypes.Column({<span class='strut'>&nbsp;</span></p>
+
+ <p id='t43' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;name:&nbsp;nameMarshaller.serialize(this.name),<span class='strut'>&nbsp;</span></p>
+
+ <p id='t44' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;value:&nbsp;valueMarshaller.serialize(this.value),<span class='strut'>&nbsp;</span></p>
+
+ <p id='t45' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;timestamp:&nbsp;this.timestamp.getTime(),<span class='strut'>&nbsp;</span></p>
+
+ <p id='t46' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;ttl:this.ttl<span class='strut'>&nbsp;</span></p>
+
+ <p id='t47' class='pln'>&nbsp;&nbsp;});<span class='strut'>&nbsp;</span></p>
+
+ <p id='t48' class='pln'>};<span class='strut'>&nbsp;</span></p>
+
+ <p id='t49' class='pln'><span class='strut'>&nbsp;</span></p>
+
+ <p id='t50' class='stm run'>module.exports&nbsp;=&nbsp;Column;<span class='strut'>&nbsp;</span></p>
+
+ </td>
+ </tr>
+ </table>
+ </div>
+
+<div id='footer'>
+ <div class='content'>
+ <p>
+ <a class='nav' href='index.html'>&#xab; index</a> &nbsp; &nbsp; <a
+ class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.3</a>
+ </p>
+ </div>
+</div>
+
+</body>
+</html>
View
487 test/coverage/column_family.html
@@ -0,0 +1,487 @@
+<!doctype html PUBLIC "-//W3C//DTD html 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
+
+
+ <meta http-equiv='X-UA-Compatible' content='IE=emulateIE7' />
+ <title>Coverage for column_family.js: 20.69%</title>
+ <link rel='stylesheet' href='style.css' type='text/css'>
+ <script type='text/javascript' src='jquery-1.4.3.min.js'></script>
+ <script type='text/javascript' src='jquery.hotkeys.js'></script>
+ <script type='text/javascript' src='jquery.isonscreen.js'></script>
+ <script type='text/javascript' src='coverage_html.js'></script>
+ <script type='text/javascript' charset='utf-8'>
+ jQuery(document).ready(coverage.pyfile_ready);
+ </script>
+</head>
+<body id='pyfile'>
+
+<div id='header'>
+ <div class='content'>
+ <h1>Coverage for <b>column_family.js</b> :
+ <span class='pc_cov'>20.69%</span>
+ </h1>
+ <img id='keyboard_icon' src='keybd_closed.png'>
+ <h2 class='stats'>
+ statements
+ <span class=' shortkey_r' onclick='coverage.toggle_lines(this, "run")'>6 hits</span>
+ <span class=' shortkey_m' onclick='coverage.toggle_lines(this, "mis")'>23 missing</span>
+ <span class=' shortkey_x' onclick='coverage.toggle_lines(this, "exc")'>29 lines</span>
+ </h2>
+ </div>
+</div>
+
+<div class='help_panel'>
+ <img id='panel_icon' src='keybd_open.png'>
+ <p class='legend'>Hot-keys on this page</p>
+ <div>
+ <p class='keyhelp'>
+ <span class='key'>r</span>
+ <span class='key'>m</span> &nbsp; toggle line displays
+ </p>
+ <p class='keyhelp'>
+ <span class='key'>j</span>
+ <span class='key'>k</span> &nbsp; next/prev highlighted chunk
+ </p>
+ <p class='keyhelp'>
+ <span class='key'>0</span> &nbsp; (zero) top of page
+ </p>
+ <p class='keyhelp'>
+ <span class='key'>1</span> &nbsp; (one) first highlighted chunk
+ </p>
+ </div>
+</div>
+
+<div id='source'>
+ <table cellspacing='0' cellpadding='0'>
+ <tr>
+ <td class='linenos' valign='top'>
+
+ <p id='n1' class='stm run'><a href='#n1'>1</a></p>
+
+ <p id='n2' class='pln'><a href='#n2'>2</a></p>
+
+ <p id='n3' class='pln'><a href='#n3'>3</a></p>
+
+ <p id='n4' class='pln'><a href='#n4'>4</a></p>
+
+ <p id='n5' class='pln'><a href='#n5'>5</a></p>
+
+ <p id='n6' class='pln'><a href='#n6'>6</a></p>
+
+ <p id='n7' class='pln'><a href='#n7'>7</a></p>
+
+ <p id='n8' class='pln'><a href='#n8'>8</a></p>
+
+ <p id='n9' class='pln'><a href='#n9'>9</a></p>
+
+ <p id='n10' class='pln'><a href='#n10'>10</a></p>
+
+ <p id='n11' class='pln'><a href='#n11'>11</a></p>
+
+ <p id='n12' class='stm run'><a href='#n12'>12</a></p>
+
+ <p id='n13' class='pln'><a href='#n13'>13</a></p>
+
+ <p id='n14' class='pln'><a href='#n14'>14</a></p>
+
+ <p id='n15' class='pln'><a href='#n15'>15</a></p>
+
+ <p id='n16' class='pln'><a href='#n16'>16</a></p>
+
+ <p id='n17' class='pln'><a href='#n17'>17</a></p>
+
+ <p id='n18' class='pln'><a href='#n18'>18</a></p>
+
+ <p id='n19' class='pln'><a href='#n19'>19</a></p>
+
+ <p id='n20' class='stm run'><a href='#n20'>20</a></p>
+
+ <p id='n21' class='pln'><a href='#n21'>21</a></p>
+
+ <p id='n22' class='pln'><a href='#n22'>22</a></p>
+
+ <p id='n23' class='pln'><a href='#n23'>23</a></p>
+
+ <p id='n24' class='pln'><a href='#n24'>24</a></p>
+
+ <p id='n25' class='pln'><a href='#n25'>25</a></p>
+
+ <p id='n26' class='pln'><a href='#n26'>26</a></p>
+
+ <p id='n27' class='pln'><a href='#n27'>27</a></p>
+
+ <p id='n28' class='stm run'><a href='#n28'>28</a></p>
+
+ <p id='n29' class='pln'><a href='#n29'>29</a></p>
+
+ <p id='n30' class='stm mis'><a href='#n30'>30</a></p>
+
+ <p id='n31' class='stm mis'><a href='#n31'>31</a></p>
+
+ <p id='n32' class='stm mis'><a href='#n32'>32</a></p>
+
+ <p id='n33' class='stm mis'><a href='#n33'>33</a></p>
+
+ <p id='n34' class='stm mis'><a href='#n34'>34</a></p>
+
+ <p id='n35' class='stm mis'><a href='#n35'>35</a></p>
+
+ <p id='n36' class='stm mis'><a href='#n36'>36</a></p>
+
+ <p id='n37' class='pln'><a href='#n37'>37</a></p>
+
+ <p id='n38' class='pln'><a href='#n38'>38</a></p>
+
+ <p id='n39' class='pln'><a href='#n39'>39</a></p>
+
+ <p id='n40' class='pln'><a href='#n40'>40</a></p>
+
+ <p id='n41' class='pln'><a href='#n41'>41</a></p>
+
+ <p id='n42' class='pln'><a href='#n42'>42</a></p>
+
+ <p id='n43' class='pln'><a href='#n43'>43</a></p>
+
+ <p id='n44' class='pln'><a href='#n44'>44</a></p>
+
+ <p id='n45' class='pln'><a href='#n45'>45</a></p>
+
+ <p id='n46' class='pln'><a href='#n46'>46</a></p>
+
+ <p id='n47' class='pln'><a href='#n47'>47</a></p>
+
+ <p id='n48' class='stm run'><a href='#n48'>48</a></p>
+
+ <p id='n49' class='stm mis'><a href='#n49'>49</a></p>
+
+ <p id='n50' class='stm mis'><a href='#n50'>50</a></p>
+
+ <p id='n51' class='stm mis'><a href='#n51'>51</a></p>
+
+ <p id='n52' class='pln'><a href='#n52'>52</a></p>
+
+ <p id='n53' class='pln'><a href='#n53'>53</a></p>
+
+ <p id='n54' class='stm mis'><a href='#n54'>54</a></p>
+
+ <p id='n55' class='pln'><a href='#n55'>55</a></p>
+
+ <p id='n56' class='pln'><a href='#n56'>56</a></p>
+
+ <p id='n57' class='pln'><a href='#n57'>57</a></p>
+
+ <p id='n58' class='pln'><a href='#n58'>58</a></p>
+
+ <p id='n59' class='stm mis'><a href='#n59'>59</a></p>
+
+ <p id='n60' class='pln'><a href='#n60'>60</a></p>
+
+ <p id='n61' class='stm mis'><a href='#n61'>61</a></p>
+
+ <p id='n62' class='pln'><a href='#n62'>62</a></p>
+
+ <p id='n63' class='pln'><a href='#n63'>63</a></p>
+
+ <p id='n64' class='stm mis'><a href='#n64'>64</a></p>
+
+ <p id='n65' class='stm mis'><a href='#n65'>65</a></p>
+
+ <p id='n66' class='stm mis'><a href='#n66'>66</a></p>
+
+ <p id='n67' class='pln'><a href='#n67'>67</a></p>
+
+ <p id='n68' class='stm mis'><a href='#n68'>68</a></p>
+
+ <p id='n69' class='stm mis'><a href='#n69'>69</a></p>
+
+ <p id='n70' class='pln'><a href='#n70'>70</a></p>
+
+ <p id='n71' class='pln'><a href='#n71'>71</a></p>
+
+ <p id='n72' class='stm mis'><a href='#n72'>72</a></p>
+
+ <p id='n73' class='pln'><a href='#n73'>73</a></p>
+
+ <p id='n74' class='pln'><a href='#n74'>74</a></p>
+
+ <p id='n75' class='pln'><a href='#n75'>75</a></p>
+
+ <p id='n76' class='pln'><a href='#n76'>76</a></p>
+
+ <p id='n77' class='pln'><a href='#n77'>77</a></p>
+
+ <p id='n78' class='pln'><a href='#n78'>78</a></p>
+
+ <p id='n79' class='stm mis'><a href='#n79'>79</a></p>
+
+ <p id='n80' class='pln'><a href='#n80'>80</a></p>
+
+ <p id='n81' class='pln'><a href='#n81'>81</a></p>
+
+ <p id='n82' class='pln'><a href='#n82'>82</a></p>
+
+ <p id='n83' class='pln'><a href='#n83'>83</a></p>
+
+ <p id='n84' class='pln'><a href='#n84'>84</a></p>
+
+ <p id='n85' class='pln'><a href='#n85'>85</a></p>
+
+ <p id='n86' class='pln'><a href='#n86'>86</a></p>
+
+ <p id='n87' class='pln'><a href='#n87'>87</a></p>
+
+ <p id='n88' class='pln'><a href='#n88'>88</a></p>
+
+ <p id='n89' class='pln'><a href='#n89'>89</a></p>
+
+ <p id='n90' class='pln'><a href='#n90'>90</a></p>
+
+ <p id='n91' class='pln'><a href='#n91'>91</a></p>
+
+ <p id='n92' class='pln'><a href='#n92'>92</a></p>
+
+ <p id='n93' class='pln'><a href='#n93'>93</a></p>
+
+ <p id='n94' class='pln'><a href='#n94'>94</a></p>
+
+ <p id='n95' class='pln'><a href='#n95'>95</a></p>
+
+ <p id='n96' class='stm mis'><a href='#n96'>96</a></p>
+
+ <p id='n97' class='stm mis'><a href='#n97'>97</a></p>
+
+ <p id='n98' class='pln'><a href='#n98'>98</a></p>
+
+ <p id='n99' class='stm mis'><a href='#n99'>99</a></p>
+
+ <p id='n100' class='pln'><a href='#n100'>100</a></p>
+
+ <p id='n101' class='pln'><a href='#n101'>101</a></p>
+
+ <p id='n102' class='stm run'><a href='#n102'>102</a></p>
+
+ </td>
+ <td class='text' valign='top'>
+
+ <p id='t1' class='stm run'>var&nbsp;util&nbsp;=&nbsp;require('util'),<span class='strut'>&nbsp;</span></p>
+
+ <p id='t2' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;Marshal&nbsp;=&nbsp;require('./marshal'),<span class='strut'>&nbsp;</span></p>
+
+ <p id='t3' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;Column&nbsp;=&nbsp;require('./column'),<span class='strut'>&nbsp;</span></p>
+
+ <p id='t4' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;ttype&nbsp;=&nbsp;require('./cassandra/1.0/cassandra_types');<span class='strut'>&nbsp;</span></p>
+
+ <p id='t5' class='pln'><span class='strut'>&nbsp;</span></p>
+
+ <p id='t6' class='pln'>/**<span class='strut'>&nbsp;</span></p>
+
+ <p id='t7' class='pln'>&nbsp;*&nbsp;Default&nbsp;read&nbsp;consistency&nbsp;level<span class='strut'>&nbsp;</span></p>
+
+ <p id='t8' class='pln'>&nbsp;*&nbsp;@private<span class='strut'>&nbsp;</span></p>
+
+ <p id='t9' class='pln'>&nbsp;*&nbsp;@constant<span class='strut'>&nbsp;</span></p>
+
+ <p id='t10' class='pln'>&nbsp;*&nbsp;@memberOf&nbsp;ColumnFamily<span class='strut'>&nbsp;</span></p>
+
+ <p id='t11' class='pln'>&nbsp;*/<span class='strut'>&nbsp;</span></p>
+
+ <p id='t12' class='stm run'>var&nbsp;DEFAULT_READ_CONSISTENCY&nbsp;=&nbsp;ttype.ConsistencyLevel.QUORUM;<span class='strut'>&nbsp;</span></p>
+
+ <p id='t13' class='pln'><span class='strut'>&nbsp;</span></p>
+
+ <p id='t14' class='pln'>/**<span class='strut'>&nbsp;</span></p>
+
+ <p id='t15' class='pln'>&nbsp;*&nbsp;Default&nbsp;write&nbsp;consistency&nbsp;level<span class='strut'>&nbsp;</span></p>
+
+ <p id='t16' class='pln'>&nbsp;*&nbsp;@private<span class='strut'>&nbsp;</span></p>
+
+ <p id='t17' class='pln'>&nbsp;*&nbsp;@constant<span class='strut'>&nbsp;</span></p>
+
+ <p id='t18' class='pln'>&nbsp;*&nbsp;@memberOf&nbsp;ColumnFamily<span class='strut'>&nbsp;</span></p>
+
+ <p id='t19' class='pln'>&nbsp;*/<span class='strut'>&nbsp;</span></p>
+
+ <p id='t20' class='stm run'>var&nbsp;DEFAULT_WRITE_CONSISTENCY&nbsp;=&nbsp;ttype.ConsistencyLevel.QUORUM;<span class='strut'>&nbsp;</span></p>
+
+ <p id='t21' class='pln'><span class='strut'>&nbsp;</span></p>
+
+ <p id='t22' class='pln'>/**<span class='strut'>&nbsp;</span></p>
+
+ <p id='t23' class='pln'>&nbsp;*&nbsp;Representation&nbsp;of&nbsp;a&nbsp;Column&nbsp;Family<span class='strut'>&nbsp;</span></p>
+
+ <p id='t24' class='pln'>&nbsp;*<span class='strut'>&nbsp;</span></p>
+
+ <p id='t25' class='pln'>&nbsp;*&nbsp;@param&nbsp;{Object}&nbsp;definition&nbsp;The&nbsp;Column&nbsp;Family&nbsp;definition<span class='strut'>&nbsp;</span></p>
+
+ <p id='t26' class='pln'>&nbsp;*&nbsp;@constructor<span class='strut'>&nbsp;</span></p>
+
+ <p id='t27' class='pln'>&nbsp;*/<span class='strut'>&nbsp;</span></p>
+
+ <p id='t28' class='stm run'>var&nbsp;ColumnFamily&nbsp;=&nbsp;function(keyspace,&nbsp;definition){<span class='strut'>&nbsp;</span></p>
+
+ <p id='t29' class='pln'>//&nbsp;&nbsp;ttype.CfDef.call(this,&nbsp;definition);<span class='strut'>&nbsp;</span></p>
+
+ <p id='t30' class='stm mis'>&nbsp;&nbsp;this.isSuper&nbsp;=&nbsp;this.column_type&nbsp;===&nbsp;'Super';<span class='strut'>&nbsp;</span></p>
+
+ <p id='t31' class='stm mis'>&nbsp;&nbsp;this.keyspace&nbsp;=&nbsp;keyspace;<span class='strut'>&nbsp;</span></p>
+
+ <p id='t32' class='stm mis'>&nbsp;&nbsp;this.connection&nbsp;=&nbsp;keyspace.connection;<span class='strut'>&nbsp;</span></p>
+
+ <p id='t33' class='stm mis'>&nbsp;&nbsp;this.definition&nbsp;=&nbsp;definition;<span class='strut'>&nbsp;</span></p>
+
+ <p id='t34' class='stm mis'>&nbsp;&nbsp;this.columnMarshaller&nbsp;=&nbsp;new&nbsp;Marshal(definition.comparator_type);<span class='strut'>&nbsp;</span></p>
+
+ <p id='t35' class='stm mis'>&nbsp;&nbsp;this.valueMarshaller&nbsp;=&nbsp;new&nbsp;Marshal(definition.validation_class);<span class='strut'>&nbsp;</span></p>
+
+ <p id='t36' class='stm mis'>&nbsp;&nbsp;this.keyMarshaller&nbsp;=&nbsp;new&nbsp;Marshal(definition.key_validation_class);<span class='strut'>&nbsp;</span></p>
+
+ <p id='t37' class='pln'>};<span class='strut'>&nbsp;</span></p>
+
+ <p id='t38' class='pln'>//util.inherits(ColumnFamily,&nbsp;ttype.CfDef);<span class='strut'>&nbsp;</span></p>
+
+ <p id='t39' class='pln'><span class='strut'>&nbsp;</span></p>
+
+ <p id='t40' class='pln'>/**<span class='strut'>&nbsp;</span></p>
+
+ <p id='t41' class='pln'>&nbsp;*&nbsp;Performs&nbsp;a&nbsp;set&nbsp;command&nbsp;to&nbsp;the&nbsp;cluster<span class='strut'>&nbsp;</span></p>
+
+ <p id='t42' class='pln'>&nbsp;*<span class='strut'>&nbsp;</span></p>
+
+ <p id='t43' class='pln'>&nbsp;*&nbsp;@param&nbsp;{String}&nbsp;key&nbsp;The&nbsp;key&nbsp;for&nbsp;the&nbsp;row<span class='strut'>&nbsp;</span></p>
+
+ <p id='t44' class='pln'>&nbsp;*&nbsp;@param&nbsp;{Object}&nbsp;value&nbsp;The&nbsp;value&nbsp;for&nbsp;the&nbsp;columns&nbsp;as&nbsp;represented&nbsp;by&nbsp;JSON<span class='strut'>&nbsp;</span></p>
+
+ <p id='t45' class='pln'>&nbsp;*&nbsp;@param&nbsp;{Object}&nbsp;options&nbsp;The&nbsp;options&nbsp;for&nbsp;the&nbsp;insert<span class='strut'>&nbsp;</span></p>
+
+ <p id='t46' class='pln'>&nbsp;*&nbsp;@param&nbsp;{Function}&nbsp;callback&nbsp;The&nbsp;callback&nbsp;to&nbsp;call&nbsp;once&nbsp;complete<span class='strut'>&nbsp;</span></p>
+
+ <p id='t47' class='pln'>&nbsp;*/<span class='strut'>&nbsp;</span></p>
+
+ <p id='t48' class='stm run'>ColumnFamily.prototype.insert&nbsp;=&nbsp;function(key,&nbsp;values,&nbsp;options,&nbsp;callback){<span class='strut'>&nbsp;</span></p>
+
+ <p id='t49' class='stm mis'>&nbsp;&nbsp;if&nbsp;(typeof&nbsp;options&nbsp;===&nbsp;'function'){<span class='strut'>&nbsp;</span></p>
+
+ <p id='t50' class='stm mis'>&nbsp;&nbsp;&nbsp;&nbsp;callback&nbsp;=&nbsp;options;<span class='strut'>&nbsp;</span></p>
+
+ <p id='t51' class='stm mis'>&nbsp;&nbsp;&nbsp;&nbsp;options&nbsp;=&nbsp;{};<span class='strut'>&nbsp;</span></p>
+
+ <p id='t52' class='pln'>&nbsp;&nbsp;}<span class='strut'>&nbsp;</span></p>
+
+ <p id='t53' class='pln'><span class='strut'>&nbsp;</span></p>
+
+ <p id='t54' class='stm mis'>&nbsp;&nbsp;var&nbsp;mutations&nbsp;=&nbsp;[],&nbsp;batch&nbsp;=&nbsp;{},&nbsp;i&nbsp;=&nbsp;0,&nbsp;value,&nbsp;prop,<span class='strut'>&nbsp;</span></p>
+
+ <p id='t55' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;keys&nbsp;=&nbsp;Object.keys(values),&nbsp;keylen&nbsp;=&nbsp;keys.length,<span class='strut'>&nbsp;</span></p>
+
+ <p id='t56' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ts&nbsp;=&nbsp;new&nbsp;Date(),<span class='strut'>&nbsp;</span></p>
+
+ <p id='t57' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;consistency&nbsp;=&nbsp;options.consistencyLevel&nbsp;||&nbsp;DEFAULT_WRITE_CONSISTENCY;<span class='strut'>&nbsp;</span></p>
+
+ <p id='t58' class='pln'><span class='strut'>&nbsp;</span></p>
+
+ <p id='t59' class='stm mis'>&nbsp;&nbsp;if&nbsp;(this.isSuper)&nbsp;{<span class='strut'>&nbsp;</span></p>
+
+ <p id='t60' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;TODO:&nbsp;Implement&nbsp;SuperColumns<span class='strut'>&nbsp;</span></p>
+
+ <p id='t61' class='stm mis'>&nbsp;&nbsp;&nbsp;&nbsp;throw(new&nbsp;Error('SuperColumns&nbsp;Are&nbsp;Evil!!!'));<span class='strut'>&nbsp;</span></p>
+
+ <p id='t62' class='pln'>&nbsp;&nbsp;}&nbsp;else&nbsp;{<span class='strut'>&nbsp;</span></p>
+
+ <p id='t63' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;standard<span class='strut'>&nbsp;</span></p>
+
+ <p id='t64' class='stm mis'>&nbsp;&nbsp;&nbsp;&nbsp;for&nbsp;(;&nbsp;i&nbsp;&lt;&nbsp;keylen;&nbsp;i&nbsp;+=&nbsp;1)&nbsp;{<span class='strut'>&nbsp;</span></p>
+
+ <p id='t65' class='stm mis'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;prop&nbsp;=&nbsp;keys[i];<span class='strut'>&nbsp;</span></p>
+
+ <p id='t66' class='stm mis'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value&nbsp;=&nbsp;values[prop];<span class='strut'>&nbsp;</span></p>
+
+ <p id='t67' class='pln'><span class='strut'>&nbsp;</span></p>
+
+ <p id='t68' class='stm mis'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(value&nbsp;===&nbsp;null&nbsp;||&nbsp;value&nbsp;===&nbsp;undefined){<span class='strut'>&nbsp;</span></p>
+
+ <p id='t69' class='stm mis'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value&nbsp;=&nbsp;'';<span class='strut'>&nbsp;</span></p>
+
+ <p id='t70' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<span class='strut'>&nbsp;</span></p>
+
+ <p id='t71' class='pln'><span class='strut'>&nbsp;</span></p>
+
+ <p id='t72' class='stm mis'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;col&nbsp;=&nbsp;new&nbsp;Column({<span class='strut'>&nbsp;</span></p>
+
+ <p id='t73' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name:&nbsp;prop,<span class='strut'>&nbsp;</span></p>
+
+ <p id='t74' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value:&nbsp;value,<span class='strut'>&nbsp;</span></p>
+
+ <p id='t75' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;timestamp:&nbsp;ts,<span class='strut'>&nbsp;</span></p>
+
+ <p id='t76' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ttl:&nbsp;options.ttl<span class='strut'>&nbsp;</span></p>
+
+ <p id='t77' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});<span class='strut'>&nbsp;</span></p>
+
+ <p id='t78' class='pln'><span class='strut'>&nbsp;</span></p>
+
+ <p id='t79' class='stm mis'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mutations.push(new&nbsp;ttype.Mutation({<span class='strut'>&nbsp;</span></p>
+
+ <p id='t80' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;column_or_supercolumn:&nbsp;new&nbsp;ttype.ColumnOrSuperColumn({<span class='strut'>&nbsp;</span></p>
+
+ <p id='t81' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;column:&nbsp;col.toThrift(this.columnMarshaller,&nbsp;this.valueMarshaller)<span class='strut'>&nbsp;</span></p>
+
+ <p id='t82' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;})<span class='strut'>&nbsp;</span></p>
+
+ <p id='t83' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}));<span class='strut'>&nbsp;</span></p>
+
+ <p id='t84' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;}<span class='strut'>&nbsp;</span></p>
+
+ <p id='t85' class='pln'>&nbsp;&nbsp;}<span class='strut'>&nbsp;</span></p>
+
+ <p id='t86' class='pln'><span class='strut'>&nbsp;</span></p>
+
+ <p id='t87' class='pln'>&nbsp;&nbsp;/**<span class='strut'>&nbsp;</span></p>
+
+ <p id='t88' class='pln'>&nbsp;&nbsp;&nbsp;*&nbsp;TODO:&nbsp;Build&nbsp;into&nbsp;the&nbsp;Cassandra&nbsp;thrift&nbsp;interface,&nbsp;the&nbsp;ability&nbsp;to&nbsp;have<span class='strut'>&nbsp;</span></p>
+
+ <p id='t89' class='pln'>&nbsp;&nbsp;&nbsp;*&nbsp;Keys&nbsp;as&nbsp;composites.&nbsp;&nbsp;This&nbsp;means&nbsp;that&nbsp;the&nbsp;object&nbsp;format&nbsp;is&nbsp;out&nbsp;the&nbsp;window...maybe<span class='strut'>&nbsp;</span></p>
+
+ <p id='t90' class='pln'>&nbsp;&nbsp;&nbsp;*/<span class='strut'>&nbsp;</span></p>
+
+ <p id='t91' class='pln'>&nbsp;&nbsp;//if(this.keyMarshaller.isComposite){<span class='strut'>&nbsp;</span></p>
+
+ <p id='t92' class='pln'>&nbsp;&nbsp;//&nbsp;&nbsp;key&nbsp;=&nbsp;&nbsp;key.split(':');<span class='strut'>&nbsp;</span></p>
+
+ <p id='t93' class='pln'>&nbsp;&nbsp;//}<span class='strut'>&nbsp;</span></p>
+
+ <p id='t94' class='pln'>&nbsp;&nbsp;//key&nbsp;=&nbsp;this.keyMarshaller.serialize(key);<span class='strut'>&nbsp;</span></p>
+
+ <p id='t95' class='pln'><span class='strut'>&nbsp;</span></p>
+
+ <p id='t96' class='stm mis'>&nbsp;&nbsp;batch[key]&nbsp;=&nbsp;{};<span class='strut'>&nbsp;</span></p>
+
+ <p id='t97' class='stm mis'>&nbsp;&nbsp;batch[key][this.definition.name]&nbsp;=&nbsp;mutations;<span class='strut'>&nbsp;</span></p>
+
+ <p id='t98' class='pln'><span class='strut'>&nbsp;</span></p>
+
+ <p id='t99' class='stm mis'>&nbsp;&nbsp;this.connection.execute('batch_mutate',&nbsp;batch,&nbsp;consistency,&nbsp;callback);<span class='strut'>&nbsp;</span></p>
+
+ <p id='t100' class='pln'>};<span class='strut'>&nbsp;</span></p>
+
+ <p id='t101' class='pln'><span class='strut'>&nbsp;</span></p>
+
+ <p id='t102' class='stm run'>module.exports&nbsp;=&nbsp;ColumnFamily;<span class='strut'>&nbsp;</span></p>
+
+ </td>
+ </tr>
+ </table>
+ </div>
+
+<div id='footer'>
+ <div class='content'>
+ <p>
+ <a class='nav' href='index.html'>&#xab; index</a> &nbsp; &nbsp; <a
+ class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.3</a>
+ </p>
+ </div>
+</div>
+
+</body>
+</html>
View
1,755 test/coverage/connection.html
1,755 additions, 0 deletions not shown
View
372 test/coverage/coverage_html.js
@@ -0,0 +1,372 @@
+// Coverage.py HTML report browser code.
+/*jslint browser: true, sloppy: true, vars: true, plusplus: true, maxerr: 50, indent: 4 */
+/*global coverage: true, document, window, $ */
+
+coverage = {};
+
+// Find all the elements with shortkey_* class, and use them to assign a shotrtcut key.
+coverage.assign_shortkeys = function () {
+ $("*[class*='shortkey_']").each(function (i, e) {
+ $.each($(e).attr("class").split(" "), function (i, c) {
+ if (/^shortkey_/.test(c)) {
+ $(document).bind('keydown', c.substr(9), function () {
+ $(e).click();
+ });
+ }
+ });
+ });
+};
+
+// Create the events for the help panel.
+coverage.wire_up_help_panel = function () {
+ $("#keyboard_icon").click(function () {
+ // Show the help panel, and position it so the keyboard icon in the
+ // panel is in the same place as the keyboard icon in the header.
+ $(".help_panel").show();
+ var koff = $("#keyboard_icon").offset();
+ var poff = $("#panel_icon").position();
+ $(".help_panel").offset({
+ top: koff.top-poff.top,
+ left: koff.left-poff.left
+ });
+ });
+ $("#panel_icon").click(function () {
+ $(".help_panel").hide();
+ });
+};
+
+// Loaded on index.html
+coverage.index_ready = function ($) {
+ // Look for a cookie containing previous sort settings:
+ var sort_list = [];
+ var cookie_name = "COVERAGE_INDEX_SORT";
+ var i;
+
+ // This almost makes it worth installing the jQuery cookie plugin:
+ if (document.cookie.indexOf(cookie_name) > -1) {
+ var cookies = document.cookie.split(";");
+ for (i = 0; i < cookies.length; i++) {
+ var parts = cookies[i].split("=");
+
+ if ($.trim(parts[0]) === cookie_name && parts[1]) {
+ sort_list = eval("[[" + parts[1] + "]]");
+ break;
+ }
+ }
+ }
+
+ // Create a new widget which exists only to save and restore
+ // the sort order:
+ $.tablesorter.addWidget({
+ id: "persistentSort",
+
+ // Format is called by the widget before displaying:
+ format: function (table) {
+ if (table.config.sortList.length === 0 && sort_list.length > 0) {
+ // This table hasn't been sorted before - we'll use
+ // our stored settings:
+ $(table).trigger('sorton', [sort_list]);
+ }
+ else {
+ // This is not the first load - something has
+ // already defined sorting so we'll just update
+ // our stored value to match:
+ sort_list = table.config.sortList;
+ }
+ }
+ });
+
+ // Configure our tablesorter to handle the variable number of
+ // columns produced depending on report options:
+ var headers = [];
+ var col_count = $("table.index > thead > tr > th").length;
+
+ headers[0] = { sorter: 'text' };
+ for (i = 1; i < col_count-1; i++) {
+ headers[i] = { sorter: 'digit' };
+ }
+ headers[col_count-1] = { sorter: 'percent' };
+
+ // Enable the table sorter:
+ $("table.index").tablesorter({
+ widgets: ['persistentSort'],
+ headers: headers
+ });
+
+ coverage.assign_shortkeys();
+ coverage.wire_up_help_panel();
+
+ // Watch for page unload events so we can save the final sort settings:
+ $(window).unload(function () {
+ document.cookie = cookie_name + "=" + sort_list.toString() + "; path=/";
+ });
+};
+
+// -- pyfile stuff --
+
+coverage.pyfile_ready = function ($) {
+ // If we're directed to a particular line number, highlight the line.
+ var frag = location.hash;
+ if (frag.length > 2 && frag[1] === 'n') {
+ $(frag).addClass('highlight');
+ coverage.set_sel(parseInt(frag.substr(2), 10));
+ }
+ else {
+ coverage.set_sel(0);
+ }
+
+ $(document)
+ .bind('keydown', 'j', coverage.to_next_chunk_nicely)
+ .bind('keydown', 'k', coverage.to_prev_chunk_nicely)
+ .bind('keydown', '0', coverage.to_top)
+ .bind('keydown', '1', coverage.to_first_chunk)
+ ;
+
+ coverage.assign_shortkeys();
+ coverage.wire_up_help_panel();
+};
+
+coverage.toggle_lines = function (btn, cls) {
+ btn = $(btn);
+ var hide = "hide_"+cls;
+ if (btn.hasClass(hide)) {
+ $("#source ."+cls).removeClass(hide);
+ btn.removeClass(hide);
+ }
+ else {
+ $("#source ."+cls).addClass(hide);
+ btn.addClass(hide);
+ }
+};
+
+// Return the nth line div.
+coverage.line_elt = function (n) {
+ return $("#t" + n);
+};
+
+// Return the nth line number div.
+coverage.num_elt = function (n) {
+ return $("#n" + n);
+};
+
+// Return the container of all the code.
+coverage.code_container = function () {
+ return $(".linenos");
+};
+
+// Set the selection. b and e are line numbers.
+coverage.set_sel = function (b, e) {
+ // The first line selected.
+ coverage.sel_begin = b;
+ // The next line not selected.
+ coverage.sel_end = (e === undefined) ? b+1 : e;
+};
+
+coverage.to_top = function () {
+ coverage.set_sel(0, 1);
+ coverage.scroll_window(0);
+};
+
+coverage.to_first_chunk = function () {
+ coverage.set_sel(0, 1);
+ coverage.to_next_chunk();
+};
+
+coverage.is_transparent = function (color) {
+ // Different browsers return different colors for "none".
+ return color === "transparent" || color === "rgba(0, 0, 0, 0)";
+};
+
+coverage.to_next_chunk = function () {
+ var c = coverage;
+
+ // Find the start of the next colored chunk.
+ var probe = c.sel_end;
+ while (true) {
+ var probe_line = c.line_elt(probe);
+ if (probe_line.length === 0) {
+ return;
+ }
+ var color = probe_line.css("background-color");
+ if (!c.is_transparent(color)) {
+ break;
+ }
+ probe++;
+ }
+
+ // There's a next chunk, `probe` points to it.
+ var begin = probe;
+
+ // Find the end of this chunk.
+ var next_color = color;
+ while (next_color === color) {
+ probe++;
+ probe_line = c.line_elt(probe);
+ next_color = probe_line.css("background-color");
+ }
+ c.set_sel(begin, probe);
+ c.show_selection();
+};
+
+coverage.to_prev_chunk = function () {
+ var c = coverage;
+
+ // Find the end of the prev colored chunk.
+ var probe = c.sel_begin-1;
+ var probe_line = c.line_elt(probe);
+ if (probe_line.length === 0) {
+ return;
+ }
+ var color = probe_line.css("background-color");
+ while (probe > 0 && c.is_transparent(color)) {
+ probe--;
+ probe_line = c.line_elt(probe);
+ if (probe_line.length === 0) {
+ return;
+ }
+ color = probe_line.css("background-color");
+ }
+
+ // There's a prev chunk, `probe` points to its last line.
+ var end = probe+1;
+
+ // Find the beginning of this chunk.
+ var prev_color = color;
+ while (prev_color === color) {
+ probe--;
+ probe_line = c.line_elt(probe);
+ prev_color = probe_line.css("background-color");
+ }
+ c.set_sel(probe+1, end);
+ c.show_selection();
+};
+
+// Return the line number of the line nearest pixel position pos
+coverage.line_at_pos = function (pos) {
+ var l1 = coverage.line_elt(1),
+ l2 = coverage.line_elt(2),
+ result;
+ if (l1.length && l2.length) {
+ var l1_top = l1.offset().top,
+ line_height = l2.offset().top - l1_top,
+ nlines = (pos - l1_top) / line_height;
+ if (nlines < 1) {
+ result = 1;
+ }
+ else {
+ result = Math.ceil(nlines);
+ }
+ }
+ else {
+ result = 1;
+ }
+ return result;
+};
+
+// Returns 0, 1, or 2: how many of the two ends of the selection are on
+// the screen right now?
+coverage.selection_ends_on_screen = function () {
+ if (coverage.sel_begin === 0) {
+ return 0;
+ }
+
+ var top = coverage.line_elt(coverage.sel_begin);
+ var next = coverage.line_elt(coverage.sel_end-1);
+
+ return (
+ (top.isOnScreen() ? 1 : 0) +
+ (next.isOnScreen() ? 1 : 0)
+ );
+};
+
+coverage.to_next_chunk_nicely = function () {
+ coverage.finish_scrolling();
+ if (coverage.selection_ends_on_screen() === 0) {
+ // The selection is entirely off the screen: select the top line on
+ // the screen.
+ var win = $(window);
+ coverage.select_line_or_chunk(coverage.line_at_pos(win.scrollTop()));
+ }
+ coverage.to_next_chunk();
+};
+
+coverage.to_prev_chunk_nicely = function () {
+ coverage.finish_scrolling();
+ if (coverage.selection_ends_on_screen() === 0) {
+ var win = $(window);
+ coverage.select_line_or_chunk(coverage.line_at_pos(win.scrollTop() + win.height()));
+ }
+ coverage.to_prev_chunk();
+};
+
+// Select line number lineno, or if it is in a colored chunk, select the
+// entire chunk
+coverage.select_line_or_chunk = function (lineno) {
+ var c = coverage;
+ var probe_line = c.line_elt(lineno);
+ if (probe_line.length === 0) {
+ return;
+ }
+ var the_color = probe_line.css("background-color");
+ if (!c.is_transparent(the_color)) {
+ // The line is in a highlighted chunk.
+ // Search backward for the first line.
+ var probe = lineno;
+ var color = the_color;
+ while (probe > 0 && color === the_color) {
+ probe--;
+ probe_line = c.line_elt(probe);
+ if (probe_line.length === 0) {
+ break;
+ }
+ color = probe_line.css("background-color");
+ }
+ var begin = probe + 1;
+
+ // Search forward for the last line.
+ probe = lineno;
+ color = the_color;
+ while (color === the_color) {
+ probe++;
+ probe_line = c.line_elt(probe);
+ color = probe_line.css("background-color");
+ }
+
+ coverage.set_sel(begin, probe);
+ }
+ else {
+ coverage.set_sel(lineno);
+ }
+};
+
+coverage.show_selection = function () {
+ var c = coverage;
+
+ // Highlight the lines in the chunk
+ c.code_container().find(".highlight").removeClass("highlight");
+ for (var probe = c.sel_begin; probe > 0 && probe < c.sel_end; probe++) {
+ c.num_elt(probe).addClass("highlight");
+ }
+
+ c.scroll_to_selection();
+};
+
+coverage.scroll_to_selection = function () {
+ // Scroll the page if the chunk isn't fully visible.
+ if (coverage.selection_ends_on_screen() < 2) {
+ // Need to move the page. The html,body trick makes it scroll in all
+ // browsers, got it from http://stackoverflow.com/questions/3042651
+ var top = coverage.line_elt(coverage.sel_begin);
+ var top_pos = parseInt(top.offset().top, 10);
+ coverage.scroll_window(top_pos - 30);
+ }
+};
+
+coverage.scroll_window = function (to_pos) {
+ $("html,body").animate({scrollTop: to_pos}, 200);
+};
+
+coverage.finish_scrolling = function () {
+ $("html,body").stop(true, true);
+};
+
View
383 test/coverage/helenus.html
@@ -0,0 +1,383 @@
+<!doctype html PUBLIC "-//W3C//DTD html 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
+
+
+ <meta http-equiv='X-UA-Compatible' content='IE=emulateIE7' />
+ <title>Coverage for helenus.js: 100.00%</title>
+ <link rel='stylesheet' href='style.css' type='text/css'>
+ <script type='text/javascript' src='jquery-1.4.3.min.js'></script>
+ <script type='text/javascript' src='jquery.hotkeys.js'></script>
+ <script type='text/javascript' src='jquery.isonscreen.js'></script>
+ <script type='text/javascript' src='coverage_html.js'></script>
+ <script type='text/javascript' charset='utf-8'>
+ jQuery(document).ready(coverage.pyfile_ready);
+ </script>
+</head>
+<body id='pyfile'>
+
+<div id='header'>
+ <div class='content'>
+ <h1>Coverage for <b>helenus.js</b> :
+ <span class='pc_cov'>100.00%</span>
+ </h1>
+ <img id='keyboard_icon' src='keybd_closed.png'>
+ <h2 class='stats'>
+ statements
+ <span class=' shortkey_r' onclick='coverage.toggle_lines(this, "run")'>11 hits</span>
+ <span class=' shortkey_m' onclick='coverage.toggle_lines(this, "mis")'>0 missing</span>
+ <span class=' shortkey_x' onclick='coverage.toggle_lines(this, "exc")'>11 lines</span>
+ </h2>
+ </div>
+</div>
+
+<div class='help_panel'>
+ <img id='panel_icon' src='keybd_open.png'>
+ <p class='legend'>Hot-keys on this page</p>
+ <div>
+ <p class='keyhelp'>
+ <span class='key'>r</span>
+ <span class='key'>m</span> &nbsp; toggle line displays
+ </p>
+ <p class='keyhelp'>
+ <span class='key'>j</span>
+ <span class='key'>k</span> &nbsp; next/prev highlighted chunk
+ </p>
+ <p class='keyhelp'>
+ <span class='key'>0</span> &nbsp; (zero) top of page
+ </p>
+ <p class='keyhelp'>
+ <span class='key'>1</span> &nbsp; (one) first highlighted chunk
+ </p>
+ </div>
+</div>
+
+<div id='source'>
+ <table cellspacing='0' cellpadding='0'>
+ <tr>
+ <td class='linenos' valign='top'>
+
+ <p id='n1' class='pln'><a href='#n1'>1</a></p>
+
+ <p id='n2' class='pln'><a href='#n2'>2</a></p>
+
+ <p id='n3' class='pln'><a href='#n3'>3</a></p>
+
+ <p id='n4' class='pln'><a href='#n4'>4</a></p>
+
+ <p id='n5' class='pln'><a href='#n5'>5</a></p>
+
+ <p id='n6' class='pln'><a href='#n6'>6</a></p>
+
+ <p id='n7' class='pln'><a href='#n7'>7</a></p>
+
+ <p id='n8' class='pln'><a href='#n8'>8</a></p>
+
+ <p id='n9' class='pln'><a href='#n9'>9</a></p>
+
+ <p id='n10' class='pln'><a href='#n10'>10</a></p>
+
+ <p id='n11' class='pln'><a href='#n11'>11</a></p>
+
+ <p id='n12' class='stm run'><a href='#n12'>12</a></p>
+
+ <p id='n13' class='pln'><a href='#n13'>13</a></p>
+
+ <p id='n14' class='pln'><a href='#n14'>14</a></p>
+
+ <p id='n15' class='pln'><a href='#n15'>15</a></p>
+
+ <p id='n16' class='pln'><a href='#n16'>16</a></p>
+
+ <p id='n17' class='pln'><a href='#n17'>17</a></p>
+
+ <p id='n18' class='pln'><a href='#n18'>18</a></p>
+
+ <p id='n19' class='stm run'><a href='#n19'>19</a></p>
+
+ <p id='n20' class='pln'><a href='#n20'>20</a></p>
+
+ <p id='n21' class='pln'><a href='#n21'>21</a></p>
+
+ <p id='n22' class='pln'><a href='#n22'>22</a></p>
+
+ <p id='n23' class='pln'><a href='#n23'>23</a></p>
+
+ <p id='n24' class='pln'><a href='#n24'>24</a></p>
+
+ <p id='n25' class='pln'><a href='#n25'>25</a></p>
+
+ <p id='n26' class='stm run'><a href='#n26'>26</a></p>
+
+ <p id='n27' class='pln'><a href='#n27'>27</a></p>
+
+ <p id='n28' class='pln'><a href='#n28'>28</a></p>
+
+ <p id='n29' class='pln'><a href='#n29'>29</a></p>
+
+ <p id='n30' class='pln'><a href='#n30'>30</a></p>
+
+ <p id='n31' class='pln'><a href='#n31'>31</a></p>
+
+ <p id='n32' class='pln'><a href='#n32'>32</a></p>
+
+ <p id='n33' class='stm run'><a href='#n33'>33</a></p>
+
+ <p id='n34' class='pln'><a href='#n34'>34</a></p>
+
+ <p id='n35' class='pln'><a href='#n35'>35</a></p>
+
+ <p id='n36' class='pln'><a href='#n36'>36</a></p>
+
+ <p id='n37' class='pln'><a href='#n37'>37</a></p>
+
+ <p id='n38' class='pln'><a href='#n38'>38</a></p>
+
+ <p id='n39' class='pln'><a href='#n39'>39</a></p>
+
+ <p id='n40' class='stm run'><a href='#n40'>40</a></p>
+
+ <p id='n41' class='pln'><a href='#n41'>41</a></p>
+
+ <p id='n42' class='pln'><a href='#n42'>42</a></p>
+
+ <p id='n43' class='pln'><a href='#n43'>43</a></p>
+
+ <p id='n44' class='pln'><a href='#n44'>44</a></p>
+
+ <p id='n45' class='pln'><a href='#n45'>45</a></p>
+
+ <p id='n46' class='pln'><a href='#n46'>46</a></p>
+
+ <p id='n47' class='stm run'><a href='#n47'>47</a></p>
+
+ <p id='n48' class='pln'><a href='#n48'>48</a></p>
+
+ <p id='n49' class='pln'><a href='#n49'>49</a></p>
+
+ <p id='n50' class='pln'><a href='#n50'>50</a></p>
+
+ <p id='n51' class='pln'><a href='#n51'>51</a></p>
+
+ <p id='n52' class='pln'><a href='#n52'>52</a></p>
+
+ <p id='n53' class='pln'><a href='#n53'>53</a></p>
+
+ <p id='n54' class='stm run'><a href='#n54'>54</a></p>
+
+ <p id='n55' class='pln'><a href='#n55'>55</a></p>
+
+ <p id='n56' class='pln'><a href='#n56'>56</a></p>
+
+ <p id='n57' class='pln'><a href='#n57'>57</a></p>
+
+ <p id='n58' class='pln'><a href='#n58'>58</a></p>
+
+ <p id='n59' class='pln'><a href='#n59'>59</a></p>
+
+ <p id='n60' class='pln'><a href='#n60'>60</a></p>
+
+ <p id='n61' class='stm run'><a href='#n61'>61</a></p>
+
+ <p id='n62' class='pln'><a href='#n62'>62</a></p>
+
+ <p id='n63' class='pln'><a href='#n63'>63</a></p>
+
+ <p id='n64' class='pln'><a href='#n64'>64</a></p>
+
+ <p id='n65' class='pln'><a href='#n65'>65</a></p>
+
+ <p id='n66' class='pln'><a href='#n66'>66</a></p>
+
+ <p id='n67' class='pln'><a href='#n67'>67</a></p>
+
+ <p id='n68' class='stm run'><a href='#n68'>68</a></p>
+
+ <p id='n69' class='pln'><a href='#n69'>69</a></p>
+
+ <p id='n70' class='pln'><a href='#n70'>70</a></p>
+
+ <p id='n71' class='pln'><a href='#n71'>71</a></p>
+
+ <p id='n72' class='pln'><a href='#n72'>72</a></p>
+
+ <p id='n73' class='pln'><a href='#n73'>73</a></p>
+
+ <p id='n74' class='stm run'><a href='#n74'>74</a></p>
+
+ <p id='n75' class='pln'><a href='#n75'>75</a></p>
+
+ <p id='n76' class='stm run'><a href='#n76'>76</a></p>
+
+ </td>
+ <td class='text' valign='top'>
+
+ <p id='t1' class='pln'><span class='strut'>&nbsp;</span></p>
+
+ <p id='t2' class='pln'>/*!<span class='strut'>&nbsp;</span></p>
+
+ <p id='t3' class='pln'>&nbsp;*&nbsp;Helenus<span class='strut'>&nbsp;</span></p>
+
+ <p id='t4' class='pln'>&nbsp;*&nbsp;Copyright(c)&nbsp;2011&nbsp;SimpleReach&nbsp;&lt;rbradberry@simplereach.com&gt;<span class='strut'>&nbsp;</span></p>
+
+ <p id='t5' class='pln'>&nbsp;*&nbsp;MIT&nbsp;Licensed<span class='strut'>&nbsp;</span></p>
+
+ <p id='t6' class='pln'>&nbsp;*/<span class='strut'>&nbsp;</span></p>
+
+ <p id='t7' class='pln'><span class='strut'>&nbsp;</span></p>
+
+ <p id='t8' class='pln'>/**<span class='strut'>&nbsp;</span></p>
+
+ <p id='t9' class='pln'>&nbsp;*&nbsp;Helenus,&nbsp;a&nbsp;NodeJS&nbsp;Cassandra&nbsp;Driver<span class='strut'>&nbsp;</span></p>
+
+ <p id='t10' class='pln'>&nbsp;*&nbsp;@class<span class='strut'>&nbsp;</span></p>
+
+ <p id='t11' class='pln'>&nbsp;*/<span class='strut'>&nbsp;</span></p>
+
+ <p id='t12' class='stm run'>var&nbsp;Helenus&nbsp;=&nbsp;{};<span class='strut'>&nbsp;</span></p>
+
+ <p id='t13' class='pln'><span class='strut'>&nbsp;</span></p>
+
+ <p id='t14' class='pln'>/**<span class='strut'>&nbsp;</span></p>
+
+ <p id='t15' class='pln'>&nbsp;*&nbsp;The&nbsp;current&nbsp;dirver&nbsp;version<span class='strut'>&nbsp;</span></p>
+
+ <p id='t16' class='pln'>&nbsp;*&nbsp;@static<span class='strut'>&nbsp;</span></p>
+
+ <p id='t17' class='pln'>&nbsp;*&nbsp;@constant<span class='strut'>&nbsp;</span></p>
+
+ <p id='t18' class='pln'>&nbsp;*/<span class='strut'>&nbsp;</span></p>
+
+ <p id='t19' class='stm run'>Helenus.version&nbsp;=&nbsp;'0.1.2';<span class='strut'>&nbsp;</span></p>
+
+ <p id='t20' class='pln'><span class='strut'>&nbsp;</span></p>
+
+ <p id='t21' class='pln'>/**<span class='strut'>&nbsp;</span></p>
+
+ <p id='t22' class='pln'>&nbsp;*&nbsp;The&nbsp;connection&nbsp;pool<span class='strut'>&nbsp;</span></p>
+
+ <p id='t23' class='pln'>&nbsp;*&nbsp;@static<span class='strut'>&nbsp;</span></p>
+
+ <p id='t24' class='pln'>&nbsp;*&nbsp;@see&nbsp;Pool<span class='strut'>&nbsp;</span></p>
+
+ <p id='t25' class='pln'>&nbsp;*/<span class='strut'>&nbsp;</span></p>
+
+ <p id='t26' class='stm run'>Helenus.ConnectionPool&nbsp;=&nbsp;require('./pool');<span class='strut'>&nbsp;</span></p>
+
+ <p id='t27' class='pln'><span class='strut'>&nbsp;</span></p>
+
+ <p id='t28' class='pln'>/**<span class='strut'>&nbsp;</span></p>
+
+ <p id='t29' class='pln'>&nbsp;*&nbsp;The&nbsp;connection<span class='strut'>&nbsp;</span></p>
+
+ <p id='t30' class='pln'>&nbsp;*&nbsp;@static<span class='strut'>&nbsp;</span></p>
+
+ <p id='t31' class='pln'>&nbsp;*&nbsp;@see&nbsp;Connection<span class='strut'>&nbsp;</span></p>
+
+ <p id='t32' class='pln'>&nbsp;*/<span class='strut'>&nbsp;</span></p>
+
+ <p id='t33' class='stm run'>Helenus.Connection&nbsp;=&nbsp;require('./connection');<span class='strut'>&nbsp;</span></p>
+
+ <p id='t34' class='pln'><span class='strut'>&nbsp;</span></p>
+
+ <p id='t35' class='pln'>/**<span class='strut'>&nbsp;</span></p>
+
+ <p id='t36' class='pln'>&nbsp;*&nbsp;The&nbsp;Keyspace<span class='strut'>&nbsp;</span></p>
+
+ <p id='t37' class='pln'>&nbsp;*&nbsp;@static<span class='strut'>&nbsp;</span></p>
+
+ <p id='t38' class='pln'>&nbsp;*&nbsp;@see&nbsp;Keyspace<span class='strut'>&nbsp;</span></p>
+
+ <p id='t39' class='pln'>&nbsp;*/<span class='strut'>&nbsp;</span></p>
+
+ <p id='t40' class='stm run'>Helenus.Keyspace&nbsp;=&nbsp;require('./keyspace');<span class='strut'>&nbsp;</span></p>
+
+ <p id='t41' class='pln'><span class='strut'>&nbsp;</span></p>
+
+ <p id='t42' class='pln'>/**<span class='strut'>&nbsp;</span></p>
+
+ <p id='t43' class='pln'>&nbsp;*&nbsp;The&nbsp;ColumnFamily<span class='strut'>&nbsp;</span></p>
+
+ <p id='t44' class='pln'>&nbsp;*&nbsp;@static<span class='strut'>&nbsp;</span></p>
+
+ <p id='t45' class='pln'>&nbsp;*&nbsp;@see&nbsp;ColumnFamily<span class='strut'>&nbsp;</span></p>
+
+ <p id='t46' class='pln'>&nbsp;*/<span class='strut'>&nbsp;</span></p>
+
+ <p id='t47' class='stm run'>Helenus.ColumnFamily&nbsp;=&nbsp;require('./column_family');<span class='strut'>&nbsp;</span></p>
+
+ <p id='t48' class='pln'><span class='strut'>&nbsp;</span></p>
+
+ <p id='t49' class='pln'>/**<span class='strut'>&nbsp;</span></p>
+
+ <p id='t50' class='pln'>&nbsp;*&nbsp;The&nbsp;Column<span class='strut'>&nbsp;</span></p>
+
+ <p id='t51' class='pln'>&nbsp;*&nbsp;@static<span class='strut'>&nbsp;</span></p>
+
+ <p id='t52' class='pln'>&nbsp;*&nbsp;@see&nbsp;Column<span class='strut'>&nbsp;</span></p>
+
+ <p id='t53' class='pln'>&nbsp;*/<span class='strut'>&nbsp;</span></p>
+
+ <p id='t54' class='stm run'>Helenus.Column&nbsp;=&nbsp;require('./column');<span class='strut'>&nbsp;</span></p>
+
+ <p id='t55' class='pln'><span class='strut'>&nbsp;</span></p>
+
+ <p id='t56' class='pln'>/**<span class='strut'>&nbsp;</span></p>
+
+ <p id='t57' class='pln'>&nbsp;*&nbsp;The&nbsp;Row<span class='strut'>&nbsp;</span></p>
+
+ <p id='t58' class='pln'>&nbsp;*&nbsp;@static<span class='strut'>&nbsp;</span></p>
+
+ <p id='t59' class='pln'>&nbsp;*&nbsp;@see&nbsp;Row<span class='strut'>&nbsp;</span></p>
+
+ <p id='t60' class='pln'>&nbsp;*/<span class='strut'>&nbsp;</span></p>
+
+ <p id='t61' class='stm run'>Helenus.Row&nbsp;=&nbsp;require('./row');<span class='strut'>&nbsp;</span></p>
+
+ <p id='t62' class='pln'><span class='strut'>&nbsp;</span></p>
+
+ <p id='t63' class='pln'>/**<span class='strut'>&nbsp;</span></p>
+
+ <p id='t64' class='pln'>&nbsp;*&nbsp;An&nbsp;object&nbsp;for&nbsp;de/serializing&nbsp;data&nbsp;for&nbsp;consumption&nbsp;by&nbsp;Cassandra<span class='strut'>&nbsp;</span></p>
+
+ <p id='t65' class='pln'>&nbsp;*&nbsp;@static<span class='strut'>&nbsp;</span></p>
+
+ <p id='t66' class='pln'>&nbsp;*&nbsp;@see&nbsp;Marshal<span class='strut'>&nbsp;</span></p>
+
+ <p id='t67' class='pln'>&nbsp;*/<span class='strut'>&nbsp;</span></p>
+
+ <p id='t68' class='stm run'>Helenus.Marshal&nbsp;=&nbsp;require('./marshal');<span class='strut'>&nbsp;</span></p>
+
+ <p id='t69' class='pln'><span class='strut'>&nbsp;</span></p>
+
+ <p id='t70' class='pln'>/**<span class='strut'>&nbsp;</span></p>
+
+ <p id='t71' class='pln'>&nbsp;*&nbsp;UUID<span class='strut'>&nbsp;</span></p>
+
+ <p id='t72' class='pln'>&nbsp;*&nbsp;@see&nbsp;UUID<span class='strut'>&nbsp;</span></p>
+
+ <p id='t73' class='pln'>&nbsp;*/<span class='strut'>&nbsp;</span></p>
+
+ <p id='t74' class='stm run'>Helenus.UUID&nbsp;=&nbsp;require('uuid-js');<span class='strut'>&nbsp;</span></p>
+
+ <p id='t75' class='pln'><span class='strut'>&nbsp;</span></p>
+
+ <p id='t76' class='stm run'>module.exports&nbsp;=&nbsp;Helenus;<span class='strut'>&nbsp;</span></p>
+
+ </td>
+ </tr>
+ </table>
+ </div>
+
+<div id='footer'>
+ <div class='content'>
+ <p>
+ <a class='nav' href='index.html'>&#xab; index</a> &nbsp; &nbsp; <a
+ class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.3</a>
+ </p>
+ </div>
+</div>
+
+</body>
+</html>
View
157 test/coverage/index.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
+ <title>Coverage report</title>
+ <link rel='stylesheet' href='style.css' type='text/css'>
+ <script type='text/javascript' src='jquery-1.4.3.min.js'></script>
+ <script type='text/javascript' src='jquery.tablesorter.min.js'></script>
+ <script type='text/javascript' src='jquery.hotkeys.js'></script>
+ <script type='text/javascript' src='coverage_html.js'></script>
+ <script type='text/javascript' charset='utf-8'>
+ jQuery(document).ready(coverage.index_ready);
+ </script>
+</head>
+<body id='indexfile'>
+
+<div id='header'>
+ <div class='content'>
+ <h1>Coverage report:
+ <span class='pc_cov'>58.79%</span>
+ </h1>
+ <img id='keyboard_icon' src='keybd_closed.png'>
+ </div>
+</div>
+
+<div class='help_panel'>
+ <img id='panel_icon' src='keybd_open.png'>
+ <p class='legend'>Hot-keys on this page</p>
+ <div>
+ <p class='keyhelp'>
+ <span class='key'>n</span>
+ <span class='key'>s</span>
+ <span class='key'>m</span>
+
+ <span class='key'>c</span> &nbsp; change column sorting
+ </p>
+ </div>
+</div>
+
+<div id='index'>
+ <table class='index'>
+ <thead>
+
+ <tr class='tablehead' title='Click to sort'>
+ <th class='name left headerSortDown shortkey_n'>Module</th>
+ <th class='shortkey_s'>statements</th>
+ <th class='shortkey_m'>missing</th>
+
+ <th class='right shortkey_c'>coverage</th>
+ </tr>
+ </thead>
+
+ <tfoot>
+ <tr class='total'>
+ <td class='name left'>Total</td>
+ <td>301</td>
+ <td>211</td>
+
+ <td class='right'>58.79%</td>
+ </tr>
+ </tfoot>
+ <tbody>
+
+ <tr class='file'>
+ <td class='name left'><a href='helenus.html'>helenus.js</a></td>
+ <td>11</td>
+ <td>0</td>
+
+ <td class='right'>100.00%</td>
+ </tr>
+
+ <tr class='file'>
+ <td class='name left'><a href='pool.html'>pool.js</a></td>
+ <td>50</td>
+ <td>14</td>
+
+ <td class='right'>78.13%</td>
+ </tr>
+
+ <tr class='file'>
+ <td class='name left'><a href='connection.html'>connection.js</a></td>
+ <td>125</td>
+ <td>25</td>
+
+ <td class='right'>83.33%</td>
+ </tr>
+
+ <tr class='file'>
+ <td class='name left'><a href='row.html'>row.js</a></td>
+ <td>28</td>
+ <td>21</td>
+
+ <td class='right'>57.14%</td>
+ </tr>
+
+ <tr class='file'>
+ <td class='name left'><a href='marshal_index.html'>marshal/index.js</a></td>
+ <td>28</td>
+ <td>39</td>
+
+ <td class='right'>41.79%</td>
+ </tr>
+
+ <tr class='file'>
+ <td class='name left'><a href='marshal_serializers.html'>marshal/serializers.js</a></td>
+ <td>17</td>
+ <td>37</td>
+
+ <td class='right'>31.48%</td>
+ </tr>
+
+ <tr class='file'>
+ <td class='name left'><a href='marshal_deserializers.html'>marshal/deserializers.js</a></td>
+ <td>20</td>
+ <td>16</td>
+
+ <td class='right'>55.56%</td>
+ </tr>
+
+ <tr class='file'>
+ <td class='name left'><a href='keyspace.html'>keyspace.js</a></td>
+ <td>12</td>
+ <td>31</td>
+
+ <td class='right'>27.91%</td>
+ </tr>
+
+ <tr class='file'>
+ <td class='name left'><a href='column_family.html'>column_family.js</a></td>
+ <td>6</td>
+ <td>23</td>
+
+ <td class='right'>20.69%</td>
+ </tr>
+
+ <tr class='file'>
+ <td class='name left'><a href='column.html'>column.js</a></td>
+ <td>4</td>
+ <td>5</td>
+
+ <td class='right'>44.44%</td>
+ </tr>
+
+ </tbody>
+ </table>
+ </div>
+
+<div id='footer'>
+ <div class='content'>
+ <p>
+ <a class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.3</a> |
+ template taken from <a class='nav' href='http://nedbatchelder.com/code/coverage/'>coverage.py</a>
+ </p>
+ </div>
+</div>
+</body>
+</html>
View
166 test/coverage/jquery-1.4.3.min.js
@@ -0,0 +1,166 @@
+/*!
+ * jQuery JavaScript Library v1.4.3
+ * http://jquery.com/
+ *
+ * Copyright 2010, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2010, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Thu Oct 14 23:10:06 2010 -0400
+ */
+(function(E,A){function U(){return false}function ba(){return true}function ja(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function Ga(a){var b,d,e=[],f=[],h,k,l,n,s,v,B,D;k=c.data(this,this.nodeType?"events":"__events__");if(typeof k==="function")k=k.events;if(!(a.liveFired===this||!k||!k.live||a.button&&a.type==="click")){if(a.namespace)D=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var H=k.live.slice(0);for(n=0;n<H.length;n++){k=H[n];k.origType.replace(X,
+"")===a.type?f.push(k.selector):H.splice(n--,1)}f=c(a.target).closest(f,a.currentTarget);s=0;for(v=f.length;s<v;s++){B=f[s];for(n=0;n<H.length;n++){k=H[n];if(B.selector===k.selector&&(!D||D.test(k.namespace))){l=B.elem;h=null;if(k.preType==="mouseenter"||k.preType==="mouseleave"){a.type=k.preType;h=c(a.relatedTarget).closest(k.selector)[0]}if(!h||h!==l)e.push({elem:l,handleObj:k,level:B.level})}}}s=0;for(v=e.length;s<v;s++){f=e[s];if(d&&f.level>d)break;a.currentTarget=f.elem;a.data=f.handleObj.data;
+a.handleObj=f.handleObj;D=f.handleObj.origHandler.apply(f.elem,arguments);if(D===false||a.isPropagationStopped()){d=f.level;if(D===false)b=false}}return b}}function Y(a,b){return(a&&a!=="*"?a+".":"")+b.replace(Ha,"`").replace(Ia,"&")}function ka(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(Ja.test(b))return c.filter(b,
+e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function la(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this,e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var k in e[h])c.event.add(this,h,e[h][k],e[h][k].data)}}})}function Ka(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}
+function ma(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?La:Ma,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a,"margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function ca(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Na.test(a)?e(a,h):ca(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)?
+e(a,""):c.each(b,function(f,h){ca(a+"["+f+"]",h,d,e)});else e(a,b)}function S(a,b){var d={};c.each(na.concat.apply([],na.slice(0,b)),function(){d[this]=a});return d}function oa(a){if(!da[a]){var b=c("<"+a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";da[a]=d}return da[a]}function ea(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var u=E.document,c=function(){function a(){if(!b