no more inheritance

This commit is contained in:
Konstantin Haase 2015-09-17 15:13:33 +02:00
parent dc0da3645a
commit e478c621f2
2 changed files with 59 additions and 63 deletions

View File

@ -125,7 +125,7 @@ module Travis::Api
use Travis::Api::App::Middleware::Metriks
# make sure this is below ScopeCheck so we have the token
use Travis::Api::Attack
use Rack::Attack
# if this is a v3 API request, ignore everything after
use Travis::API::V3::OptIn

View File

@ -1,10 +1,7 @@
require 'rack/attack'
module Travis::Api
class Attack < Rack::Attack
DalliProxy = Rack::Attack::DalliProxy # ?
module Request
class Rack::Attack
module RequestMixin
TOKEN = 'travis.access_token'.freeze
Rack::Attack::Request.prepend(self)
@ -68,5 +65,4 @@ module Travis::Api
else
cache.store = ActiveSupport::Cache::MemoryStore.new
end
end
end