cleanup - reportable - Unnamed repository; edit this file 'description' to name… | |
Log | |
Files | |
Refs | |
README | |
--- | |
commit 9577b0d728079889d178694076d0bbcc6861eb3c | |
parent d48fcc5ad3dad4227a805cfe89c586958752e355 | |
Author: Marco Otte-Witte <[email protected]> | |
Date: Thu, 15 Jan 2009 12:32:39 +0100 | |
cleanup | |
Diffstat: | |
M lib/kvlr/reports_as_sparkline/repo… | 9 +++++---- | |
M rdoc/classes/Kvlr/ReportsAsSparkli… | 31 ++++++++++++++++-----------… | |
M rdoc/created.rid | 2 +- | |
M rdoc/files/lib/kvlr/reports_as_spa… | 2 +- | |
M rdoc/files/lib/kvlr/reports_as_spa… | 2 +- | |
5 files changed, 24 insertions(+), 22 deletions(-) | |
--- | |
diff --git a/lib/kvlr/reports_as_sparkline/report.rb b/lib/kvlr/reports_as_spar… | |
@@ -29,7 +29,8 @@ module Kvlr #:nodoc: | |
@options = { | |
:limit => options[:limit] || 100, | |
:conditions => options[:conditions] || [], | |
- :grouping => Grouping.new(options[:grouping] || :day) | |
+ :grouping => Grouping.new(options[:grouping] || :day), | |
+ :live_data => options[:live_data] || false | |
} | |
@options.merge!(options) | |
@options.freeze | |
@@ -53,7 +54,7 @@ module Kvlr #:nodoc: | |
private | |
- def read_data(begin_at, options) #:nodoc: | |
+ def read_data(begin_at, options) | |
conditions = setup_conditions(begin_at, options[:conditions]) | |
@klass.send(@aggregation, | |
@value_column, | |
@@ -63,7 +64,7 @@ module Kvlr #:nodoc: | |
) | |
end | |
- def setup_conditions(begin_at, custom_conditions = []) #:nodoc: | |
+ def setup_conditions(begin_at, custom_conditions = []) | |
conditions = [''] | |
if custom_conditions.is_a?(Hash) | |
conditions = [custom_conditions.map{ |k, v| "#{k.to_s} = ?" }.join… | |
@@ -74,7 +75,7 @@ module Kvlr #:nodoc: | |
conditions << begin_at | |
end | |
- def ensure_valid_options(options, context = :initialize) #:nodoc: | |
+ def ensure_valid_options(options, context = :initialize) | |
case context | |
when :initialize | |
options.each_key do |k| | |
diff --git a/rdoc/classes/Kvlr/ReportsAsSparkline/Report.html b/rdoc/classes/Kv… | |
@@ -218,11 +218,12 @@ records that match there conditions are reported on | |
29: <span class="ruby-ivar">@options</span> = { | |
30: <span class="ruby-identifier">:limit</span> =<span class="r… | |
31: <span class="ruby-identifier">:conditions</span> =<span class="r… | |
-32: <span class="ruby-identifier">:grouping</span> =<span class="r… | |
-33: } | |
-34: <span class="ruby-ivar">@options</span>.<span class="ruby-identifi… | |
-35: <span class="ruby-ivar">@options</span>.<span class="ruby-identifi… | |
-36: <span class="ruby-keyword kw">end</span> | |
+32: <span class="ruby-identifier">:grouping</span> =<span class="r… | |
+33: <span class="ruby-identifier">:live_data</span> =<span class="r… | |
+34: } | |
+35: <span class="ruby-ivar">@options</span>.<span class="ruby-identifi… | |
+36: <span class="ruby-ivar">@options</span>.<span class="ruby-identifi… | |
+37: <span class="ruby-keyword kw">end</span> | |
</pre> | |
</div> | |
</div> | |
@@ -262,16 +263,16 @@ you specify conditions here, caching will be disabled</b>) | |
onclick="toggleCode('M000010-source');return false;">[Source]</a><… | |
<div class="method-source-code" id="M000010-source"> | |
<pre> | |
- <span class="ruby-comment cmt"># File lib/kvlr/reports_as_sparkline/report… | |
-44: <span class="ruby-keyword kw">def</span> <span class="ruby-identifie… | |
-45: <span class="ruby-identifier">ensure_valid_options</span>(<span cl… | |
-46: <span class="ruby-identifier">custom_conditions</span> = <span cla… | |
-47: <span class="ruby-identifier">options</span>.<span class="ruby-ide… | |
-48: <span class="ruby-identifier">options</span>[<span class="ruby-ide… | |
-49: <span class="ruby-constant">ReportCache</span>.<span class="ruby-i… | |
-50: <span class="ruby-identifier">read_data</span>(<span class="ruby… | |
-51: <span class="ruby-keyword kw">end</span> | |
-52: <span class="ruby-keyword kw">end</span> | |
+ <span class="ruby-comment cmt"># File lib/kvlr/reports_as_sparkline/report… | |
+45: <span class="ruby-keyword kw">def</span> <span class="ruby-identifie… | |
+46: <span class="ruby-identifier">ensure_valid_options</span>(<span cl… | |
+47: <span class="ruby-identifier">custom_conditions</span> = <span cla… | |
+48: <span class="ruby-identifier">options</span>.<span class="ruby-ide… | |
+49: <span class="ruby-identifier">options</span>[<span class="ruby-ide… | |
+50: <span class="ruby-constant">ReportCache</span>.<span class="ruby-i… | |
+51: <span class="ruby-identifier">read_data</span>(<span class="ruby… | |
+52: <span class="ruby-keyword kw">end</span> | |
+53: <span class="ruby-keyword kw">end</span> | |
</pre> | |
</div> | |
</div> | |
diff --git a/rdoc/created.rid b/rdoc/created.rid | |
@@ -1 +1 @@ | |
-Thu, 15 Jan 2009 12:00:12 +0100 | |
+Thu, 15 Jan 2009 12:32:28 +0100 | |
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 Jan 15 11:13:51 +0100 2009</td> | |
+ <td>Thu Jan 15 12:20:10 +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 Jan 15 11:13:51 +0100 2009</td> | |
+ <td>Thu Jan 15 12:32:02 +0100 2009</td> | |
</tr> | |
</table> | |
</div> |