Santiago Bartesaghi
86650c4f7e
Fix reset! when using namespaced cache store ( #673 )
2024-12-19 23:46:53 -03:00
Santiago Bartesaghi
6db4a73253
Drop Dalli 2 support ( #679 )
2024-12-16 09:56:09 -03:00
Santiago Bartesaghi
0d40ea6538
Add Rails 7.2 to CI ( #671 )
...
* Add Rails 7.2 to CI
* Fix CI
2024-10-15 15:00:41 -03:00
Alex Martens
427fdfabbc
Add tracks attr_reader to Configuration ( #664 )
2024-06-24 14:46:01 -03:00
Santiago Bartesaghi
b6ce502b14
Add test to prevent regressions ( #656 )
2024-05-03 20:49:45 -03:00
Santiago Bartesaghi
52ce45db11
Refactor notifications checks in tests ( #657 )
2024-05-03 20:49:03 -03:00
Santiago Bartesaghi
5124a172ac
Fix Rails test not being ran ( #649 )
2024-01-10 12:10:56 -03:00
Santiago Bartesaghi
cb82b9f873
ci: freeze time in more specs ( #643 )
...
* ci: freeze time in more specs
* Introduce within_same_period helper method
---------
Co-authored-by: Gonzalo <456459+grzuy@users.noreply.github.com>
2024-01-10 11:55:37 -03:00
Jonathan del Strother
d3b3da44c4
ci: freeze time to fix flakey specs ( #640 )
2023-11-21 10:22:01 -03:00
Gonzalo
36b830ab3c
ci: update tested rails versions ( #626 )
2023-10-26 15:37:16 +13:00
Santiago Bartesaghi
3543f61b64
Fix #588 don't fail if request.ip is missing ( #630 )
...
* Fix #588 don't fail if request.ip is missing
* Fix Rails 4 suite
* Improve tests
---------
Co-authored-by: Gonzalo <456459+grzuy@users.noreply.github.com>
2023-10-18 00:19:29 +00:00
Santiago Bartesaghi
e9f472786a
Update rubocop ( #629 )
...
* Upgrade rubocop gem
* Fix obsolete parameter
* Fix Lint/MissingSuper
* Fix Lint/ConstantDefinitionInBlock
* Fix Layout/EmptyLineBetweenDefs
* Add rubocop-minitest
* Add rubocop-rake
* Upgrade rubocop-performance
2023-10-16 20:04:35 -03:00
Mitchell Henke
9a7815c332
Remove support for unmaintained ActiveSupport::Cache::RedisStore ( #625 )
...
* remove support for unmaintained ActiveSupport::Cache::RedisStore
* ci: removes active_support_redis_store matrix job
* test: removes unecessary redis-activesupport require
* test: removes dead code
* fix typo
---------
Co-authored-by: Gonzalo <456459+grzuy@users.noreply.github.com>
2023-10-14 11:29:19 -03:00
James Mead
31adbd0ad8
Rename MiniTest -> Minitest ( #618 )
...
The latest version of minitest dropped the "ancient MiniTest
compatibility layer" [1], so we need to use the newer module name,
`Minitest`.
[1]: https://github.com/minitest/minitest/blob/master/History.rdoc#label-5.19.0+-2F+2023-07-26
2023-08-02 19:01:56 +12:00
Samuel Williams
b708de32f3
Support Rack 3. ( #586 )
2023-07-25 15:16:43 +12:00
Gonzalo
aaeff6d0ae
feat: deprecate throttled_response and blocklisted_response
2022-01-29 15:22:19 -03:00
Gonzalo
8bf9d4efad
refactor: attempt to make method name more self explanatory and clear
2022-01-29 15:06:13 -03:00
thomas morgan
0fbfda0146
test against dalli 3.0
2021-11-16 10:04:16 -07:00
Gonzalo
886ba3a18d
Merge branch '6-stable'
2021-02-07 16:46:46 -03:00
Gonzalo
f3f0df3fc0
refactor: attempt to avoid user confusion by clarifying method is used by throttle
2021-02-07 13:34:26 -03:00
fatkodima
1e5fb868f6
Auto include middleware for older railses
2021-02-07 12:57:24 -03:00
fatkodima
df354cd141
Make discriminators case-insensitive by default
2021-02-07 12:55:03 -03:00
Gonzalo
33d1bac4a5
test: update ruby and rails versions
2021-01-23 21:26:11 -03:00
Gonzalo
55d5e370fd
test: update ruby and rails versions
2020-12-27 16:57:15 -03:00
fatkodima
9923012fe8
Allow to reset state between tests
2020-04-25 16:22:55 -03:00
Gonzalo Rodriguez
64f879395d
Merge commit '8fcd6c855915c802adeeb1784c503fc74115f5a3' into 6-stable
2020-04-25 16:17:37 -03:00
fatkodima
6cca2467d2
Fix rescuing errors in RedisProxy#increment
2019-12-17 17:54:18 -03:00
Nikolay Rys
f79759717a
Feature proposal: Request instead of Env in callbacks ( #419 )
...
feat: allow easy access to the request object in the callbacks
2019-12-17 14:44:08 -03:00
fatkodima
2527b37221
Auto include middleware for older railses
2019-10-31 14:35:29 +02:00
Gonzalo Rodriguez
a103ff4819
Merge pull request #457 from kickstarter/fix_load
...
fix: avoid unintended effects on load_config_initializers and other gems load order
2019-10-30 15:13:05 -03:00
Gonzalo Rodriguez
e3056e737f
fix: avoid unintended effects on load_config_initializers and other gems load order
...
Because of the sort algorithm rails uses to satisfy `after` and `before`
constraints, gems can have unintended effects on others. See
0a120a818d
Prefer making rack-attack middleware idempotent instead of relying on
the load order and the contents of the middleware stack too much.
closes #452
closes #456
2019-10-29 15:45:26 -03:00
fatkodima
18e637aea8
Allow to reset state between tests
2019-10-23 01:33:49 +03:00
fatkodima
a3dff705bb
Make discriminators case-insensitive by default
2019-10-22 12:37:08 +03:00
Gonzalo Rodriguez
8fcd6c8559
Merge pull request #450 from fatkodima/better-failsafe
...
Do not rescue all errors for redis backed stores
2019-10-18 17:44:23 -03:00
fatkodima
20ec4d31db
Do not rescue all errors for redis backed stores
2019-10-18 02:31:05 +03:00
Gonzalo Rodriguez
55cb6def03
feat: clear custom response when clearing configuration
2019-10-17 14:26:22 -03:00
fatkodima
a34c187dda
Allow to configure Retry-After header for default throttled_response handler
2019-10-17 00:26:13 +03:00
fatkodima
2fac6418f8
Fix rescuing errors in RedisProxy#increment
2019-10-15 22:54:33 +03:00
Gonzalo Rodriguez
1167c65ba6
Don't autoplug middleware for untested rails versions
2019-10-12 18:10:10 -03:00
fatkodima
f22b24cbc5
Do not auto-plug for rails < 5
2019-10-08 13:08:07 +03:00
fatkodima
bdfb01ab5b
Changes and tests
2019-10-08 12:29:25 +03:00
fatkodima
b512e05786
Auto plug middleware for simpler installation
2019-10-08 12:29:25 +03:00
Gonzalo Rodriguez
bdc89dde7b
test: fix minitest/spec deprecation warnings
2019-10-01 17:19:44 -03:00
Gonzalo Rodriguez
8fafa7602b
style: fix Style/BlockDelimiters cop check
2019-08-02 15:24:17 -03:00
Gonzalo Rodriguez
f5a352b8f9
style: limit line length to 120 columns
2019-08-02 10:51:53 -03:00
Gonzalo Rodriguez
58ba650e6b
feat: provide discriminator in throttle_data
2019-07-10 17:21:48 -03:00
Gonzalo Rodriguez
8e3077c845
style: enabled Style/RedundantBegin rubocop
2019-03-01 21:10:40 -03:00
Gonzalo Rodriguez
7dbb490c01
style: enabled Style/EmptyMethod rubocop
2019-03-01 21:09:46 -03:00
Gonzalo Rodriguez
20d668211e
style: fix Lint/HandleExceptions rubocop
2019-02-28 21:17:36 -03:00
Gonzalo Rodriguez
bf4e902407
Merge pull request #408 from grzuy/style
...
style: prefer ruby 1.9+ hash syntax
2019-02-28 21:07:20 -03:00