From 17d053ac213488857bc6a4e764b29b71c2ca8b7b Mon Sep 17 00:00:00 2001 From: Konstantin Haase Date: Fri, 24 Aug 2012 18:20:20 +0200 Subject: [PATCH] setup should not take options otherwise options would be ignored for subsequent calls --- lib/travis/api/app.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/travis/api/app.rb b/lib/travis/api/app.rb index b64e99c5..7919f821 100644 --- a/lib/travis/api/app.rb +++ b/lib/travis/api/app.rb @@ -36,11 +36,10 @@ class Travis::Api::App # # This method is not threadsafe, but called when loading # the environment, so no biggy. - def self.setup(options = {}) + def self.setup return if setup? Travis::Database.connect - Responder.set(options) if options Backports.require_relative_dir 'app/middleware' Backports.require_relative_dir 'app/endpoint' Responder.subclasses.each(&:setup) @@ -51,7 +50,6 @@ class Travis::Api::App attr_accessor :app def initialize(options = {}) - Travis::Api::App.setup @app = Rack::Builder.app do use Rack::Protection::PathTraversal use Rack::SSL if Endpoint.production?