better_rate_limit 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/better_rate_limit/throttle.rb +1 -1
- data/lib/better_rate_limit/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 454211c4744fb1f5ade5342a54ac4817ae535c7e70ba523152315ca1c2bd0440
|
4
|
+
data.tar.gz: d3146d311894d5f6f0cc7d69738e7b1ab2c0794fbc681660ce368d0e798e90e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f3137c0c5c9b5f8f69eb6c8d7823d0b968597aef3cf0fe89c068b50196d9ea34b247d6988fb9666be23efcf8e43e83f7c19a919c659c7c07c36cb39ffab9bba
|
7
|
+
data.tar.gz: 122491394a2ca936a6d0b8f9d45964ce3a948086eebaef777b09121ac5032145d0f64288a5b1219a11f97d6da244112f7bf9782bb533061112fce27f6cbd2788
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
better_rate_limit (0.1.
|
4
|
+
better_rate_limit (0.1.10)
|
5
5
|
actionpack (>= 5.0)
|
6
6
|
redis (>= 3.3)
|
7
7
|
|
@@ -60,7 +60,7 @@ GEM
|
|
60
60
|
rails-html-sanitizer (1.4.2)
|
61
61
|
loofah (~> 2.3)
|
62
62
|
rake (12.3.3)
|
63
|
-
redis (5.0.
|
63
|
+
redis (5.0.4)
|
64
64
|
redis-client (>= 0.7.4)
|
65
65
|
redis-client (0.8.0)
|
66
66
|
connection_pool
|
@@ -35,7 +35,7 @@ module BetterRateLimit
|
|
35
35
|
passing = first.to_time(:utc) < time_window.ago
|
36
36
|
|
37
37
|
unless passing
|
38
|
-
notify(key) unless redis_client.exists('failing-rate-limits:' + key)
|
38
|
+
notify(key) unless redis_client.exists?('failing-rate-limits:' + key)
|
39
39
|
redis_client.setex('failing-rate-limits:' + key, time_window.to_i, '1')
|
40
40
|
end
|
41
41
|
|