- Drop support for Ruby below 3.1
- Add tests with Active Support 7.2 and Rails main
- Drop Ruby < 2.7
- Test with Ruby 3.2 and 3.3
- Run tests with both Active Support 7.0 and 7.1
- Add after_evaluated callback support
- Specify raw when reading raw cache entries PR
- Feature: Add threshold to Prop::RateLimited exception
- Bugfix: Set expires_in on increment and decrement
- Use interval value as the ttl when writing to cache
- Bugfix: Fix leaky bucket implementation
- Allow zero case for threshold when configure the prop
- See PR description
- Bugfix: Fix concurrency bug
- See PR description
- Add a reader method for
cache
to top levelProp
module - Added compatibility with Rails 5.2
- Added compatibility with Rails 5.1
- Remove Fixnum and replace with Integer per 2.4.1 Deprecations
- Supported Rubies: 2.4.1, 2.3.4, 2.2.7
- Bugfix: Fix underflow error in decrement method
- See: PR Description
- Support decrement method for LeakyBucketStrategy
- Support multiple rails versions (3.2, 4.1, 4.2, 5.0)
- Support decrement method for IntervalStrategy
Decrement can be used to for example throttle before an expensive action and then give quota back when some condition is met.
:decrement
is only supported for IntervalStrategy
for now
In case of api failures we want to decrement the rate limit:
Prop.throttle!(:api_counts, request.remote_ip, decrement: 1)
- Freeze string literals