bhauman-twroute 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/twroute/polling_search.rb +1 -0
- data/test/polling_search_test.rb +15 -0
- data/twroute.gemspec +1 -1
- metadata +3 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.10
|
data/test/polling_search_test.rb
CHANGED
@@ -3,6 +3,11 @@ require 'twroute/polling_search'
|
|
3
3
|
|
4
4
|
class TestObserver
|
5
5
|
attr_accessor :results
|
6
|
+
|
7
|
+
def initialize
|
8
|
+
@results = []
|
9
|
+
end
|
10
|
+
|
6
11
|
def update(tweet_hash)
|
7
12
|
@results ||= []
|
8
13
|
@results << tweet_hash
|
@@ -46,6 +51,16 @@ class PollingSearchTest < Test::Unit::TestCase
|
|
46
51
|
@listen.results.first[:id].should <= @listen.results.last[:id]
|
47
52
|
|
48
53
|
end
|
54
|
+
|
55
|
+
should "handle an empty result set" do
|
56
|
+
@tweeter = Twroute::PollingSearch.new('bhauman',
|
57
|
+
'watertank',
|
58
|
+
{ :q => 'bxxxrxxxuxxxcxxxexxxasdf', :rpp => 1 })
|
59
|
+
|
60
|
+
@tweeter.add_observer( @listen = TestObserver.new )
|
61
|
+
@tweeter.send_query
|
62
|
+
@listen.results.length.should == 0
|
63
|
+
end
|
49
64
|
|
50
65
|
end
|
51
66
|
|
data/twroute.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bhauman-twroute
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bhauman
|
@@ -172,6 +172,7 @@ files:
|
|
172
172
|
- twroute.gemspec
|
173
173
|
has_rdoc: true
|
174
174
|
homepage: http://github.com/bhauman/twroute
|
175
|
+
licenses:
|
175
176
|
post_install_message:
|
176
177
|
rdoc_options:
|
177
178
|
- --charset=UTF-8
|
@@ -192,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
192
193
|
requirements: []
|
193
194
|
|
194
195
|
rubyforge_project:
|
195
|
-
rubygems_version: 1.
|
196
|
+
rubygems_version: 1.3.5
|
196
197
|
signing_key:
|
197
198
|
specification_version: 2
|
198
199
|
summary: Twroute listens for Twitter updates and redirects them to HTTP post requests
|