From ebfa081e6dbcc771420faa7046088df0b591ad67 Mon Sep 17 00:00:00 2001 From: Aaron Suggs Date: Thu, 11 Aug 2016 13:39:00 -0400 Subject: [PATCH] Fix args to deprecated methods Fixes #197 --- lib/rack/attack.rb | 8 ++++---- lib/rack/attack/version.rb | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/rack/attack.rb b/lib/rack/attack.rb index f5189d9..0f37567 100644 --- a/lib/rack/attack.rb +++ b/lib/rack/attack.rb @@ -68,9 +68,9 @@ class Rack::Attack end end - def whitelisted? + def whitelisted?(req) warn "[DEPRECATION] 'Rack::Attack.whitelisted?' is deprecated. Please use 'safelisted?' instead." - safelisted? + safelisted?(req) end def blocklisted?(req) @@ -79,9 +79,9 @@ class Rack::Attack end end - def blacklisted? + def blacklisted?(req) warn "[DEPRECATION] 'Rack::Attack.blacklisted?' is deprecated. Please use 'blocklisted?' instead." - blocklisted? + blocklisted?(req) end def throttled?(req) diff --git a/lib/rack/attack/version.rb b/lib/rack/attack/version.rb index 770d8fe..06f4df7 100644 --- a/lib/rack/attack/version.rb +++ b/lib/rack/attack/version.rb @@ -1,5 +1,5 @@ module Rack class Attack - VERSION = '5.0.0' + VERSION = '5.0.1' end end