excess_flow 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2bd6b92f5147a37fb46561d561a7ed1fd466f7d4eab6ff513091c950da9d3cd2
4
- data.tar.gz: 00f0df0ac3c72733bea83121d9fcd4fd86ae28299cbb1b546a1f6665ee756096
3
+ metadata.gz: c1286509536acfa9766f1b264bbed6e5526455b5cfed784549b33664b85a6681
4
+ data.tar.gz: e0717e50efd7aeb81e70ac2b58893de61933dc911d240f914900680935efc241
5
5
  SHA512:
6
- metadata.gz: 86e9a48b33b30368dd204dca5de7fd26b62114224bcd6940268ef6aca89f26d44f595679663539cf01f6ce8a45b64d1e9ab28d3ea75259df2b96af80dad6f30d
7
- data.tar.gz: 7a87f183a4581d0bcde8ef3070a87cc8fbd4881ebd169e976de907921dacebe54af92e378002c210f5dd23cb8d3cdba26dee6984c3b7d85b35a99bf552095dac
6
+ metadata.gz: 74c46e5def9b54e427e6dc006740138a506a2619b1666bf4834c1d516ddd5a61402eb624affbbbd87ba671a222bbd09d3630ffcf80385d68cf1e30b92b7c9330
7
+ data.tar.gz: 1f4350113809b5bbf493dc78efa77f5baaca2338c609aa101cfaa215ad788da5a44d9fc06ed1fd64add64672d3d8d6867e40154cbe91f2aba71a8e0eaf7e886a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.2
4
+ - Fixing a bug where `SlidingWindowStrategy` allowed occasional requests slip
5
+ through over the limit.
6
+
3
7
  ## 1.0.1
4
8
  - Fixing a bug where `FixedWindowStrategy` was not setting expiration on window.
5
9
 
@@ -23,5 +23,5 @@ module ExcessFlow
23
23
  LOCK_PREFIX = 'excess_flow::lock::'
24
24
  MUTEX_LOCK_TIME = 1
25
25
  MUTEX_SLEEP_TIME = 1 / 100_000
26
- VERSION = '1.0.1'
26
+ VERSION = '1.0.2'
27
27
  end
@@ -45,7 +45,7 @@ module ExcessFlow
45
45
  r.zadd(
46
46
  configuration.counter_key,
47
47
  current_timestamp,
48
- current_timestamp
48
+ SecureRandom.uuid
49
49
  )
50
50
  end
51
51
  end
data/lib/excess_flow.rb CHANGED
@@ -14,6 +14,7 @@
14
14
  # See the License for the specific language governing permissions and
15
15
  # limitations under the License.
16
16
 
17
+ require 'securerandom'
17
18
  require 'connection_pool'
18
19
  require 'redis'
19
20
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: excess_flow
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ConvertKit, LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-15 00:00:00.000000000 Z
11
+ date: 2019-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool