add hubble

This commit is contained in:
Sven Fuchs 2012-09-25 17:16:27 +02:00
parent e8d2604ec3
commit 97e06c556f
2 changed files with 5 additions and 0 deletions

View File

@ -10,6 +10,8 @@ require 'rack/contrib'
require 'active_record'
require 'redis'
require 'gh'
require 'hubble'
require 'hubble/middleware'
# Rack class implementing the HTTP API.
# Instances respond to #call.
@ -51,6 +53,7 @@ class Travis::Api::App
def initialize
@app = Rack::Builder.app do
use Hubble::Rescuer, env: Travis.env, codename: ENV['CODENAME'] if Endpoint.production? && ENV['HUBBLE_ENDPOINT']
use Rack::Protection::PathTraversal
use Rack::SSL if Endpoint.production?
use Rack::JSONP

View File

@ -20,6 +20,8 @@ class Travis::Api::App
#
# Logging is set up by custom middleware
disable :protection, :logging, :setup
enable :raise_errors
disable :dump_errors
register :subclass_tracker
helpers :json_renderer
end