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)