t 0.9.5 → 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +5 -3
- data/Rakefile +0 -2
- data/lib/t.rb +15 -0
- data/lib/t/cli.rb +47 -59
- data/lib/t/collectable.rb +12 -8
- data/lib/t/delete.rb +4 -3
- data/lib/t/list.rb +3 -5
- data/lib/t/printable.rb +50 -81
- data/lib/t/search.rb +51 -62
- data/lib/t/stream.rb +15 -22
- data/lib/t/version.rb +1 -1
- data/spec/cli_spec.rb +198 -65
- data/spec/fixtures/rate_limit_status.json +1 -0
- data/spec/fixtures/status.json +1 -1
- data/spec/fixtures/status_no_attributes.json +1 -0
- data/spec/fixtures/status_no_country.json +1 -0
- data/spec/fixtures/status_no_full_name.json +1 -0
- data/spec/fixtures/status_no_locality.json +1 -0
- data/spec/fixtures/status_no_street_address.json +1 -0
- data/spec/helper.rb +1 -0
- data/spec/list_spec.rb +9 -9
- data/spec/rcfile_spec.rb +1 -1
- data/spec/search_spec.rb +319 -49
- data/spec/t_spec.rb +31 -0
- data/t.gemspec +2 -3
- metadata +22 -24
@@ -0,0 +1 @@
|
|
1
|
+
{"remaining_hits":19993,"hourly_limit":20000,"reset_time_in_seconds":1288060988,"reset_time":"Tue Oct 26 02:43:08 +0000 2010"}
|
data/spec/fixtures/status.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"created_at":"Wed Apr 06 19:13:37 +0000 2011","id":55709764298092545,"id_str":"55709764298092545","text":"The problem with your code is that it's doing exactly what you told it to do.","source":"\u003ca href=\"http:\/\/twitter.com\/#!\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":7505382,"id_str":"7505382","name":"Erik Michaels-Ober","screen_name":"sferik","location":"San Francisco","description":"My heart is in the work.","url":"https:\/\/github.com\/sferik","protected":false,"followers_count":2094,"friends_count":203,"listed_count":114,"created_at":"Mon Jul 16 12:59:01 +0000 2007","favourites_count":3073,"utc_offset":-28800,"time_zone":"Pacific Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":6890,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"000000","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1759857427\/image1326743606_normal.png","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1759857427\/image1326743606_normal.png","profile_link_color":"0084B4","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"show_all_inline_media":true,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false},"geo":
|
1
|
+
{"created_at":"Wed Apr 06 19:13:37 +0000 2011","id":55709764298092545,"id_str":"55709764298092545","text":"The problem with your code is that it's doing exactly what you told it to do.","source":"\u003ca href=\"http:\/\/twitter.com\/#!\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":7505382,"id_str":"7505382","name":"Erik Michaels-Ober","screen_name":"sferik","location":"San Francisco","description":"My heart is in the work.","url":"https:\/\/github.com\/sferik","protected":false,"followers_count":2094,"friends_count":203,"listed_count":114,"created_at":"Mon Jul 16 12:59:01 +0000 2007","favourites_count":3073,"utc_offset":-28800,"time_zone":"Pacific Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":6890,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"000000","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1759857427\/image1326743606_normal.png","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1759857427\/image1326743606_normal.png","profile_link_color":"0084B4","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"show_all_inline_media":true,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false},"geo":{"type":"Point","coordinates":[37.75963095,-122.410067]},"coordinates":{"type":"Point","coordinates":[-122.410067,37.75963095]},"place":{"id":"f29bbd03562e37d1","url":"http:\/\/api.twitter.com\/1\/geo\/id\/f29bbd03562e37d1.json","place_type":"poi","name":"Blowfish Sushi To Die For","full_name":"Blowfish Sushi To Die For, San Francisco","country_code":"US","country":"United States","bounding_box":{"type":"Polygon","coordinates":[[[-122.409954,37.759597],[-122.409954,37.759597],[-122.409954,37.759597],[-122.409954,37.759597]]]},"attributes":{"region":"California","locality":"San Francisco","street_address":"2170 Bryant St"}},"contributors":null,"retweet_count":320,"favorited":false,"retweeted":false,"possibly_sensitive":false}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"created_at":"Wed Apr 06 19:13:37 +0000 2011","id":55709764298092545,"id_str":"55709764298092545","text":"The problem with your code is that it's doing exactly what you told it to do.","source":"\u003ca href=\"http:\/\/twitter.com\/#!\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":7505382,"id_str":"7505382","name":"Erik Michaels-Ober","screen_name":"sferik","location":"San Francisco","description":"My heart is in the work.","url":"https:\/\/github.com\/sferik","protected":false,"followers_count":2094,"friends_count":203,"listed_count":114,"created_at":"Mon Jul 16 12:59:01 +0000 2007","favourites_count":3073,"utc_offset":-28800,"time_zone":"Pacific Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":6890,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"000000","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1759857427\/image1326743606_normal.png","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1759857427\/image1326743606_normal.png","profile_link_color":"0084B4","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"show_all_inline_media":true,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false},"geo":{"type":"Point","coordinates":[37.75963095,-122.410067]},"coordinates":{"type":"Point","coordinates":[-122.410067,37.75963095]},"place":{"id":"f29bbd03562e37d1","url":"http:\/\/api.twitter.com\/1\/geo\/id\/f29bbd03562e37d1.json","place_type":"poi","name":"Blowfish Sushi To Die For","full_name":"Blowfish Sushi To Die For, San Francisco","country_code":"US","country":"United States","bounding_box":{"type":"Polygon","coordinates":[[[-122.409954,37.759597],[-122.409954,37.759597],[-122.409954,37.759597],[-122.409954,37.759597]]]}},"contributors":null,"retweet_count":320,"favorited":false,"retweeted":false,"possibly_sensitive":false}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"created_at":"Wed Apr 06 19:13:37 +0000 2011","id":55709764298092545,"id_str":"55709764298092545","text":"The problem with your code is that it's doing exactly what you told it to do.","source":"\u003ca href=\"http:\/\/twitter.com\/#!\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":7505382,"id_str":"7505382","name":"Erik Michaels-Ober","screen_name":"sferik","location":"San Francisco","description":"My heart is in the work.","url":"https:\/\/github.com\/sferik","protected":false,"followers_count":2094,"friends_count":203,"listed_count":114,"created_at":"Mon Jul 16 12:59:01 +0000 2007","favourites_count":3073,"utc_offset":-28800,"time_zone":"Pacific Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":6890,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"000000","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1759857427\/image1326743606_normal.png","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1759857427\/image1326743606_normal.png","profile_link_color":"0084B4","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"show_all_inline_media":true,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false},"geo":{"type":"Point","coordinates":[37.75963095,-122.410067]},"coordinates":{"type":"Point","coordinates":[-122.410067,37.75963095]},"place":{"id":"f29bbd03562e37d1","url":"http:\/\/api.twitter.com\/1\/geo\/id\/f29bbd03562e37d1.json","place_type":"poi","name":"Blowfish Sushi To Die For","full_name":"Blowfish Sushi To Die For, San Francisco","bounding_box":{"type":"Polygon","coordinates":[[[-122.409954,37.759597],[-122.409954,37.759597],[-122.409954,37.759597],[-122.409954,37.759597]]]}},"contributors":null,"retweet_count":320,"favorited":false,"retweeted":false,"possibly_sensitive":false}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"created_at":"Wed Apr 06 19:13:37 +0000 2011","id":55709764298092545,"id_str":"55709764298092545","text":"The problem with your code is that it's doing exactly what you told it to do.","source":"\u003ca href=\"http:\/\/twitter.com\/#!\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":7505382,"id_str":"7505382","name":"Erik Michaels-Ober","screen_name":"sferik","location":"San Francisco","description":"My heart is in the work.","url":"https:\/\/github.com\/sferik","protected":false,"followers_count":2094,"friends_count":203,"listed_count":114,"created_at":"Mon Jul 16 12:59:01 +0000 2007","favourites_count":3073,"utc_offset":-28800,"time_zone":"Pacific Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":6890,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"000000","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1759857427\/image1326743606_normal.png","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1759857427\/image1326743606_normal.png","profile_link_color":"0084B4","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"show_all_inline_media":true,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false},"geo":{"type":"Point","coordinates":[37.75963095,-122.410067]},"coordinates":{"type":"Point","coordinates":[-122.410067,37.75963095]},"place":{"id":"f29bbd03562e37d1","url":"http:\/\/api.twitter.com\/1\/geo\/id\/f29bbd03562e37d1.json","place_type":"poi","name":"Blowfish Sushi To Die For","bounding_box":{"type":"Polygon","coordinates":[[[-122.409954,37.759597],[-122.409954,37.759597],[-122.409954,37.759597],[-122.409954,37.759597]]]}},"contributors":null,"retweet_count":320,"favorited":false,"retweeted":false,"possibly_sensitive":false}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"created_at":"Wed Apr 06 19:13:37 +0000 2011","id":55709764298092545,"id_str":"55709764298092545","text":"The problem with your code is that it's doing exactly what you told it to do.","source":"\u003ca href=\"http:\/\/twitter.com\/#!\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":7505382,"id_str":"7505382","name":"Erik Michaels-Ober","screen_name":"sferik","location":"San Francisco","description":"My heart is in the work.","url":"https:\/\/github.com\/sferik","protected":false,"followers_count":2094,"friends_count":203,"listed_count":114,"created_at":"Mon Jul 16 12:59:01 +0000 2007","favourites_count":3073,"utc_offset":-28800,"time_zone":"Pacific Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":6890,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"000000","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1759857427\/image1326743606_normal.png","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1759857427\/image1326743606_normal.png","profile_link_color":"0084B4","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"show_all_inline_media":true,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false},"geo":{"type":"Point","coordinates":[37.75963095,-122.410067]},"coordinates":{"type":"Point","coordinates":[-122.410067,37.75963095]},"place":{"id":"f29bbd03562e37d1","url":"http:\/\/api.twitter.com\/1\/geo\/id\/f29bbd03562e37d1.json","place_type":"poi","name":"Blowfish Sushi To Die For","full_name":"Blowfish Sushi To Die For, San Francisco","country_code":"US","country":"United States","bounding_box":{"type":"Polygon","coordinates":[[[-122.409954,37.759597],[-122.409954,37.759597],[-122.409954,37.759597],[-122.409954,37.759597]]]},"attributes":{"region":"California"}},"contributors":null,"retweet_count":320,"favorited":false,"retweeted":false,"possibly_sensitive":false}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"created_at":"Wed Apr 06 19:13:37 +0000 2011","id":55709764298092545,"id_str":"55709764298092545","text":"The problem with your code is that it's doing exactly what you told it to do.","source":"\u003ca href=\"http:\/\/twitter.com\/#!\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":7505382,"id_str":"7505382","name":"Erik Michaels-Ober","screen_name":"sferik","location":"San Francisco","description":"My heart is in the work.","url":"https:\/\/github.com\/sferik","protected":false,"followers_count":2094,"friends_count":203,"listed_count":114,"created_at":"Mon Jul 16 12:59:01 +0000 2007","favourites_count":3073,"utc_offset":-28800,"time_zone":"Pacific Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":6890,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"000000","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1759857427\/image1326743606_normal.png","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1759857427\/image1326743606_normal.png","profile_link_color":"0084B4","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"show_all_inline_media":true,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false},"geo":{"type":"Point","coordinates":[37.75963095,-122.410067]},"coordinates":{"type":"Point","coordinates":[-122.410067,37.75963095]},"place":{"id":"f29bbd03562e37d1","url":"http:\/\/api.twitter.com\/1\/geo\/id\/f29bbd03562e37d1.json","place_type":"poi","name":"Blowfish Sushi To Die For","full_name":"Blowfish Sushi To Die For, San Francisco","country_code":"US","country":"United States","bounding_box":{"type":"Polygon","coordinates":[[[-122.409954,37.759597],[-122.409954,37.759597],[-122.409954,37.759597],[-122.409954,37.759597]]]},"attributes":{"region":"California","locality":"San Francisco"}},"contributors":null,"retweet_count":320,"favorited":false,"retweeted":false,"possibly_sensitive":false}
|
data/spec/helper.rb
CHANGED
data/spec/list_spec.rb
CHANGED
@@ -169,7 +169,7 @@ ID,Description,Slug,Screen name,Created at,Members,Subscribers,Following,Mode,UR
|
|
169
169
|
end
|
170
170
|
it "should have the correct output" do
|
171
171
|
@list.members("presidents")
|
172
|
-
$stdout.string.rstrip.should == "
|
172
|
+
$stdout.string.rstrip.should == "pengwynn sferik"
|
173
173
|
end
|
174
174
|
context "--csv" do
|
175
175
|
before do
|
@@ -190,7 +190,7 @@ ID,Since,Tweets,Favorites,Listed,Following,Followers,Screen name,Name
|
|
190
190
|
end
|
191
191
|
it "should sort by number of favorites" do
|
192
192
|
@list.members("presidents")
|
193
|
-
$stdout.string.rstrip.should == "
|
193
|
+
$stdout.string.rstrip.should == "pengwynn sferik"
|
194
194
|
end
|
195
195
|
end
|
196
196
|
context "--followers" do
|
@@ -199,7 +199,7 @@ ID,Since,Tweets,Favorites,Listed,Following,Followers,Screen name,Name
|
|
199
199
|
end
|
200
200
|
it "should sort by number of followers" do
|
201
201
|
@list.members("presidents")
|
202
|
-
$stdout.string.rstrip.should == "
|
202
|
+
$stdout.string.rstrip.should == "sferik pengwynn"
|
203
203
|
end
|
204
204
|
end
|
205
205
|
context "--friends" do
|
@@ -208,7 +208,7 @@ ID,Since,Tweets,Favorites,Listed,Following,Followers,Screen name,Name
|
|
208
208
|
end
|
209
209
|
it "should sort by number of friends" do
|
210
210
|
@list.members("presidents")
|
211
|
-
$stdout.string.rstrip.should == "
|
211
|
+
$stdout.string.rstrip.should == "sferik pengwynn"
|
212
212
|
end
|
213
213
|
end
|
214
214
|
context "--listed" do
|
@@ -217,7 +217,7 @@ ID,Since,Tweets,Favorites,Listed,Following,Followers,Screen name,Name
|
|
217
217
|
end
|
218
218
|
it "should sort by number of list memberships" do
|
219
219
|
@list.members("presidents")
|
220
|
-
$stdout.string.rstrip.should == "
|
220
|
+
$stdout.string.rstrip.should == "sferik pengwynn"
|
221
221
|
end
|
222
222
|
end
|
223
223
|
context "--long" do
|
@@ -239,7 +239,7 @@ ID Since Tweets Favorites Listed Following Followers Scre...
|
|
239
239
|
end
|
240
240
|
it "should sort by the time wshen Twitter account was created" do
|
241
241
|
@list.members("presidents")
|
242
|
-
$stdout.string.rstrip.should == "
|
242
|
+
$stdout.string.rstrip.should == "sferik pengwynn"
|
243
243
|
end
|
244
244
|
end
|
245
245
|
context "--reverse" do
|
@@ -248,7 +248,7 @@ ID Since Tweets Favorites Listed Following Followers Scre...
|
|
248
248
|
end
|
249
249
|
it "should reverse the order of the sort" do
|
250
250
|
@list.members("presidents")
|
251
|
-
$stdout.string.rstrip.should == "
|
251
|
+
$stdout.string.rstrip.should == "sferik pengwynn"
|
252
252
|
end
|
253
253
|
end
|
254
254
|
context "--tweets" do
|
@@ -257,7 +257,7 @@ ID Since Tweets Favorites Listed Following Followers Scre...
|
|
257
257
|
end
|
258
258
|
it "should sort by number of Tweets" do
|
259
259
|
@list.members("presidents")
|
260
|
-
$stdout.string.rstrip.should == "
|
260
|
+
$stdout.string.rstrip.should == "sferik pengwynn"
|
261
261
|
end
|
262
262
|
end
|
263
263
|
context "--unsorted" do
|
@@ -266,7 +266,7 @@ ID Since Tweets Favorites Listed Following Followers Scre...
|
|
266
266
|
end
|
267
267
|
it "should not be sorted" do
|
268
268
|
@list.members("presidents")
|
269
|
-
$stdout.string.rstrip.should == "
|
269
|
+
$stdout.string.rstrip.should == "sferik pengwynn"
|
270
270
|
end
|
271
271
|
end
|
272
272
|
context "with a user passed" do
|
data/spec/rcfile_spec.rb
CHANGED
data/spec/search_spec.rb
CHANGED
@@ -466,86 +466,356 @@ ID Posted at Screen name Text
|
|
466
466
|
should have_been_made.times(3)
|
467
467
|
end
|
468
468
|
end
|
469
|
+
context "with a user passed" do
|
470
|
+
before do
|
471
|
+
stub_get("/1/statuses/user_timeline.json").
|
472
|
+
with(:query => {:count => "200", :screen_name => "sferik"}).
|
473
|
+
to_return(:body => fixture("statuses.json"), :headers => {:content_type => "application/json; charset=utf-8"})
|
474
|
+
stub_get("/1/statuses/user_timeline.json").
|
475
|
+
with(:query => {:count => "200", :max_id => "194546264212385792", :screen_name => "sferik"}).
|
476
|
+
to_return(:body => fixture("empty_array.json"), :headers => {:content_type => "application/json; charset=utf-8"})
|
477
|
+
end
|
478
|
+
it "should request the correct resource" do
|
479
|
+
@search.timeline("sferik", "twitter")
|
480
|
+
a_get("/1/statuses/user_timeline.json").
|
481
|
+
with(:query => {:count => "200", :screen_name => "sferik"}).
|
482
|
+
should have_been_made
|
483
|
+
a_get("/1/statuses/user_timeline.json").
|
484
|
+
with(:query => {:count => "200", :max_id => "194546264212385792", :screen_name => "sferik"}).
|
485
|
+
should have_been_made
|
486
|
+
end
|
487
|
+
it "should have the correct output" do
|
488
|
+
@search.timeline("sferik", "twitter")
|
489
|
+
$stdout.string.should =~ /@bartt/
|
490
|
+
$stdout.string.should =~ /@noahlt @gaarf Yup, now owning @twitter -> FB from FE to daemons\. Lot’s/
|
491
|
+
$stdout.string.should =~ /fun\. Expect improvements in the weeks to come\./
|
492
|
+
end
|
493
|
+
context "--csv" do
|
494
|
+
before do
|
495
|
+
@search.options = @search.options.merge("csv" => true)
|
496
|
+
end
|
497
|
+
it "should output in CSV format" do
|
498
|
+
@search.timeline("sferik", "twitter")
|
499
|
+
$stdout.string.should == <<-eos
|
500
|
+
ID,Posted at,Screen name,Text
|
501
|
+
194546727670390784,2011-04-23 22:02:09 +0000,bartt,"@noahlt @gaarf Yup, now owning @twitter -> FB from FE to daemons. Lot’s of fun. Expect improvements in the weeks to come."
|
502
|
+
eos
|
503
|
+
end
|
504
|
+
end
|
505
|
+
context "--id" do
|
506
|
+
before do
|
507
|
+
@search.options = @search.options.merge("id" => true)
|
508
|
+
stub_get("/1/statuses/user_timeline.json").
|
509
|
+
with(:query => {:count => "200", :user_id => "7505382"}).
|
510
|
+
to_return(:body => fixture("statuses.json"), :headers => {:content_type => "application/json; charset=utf-8"})
|
511
|
+
stub_get("/1/statuses/user_timeline.json").
|
512
|
+
with(:query => {:count => "200", :max_id => "194546264212385792", :user_id => "7505382"}).
|
513
|
+
to_return(:body => fixture("empty_array.json"), :headers => {:content_type => "application/json; charset=utf-8"})
|
514
|
+
end
|
515
|
+
it "should request the correct resource" do
|
516
|
+
@search.timeline("7505382", "twitter")
|
517
|
+
a_get("/1/statuses/user_timeline.json").
|
518
|
+
with(:query => {:count => "200", :user_id => "7505382"}).
|
519
|
+
should have_been_made
|
520
|
+
a_get("/1/statuses/user_timeline.json").
|
521
|
+
with(:query => {:count => "200", :max_id => "194546264212385792", :user_id => "7505382"}).
|
522
|
+
should have_been_made
|
523
|
+
end
|
524
|
+
end
|
525
|
+
context "--long" do
|
526
|
+
before do
|
527
|
+
@search.options = @search.options.merge("long" => true)
|
528
|
+
end
|
529
|
+
it "should output in long format" do
|
530
|
+
@search.timeline("sferik", "twitter")
|
531
|
+
$stdout.string.should == <<-eos
|
532
|
+
ID Posted at Screen name Text
|
533
|
+
194546727670390784 Apr 23 2011 @bartt @noahlt @gaarf Yup, now owning...
|
534
|
+
eos
|
535
|
+
end
|
536
|
+
end
|
537
|
+
context "Twitter is down" do
|
538
|
+
it "should retry 3 times and then raise an error" do
|
539
|
+
stub_get("/1/statuses/user_timeline.json").
|
540
|
+
with(:query => {:screen_name => "sferik", :count => "200"}).
|
541
|
+
to_return(:status => 502)
|
542
|
+
lambda do
|
543
|
+
@search.timeline("sferik", "twitter")
|
544
|
+
end.should raise_error("Twitter is down or being upgraded.")
|
545
|
+
a_get("/1/statuses/user_timeline.json").
|
546
|
+
with(:query => {:screen_name => "sferik", :count => "200"}).
|
547
|
+
should have_been_made.times(3)
|
548
|
+
end
|
549
|
+
end
|
550
|
+
end
|
469
551
|
end
|
470
552
|
|
471
|
-
describe "#
|
553
|
+
describe "#users" do
|
472
554
|
before do
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
to_return(:body => fixture("empty_array.json"), :headers => {:content_type => "application/json; charset=utf-8"})
|
555
|
+
1.upto(50).each do |page|
|
556
|
+
stub_get("/1/users/search.json").
|
557
|
+
with(:query => {:page => page.to_s, :per_page => "20", :q => "Erik", }).
|
558
|
+
to_return(:body => fixture("users.json"), :headers => {:content_type => "application/json; charset=utf-8"})
|
559
|
+
end
|
479
560
|
end
|
480
561
|
it "should request the correct resource" do
|
481
|
-
@search.
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
should have_been_made
|
562
|
+
@search.users("Erik")
|
563
|
+
1.upto(50).each do |page|
|
564
|
+
a_get("/1/users/search.json").
|
565
|
+
with(:query => {:page => page.to_s, :per_page => "20", :q => "Erik", }).
|
566
|
+
should have_been_made
|
567
|
+
end
|
488
568
|
end
|
489
569
|
it "should have the correct output" do
|
490
|
-
@search.
|
491
|
-
$stdout.string.should
|
492
|
-
|
493
|
-
|
570
|
+
@search.users("Erik")
|
571
|
+
$stdout.string.should == <<-eos
|
572
|
+
pengwynn pengwynn pengwynn pengwynn pengwynn pengwynn pengwynn pengwynn
|
573
|
+
pengwynn pengwynn pengwynn pengwynn pengwynn pengwynn pengwynn pengwynn
|
574
|
+
pengwynn pengwynn pengwynn pengwynn pengwynn pengwynn pengwynn pengwynn
|
575
|
+
pengwynn pengwynn pengwynn pengwynn pengwynn pengwynn pengwynn pengwynn
|
576
|
+
pengwynn pengwynn pengwynn pengwynn pengwynn pengwynn pengwynn pengwynn
|
577
|
+
pengwynn pengwynn pengwynn pengwynn pengwynn pengwynn pengwynn pengwynn
|
578
|
+
pengwynn pengwynn sferik sferik sferik sferik sferik sferik
|
579
|
+
sferik sferik sferik sferik sferik sferik sferik sferik
|
580
|
+
sferik sferik sferik sferik sferik sferik sferik sferik
|
581
|
+
sferik sferik sferik sferik sferik sferik sferik sferik
|
582
|
+
sferik sferik sferik sferik sferik sferik sferik sferik
|
583
|
+
sferik sferik sferik sferik sferik sferik sferik sferik
|
584
|
+
sferik sferik sferik sferik
|
585
|
+
eos
|
494
586
|
end
|
495
587
|
context "--csv" do
|
496
588
|
before do
|
497
589
|
@search.options = @search.options.merge("csv" => true)
|
498
590
|
end
|
499
591
|
it "should output in CSV format" do
|
500
|
-
@search.
|
592
|
+
@search.users("Erik")
|
501
593
|
$stdout.string.should == <<-eos
|
502
|
-
ID,
|
503
|
-
|
594
|
+
ID,Since,Tweets,Favorites,Listed,Following,Followers,Screen name,Name
|
595
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
596
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
597
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
598
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
599
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
600
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
601
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
602
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
603
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
604
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
605
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
606
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
607
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
608
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
609
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
610
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
611
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
612
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
613
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
614
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
615
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
616
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
617
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
618
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
619
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
620
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
621
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
622
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
623
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
624
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
625
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
626
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
627
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
628
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
629
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
630
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
631
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
632
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
633
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
634
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
635
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
636
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
637
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
638
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
639
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
640
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
641
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
642
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
643
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
644
|
+
14100886,2008-03-08 16:34:22 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
|
645
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
646
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
647
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
648
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
649
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
650
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
651
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
652
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
653
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
654
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
655
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
656
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
657
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
658
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
659
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
660
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
661
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
662
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
663
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
664
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
665
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
666
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
667
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
668
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
669
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
670
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
671
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
672
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
673
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
674
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
675
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
676
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
677
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
678
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
679
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
680
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
681
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
682
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
683
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
684
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
685
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
686
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
687
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
688
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
689
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
690
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
691
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
692
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
693
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
694
|
+
7505382,2007-07-16 12:59:01 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
|
504
695
|
eos
|
505
696
|
end
|
506
697
|
end
|
507
|
-
context "--id" do
|
508
|
-
before do
|
509
|
-
@search.options = @search.options.merge("id" => true)
|
510
|
-
stub_get("/1/statuses/user_timeline.json").
|
511
|
-
with(:query => {:count => "200", :user_id => "7505382"}).
|
512
|
-
to_return(:body => fixture("statuses.json"), :headers => {:content_type => "application/json; charset=utf-8"})
|
513
|
-
stub_get("/1/statuses/user_timeline.json").
|
514
|
-
with(:query => {:count => "200", :max_id => "194546264212385792", :user_id => "7505382"}).
|
515
|
-
to_return(:body => fixture("empty_array.json"), :headers => {:content_type => "application/json; charset=utf-8"})
|
516
|
-
end
|
517
|
-
it "should request the correct resource" do
|
518
|
-
@search.user("7505382", "twitter")
|
519
|
-
a_get("/1/statuses/user_timeline.json").
|
520
|
-
with(:query => {:count => "200", :user_id => "7505382"}).
|
521
|
-
should have_been_made
|
522
|
-
a_get("/1/statuses/user_timeline.json").
|
523
|
-
with(:query => {:count => "200", :max_id => "194546264212385792", :user_id => "7505382"}).
|
524
|
-
should have_been_made
|
525
|
-
end
|
526
|
-
end
|
527
698
|
context "--long" do
|
528
699
|
before do
|
529
700
|
@search.options = @search.options.merge("long" => true)
|
530
701
|
end
|
531
702
|
it "should output in long format" do
|
532
|
-
@search.
|
703
|
+
@search.users("Erik")
|
533
704
|
$stdout.string.should == <<-eos
|
534
|
-
ID
|
535
|
-
|
705
|
+
ID Since Tweets Favorites Listed Following Followers Scre...
|
706
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
707
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
708
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
709
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
710
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
711
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
712
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
713
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
714
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
715
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
716
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
717
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
718
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
719
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
720
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
721
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
722
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
723
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
724
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
725
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
726
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
727
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
728
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
729
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
730
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
731
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
732
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
733
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
734
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
735
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
736
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
737
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
738
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
739
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
740
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
741
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
742
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
743
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
744
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
745
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
746
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
747
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
748
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
749
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
750
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
751
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
752
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
753
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
754
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
755
|
+
14100886 Mar 8 2008 3,913 32 185 1,871 2,767 @pen...
|
756
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
757
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
758
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
759
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
760
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
761
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
762
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
763
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
764
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
765
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
766
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
767
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
768
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
769
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
770
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
771
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
772
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
773
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
774
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
775
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
776
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
777
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
778
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
779
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
780
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
781
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
782
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
783
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
784
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
785
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
786
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
787
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
788
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
789
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
790
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
791
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
792
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
793
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
794
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
795
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
796
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
797
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
798
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
799
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
800
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
801
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
802
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
803
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
804
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
805
|
+
7505382 Jul 16 2007 2,962 727 29 88 898 @sfe...
|
536
806
|
eos
|
537
807
|
end
|
538
808
|
end
|
539
809
|
context "Twitter is down" do
|
540
810
|
it "should retry 3 times and then raise an error" do
|
541
|
-
stub_get("/1/
|
542
|
-
with(:query => {:
|
811
|
+
stub_get("/1/users/search.json").
|
812
|
+
with(:query => {:page => "50", :per_page => "20", :q => "Erik", }).
|
543
813
|
to_return(:status => 502)
|
544
814
|
lambda do
|
545
|
-
@search.
|
815
|
+
@search.users("Erik")
|
546
816
|
end.should raise_error("Twitter is down or being upgraded.")
|
547
|
-
a_get("/1/
|
548
|
-
with(:query => {:
|
817
|
+
a_get("/1/users/search.json").
|
818
|
+
with(:query => {:page => "50", :per_page => "20", :q => "Erik", }).
|
549
819
|
should have_been_made.times(3)
|
550
820
|
end
|
551
821
|
end
|