setup should not take options
otherwise options would be ignored for subsequent calls
This commit is contained in:
parent
11d9a494c7
commit
17d053ac21
|
@ -36,11 +36,10 @@ class Travis::Api::App
|
||||||
#
|
#
|
||||||
# This method is not threadsafe, but called when loading
|
# This method is not threadsafe, but called when loading
|
||||||
# the environment, so no biggy.
|
# the environment, so no biggy.
|
||||||
def self.setup(options = {})
|
def self.setup
|
||||||
return if setup?
|
return if setup?
|
||||||
Travis::Database.connect
|
Travis::Database.connect
|
||||||
|
|
||||||
Responder.set(options) if options
|
|
||||||
Backports.require_relative_dir 'app/middleware'
|
Backports.require_relative_dir 'app/middleware'
|
||||||
Backports.require_relative_dir 'app/endpoint'
|
Backports.require_relative_dir 'app/endpoint'
|
||||||
Responder.subclasses.each(&:setup)
|
Responder.subclasses.each(&:setup)
|
||||||
|
@ -51,7 +50,6 @@ class Travis::Api::App
|
||||||
attr_accessor :app
|
attr_accessor :app
|
||||||
|
|
||||||
def initialize(options = {})
|
def initialize(options = {})
|
||||||
Travis::Api::App.setup
|
|
||||||
@app = Rack::Builder.app do
|
@app = Rack::Builder.app do
|
||||||
use Rack::Protection::PathTraversal
|
use Rack::Protection::PathTraversal
|
||||||
use Rack::SSL if Endpoint.production?
|
use Rack::SSL if Endpoint.production?
|
||||||
|
|
Loading…
Reference in New Issue
Block a user