jgrouper 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY.md +5 -0
- data/lib/jgrouper/audit_archiver.rb +8 -8
- data/lib/jgrouper/version.rb +1 -1
- metadata +1 -1
data/HISTORY.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
JGrouper History
|
2
2
|
================
|
3
3
|
|
4
|
+
2013-07-18 JGrouper v0.4.2
|
5
|
+
--------------------------
|
6
|
+
* Fix "JGrouper::AuditArchiver" end-of-day calculation
|
7
|
+
|
8
|
+
|
4
9
|
2013-07-18 JGrouper v0.4.1
|
5
10
|
--------------------------
|
6
11
|
* Update "JGrouper::AuditArchiver" to detect re-archive attempts and increment date
|
@@ -60,17 +60,17 @@ module JGrouper # :nodoc:
|
|
60
60
|
|
61
61
|
connect do
|
62
62
|
mappings do
|
63
|
-
last_date =
|
63
|
+
last_date = Date.new
|
64
64
|
1.upto @number_of_days do
|
65
65
|
@date = oldest_entry # Date of oldest entry
|
66
|
-
if @date
|
67
|
-
warn "WARNING: attempt to re-archive #{ @date },
|
68
|
-
|
66
|
+
if @date <= last_date
|
67
|
+
warn "WARNING: attempt to re-archive #{ @date }, aborting ..."
|
68
|
+
break
|
69
69
|
end
|
70
70
|
break if stop?
|
71
71
|
|
72
|
-
start_at = time_to_microseconds @date.to_time
|
73
|
-
stop_at = time_to_microseconds ( @date + 1 ).to_time - 1 # @date end-of-day
|
72
|
+
start_at = time_to_microseconds @date.to_time # @date start-of-day
|
73
|
+
stop_at = ( time_to_microseconds ( @date + 1 ).to_time ) - 1 # @date end-of-day
|
74
74
|
# TODO Verify number of entries is greater than 0?
|
75
75
|
|
76
76
|
num_entries = 0
|
@@ -273,8 +273,8 @@ module JGrouper # :nodoc:
|
|
273
273
|
stmt = @conn.create_statement
|
274
274
|
rs = stmt.execute_query "SELECT MIN(created_on) FROM #{GROUPER_AUDIT_ENTRY} ORDER BY created_on"
|
275
275
|
while rs.next
|
276
|
-
# String
|
277
|
-
d = Time.at( microseconds_to_seconds( rs.get_object(1).to_s.to_f
|
276
|
+
# Object => String => Float => Time => Date
|
277
|
+
d = Time.at( microseconds_to_seconds( rs.get_object(1).to_s.to_f ) ).to_date
|
278
278
|
break
|
279
279
|
end
|
280
280
|
rs.close
|
data/lib/jgrouper/version.rb
CHANGED