whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Status now uses symbols, not strings
Date Thu, 07 Apr 2016 16:28:00 GMT
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git

The following commit(s) were added to refs/heads/master by this push:
       new  0606ad9   Status now uses symbols, not strings
       new  1d7ea47   Merge branch 'master' of https://github.com/apache/whimsy
0606ad9 is described below

commit 0606ad9ee6c90fb1312f3648de279f287950d0a2
Author: Sebb <sebb@apache.org>
AuthorDate: Thu Apr 7 17:26:51 2016 +0100

    Status now uses symbols, not strings
---
 www/status/index.cgi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/www/status/index.cgi b/www/status/index.cgi
index baf5af3..0bec5c4 100755
--- a/www/status/index.cgi
+++ b/www/status/index.cgi
@@ -9,7 +9,7 @@ git_info = `git show --format="%h  %ci"  -s HEAD`.strip rescue "?"
 git_repo = `git ls-remote origin master`.strip rescue "?"
 
 # Get new status every minute
-if not status['mtime'] or Time.now - Time.parse(status['mtime']) > 60
+if not status[:mtime] or Time.now - Time.parse(status[:mtime]) > 60
   begin
     require_relative './monitor'
     status = Monitor.new.status || {}
@@ -24,10 +24,10 @@ if not status['mtime'] or Time.now - Time.parse(status['mtime']) >
60
 end
 
 # The following is what infrastructure team sees:
-if %w(success info).include? status['level']
+if %w(success info).include? status[:level]
   print "Status: 200 OK\r\n\r\n"
 else
-  print "Status: 400 #{status['title'] || 'failure'}\r\n\r\n"
+  print "Status: 400 #{status[:title] || 'failure'}\r\n\r\n"
 end
 
 # What the browser sees:

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message