reportable 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/saulabs/reportable/report_cache.rb +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d0deffb0fa9ea3e4ac5b6f398b365919f7a7a3e
|
4
|
+
data.tar.gz: ec672ff78bc8adaa5fbe797501abe2aecc80122c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af95eceb42afd32bb2ce499a22a338c83c0a2ece2b17cbb534dd016b0e6c3007cfaad5b3318daee84f7e17aaff1bb24225ea4664583f8edcc28cf19e769ce0be
|
7
|
+
data.tar.gz: 6d6cfc92c7aaef9a2afaa375779ffdad5c4555a2087a598ae3199fa9db9fcf647c6bf81e2c43ccd6ab6bdab156186937b47db6c0315d9a54826c7ed94f165ddb
|
@@ -93,10 +93,12 @@ module Saulabs
|
|
93
93
|
while reporting_period < (options[:end_date] ? ReportingPeriod.new(options[:grouping], options[:end_date]).next : current_reporting_period)
|
94
94
|
if cached = cached_data.find { |cached| reporting_period == cached[0] }
|
95
95
|
result << [cached[0].date_time, cached[1]]
|
96
|
-
|
96
|
+
elsif reporting_period.last_date_time.past?
|
97
97
|
new_cached = build_cached_data(report, options[:grouping], options[:conditions], reporting_period, find_value(new_data, reporting_period))
|
98
98
|
new_cached.save!
|
99
99
|
result << [reporting_period.date_time, new_cached.value]
|
100
|
+
else
|
101
|
+
result << [reporting_period.date_time, find_value(new_data, reporting_period)]
|
100
102
|
end
|
101
103
|
reporting_period = reporting_period.next
|
102
104
|
end
|