whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: latest.json
Date Thu, 08 Aug 2019 08:09:55 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 6d75441  latest.json
6d75441 is described below

commit 6d754415fbd4e87d8d748a2b605e9278e5a53855
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Thu Aug 8 04:09:31 2019 -0400

    latest.json
---
 www/board/agenda/routes.rb | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/www/board/agenda/routes.rb b/www/board/agenda/routes.rb
index 901e7db..d561bf4 100755
--- a/www/board/agenda/routes.rb
+++ b/www/board/agenda/routes.rb
@@ -18,6 +18,15 @@ get '/latest/' do
   )
 end
 
+# alias for latest agenda in JSON format
+get '/latest.json' do
+  agenda = dir('board_agenda_*.txt').sort.last
+  pass unless agenda
+  call env.merge(
+    'PATH_INFO' => "/#{agenda[/\d+_\d+_\d+/].gsub('_', '-')}.json"
+  )
+end
+
 # icon
 get '/whimsy.svg' do
   send_file File.expand_path('../../../whimsy.svg', __FILE__),


Mime
View raw message