redis-gcra 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/redis-gcra/version.rb +1 -1
- data/vendor/perform_gcra_ratelimit.lua +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e24cc90618628f397f2ceef8e2431ad3636ec59c
|
4
|
+
data.tar.gz: fd6315aa24c6e7b4bfd54e8c450bf5a819a0cd66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef79f8e1d372661b75e326f2681e966738e104f79ad3ed23eb3bfcee56ce3aab9b9bd56c27e06e78cb89bf49e143c2b2e42530478aa3cc3eb500890841947271
|
7
|
+
data.tar.gz: acb1bd7728d4382922b938c595987fac6baa70cfe8776c79d39b0999fb6c8cac20ac8cf6484c4c4a74558f75e0a1a7c16f6214517f561539a1eeb5e949294d68
|
data/lib/redis-gcra/version.rb
CHANGED
@@ -49,7 +49,7 @@ else
|
|
49
49
|
limited = 0
|
50
50
|
reset_after = new_tat - now
|
51
51
|
redis.call("SET", rate_limit_key, new_tat, "EX", math.ceil(reset_after))
|
52
|
-
remaining = math.floor(diff / emission_interval)
|
52
|
+
remaining = math.floor(diff / emission_interval + 0.5) -- poor man's round
|
53
53
|
retry_after = -1
|
54
54
|
end
|
55
55
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redis-gcra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Pravosud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|