turnpike 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 71c0caf5486b4a3dd29477c55ad64dd46a524413
4
- data.tar.gz: 74a7c074fb111de0d96a35b5d8de8ac75d509270
3
+ metadata.gz: 1bef65c2725cc692f91f86c187db23d3dc7250e7
4
+ data.tar.gz: 3fddd1e0fc075d820b9ae6c00b006e42bfe0e599
5
5
  SHA512:
6
- metadata.gz: 80372b97d3b71ec35006cd72c933d2466de7334cf983496ba64c942e19ed8f81e3f577efe6a3bf44e31a665de96f759c53cf2824c946f57ea3d0f1dd05ff55b8
7
- data.tar.gz: 641c1458dc324d58e98369c04bf8e403e403be5acbac3747236cadcffe0edba72c176c8e68a8d0d57edf43ede2a30d2b1972c9333c7fa9e1c82d43456826f194
6
+ metadata.gz: 18f0f8e0481d419b622a86d708850694f6254063a954d4b4523dfeafda8f8fd48eef7699a89419f7675a0f0bde9b881dc43302b0927f8fcdd2050ca9aa234c5b
7
+ data.tar.gz: d6358963988ee4e42a24c6b7bc887c2d147cd65c776361296746c662a94a2e329c2d6596459966b9b7b76a3d6f543dd948caea8836c418be2d9973cb3f96c87c
@@ -21,7 +21,7 @@ module Turnpike
21
21
  #
22
22
  # items - A splat Array of items.
23
23
  #
24
- # Returns the Integer size of the queue after the operation.
24
+ # Returns nothing.
25
25
  def push(*items)
26
26
  redis.rpush(name, items.map { |i| pack(i) })
27
27
  end
@@ -37,7 +37,7 @@ module Turnpike
37
37
  #
38
38
  # items - A splat Array of items.
39
39
  #
40
- # Returns the Integer size of the queue after the operation.
40
+ # Returns nothing.
41
41
  def unshift(*items)
42
42
  redis.lpush(name, items.map { |i| pack(i) })
43
43
  end
@@ -31,12 +31,9 @@ module Turnpike
31
31
  #
32
32
  # items - A splat Array of items.
33
33
  #
34
- # Returns the Integer size of the queue after the operation.
34
+ # Returns nothing.
35
35
  def push(*items, score: Time.now.to_f)
36
- redis.multi do
37
- redis.zadd(name, items.reduce([]) { |ary, i| ary.push(score, pack(i)) })
38
- size
39
- end
36
+ redis.zadd(name, items.reduce([]) { |ary, i| ary.push(score, pack(i)) })
40
37
  end
41
38
 
42
39
  alias << push
@@ -50,7 +47,7 @@ module Turnpike
50
47
  #
51
48
  # items - A splat Array of items.
52
49
  #
53
- # Returns the Integer size of the queue after the operation.
50
+ # Returns nothing.
54
51
  def unshift(*items)
55
52
  _, score = redis.zrange(name, 0, 0, with_scores: true).pop
56
53
  score ? push(*items, score: score - 1) : push(*items)
@@ -1,3 +1,3 @@
1
1
  module Turnpike
2
- VERSION = '0.7.0'
2
+ VERSION = '0.7.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turnpike
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hakan Ensari