You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by Sebastian Bazley <se...@apache.org> on 2016/03/29 11:59:52 UTC
[whimsy.git] [1/1] Commit ecc152e: Does not handle a single svn update properly
Commit ecc152e61a14277269886e403d82ba444ae457bf:
Does not handle a single svn update properly
Add main for debugging
Branch: refs/heads/master
Author: Sebb <se...@apache.org>
Committer: Sebb <se...@apache.org>
Pusher: sebb <se...@apache.org>
------------------------------------------------------------
www/status/monitors/svn.rb | +++++++ -
------------------------------------------------------------
8 changes: 7 additions, 1 deletions.
------------------------------------------------------------
diff --git a/www/status/monitors/svn.rb b/www/status/monitors/svn.rb
index 8a482c3..570fc05 100644
--- a/www/status/monitors/svn.rb
+++ b/www/status/monitors/svn.rb
@@ -35,7 +35,8 @@ def Monitor.svn(previous_status)
if not data
title = "partial response"
level = 'warning'
- elsif data.length == 1
+ # data may be a String rather than an array in which case .length is its length, not 1
+ elsif String === data or data.length == 1
title = "1 file updated"
else
title = "#{data.length} files updated"
@@ -53,3 +54,8 @@ def Monitor.svn(previous_status)
{data: status}
end
+
+# for debugging purposes
+if __FILE__ == $0
+ puts Monitor.svn(nil)
+end