diff --git a/status.rb b/status.rb index 167fdd5..c767a0b 100644 --- a/status.rb +++ b/status.rb @@ -80,7 +80,7 @@ def getdata(status, messages) (statusS.zip status).each do |d, dPrev| if d != nil and dPrev != nil if d['door_open'] != dPrev['door_open'] - start = d['timestamp'] + " UTC" + start = Time.parse(d['timestamp'] + "UTC") @duration = Time.diff(Time.now(), start, '%h:%m')[:diff] break end @@ -153,7 +153,7 @@ def getdata(status, messages) if d != nil and dPrev != nil if d['door_open'] != dPrev['door_open'] start = d['timestamp'] - @lastchange = Time.parse(start + " UTC").to_i + @lastchange = Time.parse(start + "UTC").localtime.strftime("%s").to_i break end end @@ -166,8 +166,8 @@ def getdata(status, messages) end json = YAML.load_file('status.yml') - json[:open] = @open - json[:lastchange] = @lastchange + json['state'][:open]= @open + json['state'][:lastchange] = @lastchange content_type 'application/json' jsonp json diff --git a/status.yml b/status.yml index dbb72db..e6b111d 100644 --- a/status.yml +++ b/status.yml @@ -1,21 +1,23 @@ -api: "0.12" +api: "0.13" space: MetaMeute url: https://metameute.de -icon: - open: http://status.metameute.de/images/open.png - closed: http://status.metameute.de/images/closed.png -address: Unversität zu Lübeck, Gebäude 62, Ratzeburger Allee 160, 23562 Lübeck, Germany +state: + icon: + open: http://status.metameute.de/images/open.png + closed: http://status.metameute.de/images/closed.png contact: phone: "+494515005011" - ml: MetaMeute@asta.uni-luebeck.de + email: metameute@asta.uni-luebeck.de + ml: metameute@asta.uni-luebeck.de irc: irc://irc.oftc.net/#Metameute logo: http://status.metameute.de/images/logo.png feeds: - - name: blog - type: application/rss+xml - url: http://blog.metameute.de/feed/ - - name: status - type: application/rss+xml - url: http://status.metameute.de/rss -lat: 53.834372 -lon: 10.702268 + blog: + type: application/rss+xml + url: http://blog.metameute.de/feed/ +issue_report_channels: + - email +location: + lat: 53.834372 + lon: 10.702268 + address: Unversität zu Lübeck, Gebäude 62, Ratzeburger Allee 160, 23562 Lübeck, Germany diff --git a/views/index.erb b/views/index.erb index 5f01bc5..b052a9e 100644 --- a/views/index.erb +++ b/views/index.erb @@ -47,6 +47,6 @@