added coverage and spec report; moved all documentation related stuff to doc instead of rdoc - reportable - Fork of reportable required by WarVox, from hdm/reportable.
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
       ---
 (DIR) commit 2c898eb62e8d6b249589775769e6b603b87fb008
 (DIR) parent 929610c2345e54b6f1740f0f2e545440d9c2d3a4
 (HTM) Author: Marco Otte-Witte <marco.otte-witte@simplabs.com>
       Date:   Wed, 29 Apr 2009 18:54:59 +0200
       
       added coverage and spec report; moved all documentation related stuff to doc instead of rdoc
       
       Diffstat:
         M Rakefile                            |       9 +++++++--
         R rdoc/classes/Simplabs/ReportsAsSpa… |       0 
         R rdoc/classes/Simplabs/ReportsAsSpa… |       0 
         R rdoc/classes/Simplabs/ReportsAsSpa… |       0 
         R rdoc/classes/Simplabs/ReportsAsSpa… |       0 
         R rdoc/classes/Simplabs/ReportsAsSpa… |       0 
         R rdoc/classes/Simplabs/ReportsAsSpa… |       0 
         A doc/coverage/index.html             |     387 +++++++++++++++++++++++++++++++
         A doc/coverage/lib-simplabs-reports_… |     655 +++++++++++++++++++++++++++++++
         A doc/coverage/lib-simplabs-reports_… |     729 +++++++++++++++++++++++++++++++
         A doc/coverage/lib-simplabs-reports_… |     708 +++++++++++++++++++++++++++++++
         A doc/coverage/lib-simplabs-reports_… |     729 +++++++++++++++++++++++++++++++
         A doc/coverage/lib-simplabs-reports_… |     718 +++++++++++++++++++++++++++++++
         A doc/coverage/lib-simplabs-reports_… |     649 +++++++++++++++++++++++++++++++
         A doc/coverage/lib-simplabs-reports_… |     668 +++++++++++++++++++++++++++++++
         A doc/created.rid                     |       1 +
         R rdoc/files/README_rdoc.html -> doc… |       0 
         R rdoc/files/lib/simplabs/reports_as… |       0 
         R rdoc/files/lib/simplabs/reports_as… |       0 
         A doc/files/lib/simplabs/reports_as_… |     102 +++++++++++++++++++++++++++++++
         A doc/files/lib/simplabs/reports_as_… |     102 +++++++++++++++++++++++++++++++
         A doc/files/lib/simplabs/reports_as_… |     102 +++++++++++++++++++++++++++++++
         R rdoc/files/lib/simplabs/reports_as… |       0 
         R rdoc/files/lib/simplabs/reports_as… |       0 
         R rdoc/fr_class_index.html -> doc/fr… |       0 
         R rdoc/fr_file_index.html -> doc/fr_… |       0 
         R rdoc/fr_method_index.html -> doc/f… |       0 
         R rdoc/index.html -> doc/index.html   |       0 
         R rdoc/rdoc-style.css -> doc/rdoc-st… |       0 
         A doc/spec.html                       |    1093 +++++++++++++++++++++++++++++++
         D rdoc/created.rid                    |       1 -
         D rdoc/files/lib/simplabs/reports_as… |     102 -------------------------------
         D rdoc/files/lib/simplabs/reports_as… |     102 -------------------------------
         D rdoc/files/lib/simplabs/reports_as… |     102 -------------------------------
       
       34 files changed, 6650 insertions(+), 309 deletions(-)
       ---
 (DIR) diff --git a/Rakefile b/Rakefile
       @@ -7,13 +7,18 @@ task :default => :spec
        
        desc 'Run the specs'
        Spec::Rake::SpecTask.new(:spec) do |t|
       -  t.spec_opts = ['-cfs']
       +  t.spec_opts << '--color'
       +  t.spec_opts << '--format=html:doc/spec.html'
       +  t.spec_opts << '--format=specdoc'
       +  t.rcov = true
       +  t.rcov_opts << '--exclude "gems/*,spec/*,init.rb"'
       +  t.rcov_dir = 'doc/coverage'
          t.spec_files = FileList['spec/**/*_spec.rb']
        end
        
        desc 'Generate documentation for the ReportsAsSparkline plugin.'
        Rake::RDocTask.new(:rdoc) do |rdoc|
       -  rdoc.rdoc_dir = 'rdoc'
       +  rdoc.rdoc_dir = 'doc'
          rdoc.title    = 'ReportsAsSparkline'
          rdoc.options << '--line-numbers' << '--inline-source'
          rdoc.rdoc_files.include('README.rdoc')
 (DIR) diff --git a/rdoc/classes/Simplabs/ReportsAsSparkline/ClassMethods.html b/doc/classes/Simplabs/ReportsAsSparkline/ClassMethods.html
 (DIR) diff --git a/rdoc/classes/Simplabs/ReportsAsSparkline/CumulatedReport.html b/doc/classes/Simplabs/ReportsAsSparkline/CumulatedReport.html
 (DIR) diff --git a/rdoc/classes/Simplabs/ReportsAsSparkline/Grouping.html b/doc/classes/Simplabs/ReportsAsSparkline/Grouping.html
 (DIR) diff --git a/rdoc/classes/Simplabs/ReportsAsSparkline/Report.html b/doc/classes/Simplabs/ReportsAsSparkline/Report.html
 (DIR) diff --git a/rdoc/classes/Simplabs/ReportsAsSparkline/ReportingPeriod.html b/doc/classes/Simplabs/ReportsAsSparkline/ReportingPeriod.html
 (DIR) diff --git a/rdoc/classes/Simplabs/ReportsAsSparkline/SparklineTagHelper.html b/doc/classes/Simplabs/ReportsAsSparkline/SparklineTagHelper.html
 (DIR) diff --git a/doc/coverage/index.html b/doc/coverage/index.html
       @@ -0,0 +1,387 @@
       +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       +<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'><head><title>C0 code coverage information</title>
       +    <style type='text/css'>body { background-color: rgb(240, 240, 245); }</style>
       +    <style type='text/css'>span.cross-ref-title {
       + font-size: 140%;
       +}
       +span.cross-ref a {
       + text-decoration: none;
       +}
       +span.cross-ref {
       + background-color:#f3f7fa;
       + border: 1px dashed #333;
       + margin: 1em;
       + padding: 0.5em;
       + overflow: hidden;
       +}
       +a.crossref-toggle {
       + text-decoration: none;
       +}
       +span.marked0 {
       + background-color: rgb(185, 210, 200);
       + display: block;
       +}
       +span.marked1 {
       + background-color: rgb(190, 215, 205);
       + display: block;
       +}
       +span.inferred0 {
       + background-color: rgb(175, 200, 200);
       + display: block;
       +}
       +span.inferred1 {
       + background-color: rgb(180, 205, 205);
       + display: block;
       +}
       +span.uncovered0 {
       + background-color: rgb(225, 110, 110);
       + display: block;
       +}
       +span.uncovered1 {
       + background-color: rgb(235, 120, 120);
       + display: block;
       +}
       +span.overview {
       + border-bottom: 8px solid black;
       +}
       +div.overview {
       + border-bottom: 8px solid black;
       +}
       +body {
       + font-family: verdana, arial, helvetica;
       +}
       +div.footer {
       + font-size: 68%;
       + margin-top: 1.5em;
       +}
       +h1, h2, h3, h4, h5, h6 {
       + margin-bottom: 0.5em;
       +}
       +h5 {
       + margin-top: 0.5em;
       +}
       +.hidden {
       + display: none;
       +}
       +div.separator {
       + height: 10px;
       +}
       +/* Commented out for better readability, esp. on IE */
       +/*
       +table tr td, table tr th {
       + font-size: 68%;
       +}
       +td.value table tr td {
       + font-size: 11px;
       +}
       +*/
       +table.percent_graph {
       + height: 12px;
       + border: #808080 1px solid;
       + empty-cells: show;
       +}
       +table.percent_graph td.covered {
       + height: 10px;
       + background: #00f000;
       +}
       +table.percent_graph td.uncovered {
       + height: 10px;
       + background: #e00000;
       +}
       +table.percent_graph td.NA {
       + height: 10px;
       + background: #eaeaea;
       +}
       +table.report {
       + border-collapse: collapse;
       + width: 100%;
       +}
       +table.report td.heading {
       + background: #dcecff;
       + border: #d0d0d0 1px solid;
       + font-weight: bold;
       + text-align: center;
       +}
       +table.report td.heading:hover {
       + background: #c0ffc0;
       +}
       +table.report td.text {
       + border: #d0d0d0 1px solid;
       +}
       +table.report td.value,
       +table.report td.lines_total,
       +table.report td.lines_code {
       + text-align: right;
       + border: #d0d0d0 1px solid;
       +}
       +table.report tr.light {
       + background-color: rgb(240, 240, 245);
       +}
       +table.report tr.dark {
       + background-color: rgb(230, 230, 235);
       +}
       +</style>
       +    <script type='text/javascript'>
       +// <![CDATA[
       +  function toggleCode( id ) {
       +    if ( document.getElementById )
       +      elem = document.getElementById( id );
       +    else if ( document.all )
       +      elem = eval( "document.all." + id );
       +    else
       +      return false;
       +
       +    elemStyle = elem.style;
       +    
       +    if ( elemStyle.display != "block" ) {
       +      elemStyle.display = "block"
       +    } else {
       +      elemStyle.display = "none"
       +    }
       +
       +    return true;
       +  }
       +  
       +  // Make cross-references hidden by default
       +  document.writeln( "<style type=\"text/css\">span.cross-ref { display: none }</style>" )
       +  // ]]>
       +</script>
       +    </head>
       +  <body><h3>C0 code coverage information</h3>
       +    <p>Generated on Wed Apr 29 18:53:07 +0200 2009 with <a href='http://eigenclass.org/hiki/rcov'>rcov 0.8.1.2</a>
       +      </p>
       +    <hr/>
       +    <table class='report'><thead><tr><td class='heading'>Name</td>
       +      <td class='heading'>Total lines</td>
       +      <td class='heading'>Lines of code</td>
       +      <td class='heading'>Total coverage</td>
       +      <td class='heading'>Code coverage</td>
       +      </tr>
       +    </thead>
       +  <tbody><tr class='light'><td>TOTAL</td>
       +      <td class='lines_total'><tt>586</tt>
       +        </td>
       +      <td class='lines_code'><tt>404</tt>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_total'>98.6%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='99'/>
       +                  <td class='uncovered' width='1'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_code'>98.0%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='98'/>
       +                  <td class='uncovered' width='2'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      </tr>
       +    <tr class='dark'><td><a href='lib-simplabs-reports_as_sparkline_rb.html'>lib/simplabs/reports_as_sparkline.rb</a>
       +        </td>
       +      <td class='lines_total'><tt>58</tt>
       +        </td>
       +      <td class='lines_code'><tt>22</tt>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_total'>98.3%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='98'/>
       +                  <td class='uncovered' width='2'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_code'>95.5%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='95'/>
       +                  <td class='uncovered' width='5'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      </tr>
       +    <tr class='light'><td><a href='lib-simplabs-reports_as_sparkline-cumulated_report_rb.html'>lib/simplabs/reports_as_sparkline/cumulated_report.rb</a>
       +        </td>
       +      <td class='lines_total'><tt>45</tt>
       +        </td>
       +      <td class='lines_code'><tt>24</tt>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_total'>100.0%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='100'/>
       +                  <td class='uncovered' width='0'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_code'>100.0%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='100'/>
       +                  <td class='uncovered' width='0'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      </tr>
       +    <tr class='dark'><td><a href='lib-simplabs-reports_as_sparkline-grouping_rb.html'>lib/simplabs/reports_as_sparkline/grouping.rb</a>
       +        </td>
       +      <td class='lines_total'><tt>119</tt>
       +        </td>
       +      <td class='lines_code'><tt>99</tt>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_total'>98.3%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='98'/>
       +                  <td class='uncovered' width='2'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_code'>98.0%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='98'/>
       +                  <td class='uncovered' width='2'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      </tr>
       +    <tr class='light'><td><a href='lib-simplabs-reports_as_sparkline-report_rb.html'>lib/simplabs/reports_as_sparkline/report.rb</a>
       +        </td>
       +      <td class='lines_total'><tt>119</tt>
       +        </td>
       +      <td class='lines_code'><tt>83</tt>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_total'>100.0%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='100'/>
       +                  <td class='uncovered' width='0'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_code'>100.0%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='100'/>
       +                  <td class='uncovered' width='0'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      </tr>
       +    <tr class='dark'><td><a href='lib-simplabs-reports_as_sparkline-report_cache_rb.html'>lib/simplabs/reports_as_sparkline/report_cache.rb</a>
       +        </td>
       +      <td class='lines_total'><tt>98</tt>
       +        </td>
       +      <td class='lines_code'><tt>83</tt>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_total'>99.0%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='99'/>
       +                  <td class='uncovered' width='1'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_code'>98.8%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='99'/>
       +                  <td class='uncovered' width='1'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      </tr>
       +    <tr class='light'><td><a href='lib-simplabs-reports_as_sparkline-reporting_period_rb.html'>lib/simplabs/reports_as_sparkline/reporting_period.rb</a>
       +        </td>
       +      <td class='lines_total'><tt>108</tt>
       +        </td>
       +      <td class='lines_code'><tt>76</tt>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_total'>96.3%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='96'/>
       +                  <td class='uncovered' width='4'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_code'>94.7%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='95'/>
       +                  <td class='uncovered' width='5'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      </tr>
       +    <tr class='dark'><td><a href='lib-simplabs-reports_as_sparkline-sparkline_tag_helper_rb.html'>lib/simplabs/reports_as_sparkline/sparkline_tag_helper.rb</a>
       +        </td>
       +      <td class='lines_total'><tt>39</tt>
       +        </td>
       +      <td class='lines_code'><tt>17</tt>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_total'>100.0%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='100'/>
       +                  <td class='uncovered' width='0'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_code'>100.0%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='100'/>
       +                  <td class='uncovered' width='0'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      </tr>
       +    </tbody>
       +  </table>
       +<hr/>
       +    <p>Generated using the <a href='http://eigenclass.org/hiki.rb?rcov'>rcov code coverage analysis tool for Ruby</a>
       +   version 0.8.1.2.</p>
       +<p><a href='http://validator.w3.org/check/referer'><img src='http://www.w3.org/Icons/valid-xhtml11' height='31' alt='Valid XHTML 1.1!' width='88'/>
       +        </a>
       +      <a href='http://jigsaw.w3.org/css-validator/check/referer'><img src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Valid CSS!' style='border:0;width:88px;height:31px'/>
       +        </a>
       +      </p>
       +    </body>
       +  </html>
 (DIR) diff --git a/doc/coverage/lib-simplabs-reports_as_sparkline-cumulated_report_rb.html b/doc/coverage/lib-simplabs-reports_as_sparkline-cumulated_report_rb.html
       @@ -0,0 +1,655 @@
       +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       +<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'><head><title>lib/simplabs/reports_as_sparkline/cumulated_report.rb - C0 code coverage information</title>
       +    <style type='text/css'>body { background-color: rgb(240, 240, 245); }</style>
       +    <style type='text/css'>span.cross-ref-title {
       + font-size: 140%;
       +}
       +span.cross-ref a {
       + text-decoration: none;
       +}
       +span.cross-ref {
       + background-color:#f3f7fa;
       + border: 1px dashed #333;
       + margin: 1em;
       + padding: 0.5em;
       + overflow: hidden;
       +}
       +a.crossref-toggle {
       + text-decoration: none;
       +}
       +span.marked0 {
       + background-color: rgb(185, 210, 200);
       + display: block;
       +}
       +span.marked1 {
       + background-color: rgb(190, 215, 205);
       + display: block;
       +}
       +span.inferred0 {
       + background-color: rgb(175, 200, 200);
       + display: block;
       +}
       +span.inferred1 {
       + background-color: rgb(180, 205, 205);
       + display: block;
       +}
       +span.uncovered0 {
       + background-color: rgb(225, 110, 110);
       + display: block;
       +}
       +span.uncovered1 {
       + background-color: rgb(235, 120, 120);
       + display: block;
       +}
       +span.overview {
       + border-bottom: 8px solid black;
       +}
       +div.overview {
       + border-bottom: 8px solid black;
       +}
       +body {
       + font-family: verdana, arial, helvetica;
       +}
       +div.footer {
       + font-size: 68%;
       + margin-top: 1.5em;
       +}
       +h1, h2, h3, h4, h5, h6 {
       + margin-bottom: 0.5em;
       +}
       +h5 {
       + margin-top: 0.5em;
       +}
       +.hidden {
       + display: none;
       +}
       +div.separator {
       + height: 10px;
       +}
       +/* Commented out for better readability, esp. on IE */
       +/*
       +table tr td, table tr th {
       + font-size: 68%;
       +}
       +td.value table tr td {
       + font-size: 11px;
       +}
       +*/
       +table.percent_graph {
       + height: 12px;
       + border: #808080 1px solid;
       + empty-cells: show;
       +}
       +table.percent_graph td.covered {
       + height: 10px;
       + background: #00f000;
       +}
       +table.percent_graph td.uncovered {
       + height: 10px;
       + background: #e00000;
       +}
       +table.percent_graph td.NA {
       + height: 10px;
       + background: #eaeaea;
       +}
       +table.report {
       + border-collapse: collapse;
       + width: 100%;
       +}
       +table.report td.heading {
       + background: #dcecff;
       + border: #d0d0d0 1px solid;
       + font-weight: bold;
       + text-align: center;
       +}
       +table.report td.heading:hover {
       + background: #c0ffc0;
       +}
       +table.report td.text {
       + border: #d0d0d0 1px solid;
       +}
       +table.report td.value,
       +table.report td.lines_total,
       +table.report td.lines_code {
       + text-align: right;
       + border: #d0d0d0 1px solid;
       +}
       +table.report tr.light {
       + background-color: rgb(240, 240, 245);
       +}
       +table.report tr.dark {
       + background-color: rgb(230, 230, 235);
       +}
       +</style>
       +    <script type='text/javascript'>
       +// <![CDATA[
       +  function toggleCode( id ) {
       +    if ( document.getElementById )
       +      elem = document.getElementById( id );
       +    else if ( document.all )
       +      elem = eval( "document.all." + id );
       +    else
       +      return false;
       +
       +    elemStyle = elem.style;
       +    
       +    if ( elemStyle.display != "block" ) {
       +      elemStyle.display = "block"
       +    } else {
       +      elemStyle.display = "none"
       +    }
       +
       +    return true;
       +  }
       +  
       +  // Make cross-references hidden by default
       +  document.writeln( "<style type=\"text/css\">span.cross-ref { display: none }</style>" )
       +  // ]]>
       +</script>
       +    <style type='text/css'>span.run0 {
       +  background-color: rgb(178, 204, 255);
       +  display: block;
       +}
       +span.run1 {
       +  background-color: rgb(178, 206, 255);
       +  display: block;
       +}
       +span.run2 {
       +  background-color: rgb(178, 209, 255);
       +  display: block;
       +}
       +span.run3 {
       +  background-color: rgb(178, 211, 255);
       +  display: block;
       +}
       +span.run4 {
       +  background-color: rgb(178, 214, 255);
       +  display: block;
       +}
       +span.run5 {
       +  background-color: rgb(178, 218, 255);
       +  display: block;
       +}
       +span.run6 {
       +  background-color: rgb(178, 220, 255);
       +  display: block;
       +}
       +span.run7 {
       +  background-color: rgb(178, 223, 255);
       +  display: block;
       +}
       +span.run8 {
       +  background-color: rgb(178, 225, 255);
       +  display: block;
       +}
       +span.run9 {
       +  background-color: rgb(178, 228, 255);
       +  display: block;
       +}
       +span.run10 {
       +  background-color: rgb(178, 232, 255);
       +  display: block;
       +}
       +span.run11 {
       +  background-color: rgb(178, 234, 255);
       +  display: block;
       +}
       +span.run12 {
       +  background-color: rgb(178, 237, 255);
       +  display: block;
       +}
       +span.run13 {
       +  background-color: rgb(178, 239, 255);
       +  display: block;
       +}
       +span.run14 {
       +  background-color: rgb(178, 242, 255);
       +  display: block;
       +}
       +span.run15 {
       +  background-color: rgb(178, 246, 255);
       +  display: block;
       +}
       +span.run16 {
       +  background-color: rgb(178, 248, 255);
       +  display: block;
       +}
       +span.run17 {
       +  background-color: rgb(178, 251, 255);
       +  display: block;
       +}
       +span.run18 {
       +  background-color: rgb(178, 253, 255);
       +  display: block;
       +}
       +span.run19 {
       +  background-color: rgb(178, 255, 253);
       +  display: block;
       +}
       +span.run20 {
       +  background-color: rgb(178, 255, 249);
       +  display: block;
       +}
       +span.run21 {
       +  background-color: rgb(178, 255, 247);
       +  display: block;
       +}
       +span.run22 {
       +  background-color: rgb(178, 255, 244);
       +  display: block;
       +}
       +span.run23 {
       +  background-color: rgb(178, 255, 242);
       +  display: block;
       +}
       +span.run24 {
       +  background-color: rgb(178, 255, 239);
       +  display: block;
       +}
       +span.run25 {
       +  background-color: rgb(178, 255, 235);
       +  display: block;
       +}
       +span.run26 {
       +  background-color: rgb(178, 255, 233);
       +  display: block;
       +}
       +span.run27 {
       +  background-color: rgb(178, 255, 230);
       +  display: block;
       +}
       +span.run28 {
       +  background-color: rgb(178, 255, 228);
       +  display: block;
       +}
       +span.run29 {
       +  background-color: rgb(178, 255, 225);
       +  display: block;
       +}
       +span.run30 {
       +  background-color: rgb(178, 255, 221);
       +  display: block;
       +}
       +span.run31 {
       +  background-color: rgb(178, 255, 219);
       +  display: block;
       +}
       +span.run32 {
       +  background-color: rgb(178, 255, 216);
       +  display: block;
       +}
       +span.run33 {
       +  background-color: rgb(178, 255, 214);
       +  display: block;
       +}
       +span.run34 {
       +  background-color: rgb(178, 255, 211);
       +  display: block;
       +}
       +span.run35 {
       +  background-color: rgb(178, 255, 207);
       +  display: block;
       +}
       +span.run36 {
       +  background-color: rgb(178, 255, 205);
       +  display: block;
       +}
       +span.run37 {
       +  background-color: rgb(178, 255, 202);
       +  display: block;
       +}
       +span.run38 {
       +  background-color: rgb(178, 255, 200);
       +  display: block;
       +}
       +span.run39 {
       +  background-color: rgb(178, 255, 197);
       +  display: block;
       +}
       +span.run40 {
       +  background-color: rgb(178, 255, 193);
       +  display: block;
       +}
       +span.run41 {
       +  background-color: rgb(178, 255, 191);
       +  display: block;
       +}
       +span.run42 {
       +  background-color: rgb(178, 255, 188);
       +  display: block;
       +}
       +span.run43 {
       +  background-color: rgb(178, 255, 186);
       +  display: block;
       +}
       +span.run44 {
       +  background-color: rgb(178, 255, 183);
       +  display: block;
       +}
       +span.run45 {
       +  background-color: rgb(178, 255, 179);
       +  display: block;
       +}
       +span.run46 {
       +  background-color: rgb(179, 255, 178);
       +  display: block;
       +}
       +span.run47 {
       +  background-color: rgb(182, 255, 178);
       +  display: block;
       +}
       +span.run48 {
       +  background-color: rgb(184, 255, 178);
       +  display: block;
       +}
       +span.run49 {
       +  background-color: rgb(187, 255, 178);
       +  display: block;
       +}
       +span.run50 {
       +  background-color: rgb(191, 255, 178);
       +  display: block;
       +}
       +span.run51 {
       +  background-color: rgb(193, 255, 178);
       +  display: block;
       +}
       +span.run52 {
       +  background-color: rgb(196, 255, 178);
       +  display: block;
       +}
       +span.run53 {
       +  background-color: rgb(198, 255, 178);
       +  display: block;
       +}
       +span.run54 {
       +  background-color: rgb(201, 255, 178);
       +  display: block;
       +}
       +span.run55 {
       +  background-color: rgb(205, 255, 178);
       +  display: block;
       +}
       +span.run56 {
       +  background-color: rgb(207, 255, 178);
       +  display: block;
       +}
       +span.run57 {
       +  background-color: rgb(210, 255, 178);
       +  display: block;
       +}
       +span.run58 {
       +  background-color: rgb(212, 255, 178);
       +  display: block;
       +}
       +span.run59 {
       +  background-color: rgb(215, 255, 178);
       +  display: block;
       +}
       +span.run60 {
       +  background-color: rgb(219, 255, 178);
       +  display: block;
       +}
       +span.run61 {
       +  background-color: rgb(221, 255, 178);
       +  display: block;
       +}
       +span.run62 {
       +  background-color: rgb(224, 255, 178);
       +  display: block;
       +}
       +span.run63 {
       +  background-color: rgb(226, 255, 178);
       +  display: block;
       +}
       +span.run64 {
       +  background-color: rgb(229, 255, 178);
       +  display: block;
       +}
       +span.run65 {
       +  background-color: rgb(233, 255, 178);
       +  display: block;
       +}
       +span.run66 {
       +  background-color: rgb(235, 255, 178);
       +  display: block;
       +}
       +span.run67 {
       +  background-color: rgb(238, 255, 178);
       +  display: block;
       +}
       +span.run68 {
       +  background-color: rgb(240, 255, 178);
       +  display: block;
       +}
       +span.run69 {
       +  background-color: rgb(243, 255, 178);
       +  display: block;
       +}
       +span.run70 {
       +  background-color: rgb(247, 255, 178);
       +  display: block;
       +}
       +span.run71 {
       +  background-color: rgb(249, 255, 178);
       +  display: block;
       +}
       +span.run72 {
       +  background-color: rgb(252, 255, 178);
       +  display: block;
       +}
       +span.run73 {
       +  background-color: rgb(255, 255, 178);
       +  display: block;
       +}
       +span.run74 {
       +  background-color: rgb(255, 252, 178);
       +  display: block;
       +}
       +span.run75 {
       +  background-color: rgb(255, 248, 178);
       +  display: block;
       +}
       +span.run76 {
       +  background-color: rgb(255, 246, 178);
       +  display: block;
       +}
       +span.run77 {
       +  background-color: rgb(255, 243, 178);
       +  display: block;
       +}
       +span.run78 {
       +  background-color: rgb(255, 240, 178);
       +  display: block;
       +}
       +span.run79 {
       +  background-color: rgb(255, 238, 178);
       +  display: block;
       +}
       +span.run80 {
       +  background-color: rgb(255, 234, 178);
       +  display: block;
       +}
       +span.run81 {
       +  background-color: rgb(255, 232, 178);
       +  display: block;
       +}
       +span.run82 {
       +  background-color: rgb(255, 229, 178);
       +  display: block;
       +}
       +span.run83 {
       +  background-color: rgb(255, 226, 178);
       +  display: block;
       +}
       +span.run84 {
       +  background-color: rgb(255, 224, 178);
       +  display: block;
       +}
       +span.run85 {
       +  background-color: rgb(255, 220, 178);
       +  display: block;
       +}
       +span.run86 {
       +  background-color: rgb(255, 218, 178);
       +  display: block;
       +}
       +span.run87 {
       +  background-color: rgb(255, 215, 178);
       +  display: block;
       +}
       +span.run88 {
       +  background-color: rgb(255, 212, 178);
       +  display: block;
       +}
       +span.run89 {
       +  background-color: rgb(255, 210, 178);
       +  display: block;
       +}
       +span.run90 {
       +  background-color: rgb(255, 206, 178);
       +  display: block;
       +}
       +span.run91 {
       +  background-color: rgb(255, 204, 178);
       +  display: block;
       +}
       +span.run92 {
       +  background-color: rgb(255, 201, 178);
       +  display: block;
       +}
       +span.run93 {
       +  background-color: rgb(255, 198, 178);
       +  display: block;
       +}
       +span.run94 {
       +  background-color: rgb(255, 196, 178);
       +  display: block;
       +}
       +span.run95 {
       +  background-color: rgb(255, 192, 178);
       +  display: block;
       +}
       +span.run96 {
       +  background-color: rgb(255, 189, 178);
       +  display: block;
       +}
       +span.run97 {
       +  background-color: rgb(255, 187, 178);
       +  display: block;
       +}
       +span.run98 {
       +  background-color: rgb(255, 184, 178);
       +  display: block;
       +}
       +span.run99 {
       +  background-color: rgb(255, 182, 178);
       +  display: block;
       +}
       +span.run100 {
       +  background-color: rgb(255, 178, 178);
       +  display: block;
       +}
       +</style>
       +    </head>
       +  <body><h3>C0 code coverage information</h3>
       +    <p>Generated on Wed Apr 29 18:53:07 +0200 2009 with <a href='http://eigenclass.org/hiki/rcov'>rcov 0.8.1.2</a>
       +      </p>
       +    <hr/>
       +    <pre><span class='marked0'>Code reported as executed by Ruby looks like this...
       +</span><span class='marked1'>and this: this line is also marked as covered.
       +</span><span class='inferred0'>Lines considered as run by rcov, but not reported by Ruby, look like this,
       +</span><span class='inferred1'>and this: these lines were inferred by rcov (using simple heuristics).
       +</span><span class='uncovered0'>Finally, here&apos;s a line marked as not executed.
       +</span></pre>                       
       +<table class='report'><thead><tr><td class='heading'>Name</td>
       +      <td class='heading'>Total lines</td>
       +      <td class='heading'>Lines of code</td>
       +      <td class='heading'>Total coverage</td>
       +      <td class='heading'>Code coverage</td>
       +      </tr>
       +    </thead>
       +  <tbody><tr class='light'><td><a href='lib-simplabs-reports_as_sparkline-cumulated_report_rb.html'>lib/simplabs/reports_as_sparkline/cumulated_report.rb</a>
       +        </td>
       +      <td class='lines_total'><tt>45</tt>
       +        </td>
       +      <td class='lines_code'><tt>24</tt>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_total'>100.0%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='100'/>
       +                  <td class='uncovered' width='0'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_code'>100.0%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='100'/>
       +                  <td class='uncovered' width='0'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      </tr>
       +    </tbody>
       +  </table>
       +<pre><span class="marked1"><a name="line1"></a> 1 module Simplabs #:nodoc:
       +</span><span class="inferred0"><a name="line2"></a> 2 
       +</span><span class="marked1"><a name="line3"></a> 3   module ReportsAsSparkline #:nodoc:
       +</span><span class="inferred0"><a name="line4"></a> 4 
       +</span><span class="inferred1"><a name="line5"></a> 5     # A special report class that cumulates all data (see Simplabs::ReportsAsSparkline::Report)
       +</span><span class="inferred0"><a name="line6"></a> 6     #
       +</span><span class="inferred1"><a name="line7"></a> 7     # ==== Examples
       +</span><span class="inferred0"><a name="line8"></a> 8     #
       +</span><span class="inferred1"><a name="line9"></a> 9     #  When Simplabs::ReportsAsSparkline::Report returns
       +</span><span class="inferred0"><a name="line10"></a>10     #
       +</span><span class="inferred1"><a name="line11"></a>11     #    [[&lt;DateTime today&gt;, 1], [&lt;DateTime yesterday&gt;, 2], etc.]
       +</span><span class="inferred0"><a name="line12"></a>12     #
       +</span><span class="inferred1"><a name="line13"></a>13     #  Simplabs::ReportsAsSparkline::CumulatedReport returns
       +</span><span class="inferred0"><a name="line14"></a>14     #
       +</span><span class="inferred1"><a name="line15"></a>15     #    [[&lt;DateTime today&gt;, 3], [&lt;DateTime yesterday&gt;, 2], etc.]
       +</span><span class="marked0"><a name="line16"></a>16     class CumulatedReport &lt; Report
       +</span><span class="inferred1"><a name="line17"></a>17 
       +</span><span class="inferred0"><a name="line18"></a>18       # Runs the report (see Simplabs::ReportsAsSparkline::Report#run)
       +</span><span class="marked1"><a name="line19"></a>19       def run(options = {})
       +</span><span class="marked0"><a name="line20"></a>20         cumulate(super, options_for_run(options))
       +</span><span class="marked1"><a name="line21"></a>21       end
       +</span><span class="inferred0"><a name="line22"></a>22 
       +</span><span class="marked1"><a name="line23"></a>23       protected
       +</span><span class="inferred0"><a name="line24"></a>24 
       +</span><span class="marked1"><a name="line25"></a>25         def cumulate(data, options)
       +</span><span class="marked0"><a name="line26"></a>26           first_reporting_period = ReportingPeriod.first(options[:grouping], options[:limit], options[:end_date])
       +</span><span class="marked1"><a name="line27"></a>27           acc = initial_cumulative_value(first_reporting_period.date_time, options)
       +</span><span class="marked0"><a name="line28"></a>28           result = []
       +</span><span class="marked1"><a name="line29"></a>29           data.each do |element|
       +</span><span class="marked0"><a name="line30"></a>30             acc += element[1].to_f
       +</span><span class="marked1"><a name="line31"></a>31             result &lt;&lt; [element[0], acc]
       +</span><span class="inferred0"><a name="line32"></a>32           end
       +</span><span class="marked1"><a name="line33"></a>33           result
       +</span><span class="inferred0"><a name="line34"></a>34         end
       +</span><span class="inferred1"><a name="line35"></a>35 
       +</span><span class="marked0"><a name="line36"></a>36         def initial_cumulative_value(date, options)
       +</span><span class="marked1"><a name="line37"></a>37           conditions = setup_conditions(nil, date, options[:conditions])
       +</span><span class="marked0"><a name="line38"></a>38           @klass.send(@aggregation, @value_column, :conditions =&gt; conditions)
       +</span><span class="inferred1"><a name="line39"></a>39         end
       +</span><span class="inferred0"><a name="line40"></a>40 
       +</span><span class="inferred1"><a name="line41"></a>41     end
       +</span><span class="inferred0"><a name="line42"></a>42 
       +</span><span class="inferred1"><a name="line43"></a>43   end
       +</span><span class="inferred0"><a name="line44"></a>44 
       +</span><span class="inferred1"><a name="line45"></a>45 end
       +</span></pre><hr/>
       +    <p>Generated using the <a href='http://eigenclass.org/hiki.rb?rcov'>rcov code coverage analysis tool for Ruby</a>
       +   version 0.8.1.2.</p>
       +<p><a href='http://validator.w3.org/check/referer'><img src='http://www.w3.org/Icons/valid-xhtml10' height='31' alt='Valid XHTML 1.0!' width='88'/>
       +        </a>
       +      <a href='http://jigsaw.w3.org/css-validator/check/referer'><img src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Valid CSS!' style='border:0;width:88px;height:31px'/>
       +        </a>
       +      </p>
       +    </body>
       +  </html>
 (DIR) diff --git a/doc/coverage/lib-simplabs-reports_as_sparkline-grouping_rb.html b/doc/coverage/lib-simplabs-reports_as_sparkline-grouping_rb.html
       @@ -0,0 +1,729 @@
       +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       +<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'><head><title>lib/simplabs/reports_as_sparkline/grouping.rb - C0 code coverage information</title>
       +    <style type='text/css'>body { background-color: rgb(240, 240, 245); }</style>
       +    <style type='text/css'>span.cross-ref-title {
       + font-size: 140%;
       +}
       +span.cross-ref a {
       + text-decoration: none;
       +}
       +span.cross-ref {
       + background-color:#f3f7fa;
       + border: 1px dashed #333;
       + margin: 1em;
       + padding: 0.5em;
       + overflow: hidden;
       +}
       +a.crossref-toggle {
       + text-decoration: none;
       +}
       +span.marked0 {
       + background-color: rgb(185, 210, 200);
       + display: block;
       +}
       +span.marked1 {
       + background-color: rgb(190, 215, 205);
       + display: block;
       +}
       +span.inferred0 {
       + background-color: rgb(175, 200, 200);
       + display: block;
       +}
       +span.inferred1 {
       + background-color: rgb(180, 205, 205);
       + display: block;
       +}
       +span.uncovered0 {
       + background-color: rgb(225, 110, 110);
       + display: block;
       +}
       +span.uncovered1 {
       + background-color: rgb(235, 120, 120);
       + display: block;
       +}
       +span.overview {
       + border-bottom: 8px solid black;
       +}
       +div.overview {
       + border-bottom: 8px solid black;
       +}
       +body {
       + font-family: verdana, arial, helvetica;
       +}
       +div.footer {
       + font-size: 68%;
       + margin-top: 1.5em;
       +}
       +h1, h2, h3, h4, h5, h6 {
       + margin-bottom: 0.5em;
       +}
       +h5 {
       + margin-top: 0.5em;
       +}
       +.hidden {
       + display: none;
       +}
       +div.separator {
       + height: 10px;
       +}
       +/* Commented out for better readability, esp. on IE */
       +/*
       +table tr td, table tr th {
       + font-size: 68%;
       +}
       +td.value table tr td {
       + font-size: 11px;
       +}
       +*/
       +table.percent_graph {
       + height: 12px;
       + border: #808080 1px solid;
       + empty-cells: show;
       +}
       +table.percent_graph td.covered {
       + height: 10px;
       + background: #00f000;
       +}
       +table.percent_graph td.uncovered {
       + height: 10px;
       + background: #e00000;
       +}
       +table.percent_graph td.NA {
       + height: 10px;
       + background: #eaeaea;
       +}
       +table.report {
       + border-collapse: collapse;
       + width: 100%;
       +}
       +table.report td.heading {
       + background: #dcecff;
       + border: #d0d0d0 1px solid;
       + font-weight: bold;
       + text-align: center;
       +}
       +table.report td.heading:hover {
       + background: #c0ffc0;
       +}
       +table.report td.text {
       + border: #d0d0d0 1px solid;
       +}
       +table.report td.value,
       +table.report td.lines_total,
       +table.report td.lines_code {
       + text-align: right;
       + border: #d0d0d0 1px solid;
       +}
       +table.report tr.light {
       + background-color: rgb(240, 240, 245);
       +}
       +table.report tr.dark {
       + background-color: rgb(230, 230, 235);
       +}
       +</style>
       +    <script type='text/javascript'>
       +// <![CDATA[
       +  function toggleCode( id ) {
       +    if ( document.getElementById )
       +      elem = document.getElementById( id );
       +    else if ( document.all )
       +      elem = eval( "document.all." + id );
       +    else
       +      return false;
       +
       +    elemStyle = elem.style;
       +    
       +    if ( elemStyle.display != "block" ) {
       +      elemStyle.display = "block"
       +    } else {
       +      elemStyle.display = "none"
       +    }
       +
       +    return true;
       +  }
       +  
       +  // Make cross-references hidden by default
       +  document.writeln( "<style type=\"text/css\">span.cross-ref { display: none }</style>" )
       +  // ]]>
       +</script>
       +    <style type='text/css'>span.run0 {
       +  background-color: rgb(178, 204, 255);
       +  display: block;
       +}
       +span.run1 {
       +  background-color: rgb(178, 206, 255);
       +  display: block;
       +}
       +span.run2 {
       +  background-color: rgb(178, 209, 255);
       +  display: block;
       +}
       +span.run3 {
       +  background-color: rgb(178, 211, 255);
       +  display: block;
       +}
       +span.run4 {
       +  background-color: rgb(178, 214, 255);
       +  display: block;
       +}
       +span.run5 {
       +  background-color: rgb(178, 218, 255);
       +  display: block;
       +}
       +span.run6 {
       +  background-color: rgb(178, 220, 255);
       +  display: block;
       +}
       +span.run7 {
       +  background-color: rgb(178, 223, 255);
       +  display: block;
       +}
       +span.run8 {
       +  background-color: rgb(178, 225, 255);
       +  display: block;
       +}
       +span.run9 {
       +  background-color: rgb(178, 228, 255);
       +  display: block;
       +}
       +span.run10 {
       +  background-color: rgb(178, 232, 255);
       +  display: block;
       +}
       +span.run11 {
       +  background-color: rgb(178, 234, 255);
       +  display: block;
       +}
       +span.run12 {
       +  background-color: rgb(178, 237, 255);
       +  display: block;
       +}
       +span.run13 {
       +  background-color: rgb(178, 239, 255);
       +  display: block;
       +}
       +span.run14 {
       +  background-color: rgb(178, 242, 255);
       +  display: block;
       +}
       +span.run15 {
       +  background-color: rgb(178, 246, 255);
       +  display: block;
       +}
       +span.run16 {
       +  background-color: rgb(178, 248, 255);
       +  display: block;
       +}
       +span.run17 {
       +  background-color: rgb(178, 251, 255);
       +  display: block;
       +}
       +span.run18 {
       +  background-color: rgb(178, 253, 255);
       +  display: block;
       +}
       +span.run19 {
       +  background-color: rgb(178, 255, 253);
       +  display: block;
       +}
       +span.run20 {
       +  background-color: rgb(178, 255, 249);
       +  display: block;
       +}
       +span.run21 {
       +  background-color: rgb(178, 255, 247);
       +  display: block;
       +}
       +span.run22 {
       +  background-color: rgb(178, 255, 244);
       +  display: block;
       +}
       +span.run23 {
       +  background-color: rgb(178, 255, 242);
       +  display: block;
       +}
       +span.run24 {
       +  background-color: rgb(178, 255, 239);
       +  display: block;
       +}
       +span.run25 {
       +  background-color: rgb(178, 255, 235);
       +  display: block;
       +}
       +span.run26 {
       +  background-color: rgb(178, 255, 233);
       +  display: block;
       +}
       +span.run27 {
       +  background-color: rgb(178, 255, 230);
       +  display: block;
       +}
       +span.run28 {
       +  background-color: rgb(178, 255, 228);
       +  display: block;
       +}
       +span.run29 {
       +  background-color: rgb(178, 255, 225);
       +  display: block;
       +}
       +span.run30 {
       +  background-color: rgb(178, 255, 221);
       +  display: block;
       +}
       +span.run31 {
       +  background-color: rgb(178, 255, 219);
       +  display: block;
       +}
       +span.run32 {
       +  background-color: rgb(178, 255, 216);
       +  display: block;
       +}
       +span.run33 {
       +  background-color: rgb(178, 255, 214);
       +  display: block;
       +}
       +span.run34 {
       +  background-color: rgb(178, 255, 211);
       +  display: block;
       +}
       +span.run35 {
       +  background-color: rgb(178, 255, 207);
       +  display: block;
       +}
       +span.run36 {
       +  background-color: rgb(178, 255, 205);
       +  display: block;
       +}
       +span.run37 {
       +  background-color: rgb(178, 255, 202);
       +  display: block;
       +}
       +span.run38 {
       +  background-color: rgb(178, 255, 200);
       +  display: block;
       +}
       +span.run39 {
       +  background-color: rgb(178, 255, 197);
       +  display: block;
       +}
       +span.run40 {
       +  background-color: rgb(178, 255, 193);
       +  display: block;
       +}
       +span.run41 {
       +  background-color: rgb(178, 255, 191);
       +  display: block;
       +}
       +span.run42 {
       +  background-color: rgb(178, 255, 188);
       +  display: block;
       +}
       +span.run43 {
       +  background-color: rgb(178, 255, 186);
       +  display: block;
       +}
       +span.run44 {
       +  background-color: rgb(178, 255, 183);
       +  display: block;
       +}
       +span.run45 {
       +  background-color: rgb(178, 255, 179);
       +  display: block;
       +}
       +span.run46 {
       +  background-color: rgb(179, 255, 178);
       +  display: block;
       +}
       +span.run47 {
       +  background-color: rgb(182, 255, 178);
       +  display: block;
       +}
       +span.run48 {
       +  background-color: rgb(184, 255, 178);
       +  display: block;
       +}
       +span.run49 {
       +  background-color: rgb(187, 255, 178);
       +  display: block;
       +}
       +span.run50 {
       +  background-color: rgb(191, 255, 178);
       +  display: block;
       +}
       +span.run51 {
       +  background-color: rgb(193, 255, 178);
       +  display: block;
       +}
       +span.run52 {
       +  background-color: rgb(196, 255, 178);
       +  display: block;
       +}
       +span.run53 {
       +  background-color: rgb(198, 255, 178);
       +  display: block;
       +}
       +span.run54 {
       +  background-color: rgb(201, 255, 178);
       +  display: block;
       +}
       +span.run55 {
       +  background-color: rgb(205, 255, 178);
       +  display: block;
       +}
       +span.run56 {
       +  background-color: rgb(207, 255, 178);
       +  display: block;
       +}
       +span.run57 {
       +  background-color: rgb(210, 255, 178);
       +  display: block;
       +}
       +span.run58 {
       +  background-color: rgb(212, 255, 178);
       +  display: block;
       +}
       +span.run59 {
       +  background-color: rgb(215, 255, 178);
       +  display: block;
       +}
       +span.run60 {
       +  background-color: rgb(219, 255, 178);
       +  display: block;
       +}
       +span.run61 {
       +  background-color: rgb(221, 255, 178);
       +  display: block;
       +}
       +span.run62 {
       +  background-color: rgb(224, 255, 178);
       +  display: block;
       +}
       +span.run63 {
       +  background-color: rgb(226, 255, 178);
       +  display: block;
       +}
       +span.run64 {
       +  background-color: rgb(229, 255, 178);
       +  display: block;
       +}
       +span.run65 {
       +  background-color: rgb(233, 255, 178);
       +  display: block;
       +}
       +span.run66 {
       +  background-color: rgb(235, 255, 178);
       +  display: block;
       +}
       +span.run67 {
       +  background-color: rgb(238, 255, 178);
       +  display: block;
       +}
       +span.run68 {
       +  background-color: rgb(240, 255, 178);
       +  display: block;
       +}
       +span.run69 {
       +  background-color: rgb(243, 255, 178);
       +  display: block;
       +}
       +span.run70 {
       +  background-color: rgb(247, 255, 178);
       +  display: block;
       +}
       +span.run71 {
       +  background-color: rgb(249, 255, 178);
       +  display: block;
       +}
       +span.run72 {
       +  background-color: rgb(252, 255, 178);
       +  display: block;
       +}
       +span.run73 {
       +  background-color: rgb(255, 255, 178);
       +  display: block;
       +}
       +span.run74 {
       +  background-color: rgb(255, 252, 178);
       +  display: block;
       +}
       +span.run75 {
       +  background-color: rgb(255, 248, 178);
       +  display: block;
       +}
       +span.run76 {
       +  background-color: rgb(255, 246, 178);
       +  display: block;
       +}
       +span.run77 {
       +  background-color: rgb(255, 243, 178);
       +  display: block;
       +}
       +span.run78 {
       +  background-color: rgb(255, 240, 178);
       +  display: block;
       +}
       +span.run79 {
       +  background-color: rgb(255, 238, 178);
       +  display: block;
       +}
       +span.run80 {
       +  background-color: rgb(255, 234, 178);
       +  display: block;
       +}
       +span.run81 {
       +  background-color: rgb(255, 232, 178);
       +  display: block;
       +}
       +span.run82 {
       +  background-color: rgb(255, 229, 178);
       +  display: block;
       +}
       +span.run83 {
       +  background-color: rgb(255, 226, 178);
       +  display: block;
       +}
       +span.run84 {
       +  background-color: rgb(255, 224, 178);
       +  display: block;
       +}
       +span.run85 {
       +  background-color: rgb(255, 220, 178);
       +  display: block;
       +}
       +span.run86 {
       +  background-color: rgb(255, 218, 178);
       +  display: block;
       +}
       +span.run87 {
       +  background-color: rgb(255, 215, 178);
       +  display: block;
       +}
       +span.run88 {
       +  background-color: rgb(255, 212, 178);
       +  display: block;
       +}
       +span.run89 {
       +  background-color: rgb(255, 210, 178);
       +  display: block;
       +}
       +span.run90 {
       +  background-color: rgb(255, 206, 178);
       +  display: block;
       +}
       +span.run91 {
       +  background-color: rgb(255, 204, 178);
       +  display: block;
       +}
       +span.run92 {
       +  background-color: rgb(255, 201, 178);
       +  display: block;
       +}
       +span.run93 {
       +  background-color: rgb(255, 198, 178);
       +  display: block;
       +}
       +span.run94 {
       +  background-color: rgb(255, 196, 178);
       +  display: block;
       +}
       +span.run95 {
       +  background-color: rgb(255, 192, 178);
       +  display: block;
       +}
       +span.run96 {
       +  background-color: rgb(255, 189, 178);
       +  display: block;
       +}
       +span.run97 {
       +  background-color: rgb(255, 187, 178);
       +  display: block;
       +}
       +span.run98 {
       +  background-color: rgb(255, 184, 178);
       +  display: block;
       +}
       +span.run99 {
       +  background-color: rgb(255, 182, 178);
       +  display: block;
       +}
       +span.run100 {
       +  background-color: rgb(255, 178, 178);
       +  display: block;
       +}
       +</style>
       +    </head>
       +  <body><h3>C0 code coverage information</h3>
       +    <p>Generated on Wed Apr 29 18:53:07 +0200 2009 with <a href='http://eigenclass.org/hiki/rcov'>rcov 0.8.1.2</a>
       +      </p>
       +    <hr/>
       +    <pre><span class='marked0'>Code reported as executed by Ruby looks like this...
       +</span><span class='marked1'>and this: this line is also marked as covered.
       +</span><span class='inferred0'>Lines considered as run by rcov, but not reported by Ruby, look like this,
       +</span><span class='inferred1'>and this: these lines were inferred by rcov (using simple heuristics).
       +</span><span class='uncovered0'>Finally, here&apos;s a line marked as not executed.
       +</span></pre>                       
       +<table class='report'><thead><tr><td class='heading'>Name</td>
       +      <td class='heading'>Total lines</td>
       +      <td class='heading'>Lines of code</td>
       +      <td class='heading'>Total coverage</td>
       +      <td class='heading'>Code coverage</td>
       +      </tr>
       +    </thead>
       +  <tbody><tr class='light'><td><a href='lib-simplabs-reports_as_sparkline-grouping_rb.html'>lib/simplabs/reports_as_sparkline/grouping.rb</a>
       +        </td>
       +      <td class='lines_total'><tt>119</tt>
       +        </td>
       +      <td class='lines_code'><tt>99</tt>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_total'>98.3%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='98'/>
       +                  <td class='uncovered' width='2'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_code'>98.0%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='98'/>
       +                  <td class='uncovered' width='2'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      </tr>
       +    </tbody>
       +  </table>
       +<pre><span class="marked0"><a name="line1"></a>  1 module Simplabs #:nodoc:
       +</span><span class="inferred1"><a name="line2"></a>  2 
       +</span><span class="marked0"><a name="line3"></a>  3   module ReportsAsSparkline #:nodoc:
       +</span><span class="inferred1"><a name="line4"></a>  4 
       +</span><span class="inferred0"><a name="line5"></a>  5     # This is the grouping a report uses to group records in the database
       +</span><span class="marked1"><a name="line6"></a>  6     class Grouping
       +</span><span class="inferred0"><a name="line7"></a>  7 
       +</span><span class="inferred1"><a name="line8"></a>  8       # ==== Parameters
       +</span><span class="inferred0"><a name="line9"></a>  9       # * &lt;tt&gt;identifier&lt;/tt&gt; - The identifier of the grouping - one of :hour, :day, :week or :month
       +</span><span class="marked1"><a name="line10"></a> 10       def initialize(identifier)
       +</span><span class="marked0"><a name="line11"></a> 11         raise ArgumentError.new(&quot;Invalid grouping #{identifier}&quot;) unless [:hour, :day, :week, :month].include?(identifier)
       +</span><span class="marked1"><a name="line12"></a> 12         @identifier = identifier
       +</span><span class="inferred0"><a name="line13"></a> 13       end
       +</span><span class="inferred1"><a name="line14"></a> 14 
       +</span><span class="inferred0"><a name="line15"></a> 15       # Returns the Grouping's identifier
       +</span><span class="marked1"><a name="line16"></a> 16       def identifier
       +</span><span class="marked0"><a name="line17"></a> 17         @identifier
       +</span><span class="marked1"><a name="line18"></a> 18       end
       +</span><span class="inferred0"><a name="line19"></a> 19 
       +</span><span class="marked1"><a name="line20"></a> 20       def date_parts_from_db_string(db_string) #:nodoc:
       +</span><span class="marked0"><a name="line21"></a> 21         return case ActiveRecord::Base.connection.adapter_name
       +</span><span class="marked1"><a name="line22"></a> 22           when /mysql/i
       +</span><span class="marked0"><a name="line23"></a> 23             from_mysql_db_string(db_string)
       +</span><span class="marked1"><a name="line24"></a> 24           when /sqlite/i
       +</span><span class="marked0"><a name="line25"></a> 25             from_sqlite_db_string(db_string)
       +</span><span class="marked1"><a name="line26"></a> 26           when /postgres/i
       +</span><span class="marked0"><a name="line27"></a> 27             from_postgresql_db_string(db_string)
       +</span><span class="marked1"><a name="line28"></a> 28         end
       +</span><span class="marked0"><a name="line29"></a> 29       end
       +</span><span class="inferred1"><a name="line30"></a> 30 
       +</span><span class="marked0"><a name="line31"></a> 31       def to_sql(date_column) #:nodoc:
       +</span><span class="marked1"><a name="line32"></a> 32         return case ActiveRecord::Base.connection.adapter_name
       +</span><span class="marked0"><a name="line33"></a> 33           when /mysql/i
       +</span><span class="marked1"><a name="line34"></a> 34             mysql_format(date_column)
       +</span><span class="marked0"><a name="line35"></a> 35           when /sqlite/i
       +</span><span class="marked1"><a name="line36"></a> 36             sqlite_format(date_column)
       +</span><span class="marked0"><a name="line37"></a> 37           when /postgres/i
       +</span><span class="marked1"><a name="line38"></a> 38             postgresql_format(date_column)
       +</span><span class="marked0"><a name="line39"></a> 39         end
       +</span><span class="marked1"><a name="line40"></a> 40       end
       +</span><span class="inferred0"><a name="line41"></a> 41 
       +</span><span class="marked1"><a name="line42"></a> 42       private
       +</span><span class="inferred0"><a name="line43"></a> 43 
       +</span><span class="marked1"><a name="line44"></a> 44         def from_mysql_db_string(db_string)
       +</span><span class="marked0"><a name="line45"></a> 45           if @identifier == :week
       +</span><span class="marked1"><a name="line46"></a> 46             parts = [db_string[0..3], db_string[4..5]].map(&amp;:to_i)
       +</span><span class="inferred0"><a name="line47"></a> 47           else
       +</span><span class="marked1"><a name="line48"></a> 48             db_string.split('/').map(&amp;:to_i)
       +</span><span class="inferred0"><a name="line49"></a> 49           end
       +</span><span class="marked1"><a name="line50"></a> 50         end
       +</span><span class="inferred0"><a name="line51"></a> 51 
       +</span><span class="marked1"><a name="line52"></a> 52         def from_sqlite_db_string(db_string)
       +</span><span class="marked0"><a name="line53"></a> 53           if @identifier == :week
       +</span><span class="marked1"><a name="line54"></a> 54             parts = db_string.split('-').map(&amp;:to_i)
       +</span><span class="marked0"><a name="line55"></a> 55             date = Date.new(parts[0], parts[1], parts[2])
       +</span><span class="marked1"><a name="line56"></a> 56             return [date.cwyear, date.cweek]
       +</span><span class="inferred0"><a name="line57"></a> 57           end
       +</span><span class="marked1"><a name="line58"></a> 58           db_string.split('/').map(&amp;:to_i)
       +</span><span class="inferred0"><a name="line59"></a> 59         end
       +</span><span class="inferred1"><a name="line60"></a> 60 
       +</span><span class="marked0"><a name="line61"></a> 61         def from_postgresql_db_string(db_string)
       +</span><span class="marked1"><a name="line62"></a> 62           case @identifier
       +</span><span class="marked0"><a name="line63"></a> 63             when :hour
       +</span><span class="marked1"><a name="line64"></a> 64               return (db_string[0..9].split('-') + [db_string[11..12]]).map(&amp;:to_i)
       +</span><span class="marked0"><a name="line65"></a> 65             when :day
       +</span><span class="marked1"><a name="line66"></a> 66               return db_string[0..9].split('-').map(&amp;:to_i)
       +</span><span class="marked0"><a name="line67"></a> 67             when :week
       +</span><span class="marked1"><a name="line68"></a> 68               parts = db_string[0..9].split('-').map(&amp;:to_i)
       +</span><span class="marked0"><a name="line69"></a> 69               date = Date.new(parts[0], parts[1], parts[2])
       +</span><span class="marked1"><a name="line70"></a> 70               return [date.cwyear, date.cweek]
       +</span><span class="marked0"><a name="line71"></a> 71             when :month
       +</span><span class="marked1"><a name="line72"></a> 72               return db_string[0..6].split('-')[0..1].map(&amp;:to_i)
       +</span><span class="inferred0"><a name="line73"></a> 73           end
       +</span><span class="marked1"><a name="line74"></a> 74         end
       +</span><span class="inferred0"><a name="line75"></a> 75 
       +</span><span class="marked1"><a name="line76"></a> 76         def mysql_format(date_column)
       +</span><span class="uncovered0"><a name="line77"></a> 77           return case @identifier
       +</span><span class="marked1"><a name="line78"></a> 78             when :hour
       +</span><span class="marked0"><a name="line79"></a> 79               &quot;DATE_FORMAT(#{date_column}, '%Y/%m/%d/%H')&quot;
       +</span><span class="marked1"><a name="line80"></a> 80             when :day
       +</span><span class="marked0"><a name="line81"></a> 81               &quot;DATE_FORMAT(#{date_column}, '%Y/%m/%d')&quot;
       +</span><span class="marked1"><a name="line82"></a> 82             when :week
       +</span><span class="marked0"><a name="line83"></a> 83               &quot;YEARWEEK(#{date_column}, 3)&quot;
       +</span><span class="marked1"><a name="line84"></a> 84             when :month
       +</span><span class="marked0"><a name="line85"></a> 85               &quot;DATE_FORMAT(#{date_column}, '%Y/%m')&quot;
       +</span><span class="marked1"><a name="line86"></a> 86           end
       +</span><span class="marked0"><a name="line87"></a> 87         end
       +</span><span class="inferred1"><a name="line88"></a> 88 
       +</span><span class="marked0"><a name="line89"></a> 89         def sqlite_format(date_column)
       +</span><span class="uncovered1"><a name="line90"></a> 90           return case @identifier
       +</span><span class="marked0"><a name="line91"></a> 91             when :hour
       +</span><span class="marked1"><a name="line92"></a> 92               &quot;strftime('%Y/%m/%d/%H', #{date_column})&quot;
       +</span><span class="marked0"><a name="line93"></a> 93             when :day
       +</span><span class="marked1"><a name="line94"></a> 94               &quot;strftime('%Y/%m/%d', #{date_column})&quot;
       +</span><span class="marked0"><a name="line95"></a> 95             when :week
       +</span><span class="marked1"><a name="line96"></a> 96               &quot;date(#{date_column}, 'weekday 0')&quot;
       +</span><span class="marked0"><a name="line97"></a> 97             when :month
       +</span><span class="marked1"><a name="line98"></a> 98               &quot;strftime('%Y/%m', #{date_column})&quot;
       +</span><span class="marked0"><a name="line99"></a> 99           end
       +</span><span class="marked1"><a name="line100"></a>100         end
       +</span><span class="inferred0"><a name="line101"></a>101 
       +</span><span class="marked1"><a name="line102"></a>102         def postgresql_format(date_column)
       +</span><span class="inferred0"><a name="line103"></a>103           return case @identifier
       +</span><span class="marked1"><a name="line104"></a>104             when :hour
       +</span><span class="inferred0"><a name="line105"></a>105               &quot;date_trunc('hour', #{date_column})&quot;
       +</span><span class="marked1"><a name="line106"></a>106             when :day
       +</span><span class="inferred0"><a name="line107"></a>107               &quot;date_trunc('day', #{date_column})&quot;
       +</span><span class="marked1"><a name="line108"></a>108             when :week
       +</span><span class="inferred0"><a name="line109"></a>109               &quot;date_trunc('week', #{date_column})&quot;
       +</span><span class="marked1"><a name="line110"></a>110             when :month
       +</span><span class="marked0"><a name="line111"></a>111               &quot;date_trunc('month', #{date_column})&quot;
       +</span><span class="marked1"><a name="line112"></a>112           end
       +</span><span class="marked0"><a name="line113"></a>113         end
       +</span><span class="inferred1"><a name="line114"></a>114 
       +</span><span class="inferred0"><a name="line115"></a>115     end
       +</span><span class="inferred1"><a name="line116"></a>116 
       +</span><span class="inferred0"><a name="line117"></a>117   end
       +</span><span class="inferred1"><a name="line118"></a>118 
       +</span><span class="inferred0"><a name="line119"></a>119 end
       +</span></pre><hr/>
       +    <p>Generated using the <a href='http://eigenclass.org/hiki.rb?rcov'>rcov code coverage analysis tool for Ruby</a>
       +   version 0.8.1.2.</p>
       +<p><a href='http://validator.w3.org/check/referer'><img src='http://www.w3.org/Icons/valid-xhtml10' height='31' alt='Valid XHTML 1.0!' width='88'/>
       +        </a>
       +      <a href='http://jigsaw.w3.org/css-validator/check/referer'><img src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Valid CSS!' style='border:0;width:88px;height:31px'/>
       +        </a>
       +      </p>
       +    </body>
       +  </html>
 (DIR) diff --git a/doc/coverage/lib-simplabs-reports_as_sparkline-report_cache_rb.html b/doc/coverage/lib-simplabs-reports_as_sparkline-report_cache_rb.html
       @@ -0,0 +1,708 @@
       +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       +<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'><head><title>lib/simplabs/reports_as_sparkline/report_cache.rb - C0 code coverage information</title>
       +    <style type='text/css'>body { background-color: rgb(240, 240, 245); }</style>
       +    <style type='text/css'>span.cross-ref-title {
       + font-size: 140%;
       +}
       +span.cross-ref a {
       + text-decoration: none;
       +}
       +span.cross-ref {
       + background-color:#f3f7fa;
       + border: 1px dashed #333;
       + margin: 1em;
       + padding: 0.5em;
       + overflow: hidden;
       +}
       +a.crossref-toggle {
       + text-decoration: none;
       +}
       +span.marked0 {
       + background-color: rgb(185, 210, 200);
       + display: block;
       +}
       +span.marked1 {
       + background-color: rgb(190, 215, 205);
       + display: block;
       +}
       +span.inferred0 {
       + background-color: rgb(175, 200, 200);
       + display: block;
       +}
       +span.inferred1 {
       + background-color: rgb(180, 205, 205);
       + display: block;
       +}
       +span.uncovered0 {
       + background-color: rgb(225, 110, 110);
       + display: block;
       +}
       +span.uncovered1 {
       + background-color: rgb(235, 120, 120);
       + display: block;
       +}
       +span.overview {
       + border-bottom: 8px solid black;
       +}
       +div.overview {
       + border-bottom: 8px solid black;
       +}
       +body {
       + font-family: verdana, arial, helvetica;
       +}
       +div.footer {
       + font-size: 68%;
       + margin-top: 1.5em;
       +}
       +h1, h2, h3, h4, h5, h6 {
       + margin-bottom: 0.5em;
       +}
       +h5 {
       + margin-top: 0.5em;
       +}
       +.hidden {
       + display: none;
       +}
       +div.separator {
       + height: 10px;
       +}
       +/* Commented out for better readability, esp. on IE */
       +/*
       +table tr td, table tr th {
       + font-size: 68%;
       +}
       +td.value table tr td {
       + font-size: 11px;
       +}
       +*/
       +table.percent_graph {
       + height: 12px;
       + border: #808080 1px solid;
       + empty-cells: show;
       +}
       +table.percent_graph td.covered {
       + height: 10px;
       + background: #00f000;
       +}
       +table.percent_graph td.uncovered {
       + height: 10px;
       + background: #e00000;
       +}
       +table.percent_graph td.NA {
       + height: 10px;
       + background: #eaeaea;
       +}
       +table.report {
       + border-collapse: collapse;
       + width: 100%;
       +}
       +table.report td.heading {
       + background: #dcecff;
       + border: #d0d0d0 1px solid;
       + font-weight: bold;
       + text-align: center;
       +}
       +table.report td.heading:hover {
       + background: #c0ffc0;
       +}
       +table.report td.text {
       + border: #d0d0d0 1px solid;
       +}
       +table.report td.value,
       +table.report td.lines_total,
       +table.report td.lines_code {
       + text-align: right;
       + border: #d0d0d0 1px solid;
       +}
       +table.report tr.light {
       + background-color: rgb(240, 240, 245);
       +}
       +table.report tr.dark {
       + background-color: rgb(230, 230, 235);
       +}
       +</style>
       +    <script type='text/javascript'>
       +// <![CDATA[
       +  function toggleCode( id ) {
       +    if ( document.getElementById )
       +      elem = document.getElementById( id );
       +    else if ( document.all )
       +      elem = eval( "document.all." + id );
       +    else
       +      return false;
       +
       +    elemStyle = elem.style;
       +    
       +    if ( elemStyle.display != "block" ) {
       +      elemStyle.display = "block"
       +    } else {
       +      elemStyle.display = "none"
       +    }
       +
       +    return true;
       +  }
       +  
       +  // Make cross-references hidden by default
       +  document.writeln( "<style type=\"text/css\">span.cross-ref { display: none }</style>" )
       +  // ]]>
       +</script>
       +    <style type='text/css'>span.run0 {
       +  background-color: rgb(178, 204, 255);
       +  display: block;
       +}
       +span.run1 {
       +  background-color: rgb(178, 206, 255);
       +  display: block;
       +}
       +span.run2 {
       +  background-color: rgb(178, 209, 255);
       +  display: block;
       +}
       +span.run3 {
       +  background-color: rgb(178, 211, 255);
       +  display: block;
       +}
       +span.run4 {
       +  background-color: rgb(178, 214, 255);
       +  display: block;
       +}
       +span.run5 {
       +  background-color: rgb(178, 218, 255);
       +  display: block;
       +}
       +span.run6 {
       +  background-color: rgb(178, 220, 255);
       +  display: block;
       +}
       +span.run7 {
       +  background-color: rgb(178, 223, 255);
       +  display: block;
       +}
       +span.run8 {
       +  background-color: rgb(178, 225, 255);
       +  display: block;
       +}
       +span.run9 {
       +  background-color: rgb(178, 228, 255);
       +  display: block;
       +}
       +span.run10 {
       +  background-color: rgb(178, 232, 255);
       +  display: block;
       +}
       +span.run11 {
       +  background-color: rgb(178, 234, 255);
       +  display: block;
       +}
       +span.run12 {
       +  background-color: rgb(178, 237, 255);
       +  display: block;
       +}
       +span.run13 {
       +  background-color: rgb(178, 239, 255);
       +  display: block;
       +}
       +span.run14 {
       +  background-color: rgb(178, 242, 255);
       +  display: block;
       +}
       +span.run15 {
       +  background-color: rgb(178, 246, 255);
       +  display: block;
       +}
       +span.run16 {
       +  background-color: rgb(178, 248, 255);
       +  display: block;
       +}
       +span.run17 {
       +  background-color: rgb(178, 251, 255);
       +  display: block;
       +}
       +span.run18 {
       +  background-color: rgb(178, 253, 255);
       +  display: block;
       +}
       +span.run19 {
       +  background-color: rgb(178, 255, 253);
       +  display: block;
       +}
       +span.run20 {
       +  background-color: rgb(178, 255, 249);
       +  display: block;
       +}
       +span.run21 {
       +  background-color: rgb(178, 255, 247);
       +  display: block;
       +}
       +span.run22 {
       +  background-color: rgb(178, 255, 244);
       +  display: block;
       +}
       +span.run23 {
       +  background-color: rgb(178, 255, 242);
       +  display: block;
       +}
       +span.run24 {
       +  background-color: rgb(178, 255, 239);
       +  display: block;
       +}
       +span.run25 {
       +  background-color: rgb(178, 255, 235);
       +  display: block;
       +}
       +span.run26 {
       +  background-color: rgb(178, 255, 233);
       +  display: block;
       +}
       +span.run27 {
       +  background-color: rgb(178, 255, 230);
       +  display: block;
       +}
       +span.run28 {
       +  background-color: rgb(178, 255, 228);
       +  display: block;
       +}
       +span.run29 {
       +  background-color: rgb(178, 255, 225);
       +  display: block;
       +}
       +span.run30 {
       +  background-color: rgb(178, 255, 221);
       +  display: block;
       +}
       +span.run31 {
       +  background-color: rgb(178, 255, 219);
       +  display: block;
       +}
       +span.run32 {
       +  background-color: rgb(178, 255, 216);
       +  display: block;
       +}
       +span.run33 {
       +  background-color: rgb(178, 255, 214);
       +  display: block;
       +}
       +span.run34 {
       +  background-color: rgb(178, 255, 211);
       +  display: block;
       +}
       +span.run35 {
       +  background-color: rgb(178, 255, 207);
       +  display: block;
       +}
       +span.run36 {
       +  background-color: rgb(178, 255, 205);
       +  display: block;
       +}
       +span.run37 {
       +  background-color: rgb(178, 255, 202);
       +  display: block;
       +}
       +span.run38 {
       +  background-color: rgb(178, 255, 200);
       +  display: block;
       +}
       +span.run39 {
       +  background-color: rgb(178, 255, 197);
       +  display: block;
       +}
       +span.run40 {
       +  background-color: rgb(178, 255, 193);
       +  display: block;
       +}
       +span.run41 {
       +  background-color: rgb(178, 255, 191);
       +  display: block;
       +}
       +span.run42 {
       +  background-color: rgb(178, 255, 188);
       +  display: block;
       +}
       +span.run43 {
       +  background-color: rgb(178, 255, 186);
       +  display: block;
       +}
       +span.run44 {
       +  background-color: rgb(178, 255, 183);
       +  display: block;
       +}
       +span.run45 {
       +  background-color: rgb(178, 255, 179);
       +  display: block;
       +}
       +span.run46 {
       +  background-color: rgb(179, 255, 178);
       +  display: block;
       +}
       +span.run47 {
       +  background-color: rgb(182, 255, 178);
       +  display: block;
       +}
       +span.run48 {
       +  background-color: rgb(184, 255, 178);
       +  display: block;
       +}
       +span.run49 {
       +  background-color: rgb(187, 255, 178);
       +  display: block;
       +}
       +span.run50 {
       +  background-color: rgb(191, 255, 178);
       +  display: block;
       +}
       +span.run51 {
       +  background-color: rgb(193, 255, 178);
       +  display: block;
       +}
       +span.run52 {
       +  background-color: rgb(196, 255, 178);
       +  display: block;
       +}
       +span.run53 {
       +  background-color: rgb(198, 255, 178);
       +  display: block;
       +}
       +span.run54 {
       +  background-color: rgb(201, 255, 178);
       +  display: block;
       +}
       +span.run55 {
       +  background-color: rgb(205, 255, 178);
       +  display: block;
       +}
       +span.run56 {
       +  background-color: rgb(207, 255, 178);
       +  display: block;
       +}
       +span.run57 {
       +  background-color: rgb(210, 255, 178);
       +  display: block;
       +}
       +span.run58 {
       +  background-color: rgb(212, 255, 178);
       +  display: block;
       +}
       +span.run59 {
       +  background-color: rgb(215, 255, 178);
       +  display: block;
       +}
       +span.run60 {
       +  background-color: rgb(219, 255, 178);
       +  display: block;
       +}
       +span.run61 {
       +  background-color: rgb(221, 255, 178);
       +  display: block;
       +}
       +span.run62 {
       +  background-color: rgb(224, 255, 178);
       +  display: block;
       +}
       +span.run63 {
       +  background-color: rgb(226, 255, 178);
       +  display: block;
       +}
       +span.run64 {
       +  background-color: rgb(229, 255, 178);
       +  display: block;
       +}
       +span.run65 {
       +  background-color: rgb(233, 255, 178);
       +  display: block;
       +}
       +span.run66 {
       +  background-color: rgb(235, 255, 178);
       +  display: block;
       +}
       +span.run67 {
       +  background-color: rgb(238, 255, 178);
       +  display: block;
       +}
       +span.run68 {
       +  background-color: rgb(240, 255, 178);
       +  display: block;
       +}
       +span.run69 {
       +  background-color: rgb(243, 255, 178);
       +  display: block;
       +}
       +span.run70 {
       +  background-color: rgb(247, 255, 178);
       +  display: block;
       +}
       +span.run71 {
       +  background-color: rgb(249, 255, 178);
       +  display: block;
       +}
       +span.run72 {
       +  background-color: rgb(252, 255, 178);
       +  display: block;
       +}
       +span.run73 {
       +  background-color: rgb(255, 255, 178);
       +  display: block;
       +}
       +span.run74 {
       +  background-color: rgb(255, 252, 178);
       +  display: block;
       +}
       +span.run75 {
       +  background-color: rgb(255, 248, 178);
       +  display: block;
       +}
       +span.run76 {
       +  background-color: rgb(255, 246, 178);
       +  display: block;
       +}
       +span.run77 {
       +  background-color: rgb(255, 243, 178);
       +  display: block;
       +}
       +span.run78 {
       +  background-color: rgb(255, 240, 178);
       +  display: block;
       +}
       +span.run79 {
       +  background-color: rgb(255, 238, 178);
       +  display: block;
       +}
       +span.run80 {
       +  background-color: rgb(255, 234, 178);
       +  display: block;
       +}
       +span.run81 {
       +  background-color: rgb(255, 232, 178);
       +  display: block;
       +}
       +span.run82 {
       +  background-color: rgb(255, 229, 178);
       +  display: block;
       +}
       +span.run83 {
       +  background-color: rgb(255, 226, 178);
       +  display: block;
       +}
       +span.run84 {
       +  background-color: rgb(255, 224, 178);
       +  display: block;
       +}
       +span.run85 {
       +  background-color: rgb(255, 220, 178);
       +  display: block;
       +}
       +span.run86 {
       +  background-color: rgb(255, 218, 178);
       +  display: block;
       +}
       +span.run87 {
       +  background-color: rgb(255, 215, 178);
       +  display: block;
       +}
       +span.run88 {
       +  background-color: rgb(255, 212, 178);
       +  display: block;
       +}
       +span.run89 {
       +  background-color: rgb(255, 210, 178);
       +  display: block;
       +}
       +span.run90 {
       +  background-color: rgb(255, 206, 178);
       +  display: block;
       +}
       +span.run91 {
       +  background-color: rgb(255, 204, 178);
       +  display: block;
       +}
       +span.run92 {
       +  background-color: rgb(255, 201, 178);
       +  display: block;
       +}
       +span.run93 {
       +  background-color: rgb(255, 198, 178);
       +  display: block;
       +}
       +span.run94 {
       +  background-color: rgb(255, 196, 178);
       +  display: block;
       +}
       +span.run95 {
       +  background-color: rgb(255, 192, 178);
       +  display: block;
       +}
       +span.run96 {
       +  background-color: rgb(255, 189, 178);
       +  display: block;
       +}
       +span.run97 {
       +  background-color: rgb(255, 187, 178);
       +  display: block;
       +}
       +span.run98 {
       +  background-color: rgb(255, 184, 178);
       +  display: block;
       +}
       +span.run99 {
       +  background-color: rgb(255, 182, 178);
       +  display: block;
       +}
       +span.run100 {
       +  background-color: rgb(255, 178, 178);
       +  display: block;
       +}
       +</style>
       +    </head>
       +  <body><h3>C0 code coverage information</h3>
       +    <p>Generated on Wed Apr 29 18:53:08 +0200 2009 with <a href='http://eigenclass.org/hiki/rcov'>rcov 0.8.1.2</a>
       +      </p>
       +    <hr/>
       +    <pre><span class='marked0'>Code reported as executed by Ruby looks like this...
       +</span><span class='marked1'>and this: this line is also marked as covered.
       +</span><span class='inferred0'>Lines considered as run by rcov, but not reported by Ruby, look like this,
       +</span><span class='inferred1'>and this: these lines were inferred by rcov (using simple heuristics).
       +</span><span class='uncovered0'>Finally, here&apos;s a line marked as not executed.
       +</span></pre>                       
       +<table class='report'><thead><tr><td class='heading'>Name</td>
       +      <td class='heading'>Total lines</td>
       +      <td class='heading'>Lines of code</td>
       +      <td class='heading'>Total coverage</td>
       +      <td class='heading'>Code coverage</td>
       +      </tr>
       +    </thead>
       +  <tbody><tr class='light'><td><a href='lib-simplabs-reports_as_sparkline-report_cache_rb.html'>lib/simplabs/reports_as_sparkline/report_cache.rb</a>
       +        </td>
       +      <td class='lines_total'><tt>98</tt>
       +        </td>
       +      <td class='lines_code'><tt>83</tt>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_total'>99.0%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='99'/>
       +                  <td class='uncovered' width='1'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_code'>98.8%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='99'/>
       +                  <td class='uncovered' width='1'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      </tr>
       +    </tbody>
       +  </table>
       +<pre><span class="marked0"><a name="line1"></a> 1 module Simplabs #:nodoc:
       +</span><span class="inferred1"><a name="line2"></a> 2 
       +</span><span class="marked0"><a name="line3"></a> 3   module ReportsAsSparkline #:nodoc:
       +</span><span class="inferred1"><a name="line4"></a> 4 
       +</span><span class="marked0"><a name="line5"></a> 5     class ReportCache &lt; ActiveRecord::Base #:nodoc:
       +</span><span class="inferred1"><a name="line6"></a> 6 
       +</span><span class="marked0"><a name="line7"></a> 7       set_table_name :reports_as_sparkline_cache
       +</span><span class="inferred1"><a name="line8"></a> 8 
       +</span><span class="marked0"><a name="line9"></a> 9       def self.process(report, options, cache = true, &amp;block)
       +</span><span class="marked1"><a name="line10"></a>10         raise ArgumentError.new('A block must be given') unless block_given?
       +</span><span class="marked0"><a name="line11"></a>11         self.transaction do
       +</span><span class="marked1"><a name="line12"></a>12           cached_data = []
       +</span><span class="marked0"><a name="line13"></a>13           first_reporting_period = ReportingPeriod.first(options[:grouping], (options[:end_date] ? options[:limit] - 1 : options[:limit]), options[:end_date])
       +</span><span class="marked1"><a name="line14"></a>14           last_reporting_period = options[:end_date] ? ReportingPeriod.new(options[:grouping], options[:end_date]) : nil
       +</span><span class="inferred0"><a name="line15"></a>15 
       +</span><span class="marked1"><a name="line16"></a>16           if cache
       +</span><span class="marked0"><a name="line17"></a>17             cached_data = find_cached_data(report, options, first_reporting_period, last_reporting_period)
       +</span><span class="marked1"><a name="line18"></a>18             first_cached_reporting_period = cached_data.empty? ? nil : ReportingPeriod.new(options[:grouping], cached_data.first.reporting_period)
       +</span><span class="marked0"><a name="line19"></a>19             last_cached_reporting_period = cached_data.empty? ? nil : ReportingPeriod.new(options[:grouping], cached_data.last.reporting_period)
       +</span><span class="inferred1"><a name="line20"></a>20           end
       +</span><span class="inferred0"><a name="line21"></a>21 
       +</span><span class="marked1"><a name="line22"></a>22           new_data = if !options[:live_data] &amp;&amp; last_cached_reporting_period == ReportingPeriod.new(options[:grouping]).previous
       +</span><span class="uncovered0"><a name="line23"></a>23             []
       +</span><span class="inferred1"><a name="line24"></a>24           else
       +</span><span class="marked0"><a name="line25"></a>25             end_date = options[:live_data] ? nil : (options[:end_date] ? last_reporting_period.last_date_time : nil)
       +</span><span class="marked1"><a name="line26"></a>26             yield((last_cached_reporting_period.next rescue first_reporting_period).date_time, end_date)
       +</span><span class="inferred0"><a name="line27"></a>27           end
       +</span><span class="inferred1"><a name="line28"></a>28 
       +</span><span class="marked0"><a name="line29"></a>29           prepare_result(new_data, cached_data, report, options, cache)
       +</span><span class="inferred1"><a name="line30"></a>30         end
       +</span><span class="inferred0"><a name="line31"></a>31       end
       +</span><span class="inferred1"><a name="line32"></a>32 
       +</span><span class="marked0"><a name="line33"></a>33       private
       +</span><span class="inferred1"><a name="line34"></a>34 
       +</span><span class="marked0"><a name="line35"></a>35         def self.prepare_result(new_data, cached_data, report, options, cache = true)
       +</span><span class="marked1"><a name="line36"></a>36           new_data = new_data.map { |data| [ReportingPeriod.from_db_string(options[:grouping], data[0]), data[1]] }
       +</span><span class="marked0"><a name="line37"></a>37           result = cached_data.map { |cached| [cached.reporting_period, cached.value] }
       +</span><span class="marked1"><a name="line38"></a>38           last_reporting_period = ReportingPeriod.new(options[:grouping])
       +</span><span class="marked0"><a name="line39"></a>39           reporting_period = cached_data.empty? ? ReportingPeriod.first(options[:grouping], (options[:end_date] ? options[:limit] - 1 : options[:limit]), options[:end_date]) : ReportingPeriod.new(options[:grouping], cached_data.last.reporting_period).next
       +</span><span class="marked1"><a name="line40"></a>40           while reporting_period &lt; (options[:end_date] ? ReportingPeriod.new(options[:grouping], options[:end_date]).next : last_reporting_period)
       +</span><span class="marked0"><a name="line41"></a>41             cached = build_cached_data(report, options[:grouping], options[:limit], reporting_period, find_value(new_data, reporting_period))
       +</span><span class="marked1"><a name="line42"></a>42             cached.save! if cache
       +</span><span class="marked0"><a name="line43"></a>43             result &lt;&lt; [reporting_period.date_time, cached.value]
       +</span><span class="marked1"><a name="line44"></a>44             reporting_period = reporting_period.next
       +</span><span class="inferred0"><a name="line45"></a>45           end
       +</span><span class="marked1"><a name="line46"></a>46           if options[:live_data]
       +</span><span class="marked0"><a name="line47"></a>47             result &lt;&lt; [last_reporting_period.date_time, find_value(new_data, last_reporting_period)]
       +</span><span class="inferred1"><a name="line48"></a>48           end
       +</span><span class="marked0"><a name="line49"></a>49           result
       +</span><span class="inferred1"><a name="line50"></a>50         end
       +</span><span class="inferred0"><a name="line51"></a>51 
       +</span><span class="marked1"><a name="line52"></a>52         def self.find_value(data, reporting_period)
       +</span><span class="marked0"><a name="line53"></a>53           data = data.detect { |d| d[0] == reporting_period }
       +</span><span class="marked1"><a name="line54"></a>54           data ? data[1] : 0.0
       +</span><span class="inferred0"><a name="line55"></a>55         end
       +</span><span class="inferred1"><a name="line56"></a>56 
       +</span><span class="marked0"><a name="line57"></a>57         def self.build_cached_data(report, grouping, limit, reporting_period, value)
       +</span><span class="marked1"><a name="line58"></a>58           self.new(
       +</span><span class="inferred0"><a name="line59"></a>59             :model_name       =&gt; report.klass.to_s,
       +</span><span class="inferred1"><a name="line60"></a>60             :report_name      =&gt; report.name.to_s,
       +</span><span class="marked0"><a name="line61"></a>61             :grouping         =&gt; grouping.identifier.to_s,
       +</span><span class="inferred1"><a name="line62"></a>62             :aggregation      =&gt; report.aggregation.to_s,
       +</span><span class="inferred0"><a name="line63"></a>63             :reporting_period =&gt; reporting_period.date_time,
       +</span><span class="inferred1"><a name="line64"></a>64             :value            =&gt; value,
       +</span><span class="inferred0"><a name="line65"></a>65             :run_limit        =&gt; limit
       +</span><span class="inferred1"><a name="line66"></a>66           )
       +</span><span class="marked0"><a name="line67"></a>67         end
       +</span><span class="inferred1"><a name="line68"></a>68 
       +</span><span class="marked0"><a name="line69"></a>69         def self.find_cached_data(report, options, first_reporting_period, last_reporting_period)
       +</span><span class="marked1"><a name="line70"></a>70           conditions = [
       +</span><span class="inferred0"><a name="line71"></a>71             'model_name = ? AND report_name = ? AND grouping = ? AND aggregation = ? AND run_limit = ?',
       +</span><span class="inferred1"><a name="line72"></a>72             report.klass.to_s,
       +</span><span class="inferred0"><a name="line73"></a>73             report.name.to_s,
       +</span><span class="marked1"><a name="line74"></a>74             options[:grouping].identifier.to_s,
       +</span><span class="inferred0"><a name="line75"></a>75             report.aggregation.to_s,
       +</span><span class="inferred1"><a name="line76"></a>76             options[:limit]
       +</span><span class="inferred0"><a name="line77"></a>77           ]
       +</span><span class="marked1"><a name="line78"></a>78           if last_reporting_period
       +</span><span class="marked0"><a name="line79"></a>79             conditions.first &lt;&lt; ' AND reporting_period BETWEEN ? AND ?'
       +</span><span class="marked1"><a name="line80"></a>80             conditions &lt;&lt; first_reporting_period.date_time
       +</span><span class="marked0"><a name="line81"></a>81             conditions &lt;&lt; last_reporting_period.date_time
       +</span><span class="inferred1"><a name="line82"></a>82           else
       +</span><span class="marked0"><a name="line83"></a>83             conditions.first &lt;&lt; ' AND reporting_period &gt;= ?'
       +</span><span class="marked1"><a name="line84"></a>84             conditions &lt;&lt; first_reporting_period.date_time
       +</span><span class="inferred0"><a name="line85"></a>85           end
       +</span><span class="marked1"><a name="line86"></a>86           self.find(
       +</span><span class="inferred0"><a name="line87"></a>87             :all,
       +</span><span class="inferred1"><a name="line88"></a>88             :conditions =&gt; conditions,
       +</span><span class="inferred0"><a name="line89"></a>89             :limit =&gt; options[:limit],
       +</span><span class="inferred1"><a name="line90"></a>90             :order =&gt; 'reporting_period ASC'
       +</span><span class="inferred0"><a name="line91"></a>91           )
       +</span><span class="inferred1"><a name="line92"></a>92         end
       +</span><span class="inferred0"><a name="line93"></a>93 
       +</span><span class="inferred1"><a name="line94"></a>94     end
       +</span><span class="inferred0"><a name="line95"></a>95 
       +</span><span class="inferred1"><a name="line96"></a>96   end
       +</span><span class="inferred0"><a name="line97"></a>97 
       +</span><span class="inferred1"><a name="line98"></a>98 end
       +</span></pre><hr/>
       +    <p>Generated using the <a href='http://eigenclass.org/hiki.rb?rcov'>rcov code coverage analysis tool for Ruby</a>
       +   version 0.8.1.2.</p>
       +<p><a href='http://validator.w3.org/check/referer'><img src='http://www.w3.org/Icons/valid-xhtml10' height='31' alt='Valid XHTML 1.0!' width='88'/>
       +        </a>
       +      <a href='http://jigsaw.w3.org/css-validator/check/referer'><img src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Valid CSS!' style='border:0;width:88px;height:31px'/>
       +        </a>
       +      </p>
       +    </body>
       +  </html>
 (DIR) diff --git a/doc/coverage/lib-simplabs-reports_as_sparkline-report_rb.html b/doc/coverage/lib-simplabs-reports_as_sparkline-report_rb.html
       @@ -0,0 +1,729 @@
       +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       +<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'><head><title>lib/simplabs/reports_as_sparkline/report.rb - C0 code coverage information</title>
       +    <style type='text/css'>body { background-color: rgb(240, 240, 245); }</style>
       +    <style type='text/css'>span.cross-ref-title {
       + font-size: 140%;
       +}
       +span.cross-ref a {
       + text-decoration: none;
       +}
       +span.cross-ref {
       + background-color:#f3f7fa;
       + border: 1px dashed #333;
       + margin: 1em;
       + padding: 0.5em;
       + overflow: hidden;
       +}
       +a.crossref-toggle {
       + text-decoration: none;
       +}
       +span.marked0 {
       + background-color: rgb(185, 210, 200);
       + display: block;
       +}
       +span.marked1 {
       + background-color: rgb(190, 215, 205);
       + display: block;
       +}
       +span.inferred0 {
       + background-color: rgb(175, 200, 200);
       + display: block;
       +}
       +span.inferred1 {
       + background-color: rgb(180, 205, 205);
       + display: block;
       +}
       +span.uncovered0 {
       + background-color: rgb(225, 110, 110);
       + display: block;
       +}
       +span.uncovered1 {
       + background-color: rgb(235, 120, 120);
       + display: block;
       +}
       +span.overview {
       + border-bottom: 8px solid black;
       +}
       +div.overview {
       + border-bottom: 8px solid black;
       +}
       +body {
       + font-family: verdana, arial, helvetica;
       +}
       +div.footer {
       + font-size: 68%;
       + margin-top: 1.5em;
       +}
       +h1, h2, h3, h4, h5, h6 {
       + margin-bottom: 0.5em;
       +}
       +h5 {
       + margin-top: 0.5em;
       +}
       +.hidden {
       + display: none;
       +}
       +div.separator {
       + height: 10px;
       +}
       +/* Commented out for better readability, esp. on IE */
       +/*
       +table tr td, table tr th {
       + font-size: 68%;
       +}
       +td.value table tr td {
       + font-size: 11px;
       +}
       +*/
       +table.percent_graph {
       + height: 12px;
       + border: #808080 1px solid;
       + empty-cells: show;
       +}
       +table.percent_graph td.covered {
       + height: 10px;
       + background: #00f000;
       +}
       +table.percent_graph td.uncovered {
       + height: 10px;
       + background: #e00000;
       +}
       +table.percent_graph td.NA {
       + height: 10px;
       + background: #eaeaea;
       +}
       +table.report {
       + border-collapse: collapse;
       + width: 100%;
       +}
       +table.report td.heading {
       + background: #dcecff;
       + border: #d0d0d0 1px solid;
       + font-weight: bold;
       + text-align: center;
       +}
       +table.report td.heading:hover {
       + background: #c0ffc0;
       +}
       +table.report td.text {
       + border: #d0d0d0 1px solid;
       +}
       +table.report td.value,
       +table.report td.lines_total,
       +table.report td.lines_code {
       + text-align: right;
       + border: #d0d0d0 1px solid;
       +}
       +table.report tr.light {
       + background-color: rgb(240, 240, 245);
       +}
       +table.report tr.dark {
       + background-color: rgb(230, 230, 235);
       +}
       +</style>
       +    <script type='text/javascript'>
       +// <![CDATA[
       +  function toggleCode( id ) {
       +    if ( document.getElementById )
       +      elem = document.getElementById( id );
       +    else if ( document.all )
       +      elem = eval( "document.all." + id );
       +    else
       +      return false;
       +
       +    elemStyle = elem.style;
       +    
       +    if ( elemStyle.display != "block" ) {
       +      elemStyle.display = "block"
       +    } else {
       +      elemStyle.display = "none"
       +    }
       +
       +    return true;
       +  }
       +  
       +  // Make cross-references hidden by default
       +  document.writeln( "<style type=\"text/css\">span.cross-ref { display: none }</style>" )
       +  // ]]>
       +</script>
       +    <style type='text/css'>span.run0 {
       +  background-color: rgb(178, 204, 255);
       +  display: block;
       +}
       +span.run1 {
       +  background-color: rgb(178, 206, 255);
       +  display: block;
       +}
       +span.run2 {
       +  background-color: rgb(178, 209, 255);
       +  display: block;
       +}
       +span.run3 {
       +  background-color: rgb(178, 211, 255);
       +  display: block;
       +}
       +span.run4 {
       +  background-color: rgb(178, 214, 255);
       +  display: block;
       +}
       +span.run5 {
       +  background-color: rgb(178, 218, 255);
       +  display: block;
       +}
       +span.run6 {
       +  background-color: rgb(178, 220, 255);
       +  display: block;
       +}
       +span.run7 {
       +  background-color: rgb(178, 223, 255);
       +  display: block;
       +}
       +span.run8 {
       +  background-color: rgb(178, 225, 255);
       +  display: block;
       +}
       +span.run9 {
       +  background-color: rgb(178, 228, 255);
       +  display: block;
       +}
       +span.run10 {
       +  background-color: rgb(178, 232, 255);
       +  display: block;
       +}
       +span.run11 {
       +  background-color: rgb(178, 234, 255);
       +  display: block;
       +}
       +span.run12 {
       +  background-color: rgb(178, 237, 255);
       +  display: block;
       +}
       +span.run13 {
       +  background-color: rgb(178, 239, 255);
       +  display: block;
       +}
       +span.run14 {
       +  background-color: rgb(178, 242, 255);
       +  display: block;
       +}
       +span.run15 {
       +  background-color: rgb(178, 246, 255);
       +  display: block;
       +}
       +span.run16 {
       +  background-color: rgb(178, 248, 255);
       +  display: block;
       +}
       +span.run17 {
       +  background-color: rgb(178, 251, 255);
       +  display: block;
       +}
       +span.run18 {
       +  background-color: rgb(178, 253, 255);
       +  display: block;
       +}
       +span.run19 {
       +  background-color: rgb(178, 255, 253);
       +  display: block;
       +}
       +span.run20 {
       +  background-color: rgb(178, 255, 249);
       +  display: block;
       +}
       +span.run21 {
       +  background-color: rgb(178, 255, 247);
       +  display: block;
       +}
       +span.run22 {
       +  background-color: rgb(178, 255, 244);
       +  display: block;
       +}
       +span.run23 {
       +  background-color: rgb(178, 255, 242);
       +  display: block;
       +}
       +span.run24 {
       +  background-color: rgb(178, 255, 239);
       +  display: block;
       +}
       +span.run25 {
       +  background-color: rgb(178, 255, 235);
       +  display: block;
       +}
       +span.run26 {
       +  background-color: rgb(178, 255, 233);
       +  display: block;
       +}
       +span.run27 {
       +  background-color: rgb(178, 255, 230);
       +  display: block;
       +}
       +span.run28 {
       +  background-color: rgb(178, 255, 228);
       +  display: block;
       +}
       +span.run29 {
       +  background-color: rgb(178, 255, 225);
       +  display: block;
       +}
       +span.run30 {
       +  background-color: rgb(178, 255, 221);
       +  display: block;
       +}
       +span.run31 {
       +  background-color: rgb(178, 255, 219);
       +  display: block;
       +}
       +span.run32 {
       +  background-color: rgb(178, 255, 216);
       +  display: block;
       +}
       +span.run33 {
       +  background-color: rgb(178, 255, 214);
       +  display: block;
       +}
       +span.run34 {
       +  background-color: rgb(178, 255, 211);
       +  display: block;
       +}
       +span.run35 {
       +  background-color: rgb(178, 255, 207);
       +  display: block;
       +}
       +span.run36 {
       +  background-color: rgb(178, 255, 205);
       +  display: block;
       +}
       +span.run37 {
       +  background-color: rgb(178, 255, 202);
       +  display: block;
       +}
       +span.run38 {
       +  background-color: rgb(178, 255, 200);
       +  display: block;
       +}
       +span.run39 {
       +  background-color: rgb(178, 255, 197);
       +  display: block;
       +}
       +span.run40 {
       +  background-color: rgb(178, 255, 193);
       +  display: block;
       +}
       +span.run41 {
       +  background-color: rgb(178, 255, 191);
       +  display: block;
       +}
       +span.run42 {
       +  background-color: rgb(178, 255, 188);
       +  display: block;
       +}
       +span.run43 {
       +  background-color: rgb(178, 255, 186);
       +  display: block;
       +}
       +span.run44 {
       +  background-color: rgb(178, 255, 183);
       +  display: block;
       +}
       +span.run45 {
       +  background-color: rgb(178, 255, 179);
       +  display: block;
       +}
       +span.run46 {
       +  background-color: rgb(179, 255, 178);
       +  display: block;
       +}
       +span.run47 {
       +  background-color: rgb(182, 255, 178);
       +  display: block;
       +}
       +span.run48 {
       +  background-color: rgb(184, 255, 178);
       +  display: block;
       +}
       +span.run49 {
       +  background-color: rgb(187, 255, 178);
       +  display: block;
       +}
       +span.run50 {
       +  background-color: rgb(191, 255, 178);
       +  display: block;
       +}
       +span.run51 {
       +  background-color: rgb(193, 255, 178);
       +  display: block;
       +}
       +span.run52 {
       +  background-color: rgb(196, 255, 178);
       +  display: block;
       +}
       +span.run53 {
       +  background-color: rgb(198, 255, 178);
       +  display: block;
       +}
       +span.run54 {
       +  background-color: rgb(201, 255, 178);
       +  display: block;
       +}
       +span.run55 {
       +  background-color: rgb(205, 255, 178);
       +  display: block;
       +}
       +span.run56 {
       +  background-color: rgb(207, 255, 178);
       +  display: block;
       +}
       +span.run57 {
       +  background-color: rgb(210, 255, 178);
       +  display: block;
       +}
       +span.run58 {
       +  background-color: rgb(212, 255, 178);
       +  display: block;
       +}
       +span.run59 {
       +  background-color: rgb(215, 255, 178);
       +  display: block;
       +}
       +span.run60 {
       +  background-color: rgb(219, 255, 178);
       +  display: block;
       +}
       +span.run61 {
       +  background-color: rgb(221, 255, 178);
       +  display: block;
       +}
       +span.run62 {
       +  background-color: rgb(224, 255, 178);
       +  display: block;
       +}
       +span.run63 {
       +  background-color: rgb(226, 255, 178);
       +  display: block;
       +}
       +span.run64 {
       +  background-color: rgb(229, 255, 178);
       +  display: block;
       +}
       +span.run65 {
       +  background-color: rgb(233, 255, 178);
       +  display: block;
       +}
       +span.run66 {
       +  background-color: rgb(235, 255, 178);
       +  display: block;
       +}
       +span.run67 {
       +  background-color: rgb(238, 255, 178);
       +  display: block;
       +}
       +span.run68 {
       +  background-color: rgb(240, 255, 178);
       +  display: block;
       +}
       +span.run69 {
       +  background-color: rgb(243, 255, 178);
       +  display: block;
       +}
       +span.run70 {
       +  background-color: rgb(247, 255, 178);
       +  display: block;
       +}
       +span.run71 {
       +  background-color: rgb(249, 255, 178);
       +  display: block;
       +}
       +span.run72 {
       +  background-color: rgb(252, 255, 178);
       +  display: block;
       +}
       +span.run73 {
       +  background-color: rgb(255, 255, 178);
       +  display: block;
       +}
       +span.run74 {
       +  background-color: rgb(255, 252, 178);
       +  display: block;
       +}
       +span.run75 {
       +  background-color: rgb(255, 248, 178);
       +  display: block;
       +}
       +span.run76 {
       +  background-color: rgb(255, 246, 178);
       +  display: block;
       +}
       +span.run77 {
       +  background-color: rgb(255, 243, 178);
       +  display: block;
       +}
       +span.run78 {
       +  background-color: rgb(255, 240, 178);
       +  display: block;
       +}
       +span.run79 {
       +  background-color: rgb(255, 238, 178);
       +  display: block;
       +}
       +span.run80 {
       +  background-color: rgb(255, 234, 178);
       +  display: block;
       +}
       +span.run81 {
       +  background-color: rgb(255, 232, 178);
       +  display: block;
       +}
       +span.run82 {
       +  background-color: rgb(255, 229, 178);
       +  display: block;
       +}
       +span.run83 {
       +  background-color: rgb(255, 226, 178);
       +  display: block;
       +}
       +span.run84 {
       +  background-color: rgb(255, 224, 178);
       +  display: block;
       +}
       +span.run85 {
       +  background-color: rgb(255, 220, 178);
       +  display: block;
       +}
       +span.run86 {
       +  background-color: rgb(255, 218, 178);
       +  display: block;
       +}
       +span.run87 {
       +  background-color: rgb(255, 215, 178);
       +  display: block;
       +}
       +span.run88 {
       +  background-color: rgb(255, 212, 178);
       +  display: block;
       +}
       +span.run89 {
       +  background-color: rgb(255, 210, 178);
       +  display: block;
       +}
       +span.run90 {
       +  background-color: rgb(255, 206, 178);
       +  display: block;
       +}
       +span.run91 {
       +  background-color: rgb(255, 204, 178);
       +  display: block;
       +}
       +span.run92 {
       +  background-color: rgb(255, 201, 178);
       +  display: block;
       +}
       +span.run93 {
       +  background-color: rgb(255, 198, 178);
       +  display: block;
       +}
       +span.run94 {
       +  background-color: rgb(255, 196, 178);
       +  display: block;
       +}
       +span.run95 {
       +  background-color: rgb(255, 192, 178);
       +  display: block;
       +}
       +span.run96 {
       +  background-color: rgb(255, 189, 178);
       +  display: block;
       +}
       +span.run97 {
       +  background-color: rgb(255, 187, 178);
       +  display: block;
       +}
       +span.run98 {
       +  background-color: rgb(255, 184, 178);
       +  display: block;
       +}
       +span.run99 {
       +  background-color: rgb(255, 182, 178);
       +  display: block;
       +}
       +span.run100 {
       +  background-color: rgb(255, 178, 178);
       +  display: block;
       +}
       +</style>
       +    </head>
       +  <body><h3>C0 code coverage information</h3>
       +    <p>Generated on Wed Apr 29 18:53:07 +0200 2009 with <a href='http://eigenclass.org/hiki/rcov'>rcov 0.8.1.2</a>
       +      </p>
       +    <hr/>
       +    <pre><span class='marked0'>Code reported as executed by Ruby looks like this...
       +</span><span class='marked1'>and this: this line is also marked as covered.
       +</span><span class='inferred0'>Lines considered as run by rcov, but not reported by Ruby, look like this,
       +</span><span class='inferred1'>and this: these lines were inferred by rcov (using simple heuristics).
       +</span><span class='uncovered0'>Finally, here&apos;s a line marked as not executed.
       +</span></pre>                       
       +<table class='report'><thead><tr><td class='heading'>Name</td>
       +      <td class='heading'>Total lines</td>
       +      <td class='heading'>Lines of code</td>
       +      <td class='heading'>Total coverage</td>
       +      <td class='heading'>Code coverage</td>
       +      </tr>
       +    </thead>
       +  <tbody><tr class='light'><td><a href='lib-simplabs-reports_as_sparkline-report_rb.html'>lib/simplabs/reports_as_sparkline/report.rb</a>
       +        </td>
       +      <td class='lines_total'><tt>119</tt>
       +        </td>
       +      <td class='lines_code'><tt>83</tt>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_total'>100.0%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='100'/>
       +                  <td class='uncovered' width='0'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_code'>100.0%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='100'/>
       +                  <td class='uncovered' width='0'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      </tr>
       +    </tbody>
       +  </table>
       +<pre><span class="marked1"><a name="line1"></a>  1 module Simplabs #:nodoc:
       +</span><span class="inferred0"><a name="line2"></a>  2 
       +</span><span class="marked1"><a name="line3"></a>  3   module ReportsAsSparkline #:nodoc:
       +</span><span class="inferred0"><a name="line4"></a>  4 
       +</span><span class="inferred1"><a name="line5"></a>  5     # The Report class that does all the data retrieval and calculations
       +</span><span class="marked0"><a name="line6"></a>  6     class Report
       +</span><span class="inferred1"><a name="line7"></a>  7 
       +</span><span class="marked0"><a name="line8"></a>  8       attr_reader :klass, :name, :date_column, :value_column, :aggregation, :options
       +</span><span class="inferred1"><a name="line9"></a>  9 
       +</span><span class="inferred0"><a name="line10"></a> 10       # ==== Parameters
       +</span><span class="inferred1"><a name="line11"></a> 11       # * &lt;tt&gt;klass&lt;/tt&gt; - The model the report works on (This is the class you invoke Simplabs::ReportsAsSparkline::ClassMethods#reports_as_sparkline on)
       +</span><span class="inferred0"><a name="line12"></a> 12       # * &lt;tt&gt;name&lt;/tt&gt; - The name of the report (as in Simplabs::ReportsAsSparkline::ClassMethods#reports_as_sparkline)
       +</span><span class="inferred1"><a name="line13"></a> 13       #
       +</span><span class="inferred0"><a name="line14"></a> 14       # ==== Options
       +</span><span class="inferred1"><a name="line15"></a> 15       #
       +</span><span class="inferred0"><a name="line16"></a> 16       # * &lt;tt&gt;:date_column&lt;/tt&gt; - The name of the date column on that the records are aggregated
       +</span><span class="inferred1"><a name="line17"></a> 17       # * &lt;tt&gt;:value_column&lt;/tt&gt; - The name of the column that holds the value to sum for aggregation :sum
       +</span><span class="inferred0"><a name="line18"></a> 18       # * &lt;tt&gt;:aggregation&lt;/tt&gt; - The aggregation to use (one of :count, :sum, :minimum, :maximum or :average); when using anything other than :count, :value_column must also be specified (&lt;b&gt;If you really want to e.g. sumon the 'id' column, you have to explicitely say so.&lt;/b&gt;)
       +</span><span class="inferred1"><a name="line19"></a> 19       # * &lt;tt&gt;:grouping&lt;/tt&gt; - The period records are grouped on (:hour, :day, :week, :month); &lt;b&gt;Beware that reports_as_sparkline treats weeks as starting on monday!&lt;/b&gt;
       +</span><span class="inferred0"><a name="line20"></a> 20       # * &lt;tt&gt;:limit&lt;/tt&gt; - The number of periods to get (see :grouping)
       +</span><span class="inferred1"><a name="line21"></a> 21       # * &lt;tt&gt;:conditions&lt;/tt&gt; - Conditions like in ActiveRecord::Base#find; only records that match there conditions are reported on
       +</span><span class="inferred0"><a name="line22"></a> 22       # * &lt;tt&gt;:live_data&lt;/tt&gt; - Specified whether data for the current reporting period is read; if :live_data is true, you will experience a performance hit since the request cannot be satisfied from the cache only (defaults to false)
       +</span><span class="inferred1"><a name="line23"></a> 23       # * &lt;tt&gt;:end_date&lt;/tt&gt; - When specified, the report will only include data for the periods before this date.
       +</span><span class="marked0"><a name="line24"></a> 24       def initialize(klass, name, options = {})
       +</span><span class="marked1"><a name="line25"></a> 25         ensure_valid_options(options)
       +</span><span class="marked0"><a name="line26"></a> 26         @klass        = klass
       +</span><span class="marked1"><a name="line27"></a> 27         @name         = name
       +</span><span class="marked0"><a name="line28"></a> 28         @date_column  = (options[:date_column] || 'created_at').to_s
       +</span><span class="marked1"><a name="line29"></a> 29         @aggregation  = options[:aggregation] || :count
       +</span><span class="marked0"><a name="line30"></a> 30         @value_column = (options[:value_column] || (@aggregation == :count ? 'id' : name)).to_s
       +</span><span class="marked1"><a name="line31"></a> 31         @options = {
       +</span><span class="inferred0"><a name="line32"></a> 32           :limit      =&gt; options[:limit] || 100,
       +</span><span class="inferred1"><a name="line33"></a> 33           :conditions =&gt; options[:conditions] || [],
       +</span><span class="marked0"><a name="line34"></a> 34           :grouping   =&gt; Grouping.new(options[:grouping] || :day),
       +</span><span class="inferred1"><a name="line35"></a> 35           :live_data  =&gt; options[:live_data] || false,
       +</span><span class="inferred0"><a name="line36"></a> 36           :end_date   =&gt; options[:end_date] || false
       +</span><span class="inferred1"><a name="line37"></a> 37         }
       +</span><span class="marked0"><a name="line38"></a> 38         @options.merge!(options)
       +</span><span class="marked1"><a name="line39"></a> 39         @options.freeze
       +</span><span class="inferred0"><a name="line40"></a> 40       end
       +</span><span class="inferred1"><a name="line41"></a> 41 
       +</span><span class="inferred0"><a name="line42"></a> 42       # Runs the report and returns an array of array of DateTimes and Floats
       +</span><span class="inferred1"><a name="line43"></a> 43       #
       +</span><span class="inferred0"><a name="line44"></a> 44       # ==== Options
       +</span><span class="inferred1"><a name="line45"></a> 45       # * &lt;tt&gt;:limit&lt;/tt&gt; - The number of periods to get
       +</span><span class="inferred0"><a name="line46"></a> 46       # * &lt;tt&gt;:conditions&lt;/tt&gt; - Conditions like in ActiveRecord::Base#find; only records that match there conditions are reported on (&lt;b&gt;Beware that when you specify conditions here, caching will be disabled&lt;/b&gt;)
       +</span><span class="inferred1"><a name="line47"></a> 47       # * &lt;tt&gt;:grouping&lt;/tt&gt; - The period records are grouped on (:hour, :day, :week, :month); &lt;b&gt;Beware that reports_as_sparkline treats weeks as starting on monday!&lt;/b&gt;
       +</span><span class="inferred0"><a name="line48"></a> 48       # * &lt;tt&gt;:live_data&lt;/tt&gt; - Specified whether data for the current reporting period is read; if :live_data is true, you will experience a performance hit since the request cannot be satisfied from the cache only (defaults to false)
       +</span><span class="inferred1"><a name="line49"></a> 49       # * &lt;tt&gt;:end_date&lt;/tt&gt; - When specified, the report will only include data for the periods before this date.
       +</span><span class="marked0"><a name="line50"></a> 50       def run(options = {})
       +</span><span class="marked1"><a name="line51"></a> 51         custom_conditions = options.key?(:conditions)
       +</span><span class="marked0"><a name="line52"></a> 52         options = options_for_run(options)
       +</span><span class="marked1"><a name="line53"></a> 53         ReportCache.process(self, options, !custom_conditions) do |begin_at, end_at|
       +</span><span class="marked0"><a name="line54"></a> 54           read_data(begin_at, end_at, options)
       +</span><span class="inferred1"><a name="line55"></a> 55         end
       +</span><span class="inferred0"><a name="line56"></a> 56       end
       +</span><span class="inferred1"><a name="line57"></a> 57 
       +</span><span class="marked0"><a name="line58"></a> 58       private
       +</span><span class="inferred1"><a name="line59"></a> 59 
       +</span><span class="marked0"><a name="line60"></a> 60         def options_for_run(options = {})
       +</span><span class="marked1"><a name="line61"></a> 61           options = options.dup
       +</span><span class="marked0"><a name="line62"></a> 62           ensure_valid_options(options, :run)
       +</span><span class="marked1"><a name="line63"></a> 63           options.reverse_merge!(@options)
       +</span><span class="marked0"><a name="line64"></a> 64           options[:grouping] = Grouping.new(options[:grouping]) unless options[:grouping].is_a?(Grouping)
       +</span><span class="marked1"><a name="line65"></a> 65           return options
       +</span><span class="inferred0"><a name="line66"></a> 66         end
       +</span><span class="inferred1"><a name="line67"></a> 67 
       +</span><span class="marked0"><a name="line68"></a> 68         def read_data(begin_at, end_at, options)
       +</span><span class="marked1"><a name="line69"></a> 69           conditions = setup_conditions(begin_at, end_at, options[:conditions])
       +</span><span class="marked0"><a name="line70"></a> 70           @klass.send(@aggregation,
       +</span><span class="inferred1"><a name="line71"></a> 71             @value_column,
       +</span><span class="inferred0"><a name="line72"></a> 72             :conditions =&gt; conditions,
       +</span><span class="marked1"><a name="line73"></a> 73             :group =&gt; options[:grouping].to_sql(@date_column),
       +</span><span class="marked0"><a name="line74"></a> 74             :order =&gt; &quot;#{options[:grouping].to_sql(@date_column)} ASC&quot;
       +</span><span class="inferred1"><a name="line75"></a> 75           )
       +</span><span class="inferred0"><a name="line76"></a> 76         end
       +</span><span class="inferred1"><a name="line77"></a> 77 
       +</span><span class="marked0"><a name="line78"></a> 78         def setup_conditions(begin_at, end_at, custom_conditions = [])
       +</span><span class="marked1"><a name="line79"></a> 79           conditions = [@klass.send(:sanitize_sql_for_conditions, custom_conditions) || '']
       +</span><span class="marked0"><a name="line80"></a> 80           conditions[0] += &quot;#{(conditions[0].blank? ? '' : ' AND ')}#{ActiveRecord::Base.connection.quote_table_name(@klass.table_name)}.#{ActiveRecord::Base.connection.quote_column_name(@date_column.to_s)} &quot;
       +</span><span class="marked1"><a name="line81"></a> 81           conditions[0] += if begin_at &amp;&amp; end_at
       +</span><span class="marked0"><a name="line82"></a> 82             'BETWEEN ? AND ?'
       +</span><span class="marked1"><a name="line83"></a> 83           elsif begin_at
       +</span><span class="marked0"><a name="line84"></a> 84             '&gt;= ?'
       +</span><span class="marked1"><a name="line85"></a> 85           elsif end_at
       +</span><span class="marked0"><a name="line86"></a> 86             '&lt;= ?'
       +</span><span class="inferred1"><a name="line87"></a> 87           else
       +</span><span class="marked0"><a name="line88"></a> 88             raise ArgumentError.new('You must pass either begin_at, end_at or both to setup_conditions.')
       +</span><span class="inferred1"><a name="line89"></a> 89           end
       +</span><span class="marked0"><a name="line90"></a> 90           conditions &lt;&lt; begin_at if begin_at
       +</span><span class="marked1"><a name="line91"></a> 91           conditions &lt;&lt; end_at if end_at
       +</span><span class="marked0"><a name="line92"></a> 92           conditions
       +</span><span class="inferred1"><a name="line93"></a> 93         end
       +</span><span class="inferred0"><a name="line94"></a> 94 
       +</span><span class="marked1"><a name="line95"></a> 95         def ensure_valid_options(options, context = :initialize)
       +</span><span class="marked0"><a name="line96"></a> 96           case context
       +</span><span class="marked1"><a name="line97"></a> 97             when :initialize
       +</span><span class="marked0"><a name="line98"></a> 98               options.each_key do |k|
       +</span><span class="marked1"><a name="line99"></a> 99                 raise ArgumentError.new(&quot;Invalid option #{k}!&quot;) unless [:limit, :aggregation, :grouping, :date_column, :value_column, :conditions, :live_data, :end_date].include?(k)
       +</span><span class="inferred0"><a name="line100"></a>100               end
       +</span><span class="marked1"><a name="line101"></a>101               raise ArgumentError.new(&quot;Invalid aggregation #{options[:aggregation]}!&quot;) if options[:aggregation] &amp;&amp; ![:count, :sum, :maximum, :minimum, :average].include?(options[:aggregation])
       +</span><span class="marked0"><a name="line102"></a>102               raise ArgumentError.new('The name of the column holding the value to sum has to be specified for aggregation :sum!') if [:sum, :maximum, :minimum, :average].include?(options[:aggregation]) &amp;&amp; !options.key?(:value_column)
       +</span><span class="marked1"><a name="line103"></a>103             when :run
       +</span><span class="marked0"><a name="line104"></a>104               options.each_key do |k|
       +</span><span class="marked1"><a name="line105"></a>105                 raise ArgumentError.new(&quot;Invalid option #{k}!&quot;) unless [:limit, :conditions, :grouping, :live_data, :end_date].include?(k)
       +</span><span class="inferred0"><a name="line106"></a>106               end
       +</span><span class="inferred1"><a name="line107"></a>107           end
       +</span><span class="marked0"><a name="line108"></a>108           raise ArgumentError.new('Options :live_data and :end_date may not both be specified!') if options[:live_data] &amp;&amp; options[:end_date]
       +</span><span class="marked1"><a name="line109"></a>109           raise ArgumentError.new(&quot;Invalid grouping #{options[:grouping]}!&quot;) if options[:grouping] &amp;&amp; ![:hour, :day, :week, :month].include?(options[:grouping])
       +</span><span class="marked0"><a name="line110"></a>110           raise ArgumentError.new(&quot;Invalid conditions: #{options[:conditions].inspect}!&quot;) if options[:conditions] &amp;&amp; !options[:conditions].is_a?(Array) &amp;&amp; !options[:conditions].is_a?(Hash)
       +</span><span class="marked1"><a name="line111"></a>111           raise ArgumentError.new(&quot;Invalid end date: #{options[:end_date].inspect}; must be a DateTime!&quot;) if options[:end_date] &amp;&amp; !options[:end_date].is_a?(DateTime) &amp;&amp; !options[:end_date].is_a?(Time)
       +</span><span class="marked0"><a name="line112"></a>112           raise ArgumentError.new('End date may not be in the future!') if options[:end_date] &amp;&amp; options[:end_date] &gt; DateTime.now
       +</span><span class="inferred1"><a name="line113"></a>113         end
       +</span><span class="inferred0"><a name="line114"></a>114 
       +</span><span class="inferred1"><a name="line115"></a>115     end
       +</span><span class="inferred0"><a name="line116"></a>116 
       +</span><span class="inferred1"><a name="line117"></a>117   end
       +</span><span class="inferred0"><a name="line118"></a>118 
       +</span><span class="inferred1"><a name="line119"></a>119 end
       +</span></pre><hr/>
       +    <p>Generated using the <a href='http://eigenclass.org/hiki.rb?rcov'>rcov code coverage analysis tool for Ruby</a>
       +   version 0.8.1.2.</p>
       +<p><a href='http://validator.w3.org/check/referer'><img src='http://www.w3.org/Icons/valid-xhtml10' height='31' alt='Valid XHTML 1.0!' width='88'/>
       +        </a>
       +      <a href='http://jigsaw.w3.org/css-validator/check/referer'><img src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Valid CSS!' style='border:0;width:88px;height:31px'/>
       +        </a>
       +      </p>
       +    </body>
       +  </html>
 (DIR) diff --git a/doc/coverage/lib-simplabs-reports_as_sparkline-reporting_period_rb.html b/doc/coverage/lib-simplabs-reports_as_sparkline-reporting_period_rb.html
       @@ -0,0 +1,718 @@
       +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       +<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'><head><title>lib/simplabs/reports_as_sparkline/reporting_period.rb - C0 code coverage information</title>
       +    <style type='text/css'>body { background-color: rgb(240, 240, 245); }</style>
       +    <style type='text/css'>span.cross-ref-title {
       + font-size: 140%;
       +}
       +span.cross-ref a {
       + text-decoration: none;
       +}
       +span.cross-ref {
       + background-color:#f3f7fa;
       + border: 1px dashed #333;
       + margin: 1em;
       + padding: 0.5em;
       + overflow: hidden;
       +}
       +a.crossref-toggle {
       + text-decoration: none;
       +}
       +span.marked0 {
       + background-color: rgb(185, 210, 200);
       + display: block;
       +}
       +span.marked1 {
       + background-color: rgb(190, 215, 205);
       + display: block;
       +}
       +span.inferred0 {
       + background-color: rgb(175, 200, 200);
       + display: block;
       +}
       +span.inferred1 {
       + background-color: rgb(180, 205, 205);
       + display: block;
       +}
       +span.uncovered0 {
       + background-color: rgb(225, 110, 110);
       + display: block;
       +}
       +span.uncovered1 {
       + background-color: rgb(235, 120, 120);
       + display: block;
       +}
       +span.overview {
       + border-bottom: 8px solid black;
       +}
       +div.overview {
       + border-bottom: 8px solid black;
       +}
       +body {
       + font-family: verdana, arial, helvetica;
       +}
       +div.footer {
       + font-size: 68%;
       + margin-top: 1.5em;
       +}
       +h1, h2, h3, h4, h5, h6 {
       + margin-bottom: 0.5em;
       +}
       +h5 {
       + margin-top: 0.5em;
       +}
       +.hidden {
       + display: none;
       +}
       +div.separator {
       + height: 10px;
       +}
       +/* Commented out for better readability, esp. on IE */
       +/*
       +table tr td, table tr th {
       + font-size: 68%;
       +}
       +td.value table tr td {
       + font-size: 11px;
       +}
       +*/
       +table.percent_graph {
       + height: 12px;
       + border: #808080 1px solid;
       + empty-cells: show;
       +}
       +table.percent_graph td.covered {
       + height: 10px;
       + background: #00f000;
       +}
       +table.percent_graph td.uncovered {
       + height: 10px;
       + background: #e00000;
       +}
       +table.percent_graph td.NA {
       + height: 10px;
       + background: #eaeaea;
       +}
       +table.report {
       + border-collapse: collapse;
       + width: 100%;
       +}
       +table.report td.heading {
       + background: #dcecff;
       + border: #d0d0d0 1px solid;
       + font-weight: bold;
       + text-align: center;
       +}
       +table.report td.heading:hover {
       + background: #c0ffc0;
       +}
       +table.report td.text {
       + border: #d0d0d0 1px solid;
       +}
       +table.report td.value,
       +table.report td.lines_total,
       +table.report td.lines_code {
       + text-align: right;
       + border: #d0d0d0 1px solid;
       +}
       +table.report tr.light {
       + background-color: rgb(240, 240, 245);
       +}
       +table.report tr.dark {
       + background-color: rgb(230, 230, 235);
       +}
       +</style>
       +    <script type='text/javascript'>
       +// <![CDATA[
       +  function toggleCode( id ) {
       +    if ( document.getElementById )
       +      elem = document.getElementById( id );
       +    else if ( document.all )
       +      elem = eval( "document.all." + id );
       +    else
       +      return false;
       +
       +    elemStyle = elem.style;
       +    
       +    if ( elemStyle.display != "block" ) {
       +      elemStyle.display = "block"
       +    } else {
       +      elemStyle.display = "none"
       +    }
       +
       +    return true;
       +  }
       +  
       +  // Make cross-references hidden by default
       +  document.writeln( "<style type=\"text/css\">span.cross-ref { display: none }</style>" )
       +  // ]]>
       +</script>
       +    <style type='text/css'>span.run0 {
       +  background-color: rgb(178, 204, 255);
       +  display: block;
       +}
       +span.run1 {
       +  background-color: rgb(178, 206, 255);
       +  display: block;
       +}
       +span.run2 {
       +  background-color: rgb(178, 209, 255);
       +  display: block;
       +}
       +span.run3 {
       +  background-color: rgb(178, 211, 255);
       +  display: block;
       +}
       +span.run4 {
       +  background-color: rgb(178, 214, 255);
       +  display: block;
       +}
       +span.run5 {
       +  background-color: rgb(178, 218, 255);
       +  display: block;
       +}
       +span.run6 {
       +  background-color: rgb(178, 220, 255);
       +  display: block;
       +}
       +span.run7 {
       +  background-color: rgb(178, 223, 255);
       +  display: block;
       +}
       +span.run8 {
       +  background-color: rgb(178, 225, 255);
       +  display: block;
       +}
       +span.run9 {
       +  background-color: rgb(178, 228, 255);
       +  display: block;
       +}
       +span.run10 {
       +  background-color: rgb(178, 232, 255);
       +  display: block;
       +}
       +span.run11 {
       +  background-color: rgb(178, 234, 255);
       +  display: block;
       +}
       +span.run12 {
       +  background-color: rgb(178, 237, 255);
       +  display: block;
       +}
       +span.run13 {
       +  background-color: rgb(178, 239, 255);
       +  display: block;
       +}
       +span.run14 {
       +  background-color: rgb(178, 242, 255);
       +  display: block;
       +}
       +span.run15 {
       +  background-color: rgb(178, 246, 255);
       +  display: block;
       +}
       +span.run16 {
       +  background-color: rgb(178, 248, 255);
       +  display: block;
       +}
       +span.run17 {
       +  background-color: rgb(178, 251, 255);
       +  display: block;
       +}
       +span.run18 {
       +  background-color: rgb(178, 253, 255);
       +  display: block;
       +}
       +span.run19 {
       +  background-color: rgb(178, 255, 253);
       +  display: block;
       +}
       +span.run20 {
       +  background-color: rgb(178, 255, 249);
       +  display: block;
       +}
       +span.run21 {
       +  background-color: rgb(178, 255, 247);
       +  display: block;
       +}
       +span.run22 {
       +  background-color: rgb(178, 255, 244);
       +  display: block;
       +}
       +span.run23 {
       +  background-color: rgb(178, 255, 242);
       +  display: block;
       +}
       +span.run24 {
       +  background-color: rgb(178, 255, 239);
       +  display: block;
       +}
       +span.run25 {
       +  background-color: rgb(178, 255, 235);
       +  display: block;
       +}
       +span.run26 {
       +  background-color: rgb(178, 255, 233);
       +  display: block;
       +}
       +span.run27 {
       +  background-color: rgb(178, 255, 230);
       +  display: block;
       +}
       +span.run28 {
       +  background-color: rgb(178, 255, 228);
       +  display: block;
       +}
       +span.run29 {
       +  background-color: rgb(178, 255, 225);
       +  display: block;
       +}
       +span.run30 {
       +  background-color: rgb(178, 255, 221);
       +  display: block;
       +}
       +span.run31 {
       +  background-color: rgb(178, 255, 219);
       +  display: block;
       +}
       +span.run32 {
       +  background-color: rgb(178, 255, 216);
       +  display: block;
       +}
       +span.run33 {
       +  background-color: rgb(178, 255, 214);
       +  display: block;
       +}
       +span.run34 {
       +  background-color: rgb(178, 255, 211);
       +  display: block;
       +}
       +span.run35 {
       +  background-color: rgb(178, 255, 207);
       +  display: block;
       +}
       +span.run36 {
       +  background-color: rgb(178, 255, 205);
       +  display: block;
       +}
       +span.run37 {
       +  background-color: rgb(178, 255, 202);
       +  display: block;
       +}
       +span.run38 {
       +  background-color: rgb(178, 255, 200);
       +  display: block;
       +}
       +span.run39 {
       +  background-color: rgb(178, 255, 197);
       +  display: block;
       +}
       +span.run40 {
       +  background-color: rgb(178, 255, 193);
       +  display: block;
       +}
       +span.run41 {
       +  background-color: rgb(178, 255, 191);
       +  display: block;
       +}
       +span.run42 {
       +  background-color: rgb(178, 255, 188);
       +  display: block;
       +}
       +span.run43 {
       +  background-color: rgb(178, 255, 186);
       +  display: block;
       +}
       +span.run44 {
       +  background-color: rgb(178, 255, 183);
       +  display: block;
       +}
       +span.run45 {
       +  background-color: rgb(178, 255, 179);
       +  display: block;
       +}
       +span.run46 {
       +  background-color: rgb(179, 255, 178);
       +  display: block;
       +}
       +span.run47 {
       +  background-color: rgb(182, 255, 178);
       +  display: block;
       +}
       +span.run48 {
       +  background-color: rgb(184, 255, 178);
       +  display: block;
       +}
       +span.run49 {
       +  background-color: rgb(187, 255, 178);
       +  display: block;
       +}
       +span.run50 {
       +  background-color: rgb(191, 255, 178);
       +  display: block;
       +}
       +span.run51 {
       +  background-color: rgb(193, 255, 178);
       +  display: block;
       +}
       +span.run52 {
       +  background-color: rgb(196, 255, 178);
       +  display: block;
       +}
       +span.run53 {
       +  background-color: rgb(198, 255, 178);
       +  display: block;
       +}
       +span.run54 {
       +  background-color: rgb(201, 255, 178);
       +  display: block;
       +}
       +span.run55 {
       +  background-color: rgb(205, 255, 178);
       +  display: block;
       +}
       +span.run56 {
       +  background-color: rgb(207, 255, 178);
       +  display: block;
       +}
       +span.run57 {
       +  background-color: rgb(210, 255, 178);
       +  display: block;
       +}
       +span.run58 {
       +  background-color: rgb(212, 255, 178);
       +  display: block;
       +}
       +span.run59 {
       +  background-color: rgb(215, 255, 178);
       +  display: block;
       +}
       +span.run60 {
       +  background-color: rgb(219, 255, 178);
       +  display: block;
       +}
       +span.run61 {
       +  background-color: rgb(221, 255, 178);
       +  display: block;
       +}
       +span.run62 {
       +  background-color: rgb(224, 255, 178);
       +  display: block;
       +}
       +span.run63 {
       +  background-color: rgb(226, 255, 178);
       +  display: block;
       +}
       +span.run64 {
       +  background-color: rgb(229, 255, 178);
       +  display: block;
       +}
       +span.run65 {
       +  background-color: rgb(233, 255, 178);
       +  display: block;
       +}
       +span.run66 {
       +  background-color: rgb(235, 255, 178);
       +  display: block;
       +}
       +span.run67 {
       +  background-color: rgb(238, 255, 178);
       +  display: block;
       +}
       +span.run68 {
       +  background-color: rgb(240, 255, 178);
       +  display: block;
       +}
       +span.run69 {
       +  background-color: rgb(243, 255, 178);
       +  display: block;
       +}
       +span.run70 {
       +  background-color: rgb(247, 255, 178);
       +  display: block;
       +}
       +span.run71 {
       +  background-color: rgb(249, 255, 178);
       +  display: block;
       +}
       +span.run72 {
       +  background-color: rgb(252, 255, 178);
       +  display: block;
       +}
       +span.run73 {
       +  background-color: rgb(255, 255, 178);
       +  display: block;
       +}
       +span.run74 {
       +  background-color: rgb(255, 252, 178);
       +  display: block;
       +}
       +span.run75 {
       +  background-color: rgb(255, 248, 178);
       +  display: block;
       +}
       +span.run76 {
       +  background-color: rgb(255, 246, 178);
       +  display: block;
       +}
       +span.run77 {
       +  background-color: rgb(255, 243, 178);
       +  display: block;
       +}
       +span.run78 {
       +  background-color: rgb(255, 240, 178);
       +  display: block;
       +}
       +span.run79 {
       +  background-color: rgb(255, 238, 178);
       +  display: block;
       +}
       +span.run80 {
       +  background-color: rgb(255, 234, 178);
       +  display: block;
       +}
       +span.run81 {
       +  background-color: rgb(255, 232, 178);
       +  display: block;
       +}
       +span.run82 {
       +  background-color: rgb(255, 229, 178);
       +  display: block;
       +}
       +span.run83 {
       +  background-color: rgb(255, 226, 178);
       +  display: block;
       +}
       +span.run84 {
       +  background-color: rgb(255, 224, 178);
       +  display: block;
       +}
       +span.run85 {
       +  background-color: rgb(255, 220, 178);
       +  display: block;
       +}
       +span.run86 {
       +  background-color: rgb(255, 218, 178);
       +  display: block;
       +}
       +span.run87 {
       +  background-color: rgb(255, 215, 178);
       +  display: block;
       +}
       +span.run88 {
       +  background-color: rgb(255, 212, 178);
       +  display: block;
       +}
       +span.run89 {
       +  background-color: rgb(255, 210, 178);
       +  display: block;
       +}
       +span.run90 {
       +  background-color: rgb(255, 206, 178);
       +  display: block;
       +}
       +span.run91 {
       +  background-color: rgb(255, 204, 178);
       +  display: block;
       +}
       +span.run92 {
       +  background-color: rgb(255, 201, 178);
       +  display: block;
       +}
       +span.run93 {
       +  background-color: rgb(255, 198, 178);
       +  display: block;
       +}
       +span.run94 {
       +  background-color: rgb(255, 196, 178);
       +  display: block;
       +}
       +span.run95 {
       +  background-color: rgb(255, 192, 178);
       +  display: block;
       +}
       +span.run96 {
       +  background-color: rgb(255, 189, 178);
       +  display: block;
       +}
       +span.run97 {
       +  background-color: rgb(255, 187, 178);
       +  display: block;
       +}
       +span.run98 {
       +  background-color: rgb(255, 184, 178);
       +  display: block;
       +}
       +span.run99 {
       +  background-color: rgb(255, 182, 178);
       +  display: block;
       +}
       +span.run100 {
       +  background-color: rgb(255, 178, 178);
       +  display: block;
       +}
       +</style>
       +    </head>
       +  <body><h3>C0 code coverage information</h3>
       +    <p>Generated on Wed Apr 29 18:53:08 +0200 2009 with <a href='http://eigenclass.org/hiki/rcov'>rcov 0.8.1.2</a>
       +      </p>
       +    <hr/>
       +    <pre><span class='marked0'>Code reported as executed by Ruby looks like this...
       +</span><span class='marked1'>and this: this line is also marked as covered.
       +</span><span class='inferred0'>Lines considered as run by rcov, but not reported by Ruby, look like this,
       +</span><span class='inferred1'>and this: these lines were inferred by rcov (using simple heuristics).
       +</span><span class='uncovered0'>Finally, here&apos;s a line marked as not executed.
       +</span></pre>                       
       +<table class='report'><thead><tr><td class='heading'>Name</td>
       +      <td class='heading'>Total lines</td>
       +      <td class='heading'>Lines of code</td>
       +      <td class='heading'>Total coverage</td>
       +      <td class='heading'>Code coverage</td>
       +      </tr>
       +    </thead>
       +  <tbody><tr class='light'><td><a href='lib-simplabs-reports_as_sparkline-reporting_period_rb.html'>lib/simplabs/reports_as_sparkline/reporting_period.rb</a>
       +        </td>
       +      <td class='lines_total'><tt>108</tt>
       +        </td>
       +      <td class='lines_code'><tt>76</tt>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_total'>96.3%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='96'/>
       +                  <td class='uncovered' width='4'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_code'>94.7%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='95'/>
       +                  <td class='uncovered' width='5'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      </tr>
       +    </tbody>
       +  </table>
       +<pre><span class="marked0"><a name="line1"></a>  1 module Simplabs #:nodoc:
       +</span><span class="inferred1"><a name="line2"></a>  2 
       +</span><span class="marked0"><a name="line3"></a>  3   module ReportsAsSparkline #:nodoc:
       +</span><span class="inferred1"><a name="line4"></a>  4 
       +</span><span class="inferred0"><a name="line5"></a>  5     # A ReportingPeriod is  - depending on the Grouping - either a specific hour, a day, a month or a year. All records falling into this period will be grouped together.
       +</span><span class="marked1"><a name="line6"></a>  6     class ReportingPeriod
       +</span><span class="inferred0"><a name="line7"></a>  7 
       +</span><span class="marked1"><a name="line8"></a>  8       attr_reader :date_time, :grouping
       +</span><span class="inferred0"><a name="line9"></a>  9 
       +</span><span class="inferred1"><a name="line10"></a> 10       # ==== Parameters
       +</span><span class="inferred0"><a name="line11"></a> 11       # * &lt;tt&gt;grouping&lt;/tt&gt; - The Simplabs::ReportsAsSparkline::Grouping of the reporting period
       +</span><span class="inferred1"><a name="line12"></a> 12       # * &lt;tt&gt;date_time&lt;/tt&gt; - The DateTime that reporting period is created for
       +</span><span class="marked0"><a name="line13"></a> 13       def initialize(grouping, date_time = nil)
       +</span><span class="marked1"><a name="line14"></a> 14         @grouping  = grouping
       +</span><span class="marked0"><a name="line15"></a> 15         @date_time = parse_date_time(date_time || DateTime.now)
       +</span><span class="inferred1"><a name="line16"></a> 16       end
       +</span><span class="inferred0"><a name="line17"></a> 17 
       +</span><span class="inferred1"><a name="line18"></a> 18       # Returns the first reporting period for a grouping and a limit; e.g. the first reporting period for Grouping :day and limit 2 would be Time.now - 2.days
       +</span><span class="inferred0"><a name="line19"></a> 19       #
       +</span><span class="inferred1"><a name="line20"></a> 20       # ==== Parameters
       +</span><span class="inferred0"><a name="line21"></a> 21       # * &lt;tt&gt;grouping&lt;/tt&gt; - The Simplabs::ReportsAsSparkline::Grouping of the reporting period
       +</span><span class="inferred1"><a name="line22"></a> 22       # * &lt;tt&gt;limit&lt;/tt&gt; - The number of reporting periods until the first one
       +</span><span class="marked0"><a name="line23"></a> 23       def self.first(grouping, limit, end_date = nil)
       +</span><span class="marked1"><a name="line24"></a> 24         self.new(grouping, end_date).offset(-limit)
       +</span><span class="marked0"><a name="line25"></a> 25       end
       +</span><span class="inferred1"><a name="line26"></a> 26 
       +</span><span class="marked0"><a name="line27"></a> 27       def self.from_db_string(grouping, db_string) #:nodoc:
       +</span><span class="marked1"><a name="line28"></a> 28         parts = grouping.date_parts_from_db_string(db_string)
       +</span><span class="marked0"><a name="line29"></a> 29         result = case grouping.identifier
       +</span><span class="marked1"><a name="line30"></a> 30           when :hour
       +</span><span class="marked0"><a name="line31"></a> 31             self.new(grouping, DateTime.new(parts[0], parts[1], parts[2], parts[3], 0, 0))
       +</span><span class="marked1"><a name="line32"></a> 32           when :day
       +</span><span class="marked0"><a name="line33"></a> 33             self.new(grouping, Date.new(parts[0], parts[1], parts[2]))
       +</span><span class="marked1"><a name="line34"></a> 34           when :week
       +</span><span class="marked0"><a name="line35"></a> 35             self.new(grouping, Date.commercial(parts[0], parts[1], 1))
       +</span><span class="marked1"><a name="line36"></a> 36           when :month
       +</span><span class="marked0"><a name="line37"></a> 37             self.new(grouping, Date.new(parts[0], parts[1], 1))
       +</span><span class="inferred1"><a name="line38"></a> 38         end
       +</span><span class="marked0"><a name="line39"></a> 39         result
       +</span><span class="inferred1"><a name="line40"></a> 40       end
       +</span><span class="inferred0"><a name="line41"></a> 41 
       +</span><span class="inferred1"><a name="line42"></a> 42       # Returns the next reporting period (that is next hour/day/month/year)
       +</span><span class="marked0"><a name="line43"></a> 43       def next
       +</span><span class="marked1"><a name="line44"></a> 44         self.offset(1)
       +</span><span class="marked0"><a name="line45"></a> 45       end
       +</span><span class="inferred1"><a name="line46"></a> 46 
       +</span><span class="inferred0"><a name="line47"></a> 47       # Returns the previous reporting period (that is next hour/day/month/year)
       +</span><span class="marked1"><a name="line48"></a> 48       def previous
       +</span><span class="marked0"><a name="line49"></a> 49         self.offset(-1)
       +</span><span class="marked1"><a name="line50"></a> 50       end
       +</span><span class="inferred0"><a name="line51"></a> 51 
       +</span><span class="inferred1"><a name="line52"></a> 52       # Returns the reporting period with the specified offset from the current
       +</span><span class="inferred0"><a name="line53"></a> 53       #
       +</span><span class="inferred1"><a name="line54"></a> 54       # ==== Parameters
       +</span><span class="inferred0"><a name="line55"></a> 55       # * &lt;tt&gt;offset&lt;/tt&gt; - The offset to return the reporting period for (specifies the offset in hours/days/months/years), depending on the reporting period's grouping
       +</span><span class="marked1"><a name="line56"></a> 56       def offset(offset)
       +</span><span class="marked0"><a name="line57"></a> 57         self.class.new(@grouping, @date_time + offset.send(@grouping.identifier))
       +</span><span class="marked1"><a name="line58"></a> 58       end
       +</span><span class="inferred0"><a name="line59"></a> 59 
       +</span><span class="marked1"><a name="line60"></a> 60       def ==(other) #:nodoc:
       +</span><span class="marked0"><a name="line61"></a> 61         if other.class == Simplabs::ReportsAsSparkline::ReportingPeriod
       +</span><span class="marked1"><a name="line62"></a> 62           return @date_time.to_s == other.date_time.to_s &amp;&amp; @grouping.identifier.to_s == other.grouping.identifier.to_s
       +</span><span class="inferred0"><a name="line63"></a> 63         end
       +</span><span class="uncovered1"><a name="line64"></a> 64         false
       +</span><span class="uncovered0"><a name="line65"></a> 65       end
       +</span><span class="inferred1"><a name="line66"></a> 66 
       +</span><span class="marked0"><a name="line67"></a> 67       def &lt;(other) #:nodoc:
       +</span><span class="marked1"><a name="line68"></a> 68         if other.class == Simplabs::ReportsAsSparkline::ReportingPeriod
       +</span><span class="marked0"><a name="line69"></a> 69           return @date_time &lt; other.date_time
       +</span><span class="inferred1"><a name="line70"></a> 70         end
       +</span><span class="uncovered0"><a name="line71"></a> 71         raise ArgumentError.new(&quot;Can only compare instances of #{Simplabs::ReportsAsSparkline::ReportingPeriod.klass}&quot;)
       +</span><span class="uncovered1"><a name="line72"></a> 72       end
       +</span><span class="inferred0"><a name="line73"></a> 73 
       +</span><span class="marked1"><a name="line74"></a> 74       def last_date_time #:nodoc:
       +</span><span class="marked0"><a name="line75"></a> 75         case @grouping.identifier
       +</span><span class="marked1"><a name="line76"></a> 76           when :hour
       +</span><span class="marked0"><a name="line77"></a> 77             DateTime.new(@date_time.year, @date_time.month, @date_time.day, @date_time.hour, 59, 59)
       +</span><span class="marked1"><a name="line78"></a> 78           when :day
       +</span><span class="marked0"><a name="line79"></a> 79             DateTime.new(@date_time.year, @date_time.month, @date_time.day, 23, 59, 59)
       +</span><span class="marked1"><a name="line80"></a> 80           when :week
       +</span><span class="marked0"><a name="line81"></a> 81             date_time = (@date_time - @date_time.wday.days) + 7.days
       +</span><span class="marked1"><a name="line82"></a> 82             Date.new(date_time.year, date_time.month, date_time.day)
       +</span><span class="marked0"><a name="line83"></a> 83           when :month
       +</span><span class="marked1"><a name="line84"></a> 84             Date.new(@date_time.year, @date_time.month, (Date.new(@date_time.year, 12, 31) &lt;&lt; (12 - @date_time.month)).day)
       +</span><span class="inferred0"><a name="line85"></a> 85         end
       +</span><span class="marked1"><a name="line86"></a> 86       end
       +</span><span class="inferred0"><a name="line87"></a> 87 
       +</span><span class="marked1"><a name="line88"></a> 88       private
       +</span><span class="inferred0"><a name="line89"></a> 89 
       +</span><span class="marked1"><a name="line90"></a> 90         def parse_date_time(date_time)
       +</span><span class="marked0"><a name="line91"></a> 91           case @grouping.identifier
       +</span><span class="marked1"><a name="line92"></a> 92             when :hour
       +</span><span class="marked0"><a name="line93"></a> 93               DateTime.new(date_time.year, date_time.month, date_time.day, date_time.hour)
       +</span><span class="marked1"><a name="line94"></a> 94             when :day
       +</span><span class="marked0"><a name="line95"></a> 95               date_time.to_date
       +</span><span class="marked1"><a name="line96"></a> 96             when :week
       +</span><span class="marked0"><a name="line97"></a> 97               date_time = (date_time - date_time.wday.days) + 1.day
       +</span><span class="marked1"><a name="line98"></a> 98               Date.new(date_time.year, date_time.month, date_time.day)
       +</span><span class="marked0"><a name="line99"></a> 99             when :month
       +</span><span class="marked1"><a name="line100"></a>100               Date.new(date_time.year, date_time.month, 1)
       +</span><span class="inferred0"><a name="line101"></a>101           end
       +</span><span class="marked1"><a name="line102"></a>102         end
       +</span><span class="inferred0"><a name="line103"></a>103 
       +</span><span class="inferred1"><a name="line104"></a>104     end
       +</span><span class="inferred0"><a name="line105"></a>105 
       +</span><span class="inferred1"><a name="line106"></a>106   end
       +</span><span class="inferred0"><a name="line107"></a>107 
       +</span><span class="inferred1"><a name="line108"></a>108 end
       +</span></pre><hr/>
       +    <p>Generated using the <a href='http://eigenclass.org/hiki.rb?rcov'>rcov code coverage analysis tool for Ruby</a>
       +   version 0.8.1.2.</p>
       +<p><a href='http://validator.w3.org/check/referer'><img src='http://www.w3.org/Icons/valid-xhtml10' height='31' alt='Valid XHTML 1.0!' width='88'/>
       +        </a>
       +      <a href='http://jigsaw.w3.org/css-validator/check/referer'><img src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Valid CSS!' style='border:0;width:88px;height:31px'/>
       +        </a>
       +      </p>
       +    </body>
       +  </html>
 (DIR) diff --git a/doc/coverage/lib-simplabs-reports_as_sparkline-sparkline_tag_helper_rb.html b/doc/coverage/lib-simplabs-reports_as_sparkline-sparkline_tag_helper_rb.html
       @@ -0,0 +1,649 @@
       +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       +<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'><head><title>lib/simplabs/reports_as_sparkline/sparkline_tag_helper.rb - C0 code coverage information</title>
       +    <style type='text/css'>body { background-color: rgb(240, 240, 245); }</style>
       +    <style type='text/css'>span.cross-ref-title {
       + font-size: 140%;
       +}
       +span.cross-ref a {
       + text-decoration: none;
       +}
       +span.cross-ref {
       + background-color:#f3f7fa;
       + border: 1px dashed #333;
       + margin: 1em;
       + padding: 0.5em;
       + overflow: hidden;
       +}
       +a.crossref-toggle {
       + text-decoration: none;
       +}
       +span.marked0 {
       + background-color: rgb(185, 210, 200);
       + display: block;
       +}
       +span.marked1 {
       + background-color: rgb(190, 215, 205);
       + display: block;
       +}
       +span.inferred0 {
       + background-color: rgb(175, 200, 200);
       + display: block;
       +}
       +span.inferred1 {
       + background-color: rgb(180, 205, 205);
       + display: block;
       +}
       +span.uncovered0 {
       + background-color: rgb(225, 110, 110);
       + display: block;
       +}
       +span.uncovered1 {
       + background-color: rgb(235, 120, 120);
       + display: block;
       +}
       +span.overview {
       + border-bottom: 8px solid black;
       +}
       +div.overview {
       + border-bottom: 8px solid black;
       +}
       +body {
       + font-family: verdana, arial, helvetica;
       +}
       +div.footer {
       + font-size: 68%;
       + margin-top: 1.5em;
       +}
       +h1, h2, h3, h4, h5, h6 {
       + margin-bottom: 0.5em;
       +}
       +h5 {
       + margin-top: 0.5em;
       +}
       +.hidden {
       + display: none;
       +}
       +div.separator {
       + height: 10px;
       +}
       +/* Commented out for better readability, esp. on IE */
       +/*
       +table tr td, table tr th {
       + font-size: 68%;
       +}
       +td.value table tr td {
       + font-size: 11px;
       +}
       +*/
       +table.percent_graph {
       + height: 12px;
       + border: #808080 1px solid;
       + empty-cells: show;
       +}
       +table.percent_graph td.covered {
       + height: 10px;
       + background: #00f000;
       +}
       +table.percent_graph td.uncovered {
       + height: 10px;
       + background: #e00000;
       +}
       +table.percent_graph td.NA {
       + height: 10px;
       + background: #eaeaea;
       +}
       +table.report {
       + border-collapse: collapse;
       + width: 100%;
       +}
       +table.report td.heading {
       + background: #dcecff;
       + border: #d0d0d0 1px solid;
       + font-weight: bold;
       + text-align: center;
       +}
       +table.report td.heading:hover {
       + background: #c0ffc0;
       +}
       +table.report td.text {
       + border: #d0d0d0 1px solid;
       +}
       +table.report td.value,
       +table.report td.lines_total,
       +table.report td.lines_code {
       + text-align: right;
       + border: #d0d0d0 1px solid;
       +}
       +table.report tr.light {
       + background-color: rgb(240, 240, 245);
       +}
       +table.report tr.dark {
       + background-color: rgb(230, 230, 235);
       +}
       +</style>
       +    <script type='text/javascript'>
       +// <![CDATA[
       +  function toggleCode( id ) {
       +    if ( document.getElementById )
       +      elem = document.getElementById( id );
       +    else if ( document.all )
       +      elem = eval( "document.all." + id );
       +    else
       +      return false;
       +
       +    elemStyle = elem.style;
       +    
       +    if ( elemStyle.display != "block" ) {
       +      elemStyle.display = "block"
       +    } else {
       +      elemStyle.display = "none"
       +    }
       +
       +    return true;
       +  }
       +  
       +  // Make cross-references hidden by default
       +  document.writeln( "<style type=\"text/css\">span.cross-ref { display: none }</style>" )
       +  // ]]>
       +</script>
       +    <style type='text/css'>span.run0 {
       +  background-color: rgb(178, 204, 255);
       +  display: block;
       +}
       +span.run1 {
       +  background-color: rgb(178, 206, 255);
       +  display: block;
       +}
       +span.run2 {
       +  background-color: rgb(178, 209, 255);
       +  display: block;
       +}
       +span.run3 {
       +  background-color: rgb(178, 211, 255);
       +  display: block;
       +}
       +span.run4 {
       +  background-color: rgb(178, 214, 255);
       +  display: block;
       +}
       +span.run5 {
       +  background-color: rgb(178, 218, 255);
       +  display: block;
       +}
       +span.run6 {
       +  background-color: rgb(178, 220, 255);
       +  display: block;
       +}
       +span.run7 {
       +  background-color: rgb(178, 223, 255);
       +  display: block;
       +}
       +span.run8 {
       +  background-color: rgb(178, 225, 255);
       +  display: block;
       +}
       +span.run9 {
       +  background-color: rgb(178, 228, 255);
       +  display: block;
       +}
       +span.run10 {
       +  background-color: rgb(178, 232, 255);
       +  display: block;
       +}
       +span.run11 {
       +  background-color: rgb(178, 234, 255);
       +  display: block;
       +}
       +span.run12 {
       +  background-color: rgb(178, 237, 255);
       +  display: block;
       +}
       +span.run13 {
       +  background-color: rgb(178, 239, 255);
       +  display: block;
       +}
       +span.run14 {
       +  background-color: rgb(178, 242, 255);
       +  display: block;
       +}
       +span.run15 {
       +  background-color: rgb(178, 246, 255);
       +  display: block;
       +}
       +span.run16 {
       +  background-color: rgb(178, 248, 255);
       +  display: block;
       +}
       +span.run17 {
       +  background-color: rgb(178, 251, 255);
       +  display: block;
       +}
       +span.run18 {
       +  background-color: rgb(178, 253, 255);
       +  display: block;
       +}
       +span.run19 {
       +  background-color: rgb(178, 255, 253);
       +  display: block;
       +}
       +span.run20 {
       +  background-color: rgb(178, 255, 249);
       +  display: block;
       +}
       +span.run21 {
       +  background-color: rgb(178, 255, 247);
       +  display: block;
       +}
       +span.run22 {
       +  background-color: rgb(178, 255, 244);
       +  display: block;
       +}
       +span.run23 {
       +  background-color: rgb(178, 255, 242);
       +  display: block;
       +}
       +span.run24 {
       +  background-color: rgb(178, 255, 239);
       +  display: block;
       +}
       +span.run25 {
       +  background-color: rgb(178, 255, 235);
       +  display: block;
       +}
       +span.run26 {
       +  background-color: rgb(178, 255, 233);
       +  display: block;
       +}
       +span.run27 {
       +  background-color: rgb(178, 255, 230);
       +  display: block;
       +}
       +span.run28 {
       +  background-color: rgb(178, 255, 228);
       +  display: block;
       +}
       +span.run29 {
       +  background-color: rgb(178, 255, 225);
       +  display: block;
       +}
       +span.run30 {
       +  background-color: rgb(178, 255, 221);
       +  display: block;
       +}
       +span.run31 {
       +  background-color: rgb(178, 255, 219);
       +  display: block;
       +}
       +span.run32 {
       +  background-color: rgb(178, 255, 216);
       +  display: block;
       +}
       +span.run33 {
       +  background-color: rgb(178, 255, 214);
       +  display: block;
       +}
       +span.run34 {
       +  background-color: rgb(178, 255, 211);
       +  display: block;
       +}
       +span.run35 {
       +  background-color: rgb(178, 255, 207);
       +  display: block;
       +}
       +span.run36 {
       +  background-color: rgb(178, 255, 205);
       +  display: block;
       +}
       +span.run37 {
       +  background-color: rgb(178, 255, 202);
       +  display: block;
       +}
       +span.run38 {
       +  background-color: rgb(178, 255, 200);
       +  display: block;
       +}
       +span.run39 {
       +  background-color: rgb(178, 255, 197);
       +  display: block;
       +}
       +span.run40 {
       +  background-color: rgb(178, 255, 193);
       +  display: block;
       +}
       +span.run41 {
       +  background-color: rgb(178, 255, 191);
       +  display: block;
       +}
       +span.run42 {
       +  background-color: rgb(178, 255, 188);
       +  display: block;
       +}
       +span.run43 {
       +  background-color: rgb(178, 255, 186);
       +  display: block;
       +}
       +span.run44 {
       +  background-color: rgb(178, 255, 183);
       +  display: block;
       +}
       +span.run45 {
       +  background-color: rgb(178, 255, 179);
       +  display: block;
       +}
       +span.run46 {
       +  background-color: rgb(179, 255, 178);
       +  display: block;
       +}
       +span.run47 {
       +  background-color: rgb(182, 255, 178);
       +  display: block;
       +}
       +span.run48 {
       +  background-color: rgb(184, 255, 178);
       +  display: block;
       +}
       +span.run49 {
       +  background-color: rgb(187, 255, 178);
       +  display: block;
       +}
       +span.run50 {
       +  background-color: rgb(191, 255, 178);
       +  display: block;
       +}
       +span.run51 {
       +  background-color: rgb(193, 255, 178);
       +  display: block;
       +}
       +span.run52 {
       +  background-color: rgb(196, 255, 178);
       +  display: block;
       +}
       +span.run53 {
       +  background-color: rgb(198, 255, 178);
       +  display: block;
       +}
       +span.run54 {
       +  background-color: rgb(201, 255, 178);
       +  display: block;
       +}
       +span.run55 {
       +  background-color: rgb(205, 255, 178);
       +  display: block;
       +}
       +span.run56 {
       +  background-color: rgb(207, 255, 178);
       +  display: block;
       +}
       +span.run57 {
       +  background-color: rgb(210, 255, 178);
       +  display: block;
       +}
       +span.run58 {
       +  background-color: rgb(212, 255, 178);
       +  display: block;
       +}
       +span.run59 {
       +  background-color: rgb(215, 255, 178);
       +  display: block;
       +}
       +span.run60 {
       +  background-color: rgb(219, 255, 178);
       +  display: block;
       +}
       +span.run61 {
       +  background-color: rgb(221, 255, 178);
       +  display: block;
       +}
       +span.run62 {
       +  background-color: rgb(224, 255, 178);
       +  display: block;
       +}
       +span.run63 {
       +  background-color: rgb(226, 255, 178);
       +  display: block;
       +}
       +span.run64 {
       +  background-color: rgb(229, 255, 178);
       +  display: block;
       +}
       +span.run65 {
       +  background-color: rgb(233, 255, 178);
       +  display: block;
       +}
       +span.run66 {
       +  background-color: rgb(235, 255, 178);
       +  display: block;
       +}
       +span.run67 {
       +  background-color: rgb(238, 255, 178);
       +  display: block;
       +}
       +span.run68 {
       +  background-color: rgb(240, 255, 178);
       +  display: block;
       +}
       +span.run69 {
       +  background-color: rgb(243, 255, 178);
       +  display: block;
       +}
       +span.run70 {
       +  background-color: rgb(247, 255, 178);
       +  display: block;
       +}
       +span.run71 {
       +  background-color: rgb(249, 255, 178);
       +  display: block;
       +}
       +span.run72 {
       +  background-color: rgb(252, 255, 178);
       +  display: block;
       +}
       +span.run73 {
       +  background-color: rgb(255, 255, 178);
       +  display: block;
       +}
       +span.run74 {
       +  background-color: rgb(255, 252, 178);
       +  display: block;
       +}
       +span.run75 {
       +  background-color: rgb(255, 248, 178);
       +  display: block;
       +}
       +span.run76 {
       +  background-color: rgb(255, 246, 178);
       +  display: block;
       +}
       +span.run77 {
       +  background-color: rgb(255, 243, 178);
       +  display: block;
       +}
       +span.run78 {
       +  background-color: rgb(255, 240, 178);
       +  display: block;
       +}
       +span.run79 {
       +  background-color: rgb(255, 238, 178);
       +  display: block;
       +}
       +span.run80 {
       +  background-color: rgb(255, 234, 178);
       +  display: block;
       +}
       +span.run81 {
       +  background-color: rgb(255, 232, 178);
       +  display: block;
       +}
       +span.run82 {
       +  background-color: rgb(255, 229, 178);
       +  display: block;
       +}
       +span.run83 {
       +  background-color: rgb(255, 226, 178);
       +  display: block;
       +}
       +span.run84 {
       +  background-color: rgb(255, 224, 178);
       +  display: block;
       +}
       +span.run85 {
       +  background-color: rgb(255, 220, 178);
       +  display: block;
       +}
       +span.run86 {
       +  background-color: rgb(255, 218, 178);
       +  display: block;
       +}
       +span.run87 {
       +  background-color: rgb(255, 215, 178);
       +  display: block;
       +}
       +span.run88 {
       +  background-color: rgb(255, 212, 178);
       +  display: block;
       +}
       +span.run89 {
       +  background-color: rgb(255, 210, 178);
       +  display: block;
       +}
       +span.run90 {
       +  background-color: rgb(255, 206, 178);
       +  display: block;
       +}
       +span.run91 {
       +  background-color: rgb(255, 204, 178);
       +  display: block;
       +}
       +span.run92 {
       +  background-color: rgb(255, 201, 178);
       +  display: block;
       +}
       +span.run93 {
       +  background-color: rgb(255, 198, 178);
       +  display: block;
       +}
       +span.run94 {
       +  background-color: rgb(255, 196, 178);
       +  display: block;
       +}
       +span.run95 {
       +  background-color: rgb(255, 192, 178);
       +  display: block;
       +}
       +span.run96 {
       +  background-color: rgb(255, 189, 178);
       +  display: block;
       +}
       +span.run97 {
       +  background-color: rgb(255, 187, 178);
       +  display: block;
       +}
       +span.run98 {
       +  background-color: rgb(255, 184, 178);
       +  display: block;
       +}
       +span.run99 {
       +  background-color: rgb(255, 182, 178);
       +  display: block;
       +}
       +span.run100 {
       +  background-color: rgb(255, 178, 178);
       +  display: block;
       +}
       +</style>
       +    </head>
       +  <body><h3>C0 code coverage information</h3>
       +    <p>Generated on Wed Apr 29 18:53:08 +0200 2009 with <a href='http://eigenclass.org/hiki/rcov'>rcov 0.8.1.2</a>
       +      </p>
       +    <hr/>
       +    <pre><span class='marked0'>Code reported as executed by Ruby looks like this...
       +</span><span class='marked1'>and this: this line is also marked as covered.
       +</span><span class='inferred0'>Lines considered as run by rcov, but not reported by Ruby, look like this,
       +</span><span class='inferred1'>and this: these lines were inferred by rcov (using simple heuristics).
       +</span><span class='uncovered0'>Finally, here&apos;s a line marked as not executed.
       +</span></pre>                       
       +<table class='report'><thead><tr><td class='heading'>Name</td>
       +      <td class='heading'>Total lines</td>
       +      <td class='heading'>Lines of code</td>
       +      <td class='heading'>Total coverage</td>
       +      <td class='heading'>Code coverage</td>
       +      </tr>
       +    </thead>
       +  <tbody><tr class='light'><td><a href='lib-simplabs-reports_as_sparkline-sparkline_tag_helper_rb.html'>lib/simplabs/reports_as_sparkline/sparkline_tag_helper.rb</a>
       +        </td>
       +      <td class='lines_total'><tt>39</tt>
       +        </td>
       +      <td class='lines_code'><tt>17</tt>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_total'>100.0%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='100'/>
       +                  <td class='uncovered' width='0'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_code'>100.0%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='100'/>
       +                  <td class='uncovered' width='0'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      </tr>
       +    </tbody>
       +  </table>
       +<pre><span class="marked0"><a name="line1"></a> 1 module Simplabs #:nodoc:
       +</span><span class="inferred1"><a name="line2"></a> 2 
       +</span><span class="marked0"><a name="line3"></a> 3   module ReportsAsSparkline #:nodoc:
       +</span><span class="inferred1"><a name="line4"></a> 4 
       +</span><span class="marked0"><a name="line5"></a> 5     module SparklineTagHelper
       +</span><span class="inferred1"><a name="line6"></a> 6 
       +</span><span class="inferred0"><a name="line7"></a> 7       # Renders a sparkline with the given data.
       +</span><span class="inferred1"><a name="line8"></a> 8       #
       +</span><span class="inferred0"><a name="line9"></a> 9       # ==== Parameters
       +</span><span class="inferred1"><a name="line10"></a>10       #
       +</span><span class="inferred0"><a name="line11"></a>11       # * &lt;tt&gt;data&lt;/tt&gt; - The data to render the sparkline for
       +</span><span class="inferred1"><a name="line12"></a>12       #
       +</span><span class="inferred0"><a name="line13"></a>13       # ==== Options
       +</span><span class="inferred1"><a name="line14"></a>14       #
       +</span><span class="inferred0"><a name="line15"></a>15       # * &lt;tt&gt;width&lt;/tt&gt; - The width of the generated image
       +</span><span class="inferred1"><a name="line16"></a>16       # * &lt;tt&gt;height&lt;/tt&gt; - The height of the generated image
       +</span><span class="inferred0"><a name="line17"></a>17       # * &lt;tt&gt;line_color&lt;/tt&gt; - The line color of the sparkline (hex code)
       +</span><span class="inferred1"><a name="line18"></a>18       # * &lt;tt&gt;fill_color&lt;/tt&gt; - The color to fill the area below the sparkline with (hex code)
       +</span><span class="inferred0"><a name="line19"></a>19       # * &lt;tt&gt;labels&lt;/tt&gt; - The axes to render lables for (Array of :x, :y, :r, :t; this is x axis, y axis, right, top)
       +</span><span class="inferred1"><a name="line20"></a>20       #
       +</span><span class="inferred0"><a name="line21"></a>21       # ==== Example
       +</span><span class="inferred1"><a name="line22"></a>22       # &lt;%= sparkline_tag(User.registrations_report, :width =&gt; 200, :height =&gt; 100, :color =&gt; '000') %&gt;
       +</span><span class="marked0"><a name="line23"></a>23       def sparkline_tag(data, options = {})
       +</span><span class="marked1"><a name="line24"></a>24         options.reverse_merge!({ :width =&gt; 300, :height =&gt; 34, :line_color =&gt; '0077cc', :fill_color =&gt; 'e6f2fa', :labels =&gt; [] })
       +</span><span class="marked0"><a name="line25"></a>25         data = data.collect { |d| d[1] }
       +</span><span class="marked1"><a name="line26"></a>26         labels = &quot;&quot;
       +</span><span class="marked0"><a name="line27"></a>27         unless options[:labels].empty?
       +</span><span class="marked1"><a name="line28"></a>28           labels = &quot;&amp;chxt=#{options[:labels].map(&amp;:to_s).join(',')}&amp;chxr=0,0,#{data.length}|1,0,#{data.max}|2,0,#{data.max}|3,0,#{data.length}&quot;
       +</span><span class="inferred0"><a name="line29"></a>29         end
       +</span><span class="inferred1"><a name="line30"></a>30         image_tag(
       +</span><span class="marked0"><a name="line31"></a>31           &quot;http://chart.apis.google.com/chart?cht=ls&amp;chs=#{options[:width]}x#{options[:height]}&amp;chd=t:#{data.join(',')}&amp;chco=#{options[:line_color]}&amp;chm=B,#{options[:fill_color]},0,0,0&amp;chls=1,0,0&amp;chds=#{data.min},#{data.max}#{labels}&quot;
       +</span><span class="inferred1"><a name="line32"></a>32         )
       +</span><span class="inferred0"><a name="line33"></a>33       end
       +</span><span class="inferred1"><a name="line34"></a>34 
       +</span><span class="inferred0"><a name="line35"></a>35     end
       +</span><span class="inferred1"><a name="line36"></a>36 
       +</span><span class="inferred0"><a name="line37"></a>37   end
       +</span><span class="inferred1"><a name="line38"></a>38 
       +</span><span class="inferred0"><a name="line39"></a>39 end
       +</span></pre><hr/>
       +    <p>Generated using the <a href='http://eigenclass.org/hiki.rb?rcov'>rcov code coverage analysis tool for Ruby</a>
       +   version 0.8.1.2.</p>
       +<p><a href='http://validator.w3.org/check/referer'><img src='http://www.w3.org/Icons/valid-xhtml10' height='31' alt='Valid XHTML 1.0!' width='88'/>
       +        </a>
       +      <a href='http://jigsaw.w3.org/css-validator/check/referer'><img src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Valid CSS!' style='border:0;width:88px;height:31px'/>
       +        </a>
       +      </p>
       +    </body>
       +  </html>
 (DIR) diff --git a/doc/coverage/lib-simplabs-reports_as_sparkline_rb.html b/doc/coverage/lib-simplabs-reports_as_sparkline_rb.html
       @@ -0,0 +1,668 @@
       +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       +<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'><head><title>lib/simplabs/reports_as_sparkline.rb - C0 code coverage information</title>
       +    <style type='text/css'>body { background-color: rgb(240, 240, 245); }</style>
       +    <style type='text/css'>span.cross-ref-title {
       + font-size: 140%;
       +}
       +span.cross-ref a {
       + text-decoration: none;
       +}
       +span.cross-ref {
       + background-color:#f3f7fa;
       + border: 1px dashed #333;
       + margin: 1em;
       + padding: 0.5em;
       + overflow: hidden;
       +}
       +a.crossref-toggle {
       + text-decoration: none;
       +}
       +span.marked0 {
       + background-color: rgb(185, 210, 200);
       + display: block;
       +}
       +span.marked1 {
       + background-color: rgb(190, 215, 205);
       + display: block;
       +}
       +span.inferred0 {
       + background-color: rgb(175, 200, 200);
       + display: block;
       +}
       +span.inferred1 {
       + background-color: rgb(180, 205, 205);
       + display: block;
       +}
       +span.uncovered0 {
       + background-color: rgb(225, 110, 110);
       + display: block;
       +}
       +span.uncovered1 {
       + background-color: rgb(235, 120, 120);
       + display: block;
       +}
       +span.overview {
       + border-bottom: 8px solid black;
       +}
       +div.overview {
       + border-bottom: 8px solid black;
       +}
       +body {
       + font-family: verdana, arial, helvetica;
       +}
       +div.footer {
       + font-size: 68%;
       + margin-top: 1.5em;
       +}
       +h1, h2, h3, h4, h5, h6 {
       + margin-bottom: 0.5em;
       +}
       +h5 {
       + margin-top: 0.5em;
       +}
       +.hidden {
       + display: none;
       +}
       +div.separator {
       + height: 10px;
       +}
       +/* Commented out for better readability, esp. on IE */
       +/*
       +table tr td, table tr th {
       + font-size: 68%;
       +}
       +td.value table tr td {
       + font-size: 11px;
       +}
       +*/
       +table.percent_graph {
       + height: 12px;
       + border: #808080 1px solid;
       + empty-cells: show;
       +}
       +table.percent_graph td.covered {
       + height: 10px;
       + background: #00f000;
       +}
       +table.percent_graph td.uncovered {
       + height: 10px;
       + background: #e00000;
       +}
       +table.percent_graph td.NA {
       + height: 10px;
       + background: #eaeaea;
       +}
       +table.report {
       + border-collapse: collapse;
       + width: 100%;
       +}
       +table.report td.heading {
       + background: #dcecff;
       + border: #d0d0d0 1px solid;
       + font-weight: bold;
       + text-align: center;
       +}
       +table.report td.heading:hover {
       + background: #c0ffc0;
       +}
       +table.report td.text {
       + border: #d0d0d0 1px solid;
       +}
       +table.report td.value,
       +table.report td.lines_total,
       +table.report td.lines_code {
       + text-align: right;
       + border: #d0d0d0 1px solid;
       +}
       +table.report tr.light {
       + background-color: rgb(240, 240, 245);
       +}
       +table.report tr.dark {
       + background-color: rgb(230, 230, 235);
       +}
       +</style>
       +    <script type='text/javascript'>
       +// <![CDATA[
       +  function toggleCode( id ) {
       +    if ( document.getElementById )
       +      elem = document.getElementById( id );
       +    else if ( document.all )
       +      elem = eval( "document.all." + id );
       +    else
       +      return false;
       +
       +    elemStyle = elem.style;
       +    
       +    if ( elemStyle.display != "block" ) {
       +      elemStyle.display = "block"
       +    } else {
       +      elemStyle.display = "none"
       +    }
       +
       +    return true;
       +  }
       +  
       +  // Make cross-references hidden by default
       +  document.writeln( "<style type=\"text/css\">span.cross-ref { display: none }</style>" )
       +  // ]]>
       +</script>
       +    <style type='text/css'>span.run0 {
       +  background-color: rgb(178, 204, 255);
       +  display: block;
       +}
       +span.run1 {
       +  background-color: rgb(178, 206, 255);
       +  display: block;
       +}
       +span.run2 {
       +  background-color: rgb(178, 209, 255);
       +  display: block;
       +}
       +span.run3 {
       +  background-color: rgb(178, 211, 255);
       +  display: block;
       +}
       +span.run4 {
       +  background-color: rgb(178, 214, 255);
       +  display: block;
       +}
       +span.run5 {
       +  background-color: rgb(178, 218, 255);
       +  display: block;
       +}
       +span.run6 {
       +  background-color: rgb(178, 220, 255);
       +  display: block;
       +}
       +span.run7 {
       +  background-color: rgb(178, 223, 255);
       +  display: block;
       +}
       +span.run8 {
       +  background-color: rgb(178, 225, 255);
       +  display: block;
       +}
       +span.run9 {
       +  background-color: rgb(178, 228, 255);
       +  display: block;
       +}
       +span.run10 {
       +  background-color: rgb(178, 232, 255);
       +  display: block;
       +}
       +span.run11 {
       +  background-color: rgb(178, 234, 255);
       +  display: block;
       +}
       +span.run12 {
       +  background-color: rgb(178, 237, 255);
       +  display: block;
       +}
       +span.run13 {
       +  background-color: rgb(178, 239, 255);
       +  display: block;
       +}
       +span.run14 {
       +  background-color: rgb(178, 242, 255);
       +  display: block;
       +}
       +span.run15 {
       +  background-color: rgb(178, 246, 255);
       +  display: block;
       +}
       +span.run16 {
       +  background-color: rgb(178, 248, 255);
       +  display: block;
       +}
       +span.run17 {
       +  background-color: rgb(178, 251, 255);
       +  display: block;
       +}
       +span.run18 {
       +  background-color: rgb(178, 253, 255);
       +  display: block;
       +}
       +span.run19 {
       +  background-color: rgb(178, 255, 253);
       +  display: block;
       +}
       +span.run20 {
       +  background-color: rgb(178, 255, 249);
       +  display: block;
       +}
       +span.run21 {
       +  background-color: rgb(178, 255, 247);
       +  display: block;
       +}
       +span.run22 {
       +  background-color: rgb(178, 255, 244);
       +  display: block;
       +}
       +span.run23 {
       +  background-color: rgb(178, 255, 242);
       +  display: block;
       +}
       +span.run24 {
       +  background-color: rgb(178, 255, 239);
       +  display: block;
       +}
       +span.run25 {
       +  background-color: rgb(178, 255, 235);
       +  display: block;
       +}
       +span.run26 {
       +  background-color: rgb(178, 255, 233);
       +  display: block;
       +}
       +span.run27 {
       +  background-color: rgb(178, 255, 230);
       +  display: block;
       +}
       +span.run28 {
       +  background-color: rgb(178, 255, 228);
       +  display: block;
       +}
       +span.run29 {
       +  background-color: rgb(178, 255, 225);
       +  display: block;
       +}
       +span.run30 {
       +  background-color: rgb(178, 255, 221);
       +  display: block;
       +}
       +span.run31 {
       +  background-color: rgb(178, 255, 219);
       +  display: block;
       +}
       +span.run32 {
       +  background-color: rgb(178, 255, 216);
       +  display: block;
       +}
       +span.run33 {
       +  background-color: rgb(178, 255, 214);
       +  display: block;
       +}
       +span.run34 {
       +  background-color: rgb(178, 255, 211);
       +  display: block;
       +}
       +span.run35 {
       +  background-color: rgb(178, 255, 207);
       +  display: block;
       +}
       +span.run36 {
       +  background-color: rgb(178, 255, 205);
       +  display: block;
       +}
       +span.run37 {
       +  background-color: rgb(178, 255, 202);
       +  display: block;
       +}
       +span.run38 {
       +  background-color: rgb(178, 255, 200);
       +  display: block;
       +}
       +span.run39 {
       +  background-color: rgb(178, 255, 197);
       +  display: block;
       +}
       +span.run40 {
       +  background-color: rgb(178, 255, 193);
       +  display: block;
       +}
       +span.run41 {
       +  background-color: rgb(178, 255, 191);
       +  display: block;
       +}
       +span.run42 {
       +  background-color: rgb(178, 255, 188);
       +  display: block;
       +}
       +span.run43 {
       +  background-color: rgb(178, 255, 186);
       +  display: block;
       +}
       +span.run44 {
       +  background-color: rgb(178, 255, 183);
       +  display: block;
       +}
       +span.run45 {
       +  background-color: rgb(178, 255, 179);
       +  display: block;
       +}
       +span.run46 {
       +  background-color: rgb(179, 255, 178);
       +  display: block;
       +}
       +span.run47 {
       +  background-color: rgb(182, 255, 178);
       +  display: block;
       +}
       +span.run48 {
       +  background-color: rgb(184, 255, 178);
       +  display: block;
       +}
       +span.run49 {
       +  background-color: rgb(187, 255, 178);
       +  display: block;
       +}
       +span.run50 {
       +  background-color: rgb(191, 255, 178);
       +  display: block;
       +}
       +span.run51 {
       +  background-color: rgb(193, 255, 178);
       +  display: block;
       +}
       +span.run52 {
       +  background-color: rgb(196, 255, 178);
       +  display: block;
       +}
       +span.run53 {
       +  background-color: rgb(198, 255, 178);
       +  display: block;
       +}
       +span.run54 {
       +  background-color: rgb(201, 255, 178);
       +  display: block;
       +}
       +span.run55 {
       +  background-color: rgb(205, 255, 178);
       +  display: block;
       +}
       +span.run56 {
       +  background-color: rgb(207, 255, 178);
       +  display: block;
       +}
       +span.run57 {
       +  background-color: rgb(210, 255, 178);
       +  display: block;
       +}
       +span.run58 {
       +  background-color: rgb(212, 255, 178);
       +  display: block;
       +}
       +span.run59 {
       +  background-color: rgb(215, 255, 178);
       +  display: block;
       +}
       +span.run60 {
       +  background-color: rgb(219, 255, 178);
       +  display: block;
       +}
       +span.run61 {
       +  background-color: rgb(221, 255, 178);
       +  display: block;
       +}
       +span.run62 {
       +  background-color: rgb(224, 255, 178);
       +  display: block;
       +}
       +span.run63 {
       +  background-color: rgb(226, 255, 178);
       +  display: block;
       +}
       +span.run64 {
       +  background-color: rgb(229, 255, 178);
       +  display: block;
       +}
       +span.run65 {
       +  background-color: rgb(233, 255, 178);
       +  display: block;
       +}
       +span.run66 {
       +  background-color: rgb(235, 255, 178);
       +  display: block;
       +}
       +span.run67 {
       +  background-color: rgb(238, 255, 178);
       +  display: block;
       +}
       +span.run68 {
       +  background-color: rgb(240, 255, 178);
       +  display: block;
       +}
       +span.run69 {
       +  background-color: rgb(243, 255, 178);
       +  display: block;
       +}
       +span.run70 {
       +  background-color: rgb(247, 255, 178);
       +  display: block;
       +}
       +span.run71 {
       +  background-color: rgb(249, 255, 178);
       +  display: block;
       +}
       +span.run72 {
       +  background-color: rgb(252, 255, 178);
       +  display: block;
       +}
       +span.run73 {
       +  background-color: rgb(255, 255, 178);
       +  display: block;
       +}
       +span.run74 {
       +  background-color: rgb(255, 252, 178);
       +  display: block;
       +}
       +span.run75 {
       +  background-color: rgb(255, 248, 178);
       +  display: block;
       +}
       +span.run76 {
       +  background-color: rgb(255, 246, 178);
       +  display: block;
       +}
       +span.run77 {
       +  background-color: rgb(255, 243, 178);
       +  display: block;
       +}
       +span.run78 {
       +  background-color: rgb(255, 240, 178);
       +  display: block;
       +}
       +span.run79 {
       +  background-color: rgb(255, 238, 178);
       +  display: block;
       +}
       +span.run80 {
       +  background-color: rgb(255, 234, 178);
       +  display: block;
       +}
       +span.run81 {
       +  background-color: rgb(255, 232, 178);
       +  display: block;
       +}
       +span.run82 {
       +  background-color: rgb(255, 229, 178);
       +  display: block;
       +}
       +span.run83 {
       +  background-color: rgb(255, 226, 178);
       +  display: block;
       +}
       +span.run84 {
       +  background-color: rgb(255, 224, 178);
       +  display: block;
       +}
       +span.run85 {
       +  background-color: rgb(255, 220, 178);
       +  display: block;
       +}
       +span.run86 {
       +  background-color: rgb(255, 218, 178);
       +  display: block;
       +}
       +span.run87 {
       +  background-color: rgb(255, 215, 178);
       +  display: block;
       +}
       +span.run88 {
       +  background-color: rgb(255, 212, 178);
       +  display: block;
       +}
       +span.run89 {
       +  background-color: rgb(255, 210, 178);
       +  display: block;
       +}
       +span.run90 {
       +  background-color: rgb(255, 206, 178);
       +  display: block;
       +}
       +span.run91 {
       +  background-color: rgb(255, 204, 178);
       +  display: block;
       +}
       +span.run92 {
       +  background-color: rgb(255, 201, 178);
       +  display: block;
       +}
       +span.run93 {
       +  background-color: rgb(255, 198, 178);
       +  display: block;
       +}
       +span.run94 {
       +  background-color: rgb(255, 196, 178);
       +  display: block;
       +}
       +span.run95 {
       +  background-color: rgb(255, 192, 178);
       +  display: block;
       +}
       +span.run96 {
       +  background-color: rgb(255, 189, 178);
       +  display: block;
       +}
       +span.run97 {
       +  background-color: rgb(255, 187, 178);
       +  display: block;
       +}
       +span.run98 {
       +  background-color: rgb(255, 184, 178);
       +  display: block;
       +}
       +span.run99 {
       +  background-color: rgb(255, 182, 178);
       +  display: block;
       +}
       +span.run100 {
       +  background-color: rgb(255, 178, 178);
       +  display: block;
       +}
       +</style>
       +    </head>
       +  <body><h3>C0 code coverage information</h3>
       +    <p>Generated on Wed Apr 29 18:53:07 +0200 2009 with <a href='http://eigenclass.org/hiki/rcov'>rcov 0.8.1.2</a>
       +      </p>
       +    <hr/>
       +    <pre><span class='marked0'>Code reported as executed by Ruby looks like this...
       +</span><span class='marked1'>and this: this line is also marked as covered.
       +</span><span class='inferred0'>Lines considered as run by rcov, but not reported by Ruby, look like this,
       +</span><span class='inferred1'>and this: these lines were inferred by rcov (using simple heuristics).
       +</span><span class='uncovered0'>Finally, here&apos;s a line marked as not executed.
       +</span></pre>                       
       +<table class='report'><thead><tr><td class='heading'>Name</td>
       +      <td class='heading'>Total lines</td>
       +      <td class='heading'>Lines of code</td>
       +      <td class='heading'>Total coverage</td>
       +      <td class='heading'>Code coverage</td>
       +      </tr>
       +    </thead>
       +  <tbody><tr class='light'><td><a href='lib-simplabs-reports_as_sparkline_rb.html'>lib/simplabs/reports_as_sparkline.rb</a>
       +        </td>
       +      <td class='lines_total'><tt>58</tt>
       +        </td>
       +      <td class='lines_code'><tt>22</tt>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_total'>98.3%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='98'/>
       +                  <td class='uncovered' width='2'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_code'>95.5%</tt>
       +              &nbsp;</td>
       +            <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='95'/>
       +                  <td class='uncovered' width='5'/>
       +                  </tr>
       +                </table>
       +              </td>
       +            </tr>
       +          </table>
       +        </td>
       +      </tr>
       +    </tbody>
       +  </table>
       +<pre><span class="marked1"><a name="line1"></a> 1 module Simplabs #:nodoc:
       +</span><span class="inferred0"><a name="line2"></a> 2 
       +</span><span class="marked1"><a name="line3"></a> 3   module ReportsAsSparkline
       +</span><span class="inferred0"><a name="line4"></a> 4 
       +</span><span class="marked1"><a name="line5"></a> 5     def self.included(base) #:nodoc:
       +</span><span class="marked0"><a name="line6"></a> 6       base.extend ClassMethods
       +</span><span class="marked1"><a name="line7"></a> 7     end
       +</span><span class="inferred0"><a name="line8"></a> 8 
       +</span><span class="marked1"><a name="line9"></a> 9     module ClassMethods
       +</span><span class="inferred0"><a name="line10"></a>10 
       +</span><span class="inferred1"><a name="line11"></a>11       # Generates a report on a model. That report can then be executed via the new method &lt;name&gt;_report (see documentation of Simplabs::ReportsAsSparkline::Report#run).
       +</span><span class="inferred0"><a name="line12"></a>12       # 
       +</span><span class="inferred1"><a name="line13"></a>13       # ==== Parameters
       +</span><span class="inferred0"><a name="line14"></a>14       #
       +</span><span class="inferred1"><a name="line15"></a>15       # * &lt;tt&gt;name&lt;/tt&gt; - The name of the report, defines the name of the generated report method (&lt;name&gt;_report)
       +</span><span class="inferred0"><a name="line16"></a>16       #
       +</span><span class="inferred1"><a name="line17"></a>17       # ==== Options
       +</span><span class="inferred0"><a name="line18"></a>18       #
       +</span><span class="inferred1"><a name="line19"></a>19       # * &lt;tt&gt;:date_column&lt;/tt&gt; - The name of the date column on that the records are aggregated
       +</span><span class="inferred0"><a name="line20"></a>20       # * &lt;tt&gt;:value_column&lt;/tt&gt; - The name of the column that holds the value to sum for aggregation :sum
       +</span><span class="inferred1"><a name="line21"></a>21       # * &lt;tt&gt;:aggregation&lt;/tt&gt; - The aggregation to use (one of :count, :sum, :minimum, :maximum or :average); when using anything other than :count, :value_column must also be specified (&lt;b&gt;If you really want to e.g. sumon the 'id' column, you have to explicitely say so.&lt;/b&gt;)
       +</span><span class="inferred0"><a name="line22"></a>22       # * &lt;tt&gt;:grouping&lt;/tt&gt; - The period records are grouped on (:hour, :day, :week, :month); &lt;b&gt;Beware that reports_as_sparkline treats weeks as starting on monday!&lt;/b&gt;
       +</span><span class="inferred1"><a name="line23"></a>23       # * &lt;tt&gt;:limit&lt;/tt&gt; - The number of periods to get (see :grouping)
       +</span><span class="inferred0"><a name="line24"></a>24       # * &lt;tt&gt;:conditions&lt;/tt&gt; - Conditions like in ActiveRecord::Base#find; only records that match there conditions are reported on
       +</span><span class="inferred1"><a name="line25"></a>25       # * &lt;tt&gt;:live_data&lt;/tt&gt; - Specified whether data for the current reporting period is read; if :live_data is true, you will experience a performance hit since the request cannot be satisfied from the cache only (defaults to false)
       +</span><span class="inferred0"><a name="line26"></a>26       # * &lt;tt&gt;:end_date&lt;/tt&gt; - When specified, the report will only include data for the periods before this date.
       +</span><span class="inferred1"><a name="line27"></a>27       #
       +</span><span class="inferred0"><a name="line28"></a>28       # ==== Examples
       +</span><span class="inferred1"><a name="line29"></a>29       #
       +</span><span class="inferred0"><a name="line30"></a>30       #  class Game &lt; ActiveRecord::Base
       +</span><span class="inferred1"><a name="line31"></a>31       #    reports_as_sparkline :games_per_day
       +</span><span class="inferred0"><a name="line32"></a>32       #    reports_as_sparkline :games_played_total, :cumulate =&gt; true
       +</span><span class="inferred1"><a name="line33"></a>33       #  end
       +</span><span class="inferred0"><a name="line34"></a>34       #  class User &lt; ActiveRecord::Base
       +</span><span class="inferred1"><a name="line35"></a>35       #    reports_as_sparkline :registrations, :aggregation =&gt; :count
       +</span><span class="inferred0"><a name="line36"></a>36       #    reports_as_sparkline :activations,   :aggregation =&gt; :count, :date_column =&gt; :activated_at
       +</span><span class="inferred1"><a name="line37"></a>37       #    reports_as_sparkline :total_users,   :cumulate =&gt; true
       +</span><span class="inferred0"><a name="line38"></a>38       #    reports_as_sparkline :rake,          :aggregation =&gt; :sum,   :value_column =&gt; :profile_visits
       +</span><span class="inferred1"><a name="line39"></a>39       #  end
       +</span><span class="marked0"><a name="line40"></a>40       def reports_as_sparkline(name, options = {})
       +</span><span class="marked1"><a name="line41"></a>41         (class &lt;&lt; self; self; end).instance_eval do
       +</span><span class="marked0"><a name="line42"></a>42           define_method &quot;#{name.to_s}_report&quot;.to_sym do |*args|
       +</span><span class="marked1"><a name="line43"></a>43             if options.delete(:cumulate)
       +</span><span class="uncovered0"><a name="line44"></a>44               report = Simplabs::ReportsAsSparkline::CumulatedReport.new(self, name, options)
       +</span><span class="inferred1"><a name="line45"></a>45             else
       +</span><span class="marked0"><a name="line46"></a>46               report = Simplabs::ReportsAsSparkline::Report.new(self, name, options)
       +</span><span class="inferred1"><a name="line47"></a>47             end
       +</span><span class="marked0"><a name="line48"></a>48             raise ArgumentError.new unless args.length == 0 || (args.length == 1 &amp;&amp; args[0].is_a?(Hash))
       +</span><span class="marked1"><a name="line49"></a>49             report.run(args.length == 0 ? {} : args[0])
       +</span><span class="inferred0"><a name="line50"></a>50           end
       +</span><span class="inferred1"><a name="line51"></a>51         end
       +</span><span class="marked0"><a name="line52"></a>52       end
       +</span><span class="inferred1"><a name="line53"></a>53 
       +</span><span class="inferred0"><a name="line54"></a>54     end
       +</span><span class="inferred1"><a name="line55"></a>55 
       +</span><span class="inferred0"><a name="line56"></a>56   end
       +</span><span class="inferred1"><a name="line57"></a>57 
       +</span><span class="inferred0"><a name="line58"></a>58 end
       +</span></pre><hr/>
       +    <p>Generated using the <a href='http://eigenclass.org/hiki.rb?rcov'>rcov code coverage analysis tool for Ruby</a>
       +   version 0.8.1.2.</p>
       +<p><a href='http://validator.w3.org/check/referer'><img src='http://www.w3.org/Icons/valid-xhtml10' height='31' alt='Valid XHTML 1.0!' width='88'/>
       +        </a>
       +      <a href='http://jigsaw.w3.org/css-validator/check/referer'><img src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Valid CSS!' style='border:0;width:88px;height:31px'/>
       +        </a>
       +      </p>
       +    </body>
       +  </html>
 (DIR) diff --git a/doc/created.rid b/doc/created.rid
       @@ -0,0 +1 @@
       +Wed, 29 Apr 2009 18:52:13 +0200
 (DIR) diff --git a/rdoc/files/README_rdoc.html b/doc/files/README_rdoc.html
 (DIR) diff --git a/rdoc/files/lib/simplabs/reports_as_sparkline/cumulated_report_rb.html b/doc/files/lib/simplabs/reports_as_sparkline/cumulated_report_rb.html
 (DIR) diff --git a/rdoc/files/lib/simplabs/reports_as_sparkline/grouping_rb.html b/doc/files/lib/simplabs/reports_as_sparkline/grouping_rb.html
 (DIR) diff --git a/doc/files/lib/simplabs/reports_as_sparkline/report_cache_rb.html b/doc/files/lib/simplabs/reports_as_sparkline/report_cache_rb.html
       @@ -0,0 +1,101 @@
       +<?xml version="1.0" encoding="iso-8859-1"?>
       +<!DOCTYPE html 
       +     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       +     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       +
       +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
       +<head>
       +  <title>File: report_cache.rb</title>
       +  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
       +  <meta http-equiv="Content-Script-Type" content="text/javascript" />
       +  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
       +  <script type="text/javascript">
       +  // <![CDATA[
       +
       +  function popupCode( url ) {
       +    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
       +  }
       +
       +  function toggleCode( id ) {
       +    if ( document.getElementById )
       +      elem = document.getElementById( id );
       +    else if ( document.all )
       +      elem = eval( "document.all." + id );
       +    else
       +      return false;
       +
       +    elemStyle = elem.style;
       +    
       +    if ( elemStyle.display != "block" ) {
       +      elemStyle.display = "block"
       +    } else {
       +      elemStyle.display = "none"
       +    }
       +
       +    return true;
       +  }
       +  
       +  // Make codeblocks hidden by default
       +  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
       +  
       +  // ]]>
       +  </script>
       +
       +</head>
       +<body>
       +
       +
       +
       +  <div id="fileHeader">
       +    <h1>report_cache.rb</h1>
       +    <table class="header-table">
       +    <tr class="top-aligned-row">
       +      <td><strong>Path:</strong></td>
       +      <td>lib/simplabs/reports_as_sparkline/report_cache.rb
       +      </td>
       +    </tr>
       +    <tr class="top-aligned-row">
       +      <td><strong>Last Update:</strong></td>
       +      <td>Wed Apr 29 18:14:28 +0200 2009</td>
       +    </tr>
       +    </table>
       +  </div>
       +  <!-- banner header -->
       +
       +  <div id="bodyContent">
       +
       +
       +
       +  <div id="contextContent">
       +
       +
       +
       +   </div>
       +
       +
       +  </div>
       +
       +
       +    <!-- if includes -->
       +
       +    <div id="section">
       +
       +
       +
       +
       +
       +      
       +
       +
       +    <!-- if method_list -->
       +
       +
       +  </div>
       +
       +
       +<div id="validator-badges">
       +  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
       +</div>
       +
       +</body>
       +</html>
       +\ No newline at end of file
 (DIR) diff --git a/doc/files/lib/simplabs/reports_as_sparkline/report_rb.html b/doc/files/lib/simplabs/reports_as_sparkline/report_rb.html
       @@ -0,0 +1,101 @@
       +<?xml version="1.0" encoding="iso-8859-1"?>
       +<!DOCTYPE html 
       +     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       +     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       +
       +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
       +<head>
       +  <title>File: report.rb</title>
       +  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
       +  <meta http-equiv="Content-Script-Type" content="text/javascript" />
       +  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
       +  <script type="text/javascript">
       +  // <![CDATA[
       +
       +  function popupCode( url ) {
       +    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
       +  }
       +
       +  function toggleCode( id ) {
       +    if ( document.getElementById )
       +      elem = document.getElementById( id );
       +    else if ( document.all )
       +      elem = eval( "document.all." + id );
       +    else
       +      return false;
       +
       +    elemStyle = elem.style;
       +    
       +    if ( elemStyle.display != "block" ) {
       +      elemStyle.display = "block"
       +    } else {
       +      elemStyle.display = "none"
       +    }
       +
       +    return true;
       +  }
       +  
       +  // Make codeblocks hidden by default
       +  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
       +  
       +  // ]]>
       +  </script>
       +
       +</head>
       +<body>
       +
       +
       +
       +  <div id="fileHeader">
       +    <h1>report.rb</h1>
       +    <table class="header-table">
       +    <tr class="top-aligned-row">
       +      <td><strong>Path:</strong></td>
       +      <td>lib/simplabs/reports_as_sparkline/report.rb
       +      </td>
       +    </tr>
       +    <tr class="top-aligned-row">
       +      <td><strong>Last Update:</strong></td>
       +      <td>Wed Apr 29 18:16:51 +0200 2009</td>
       +    </tr>
       +    </table>
       +  </div>
       +  <!-- banner header -->
       +
       +  <div id="bodyContent">
       +
       +
       +
       +  <div id="contextContent">
       +
       +
       +
       +   </div>
       +
       +
       +  </div>
       +
       +
       +    <!-- if includes -->
       +
       +    <div id="section">
       +
       +
       +
       +
       +
       +      
       +
       +
       +    <!-- if method_list -->
       +
       +
       +  </div>
       +
       +
       +<div id="validator-badges">
       +  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
       +</div>
       +
       +</body>
       +</html>
       +\ No newline at end of file
 (DIR) diff --git a/doc/files/lib/simplabs/reports_as_sparkline/reporting_period_rb.html b/doc/files/lib/simplabs/reports_as_sparkline/reporting_period_rb.html
       @@ -0,0 +1,101 @@
       +<?xml version="1.0" encoding="iso-8859-1"?>
       +<!DOCTYPE html 
       +     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       +     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       +
       +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
       +<head>
       +  <title>File: reporting_period.rb</title>
       +  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
       +  <meta http-equiv="Content-Script-Type" content="text/javascript" />
       +  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
       +  <script type="text/javascript">
       +  // <![CDATA[
       +
       +  function popupCode( url ) {
       +    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
       +  }
       +
       +  function toggleCode( id ) {
       +    if ( document.getElementById )
       +      elem = document.getElementById( id );
       +    else if ( document.all )
       +      elem = eval( "document.all." + id );
       +    else
       +      return false;
       +
       +    elemStyle = elem.style;
       +    
       +    if ( elemStyle.display != "block" ) {
       +      elemStyle.display = "block"
       +    } else {
       +      elemStyle.display = "none"
       +    }
       +
       +    return true;
       +  }
       +  
       +  // Make codeblocks hidden by default
       +  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
       +  
       +  // ]]>
       +  </script>
       +
       +</head>
       +<body>
       +
       +
       +
       +  <div id="fileHeader">
       +    <h1>reporting_period.rb</h1>
       +    <table class="header-table">
       +    <tr class="top-aligned-row">
       +      <td><strong>Path:</strong></td>
       +      <td>lib/simplabs/reports_as_sparkline/reporting_period.rb
       +      </td>
       +    </tr>
       +    <tr class="top-aligned-row">
       +      <td><strong>Last Update:</strong></td>
       +      <td>Wed Apr 29 18:18:14 +0200 2009</td>
       +    </tr>
       +    </table>
       +  </div>
       +  <!-- banner header -->
       +
       +  <div id="bodyContent">
       +
       +
       +
       +  <div id="contextContent">
       +
       +
       +
       +   </div>
       +
       +
       +  </div>
       +
       +
       +    <!-- if includes -->
       +
       +    <div id="section">
       +
       +
       +
       +
       +
       +      
       +
       +
       +    <!-- if method_list -->
       +
       +
       +  </div>
       +
       +
       +<div id="validator-badges">
       +  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
       +</div>
       +
       +</body>
       +</html>
       +\ No newline at end of file
 (DIR) diff --git a/rdoc/files/lib/simplabs/reports_as_sparkline/sparkline_tag_helper_rb.html b/doc/files/lib/simplabs/reports_as_sparkline/sparkline_tag_helper_rb.html
 (DIR) diff --git a/rdoc/files/lib/simplabs/reports_as_sparkline_rb.html b/doc/files/lib/simplabs/reports_as_sparkline_rb.html
 (DIR) diff --git a/rdoc/fr_class_index.html b/doc/fr_class_index.html
 (DIR) diff --git a/rdoc/fr_file_index.html b/doc/fr_file_index.html
 (DIR) diff --git a/rdoc/fr_method_index.html b/doc/fr_method_index.html
 (DIR) diff --git a/rdoc/index.html b/doc/index.html
 (DIR) diff --git a/rdoc/rdoc-style.css b/doc/rdoc-style.css
 (DIR) diff --git a/doc/spec.html b/doc/spec.html
       @@ -0,0 +1,1093 @@
       +<?xml version="1.0" encoding="UTF-8"?>
       +<!DOCTYPE html 
       +  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
       +  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
       +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
       +<head>
       +  <title>RSpec results</title>
       +  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
       +  <meta http-equiv="Expires" content="-1" />
       +  <meta http-equiv="Pragma" content="no-cache" />
       +  <style type="text/css">
       +  body {
       +    margin: 0;
       +    padding: 0;
       +    background: #fff;
       +    font-size: 80%;
       +  }
       +  </style>
       +  <script type="text/javascript">
       +    // <![CDATA[
       +function moveProgressBar(percentDone) {
       +  document.getElementById("rspec-header").style.width = percentDone +"%";
       +}
       +function makeRed(element_id) {
       +  document.getElementById(element_id).style.background = '#C40D0D';
       +  document.getElementById(element_id).style.color = '#FFFFFF';
       +}
       +
       +function makeYellow(element_id) {
       +  if (element_id == "rspec-header" && document.getElementById(element_id).style.background != '#C40D0D')
       +  {
       +    document.getElementById(element_id).style.background = '#FAF834';
       +    document.getElementById(element_id).style.color = '#000000';
       +  }
       +  else
       +  {
       +    document.getElementById(element_id).style.background = '#FAF834';
       +    document.getElementById(element_id).style.color = '#000000';
       +  }
       +}
       +
       +    // ]]>
       +  </script>
       +  <style type="text/css">
       +#rspec-header {
       +  background: #65C400; color: #fff; height: 4em;
       +}
       +
       +.rspec-report h1 {
       +  margin: 0px 10px 0px 10px;
       +  padding: 10px;
       +  font-family: "Lucida Grande", Helvetica, sans-serif;
       +  font-size: 1.8em;
       +  position: absolute;
       +}
       +
       +#summary {
       +  margin: 0; padding: 5px 10px;
       +  font-family: "Lucida Grande", Helvetica, sans-serif;
       +  text-align: right;
       +  top: 0px;
       +  right: 0px;
       +  float:right;
       +}
       +
       +#summary p {
       +  margin: 0 0 0 2px;
       +}
       +
       +#summary #totals {
       +  font-size: 1.2em;
       +}
       +
       +.example_group {
       +  margin: 0 10px 5px;
       +  background: #fff;
       +}
       +
       +dl {
       +  margin: 0; padding: 0 0 5px;
       +  font: normal 11px "Lucida Grande", Helvetica, sans-serif;
       +}
       +
       +dt {
       +  padding: 3px;
       +  background: #65C400;
       +  color: #fff;
       +  font-weight: bold;
       +}
       +
       +dd {
       +  margin: 5px 0 5px 5px;
       +  padding: 3px 3px 3px 18px;
       +}
       +
       +dd.spec.passed {
       +  border-left: 5px solid #65C400;
       +  border-bottom: 1px solid #65C400;
       +  background: #DBFFB4; color: #3D7700;
       +}
       +
       +dd.spec.failed {
       +  border-left: 5px solid #C20000;
       +  border-bottom: 1px solid #C20000;
       +  color: #C20000; background: #FFFBD3;
       +}
       +
       +dd.spec.not_implemented {
       +  border-left: 5px solid #FAF834;
       +  border-bottom: 1px solid #FAF834;
       +  background: #FCFB98; color: #131313;
       +}
       +
       +dd.spec.pending_fixed {
       +  border-left: 5px solid #0000C2;
       +  border-bottom: 1px solid #0000C2;
       +  color: #0000C2; background: #D3FBFF;
       +}
       +
       +.backtrace {
       +  color: #000;
       +  font-size: 12px;
       +}
       +
       +a {
       +  color: #BE5C00;
       +}
       +
       +/* Ruby code, style similar to vibrant ink */
       +.ruby {
       +  font-size: 12px;
       +  font-family: monospace;
       +  color: white;
       +  background-color: black;
       +  padding: 0.1em 0 0.2em 0;
       +}
       +
       +.ruby .keyword { color: #FF6600; }
       +.ruby .constant { color: #339999; }
       +.ruby .attribute { color: white; }
       +.ruby .global { color: white; }
       +.ruby .module { color: white; }
       +.ruby .class { color: white; }
       +.ruby .string { color: #66FF00; }
       +.ruby .ident { color: white; }
       +.ruby .method { color: #FFCC00; }
       +.ruby .number { color: white; }
       +.ruby .char { color: white; }
       +.ruby .comment { color: #9933CC; }
       +.ruby .symbol { color: white; }
       +.ruby .regex { color: #44B4CC; }
       +.ruby .punct { color: white; }
       +.ruby .escape { color: white; }
       +.ruby .interp { color: white; }
       +.ruby .expr { color: white; }
       +
       +.ruby .offending { background-color: gray; }
       +.ruby .linenum {
       +  width: 75px;
       +  padding: 0.1em 1em 0.2em 0;
       +  color: #000000;
       +  background-color: #FFFBD3;
       +}
       +
       +  </style>
       +</head>
       +<body>
       +<div class="rspec-report">
       +
       +<div id="rspec-header">
       +  <div id="label">
       +    <h1>RSpec Code Examples</h1>
       +  </div>
       +
       +  <div id="summary">
       +    <p id="totals">&nbsp;</p>
       +    <p id="duration">&nbsp;</p>
       +  </div>
       +</div>
       +
       +<div class="results">
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_1">Simplabs::ReportsAsSparkline::CumulatedReport#run</dt>
       +    <script type="text/javascript">moveProgressBar('0.3');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should cumulate the data</span></dd>
       +    <script type="text/javascript">moveProgressBar('0.7');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return an array of the same length as the specified limit when :live_data is false</span></dd>
       +    <script type="text/javascript">moveProgressBar('1.1');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return an array of the same length as the specified limit + 1 when :live_data is true</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_2">Simplabs::ReportsAsSparkline::CumulatedReport#run for grouping hour with :live_data = true</dt>
       +    <script type="text/javascript">moveProgressBar('1.4');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count</span></dd>
       +    <script type="text/javascript">moveProgressBar('1.8');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum</span></dd>
       +    <script type="text/javascript">moveProgressBar('2.2');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count when custom conditions are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('2.6');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum when custom conditions are specified</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_3">Simplabs::ReportsAsSparkline::CumulatedReport#run for grouping hour with :live_data = true the returned result</dt>
       +    <script type="text/javascript">moveProgressBar('2.9');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be an array starting reporting period (Time.now - limit.hour)</span></dd>
       +    <script type="text/javascript">moveProgressBar('3.3');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be data ending with the current reporting period</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_4">Simplabs::ReportsAsSparkline::CumulatedReport#run for grouping hour with :live_data = false</dt>
       +    <script type="text/javascript">moveProgressBar('3.7');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count</span></dd>
       +    <script type="text/javascript">moveProgressBar('4.1');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum</span></dd>
       +    <script type="text/javascript">moveProgressBar('4.4');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count when custom conditions are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('4.8');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum when custom conditions are specified</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_5">Simplabs::ReportsAsSparkline::CumulatedReport#run for grouping hour with :live_data = false the returned result</dt>
       +    <script type="text/javascript">moveProgressBar('5.2');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be an array starting reporting period (Time.now - limit.hour)</span></dd>
       +    <script type="text/javascript">moveProgressBar('5.5');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be data ending with the reporting period before the current</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_6">Simplabs::ReportsAsSparkline::CumulatedReport#run for grouping day with :live_data = true</dt>
       +    <script type="text/javascript">moveProgressBar('5.9');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count</span></dd>
       +    <script type="text/javascript">moveProgressBar('6.3');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum</span></dd>
       +    <script type="text/javascript">moveProgressBar('6.7');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count when custom conditions are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('7.0');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum when custom conditions are specified</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_7">Simplabs::ReportsAsSparkline::CumulatedReport#run for grouping day with :live_data = true the returned result</dt>
       +    <script type="text/javascript">moveProgressBar('7.4');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be an array starting reporting period (Time.now - limit.day)</span></dd>
       +    <script type="text/javascript">moveProgressBar('7.8');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be data ending with the current reporting period</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_8">Simplabs::ReportsAsSparkline::CumulatedReport#run for grouping day with :live_data = false</dt>
       +    <script type="text/javascript">moveProgressBar('8.2');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count</span></dd>
       +    <script type="text/javascript">moveProgressBar('8.5');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum</span></dd>
       +    <script type="text/javascript">moveProgressBar('8.9');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count when custom conditions are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('9.3');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum when custom conditions are specified</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_9">Simplabs::ReportsAsSparkline::CumulatedReport#run for grouping day with :live_data = false the returned result</dt>
       +    <script type="text/javascript">moveProgressBar('9.7');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be an array starting reporting period (Time.now - limit.day)</span></dd>
       +    <script type="text/javascript">moveProgressBar('10.0');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be data ending with the reporting period before the current</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_10">Simplabs::ReportsAsSparkline::CumulatedReport#run for grouping week with :live_data = true</dt>
       +    <script type="text/javascript">moveProgressBar('10.4');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count</span></dd>
       +    <script type="text/javascript">moveProgressBar('10.8');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum</span></dd>
       +    <script type="text/javascript">moveProgressBar('11.1');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count when custom conditions are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('11.5');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum when custom conditions are specified</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_11">Simplabs::ReportsAsSparkline::CumulatedReport#run for grouping week with :live_data = true the returned result</dt>
       +    <script type="text/javascript">moveProgressBar('11.9');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be an array starting reporting period (Time.now - limit.week)</span></dd>
       +    <script type="text/javascript">moveProgressBar('12.3');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be data ending with the current reporting period</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_12">Simplabs::ReportsAsSparkline::CumulatedReport#run for grouping week with :live_data = false</dt>
       +    <script type="text/javascript">moveProgressBar('12.6');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count</span></dd>
       +    <script type="text/javascript">moveProgressBar('13.0');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum</span></dd>
       +    <script type="text/javascript">moveProgressBar('13.4');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count when custom conditions are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('13.8');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum when custom conditions are specified</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_13">Simplabs::ReportsAsSparkline::CumulatedReport#run for grouping week with :live_data = false the returned result</dt>
       +    <script type="text/javascript">moveProgressBar('14.1');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be an array starting reporting period (Time.now - limit.week)</span></dd>
       +    <script type="text/javascript">moveProgressBar('14.5');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be data ending with the reporting period before the current</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_14">Simplabs::ReportsAsSparkline::CumulatedReport#run for grouping month with :live_data = true</dt>
       +    <script type="text/javascript">moveProgressBar('14.9');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count</span></dd>
       +    <script type="text/javascript">moveProgressBar('15.2');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum</span></dd>
       +    <script type="text/javascript">moveProgressBar('15.6');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count when custom conditions are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('16.0');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum when custom conditions are specified</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_15">Simplabs::ReportsAsSparkline::CumulatedReport#run for grouping month with :live_data = true the returned result</dt>
       +    <script type="text/javascript">moveProgressBar('16.4');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be an array starting reporting period (Time.now - limit.month)</span></dd>
       +    <script type="text/javascript">moveProgressBar('16.7');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be data ending with the current reporting period</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_16">Simplabs::ReportsAsSparkline::CumulatedReport#run for grouping month with :live_data = false</dt>
       +    <script type="text/javascript">moveProgressBar('17.1');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count</span></dd>
       +    <script type="text/javascript">moveProgressBar('17.5');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum</span></dd>
       +    <script type="text/javascript">moveProgressBar('17.9');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count when custom conditions are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('18.2');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum when custom conditions are specified</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_17">Simplabs::ReportsAsSparkline::CumulatedReport#run for grouping month with :live_data = false the returned result</dt>
       +    <script type="text/javascript">moveProgressBar('18.6');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be an array starting reporting period (Time.now - limit.month)</span></dd>
       +    <script type="text/javascript">moveProgressBar('19.0');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be data ending with the reporting period before the current</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_18">Simplabs::ReportsAsSparkline::CumulatedReport#cumulate</dt>
       +    <script type="text/javascript">moveProgressBar('19.4');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should correctly cumulate the given data</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_19">Simplabs::ReportsAsSparkline::Grouping#new</dt>
       +    <script type="text/javascript">moveProgressBar('19.7');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should raise an error if an unsupported grouping is specified</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_20">Simplabs::ReportsAsSparkline::Grouping#to_sql for MySQL</dt>
       +    <script type="text/javascript">moveProgressBar('20.1');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should use DATE_FORMAT with format string &quot;%Y/%m/%d/%H&quot; for grouping :hour</span></dd>
       +    <script type="text/javascript">moveProgressBar('20.5');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should use DATE_FORMAT with format string &quot;%Y/%m/%d&quot; for grouping :day</span></dd>
       +    <script type="text/javascript">moveProgressBar('20.8');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should use YEARWEEK with mode 3 for grouping :week</span></dd>
       +    <script type="text/javascript">moveProgressBar('21.2');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should use DATE_FORMAT with format string &quot;%Y/%m&quot; for grouping :month</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_21">Simplabs::ReportsAsSparkline::Grouping#to_sql for PostgreSQL</dt>
       +    <script type="text/javascript">moveProgressBar('21.6');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should use date_trunc with truncation identifier &quot;hour&quot; for grouping :hour</span></dd>
       +    <script type="text/javascript">moveProgressBar('22.0');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should use date_trunc with truncation identifier &quot;day&quot; for grouping :day</span></dd>
       +    <script type="text/javascript">moveProgressBar('22.3');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should use date_trunc with truncation identifier &quot;week&quot; for grouping :week</span></dd>
       +    <script type="text/javascript">moveProgressBar('22.7');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should use date_trunc with truncation identifier &quot;month&quot; for grouping :month</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_22">Simplabs::ReportsAsSparkline::Grouping#to_sql for SQLite3</dt>
       +    <script type="text/javascript">moveProgressBar('23.1');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should use strftime with format string &quot;%Y/%m/%d/%H&quot; for grouping :hour</span></dd>
       +    <script type="text/javascript">moveProgressBar('23.5');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should use strftime with format string &quot;%Y/%m/%d&quot; for grouping :day</span></dd>
       +    <script type="text/javascript">moveProgressBar('23.8');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should use date with mode &quot;weekday 0&quot; for grouping :week</span></dd>
       +    <script type="text/javascript">moveProgressBar('24.2');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should use strftime with format string &quot;%Y/%m&quot; for grouping :month</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_23">Simplabs::ReportsAsSparkline::Grouping#date_parts_from_db_string for SQLite3</dt>
       +    <script type="text/javascript">moveProgressBar('24.6');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should split the string with '/' for grouping :hour</span></dd>
       +    <script type="text/javascript">moveProgressBar('25.0');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should split the string with '/' for grouping :day</span></dd>
       +    <script type="text/javascript">moveProgressBar('25.3');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should split the string with '/' for grouping :month</span></dd>
       +    <script type="text/javascript">moveProgressBar('25.7');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should split the string with &quot;-&quot; and return teh calendar year and week for grouping :week</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_24">Simplabs::ReportsAsSparkline::Grouping#date_parts_from_db_string for PostgreSQL</dt>
       +    <script type="text/javascript">moveProgressBar('26.1');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should split the date part of the string with &quot;-&quot; and read out the hour for grouping :hour</span></dd>
       +    <script type="text/javascript">moveProgressBar('26.4');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should split the date part of the string with &quot;-&quot; for grouping :day</span></dd>
       +    <script type="text/javascript">moveProgressBar('26.8');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should split the date part of the string with &quot;-&quot; and calculate the calendar week for grouping :week</span></dd>
       +    <script type="text/javascript">moveProgressBar('27.2');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should split the date part of the string with &quot;-&quot; and return year and month for grouping :month</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_25">Simplabs::ReportsAsSparkline::Grouping#date_parts_from_db_string for MySQL</dt>
       +    <script type="text/javascript">moveProgressBar('27.6');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should split the string with '/' for grouping :hour</span></dd>
       +    <script type="text/javascript">moveProgressBar('27.9');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should split the string with '/' for grouping :day</span></dd>
       +    <script type="text/javascript">moveProgressBar('28.3');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should split the string with '/' for grouping :month</span></dd>
       +    <script type="text/javascript">moveProgressBar('28.7');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should use the first 4 numbers for the year and the last 2 numbers for the week for grouping :week</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_26">Simplabs::ReportsAsSparkline::ReportCache.process</dt>
       +    <script type="text/javascript">moveProgressBar('29.1');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should raise an ArgumentError if no block is given</span></dd>
       +    <script type="text/javascript">moveProgressBar('29.4');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">sould start a transaction</span></dd>
       +    <script type="text/javascript">moveProgressBar('29.8');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should read existing data from the cache</span></dd>
       +    <script type="text/javascript">moveProgressBar('30.2');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should utilize the end_date in the conditions</span></dd>
       +    <script type="text/javascript">moveProgressBar('30.5');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should read existing data from the cache for the correct grouping if one other than the report's default grouping is specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('30.9');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should yield the first reporting period if the cache is empty</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_27">Simplabs::ReportsAsSparkline::ReportCache.process with :live_data = true</dt>
       +    <script type="text/javascript">moveProgressBar('31.3');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should yield to the given block</span></dd>
       +    <script type="text/javascript">moveProgressBar('31.7');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should yield the reporting period after the last one in the cache if data was read from cache</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_28">Simplabs::ReportsAsSparkline::ReportCache.process with :live_data = false</dt>
       +    <script type="text/javascript">moveProgressBar('32.0');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should not yield to the block if data for the reporting period before the current one has been found in the cache</span></dd>
       +    <script type="text/javascript">moveProgressBar('32.4');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should yield to the block if no data for the reporting period before the current one has been found in the cache</span></dd>
       +    <script type="text/javascript">moveProgressBar('32.8');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should yield the reporting period after the last one in the cache if data was read from cache</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_29">Simplabs::ReportsAsSparkline::ReportCache.process with cache = false</dt>
       +    <script type="text/javascript">moveProgressBar('33.2');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should not read any data from cache</span></dd>
       +    <script type="text/javascript">moveProgressBar('33.5');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should yield the first reporting period</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_30">Simplabs::ReportsAsSparkline::ReportCache.prepare_result</dt>
       +    <script type="text/javascript">moveProgressBar('33.9');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should create :limit instances of Simplabs::ReportsAsSparkline::ReportCache with value 0.0 if no new data has been read and nothing was cached</span></dd>
       +    <script type="text/javascript">moveProgressBar('34.3');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should create a new Simplabs::ReportsAsSparkline::ReportCache with the correct value if new data has been read</span></dd>
       +    <script type="text/javascript">moveProgressBar('34.7');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should save the created Simplabs::ReportsAsSparkline::ReportCache</span></dd>
       +    <script type="text/javascript">moveProgressBar('35.0');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return an array of arrays of Dates and Floats</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_31">Simplabs::ReportsAsSparkline::ReportCache.prepare_result with :live_data = false</dt>
       +    <script type="text/javascript">moveProgressBar('35.4');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return an array of length :limit</span></dd>
       +    <script type="text/javascript">moveProgressBar('35.8');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should not include an entry for the current reporting period</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_32">Simplabs::ReportsAsSparkline::ReportCache.prepare_result with :live_data = true</dt>
       +    <script type="text/javascript">moveProgressBar('36.1');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return an array of length (:limit + 1)</span></dd>
       +    <script type="text/javascript">moveProgressBar('36.5');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should include an entry for the current reporting period</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_33">Simplabs::ReportsAsSparkline::ReportCache.prepare_result with cache = false</dt>
       +    <script type="text/javascript">moveProgressBar('36.9');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should not save the created Simplabs::ReportsAsSparkline::ReportCache</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_34">Simplabs::ReportsAsSparkline::ReportCache.find_value</dt>
       +    <script type="text/javascript">moveProgressBar('37.3');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return the correct value when new data has been read for the reporting period</span></dd>
       +    <script type="text/javascript">moveProgressBar('37.6');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return 0.0 when no data has been read for the reporting period</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_35">Simplabs::ReportsAsSparkline::Report#options</dt>
       +    <script type="text/javascript">moveProgressBar('38.0');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be frozen</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_36">Simplabs::ReportsAsSparkline::Report#run</dt>
       +    <script type="text/javascript">moveProgressBar('38.4');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should process the data with the report cache</span></dd>
       +    <script type="text/javascript">moveProgressBar('38.8');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should process the data with the report cache and specify cache = false when custom conditions are given</span></dd>
       +    <script type="text/javascript">moveProgressBar('39.1');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should validate the specified options for the :run context</span></dd>
       +    <script type="text/javascript">moveProgressBar('39.5');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should use a custom grouping if one is specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('39.9');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return an array of the same length as the specified limit when :live_data is false</span></dd>
       +    <script type="text/javascript">moveProgressBar('40.2');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return an array of the same length as the specified limit + 1 when :live_data is true</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_37">Simplabs::ReportsAsSparkline::Report#run for grouping :hour when :end_date is specified the returned result</dt>
       +    <script type="text/javascript">moveProgressBar('40.6');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should start with the reporting period (end_date - limit.hour)</span></dd>
       +    <script type="text/javascript">moveProgressBar('41.0');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should end with the reporting period of the specified end date</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_38">Simplabs::ReportsAsSparkline::Report#run for grouping :hour with :live_data = true</dt>
       +    <script type="text/javascript">moveProgressBar('41.4');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count</span></dd>
       +    <script type="text/javascript">moveProgressBar('41.7');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum</span></dd>
       +    <script type="text/javascript">moveProgressBar('42.1');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :maximum</span></dd>
       +    <script type="text/javascript">moveProgressBar('42.5');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :minimum</span></dd>
       +    <script type="text/javascript">moveProgressBar('42.9');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :average</span></dd>
       +    <script type="text/javascript">moveProgressBar('43.2');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count when custom conditions are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('43.6');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum when custom conditions are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('44.0');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct results when run twice in a row with a higher limit on the second run</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_39">Simplabs::ReportsAsSparkline::Report#run for grouping :hour with :live_data = true the returned result</dt>
       +    <script type="text/javascript">moveProgressBar('44.4');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be an array starting reporting period (Time.now - limit.hour)</span></dd>
       +    <script type="text/javascript">moveProgressBar('44.7');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be data ending with the current reporting period</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_40">Simplabs::ReportsAsSparkline::Report#run for grouping :hour with :live_data = false</dt>
       +    <script type="text/javascript">moveProgressBar('45.1');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count</span></dd>
       +    <script type="text/javascript">moveProgressBar('45.5');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum</span></dd>
       +    <script type="text/javascript">moveProgressBar('45.8');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :maximum</span></dd>
       +    <script type="text/javascript">moveProgressBar('46.2');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :minimum</span></dd>
       +    <script type="text/javascript">moveProgressBar('46.6');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :average</span></dd>
       +    <script type="text/javascript">moveProgressBar('47.0');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count when custom conditions are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('47.3');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum when custom conditions are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('47.7');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct results when run twice in a row with a higher limit on the second run</span></dd>
       +    <script type="text/javascript">moveProgressBar('48.1');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count when :end_date is specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('48.5');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum when :end_date is specified</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_41">Simplabs::ReportsAsSparkline::Report#run for grouping :hour with :live_data = false the returned result</dt>
       +    <script type="text/javascript">moveProgressBar('48.8');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be an array starting reporting period (Time.now - limit.hour)</span></dd>
       +    <script type="text/javascript">moveProgressBar('49.2');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be data ending with the reporting period before the current</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_42">Simplabs::ReportsAsSparkline::Report#run for grouping :day when :end_date is specified the returned result</dt>
       +    <script type="text/javascript">moveProgressBar('49.6');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should start with the reporting period (end_date - limit.day)</span></dd>
       +    <script type="text/javascript">moveProgressBar('50.0');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should end with the reporting period of the specified end date</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_43">Simplabs::ReportsAsSparkline::Report#run for grouping :day with :live_data = true</dt>
       +    <script type="text/javascript">moveProgressBar('50.3');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count</span></dd>
       +    <script type="text/javascript">moveProgressBar('50.7');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum</span></dd>
       +    <script type="text/javascript">moveProgressBar('51.1');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :maximum</span></dd>
       +    <script type="text/javascript">moveProgressBar('51.4');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :minimum</span></dd>
       +    <script type="text/javascript">moveProgressBar('51.8');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :average</span></dd>
       +    <script type="text/javascript">moveProgressBar('52.2');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count when custom conditions are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('52.6');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum when custom conditions are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('52.9');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct results when run twice in a row with a higher limit on the second run</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_44">Simplabs::ReportsAsSparkline::Report#run for grouping :day with :live_data = true the returned result</dt>
       +    <script type="text/javascript">moveProgressBar('53.3');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be an array starting reporting period (Time.now - limit.day)</span></dd>
       +    <script type="text/javascript">moveProgressBar('53.7');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be data ending with the current reporting period</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_45">Simplabs::ReportsAsSparkline::Report#run for grouping :day with :live_data = false</dt>
       +    <script type="text/javascript">moveProgressBar('54.1');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count</span></dd>
       +    <script type="text/javascript">moveProgressBar('54.4');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum</span></dd>
       +    <script type="text/javascript">moveProgressBar('54.8');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :maximum</span></dd>
       +    <script type="text/javascript">moveProgressBar('55.2');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :minimum</span></dd>
       +    <script type="text/javascript">moveProgressBar('55.5');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :average</span></dd>
       +    <script type="text/javascript">moveProgressBar('55.9');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count when custom conditions are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('56.3');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum when custom conditions are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('56.7');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct results when run twice in a row with a higher limit on the second run</span></dd>
       +    <script type="text/javascript">moveProgressBar('57.0');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count when :end_date is specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('57.4');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum when :end_date is specified</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_46">Simplabs::ReportsAsSparkline::Report#run for grouping :day with :live_data = false the returned result</dt>
       +    <script type="text/javascript">moveProgressBar('57.8');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be an array starting reporting period (Time.now - limit.day)</span></dd>
       +    <script type="text/javascript">moveProgressBar('58.2');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be data ending with the reporting period before the current</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_47">Simplabs::ReportsAsSparkline::Report#run for grouping :week when :end_date is specified the returned result</dt>
       +    <script type="text/javascript">moveProgressBar('58.5');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should start with the reporting period (end_date - limit.week)</span></dd>
       +    <script type="text/javascript">moveProgressBar('58.9');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should end with the reporting period of the specified end date</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_48">Simplabs::ReportsAsSparkline::Report#run for grouping :week with :live_data = true</dt>
       +    <script type="text/javascript">moveProgressBar('59.3');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count</span></dd>
       +    <script type="text/javascript">moveProgressBar('59.7');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum</span></dd>
       +    <script type="text/javascript">moveProgressBar('60.0');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :maximum</span></dd>
       +    <script type="text/javascript">moveProgressBar('60.4');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :minimum</span></dd>
       +    <script type="text/javascript">moveProgressBar('60.8');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :average</span></dd>
       +    <script type="text/javascript">moveProgressBar('61.1');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count when custom conditions are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('61.5');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum when custom conditions are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('61.9');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct results when run twice in a row with a higher limit on the second run</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_49">Simplabs::ReportsAsSparkline::Report#run for grouping :week with :live_data = true the returned result</dt>
       +    <script type="text/javascript">moveProgressBar('62.3');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be an array starting reporting period (Time.now - limit.week)</span></dd>
       +    <script type="text/javascript">moveProgressBar('62.6');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be data ending with the current reporting period</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_50">Simplabs::ReportsAsSparkline::Report#run for grouping :week with :live_data = false</dt>
       +    <script type="text/javascript">moveProgressBar('63.0');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count</span></dd>
       +    <script type="text/javascript">moveProgressBar('63.4');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum</span></dd>
       +    <script type="text/javascript">moveProgressBar('63.8');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :maximum</span></dd>
       +    <script type="text/javascript">moveProgressBar('64.1');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :minimum</span></dd>
       +    <script type="text/javascript">moveProgressBar('64.5');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :average</span></dd>
       +    <script type="text/javascript">moveProgressBar('64.9');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count when custom conditions are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('65.2');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum when custom conditions are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('65.6');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct results when run twice in a row with a higher limit on the second run</span></dd>
       +    <script type="text/javascript">moveProgressBar('66.0');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count when :end_date is specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('66.4');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum when :end_date is specified</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_51">Simplabs::ReportsAsSparkline::Report#run for grouping :week with :live_data = false the returned result</dt>
       +    <script type="text/javascript">moveProgressBar('66.7');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be an array starting reporting period (Time.now - limit.week)</span></dd>
       +    <script type="text/javascript">moveProgressBar('67.1');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be data ending with the reporting period before the current</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_52">Simplabs::ReportsAsSparkline::Report#run for grouping :month when :end_date is specified the returned result</dt>
       +    <script type="text/javascript">moveProgressBar('67.5');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should start with the reporting period (end_date - limit.month)</span></dd>
       +    <script type="text/javascript">moveProgressBar('67.9');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should end with the reporting period of the specified end date</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_53">Simplabs::ReportsAsSparkline::Report#run for grouping :month with :live_data = true</dt>
       +    <script type="text/javascript">moveProgressBar('68.2');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count</span></dd>
       +    <script type="text/javascript">moveProgressBar('68.6');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum</span></dd>
       +    <script type="text/javascript">moveProgressBar('69.0');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :maximum</span></dd>
       +    <script type="text/javascript">moveProgressBar('69.4');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :minimum</span></dd>
       +    <script type="text/javascript">moveProgressBar('69.7');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :average</span></dd>
       +    <script type="text/javascript">moveProgressBar('70.1');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count when custom conditions are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('70.5');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum when custom conditions are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('70.8');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct results when run twice in a row with a higher limit on the second run</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_54">Simplabs::ReportsAsSparkline::Report#run for grouping :month with :live_data = true the returned result</dt>
       +    <script type="text/javascript">moveProgressBar('71.2');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be an array starting reporting period (Time.now - limit.month)</span></dd>
       +    <script type="text/javascript">moveProgressBar('71.6');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be data ending with the current reporting period</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_55">Simplabs::ReportsAsSparkline::Report#run for grouping :month with :live_data = false</dt>
       +    <script type="text/javascript">moveProgressBar('72.0');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count</span></dd>
       +    <script type="text/javascript">moveProgressBar('72.3');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum</span></dd>
       +    <script type="text/javascript">moveProgressBar('72.7');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :maximum</span></dd>
       +    <script type="text/javascript">moveProgressBar('73.1');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :minimum</span></dd>
       +    <script type="text/javascript">moveProgressBar('73.5');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :average</span></dd>
       +    <script type="text/javascript">moveProgressBar('73.8');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count when custom conditions are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('74.2');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum when custom conditions are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('74.6');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct results when run twice in a row with a higher limit on the second run</span></dd>
       +    <script type="text/javascript">moveProgressBar('75.0');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count when :end_date is specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('75.3');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :sum when :end_date is specified</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_56">Simplabs::ReportsAsSparkline::Report#run for grouping :month with :live_data = false the returned result</dt>
       +    <script type="text/javascript">moveProgressBar('75.7');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be an array starting reporting period (Time.now - limit.month)</span></dd>
       +    <script type="text/javascript">moveProgressBar('76.1');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should be data ending with the reporting period before the current</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_57">Simplabs::ReportsAsSparkline::Report#run for grouping week with data ranging over two years with the first week of the second year belonging to the first year</dt>
       +    <script type="text/javascript">moveProgressBar('76.4');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_58">Simplabs::ReportsAsSparkline::Report#run for grouping week with data ranging over two years with the first week of the second year belonging to the second year</dt>
       +    <script type="text/javascript">moveProgressBar('76.8');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return correct data for aggregation :count</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_59">Simplabs::ReportsAsSparkline::Report#read_data</dt>
       +    <script type="text/javascript">moveProgressBar('77.2');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should invoke the aggregation method on the model</span></dd>
       +    <script type="text/javascript">moveProgressBar('77.6');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should setup the conditions</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_60">Simplabs::ReportsAsSparkline::Report#setup_conditions</dt>
       +    <script type="text/javascript">moveProgressBar('77.9');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return conditions for date_column BETWEEN begin_at and end_at only when no custom conditions are specified and both begin and end date are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('78.3');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return conditions for date_column &gt;= begin_at when no custom conditions and a begin_at are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('78.7');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return conditions for date_column &lt;= end_at when no custom conditions and a end_at are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('79.1');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should raise an argument error when neither begin_at or end_at are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('79.4');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return conditions for date_column BETWEEN begin_at and end_date only when an empty Hash of custom conditions is specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('79.8');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return conditions for date_column BETWEEN begin_at and end_date only when an empty Array of custom conditions is specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('80.2');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should correctly include custom conditions if they are specified as a Hash</span></dd>
       +    <script type="text/javascript">moveProgressBar('80.5');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should correctly include custom conditions if they are specified as an Array</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_61">Simplabs::ReportsAsSparkline::Report#ensure_valid_options</dt>
       +    <script type="text/javascript">moveProgressBar('80.9');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should raise an error if malformed conditions are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('81.3');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should not raise an error if conditions are specified as an Array</span></dd>
       +    <script type="text/javascript">moveProgressBar('81.7');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should not raise an error if conditions are specified as a Hash</span></dd>
       +    <script type="text/javascript">moveProgressBar('82.0');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should raise an error if an invalid grouping is specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('82.4');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should raise an error if an end date is specified that is not a DateTime</span></dd>
       +    <script type="text/javascript">moveProgressBar('82.8');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should raise an error if an end date is specified that is in the future</span></dd>
       +    <script type="text/javascript">moveProgressBar('83.2');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should raise an error if both an end date and :live_data = true are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('83.5');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should not raise an error if both an end date and :live_data = false are specified</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_62">Simplabs::ReportsAsSparkline::Report#ensure_valid_options for context :initialize</dt>
       +    <script type="text/javascript">moveProgressBar('83.9');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should not raise an error if valid options are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('84.3');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should raise an error if an unsupported option is specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('84.7');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should raise an error if an invalid aggregation is specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('85.0');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should raise an error if aggregation :sum is spesicied but no :value_column</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_63">Simplabs::ReportsAsSparkline::Report#ensure_valid_options for context :run</dt>
       +    <script type="text/javascript">moveProgressBar('85.4');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should not raise an error if valid options are specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('85.8');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should raise an error if an unsupported option is specified</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_64">Simplabs::ReportsAsSparkline::ReportingPeriod#date_time</dt>
       +    <script type="text/javascript">moveProgressBar('86.1');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return the date and time with minutes = seconds = 0 for grouping :hour</span></dd>
       +    <script type="text/javascript">moveProgressBar('86.5');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return the date part only for grouping :day</span></dd>
       +    <script type="text/javascript">moveProgressBar('86.9');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return the date with day = 1 for grouping :month</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_65">Simplabs::ReportsAsSparkline::ReportingPeriod#date_time for grouping :week</dt>
       +    <script type="text/javascript">moveProgressBar('87.3');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return the date of the monday of the week date_time is in for any day in that week</span></dd>
       +    <script type="text/javascript">moveProgressBar('87.6');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return the date of the monday of the week date_time is in when the specified date is a monday already</span></dd>
       +    <script type="text/javascript">moveProgressBar('88.0');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return the date of the monday of the week date_time is in when the monday is in a different month than the specified date</span></dd>
       +    <script type="text/javascript">moveProgressBar('88.4');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return the date of the monday of the week date_time is in when the monday is in a different year than the specified date</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_66">Simplabs::ReportsAsSparkline::ReportingPeriod#last_date_time</dt>
       +    <script type="text/javascript">moveProgressBar('88.8');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return the date and time with minutes = seconds = 59 for grouping :hour</span></dd>
       +    <script type="text/javascript">moveProgressBar('89.1');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return the date part with hour = 23 and minute = seconds = 59 for grouping :day</span></dd>
       +    <script type="text/javascript">moveProgressBar('89.5');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return the date of the last day of the month for grouping :month</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_67">Simplabs::ReportsAsSparkline::ReportingPeriod#last_date_time for grouping :week</dt>
       +    <script type="text/javascript">moveProgressBar('89.9');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return the date of the sunday of the week date_time is in for any day in that week</span></dd>
       +    <script type="text/javascript">moveProgressBar('90.2');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return the date of the sunday of the week date_time is in when the sunday is in a different month than the specified date</span></dd>
       +    <script type="text/javascript">moveProgressBar('90.6');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return the date of the sunday of the week date_time is in when the sunday is in a different year than the specified date</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_68">Simplabs::ReportsAsSparkline::ReportingPeriod.from_db_string</dt>
       +    <script type="text/javascript">moveProgressBar('91.0');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return a reporting period with the correct date and time and with minutes = seconds = 0 for grouping :hour</span></dd>
       +    <script type="text/javascript">moveProgressBar('91.4');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return a reporting period with the date part only for grouping :day</span></dd>
       +    <script type="text/javascript">moveProgressBar('91.7');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return a reporting period with the date part of the monday of the week the date is in for grouping :week</span></dd>
       +    <script type="text/javascript">moveProgressBar('92.1');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return a reporting period with the correct date and with day = 1 for grouping :month</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_69">Simplabs::ReportsAsSparkline::ReportingPeriod#next</dt>
       +    <script type="text/javascript">moveProgressBar('92.5');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return a reporting period with date and time one hour after the current period for grouping :hour</span></dd>
       +    <script type="text/javascript">moveProgressBar('92.9');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return a reporting period with date one day after the current period for grouping :day</span></dd>
       +    <script type="text/javascript">moveProgressBar('93.2');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return a reporting period with date one week after the current period for grouping :week</span></dd>
       +    <script type="text/javascript">moveProgressBar('93.6');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return a reporting period with date of the first day in the month one month after the current period</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_70">Simplabs::ReportsAsSparkline::ReportingPeriod#previous</dt>
       +    <script type="text/javascript">moveProgressBar('94.0');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return a reporting period with date and time one hour before the current period for grouping :hour</span></dd>
       +    <script type="text/javascript">moveProgressBar('94.4');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return a reporting period with date one day before the current period for grouping :day</span></dd>
       +    <script type="text/javascript">moveProgressBar('94.7');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return a reporting period with date one week before the current period for grouping :week</span></dd>
       +    <script type="text/javascript">moveProgressBar('95.1');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return a reporting period with date of the first day in the month one month before the current period</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_71">Simplabs::ReportsAsSparkline::ReportingPeriod#==</dt>
       +    <script type="text/javascript">moveProgressBar('95.5');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return true for 2 reporting periods with the same date_time and grouping</span></dd>
       +    <script type="text/javascript">moveProgressBar('95.8');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return false for 2 reporting periods with the same date_time but different groupings</span></dd>
       +    <script type="text/javascript">moveProgressBar('96.2');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return true for 2 reporting periods with the same grouping but different date_times if the date times evaluate to the same reporting period identifier</span></dd>
       +    <script type="text/javascript">moveProgressBar('96.6');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return false for 2 reporting periods with the same grouping but different date_times if the date times evaluate to different reporting period identifiers</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_72">Simplabs::ReportsAsSparkline::ReportingPeriod.first</dt>
       +    <script type="text/javascript">moveProgressBar('97.0');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return a reporting period with the date part of (DateTime.now - limit.hours with minutes = seconds = 0 for grouping :hour</span></dd>
       +    <script type="text/javascript">moveProgressBar('97.3');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return a reporting period with the date part of (DateTime.now - limit.days) for grouping :day</span></dd>
       +    <script type="text/javascript">moveProgressBar('97.7');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return a reporting period with the date of the first day of the month at (DateTime.now - limit.months) for grouping :month</span></dd>
       +    <script type="text/javascript">moveProgressBar('98.1');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should return a reporting period with the date of the monday of the week at (DateTime.now - limit.weeks) for grouping :week</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_73">Simplabs::ReportsAsSparkline for inherited models</dt>
       +    <script type="text/javascript">moveProgressBar('98.5');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should include all data when invoked on the base model class</span></dd>
       +    <script type="text/javascript">moveProgressBar('98.8');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should include only data for instances of the inherited model when invoked on the inherited model class</span></dd>
       +  </dl>
       +</div>
       +<div class="example_group">
       +  <dl>
       +  <dt id="example_group_74">Simplabs::ReportsAsSparkline::SparklineTagHelper#sparkline_tag</dt>
       +    <script type="text/javascript">moveProgressBar('99.2');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should render an image with the correct source</span></dd>
       +    <script type="text/javascript">moveProgressBar('99.6');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should add parameters for labels to the source of the image if rendering of lables is specified</span></dd>
       +    <script type="text/javascript">moveProgressBar('100.0');</script>
       +    <dd class="spec passed"><span class="passed_spec_name">should set the parameters for custom colors if custom colors are specified</span></dd>
       +  </dl>
       +</div>
       +<script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>41.896488 seconds</strong>";</script>
       +<script type="text/javascript">document.getElementById('totals').innerHTML = "268 examples, 0 failures";</script>
       +</div>
       +</div>
       +</body>
       +</html>
 (DIR) diff --git a/rdoc/created.rid b/rdoc/created.rid
       @@ -1 +0,0 @@
       -Wed, 29 Apr 2009 16:35:17 +0200
 (DIR) diff --git a/rdoc/files/lib/simplabs/reports_as_sparkline/report_cache_rb.html b/rdoc/files/lib/simplabs/reports_as_sparkline/report_cache_rb.html
       @@ -1,101 +0,0 @@
       -<?xml version="1.0" encoding="iso-8859-1"?>
       -<!DOCTYPE html 
       -     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       -     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       -
       -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
       -<head>
       -  <title>File: report_cache.rb</title>
       -  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
       -  <meta http-equiv="Content-Script-Type" content="text/javascript" />
       -  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
       -  <script type="text/javascript">
       -  // <![CDATA[
       -
       -  function popupCode( url ) {
       -    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
       -  }
       -
       -  function toggleCode( id ) {
       -    if ( document.getElementById )
       -      elem = document.getElementById( id );
       -    else if ( document.all )
       -      elem = eval( "document.all." + id );
       -    else
       -      return false;
       -
       -    elemStyle = elem.style;
       -    
       -    if ( elemStyle.display != "block" ) {
       -      elemStyle.display = "block"
       -    } else {
       -      elemStyle.display = "none"
       -    }
       -
       -    return true;
       -  }
       -  
       -  // Make codeblocks hidden by default
       -  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
       -  
       -  // ]]>
       -  </script>
       -
       -</head>
       -<body>
       -
       -
       -
       -  <div id="fileHeader">
       -    <h1>report_cache.rb</h1>
       -    <table class="header-table">
       -    <tr class="top-aligned-row">
       -      <td><strong>Path:</strong></td>
       -      <td>lib/simplabs/reports_as_sparkline/report_cache.rb
       -      </td>
       -    </tr>
       -    <tr class="top-aligned-row">
       -      <td><strong>Last Update:</strong></td>
       -      <td>Wed Apr 29 16:23:48 +0200 2009</td>
       -    </tr>
       -    </table>
       -  </div>
       -  <!-- banner header -->
       -
       -  <div id="bodyContent">
       -
       -
       -
       -  <div id="contextContent">
       -
       -
       -
       -   </div>
       -
       -
       -  </div>
       -
       -
       -    <!-- if includes -->
       -
       -    <div id="section">
       -
       -
       -
       -
       -
       -      
       -
       -
       -    <!-- if method_list -->
       -
       -
       -  </div>
       -
       -
       -<div id="validator-badges">
       -  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
       -</div>
       -
       -</body>
       -</html>
       -\ No newline at end of file
 (DIR) diff --git a/rdoc/files/lib/simplabs/reports_as_sparkline/report_rb.html b/rdoc/files/lib/simplabs/reports_as_sparkline/report_rb.html
       @@ -1,101 +0,0 @@
       -<?xml version="1.0" encoding="iso-8859-1"?>
       -<!DOCTYPE html 
       -     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       -     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       -
       -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
       -<head>
       -  <title>File: report.rb</title>
       -  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
       -  <meta http-equiv="Content-Script-Type" content="text/javascript" />
       -  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
       -  <script type="text/javascript">
       -  // <![CDATA[
       -
       -  function popupCode( url ) {
       -    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
       -  }
       -
       -  function toggleCode( id ) {
       -    if ( document.getElementById )
       -      elem = document.getElementById( id );
       -    else if ( document.all )
       -      elem = eval( "document.all." + id );
       -    else
       -      return false;
       -
       -    elemStyle = elem.style;
       -    
       -    if ( elemStyle.display != "block" ) {
       -      elemStyle.display = "block"
       -    } else {
       -      elemStyle.display = "none"
       -    }
       -
       -    return true;
       -  }
       -  
       -  // Make codeblocks hidden by default
       -  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
       -  
       -  // ]]>
       -  </script>
       -
       -</head>
       -<body>
       -
       -
       -
       -  <div id="fileHeader">
       -    <h1>report.rb</h1>
       -    <table class="header-table">
       -    <tr class="top-aligned-row">
       -      <td><strong>Path:</strong></td>
       -      <td>lib/simplabs/reports_as_sparkline/report.rb
       -      </td>
       -    </tr>
       -    <tr class="top-aligned-row">
       -      <td><strong>Last Update:</strong></td>
       -      <td>Wed Apr 29 16:02:27 +0200 2009</td>
       -    </tr>
       -    </table>
       -  </div>
       -  <!-- banner header -->
       -
       -  <div id="bodyContent">
       -
       -
       -
       -  <div id="contextContent">
       -
       -
       -
       -   </div>
       -
       -
       -  </div>
       -
       -
       -    <!-- if includes -->
       -
       -    <div id="section">
       -
       -
       -
       -
       -
       -      
       -
       -
       -    <!-- if method_list -->
       -
       -
       -  </div>
       -
       -
       -<div id="validator-badges">
       -  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
       -</div>
       -
       -</body>
       -</html>
       -\ No newline at end of file
 (DIR) diff --git a/rdoc/files/lib/simplabs/reports_as_sparkline/reporting_period_rb.html b/rdoc/files/lib/simplabs/reports_as_sparkline/reporting_period_rb.html
       @@ -1,101 +0,0 @@
       -<?xml version="1.0" encoding="iso-8859-1"?>
       -<!DOCTYPE html 
       -     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       -     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       -
       -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
       -<head>
       -  <title>File: reporting_period.rb</title>
       -  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
       -  <meta http-equiv="Content-Script-Type" content="text/javascript" />
       -  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
       -  <script type="text/javascript">
       -  // <![CDATA[
       -
       -  function popupCode( url ) {
       -    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
       -  }
       -
       -  function toggleCode( id ) {
       -    if ( document.getElementById )
       -      elem = document.getElementById( id );
       -    else if ( document.all )
       -      elem = eval( "document.all." + id );
       -    else
       -      return false;
       -
       -    elemStyle = elem.style;
       -    
       -    if ( elemStyle.display != "block" ) {
       -      elemStyle.display = "block"
       -    } else {
       -      elemStyle.display = "none"
       -    }
       -
       -    return true;
       -  }
       -  
       -  // Make codeblocks hidden by default
       -  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
       -  
       -  // ]]>
       -  </script>
       -
       -</head>
       -<body>
       -
       -
       -
       -  <div id="fileHeader">
       -    <h1>reporting_period.rb</h1>
       -    <table class="header-table">
       -    <tr class="top-aligned-row">
       -      <td><strong>Path:</strong></td>
       -      <td>lib/simplabs/reports_as_sparkline/reporting_period.rb
       -      </td>
       -    </tr>
       -    <tr class="top-aligned-row">
       -      <td><strong>Last Update:</strong></td>
       -      <td>Wed Apr 29 16:34:11 +0200 2009</td>
       -    </tr>
       -    </table>
       -  </div>
       -  <!-- banner header -->
       -
       -  <div id="bodyContent">
       -
       -
       -
       -  <div id="contextContent">
       -
       -
       -
       -   </div>
       -
       -
       -  </div>
       -
       -
       -    <!-- if includes -->
       -
       -    <div id="section">
       -
       -
       -
       -
       -
       -      
       -
       -
       -    <!-- if method_list -->
       -
       -
       -  </div>
       -
       -
       -<div id="validator-badges">
       -  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
       -</div>
       -
       -</body>
       -</html>
       -\ No newline at end of file