twitter_filter 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -84,9 +84,9 @@ class GetTweets
84
84
  tsc = TweetStream::Client.new
85
85
  tsc.sample do |status, client|
86
86
  handle_tweet(status)
87
- client.stop if more_tweets == 0
87
+ client.stop if more_tweets <= 0
88
88
  end
89
- (sleep 0.1 until more_tweets == 0) if num
89
+ (sleep 0.2 until more_tweets <= 0) if num
90
90
  tweets
91
91
  end
92
92
 
@@ -96,9 +96,9 @@ class GetTweets
96
96
  tsc = TweetStream::Client.new
97
97
  tsc.track(term) do |status, client|
98
98
  handle_tweet(status)
99
- client.stop if more_tweets == 0
99
+ client.stop if more_tweets <= 0
100
100
  end
101
- (sleep 0.1 until more_tweets == 0) if num
101
+ (sleep 0.2 until more_tweets <= 0) if num
102
102
  tweets
103
103
  end
104
104
  end
@@ -1,6 +1,6 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module TwitterFilter
4
- VERSION = '0.0.4'
5
- DATE = '2013-03-08'
4
+ VERSION = '0.0.5'
5
+ DATE = '2013-03-11'
6
6
  end
@@ -88,7 +88,7 @@ describe GetTweets do
88
88
  it "gets and saves the correct number of tweets" do
89
89
 
90
90
  twenty_tweets = gt.sample(20, {display: false})
91
- twenty_tweets.size.should == 20
91
+ twenty_tweets.tweets.length.should >= 20
92
92
 
93
93
  end
94
94
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitter_filter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-08 00:00:00.000000000 Z
12
+ date: 2013-03-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec