wave_box 0.4.0 → 0.4.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.
@@ -36,6 +36,10 @@ module WaveBox
36
36
  end
37
37
  end
38
38
 
39
+ def clear!
40
+ @redis.del @key
41
+ end
42
+
39
43
  private
40
44
 
41
45
  # TODO: Current encode/decode solution sucks,
@@ -1,3 +1,3 @@
1
1
  module WaveBox
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
@@ -37,6 +37,14 @@ describe WaveBox::Box do
37
37
  @box.push "bar", Time.now - 10000
38
38
  @box.after(0)[0].must_equal "bar"
39
39
  end
40
+
41
+ it "should be able to clear everything inside it" do
42
+ @box.push "foo"
43
+
44
+ @box.clear!
45
+ @box.size.must_equal 0
46
+ end
47
+
40
48
  end
41
49
 
42
50
  describe "A box with limit" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wave_box
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-07 00:00:00.000000000 Z
12
+ date: 2013-06-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: redis
16
- requirement: &70280405090200 !ruby/object:Gem::Requirement
16
+ requirement: &70141141803820 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70280405090200
24
+ version_requirements: *70141141803820
25
25
  description: A simple push style messaging based on redis
26
26
  email:
27
27
  - poga.bahamut@gmail.com