diff --git a/lib/travis/api/app/endpoint/uptime.rb b/lib/travis/api/app/endpoint/uptime.rb new file mode 100644 index 00000000..9b8b618f --- /dev/null +++ b/lib/travis/api/app/endpoint/uptime.rb @@ -0,0 +1,16 @@ +require 'travis/api/app' + +class Travis::Api::App + class Endpoint + class Uptime < Endpoint + get '/' do + begin + ActiveRecord::Base.connection.execute('select 1') + [200, "OK"] + rescue => e + [500, "Error: #{e.message}"] + end + end + end + end +end