| updated README and rdoc - reportable - Fork of reportable required by WarVox, f… | |
| Log | |
| Files | |
| Refs | |
| README | |
| --- | |
| commit d69bc19b984ee8f2502dc9205fa63d443bf72a8d | |
| parent 302078c74c8857b4e0aab259fc7d2c79489d7d73 | |
| Author: Marco Otte-Witte <[email protected]> | |
| Date: Tue, 13 Jan 2009 23:36:02 +0800 | |
| updated README and rdoc | |
| Signed-off-by: Marco Otte-Witte <[email protected]> | |
| Diffstat: | |
| M README.rdoc | 4 ++-- | |
| M rdoc/classes/Kvlr/ReportsAsSparkli… | 28 ++++++++++++++-------------- | |
| M rdoc/classes/Kvlr/ReportsAsSparkli… | 2 +- | |
| M rdoc/classes/Kvlr/ReportsAsSparkli… | 30 +++++++++++++++------------… | |
| M rdoc/classes/Kvlr/ReportsAsSparkli… | 66 ++++++++++++++++-----------… | |
| M rdoc/created.rid | 2 +- | |
| M rdoc/files/README_rdoc.html | 6 +++--- | |
| M rdoc/files/lib/kvlr/core_extension… | 2 +- | |
| M rdoc/files/lib/kvlr/reports_as_spa… | 2 +- | |
| M rdoc/files/lib/kvlr/reports_as_spa… | 2 +- | |
| M rdoc/files/lib/kvlr/reports_as_spa… | 2 +- | |
| M rdoc/files/lib/kvlr/reports_as_spa… | 2 +- | |
| M rdoc/files/lib/kvlr/reports_as_spa… | 2 +- | |
| M rdoc/files/lib/kvlr/reports_as_spa… | 2 +- | |
| M rdoc/files/lib/kvlr/reports_as_spa… | 2 +- | |
| M rdoc/fr_method_index.html | 4 ++-- | |
| 16 files changed, 80 insertions(+), 78 deletions(-) | |
| --- | |
| diff --git a/README.rdoc b/README.rdoc | |
| @@ -8,8 +8,8 @@ This shows the basic usage. Consider the following user model, … | |
| class User < ActiveRecord::Base | |
| report_as_sparkline :registrations | |
| - report_as_sparkline :activations, :date_column_name => :activated_at | |
| - report_as_sparkline :total_users, :cumulate => true | |
| + report_as_sparkline :activations, :date_column => :activated_at | |
| + report_as_sparkline :total_users, :cumulate => true | |
| end | |
| Using +report_as_sparkline+ like this will add the following class methods to … | |
| diff --git a/rdoc/classes/Kvlr/ReportsAsSparkline/ClassMethods.html b/rdoc/clas… | |
| @@ -80,7 +80,7 @@ | |
| <h3 class="section-bar">Methods</h3> | |
| <div class="name-list"> | |
| - <a href="#M000001">report_as_sparkline</a> | |
| + <a href="#M000001">reports_as_sparkline</a> | |
| </div> | |
| </div> | |
| @@ -107,7 +107,7 @@ | |
| <div class="method-heading"> | |
| <a href="#M000001" class="method-signature"> | |
| - <span class="method-name">report_as_sparkline</span><span class="met… | |
| + <span class="method-name">reports_as_sparkline</span><span class="me… | |
| </a> | |
| </div> | |
| @@ -126,16 +126,16 @@ report method (<name>_report) | |
| </ul> | |
| <h4>Options</h4> | |
| <ul> | |
| -<li><tt>:date_column_name</tt> - The name of the date column on that the | |
| -records are aggregated | |
| +<li><tt>:date_column</tt> - The name of the date column on that the records are | |
| +aggregated | |
| </li> | |
| -<li><tt>:value_column_name</tt> - The name of the column that holds the value | |
| -to sum for aggregation :sum | |
| +<li><tt>:value_column</tt> - The name of the column that holds the value to sum | |
| +for aggregation :sum | |
| </li> | |
| <li><tt>:aggregation</tt> - The aggregation to use (either :count or :sum); | |
| -when using :sum, :value_column_name must also be specified | |
| +when using :sum, :value_column must also be specified | |
| </li> | |
| <li><tt>:grouping</tt> - The period records are grouped on (:hour, :day, :week, | |
| @@ -153,14 +153,14 @@ records that match there conditions are reported on | |
| <h4>Examples</h4> | |
| <pre> | |
| class Game < ActiveRecord::Base | |
| - report_as_sparkline :games_per_day | |
| - report_as_sparkline :games_played_total, :cumulate => true | |
| + reports_as_sparkline :games_per_day | |
| + reports_as_sparkline :games_played_total, :cumulate => true | |
| end | |
| class User < ActiveRecord::Base | |
| - report_as_sparkline :registrations, :operation => :count | |
| - report_as_sparkline :activations, :date_column_name => :activated_at, :o… | |
| - report_as_sparkline :total_users_report, :cumulate => true | |
| - report_as_sparkline :rake, :aggregation => :sum, :value_column_name =>… | |
| + reports_as_sparkline :registrations, :operation => :count | |
| + reports_as_sparkline :activations, :date_column => :activated_at, :opera… | |
| + reports_as_sparkline :total_users_report, :cumulate => true | |
| + reports_as_sparkline :rake, :aggregation => :sum, :value_column => :p… | |
| end | |
| </pre> | |
| <p><a class="source-toggle" href="#" | |
| @@ -168,7 +168,7 @@ records that match there conditions are reported on | |
| <div class="method-source-code" id="M000001-source"> | |
| <pre> | |
| <span class="ruby-comment cmt"># File lib/kvlr/reports_as_sparkline.rb, li… | |
| -38: <span class="ruby-keyword kw">def</span> <span class="ruby-identifie… | |
| +38: <span class="ruby-keyword kw">def</span> <span class="ruby-identifie… | |
| 39: (<span class="ruby-keyword kw">class</span> <span class="ruby-oper… | |
| 40: <span class="ruby-identifier">define_method</span> <span class="… | |
| 41: <span class="ruby-keyword kw">if</span> <span class="ruby-iden… | |
| diff --git a/rdoc/classes/Kvlr/ReportsAsSparkline/Grouping.html b/rdoc/classes/… | |
| @@ -139,7 +139,7 @@ href="Grouping.html#M000005">identifier</a> of the grouping… | |
| <pre> | |
| <span class="ruby-comment cmt"># File lib/kvlr/reports_as_sparkline/groupi… | |
| 10: <span class="ruby-keyword kw">def</span> <span class="ruby-identifie… | |
| -11: <span class="ruby-identifier">raise</span> <span class="ruby-const… | |
| +11: <span class="ruby-identifier">raise</span> <span class="ruby-const… | |
| 12: <span class="ruby-ivar">@identifier</span> = <span class="ruby-ide… | |
| 13: <span class="ruby-keyword kw">end</span> | |
| </pre> | |
| diff --git a/rdoc/classes/Kvlr/ReportsAsSparkline/Report.html b/rdoc/classes/Kv… | |
| @@ -120,7 +120,7 @@ and calculations | |
| <td class="context-item-desc"></td> | |
| </tr> | |
| <tr class="top-aligned-row context-row"> | |
| - <td class="context-item-name">date_column_name</td> | |
| + <td class="context-item-name">date_column</td> | |
| <td class="context-item-value"> [R] </td> | |
| <td class="context-item-desc"></td> | |
| </tr> | |
| @@ -140,7 +140,7 @@ and calculations | |
| <td class="context-item-desc"></td> | |
| </tr> | |
| <tr class="top-aligned-row context-row"> | |
| - <td class="context-item-name">value_column_name</td> | |
| + <td class="context-item-name">value_column</td> | |
| <td class="context-item-value"> [R] </td> | |
| <td class="context-item-desc"></td> | |
| </tr> | |
| @@ -168,27 +168,27 @@ and calculations | |
| <ul> | |
| <li><tt>klass</tt> - The model the report works on (This is the class you | |
| invoke <a | |
| -href="ClassMethods.html#M000001">Kvlr::ReportsAsSparkline::ClassMethods#report… | |
| +href="ClassMethods.html#M000001">Kvlr::ReportsAsSparkline::ClassMethods#report… | |
| on) | |
| </li> | |
| <li><tt>name</tt> - The name of the report (as in <a | |
| -href="ClassMethods.html#M000001">Kvlr::ReportsAsSparkline::ClassMethods#report… | |
| +href="ClassMethods.html#M000001">Kvlr::ReportsAsSparkline::ClassMethods#report… | |
| </li> | |
| </ul> | |
| <h4>Options</h4> | |
| <ul> | |
| -<li><tt>:date_column_name</tt> - The name of the date column on that the | |
| -records are aggregated | |
| +<li><tt>:date_column</tt> - The name of the date column on that the records are | |
| +aggregated | |
| </li> | |
| -<li><tt>:value_column_name</tt> - The name of the column that holds the value | |
| -to sum for aggregation :sum | |
| +<li><tt>:value_column</tt> - The name of the column that holds the value to sum | |
| +for aggregation :sum | |
| </li> | |
| <li><tt>:aggregation</tt> - The aggregation to use (either :count or :sum); | |
| -when using :sum, :value_column_name must also be specified | |
| +when using :sum, :value_column must also be specified | |
| </li> | |
| <li><tt>:grouping</tt> - The period records are grouped on (:hour, :day, :week, | |
| @@ -210,12 +210,12 @@ records that match there conditions are reported on | |
| <span class="ruby-comment cmt"># File lib/kvlr/reports_as_sparkline/report… | |
| 22: <span class="ruby-keyword kw">def</span> <span class="ruby-identifie… | |
| 23: <span class="ruby-identifier">ensure_valid_options</span>(<span cl… | |
| -24: <span class="ruby-ivar">@klass</span> = <span class="r… | |
| -25: <span class="ruby-ivar">@name</span> = <span class="r… | |
| -26: <span class="ruby-ivar">@date_column_name</span> = (<span class="… | |
| -27: <span class="ruby-ivar">@value_column_name</span> = (<span class="… | |
| -28: <span class="ruby-ivar">@aggregation</span> = <span class="r… | |
| -29: <span class="ruby-ivar">@grouping</span> = <span class="r… | |
| +24: <span class="ruby-ivar">@klass</span> = <span class="ruby-i… | |
| +25: <span class="ruby-ivar">@name</span> = <span class="ruby-i… | |
| +26: <span class="ruby-ivar">@date_column</span> = (<span class="ruby-… | |
| +27: <span class="ruby-ivar">@value_column</span> = (<span class="ruby-… | |
| +28: <span class="ruby-ivar">@aggregation</span> = <span class="ruby-i… | |
| +29: <span class="ruby-ivar">@grouping</span> = <span class="ruby-c… | |
| 30: <span class="ruby-ivar">@options</span> = { | |
| 31: <span class="ruby-identifier">:limit</span> =<span c… | |
| 32: <span class="ruby-identifier">:conditions</span> =<span c… | |
| diff --git a/rdoc/classes/Kvlr/ReportsAsSparkline/ReportingPeriod.html b/rdoc/c… | |
| @@ -96,7 +96,7 @@ month or a year. All records falling into this period will be… | |
| <div class="name-list"> | |
| <a href="#M000007">first</a> | |
| <a href="#M000006">new</a> | |
| - <a href="#M000008">previous</a> | |
| + <a href="#M000008">next</a> | |
| </div> | |
| </div> | |
| @@ -151,7 +151,8 @@ Returns the <a href="ReportingPeriod.html#M000007">first</a… | |
| period for a grouping and a limit; e.g. the <a | |
| href="ReportingPeriod.html#M000007">first</a> reporting period for <a | |
| href="Grouping.html">Grouping</a> :day and limit 2 would be Time.now - | |
| -2.days | |
| +1.days (since limit is 2, 2 reporting periods are included in the range, | |
| +that is yesterday and today) | |
| </p> | |
| <h4>Parameters</h4> | |
| <ul> | |
| @@ -169,20 +170,20 @@ href="ReportingPeriod.html#M000007">first</a> one | |
| onclick="toggleCode('M000007-source');return false;">[Source]</a><… | |
| <div class="method-source-code" id="M000007-source"> | |
| <pre> | |
| - <span class="ruby-comment cmt"># File lib/kvlr/reports_as_sparkline/report… | |
| -23: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword k… | |
| -24: <span class="ruby-keyword kw">return</span> <span class="ruby-keyw… | |
| -25: <span class="ruby-keyword kw">when</span> <span class="ruby-iden… | |
| -26: <span class="ruby-keyword kw">self</span>.<span class="ruby-id… | |
| -27: <span class="ruby-keyword kw">when</span> <span class="ruby-iden… | |
| -28: <span class="ruby-keyword kw">self</span>.<span class="ruby-id… | |
| -29: <span class="ruby-keyword kw">when</span> <span class="ruby-iden… | |
| -30: <span class="ruby-keyword kw">self</span>.<span class="ruby-id… | |
| -31: <span class="ruby-keyword kw">when</span> <span class="ruby-iden… | |
| -32: <span class="ruby-identifier">date</span> = <span class="ruby-… | |
| -33: <span class="ruby-keyword kw">self</span>.<span class="ruby-id… | |
| -34: <span class="ruby-keyword kw">end</span> | |
| -35: <span class="ruby-keyword kw">end</span> | |
| + <span class="ruby-comment cmt"># File lib/kvlr/reports_as_sparkline/report… | |
| +24: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword k… | |
| +25: <span class="ruby-keyword kw">return</span> <span class="ruby-keyw… | |
| +26: <span class="ruby-keyword kw">when</span> <span class="ruby-iden… | |
| +27: <span class="ruby-keyword kw">self</span>.<span class="ruby-id… | |
| +28: <span class="ruby-keyword kw">when</span> <span class="ruby-iden… | |
| +29: <span class="ruby-keyword kw">self</span>.<span class="ruby-id… | |
| +30: <span class="ruby-keyword kw">when</span> <span class="ruby-iden… | |
| +31: <span class="ruby-keyword kw">self</span>.<span class="ruby-id… | |
| +32: <span class="ruby-keyword kw">when</span> <span class="ruby-iden… | |
| +33: <span class="ruby-identifier">date</span> = <span class="ruby-… | |
| +34: <span class="ruby-keyword kw">self</span>.<span class="ruby-id… | |
| +35: <span class="ruby-keyword kw">end</span> | |
| +36: <span class="ruby-keyword kw">end</span> | |
| </pre> | |
| </div> | |
| </div> | |
| @@ -230,32 +231,33 @@ reporting period | |
| <div class="method-heading"> | |
| <a href="#M000008" class="method-signature"> | |
| - <span class="method-name">previous</span><span class="method-args">(… | |
| + <span class="method-name">next</span><span class="method-args">()</s… | |
| </a> | |
| </div> | |
| <div class="method-description"> | |
| <p> | |
| -Returns the <a href="ReportingPeriod.html#M000008">previous</a> reporting | |
| -period | |
| +Returns the <a href="ReportingPeriod.html#M000008">next</a> reporting | |
| +period (that is <a href="ReportingPeriod.html#M000008">next</a> | |
| +hour/day/month/year) | |
| </p> | |
| <p><a class="source-toggle" href="#" | |
| onclick="toggleCode('M000008-source');return false;">[Source]</a><… | |
| <div class="method-source-code" id="M000008-source"> | |
| <pre> | |
| - <span class="ruby-comment cmt"># File lib/kvlr/reports_as_sparkline/report… | |
| -53: <span class="ruby-keyword kw">def</span> <span class="ruby-identifie… | |
| -54: <span class="ruby-keyword kw">return</span> <span class="ruby-keyw… | |
| -55: <span class="ruby-keyword kw">when</span> <span class="ruby-iden… | |
| -56: <span class="ruby-keyword kw">self</span>.<span class="ruby-id… | |
| -57: <span class="ruby-keyword kw">when</span> <span class="ruby-iden… | |
| -58: <span class="ruby-keyword kw">self</span>.<span class="ruby-id… | |
| -59: <span class="ruby-keyword kw">when</span> <span class="ruby-iden… | |
| -60: <span class="ruby-keyword kw">self</span>.<span class="ruby-id… | |
| -61: <span class="ruby-keyword kw">when</span> <span class="ruby-iden… | |
| -62: <span class="ruby-keyword kw">self</span>.<span class="ruby-id… | |
| -63: <span class="ruby-keyword kw">end</span> | |
| -64: <span class="ruby-keyword kw">end</span> | |
| + <span class="ruby-comment cmt"># File lib/kvlr/reports_as_sparkline/report… | |
| +54: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword k… | |
| +55: <span class="ruby-keyword kw">return</span> <span class="ruby-keyw… | |
| +56: <span class="ruby-keyword kw">when</span> <span class="ruby-iden… | |
| +57: <span class="ruby-keyword kw">self</span>.<span class="ruby-id… | |
| +58: <span class="ruby-keyword kw">when</span> <span class="ruby-iden… | |
| +59: <span class="ruby-keyword kw">self</span>.<span class="ruby-id… | |
| +60: <span class="ruby-keyword kw">when</span> <span class="ruby-iden… | |
| +61: <span class="ruby-keyword kw">self</span>.<span class="ruby-id… | |
| +62: <span class="ruby-keyword kw">when</span> <span class="ruby-iden… | |
| +63: <span class="ruby-keyword kw">self</span>.<span class="ruby-id… | |
| +64: <span class="ruby-keyword kw">end</span> | |
| +65: <span class="ruby-keyword kw">end</span> | |
| </pre> | |
| </div> | |
| </div> | |
| diff --git a/rdoc/created.rid b/rdoc/created.rid | |
| @@ -1 +1 @@ | |
| -Mon, 15 Dec 2008 16:23:07 +0100 | |
| +Tue, 13 Jan 2009 16:35:24 +0100 | |
| diff --git a/rdoc/files/README_rdoc.html b/rdoc/files/README_rdoc.html | |
| @@ -56,7 +56,7 @@ | |
| </tr> | |
| <tr class="top-aligned-row"> | |
| <td><strong>Last Update:</strong></td> | |
| - <td>Mon Dec 15 16:22:56 +0100 2008</td> | |
| + <td>Tue Jan 13 16:35:03 +0100 2009</td> | |
| </tr> | |
| </table> | |
| </div> | |
| @@ -82,8 +82,8 @@ This shows the basic usage. Consider the following user model… | |
| <pre> | |
| class User < ActiveRecord::Base | |
| report_as_sparkline :registrations | |
| - report_as_sparkline :activations, :date_column_name => :activated_at | |
| - report_as_sparkline :total_users, :cumulate => true | |
| + report_as_sparkline :activations, :date_column => :activated_at | |
| + report_as_sparkline :total_users, :cumulate => true | |
| end | |
| </pre> | |
| <p> | |
| diff --git a/rdoc/files/lib/kvlr/core_extensions/date_time_rb.html b/rdoc/files… | |
| @@ -56,7 +56,7 @@ | |
| </tr> | |
| <tr class="top-aligned-row"> | |
| <td><strong>Last Update:</strong></td> | |
| - <td>Thu Dec 11 19:09:52 +0100 2008</td> | |
| + <td>Mon Dec 15 18:35:29 +0100 2008</td> | |
| </tr> | |
| </table> | |
| </div> | |
| diff --git a/rdoc/files/lib/kvlr/reports_as_sparkline/asset_tag_helper_rb.html … | |
| @@ -56,7 +56,7 @@ | |
| </tr> | |
| <tr class="top-aligned-row"> | |
| <td><strong>Last Update:</strong></td> | |
| - <td>Thu Dec 11 20:11:04 +0100 2008</td> | |
| + <td>Mon Dec 15 18:35:29 +0100 2008</td> | |
| </tr> | |
| </table> | |
| </div> | |
| diff --git a/rdoc/files/lib/kvlr/reports_as_sparkline/cumulated_report_rb.html … | |
| @@ -56,7 +56,7 @@ | |
| </tr> | |
| <tr class="top-aligned-row"> | |
| <td><strong>Last Update:</strong></td> | |
| - <td>Thu Dec 11 19:25:14 +0100 2008</td> | |
| + <td>Tue Jan 13 16:19:01 +0100 2009</td> | |
| </tr> | |
| </table> | |
| </div> | |
| diff --git a/rdoc/files/lib/kvlr/reports_as_sparkline/grouping_rb.html b/rdoc/f… | |
| @@ -56,7 +56,7 @@ | |
| </tr> | |
| <tr class="top-aligned-row"> | |
| <td><strong>Last Update:</strong></td> | |
| - <td>Thu Dec 11 20:11:56 +0100 2008</td> | |
| + <td>Tue Jan 13 12:14:04 +0100 2009</td> | |
| </tr> | |
| </table> | |
| </div> | |
| diff --git a/rdoc/files/lib/kvlr/reports_as_sparkline/report_cache_rb.html b/rd… | |
| @@ -56,7 +56,7 @@ | |
| </tr> | |
| <tr class="top-aligned-row"> | |
| <td><strong>Last Update:</strong></td> | |
| - <td>Thu Dec 11 19:27:42 +0100 2008</td> | |
| + <td>Tue Jan 13 16:03:14 +0100 2009</td> | |
| </tr> | |
| </table> | |
| </div> | |
| diff --git a/rdoc/files/lib/kvlr/reports_as_sparkline/report_rb.html b/rdoc/fil… | |
| @@ -56,7 +56,7 @@ | |
| </tr> | |
| <tr class="top-aligned-row"> | |
| <td><strong>Last Update:</strong></td> | |
| - <td>Thu Dec 11 20:14:36 +0100 2008</td> | |
| + <td>Tue Jan 13 14:22:10 +0100 2009</td> | |
| </tr> | |
| </table> | |
| </div> | |
| diff --git a/rdoc/files/lib/kvlr/reports_as_sparkline/reporting_period_rb.html … | |
| @@ -56,7 +56,7 @@ | |
| </tr> | |
| <tr class="top-aligned-row"> | |
| <td><strong>Last Update:</strong></td> | |
| - <td>Thu Dec 11 20:12:58 +0100 2008</td> | |
| + <td>Tue Jan 13 15:48:00 +0100 2009</td> | |
| </tr> | |
| </table> | |
| </div> | |
| diff --git a/rdoc/files/lib/kvlr/reports_as_sparkline_rb.html b/rdoc/files/lib/… | |
| @@ -56,7 +56,7 @@ | |
| </tr> | |
| <tr class="top-aligned-row"> | |
| <td><strong>Last Update:</strong></td> | |
| - <td>Thu Dec 11 20:06:27 +0100 2008</td> | |
| + <td>Tue Jan 13 12:14:34 +0100 2009</td> | |
| </tr> | |
| </table> | |
| </div> | |
| diff --git a/rdoc/fr_method_index.html b/rdoc/fr_method_index.html | |
| @@ -25,8 +25,8 @@ | |
| <a href="classes/Kvlr/ReportsAsSparkline/Grouping.html#M000004">new (Kvlr:… | |
| <a href="classes/Kvlr/ReportsAsSparkline/ReportingPeriod.html#M000006">new… | |
| <a href="classes/Kvlr/ReportsAsSparkline/Report.html#M000009">new (Kvlr::R… | |
| - <a href="classes/Kvlr/ReportsAsSparkline/ReportingPeriod.html#M000008">pre… | |
| - <a href="classes/Kvlr/ReportsAsSparkline/ClassMethods.html#M000001">report… | |
| + <a href="classes/Kvlr/ReportsAsSparkline/ReportingPeriod.html#M000008">nex… | |
| + <a href="classes/Kvlr/ReportsAsSparkline/ClassMethods.html#M000001">report… | |
| <a href="classes/Kvlr/ReportsAsSparkline/CumulatedReport.html#M000003">run… | |
| <a href="classes/Kvlr/ReportsAsSparkline/Report.html#M000010">run (Kvlr::R… | |
| <a href="classes/Kvlr/ReportsAsSparkline/AssetTagHelper.html#M000002">spar… |