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 use Travis::Api::App::Middleware::Metriks
# make sure this is below ScopeCheck so we have the token # 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 # if this is a v3 API request, ignore everything after
use Travis::API::V3::OptIn use Travis::API::V3::OptIn

View File

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