with_rate_limit 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile.lock +1 -1
- data/lib/with_rate_limit.rb +1 -1
- data/lib/with_rate_limit/version.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2bb74aee5ddb1c3db2cfc8f5abda2eb4c5f46cd9
|
4
|
+
data.tar.gz: 1fcf3723bbf3b0094ae09572db3c5e6a9fe3090f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07fabbd45d87a918fea1f9a43196da2b871cd6c2c034100757130c2ec4046ed11d5141f189832da04cb70ae0845e1cf6018ce0a94153de24824952bdaf62d749
|
7
|
+
data.tar.gz: a21c6935560a83f2e1abd0788c14c4eaad3a91b35e641362ef5f4cd56eab7929a4b51571fbf4f8bdcdd72d82adfdea95e1088d3ac376d60d4980c76298ed23f4
|
data/Gemfile.lock
CHANGED
data/lib/with_rate_limit.rb
CHANGED
@@ -30,7 +30,7 @@ module WithRateLimit
|
|
30
30
|
elsif count_reset_delta > interval
|
31
31
|
cache.set(cache_key, {last_interval_started_at: timestamp, operations_count: 1})
|
32
32
|
else
|
33
|
-
cache.set(cache_key, {last_interval_started_at:
|
33
|
+
cache.set(cache_key, {last_interval_started_at: last_interval_started_at, operations_count: operations_count + 1})
|
34
34
|
end
|
35
35
|
|
36
36
|
begin
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: with_rate_limit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aleksandr Terletskiy
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Allows operations that are passed into `with_rate_limit` block to be
|
14
14
|
rate limited
|
@@ -45,7 +45,7 @@ metadata:
|
|
45
45
|
homepage_uri: https://github.com/aterletskiy/with-rate-limit
|
46
46
|
source_code_uri: https://github.com/aterletskiy/with-rate-limit
|
47
47
|
changelog_uri: https://github.com/aterletskiy/with_rate_limit/CHANGELOG.md
|
48
|
-
post_install_message:
|
48
|
+
post_install_message:
|
49
49
|
rdoc_options: []
|
50
50
|
require_paths:
|
51
51
|
- lib
|
@@ -60,8 +60,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
requirements: []
|
63
|
-
|
64
|
-
|
63
|
+
rubyforge_project:
|
64
|
+
rubygems_version: 2.4.8
|
65
|
+
signing_key:
|
65
66
|
specification_version: 4
|
66
67
|
summary: Rate limits operations that are passed in to block
|
67
68
|
test_files: []
|