Commit graph

12 commits

Author SHA1 Message Date
Gonzalo Rodriguez
ca739946ce Attempt to make it easier to understand that the method is making assertions 2018-01-25 10:53:47 -03:00
Corey Farwell
6f545e2665
Merge pull request #262 from grzuy/legibility
Attempt to improve legibility
2018-01-23 17:46:03 -05:00
Gonzalo Rodriguez
e8102910bf Fixes warning 'DEPRECATED: Use assert_nil if expecting nil from ...' 2018-01-23 15:07:49 -03:00
Gonzalo
79d21fc3ac Attempt to improve legibility 2018-01-19 12:00:38 -03:00
Mike Ferrier
031efcd123 add a spec to specify the behavior of non-matching throttle blocks 2016-07-13 10:20:08 -04:00
Genadi Samokovarov
d9a5587676 Allow throttle period option to be a proc
I need to filter requests on a period I need to get dynamically out of
information I have in the requests. Currently, I can work out the limit,
as it can be a `Proc`, however I can't do that with the period.

This PR adds support for that. Tried to do it in a way that doesn't
brake backwards compatibility, as periods are coerced to numbers during
`Rack::Throttle` initialization.
2014-09-19 19:32:39 +02:00
blahed
97dce48bfc add throttle discriminator to rack env 2014-05-01 22:20:13 -04:00
Aaron Suggs
1d367f5acd version 2.3.0, update changelog, copy tweaks 2013-08-20 11:39:44 -04:00
Pedro Nascimento
ab6d7b239d Allow limit option to be a proc.
This allows you to do stuff like:
`req.env["USER"] == "god" ? 1000 : 1`
2013-08-19 19:47:48 -03:00
Alex Volkovitsky & Sachin Maharjan
f348643c24 Fix spec expectations 2013-06-28 13:59:31 -07:00
Aaron Suggs
cf508e1d18 Support RedisStore as cache store
Add tests for different cache stores
2013-02-25 12:09:59 -05:00
Aaron Suggs
80367e1e4a Add Rack::Attack.track.
track will fire notifications, but not alter request processing
2013-01-10 19:02:49 -05:00