rate-limit 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -1
- data/lib/rate_limit/config/defaults.rb +1 -2
- data/lib/rate_limit/throttler.rb +1 -1
- data/lib/rate_limit/version.rb +1 -1
- data/lib/rate_limit/worker.rb +2 -2
- data/lib/rate_limit.rb +3 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 154d386572bd5be061f5b366b97e668ad70078b3748ca85e31a08edf2eabc4ca
|
4
|
+
data.tar.gz: 4ff16eb9e838b9a33405cd477102fd0f3d52a0fe4047ba6ddd0028e4da44ad1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7b20463849dcc18251a7f98705465d8999670efb1861b8b59ef98140c1d60368d931b3b2723637cf1fc28f117d5b5b8474869638f6815063e3d9e9e66ccb3be
|
7
|
+
data.tar.gz: 37f15e0ef706b7740a5795ca171ea94e8591d37ec5a6923fbf92e19f08ab1b65fb1ec435d106e7c5b6cf711afcc7a407f84eba3c014536bc6d494c616111a193
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning].
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [v0.2.1] - 2022-11-09
|
11
|
+
|
12
|
+
### Added
|
13
|
+
|
14
|
+
- https://github.com/catawiki/rate-limit/pull/28 added Integration Tests
|
15
|
+
|
16
|
+
### Fixed
|
17
|
+
|
18
|
+
- https://github.com/catawiki/rate-limit/issues/29 Calling throttle with only_failures: true does not call success callback
|
19
|
+
|
20
|
+
|
10
21
|
## [v0.2.0] - 2022-10-05
|
11
22
|
|
12
23
|
### Added
|
@@ -65,6 +76,7 @@ and this project adheres to [Semantic Versioning].
|
|
65
76
|
|
66
77
|
<!-- versions -->
|
67
78
|
|
68
|
-
[Unreleased]: https://github.com/catawiki/rate-limit/compare/v0.1
|
79
|
+
[Unreleased]: https://github.com/catawiki/rate-limit/compare/v0.2.1...HEAD
|
80
|
+
[v0.2.1]: https://github.com/catawiki/rate-limit/compare/v0.2.0...v0.2.1
|
69
81
|
[v0.2.0]: https://github.com/catawiki/rate-limit/compare/v0.1.0...v0.2.0
|
70
82
|
[v0.1.0]: https://github.com/catawiki/rate-limit/compare/v0.0.1...v0.1.0
|
data/lib/rate_limit/throttler.rb
CHANGED
data/lib/rate_limit/version.rb
CHANGED
data/lib/rate_limit/worker.rb
CHANGED
@@ -33,8 +33,8 @@ module RateLimit
|
|
33
33
|
exceeded_window.present?
|
34
34
|
end
|
35
35
|
|
36
|
-
def success!
|
37
|
-
increment_cache_counter
|
36
|
+
def success!(skip_increment_cache: false)
|
37
|
+
increment_cache_counter unless skip_increment_cache
|
38
38
|
result.success!
|
39
39
|
RateLimit.config.success_callback(result)
|
40
40
|
end
|
data/lib/rate_limit.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rate-limit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mohamed Motaweh
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -17,9 +17,9 @@ dependencies:
|
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '5.2'
|
20
|
-
- - "
|
20
|
+
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 7.
|
22
|
+
version: '7.2'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -27,9 +27,9 @@ dependencies:
|
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '5.2'
|
30
|
-
- - "
|
30
|
+
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 7.
|
32
|
+
version: '7.2'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: redis
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
98
98
|
- !ruby/object:Gem::Version
|
99
99
|
version: '0'
|
100
100
|
requirements: []
|
101
|
-
rubygems_version: 3.
|
101
|
+
rubygems_version: 3.4.1
|
102
102
|
signing_key:
|
103
103
|
specification_version: 4
|
104
104
|
summary: A Rate Limiting Gem
|