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
Gonzalo
8bf9d4efad
refactor: attempt to make method name more self explanatory and clear
2022-01-29 15:06:13 -03: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
e131750a6b
Make store proxies lookup dynamic
2021-02-07 12:56:50 -03:00
fatkodima
df354cd141
Make discriminators case-insensitive by default
2021-02-07 12:55:03 -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
Gonzalo Rodriguez
53c1d93fd1
style: avoid multiline ternary operator
2020-04-25 15:42:30 -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
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
edaa6c6a91
Make store proxies lookup dynamic
2019-10-25 01:41:24 +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
1f216e12e7
refactor: move require statement to correct file
2019-10-18 17:29:58 -03:00
fatkodima
a34c187dda
Allow to configure Retry-After header for default throttled_response handler
2019-10-17 00:26:13 +03:00
Gonzalo Rodriguez
0112405fb4
refactor: prefer require over autoload for const referenced in the same file
2019-10-16 17:43:16 -03:00
Gonzalo Rodriguez
20fdab0c50
style: fix indentation
2019-10-16 16:27:30 -03:00
fatkodima
7118b7a243
Extract Configuration class
2019-10-16 17:34:46 +03:00
Gonzalo Rodriguez
f65431f788
feat: provide possibility of rescuing any Rack::Attack error
2019-10-11 18:02:04 -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
0ce6befd68
style: update to latest rubocop
2019-08-02 17:04:52 -03:00
Gonzalo Rodriguez
8fafa7602b
style: fix Style/BlockDelimiters cop check
2019-08-02 15:24:17 -03:00
Gonzalo Rodriguez
c0328707b1
style: enable Style/ParallelAssignment cop checks
2019-08-02 13:47:54 -03:00
Gonzalo Rodriguez
c8021da91c
style: avoid compact class/module definitions
2019-08-02 11:17:41 -03:00
Gonzalo Rodriguez
6541634fb0
style: enable Style/Semicolon rubocop
2019-03-01 22:25:27 -03:00
Gonzalo Rodriguez
fcb89a6c12
refactor: avoid unnecessary nil argument passing
2019-03-01 22:22:11 -03:00
Gonzalo Rodriguez
0e8dff4c88
refactor: make Throttle.new consistent with Blocklist/Safelist.new
2019-03-01 22:12:32 -03:00
Gonzalo Rodriguez
3639afc196
refactor: remove unnecessary block local variable
2019-03-01 22:01:17 -03:00
Gonzalo Rodriguez
5a42fd3ac7
style: enable Style/OptionalArguments rubocop
2019-03-01 21:51:15 -03:00
Gonzalo Rodriguez
92bc56b7b7
style: enable Style/RedundantSelf rubocop
2019-03-01 21:15:50 -03:00
Gonzalo Rodriguez
a0259fb14a
style: enable Style/SingleLineMethods rubocop
2019-03-01 21:14:47 -03:00
Gonzalo Rodriguez
f772d0b3cd
Merge pull request #406 from grzuy/optional_name
...
Make blocklist/safelist name argument optional
2019-02-28 21:01:55 -03:00
Gonzalo Rodriguez
9a726bd29b
refactor: remove repeated initialization of anonymous_blocklists/safelists
2019-02-25 20:29:07 -03:00
Gonzalo Rodriguez
6addaa11d0
feat: make blocklist/safelist name argument optional
2019-02-24 21:04:51 -03:00
Gonzalo Rodriguez
6c6dfb06e3
feat: match ActiveSupport Instrumentation event name format spec
2019-02-24 20:19:38 -03:00
Gonzalo Rodriguez
91dbb52235
Remove unwrapping
2018-09-30 13:32:08 -03:00
Gonzalo Rodriguez
55411e5e82
Remove MemCacheProxy which existed only for now obsolete memcache-client
2018-09-03 18:24:21 -03:00
Jonathan del Strother
5cdc15b35a
Add a proxy to deal with ActiveSupport::Cache::MemCacheStore
...
If connection pooling is used with AS::Cache::MemCacheStore,
unwrap_active_support_stores wouldn't return the underlying dalli instance(s),
and so Rack::Attack.store would be the bare unproxied MemCacheStore instance.
Calling write then increment would silently fail because :raw wasn't used.
With this commit, we no longer try to unwrap AS::Cache::MemCacheStore instances.
2018-09-03 12:00:02 +01:00
Gonzalo Rodriguez
6fbb6c8b1c
Merge branch 'master' into support-redis-gem
2018-06-29 15:40:45 -03:00
Gonzalo Rodriguez
19e17562c1
Merge pull request #372 from grzuy/drop_deprecated_methods
...
Remove previously deprecated public methods
2018-06-28 19:12:41 -03:00
Gonzalo Rodriguez
1c1ee918e1
Remove previously deprecated public methods
2018-06-28 17:16:33 -03:00
Gonzalo Rodriguez
8315a1e7e1
Remove support for unmaintained ruby 2.2
2018-06-28 17:08:15 -03:00
Gonzalo Rodriguez
8802ebfbaf
Merge branch '255-correct-object-for-instrumentation'
2018-06-28 16:40:08 -03:00
Gonzalo Rodriguez
08861f8d17
Attempt to improve code legibility/clarity/semantics ( #357 )
...
* attempt to improve semantics for legibility
* Attempt to improve legibility by simplifying
* Make it more clear that we're calling procs/blocks here
* Enable rubocop Style/BlockDelimiters cop
* Prefer 'request' over 'req' abbreviation for legibility/clarity
* Instances of Track named 'track' not 'tracker'
2018-06-21 14:33:24 -03:00
Gonzalo Rodriguez
e6854bcb02
Enable rubocop Naming cops
2018-06-19 17:57:26 -03:00
Brian Kephart
4cc8d7d854
Support ActiveSupport::RedisCacheStore
2018-06-19 13:39:43 -03:00