whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Ruby <ru...@apache.org>
Subject [whimsy.git] [1/1] Commit 65ba363: use info status when board minutes are updated
Date Mon, 18 Jan 2016 01:03:08 GMT
Commit 65ba363edf936afc41a7e815195e688ca5e4a958:
    use info status when board minutes are updated


Branch: refs/heads/master
Author: Sam Ruby <rubys@intertwingly.net>
Committer: Sam Ruby <rubys@intertwingly.net>
Pusher: rubys <rubys@apache.org>

------------------------------------------------------------
www/status/monitors/board_minutes.rb                         | ++++++++ --
------------------------------------------------------------
10 changes: 8 additions, 2 deletions.
------------------------------------------------------------


diff --git a/www/status/monitors/board_minutes.rb b/www/status/monitors/board_minutes.rb
index c5371d4..a6781c9 100644
--- a/www/status/monitors/board_minutes.rb
+++ b/www/status/monitors/board_minutes.rb
@@ -4,14 +4,20 @@
 
 def Monitor.board_minutes(previous_status)
   index = File.expand_path('../../www/board/minutes/index.html')
-  log = File.expand_path('../../www/logs/collate_minutes')
+  log = File.read(File.expand_path('../../www/logs/collate_minutes'))
 
-  if File.read(log) =~ /\*\*\* (Exception.*) \*\*\*/
+  if log =~ /\*\*\* (Exception.*) \*\*\*/
     {
       level: 'danger',
       data: $1,
       href: '../logs/collate_minutes'
     }
+  elsif log.length > 0
+    {
+      level: 'info',
+      data: "Last updated: #{File.mtime(index)}",
+      href: '../logs/collate_minutes'
+    }
   else
     "Last updated: #{File.mtime(index)}"
   end

Mime
View raw message