diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2013-02-24 10:56:00 +1100 |
---|---|---|
committer | Matthew Landauer <matthew@openaustralia.org> | 2013-02-24 10:56:00 +1100 |
commit | 4f62bb900996dba5fa1c71ad688ffb2839983662 (patch) | |
tree | 3f4fe87b3c36235e6c6d33884d03b9c650c77505 /app/controllers/general_controller.rb | |
parent | 0d78ef90a85d11a0bd5d9c092292c829968470ab (diff) |
Add publicly accesible json api to query alaveteli and ruby version. Implements #834
Diffstat (limited to 'app/controllers/general_controller.rb')
-rw-r--r-- | app/controllers/general_controller.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/controllers/general_controller.rb b/app/controllers/general_controller.rb index a8bbc22ff..626c4ad87 100644 --- a/app/controllers/general_controller.rb +++ b/app/controllers/general_controller.rb @@ -230,6 +230,14 @@ class GeneralController < ApplicationController render(:layout => false, :content_type => 'text/css') end - + def version + respond_to do |format| + format.json { render :json => { + :alaveteli_git_commit => alaveteli_git_commit, + :alaveteli_version => ALAVETELI_VERSION, + :ruby_version => RUBY_VERSION + }} + end + end end |