fatkodima
a34c187dda
Allow to configure Retry-After header for default throttled_response handler
2019-10-17 00:26:13 +03:00
Gonzalo Rodriguez
bdc89dde7b
test: fix minitest/spec deprecation warnings
2019-10-01 17:19:44 -03:00
Gonzalo Rodriguez
58ba650e6b
feat: provide discriminator in throttle_data
2019-07-10 17:21:48 -03:00
Gonzalo Rodriguez
c67e71defe
style: prefer ruby 1.9+ hash syntax
2019-02-27 23:29:32 -03:00
Gonzalo Rodriguez
73bc739d5a
Merge remote-tracking branch 'doliveirakn/master'
2018-06-29 11:17:19 -03:00
Gonzalo Rodriguez
8315a1e7e1
Remove support for unmaintained ruby 2.2
2018-06-28 17:08:15 -03:00
Gonzalo Rodriguez
86eb9f9e0a
Enable Style/BracesAroundHashParameters rubocop cop
2018-06-19 17:57:30 -03:00
Gonzalo Rodriguez
52ec80692d
Enable Lint rubocop cops
2018-04-17 16:27:56 -04:00
Lucas Mansur
11e9557ccb
[ Fixes #302 ] Initial style guide adoption ( #330 )
...
* Initial Rubocop configuration
* Fix Rubocop layout offenses for lib
* Fix some spec offenses
* Fix leftover layout offenses
2018-03-30 16:08:00 -03:00
Kyle d'Oliveira
9dbece5272
Add an reader for the epoch_time variable in the cache so that it can also be returned in the data from the throttle.
...
This is allows access to the same time that the cache uses for the count. This can be important for clients that want to provide rate limit information for well-behaved clients
2018-02-15 14:45:35 -08:00
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