ignore spec and rcov reports - reportable - Fork of reportable required by WarVox, from hdm/reportable.
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) commit 4ba21d54db8e79dddf02e6b0858afe7265391f94
(DIR) parent 1166ac66c5e5c75af0ca808ffc5b43e3deaeef6b
(HTM) Author: Marco Otte-Witte <marco.otte-witte@simplabs.com>
Date: Wed, 29 Apr 2009 19:36:49 +0200
ignore spec and rcov reports
Diffstat:
M .gitignore | 2 ++
D doc/coverage/index.html | 387 -------------------------------
D doc/coverage/lib-simplabs-reports_… | 655 -------------------------------
D doc/coverage/lib-simplabs-reports_… | 725 -------------------------------
D doc/coverage/lib-simplabs-reports_… | 710 -------------------------------
D doc/coverage/lib-simplabs-reports_… | 729 -------------------------------
D doc/coverage/lib-simplabs-reports_… | 703 -------------------------------
D doc/coverage/lib-simplabs-reports_… | 649 -------------------------------
D doc/coverage/lib-simplabs-reports_… | 669 ------------------------------
D doc/spec.html | 1093 -------------------------------
10 files changed, 2 insertions(+), 6320 deletions(-)
---
(DIR) diff --git a/.gitignore b/.gitignore
@@ -1,3 +1,5 @@
.DS_Store
spec/log/spec.log
spec/db/reports_as_sparkline.sqlite3.db
+doc/coverage
+doc/spec.html
(DIR) diff --git a/doc/coverage/index.html b/doc/coverage/index.html
@@ -1,387 +0,0 @@
-<!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 19:33:53 +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>570</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>
- </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>
- </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>59</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>
- </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>
- </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>
- </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>
- </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>115</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>
- </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>
- </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>
- </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>
- </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>100</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>
- </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>
- </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>93</tt>
- </td>
- <td class='lines_code'><tt>76</tt>
- </td>
- <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_total'>95.7%</tt>
- </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>
- </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>
- </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>
- </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
@@ -1,655 +0,0 @@
-<!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 19:33:53 +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'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>
- </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>
- </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="inferred0"><a name="line5"></a> 5 # A special report class that cumulates all data (see Simplabs::ReportsAsSparkline::Report)
-</span><span class="inferred1"><a name="line6"></a> 6 #
-</span><span class="inferred0"><a name="line7"></a> 7 # ==== Examples
-</span><span class="inferred1"><a name="line8"></a> 8 #
-</span><span class="inferred0"><a name="line9"></a> 9 # When Simplabs::ReportsAsSparkline::Report returns
-</span><span class="inferred1"><a name="line10"></a>10 #
-</span><span class="inferred0"><a name="line11"></a>11 # [[<DateTime today>, 1], [<DateTime yesterday>, 2], etc.]
-</span><span class="inferred1"><a name="line12"></a>12 #
-</span><span class="inferred0"><a name="line13"></a>13 # Simplabs::ReportsAsSparkline::CumulatedReport returns
-</span><span class="inferred1"><a name="line14"></a>14 #
-</span><span class="inferred0"><a name="line15"></a>15 # [[<DateTime today>, 3], [<DateTime yesterday>, 2], etc.]
-</span><span class="marked1"><a name="line16"></a>16 class CumulatedReport < Report
-</span><span class="inferred0"><a name="line17"></a>17
-</span><span class="inferred1"><a name="line18"></a>18 # Runs the report (see Simplabs::ReportsAsSparkline::Report#run)
-</span><span class="marked0"><a name="line19"></a>19 def run(options = {})
-</span><span class="marked1"><a name="line20"></a>20 cumulate(super, options_for_run(options))
-</span><span class="marked0"><a name="line21"></a>21 end
-</span><span class="inferred1"><a name="line22"></a>22
-</span><span class="marked0"><a name="line23"></a>23 protected
-</span><span class="inferred1"><a name="line24"></a>24
-</span><span class="marked0"><a name="line25"></a>25 def cumulate(data, options)
-</span><span class="marked1"><a name="line26"></a>26 first_reporting_period = ReportingPeriod.first(options[:grouping], options[:limit], options[:end_date])
-</span><span class="marked0"><a name="line27"></a>27 acc = initial_cumulative_value(first_reporting_period.date_time, options)
-</span><span class="marked1"><a name="line28"></a>28 result = []
-</span><span class="marked0"><a name="line29"></a>29 data.each do |element|
-</span><span class="marked1"><a name="line30"></a>30 acc += element[1].to_f
-</span><span class="marked0"><a name="line31"></a>31 result << [element[0], acc]
-</span><span class="inferred1"><a name="line32"></a>32 end
-</span><span class="marked0"><a name="line33"></a>33 result
-</span><span class="inferred1"><a name="line34"></a>34 end
-</span><span class="inferred0"><a name="line35"></a>35
-</span><span class="marked1"><a name="line36"></a>36 def initial_cumulative_value(date, options)
-</span><span class="marked0"><a name="line37"></a>37 conditions = setup_conditions(nil, date, options[:conditions])
-</span><span class="marked1"><a name="line38"></a>38 @klass.send(@aggregation, @value_column, :conditions => conditions)
-</span><span class="inferred0"><a name="line39"></a>39 end
-</span><span class="inferred1"><a name="line40"></a>40
-</span><span class="inferred0"><a name="line41"></a>41 end
-</span><span class="inferred1"><a name="line42"></a>42
-</span><span class="inferred0"><a name="line43"></a>43 end
-</span><span class="inferred1"><a name="line44"></a>44
-</span><span class="inferred0"><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
@@ -1,725 +0,0 @@
-<!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 19:33:53 +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'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>115</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>
- </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>
- </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="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="marked1"><a name="line5"></a> 5 class Grouping #:nodoc:
-</span><span class="inferred0"><a name="line6"></a> 6
-</span><span class="marked1"><a name="line7"></a> 7 def initialize(identifier)
-</span><span class="marked0"><a name="line8"></a> 8 raise ArgumentError.new("Invalid grouping #{identifier}") unless [:hour, :day, :week, :month].include?(identifier)
-</span><span class="marked1"><a name="line9"></a> 9 @identifier = identifier
-</span><span class="inferred0"><a name="line10"></a> 10 end
-</span><span class="inferred1"><a name="line11"></a> 11
-</span><span class="marked0"><a name="line12"></a> 12 def identifier
-</span><span class="marked1"><a name="line13"></a> 13 @identifier
-</span><span class="marked0"><a name="line14"></a> 14 end
-</span><span class="inferred1"><a name="line15"></a> 15
-</span><span class="marked0"><a name="line16"></a> 16 def date_parts_from_db_string(db_string)
-</span><span class="marked1"><a name="line17"></a> 17 return case ActiveRecord::Base.connection.adapter_name
-</span><span class="marked0"><a name="line18"></a> 18 when /mysql/i
-</span><span class="marked1"><a name="line19"></a> 19 from_mysql_db_string(db_string)
-</span><span class="marked0"><a name="line20"></a> 20 when /sqlite/i
-</span><span class="marked1"><a name="line21"></a> 21 from_sqlite_db_string(db_string)
-</span><span class="marked0"><a name="line22"></a> 22 when /postgres/i
-</span><span class="marked1"><a name="line23"></a> 23 from_postgresql_db_string(db_string)
-</span><span class="marked0"><a name="line24"></a> 24 end
-</span><span class="marked1"><a name="line25"></a> 25 end
-</span><span class="inferred0"><a name="line26"></a> 26
-</span><span class="marked1"><a name="line27"></a> 27 def to_sql(date_column) #:nodoc:
-</span><span class="marked0"><a name="line28"></a> 28 return case ActiveRecord::Base.connection.adapter_name
-</span><span class="marked1"><a name="line29"></a> 29 when /mysql/i
-</span><span class="marked0"><a name="line30"></a> 30 mysql_format(date_column)
-</span><span class="marked1"><a name="line31"></a> 31 when /sqlite/i
-</span><span class="marked0"><a name="line32"></a> 32 sqlite_format(date_column)
-</span><span class="marked1"><a name="line33"></a> 33 when /postgres/i
-</span><span class="marked0"><a name="line34"></a> 34 postgresql_format(date_column)
-</span><span class="marked1"><a name="line35"></a> 35 end
-</span><span class="marked0"><a name="line36"></a> 36 end
-</span><span class="inferred1"><a name="line37"></a> 37
-</span><span class="marked0"><a name="line38"></a> 38 private
-</span><span class="inferred1"><a name="line39"></a> 39
-</span><span class="marked0"><a name="line40"></a> 40 def from_mysql_db_string(db_string)
-</span><span class="marked1"><a name="line41"></a> 41 if @identifier == :week
-</span><span class="marked0"><a name="line42"></a> 42 parts = [db_string[0..3], db_string[4..5]].map(&:to_i)
-</span><span class="inferred1"><a name="line43"></a> 43 else
-</span><span class="marked0"><a name="line44"></a> 44 db_string.split('/').map(&:to_i)
-</span><span class="inferred1"><a name="line45"></a> 45 end
-</span><span class="marked0"><a name="line46"></a> 46 end
-</span><span class="inferred1"><a name="line47"></a> 47
-</span><span class="marked0"><a name="line48"></a> 48 def from_sqlite_db_string(db_string)
-</span><span class="marked1"><a name="line49"></a> 49 if @identifier == :week
-</span><span class="marked0"><a name="line50"></a> 50 parts = db_string.split('-').map(&:to_i)
-</span><span class="marked1"><a name="line51"></a> 51 date = Date.new(parts[0], parts[1], parts[2])
-</span><span class="marked0"><a name="line52"></a> 52 return [date.cwyear, date.cweek]
-</span><span class="inferred1"><a name="line53"></a> 53 end
-</span><span class="marked0"><a name="line54"></a> 54 db_string.split('/').map(&:to_i)
-</span><span class="inferred1"><a name="line55"></a> 55 end
-</span><span class="inferred0"><a name="line56"></a> 56
-</span><span class="marked1"><a name="line57"></a> 57 def from_postgresql_db_string(db_string)
-</span><span class="marked0"><a name="line58"></a> 58 case @identifier
-</span><span class="marked1"><a name="line59"></a> 59 when :hour
-</span><span class="marked0"><a name="line60"></a> 60 return (db_string[0..9].split('-') + [db_string[11..12]]).map(&:to_i)
-</span><span class="marked1"><a name="line61"></a> 61 when :day
-</span><span class="marked0"><a name="line62"></a> 62 return db_string[0..9].split('-').map(&:to_i)
-</span><span class="marked1"><a name="line63"></a> 63 when :week
-</span><span class="marked0"><a name="line64"></a> 64 parts = db_string[0..9].split('-').map(&:to_i)
-</span><span class="marked1"><a name="line65"></a> 65 date = Date.new(parts[0], parts[1], parts[2])
-</span><span class="marked0"><a name="line66"></a> 66 return [date.cwyear, date.cweek]
-</span><span class="marked1"><a name="line67"></a> 67 when :month
-</span><span class="marked0"><a name="line68"></a> 68 return db_string[0..6].split('-')[0..1].map(&:to_i)
-</span><span class="inferred1"><a name="line69"></a> 69 end
-</span><span class="marked0"><a name="line70"></a> 70 end
-</span><span class="inferred1"><a name="line71"></a> 71
-</span><span class="marked0"><a name="line72"></a> 72 def mysql_format(date_column)
-</span><span class="uncovered1"><a name="line73"></a> 73 return case @identifier
-</span><span class="marked0"><a name="line74"></a> 74 when :hour
-</span><span class="marked1"><a name="line75"></a> 75 "DATE_FORMAT(#{date_column}, '%Y/%m/%d/%H')"
-</span><span class="marked0"><a name="line76"></a> 76 when :day
-</span><span class="marked1"><a name="line77"></a> 77 "DATE_FORMAT(#{date_column}, '%Y/%m/%d')"
-</span><span class="marked0"><a name="line78"></a> 78 when :week
-</span><span class="marked1"><a name="line79"></a> 79 "YEARWEEK(#{date_column}, 3)"
-</span><span class="marked0"><a name="line80"></a> 80 when :month
-</span><span class="marked1"><a name="line81"></a> 81 "DATE_FORMAT(#{date_column}, '%Y/%m')"
-</span><span class="marked0"><a name="line82"></a> 82 end
-</span><span class="marked1"><a name="line83"></a> 83 end
-</span><span class="inferred0"><a name="line84"></a> 84
-</span><span class="marked1"><a name="line85"></a> 85 def sqlite_format(date_column)
-</span><span class="uncovered0"><a name="line86"></a> 86 return case @identifier
-</span><span class="marked1"><a name="line87"></a> 87 when :hour
-</span><span class="marked0"><a name="line88"></a> 88 "strftime('%Y/%m/%d/%H', #{date_column})"
-</span><span class="marked1"><a name="line89"></a> 89 when :day
-</span><span class="marked0"><a name="line90"></a> 90 "strftime('%Y/%m/%d', #{date_column})"
-</span><span class="marked1"><a name="line91"></a> 91 when :week
-</span><span class="marked0"><a name="line92"></a> 92 "date(#{date_column}, 'weekday 0')"
-</span><span class="marked1"><a name="line93"></a> 93 when :month
-</span><span class="marked0"><a name="line94"></a> 94 "strftime('%Y/%m', #{date_column})"
-</span><span class="marked1"><a name="line95"></a> 95 end
-</span><span class="marked0"><a name="line96"></a> 96 end
-</span><span class="inferred1"><a name="line97"></a> 97
-</span><span class="marked0"><a name="line98"></a> 98 def postgresql_format(date_column)
-</span><span class="inferred1"><a name="line99"></a> 99 return case @identifier
-</span><span class="marked0"><a name="line100"></a>100 when :hour
-</span><span class="inferred1"><a name="line101"></a>101 "date_trunc('hour', #{date_column})"
-</span><span class="marked0"><a name="line102"></a>102 when :day
-</span><span class="inferred1"><a name="line103"></a>103 "date_trunc('day', #{date_column})"
-</span><span class="marked0"><a name="line104"></a>104 when :week
-</span><span class="inferred1"><a name="line105"></a>105 "date_trunc('week', #{date_column})"
-</span><span class="marked0"><a name="line106"></a>106 when :month
-</span><span class="marked1"><a name="line107"></a>107 "date_trunc('month', #{date_column})"
-</span><span class="marked0"><a name="line108"></a>108 end
-</span><span class="marked1"><a name="line109"></a>109 end
-</span><span class="inferred0"><a name="line110"></a>110
-</span><span class="inferred1"><a name="line111"></a>111 end
-</span><span class="inferred0"><a name="line112"></a>112
-</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></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
@@ -1,710 +0,0 @@
-<!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 19:33:53 +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'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>100</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>
- </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>
- </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="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 ReportCache class is a regular +ActiveRecord+ model and represents cached results for single reporting periods (table name is +reports_as_sparkline_cache+)
-</span><span class="inferred0"><a name="line6"></a> 6 # ReportCache instances are identified by the combination of +model_name+, +report_name+, +grouping+, +aggregation+, +reporting_period+, +run_limit+
-</span><span class="marked1"><a name="line7"></a> 7 class ReportCache < ActiveRecord::Base
-</span><span class="inferred0"><a name="line8"></a> 8
-</span><span class="marked1"><a name="line9"></a> 9 set_table_name :reports_as_sparkline_cache
-</span><span class="inferred0"><a name="line10"></a> 10
-</span><span class="marked1"><a name="line11"></a> 11 def self.process(report, options, cache = true, &block) #:nodoc:
-</span><span class="marked0"><a name="line12"></a> 12 raise ArgumentError.new('A block must be given') unless block_given?
-</span><span class="marked1"><a name="line13"></a> 13 self.transaction do
-</span><span class="marked0"><a name="line14"></a> 14 cached_data = []
-</span><span class="marked1"><a name="line15"></a> 15 first_reporting_period = ReportingPeriod.first(options[:grouping], (options[:end_date] ? options[:limit] - 1 : options[:limit]), options[:end_date])
-</span><span class="marked0"><a name="line16"></a> 16 last_reporting_period = options[:end_date] ? ReportingPeriod.new(options[:grouping], options[:end_date]) : nil
-</span><span class="inferred1"><a name="line17"></a> 17
-</span><span class="marked0"><a name="line18"></a> 18 if cache
-</span><span class="marked1"><a name="line19"></a> 19 cached_data = find_cached_data(report, options, first_reporting_period, last_reporting_period)
-</span><span class="marked0"><a name="line20"></a> 20 first_cached_reporting_period = cached_data.empty? ? nil : ReportingPeriod.new(options[:grouping], cached_data.first.reporting_period)
-</span><span class="marked1"><a name="line21"></a> 21 last_cached_reporting_period = cached_data.empty? ? nil : ReportingPeriod.new(options[:grouping], cached_data.last.reporting_period)
-</span><span class="inferred0"><a name="line22"></a> 22 end
-</span><span class="inferred1"><a name="line23"></a> 23
-</span><span class="marked0"><a name="line24"></a> 24 new_data = if !options[:live_data] && last_cached_reporting_period == ReportingPeriod.new(options[:grouping]).previous
-</span><span class="uncovered1"><a name="line25"></a> 25 []
-</span><span class="inferred0"><a name="line26"></a> 26 else
-</span><span class="marked1"><a name="line27"></a> 27 end_date = options[:live_data] ? nil : (options[:end_date] ? last_reporting_period.last_date_time : nil)
-</span><span class="marked0"><a name="line28"></a> 28 yield((last_cached_reporting_period.next rescue first_reporting_period).date_time, end_date)
-</span><span class="inferred1"><a name="line29"></a> 29 end
-</span><span class="inferred0"><a name="line30"></a> 30
-</span><span class="marked1"><a name="line31"></a> 31 prepare_result(new_data, cached_data, report, options, cache)
-</span><span class="inferred0"><a name="line32"></a> 32 end
-</span><span class="inferred1"><a name="line33"></a> 33 end
-</span><span class="inferred0"><a name="line34"></a> 34
-</span><span class="marked1"><a name="line35"></a> 35 private
-</span><span class="inferred0"><a name="line36"></a> 36
-</span><span class="marked1"><a name="line37"></a> 37 def self.prepare_result(new_data, cached_data, report, options, cache = true)
-</span><span class="marked0"><a name="line38"></a> 38 new_data = new_data.map { |data| [ReportingPeriod.from_db_string(options[:grouping], data[0]), data[1]] }
-</span><span class="marked1"><a name="line39"></a> 39 result = cached_data.map { |cached| [cached.reporting_period, cached.value] }
-</span><span class="marked0"><a name="line40"></a> 40 last_reporting_period = ReportingPeriod.new(options[:grouping])
-</span><span class="marked1"><a name="line41"></a> 41 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="marked0"><a name="line42"></a> 42 while reporting_period < (options[:end_date] ? ReportingPeriod.new(options[:grouping], options[:end_date]).next : last_reporting_period)
-</span><span class="marked1"><a name="line43"></a> 43 cached = build_cached_data(report, options[:grouping], options[:limit], reporting_period, find_value(new_data, reporting_period))
-</span><span class="marked0"><a name="line44"></a> 44 cached.save! if cache
-</span><span class="marked1"><a name="line45"></a> 45 result << [reporting_period.date_time, cached.value]
-</span><span class="marked0"><a name="line46"></a> 46 reporting_period = reporting_period.next
-</span><span class="inferred1"><a name="line47"></a> 47 end
-</span><span class="marked0"><a name="line48"></a> 48 if options[:live_data]
-</span><span class="marked1"><a name="line49"></a> 49 result << [last_reporting_period.date_time, find_value(new_data, last_reporting_period)]
-</span><span class="inferred0"><a name="line50"></a> 50 end
-</span><span class="marked1"><a name="line51"></a> 51 result
-</span><span class="inferred0"><a name="line52"></a> 52 end
-</span><span class="inferred1"><a name="line53"></a> 53
-</span><span class="marked0"><a name="line54"></a> 54 def self.find_value(data, reporting_period)
-</span><span class="marked1"><a name="line55"></a> 55 data = data.detect { |d| d[0] == reporting_period }
-</span><span class="marked0"><a name="line56"></a> 56 data ? data[1] : 0.0
-</span><span class="inferred1"><a name="line57"></a> 57 end
-</span><span class="inferred0"><a name="line58"></a> 58
-</span><span class="marked1"><a name="line59"></a> 59 def self.build_cached_data(report, grouping, limit, reporting_period, value)
-</span><span class="marked0"><a name="line60"></a> 60 self.new(
-</span><span class="inferred1"><a name="line61"></a> 61 :model_name => report.klass.to_s,
-</span><span class="inferred0"><a name="line62"></a> 62 :report_name => report.name.to_s,
-</span><span class="marked1"><a name="line63"></a> 63 :grouping => grouping.identifier.to_s,
-</span><span class="inferred0"><a name="line64"></a> 64 :aggregation => report.aggregation.to_s,
-</span><span class="inferred1"><a name="line65"></a> 65 :reporting_period => reporting_period.date_time,
-</span><span class="inferred0"><a name="line66"></a> 66 :value => value,
-</span><span class="inferred1"><a name="line67"></a> 67 :run_limit => limit
-</span><span class="inferred0"><a name="line68"></a> 68 )
-</span><span class="marked1"><a name="line69"></a> 69 end
-</span><span class="inferred0"><a name="line70"></a> 70
-</span><span class="marked1"><a name="line71"></a> 71 def self.find_cached_data(report, options, first_reporting_period, last_reporting_period)
-</span><span class="marked0"><a name="line72"></a> 72 conditions = [
-</span><span class="inferred1"><a name="line73"></a> 73 'model_name = ? AND report_name = ? AND grouping = ? AND aggregation = ? AND run_limit = ?',
-</span><span class="inferred0"><a name="line74"></a> 74 report.klass.to_s,
-</span><span class="inferred1"><a name="line75"></a> 75 report.name.to_s,
-</span><span class="marked0"><a name="line76"></a> 76 options[:grouping].identifier.to_s,
-</span><span class="inferred1"><a name="line77"></a> 77 report.aggregation.to_s,
-</span><span class="inferred0"><a name="line78"></a> 78 options[:limit]
-</span><span class="inferred1"><a name="line79"></a> 79 ]
-</span><span class="marked0"><a name="line80"></a> 80 if last_reporting_period
-</span><span class="marked1"><a name="line81"></a> 81 conditions.first << ' AND reporting_period BETWEEN ? AND ?'
-</span><span class="marked0"><a name="line82"></a> 82 conditions << first_reporting_period.date_time
-</span><span class="marked1"><a name="line83"></a> 83 conditions << last_reporting_period.date_time
-</span><span class="inferred0"><a name="line84"></a> 84 else
-</span><span class="marked1"><a name="line85"></a> 85 conditions.first << ' AND reporting_period >= ?'
-</span><span class="marked0"><a name="line86"></a> 86 conditions << first_reporting_period.date_time
-</span><span class="inferred1"><a name="line87"></a> 87 end
-</span><span class="marked0"><a name="line88"></a> 88 self.find(
-</span><span class="inferred1"><a name="line89"></a> 89 :all,
-</span><span class="inferred0"><a name="line90"></a> 90 :conditions => conditions,
-</span><span class="inferred1"><a name="line91"></a> 91 :limit => options[:limit],
-</span><span class="inferred0"><a name="line92"></a> 92 :order => 'reporting_period ASC'
-</span><span class="inferred1"><a name="line93"></a> 93 )
-</span><span class="inferred0"><a name="line94"></a> 94 end
-</span><span class="inferred1"><a name="line95"></a> 95
-</span><span class="inferred0"><a name="line96"></a> 96 end
-</span><span class="inferred1"><a name="line97"></a> 97
-</span><span class="inferred0"><a name="line98"></a> 98 end
-</span><span class="inferred1"><a name="line99"></a> 99
-</span><span class="inferred0"><a name="line100"></a>100 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
@@ -1,729 +0,0 @@
-<!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 19:33:53 +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'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>
- </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>
- </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="inferred0"><a name="line5"></a> 5 # The Report class that does all the data retrieval and calculations
-</span><span class="marked1"><a name="line6"></a> 6 class Report
-</span><span class="inferred0"><a name="line7"></a> 7
-</span><span class="marked1"><a name="line8"></a> 8 attr_reader :klass, :name, :date_column, :value_column, :aggregation, :options
-</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 # * <tt>klass</tt> - The model the report works on (This is the class you invoke Simplabs::ReportsAsSparkline::ClassMethods#reports_as_sparkline on)
-</span><span class="inferred1"><a name="line12"></a> 12 # * <tt>name</tt> - The name of the report (as in Simplabs::ReportsAsSparkline::ClassMethods#reports_as_sparkline)
-</span><span class="inferred0"><a name="line13"></a> 13 #
-</span><span class="inferred1"><a name="line14"></a> 14 # ==== Options
-</span><span class="inferred0"><a name="line15"></a> 15 #
-</span><span class="inferred1"><a name="line16"></a> 16 # * <tt>:date_column</tt> - The name of the date column over that the records are aggregated (defaults to <tt>created_at</tt>)
-</span><span class="inferred0"><a name="line17"></a> 17 # * <tt>:value_column</tt> - The name of the column that holds the values to sum up when using aggregation <tt>:sum</tt>
-</span><span class="inferred1"><a name="line18"></a> 18 # * <tt>:aggregation</tt> - The aggregation to use (one of <tt>:count</tt>, <tt>:sum</tt>, <tt>:minimum</tt>, <tt>:maximum</tt> or <tt>:average</tt>); when using anything other than <tt>:count</tt>, <tt>:value_column</tt> must also be specified (<b>If you really want to e.g. sum up the values in the <tt>id</tt> column, you have to explicitely say so.</b>); (defaults to <tt>:count</tt>)
-</span><span class="inferred0"><a name="line19"></a> 19 # * <tt>:grouping</tt> - The period records are grouped on (<tt>:hour</tt>, <tt>:day</tt>, <tt>:week</tt>, <tt>:month</tt>); <b>Beware that <tt>reports_as_sparkline</tt> treats weeks as starting on monday!</b>
-</span><span class="inferred1"><a name="line20"></a> 20 # * <tt>:limit</tt> - The number of reporting periods to get (see <tt>:grouping</tt>), (defaults to 100)
-</span><span class="inferred0"><a name="line21"></a> 21 # * <tt>:conditions</tt> - Conditions like in <tt>ActiveRecord::Base#find</tt>; only records that match the conditions are reported; <b>Beware that when conditions are specified, caching is disabled!</b>
-</span><span class="inferred1"><a name="line22"></a> 22 # * <tt>:live_data</tt> - Specifies whether data for the current reporting period is to be read; <b>if <tt>:live_data</tt> is <tt>true</tt>, you will experience a performance hit since the request cannot be satisfied from the cache only (defaults to <tt>false</tt>)</b>
-</span><span class="inferred0"><a name="line23"></a> 23 # * <tt>:end_date</tt> - When specified, the report will only include data for the <tt>:limit</tt> reporting periods until this date.
-</span><span class="marked1"><a name="line24"></a> 24 def initialize(klass, name, options = {})
-</span><span class="marked0"><a name="line25"></a> 25 ensure_valid_options(options)
-</span><span class="marked1"><a name="line26"></a> 26 @klass = klass
-</span><span class="marked0"><a name="line27"></a> 27 @name = name
-</span><span class="marked1"><a name="line28"></a> 28 @date_column = (options[:date_column] || 'created_at').to_s
-</span><span class="marked0"><a name="line29"></a> 29 @aggregation = options[:aggregation] || :count
-</span><span class="marked1"><a name="line30"></a> 30 @value_column = (options[:value_column] || (@aggregation == :count ? 'id' : name)).to_s
-</span><span class="marked0"><a name="line31"></a> 31 @options = {
-</span><span class="inferred1"><a name="line32"></a> 32 :limit => options[:limit] || 100,
-</span><span class="inferred0"><a name="line33"></a> 33 :conditions => options[:conditions] || [],
-</span><span class="marked1"><a name="line34"></a> 34 :grouping => Grouping.new(options[:grouping] || :day),
-</span><span class="inferred0"><a name="line35"></a> 35 :live_data => options[:live_data] || false,
-</span><span class="inferred1"><a name="line36"></a> 36 :end_date => options[:end_date] || false
-</span><span class="inferred0"><a name="line37"></a> 37 }
-</span><span class="marked1"><a name="line38"></a> 38 @options.merge!(options)
-</span><span class="marked0"><a name="line39"></a> 39 @options.freeze
-</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 # Runs the report and returns an array of array of DateTimes and Floats
-</span><span class="inferred0"><a name="line43"></a> 43 #
-</span><span class="inferred1"><a name="line44"></a> 44 # ==== Options
-</span><span class="inferred0"><a name="line45"></a> 45 # * <tt>:grouping</tt> - The period records are grouped on (<tt>:hour</tt>, <tt>:day</tt>, <tt>:week</tt>, <tt>:month</tt>); <b>Beware that <tt>reports_as_sparkline</tt> treats weeks as starting on monday!</b>
-</span><span class="inferred1"><a name="line46"></a> 46 # * <tt>:limit</tt> - The number of reporting periods to get (see <tt>:grouping</tt>), (defaults to 100)
-</span><span class="inferred0"><a name="line47"></a> 47 # * <tt>:conditions</tt> - Conditions like in <tt>ActiveRecord::Base#find</tt>; only records that match the conditions are reported; <b>Beware that when conditions are specified, caching is disabled!</b>
-</span><span class="inferred1"><a name="line48"></a> 48 # * <tt>:live_data</tt> - Specifies whether data for the current reporting period is to be read; <b>if <tt>:live_data</tt> is <tt>true</tt>, you will experience a performance hit since the request cannot be satisfied from the cache only (defaults to <tt>false</tt>)</b>
-</span><span class="inferred0"><a name="line49"></a> 49 # * <tt>:end_date</tt> - When specified, the report will only include data for the <tt>:limit</tt> reporting periods until this date.
-</span><span class="marked1"><a name="line50"></a> 50 def run(options = {})
-</span><span class="marked0"><a name="line51"></a> 51 custom_conditions = options.key?(:conditions)
-</span><span class="marked1"><a name="line52"></a> 52 options = options_for_run(options)
-</span><span class="marked0"><a name="line53"></a> 53 ReportCache.process(self, options, !custom_conditions) do |begin_at, end_at|
-</span><span class="marked1"><a name="line54"></a> 54 read_data(begin_at, end_at, options)
-</span><span class="inferred0"><a name="line55"></a> 55 end
-</span><span class="inferred1"><a name="line56"></a> 56 end
-</span><span class="inferred0"><a name="line57"></a> 57
-</span><span class="marked1"><a name="line58"></a> 58 private
-</span><span class="inferred0"><a name="line59"></a> 59
-</span><span class="marked1"><a name="line60"></a> 60 def options_for_run(options = {})
-</span><span class="marked0"><a name="line61"></a> 61 options = options.dup
-</span><span class="marked1"><a name="line62"></a> 62 ensure_valid_options(options, :run)
-</span><span class="marked0"><a name="line63"></a> 63 options.reverse_merge!(@options)
-</span><span class="marked1"><a name="line64"></a> 64 options[:grouping] = Grouping.new(options[:grouping]) unless options[:grouping].is_a?(Grouping)
-</span><span class="marked0"><a name="line65"></a> 65 return options
-</span><span class="inferred1"><a name="line66"></a> 66 end
-</span><span class="inferred0"><a name="line67"></a> 67
-</span><span class="marked1"><a name="line68"></a> 68 def read_data(begin_at, end_at, options)
-</span><span class="marked0"><a name="line69"></a> 69 conditions = setup_conditions(begin_at, end_at, options[:conditions])
-</span><span class="marked1"><a name="line70"></a> 70 @klass.send(@aggregation,
-</span><span class="inferred0"><a name="line71"></a> 71 @value_column,
-</span><span class="inferred1"><a name="line72"></a> 72 :conditions => conditions,
-</span><span class="marked0"><a name="line73"></a> 73 :group => options[:grouping].to_sql(@date_column),
-</span><span class="marked1"><a name="line74"></a> 74 :order => "#{options[:grouping].to_sql(@date_column)} ASC"
-</span><span class="inferred0"><a name="line75"></a> 75 )
-</span><span class="inferred1"><a name="line76"></a> 76 end
-</span><span class="inferred0"><a name="line77"></a> 77
-</span><span class="marked1"><a name="line78"></a> 78 def setup_conditions(begin_at, end_at, custom_conditions = [])
-</span><span class="marked0"><a name="line79"></a> 79 conditions = [@klass.send(:sanitize_sql_for_conditions, custom_conditions) || '']
-</span><span class="marked1"><a name="line80"></a> 80 conditions[0] += "#{(conditions[0].blank? ? '' : ' AND ')}#{ActiveRecord::Base.connection.quote_table_name(@klass.table_name)}.#{ActiveRecord::Base.connection.quote_column_name(@date_column.to_s)} "
-</span><span class="marked0"><a name="line81"></a> 81 conditions[0] += if begin_at && end_at
-</span><span class="marked1"><a name="line82"></a> 82 'BETWEEN ? AND ?'
-</span><span class="marked0"><a name="line83"></a> 83 elsif begin_at
-</span><span class="marked1"><a name="line84"></a> 84 '>= ?'
-</span><span class="marked0"><a name="line85"></a> 85 elsif end_at
-</span><span class="marked1"><a name="line86"></a> 86 '<= ?'
-</span><span class="inferred0"><a name="line87"></a> 87 else
-</span><span class="marked1"><a name="line88"></a> 88 raise ArgumentError.new('You must pass either begin_at, end_at or both to setup_conditions.')
-</span><span class="inferred0"><a name="line89"></a> 89 end
-</span><span class="marked1"><a name="line90"></a> 90 conditions << begin_at if begin_at
-</span><span class="marked0"><a name="line91"></a> 91 conditions << end_at if end_at
-</span><span class="marked1"><a name="line92"></a> 92 conditions
-</span><span class="inferred0"><a name="line93"></a> 93 end
-</span><span class="inferred1"><a name="line94"></a> 94
-</span><span class="marked0"><a name="line95"></a> 95 def ensure_valid_options(options, context = :initialize)
-</span><span class="marked1"><a name="line96"></a> 96 case context
-</span><span class="marked0"><a name="line97"></a> 97 when :initialize
-</span><span class="marked1"><a name="line98"></a> 98 options.each_key do |k|
-</span><span class="marked0"><a name="line99"></a> 99 raise ArgumentError.new("Invalid option #{k}!") unless [:limit, :aggregation, :grouping, :date_column, :value_column, :conditions, :live_data, :end_date].include?(k)
-</span><span class="inferred1"><a name="line100"></a>100 end
-</span><span class="marked0"><a name="line101"></a>101 raise ArgumentError.new("Invalid aggregation #{options[:aggregation]}!") if options[:aggregation] && ![:count, :sum, :maximum, :minimum, :average].include?(options[:aggregation])
-</span><span class="marked1"><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]) && !options.key?(:value_column)
-</span><span class="marked0"><a name="line103"></a>103 when :run
-</span><span class="marked1"><a name="line104"></a>104 options.each_key do |k|
-</span><span class="marked0"><a name="line105"></a>105 raise ArgumentError.new("Invalid option #{k}!") unless [:limit, :conditions, :grouping, :live_data, :end_date].include?(k)
-</span><span class="inferred1"><a name="line106"></a>106 end
-</span><span class="inferred0"><a name="line107"></a>107 end
-</span><span class="marked1"><a name="line108"></a>108 raise ArgumentError.new('Options :live_data and :end_date may not both be specified!') if options[:live_data] && options[:end_date]
-</span><span class="marked0"><a name="line109"></a>109 raise ArgumentError.new("Invalid grouping #{options[:grouping]}!") if options[:grouping] && ![:hour, :day, :week, :month].include?(options[:grouping])
-</span><span class="marked1"><a name="line110"></a>110 raise ArgumentError.new("Invalid conditions: #{options[:conditions].inspect}!") if options[:conditions] && !options[:conditions].is_a?(Array) && !options[:conditions].is_a?(Hash)
-</span><span class="marked0"><a name="line111"></a>111 raise ArgumentError.new("Invalid end date: #{options[:end_date].inspect}; must be a DateTime!") if options[:end_date] && !options[:end_date].is_a?(DateTime) && !options[:end_date].is_a?(Time)
-</span><span class="marked1"><a name="line112"></a>112 raise ArgumentError.new('End date may not be in the future!') if options[:end_date] && options[:end_date] > DateTime.now
-</span><span class="inferred0"><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-reporting_period_rb.html b/doc/coverage/lib-simplabs-reports_as_sparkline-reporting_period_rb.html
@@ -1,703 +0,0 @@
-<!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 19:33:53 +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'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>93</tt>
- </td>
- <td class='lines_code'><tt>76</tt>
- </td>
- <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_total'>95.7%</tt>
- </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>
- </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 #:nodoc:
-</span><span class="inferred0"><a name="line4"></a> 4
-</span><span class="marked1"><a name="line5"></a> 5 class ReportingPeriod #:nodoc:
-</span><span class="inferred0"><a name="line6"></a> 6
-</span><span class="marked1"><a name="line7"></a> 7 attr_reader :date_time, :grouping
-</span><span class="inferred0"><a name="line8"></a> 8
-</span><span class="marked1"><a name="line9"></a> 9 def initialize(grouping, date_time = nil)
-</span><span class="marked0"><a name="line10"></a>10 @grouping = grouping
-</span><span class="marked1"><a name="line11"></a>11 @date_time = parse_date_time(date_time || DateTime.now)
-</span><span class="inferred0"><a name="line12"></a>12 end
-</span><span class="inferred1"><a name="line13"></a>13
-</span><span class="marked0"><a name="line14"></a>14 def self.first(grouping, limit, end_date = nil)
-</span><span class="marked1"><a name="line15"></a>15 self.new(grouping, end_date).offset(-limit)
-</span><span class="marked0"><a name="line16"></a>16 end
-</span><span class="inferred1"><a name="line17"></a>17
-</span><span class="marked0"><a name="line18"></a>18 def self.from_db_string(grouping, db_string)
-</span><span class="marked1"><a name="line19"></a>19 parts = grouping.date_parts_from_db_string(db_string)
-</span><span class="marked0"><a name="line20"></a>20 result = case grouping.identifier
-</span><span class="marked1"><a name="line21"></a>21 when :hour
-</span><span class="marked0"><a name="line22"></a>22 self.new(grouping, DateTime.new(parts[0], parts[1], parts[2], parts[3], 0, 0))
-</span><span class="marked1"><a name="line23"></a>23 when :day
-</span><span class="marked0"><a name="line24"></a>24 self.new(grouping, Date.new(parts[0], parts[1], parts[2]))
-</span><span class="marked1"><a name="line25"></a>25 when :week
-</span><span class="marked0"><a name="line26"></a>26 self.new(grouping, Date.commercial(parts[0], parts[1], 1))
-</span><span class="marked1"><a name="line27"></a>27 when :month
-</span><span class="marked0"><a name="line28"></a>28 self.new(grouping, Date.new(parts[0], parts[1], 1))
-</span><span class="inferred1"><a name="line29"></a>29 end
-</span><span class="marked0"><a name="line30"></a>30 result
-</span><span class="inferred1"><a name="line31"></a>31 end
-</span><span class="inferred0"><a name="line32"></a>32
-</span><span class="marked1"><a name="line33"></a>33 def next
-</span><span class="marked0"><a name="line34"></a>34 self.offset(1)
-</span><span class="marked1"><a name="line35"></a>35 end
-</span><span class="inferred0"><a name="line36"></a>36
-</span><span class="marked1"><a name="line37"></a>37 def previous
-</span><span class="marked0"><a name="line38"></a>38 self.offset(-1)
-</span><span class="marked1"><a name="line39"></a>39 end
-</span><span class="inferred0"><a name="line40"></a>40
-</span><span class="marked1"><a name="line41"></a>41 def offset(offset)
-</span><span class="marked0"><a name="line42"></a>42 self.class.new(@grouping, @date_time + offset.send(@grouping.identifier))
-</span><span class="marked1"><a name="line43"></a>43 end
-</span><span class="inferred0"><a name="line44"></a>44
-</span><span class="marked1"><a name="line45"></a>45 def ==(other)
-</span><span class="marked0"><a name="line46"></a>46 if other.class == Simplabs::ReportsAsSparkline::ReportingPeriod
-</span><span class="marked1"><a name="line47"></a>47 return @date_time.to_s == other.date_time.to_s && @grouping.identifier.to_s == other.grouping.identifier.to_s
-</span><span class="inferred0"><a name="line48"></a>48 end
-</span><span class="uncovered1"><a name="line49"></a>49 false
-</span><span class="uncovered0"><a name="line50"></a>50 end
-</span><span class="inferred1"><a name="line51"></a>51
-</span><span class="marked0"><a name="line52"></a>52 def <(other)
-</span><span class="marked1"><a name="line53"></a>53 if other.class == Simplabs::ReportsAsSparkline::ReportingPeriod
-</span><span class="marked0"><a name="line54"></a>54 return @date_time < other.date_time
-</span><span class="inferred1"><a name="line55"></a>55 end
-</span><span class="uncovered0"><a name="line56"></a>56 raise ArgumentError.new("Can only compare instances of #{Simplabs::ReportsAsSparkline::ReportingPeriod.klass}")
-</span><span class="uncovered1"><a name="line57"></a>57 end
-</span><span class="inferred0"><a name="line58"></a>58
-</span><span class="marked1"><a name="line59"></a>59 def last_date_time
-</span><span class="marked0"><a name="line60"></a>60 case @grouping.identifier
-</span><span class="marked1"><a name="line61"></a>61 when :hour
-</span><span class="marked0"><a name="line62"></a>62 DateTime.new(@date_time.year, @date_time.month, @date_time.day, @date_time.hour, 59, 59)
-</span><span class="marked1"><a name="line63"></a>63 when :day
-</span><span class="marked0"><a name="line64"></a>64 DateTime.new(@date_time.year, @date_time.month, @date_time.day, 23, 59, 59)
-</span><span class="marked1"><a name="line65"></a>65 when :week
-</span><span class="marked0"><a name="line66"></a>66 date_time = (@date_time - @date_time.wday.days) + 7.days
-</span><span class="marked1"><a name="line67"></a>67 Date.new(date_time.year, date_time.month, date_time.day)
-</span><span class="marked0"><a name="line68"></a>68 when :month
-</span><span class="marked1"><a name="line69"></a>69 Date.new(@date_time.year, @date_time.month, (Date.new(@date_time.year, 12, 31) << (12 - @date_time.month)).day)
-</span><span class="inferred0"><a name="line70"></a>70 end
-</span><span class="marked1"><a name="line71"></a>71 end
-</span><span class="inferred0"><a name="line72"></a>72
-</span><span class="marked1"><a name="line73"></a>73 private
-</span><span class="inferred0"><a name="line74"></a>74
-</span><span class="marked1"><a name="line75"></a>75 def parse_date_time(date_time)
-</span><span class="marked0"><a name="line76"></a>76 case @grouping.identifier
-</span><span class="marked1"><a name="line77"></a>77 when :hour
-</span><span class="marked0"><a name="line78"></a>78 DateTime.new(date_time.year, date_time.month, date_time.day, date_time.hour)
-</span><span class="marked1"><a name="line79"></a>79 when :day
-</span><span class="marked0"><a name="line80"></a>80 date_time.to_date
-</span><span class="marked1"><a name="line81"></a>81 when :week
-</span><span class="marked0"><a name="line82"></a>82 date_time = (date_time - date_time.wday.days) + 1.day
-</span><span class="marked1"><a name="line83"></a>83 Date.new(date_time.year, date_time.month, date_time.day)
-</span><span class="marked0"><a name="line84"></a>84 when :month
-</span><span class="marked1"><a name="line85"></a>85 Date.new(date_time.year, date_time.month, 1)
-</span><span class="inferred0"><a name="line86"></a>86 end
-</span><span class="marked1"><a name="line87"></a>87 end
-</span><span class="inferred0"><a name="line88"></a>88
-</span><span class="inferred1"><a name="line89"></a>89 end
-</span><span class="inferred0"><a name="line90"></a>90
-</span><span class="inferred1"><a name="line91"></a>91 end
-</span><span class="inferred0"><a name="line92"></a>92
-</span><span class="inferred1"><a name="line93"></a>93 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
@@ -1,649 +0,0 @@
-<!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 19:33:53 +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'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>
- </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>
- </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 # * <tt>data</tt> - The data to render the sparkline for, is retrieved from a report like <tt>User.registration_report</tt>
-</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 # * <tt>width</tt> - The width of the generated image
-</span><span class="inferred1"><a name="line16"></a>16 # * <tt>height</tt> - The height of the generated image
-</span><span class="inferred0"><a name="line17"></a>17 # * <tt>line_color</tt> - The line color of the sparkline (hex code)
-</span><span class="inferred1"><a name="line18"></a>18 # * <tt>fill_color</tt> - The color to fill the area below the sparkline with (hex code)
-</span><span class="inferred0"><a name="line19"></a>19 # * <tt>labels</tt> - The axes to render lables for (Array of <tt>:x</tt>, <tt>:y+</tt>, <tt>:r</tt>, <tt>:t</tt>; 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 # <tt><%= sparkline_tag(User.registrations_report, :width => 200, :height => 100, :color => '000') %></tt>
-</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 => 300, :height => 34, :line_color => '0077cc', :fill_color => 'e6f2fa', :labels => [] })
-</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 = ""
-</span><span class="marked0"><a name="line27"></a>27 unless options[:labels].empty?
-</span><span class="marked1"><a name="line28"></a>28 labels = "&chxt=#{options[:labels].map(&:to_s).join(',')}&chxr=0,0,#{data.length}|1,0,#{data.max}|2,0,#{data.max}|3,0,#{data.length}"
-</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 "http://chart.apis.google.com/chart?cht=ls&chs=#{options[:width]}x#{options[:height]}&chd=t:#{data.join(',')}&chco=#{options[:line_color]}&chm=B,#{options[:fill_color]},0,0,0&chls=1,0,0&chds=#{data.min},#{data.max}#{labels}"
-</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
@@ -1,669 +0,0 @@
-<!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 19:33:53 +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'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>59</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>
- </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>
- </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 <tt><name>_report</tt> (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 # * <tt>name</tt> - The name of the report, defines the name of the generated report method (<tt><name>_report</tt>)
-</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 # * <tt>:date_column</tt> - The name of the date column over that the records are aggregated (defaults to <tt>created_at</tt>)
-</span><span class="inferred0"><a name="line20"></a>20 # * <tt>:value_column</tt> - The name of the column that holds the values to sum up when using aggregation <tt>:sum</tt>
-</span><span class="inferred1"><a name="line21"></a>21 # * <tt>:aggregation</tt> - The aggregation to use (one of <tt>:count</tt>, <tt>:sum</tt>, <tt>:minimum</tt>, <tt>:maximum</tt> or <tt>:average</tt>); when using anything other than <tt>:count</tt>, <tt>:value_column</tt> must also be specified (<b>If you really want to e.g. sum up the values in the <tt>id</tt> column, you have to explicitely say so.</b>); (defaults to <tt>:count</tt>)
-</span><span class="inferred0"><a name="line22"></a>22 # * <tt>:grouping</tt> - The period records are grouped on (<tt>:hour</tt>, <tt>:day</tt>, <tt>:week</tt>, <tt>:month</tt>); <b>Beware that <tt>reports_as_sparkline</tt> treats weeks as starting on monday!</b>
-</span><span class="inferred1"><a name="line23"></a>23 # * <tt>:limit</tt> - The number of reporting periods to get (see <tt>:grouping</tt>), (defaults to 100)
-</span><span class="inferred0"><a name="line24"></a>24 # * <tt>:conditions</tt> - Conditions like in <tt>ActiveRecord::Base#find</tt>; only records that match the conditions are reported; <b>Beware that when conditions are specified, caching is disabled!</b>
-</span><span class="inferred1"><a name="line25"></a>25 # * <tt>:live_data</tt> - Specifies whether data for the current reporting period is to be read; <b>if <tt>:live_data</tt> is <tt>true</tt>, you will experience a performance hit since the request cannot be satisfied from the cache only (defaults to <tt>false</tt>)</b>
-</span><span class="inferred0"><a name="line26"></a>26 # * <tt>:end_date</tt> - When specified, the report will only include data for the <tt>:limit</tt> reporting periods until 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 < 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 => true
-</span><span class="inferred1"><a name="line33"></a>33 # end
-</span><span class="inferred0"><a name="line34"></a>34 #
-</span><span class="inferred1"><a name="line35"></a>35 # class User < ActiveRecord::Base
-</span><span class="inferred0"><a name="line36"></a>36 # reports_as_sparkline :registrations, :aggregation => :count
-</span><span class="inferred1"><a name="line37"></a>37 # reports_as_sparkline :activations, :aggregation => :count, :date_column => :activated_at
-</span><span class="inferred0"><a name="line38"></a>38 # reports_as_sparkline :total_users, :cumulate => true
-</span><span class="inferred1"><a name="line39"></a>39 # reports_as_sparkline :rake, :aggregation => :sum, :value_column => :profile_visits
-</span><span class="inferred0"><a name="line40"></a>40 # end
-</span><span class="marked1"><a name="line41"></a>41 def reports_as_sparkline(name, options = {})
-</span><span class="marked0"><a name="line42"></a>42 (class << self; self; end).instance_eval do
-</span><span class="marked1"><a name="line43"></a>43 define_method "#{name.to_s}_report".to_sym do |*args|
-</span><span class="marked0"><a name="line44"></a>44 if options.delete(:cumulate)
-</span><span class="uncovered1"><a name="line45"></a>45 report = Simplabs::ReportsAsSparkline::CumulatedReport.new(self, name, options)
-</span><span class="inferred0"><a name="line46"></a>46 else
-</span><span class="marked1"><a name="line47"></a>47 report = Simplabs::ReportsAsSparkline::Report.new(self, name, options)
-</span><span class="inferred0"><a name="line48"></a>48 end
-</span><span class="marked1"><a name="line49"></a>49 raise ArgumentError.new unless args.length == 0 || (args.length == 1 && args[0].is_a?(Hash))
-</span><span class="marked0"><a name="line50"></a>50 report.run(args.length == 0 ? {} : args[0])
-</span><span class="inferred1"><a name="line51"></a>51 end
-</span><span class="inferred0"><a name="line52"></a>52 end
-</span><span class="marked1"><a name="line53"></a>53 end
-</span><span class="inferred0"><a name="line54"></a>54
-</span><span class="inferred1"><a name="line55"></a>55 end
-</span><span class="inferred0"><a name="line56"></a>56
-</span><span class="inferred1"><a name="line57"></a>57 end
-</span><span class="inferred0"><a name="line58"></a>58
-</span><span class="inferred1"><a name="line59"></a>59 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/spec.html b/doc/spec.html
@@ -1,1093 +0,0 @@
-<?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"> </p>
- <p id="duration"> </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 "%Y/%m/%d/%H" 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 "%Y/%m/%d" 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 "%Y/%m" 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 "hour" 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 "day" 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 "week" 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 "month" 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 "%Y/%m/%d/%H" 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 "%Y/%m/%d" 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 "weekday 0" 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 "%Y/%m" 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 "-" 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 "-" 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 "-" 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 "-" 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 "-" 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 >= 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 <= 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>38.701549 seconds</strong>";</script>
-<script type="text/javascript">document.getElementById('totals').innerHTML = "268 examples, 0 failures";</script>
-</div>
-</div>
-</body>
-</html>