time_window_drop_collector 0.1.13 → 0.1.15

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  class TimeWindowDropCollector
2
- VERSION = "0.1.13"
2
+ VERSION = "0.1.15"
3
3
  end
@@ -8,7 +8,7 @@ class TimeWindowDropCollector
8
8
  end
9
9
 
10
10
  def incr( keys, expire_time )
11
- client.multi do
11
+ client.pipelined do
12
12
  keys.each do |key|
13
13
  client.incr( key )
14
14
  client.expire( key, expire_time )
@@ -1,12 +1,15 @@
1
1
  require_relative "test_helper"
2
2
 
3
3
  class RedisMock
4
- def multi(&block)
4
+ def multi
5
5
  yield
6
6
  end
7
7
  def incr(key);end
8
8
  def expire(key);end
9
9
  def mget(keys);end
10
+ def pipelined
11
+ yield
12
+ end
10
13
  end
11
14
 
12
15
  class RedisWrapperTest < Test::Unit::TestCase
@@ -30,11 +33,11 @@ class RedisWrapperTest < Test::Unit::TestCase
30
33
  wrapper.incr( ["key1", "key2"], "expire_time" )
31
34
  end
32
35
 
33
- def test_incr_agregates_commands_under_multi
36
+ def test_incr_agregates_commands_under_pipelined
34
37
  Redis.expects( :new ).returns( RedisMock.new )
35
38
  wrapper = TimeWindowDropCollector::Wrappers::Redis.new( nil )
36
39
 
37
- wrapper.client.expects( :multi )
40
+ wrapper.client.expects( :pipelined )
38
41
 
39
42
  wrapper.incr( nil, nil )
40
43
  end
@@ -111,7 +111,7 @@ class TimeWindowDropCollectorTest < Test::Unit::TestCase
111
111
  def test_reset
112
112
  twdc = TimeWindowDropCollector.new { client :mock }
113
113
 
114
- twdc.wrapper.client.expects(:reset)
114
+ twdc.wrapper.expects(:reset)
115
115
 
116
116
  twdc.reset
117
117
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: time_window_drop_collector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.13
4
+ version: 0.1.15
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-02-01 00:00:00.000000000Z
13
+ date: 2012-02-14 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
17
- requirement: &70311313062760 !ruby/object:Gem::Requirement
17
+ requirement: &70206581150800 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - =
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 1.0.21
23
23
  type: :development
24
24
  prerelease: false
25
- version_requirements: *70311313062760
25
+ version_requirements: *70206581150800
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: rake
28
- requirement: &70311313062260 !ruby/object:Gem::Requirement
28
+ requirement: &70206581150300 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - =
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: 0.9.2.2
34
34
  type: :development
35
35
  prerelease: false
36
- version_requirements: *70311313062260
36
+ version_requirements: *70206581150300
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: mocha
39
- requirement: &70311313061800 !ruby/object:Gem::Requirement
39
+ requirement: &70206581149840 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - =
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: 0.10.0
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *70311313061800
47
+ version_requirements: *70206581149840
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: delorean
50
- requirement: &70311313061340 !ruby/object:Gem::Requirement
50
+ requirement: &70206581149380 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - =
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: 1.2.0
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *70311313061340
58
+ version_requirements: *70206581149380
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: memcache_mock
61
- requirement: &70311313060880 !ruby/object:Gem::Requirement
61
+ requirement: &70206581148920 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - =
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: 0.0.1
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *70311313060880
69
+ version_requirements: *70206581148920
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: dalli
72
- requirement: &70311313060500 !ruby/object:Gem::Requirement
72
+ requirement: &70206581148540 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ! '>='
@@ -77,7 +77,7 @@ dependencies:
77
77
  version: '0'
78
78
  type: :runtime
79
79
  prerelease: false
80
- version_requirements: *70311313060500
80
+ version_requirements: *70206581148540
81
81
  description: Counter storage system for a concrete time window
82
82
  email:
83
83
  - fguillen.mail@gmail.com