From d8a7da1ad03b070bf81fde21eb9fb899c8dc2fc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Hendricksen?= Date: Fri, 1 Jul 2016 13:03:35 -0400 Subject: [PATCH] fix the method signatures --- lib/rack/attack.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/rack/attack.rb b/lib/rack/attack.rb index ee772880..744f77a0 100644 --- a/lib/rack/attack.rb +++ b/lib/rack/attack.rb @@ -24,17 +24,19 @@ class << self def safelist(name, &block) self.safelists[name] = Safelist.new(name, block) end - def whitelist + + def whitelist(name, &block) warn "[DEPRECATION] 'whitelist' is deprecated. Please use 'safelist' instead." - safelist + safelist(name, &block) end def blocklist(name, &block) self.blocklists[name] = Blocklist.new(name, block) end - def blacklist + + def blacklist(name, &block) warn "[DEPRECATION] 'blacklist' is deprecated. Please use 'blocklist' instead." - blocklist + blocklist(name, &block) end def throttle(name, options, &block)