rapidity 0.0.2.59005 → 0.0.2.59006

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: 004e68dd80ed2ad9d0956207e413d092320406ef7d889956de8e93d9bf9b7327
4
- data.tar.gz: c2c05a95c87bb97655d0d0cf827a6db4294933315e2dc518c7fb398a4b82725d
3
+ metadata.gz: 52c3b13fc375998d489d1d4ad9d8099dcbeab6ad9aa65c20bce1d49193a5ea0f
4
+ data.tar.gz: cc5da7d8397f34feffc4bbf96a8f7466ecdd542462c3f473151b8afab7b30c5d
5
5
  SHA512:
6
- metadata.gz: e2eceaa1080720fdd72a47498dc7843f1387124d5519757eacf2217c6b85cf6384b7853cb904d33437de83bc2bad4d6a9b3db923331876687868157672913a6a
7
- data.tar.gz: 5d581e6817bb736228e333fcb6586c882a2ea9b8e98a0d3b3911b2dca08985d922fb1fc0e5f8f46e35a01a84cd9a2400def848482c5c2d8d5f21c1abeb922e3d
6
+ metadata.gz: 626c35d1e78b655107d510d930e1b6a16bebce3edc4a2250cc060717ed5d62dd8619a00441d9cf21e5f0ec9b8d12eaa03f8a1fa0e47162fbaad678fb59e8bb1c
7
+ data.tar.gz: 92d2881827bd9d550a856733b0d816df83c4e44bbebd58909698a937e12a8997bfd99b56727dc023561c01079c0f2445b61193ac811bc8b4c2fea2179d9103ad
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rapidity (0.0.2.59005)
4
+ rapidity (0.0.2.59006)
5
5
  activesupport
6
6
  connection_pool
7
7
  redis
@@ -41,6 +41,8 @@ module Rapidity
41
41
  # Obtain values from counter
42
42
  # @return count succesfuly obtained send slots
43
43
  def obtain(count = 5)
44
+ count = count.abs
45
+
44
46
  _, taken = @pool.with do |conn|
45
47
  conn.multi do
46
48
  conn.set(key('remains'), threshold, ex: interval, nx: true)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rapidity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2.59005
4
+ version: 0.0.2.59006
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yurusov Vlad