social_current 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +55 -0
- data/Rakefile +10 -0
- data/lib/social_current/github.rb +35 -0
- data/lib/social_current/service.rb +28 -0
- data/lib/social_current/stream.rb +13 -0
- data/lib/social_current/twitter.rb +26 -0
- data/lib/social_current/version.rb +4 -0
- data/lib/social_current.rb +8 -0
- data/social_current.gemspec +19 -0
- data/test/support/github/stream.json +1365 -0
- data/test/support/github/user.json +21 -0
- data/test/support/twitter/stream.json +1 -0
- data/test/support/twitter/user.json +1 -0
- data/test/test_github.rb +26 -0
- data/test/test_helper.rb +28 -0
- data/test/test_stream.rb +17 -0
- data/test/test_twitter.rb +26 -0
- metadata +105 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
{
|
2
|
+
"html_url": "https://github.com/tristanoneil",
|
3
|
+
"type": "User",
|
4
|
+
"url": "https://api.github.com/users/tristanoneil",
|
5
|
+
"avatar_url": "https://secure.gravatar.com/avatar/2cdc1c8099e89f933498213ebfb5a411?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png",
|
6
|
+
"public_gists": 5,
|
7
|
+
"company": "",
|
8
|
+
"followers": 16,
|
9
|
+
"gravatar_id": "2cdc1c8099e89f933498213ebfb5a411",
|
10
|
+
"public_repos": 14,
|
11
|
+
"login": "tristanoneil",
|
12
|
+
"email": "",
|
13
|
+
"name": "Tristan O'Neil",
|
14
|
+
"hireable": false,
|
15
|
+
"created_at": "2010-06-28T14:10:51Z",
|
16
|
+
"blog": "http://www.tristanoneil.com",
|
17
|
+
"location": "Burlington, VT",
|
18
|
+
"id": 316507,
|
19
|
+
"following": 13,
|
20
|
+
"bio": null
|
21
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"created_at":"Wed May 16 13:59:57 +0000 2012","id":202760302658453504,"id_str":"202760302658453504","text":"Was thinking @gristmilled should put on a \"How to write a Ruby Gem\" course. It may just directly benefit me. Any interest in #btv?","source":"web","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":13049972,"id_str":"13049972","name":"Tristan O'Neil","screen_name":"tristanoneil","location":"Burlington, Vermont","description":"Founder\/developer @gristmilled. Enjoy web programming, clean syntax, coffee, the outdoors and a good bier.","url":"http:\/\/gristmill.io","protected":false,"followers_count":186,"friends_count":148,"listed_count":19,"created_at":"Mon Feb 04 14:51:59 +0000 2008","favourites_count":3,"utc_offset":-18000,"time_zone":"Eastern Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":2661,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"DED5B2","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378767991\/wood_pattern.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378767991\/wood_pattern.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1682968146\/tristanoneil_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1682968146\/tristanoneil_normal.jpeg","profile_link_color":"52A2DC","profile_sidebar_border_color":"EEEEEE","profile_sidebar_fill_color":"FFFFFF","profile_text_color":"333333","profile_use_background_image":true,"show_all_inline_media":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorited":false,"retweeted":false},{"created_at":"Tue May 15 22:29:29 +0000 2012","id":202526141096017921,"id_str":"202526141096017921","text":"@BlockGalleryVT Thanks, I'm sure I'll be back soon. Good work environment.","source":"web","truncated":false,"in_reply_to_status_id":202445365172109313,"in_reply_to_status_id_str":"202445365172109313","in_reply_to_user_id":110145421,"in_reply_to_user_id_str":"110145421","in_reply_to_screen_name":"BlockGalleryVT","user":{"id":13049972,"id_str":"13049972","name":"Tristan O'Neil","screen_name":"tristanoneil","location":"Burlington, Vermont","description":"Founder\/developer @gristmilled. Enjoy web programming, clean syntax, coffee, the outdoors and a good bier.","url":"http:\/\/gristmill.io","protected":false,"followers_count":186,"friends_count":148,"listed_count":19,"created_at":"Mon Feb 04 14:51:59 +0000 2008","favourites_count":3,"utc_offset":-18000,"time_zone":"Eastern Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":2661,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"DED5B2","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378767991\/wood_pattern.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378767991\/wood_pattern.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1682968146\/tristanoneil_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1682968146\/tristanoneil_normal.jpeg","profile_link_color":"52A2DC","profile_sidebar_border_color":"EEEEEE","profile_sidebar_fill_color":"FFFFFF","profile_text_color":"333333","profile_use_background_image":true,"show_all_inline_media":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorited":false,"retweeted":false},{"created_at":"Tue May 15 14:38:22 +0000 2012","id":202407579505266689,"id_str":"202407579505266689","text":"@jacksonlatka @_sbehan Looks interesting. At first thought I'd have to head for the airport now but then I saw they're live streaming. Nice!","source":"web","truncated":false,"in_reply_to_status_id":202402231335649280,"in_reply_to_status_id_str":"202402231335649280","in_reply_to_user_id":10022442,"in_reply_to_user_id_str":"10022442","in_reply_to_screen_name":"jacksonlatka","user":{"id":13049972,"id_str":"13049972","name":"Tristan O'Neil","screen_name":"tristanoneil","location":"Burlington, Vermont","description":"Founder\/developer @gristmilled. Enjoy web programming, clean syntax, coffee, the outdoors and a good bier.","url":"http:\/\/gristmill.io","protected":false,"followers_count":186,"friends_count":148,"listed_count":19,"created_at":"Mon Feb 04 14:51:59 +0000 2008","favourites_count":3,"utc_offset":-18000,"time_zone":"Eastern Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":2661,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"DED5B2","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378767991\/wood_pattern.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378767991\/wood_pattern.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1682968146\/tristanoneil_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1682968146\/tristanoneil_normal.jpeg","profile_link_color":"52A2DC","profile_sidebar_border_color":"EEEEEE","profile_sidebar_fill_color":"FFFFFF","profile_text_color":"333333","profile_use_background_image":true,"show_all_inline_media":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorited":false,"retweeted":false},{"created_at":"Tue May 15 14:32:33 +0000 2012","id":202406115131138048,"id_str":"202406115131138048","text":"Office for the day. (at @BlockGalleryVT) [pic] \u2014 http:\/\/t.co\/Qs53RAtw","source":"\u003ca href=\"http:\/\/path.com\/\" rel=\"nofollow\"\u003ePath 2.0\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":13049972,"id_str":"13049972","name":"Tristan O'Neil","screen_name":"tristanoneil","location":"Burlington, Vermont","description":"Founder\/developer @gristmilled. Enjoy web programming, clean syntax, coffee, the outdoors and a good bier.","url":"http:\/\/gristmill.io","protected":false,"followers_count":186,"friends_count":148,"listed_count":19,"created_at":"Mon Feb 04 14:51:59 +0000 2008","favourites_count":3,"utc_offset":-18000,"time_zone":"Eastern Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":2661,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"DED5B2","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378767991\/wood_pattern.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378767991\/wood_pattern.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1682968146\/tristanoneil_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1682968146\/tristanoneil_normal.jpeg","profile_link_color":"52A2DC","profile_sidebar_border_color":"EEEEEE","profile_sidebar_fill_color":"FFFFFF","profile_text_color":"333333","profile_use_background_image":true,"show_all_inline_media":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":{"type":"Point","coordinates":[44.491252,-73.186236]},"coordinates":{"type":"Point","coordinates":[-73.186236,44.491252]},"place":{"id":"f5ed53024a0daa67","url":"http:\/\/api.twitter.com\/1\/geo\/id\/f5ed53024a0daa67.json","place_type":"city","name":"Winooski","full_name":"Winooski, VT","country_code":"US","country":"United States","bounding_box":{"type":"Polygon","coordinates":[[[-73.201992,44.484359],[-73.165560,44.484359],[-73.165560,44.506328],[-73.201992,44.506328]]]},"attributes":{}},"contributors":null,"retweet_count":0,"favorited":false,"retweeted":false,"possibly_sensitive":false},{"created_at":"Tue May 15 12:20:28 +0000 2012","id":202372878757408768,"id_str":"202372878757408768","text":"The best part about working for yourself is you can bitch about your boss on Twitter with no recourse.","source":"web","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":13049972,"id_str":"13049972","name":"Tristan O'Neil","screen_name":"tristanoneil","location":"Burlington, Vermont","description":"Founder\/developer @gristmilled. Enjoy web programming, clean syntax, coffee, the outdoors and a good bier.","url":"http:\/\/gristmill.io","protected":false,"followers_count":186,"friends_count":148,"listed_count":19,"created_at":"Mon Feb 04 14:51:59 +0000 2008","favourites_count":3,"utc_offset":-18000,"time_zone":"Eastern Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":2661,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"DED5B2","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378767991\/wood_pattern.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378767991\/wood_pattern.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1682968146\/tristanoneil_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1682968146\/tristanoneil_normal.jpeg","profile_link_color":"52A2DC","profile_sidebar_border_color":"EEEEEE","profile_sidebar_fill_color":"FFFFFF","profile_text_color":"333333","profile_use_background_image":true,"show_all_inline_media":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorited":false,"retweeted":false},{"created_at":"Mon May 14 21:18:50 +0000 2012","id":202145973638676481,"id_str":"202145973638676481","text":"Also April In #BTV is the first Life In #BTV that I've edited with Premiere Pro. Notice any difference?","source":"web","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":13049972,"id_str":"13049972","name":"Tristan O'Neil","screen_name":"tristanoneil","location":"Burlington, Vermont","description":"Founder\/developer @gristmilled. Enjoy web programming, clean syntax, coffee, the outdoors and a good bier.","url":"http:\/\/gristmill.io","protected":false,"followers_count":186,"friends_count":148,"listed_count":19,"created_at":"Mon Feb 04 14:51:59 +0000 2008","favourites_count":3,"utc_offset":-18000,"time_zone":"Eastern Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":2661,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"DED5B2","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378767991\/wood_pattern.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378767991\/wood_pattern.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1682968146\/tristanoneil_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1682968146\/tristanoneil_normal.jpeg","profile_link_color":"52A2DC","profile_sidebar_border_color":"EEEEEE","profile_sidebar_fill_color":"FFFFFF","profile_text_color":"333333","profile_use_background_image":true,"show_all_inline_media":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorited":false,"retweeted":false},{"created_at":"Mon May 14 21:17:22 +0000 2012","id":202145605118734336,"id_str":"202145605118734336","text":"Did you all see April In #BTV? It has a baby in it. https:\/\/t.co\/JFQojX9G","source":"web","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":13049972,"id_str":"13049972","name":"Tristan O'Neil","screen_name":"tristanoneil","location":"Burlington, Vermont","description":"Founder\/developer @gristmilled. Enjoy web programming, clean syntax, coffee, the outdoors and a good bier.","url":"http:\/\/gristmill.io","protected":false,"followers_count":186,"friends_count":148,"listed_count":19,"created_at":"Mon Feb 04 14:51:59 +0000 2008","favourites_count":3,"utc_offset":-18000,"time_zone":"Eastern Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":2661,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"DED5B2","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378767991\/wood_pattern.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378767991\/wood_pattern.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1682968146\/tristanoneil_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1682968146\/tristanoneil_normal.jpeg","profile_link_color":"52A2DC","profile_sidebar_border_color":"EEEEEE","profile_sidebar_fill_color":"FFFFFF","profile_text_color":"333333","profile_use_background_image":true,"show_all_inline_media":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorited":false,"retweeted":false,"possibly_sensitive":false},{"created_at":"Mon May 14 19:22:24 +0000 2012","id":202116673694736384,"id_str":"202116673694736384","text":"Making...","source":"web","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":13049972,"id_str":"13049972","name":"Tristan O'Neil","screen_name":"tristanoneil","location":"Burlington, Vermont","description":"Founder\/developer @gristmilled. Enjoy web programming, clean syntax, coffee, the outdoors and a good bier.","url":"http:\/\/gristmill.io","protected":false,"followers_count":186,"friends_count":148,"listed_count":19,"created_at":"Mon Feb 04 14:51:59 +0000 2008","favourites_count":3,"utc_offset":-18000,"time_zone":"Eastern Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":2661,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"DED5B2","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378767991\/wood_pattern.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378767991\/wood_pattern.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1682968146\/tristanoneil_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1682968146\/tristanoneil_normal.jpeg","profile_link_color":"52A2DC","profile_sidebar_border_color":"EEEEEE","profile_sidebar_fill_color":"FFFFFF","profile_text_color":"333333","profile_use_background_image":true,"show_all_inline_media":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorited":false,"retweeted":false},{"created_at":"Sat May 12 17:12:46 +0000 2012","id":201359273433903104,"id_str":"201359273433903104","text":"The best kind of test. http:\/\/t.co\/JQsb7QeQ #goodbier","source":"web","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":13049972,"id_str":"13049972","name":"Tristan O'Neil","screen_name":"tristanoneil","location":"Burlington, Vermont","description":"Founder\/developer @gristmilled. Enjoy web programming, clean syntax, coffee, the outdoors and a good bier.","url":"http:\/\/gristmill.io","protected":false,"followers_count":186,"friends_count":148,"listed_count":19,"created_at":"Mon Feb 04 14:51:59 +0000 2008","favourites_count":3,"utc_offset":-18000,"time_zone":"Eastern Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":2661,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"DED5B2","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378767991\/wood_pattern.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378767991\/wood_pattern.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1682968146\/tristanoneil_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1682968146\/tristanoneil_normal.jpeg","profile_link_color":"52A2DC","profile_sidebar_border_color":"EEEEEE","profile_sidebar_fill_color":"FFFFFF","profile_text_color":"333333","profile_use_background_image":true,"show_all_inline_media":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorited":false,"retweeted":false,"possibly_sensitive":false},{"created_at":"Sat May 12 15:01:39 +0000 2012","id":201326274680061953,"id_str":"201326274680061953","text":"@alchemistbeer Had the pleasure of stewarding the event. Some really fantastic beers this year.","source":"web","truncated":false,"in_reply_to_status_id":201322247435198464,"in_reply_to_status_id_str":"201322247435198464","in_reply_to_user_id":39646219,"in_reply_to_user_id_str":"39646219","in_reply_to_screen_name":"alchemistbeer","user":{"id":13049972,"id_str":"13049972","name":"Tristan O'Neil","screen_name":"tristanoneil","location":"Burlington, Vermont","description":"Founder\/developer @gristmilled. Enjoy web programming, clean syntax, coffee, the outdoors and a good bier.","url":"http:\/\/gristmill.io","protected":false,"followers_count":186,"friends_count":148,"listed_count":19,"created_at":"Mon Feb 04 14:51:59 +0000 2008","favourites_count":3,"utc_offset":-18000,"time_zone":"Eastern Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":2661,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"DED5B2","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378767991\/wood_pattern.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378767991\/wood_pattern.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1682968146\/tristanoneil_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1682968146\/tristanoneil_normal.jpeg","profile_link_color":"52A2DC","profile_sidebar_border_color":"EEEEEE","profile_sidebar_fill_color":"FFFFFF","profile_text_color":"333333","profile_use_background_image":true,"show_all_inline_media":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorited":false,"retweeted":false},{"created_at":"Fri May 11 20:18:36 +0000 2012","id":201043650862526464,"id_str":"201043650862526464","text":"Oh hai. You can haz April In BTVz? Yep. https:\/\/t.co\/JFQojX9G #btv #vt","source":"web","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":13049972,"id_str":"13049972","name":"Tristan O'Neil","screen_name":"tristanoneil","location":"Burlington, Vermont","description":"Founder\/developer @gristmilled. Enjoy web programming, clean syntax, coffee, the outdoors and a good bier.","url":"http:\/\/gristmill.io","protected":false,"followers_count":186,"friends_count":148,"listed_count":19,"created_at":"Mon Feb 04 14:51:59 +0000 2008","favourites_count":3,"utc_offset":-18000,"time_zone":"Eastern Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":2661,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"DED5B2","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378767991\/wood_pattern.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378767991\/wood_pattern.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1682968146\/tristanoneil_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1682968146\/tristanoneil_normal.jpeg","profile_link_color":"52A2DC","profile_sidebar_border_color":"EEEEEE","profile_sidebar_fill_color":"FFFFFF","profile_text_color":"333333","profile_use_background_image":true,"show_all_inline_media":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorited":false,"retweeted":false,"possibly_sensitive":false},{"created_at":"Fri May 11 14:59:12 +0000 2012","id":200963273007443969,"id_str":"200963273007443969","text":"@HopfenTreader Thanks for the shout out!","source":"web","truncated":false,"in_reply_to_status_id":200956216493604864,"in_reply_to_status_id_str":"200956216493604864","in_reply_to_user_id":17581905,"in_reply_to_user_id_str":"17581905","in_reply_to_screen_name":"HopfenTreader","user":{"id":13049972,"id_str":"13049972","name":"Tristan O'Neil","screen_name":"tristanoneil","location":"Burlington, Vermont","description":"Founder\/developer @gristmilled. Enjoy web programming, clean syntax, coffee, the outdoors and a good bier.","url":"http:\/\/gristmill.io","protected":false,"followers_count":186,"friends_count":148,"listed_count":19,"created_at":"Mon Feb 04 14:51:59 +0000 2008","favourites_count":3,"utc_offset":-18000,"time_zone":"Eastern Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":2661,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"DED5B2","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378767991\/wood_pattern.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378767991\/wood_pattern.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1682968146\/tristanoneil_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1682968146\/tristanoneil_normal.jpeg","profile_link_color":"52A2DC","profile_sidebar_border_color":"EEEEEE","profile_sidebar_fill_color":"FFFFFF","profile_text_color":"333333","profile_use_background_image":true,"show_all_inline_media":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorited":false,"retweeted":false},{"created_at":"Thu May 10 17:48:38 +0000 2012","id":200643525786877952,"id_str":"200643525786877952","text":"Also for those interested the source can be found @ https:\/\/t.co\/s9mn2ALQ _Very_ simple implementation of #backbone views.","source":"web","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":13049972,"id_str":"13049972","name":"Tristan O'Neil","screen_name":"tristanoneil","location":"Burlington, Vermont","description":"Founder\/developer @gristmilled. Enjoy web programming, clean syntax, coffee, the outdoors and a good bier.","url":"http:\/\/gristmill.io","protected":false,"followers_count":186,"friends_count":148,"listed_count":19,"created_at":"Mon Feb 04 14:51:59 +0000 2008","favourites_count":3,"utc_offset":-18000,"time_zone":"Eastern Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":2661,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"DED5B2","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378767991\/wood_pattern.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378767991\/wood_pattern.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1682968146\/tristanoneil_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1682968146\/tristanoneil_normal.jpeg","profile_link_color":"52A2DC","profile_sidebar_border_color":"EEEEEE","profile_sidebar_fill_color":"FFFFFF","profile_text_color":"333333","profile_use_background_image":true,"show_all_inline_media":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorited":false,"retweeted":false,"possibly_sensitive":false}]
|
@@ -0,0 +1 @@
|
|
1
|
+
{"id":13049972,"id_str":"13049972","name":"Tristan O'Neil","screen_name":"tristanoneil","location":"Burlington, Vermont","description":"Founder\/developer @gristmilled. Enjoy web programming, clean syntax, coffee, the outdoors and a good bier.","url":"http:\/\/gristmill.io","protected":false,"followers_count":186,"friends_count":148,"listed_count":19,"created_at":"Mon Feb 04 14:51:59 +0000 2008","favourites_count":3,"utc_offset":-18000,"time_zone":"Eastern Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":2661,"lang":"en","status":{"created_at":"Wed May 16 13:59:57 +0000 2012","id":202760302658453504,"id_str":"202760302658453504","text":"Was thinking @gristmilled should put on a \"How to write a Ruby Gem\" course. It may just directly benefit me. Any interest in #btv?","source":"web","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,"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorited":false,"retweeted":false},"contributors_enabled":false,"is_translator":false,"profile_background_color":"DED5B2","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378767991\/wood_pattern.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378767991\/wood_pattern.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1682968146\/tristanoneil_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1682968146\/tristanoneil_normal.jpeg","profile_link_color":"52A2DC","profile_sidebar_border_color":"EEEEEE","profile_sidebar_fill_color":"FFFFFF","profile_text_color":"333333","profile_use_background_image":true,"show_all_inline_media":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null}
|
data/test/test_github.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require "test_helper"
|
2
|
+
|
3
|
+
class TestGithub < Test::Unit::TestCase
|
4
|
+
def setup
|
5
|
+
@github = SocialCurrent::Github.new("tristanoneil")
|
6
|
+
end
|
7
|
+
|
8
|
+
def test_initialize
|
9
|
+
assert_instance_of SocialCurrent::Github, @github
|
10
|
+
assert_respond_to @github, :raw_stream
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_raw_user
|
14
|
+
assert_equal "Tristan O'Neil", @github.raw_user["name"]
|
15
|
+
end
|
16
|
+
|
17
|
+
def test_raw_stream
|
18
|
+
assert_equal @github.raw_stream[0]["type"], "PushEvent"
|
19
|
+
end
|
20
|
+
|
21
|
+
def test_stream
|
22
|
+
assert_equal "Tristan O'Neil pushed to <a href='http://github.com/tristanoneil/tristanoneil.github.com'>tristanoneil/tristanoneil.github.com</a>.", @github.stream[0][:message]
|
23
|
+
assert_equal "2012-05-11 20:17:30 UTC", @github.stream[0][:created_at].to_s
|
24
|
+
assert_equal 30, @github.stream.size
|
25
|
+
end
|
26
|
+
end
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
require "test/unit"
|
2
|
+
require "fakeweb"
|
3
|
+
require "social_current"
|
4
|
+
|
5
|
+
# Make sure cache isn't used for testing.
|
6
|
+
module SocialCurrent
|
7
|
+
class Service
|
8
|
+
def cache_valid?(cache)
|
9
|
+
false
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
FakeWeb.register_uri(:get, "https://api.github.com/users/tristanoneil/events",
|
15
|
+
:body => File.open("test/support/github/stream.json").read,
|
16
|
+
:content_type => "application/json")
|
17
|
+
|
18
|
+
FakeWeb.register_uri(:get, "https://api.github.com/users/tristanoneil",
|
19
|
+
:body => File.open("test/support/github/user.json").read,
|
20
|
+
:content_type => "application/json")
|
21
|
+
|
22
|
+
FakeWeb.register_uri(:get, "https://api.twitter.com/1/users/show.json?screen_name=tristanoneil",
|
23
|
+
:body => File.open("test/support/twitter/user.json").read,
|
24
|
+
:content_type => "application/json")
|
25
|
+
|
26
|
+
FakeWeb.register_uri(:get, "https://api.twitter.com/1/statuses/user_timeline.json?&screen_name=tristanoneil",
|
27
|
+
:body => File.open("test/support/twitter/stream.json").read,
|
28
|
+
:content_type => "application/json")
|
data/test/test_stream.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require "test_helper"
|
2
|
+
|
3
|
+
class TestStream < Test::Unit::TestCase
|
4
|
+
def setup
|
5
|
+
@stream = SocialCurrent::Stream.new({ :twitter => "tristanoneil", :github => "tristanoneil" })
|
6
|
+
end
|
7
|
+
|
8
|
+
def test_initialize
|
9
|
+
assert_instance_of SocialCurrent::Stream, @stream
|
10
|
+
assert_equal 2, SocialCurrent::Stream.new({ :twitter => "tristanoneil", :github => "tristanoneil", :instagram => "tristanoneil"}).instance_variable_get("@options").size
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_build
|
14
|
+
assert_equal "Tristan O'Neil said \"Was thinking @gristmilled should put on a \"How to write a Ruby Gem\" course. It may just directly benefit me. Any interest in #btv?\"", @stream.build[0][:message]
|
15
|
+
assert_equal 42, @stream.build.size
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require "test_helper"
|
2
|
+
|
3
|
+
class TestTwitter < Test::Unit::TestCase
|
4
|
+
def setup
|
5
|
+
@twitter = SocialCurrent::Twitter.new("tristanoneil")
|
6
|
+
end
|
7
|
+
|
8
|
+
def test_initialize
|
9
|
+
assert_instance_of SocialCurrent::Twitter, @twitter
|
10
|
+
assert_respond_to @twitter, :raw_stream
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_raw_user
|
14
|
+
assert_equal "Tristan O'Neil", @twitter.raw_user["name"]
|
15
|
+
end
|
16
|
+
|
17
|
+
def test_raw_stream
|
18
|
+
assert_equal @twitter.raw_stream[0]["text"], "Was thinking @gristmilled should put on a \"How to write a Ruby Gem\" course. It may just directly benefit me. Any interest in #btv?"
|
19
|
+
end
|
20
|
+
|
21
|
+
def test_stream
|
22
|
+
assert_equal "Tristan O'Neil said \"Was thinking @gristmilled should put on a \"How to write a Ruby Gem\" course. It may just directly benefit me. Any interest in #btv?\"", @twitter.stream[0][:message]
|
23
|
+
assert_equal "2012-05-16 13:59:57 UTC", @twitter.stream[0][:created_at].to_s
|
24
|
+
assert_equal 13, @twitter.stream.size
|
25
|
+
end
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,105 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: social_current
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Tristan O'Neil
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-05-17 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: httparty
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 0.8.3
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.8.3
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: fakeweb
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 1.3.0
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 1.3.0
|
46
|
+
description: Makes it easy to integrate the Github activity stream into your application.
|
47
|
+
email:
|
48
|
+
- tristanoneil@gmail.com
|
49
|
+
executables: []
|
50
|
+
extensions: []
|
51
|
+
extra_rdoc_files: []
|
52
|
+
files:
|
53
|
+
- .gitignore
|
54
|
+
- Gemfile
|
55
|
+
- LICENSE
|
56
|
+
- README.md
|
57
|
+
- Rakefile
|
58
|
+
- lib/social_current.rb
|
59
|
+
- lib/social_current/github.rb
|
60
|
+
- lib/social_current/service.rb
|
61
|
+
- lib/social_current/stream.rb
|
62
|
+
- lib/social_current/twitter.rb
|
63
|
+
- lib/social_current/version.rb
|
64
|
+
- social_current.gemspec
|
65
|
+
- test/support/github/stream.json
|
66
|
+
- test/support/github/user.json
|
67
|
+
- test/support/twitter/stream.json
|
68
|
+
- test/support/twitter/user.json
|
69
|
+
- test/test_github.rb
|
70
|
+
- test/test_helper.rb
|
71
|
+
- test/test_stream.rb
|
72
|
+
- test/test_twitter.rb
|
73
|
+
homepage:
|
74
|
+
licenses: []
|
75
|
+
post_install_message:
|
76
|
+
rdoc_options: []
|
77
|
+
require_paths:
|
78
|
+
- lib
|
79
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
+
none: false
|
81
|
+
requirements:
|
82
|
+
- - ! '>='
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '0'
|
85
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
|
+
none: false
|
87
|
+
requirements:
|
88
|
+
- - ! '>='
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
requirements: []
|
92
|
+
rubyforge_project:
|
93
|
+
rubygems_version: 1.8.23
|
94
|
+
signing_key:
|
95
|
+
specification_version: 3
|
96
|
+
summary: Makes it easy to integrate the Github activity stream into your application.
|
97
|
+
test_files:
|
98
|
+
- test/support/github/stream.json
|
99
|
+
- test/support/github/user.json
|
100
|
+
- test/support/twitter/stream.json
|
101
|
+
- test/support/twitter/user.json
|
102
|
+
- test/test_github.rb
|
103
|
+
- test/test_helper.rb
|
104
|
+
- test/test_stream.rb
|
105
|
+
- test/test_twitter.rb
|