incomplete-twitter4j4r 0.3.0-java → 0.3.1-java

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.
@@ -35,6 +35,11 @@ module Twitter4j4r
35
35
  self
36
36
  end
37
37
 
38
+ def on_deletion(&block)
39
+ @deletion_block = block
40
+ self
41
+ end
42
+
38
43
  def track(*terms, &block)
39
44
  add_listener(&block)
40
45
  @stream.filter(Java::Twitter4j::FilterQuery.new(0, nil, search_terms.to_java(:string)))
@@ -5,11 +5,12 @@ module Twitter4j4r
5
5
  class Listener
6
6
  include Java::Twitter4j::StatusListener
7
7
 
8
- def initialize(client, status_block, exception_block, limitation_block)
9
- @client = client
10
- @status_block = status_block
11
- @exception_block = exception_block
8
+ def initialize(client, status_block, exception_block, limitation_block, deletion_block)
9
+ @client = client
10
+ @status_block = status_block
11
+ @exception_block = exception_block
12
12
  @limitation_block = limitation_block
13
+ @deletion_block = deletion_block
13
14
  end
14
15
 
15
16
  def onStatus(status)
@@ -24,6 +25,10 @@ module Twitter4j4r
24
25
  call_block_with_client(@limitation_block, limited_count)
25
26
  end
26
27
 
28
+ def onDeletionBlock(notice)
29
+ call_block_with_client(@deletion_block, notice)
30
+ end
31
+
27
32
  protected
28
33
  def call_block_with_client(block, *args)
29
34
  block.call(*((args + [@client])[0, block.arity])) if block
@@ -1,3 +1,3 @@
1
1
  module Twitter4j4r
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: incomplete-twitter4j4r
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  prerelease:
6
6
  platform: java
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-05-07 00:00:00.000000000 Z
14
+ date: 2013-05-08 00:00:00.000000000 Z
15
15
  dependencies: []
16
16
  description: A thin, woefully inadequate wrapper around http://twitter4j.org/
17
17
  email: