engagement 1.0.0

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.
Files changed (27) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +71 -0
  6. data/Rakefile +8 -0
  7. data/engagement.gemspec +31 -0
  8. data/lib/engagement.rb +5 -0
  9. data/lib/engagement/comment_counter.rb +20 -0
  10. data/lib/engagement/comment_counter/disqus.rb +36 -0
  11. data/lib/engagement/comment_counter/hacker_news.rb +13 -0
  12. data/lib/engagement/comment_counter/reddit.rb +32 -0
  13. data/lib/engagement/comment_counter/threaded.rb +28 -0
  14. data/lib/engagement/version.rb +3 -0
  15. data/spec/cassettes/Engagement_CommentCounter_Disqus/when_we_don_t_own_the_url/returns_zero_when_we_don_t_own_the_url.yml +48 -0
  16. data/spec/cassettes/Engagement_CommentCounter_Disqus/when_we_own_the_url/returns_the_number_of_comments_for_the_given_url.yml +89 -0
  17. data/spec/cassettes/Engagement_CommentCounter_HackerNews/returns_the_number_of_comments_for_the_given_url.yml +56 -0
  18. data/spec/cassettes/Engagement_CommentCounter_Reddit/with_a_single_listing_returned/.yml +123 -0
  19. data/spec/cassettes/Engagement_CommentCounter_Reddit/with_multiple_listings_returned/.yml +204 -0
  20. data/spec/cassettes/Engagement_CommentCounter_Reddit/with_no_results/.yml +124 -0
  21. data/spec/engagement/comment_counter/disqus_spec.rb +27 -0
  22. data/spec/engagement/comment_counter/hacker_news_spec.rb +11 -0
  23. data/spec/engagement/comment_counter/reddit_spec.rb +23 -0
  24. data/spec/engagement/comment_counter_spec.rb +33 -0
  25. data/spec/engagement/threaded_comment_counter_spec.rb +30 -0
  26. data/spec/spec_helper.rb +20 -0
  27. metadata +207 -0
@@ -0,0 +1,56 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.thriftdb.com/api.hnsearch.com/items/_search?q=http://www.90percentofeverything.com/2013/07/23/the-slippery-slope/
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - '*/*'
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Application:
22
+ - thriftdbweb
23
+ Application-Tag:
24
+ - master
25
+ Cache-Control:
26
+ - no-cache
27
+ Content-Type:
28
+ - text/plain; charset=utf-8
29
+ Date:
30
+ - Tue, 23 Jul 2013 23:04:06 GMT
31
+ Pragma:
32
+ - no-cache
33
+ Content-Length:
34
+ - '574'
35
+ Connection:
36
+ - keep-alive
37
+ body:
38
+ encoding: UTF-8
39
+ string: '{"hits": 1, "facet_results": {"fields": {}, "queries": {}}, "warnings":
40
+ [], "request": {"facet": {"fields": {}, "queries": []}, "stats": {}, "match_stopwords":
41
+ false, "q": "http://www.90percentofeverything.com/2013/07/23/the-slippery-slope/",
42
+ "start": 0, "limit": 10, "sortby": "score desc", "highlight": {"include_matches":
43
+ false, "fragments": {"maxchars": 100, "include": false, "markup_text": false},
44
+ "markup_items": false}, "weights": {"username": 1.0, "parent_sigid": 1.0,
45
+ "domain": 1.0, "title": 1.0, "url": 1.0, "text": 1.0, "discussion.sigid":
46
+ 1.0, "type": 1.0}, "filter": {"fields": {}, "queries": []}, "boosts": {"fields":
47
+ {}, "functions": {}, "filters": {}}}, "results": [{"item": {"username": "justinph",
48
+ "parent_sigid": null, "domain": "90percentofeverything.com", "title": "The
49
+ slippery slope", "url": "http://www.90percentofeverything.com/2013/07/23/the-slippery-slope/",
50
+ "text": null, "discussion": null, "id": 6092752, "parent_id": null, "points":
51
+ 75, "create_ts": "2013-07-23T20:41:50Z", "num_comments": 18, "cache_ts": "2013-07-23T22:52:40Z",
52
+ "_id": "6092752-c13d2", "type": "submission", "_noindex": false, "_update_ts":
53
+ 1374619987146873}, "score": 2.1764941}], "time": 0.039254188537597656}'
54
+ http_version:
55
+ recorded_at: Tue, 23 Jul 2013 23:04:04 GMT
56
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,123 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.reddit.com/search.json?q=http://i.imgur.com/VzFTsGg.png
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Snoo ruby reddit api wrapper v0.1.2
12
+ response:
13
+ status:
14
+ code: 302
15
+ message: Moved Temporarily
16
+ headers:
17
+ Content-Type:
18
+ - application/json; charset=UTF-8
19
+ Location:
20
+ - http://www.reddit.com/submit.json?url=http%3A%2F%2Fi.imgur.com%2FVzFTsGg.png
21
+ Content-Length:
22
+ - '0'
23
+ Server:
24
+ - '''; DROP TABLE servertypes; --'
25
+ Date:
26
+ - Wed, 24 Jul 2013 15:01:22 GMT
27
+ Connection:
28
+ - keep-alive
29
+ body:
30
+ encoding: UTF-8
31
+ string: ''
32
+ http_version:
33
+ recorded_at: Wed, 24 Jul 2013 15:01:23 GMT
34
+ - request:
35
+ method: get
36
+ uri: http://www.reddit.com/submit.json?url=http://i.imgur.com/VzFTsGg.png
37
+ body:
38
+ encoding: US-ASCII
39
+ string: ''
40
+ headers:
41
+ User-Agent:
42
+ - Snoo ruby reddit api wrapper v0.1.2
43
+ response:
44
+ status:
45
+ code: 200
46
+ message: OK
47
+ headers:
48
+ Content-Type:
49
+ - application/json; charset=UTF-8
50
+ Server:
51
+ - '''; DROP TABLE servertypes; --'
52
+ Vary:
53
+ - accept-encoding
54
+ Date:
55
+ - Wed, 24 Jul 2013 15:01:23 GMT
56
+ Content-Length:
57
+ - '4757'
58
+ Connection:
59
+ - keep-alive
60
+ body:
61
+ encoding: UTF-8
62
+ string: '{"kind": "Listing", "data": {"modhash": "", "children": [{"kind": "t3",
63
+ "data": {"domain": "i.imgur.com", "banned_by": null, "media_embed": {}, "subreddit":
64
+ "pics", "selftext_html": null, "selftext": "", "likes": null, "link_flair_text":
65
+ null, "id": "1iwh1c", "clicked": false, "title": "Calico Labrador Retriever",
66
+ "media": null, "score": 2862, "approved_by": null, "over_18": false, "hidden":
67
+ false, "thumbnail": "http://e.thumbs.redditmedia.com/t1Ea6gNL-qd3FILL.jpg",
68
+ "subreddit_id": "t5_2qh0u", "edited": false, "link_flair_css_class": null,
69
+ "author_flair_css_class": null, "downs": 28612, "saved": false, "is_self":
70
+ false, "permalink": "/r/pics/comments/1iwh1c/calico_labrador_retriever/",
71
+ "name": "t3_1iwh1c", "created": 1374634455.0, "url": "http://i.imgur.com/VzFTsGg.png",
72
+ "author_flair_text": null, "author": "ntdfbladez", "created_utc": 1374605655.0,
73
+ "ups": 31474, "num_comments": 921, "num_reports": null, "distinguished": null}},
74
+ {"kind": "t3", "data": {"domain": "i.imgur.com", "banned_by": null, "media_embed":
75
+ {}, "subreddit": "aww", "selftext_html": null, "selftext": "", "likes": null,
76
+ "link_flair_text": null, "id": "1iy9w6", "clicked": false, "title": "u/ntdfbladez''s
77
+ Calico Labrador Retriever (x-post from /r/pics)", "media": null, "score":
78
+ 3, "approved_by": null, "over_18": false, "hidden": false, "thumbnail": "http://e.thumbs.redditmedia.com/t1Ea6gNL-qd3FILL.jpg",
79
+ "subreddit_id": "t5_2qh1o", "edited": false, "link_flair_css_class": null,
80
+ "author_flair_css_class": null, "downs": 2, "saved": false, "is_self": false,
81
+ "permalink": "/r/aww/comments/1iy9w6/untdfbladezs_calico_labrador_retriever_xpost_from/",
82
+ "name": "t3_1iy9w6", "created": 1374697534.0, "url": "http://i.imgur.com/VzFTsGg.png",
83
+ "author_flair_text": null, "author": "GTech", "created_utc": 1374668734.0,
84
+ "ups": 5, "num_comments": 0, "num_reports": null, "distinguished": null}},
85
+ {"kind": "t3", "data": {"domain": "i.imgur.com", "banned_by": null, "media_embed":
86
+ {}, "subreddit": "IASIP", "selftext_html": null, "selftext": "", "likes":
87
+ null, "link_flair_text": null, "id": "1ix4wd", "clicked": false, "title":
88
+ "Does anyone else think this pic from the front page is a street urchin we
89
+ all know sobered up in a new profession?", "media": null, "score": 43, "approved_by":
90
+ null, "over_18": false, "hidden": false, "thumbnail": "http://e.thumbs.redditmedia.com/t1Ea6gNL-qd3FILL.jpg",
91
+ "subreddit_id": "t5_2s28b", "edited": false, "link_flair_css_class": null,
92
+ "author_flair_css_class": null, "downs": 8, "saved": false, "is_self": false,
93
+ "permalink": "/r/IASIP/comments/1ix4wd/does_anyone_else_think_this_pic_from_the_front/",
94
+ "name": "t3_1ix4wd", "created": 1374651924.0, "url": "http://i.imgur.com/VzFTsGg.png",
95
+ "author_flair_text": null, "author": "majikninjasWAT", "created_utc": 1374623124.0,
96
+ "ups": 51, "num_comments": 7, "num_reports": null, "distinguished": null}},
97
+ {"kind": "t3", "data": {"domain": "i.imgur.com", "banned_by": null, "media_embed":
98
+ {}, "subreddit": "KarmaConspiracy", "selftext_html": null, "selftext": "",
99
+ "likes": null, "link_flair_text": null, "id": "1iwyeb", "clicked": false,
100
+ "title": "Man clearly colors parts of dog with a sharpie, all for that multicolored
101
+ karma", "media": null, "score": 8, "approved_by": null, "over_18": false,
102
+ "hidden": false, "thumbnail": "http://e.thumbs.redditmedia.com/t1Ea6gNL-qd3FILL.jpg",
103
+ "subreddit_id": "t5_2tncl", "edited": false, "link_flair_css_class": null,
104
+ "author_flair_css_class": null, "downs": 2, "saved": false, "is_self": false,
105
+ "permalink": "/r/KarmaConspiracy/comments/1iwyeb/man_clearly_colors_parts_of_dog_with_a_sharpie/",
106
+ "name": "t3_1iwyeb", "created": 1374646824.0, "url": "http://i.imgur.com/VzFTsGg.png",
107
+ "author_flair_text": null, "author": "jsalperstein", "created_utc": 1374618024.0,
108
+ "ups": 10, "num_comments": 1, "num_reports": null, "distinguished": null}},
109
+ {"kind": "t3", "data": {"domain": "i.imgur.com", "banned_by": null, "media_embed":
110
+ {}, "subreddit": "outside", "selftext_html": null, "selftext": "", "likes":
111
+ null, "link_flair_text": null, "id": "1iwxmc", "clicked": false, "title":
112
+ "Anyone see the new DLC skin for Canine players? (x-post /r/pics)", "media":
113
+ null, "score": 1, "approved_by": null, "over_18": false, "hidden": false,
114
+ "thumbnail": "default", "subreddit_id": "t5_2r3f3", "edited": false, "link_flair_css_class":
115
+ null, "author_flair_css_class": null, "downs": 0, "saved": false, "is_self":
116
+ false, "permalink": "/r/outside/comments/1iwxmc/anyone_see_the_new_dlc_skin_for_canine_players/",
117
+ "name": "t3_1iwxmc", "created": 1374646228.0, "url": "http://i.imgur.com/VzFTsGg.png",
118
+ "author_flair_text": null, "author": "The_Pod", "created_utc": 1374617428.0,
119
+ "ups": 1, "num_comments": 0, "num_reports": null, "distinguished": null}}],
120
+ "after": null, "before": null}}'
121
+ http_version:
122
+ recorded_at: Wed, 24 Jul 2013 15:01:23 GMT
123
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,204 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.reddit.com/search.json?q=http://gaslight.co/blog/why-we-wrote-a-blog
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Snoo ruby reddit api wrapper v0.1.2
12
+ response:
13
+ status:
14
+ code: 302
15
+ message: Moved Temporarily
16
+ headers:
17
+ Content-Type:
18
+ - application/json; charset=UTF-8
19
+ Location:
20
+ - http://www.reddit.com/submit.json?url=http%3A%2F%2Fgaslight.co%2Fblog%2Fwhy-we-wrote-a-blog
21
+ Content-Length:
22
+ - '0'
23
+ Server:
24
+ - '''; DROP TABLE servertypes; --'
25
+ Date:
26
+ - Wed, 24 Jul 2013 15:01:23 GMT
27
+ Connection:
28
+ - keep-alive
29
+ body:
30
+ encoding: UTF-8
31
+ string: ''
32
+ http_version:
33
+ recorded_at: Wed, 24 Jul 2013 15:01:23 GMT
34
+ - request:
35
+ method: get
36
+ uri: http://www.reddit.com/submit.json?url=http://gaslight.co/blog/why-we-wrote-a-blog
37
+ body:
38
+ encoding: US-ASCII
39
+ string: ''
40
+ headers:
41
+ User-Agent:
42
+ - Snoo ruby reddit api wrapper v0.1.2
43
+ response:
44
+ status:
45
+ code: 302
46
+ message: Moved Temporarily
47
+ headers:
48
+ Content-Type:
49
+ - application/json; charset=UTF-8
50
+ Location:
51
+ - http://www.reddit.com/r/rubyonrails/comments/1it9vk/we_moved_our_blog_from_tumblr_to_our_own_rails/.json?already_submitted=true
52
+ Content-Length:
53
+ - '0'
54
+ Server:
55
+ - '''; DROP TABLE servertypes; --'
56
+ Date:
57
+ - Wed, 24 Jul 2013 15:01:24 GMT
58
+ Connection:
59
+ - keep-alive
60
+ body:
61
+ encoding: UTF-8
62
+ string: ''
63
+ http_version:
64
+ recorded_at: Wed, 24 Jul 2013 15:01:24 GMT
65
+ - request:
66
+ method: get
67
+ uri: http://www.reddit.com/r/rubyonrails/comments/1it9vk/we_moved_our_blog_from_tumblr_to_our_own_rails/.json?already_submitted=true
68
+ body:
69
+ encoding: US-ASCII
70
+ string: ''
71
+ headers:
72
+ User-Agent:
73
+ - Snoo ruby reddit api wrapper v0.1.2
74
+ response:
75
+ status:
76
+ code: 200
77
+ message: OK
78
+ headers:
79
+ Content-Type:
80
+ - application/json; charset=UTF-8
81
+ Last-Modified:
82
+ - Wed, 24 Jul 2013 13:04:43 GMT
83
+ Server:
84
+ - '''; DROP TABLE servertypes; --'
85
+ Vary:
86
+ - accept-encoding
87
+ Cache-Control:
88
+ - private, must-revalidate, max-age=0
89
+ Date:
90
+ - Wed, 24 Jul 2013 15:01:24 GMT
91
+ Content-Length:
92
+ - '8295'
93
+ Connection:
94
+ - keep-alive
95
+ body:
96
+ encoding: UTF-8
97
+ string: '[{"kind": "Listing", "data": {"modhash": "", "children": [{"kind":
98
+ "t3", "data": {"domain": "gaslight.co", "banned_by": null, "media_embed":
99
+ {}, "subreddit": "rubyonrails", "selftext_html": null, "selftext": "", "likes":
100
+ null, "link_flair_text": null, "id": "1it9vk", "clicked": false, "title":
101
+ "We moved our blog from Tumblr to our own Rails app. Here''s why.", "media":
102
+ null, "score": 9, "approved_by": null, "over_18": false, "hidden": false,
103
+ "thumbnail": "", "subreddit_id": "t5_2qi04", "edited": false, "link_flair_css_class":
104
+ null, "author_flair_css_class": null, "downs": 6, "saved": false, "is_self":
105
+ false, "permalink": "/r/rubyonrails/comments/1it9vk/we_moved_our_blog_from_tumblr_to_our_own_rails/",
106
+ "name": "t3_1it9vk", "created": 1374531646.0, "url": "http://gaslight.co/blog/why-we-wrote-a-blog",
107
+ "author_flair_text": null, "author": "cdmwebs", "created_utc": 1374502846.0,
108
+ "ups": 15, "num_comments": 8, "num_reports": null, "distinguished": null}}],
109
+ "after": null, "before": null}}, {"kind": "Listing", "data": {"modhash": "",
110
+ "children": [{"kind": "t1", "data": {"subreddit_id": "t5_2qi04", "banned_by":
111
+ null, "subreddit": "rubyonrails", "likes": null, "replies": "", "id": "cb7u0by",
112
+ "gilded": 0, "author": "dougalcorn", "parent_id": "t3_1it9vk", "approved_by":
113
+ null, "body": "\"Just give up and use Rails\"", "edited": false, "author_flair_css_class":
114
+ null, "downs": 0, "body_html": "<div class=\"md\"><p>"Just
115
+ give up and use Rails"</p>\n</div>", "link_id": "t3_1it9vk",
116
+ "score_hidden": false, "name": "t1_cb7u0by", "created": 1374534853.0, "author_flair_text":
117
+ null, "created_utc": 1374506053.0, "ups": 2, "num_reports": null, "distinguished":
118
+ null}}, {"kind": "t1", "data": {"subreddit_id": "t5_2qi04", "banned_by": null,
119
+ "subreddit": "rubyonrails", "likes": null, "replies": {"kind": "Listing",
120
+ "data": {"modhash": "", "children": [{"kind": "t1", "data": {"subreddit_id":
121
+ "t5_2qi04", "banned_by": null, "subreddit": "rubyonrails", "likes": null,
122
+ "replies": {"kind": "Listing", "data": {"modhash": "", "children": [{"kind":
123
+ "t1", "data": {"subreddit_id": "t5_2qi04", "banned_by": null, "subreddit":
124
+ "rubyonrails", "likes": null, "replies": {"kind": "Listing", "data": {"modhash":
125
+ "", "children": [{"kind": "t1", "data": {"subreddit_id": "t5_2qi04", "banned_by":
126
+ null, "subreddit": "rubyonrails", "likes": null, "replies": {"kind": "Listing",
127
+ "data": {"modhash": "", "children": [{"kind": "t1", "data": {"subreddit_id":
128
+ "t5_2qi04", "banned_by": null, "subreddit": "rubyonrails", "likes": null,
129
+ "replies": "", "id": "cb8w9gi", "gilded": 0, "author": "SENOR_BLAZE", "parent_id":
130
+ "t1_cb8i69z", "approved_by": null, "body": "If there''s an existing server,
131
+ sure. But if you''re running an instance dedicated to the blog it''s probably
132
+ not cost effective, amirite?\n\nPlease educate me on more economical alternatives
133
+ if I''m being ignorant.", "edited": false, "author_flair_css_class": null,
134
+ "downs": 0, "body_html": "<div class=\"md\"><p>If there's
135
+ an existing server, sure. But if you're running an instance dedicated
136
+ to the blog it's probably not cost effective, amirite?</p>\n\n<p>Please
137
+ educate me on more economical alternatives if I'm being ignorant.</p>\n</div>",
138
+ "link_id": "t3_1it9vk", "score_hidden": false, "name": "t1_cb8w9gi", "created":
139
+ 1374652573.0, "author_flair_text": null, "created_utc": 1374623773.0, "ups":
140
+ 1, "num_reports": null, "distinguished": null}}], "after": null, "before":
141
+ null}}, "id": "cb8i69z", "gilded": 0, "author": "NilsLandt", "parent_id":
142
+ "t1_cb8a5id", "approved_by": null, "body": "First of all, it''s their blog.
143
+ It probably doesn''t see much traffic at all.\n\nSecondly, it''s a blog. Blogs
144
+ are really easily cacheable, and Rails has excellent caching capabailities,
145
+ even without adding Varnish.", "edited": false, "author_flair_css_class":
146
+ null, "downs": 0, "body_html": "<div class=\"md\"><p>First of
147
+ all, it's their blog. It probably doesn't see much traffic
148
+ at all.</p>\n\n<p>Secondly, it's a blog. Blogs are really
149
+ easily cacheable, and Rails has excellent caching capabailities, even without
150
+ adding Varnish.</p>\n</div>", "link_id": "t3_1it9vk", "score_hidden":
151
+ false, "name": "t1_cb8i69z", "created": 1374615664.0, "author_flair_text":
152
+ null, "created_utc": 1374586864.0, "ups": 3, "num_reports": null, "distinguished":
153
+ null}}], "after": null, "before": null}}, "id": "cb8a5id", "gilded": 0, "author":
154
+ "SENOR_BLAZE", "parent_id": "t1_cb85ppa", "approved_by": null, "body": "It
155
+ could be considered overkill unless all the overhead is serving a purpose.",
156
+ "edited": false, "author_flair_css_class": null, "downs": 0, "body_html":
157
+ "<div class=\"md\"><p>It could be considered overkill unless all
158
+ the overhead is serving a purpose.</p>\n</div>", "link_id": "t3_1it9vk",
159
+ "score_hidden": false, "name": "t1_cb8a5id", "created": 1374577562.0, "author_flair_text":
160
+ null, "created_utc": 1374548762.0, "ups": 1, "num_reports": null, "distinguished":
161
+ null}}, {"kind": "t1", "data": {"subreddit_id": "t5_2qi04", "banned_by": null,
162
+ "subreddit": "rubyonrails", "likes": null, "replies": {"kind": "Listing",
163
+ "data": {"modhash": "", "children": [{"kind": "t1", "data": {"subreddit_id":
164
+ "t5_2qi04", "banned_by": null, "subreddit": "rubyonrails", "likes": null,
165
+ "replies": "", "id": "cb983kb", "gilded": 0, "author": "cdmwebs", "parent_id":
166
+ "t1_cb95qhy", "approved_by": null, "body": "Did you read the post? Sure, there''s
167
+ static content on the page, but there''s also a lot of dynamic related content.
168
+ There''s a lot of moving parts on a blog that the static site generators don''t
169
+ help with.", "edited": false, "author_flair_css_class": null, "downs": 0,
170
+ "body_html": "<div class=\"md\"><p>Did you read the post? Sure,
171
+ there's static content on the page, but there's also a lot
172
+ of dynamic related content. There's a lot of moving parts on a blog
173
+ that the static site generators don't help with.</p>\n</div>",
174
+ "link_id": "t3_1it9vk", "score_hidden": false, "name": "t1_cb983kb", "created":
175
+ 1374699883.0, "author_flair_text": null, "created_utc": 1374671083.0, "ups":
176
+ 1, "num_reports": null, "distinguished": null}}], "after": null, "before":
177
+ null}}, "id": "cb95qhy", "gilded": 0, "author": "sleepyhead", "parent_id":
178
+ "t1_cb85ppa", "approved_by": null, "body": "It''s static content. Put it on
179
+ S3 or something. No reason to use a big stack like Rails just to show some
180
+ content.", "edited": false, "author_flair_css_class": null, "downs": 0, "body_html":
181
+ "<div class=\"md\"><p>It's static content. Put it on S3
182
+ or something. No reason to use a big stack like Rails just to show some content.</p>\n</div>",
183
+ "link_id": "t3_1it9vk", "score_hidden": false, "name": "t1_cb95qhy", "created":
184
+ 1374685416.0, "author_flair_text": null, "created_utc": 1374656616.0, "ups":
185
+ 1, "num_reports": null, "distinguished": null}}], "after": null, "before":
186
+ null}}, "id": "cb85ppa", "gilded": 0, "author": "cdmwebs", "parent_id": "t1_cb85kat",
187
+ "approved_by": null, "body": "Why do you say that?", "edited": false, "author_flair_css_class":
188
+ null, "downs": 0, "body_html": "<div class=\"md\"><p>Why do you
189
+ say that?</p>\n</div>", "link_id": "t3_1it9vk", "score_hidden":
190
+ false, "name": "t1_cb85ppa", "created": 1374564917.0, "author_flair_text":
191
+ null, "created_utc": 1374536117.0, "ups": 1, "num_reports": null, "distinguished":
192
+ null}}], "after": null, "before": null}}, "id": "cb85kat", "gilded": 0, "author":
193
+ "sleepyhead", "parent_id": "t3_1it9vk", "approved_by": null, "body": "Sure,
194
+ moving from a third party blog platform like Tumblr is good. Moving static
195
+ content to Rails. Not so much.", "edited": false, "author_flair_css_class":
196
+ null, "downs": 0, "body_html": "<div class=\"md\"><p>Sure, moving
197
+ from a third party blog platform like Tumblr is good. Moving static content
198
+ to Rails. Not so much.</p>\n</div>", "link_id": "t3_1it9vk", "score_hidden":
199
+ false, "name": "t1_cb85kat", "created": 1374564488.0, "author_flair_text":
200
+ null, "created_utc": 1374535688.0, "ups": 1, "num_reports": null, "distinguished":
201
+ null}}], "after": null, "before": null}}]'
202
+ http_version:
203
+ recorded_at: Wed, 24 Jul 2013 15:01:24 GMT
204
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,124 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.reddit.com/search.json?q=http://blog.gaslight.co/blog/why-i-chose-angularjs
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Snoo ruby reddit api wrapper v0.1.2
12
+ response:
13
+ status:
14
+ code: 302
15
+ message: Moved Temporarily
16
+ headers:
17
+ Content-Length:
18
+ - '0'
19
+ Content-Type:
20
+ - application/json; charset=UTF-8
21
+ Location:
22
+ - http://www.reddit.com/submit.json?url=http%3A%2F%2Fblog.gaslight.co%2Fblog%2Fwhy-i-chose-angularjs
23
+ Server:
24
+ - '''; DROP TABLE servertypes; --'
25
+ Date:
26
+ - Wed, 24 Jul 2013 18:11:12 GMT
27
+ Connection:
28
+ - keep-alive
29
+ body:
30
+ encoding: UTF-8
31
+ string: ''
32
+ http_version:
33
+ recorded_at: Wed, 24 Jul 2013 18:11:12 GMT
34
+ - request:
35
+ method: get
36
+ uri: http://www.reddit.com/submit.json?url=http://blog.gaslight.co/blog/why-i-chose-angularjs
37
+ body:
38
+ encoding: US-ASCII
39
+ string: ''
40
+ headers:
41
+ User-Agent:
42
+ - Snoo ruby reddit api wrapper v0.1.2
43
+ response:
44
+ status:
45
+ code: 302
46
+ message: Moved Temporarily
47
+ headers:
48
+ Location:
49
+ - http://www.reddit.com/login.json?dest=http%3A%2F%2Fwww.reddit.com%2Fsubmit.json%3Furl%3Dhttp%253A%252F%252Fblog.gaslight.co%252Fblog%252Fwhy-i-chose-angularjs
50
+ Content-Length:
51
+ - '238'
52
+ Content-Type:
53
+ - text/plain; charset=UTF-8
54
+ Server:
55
+ - '''; DROP TABLE servertypes; --'
56
+ Date:
57
+ - Wed, 24 Jul 2013 18:11:12 GMT
58
+ Connection:
59
+ - keep-alive
60
+ body:
61
+ encoding: UTF-8
62
+ string: "302 Found\n\nThe resource was found at http://www.reddit.com/login.json?dest=http%3A%2F%2Fwww.reddit.com%2Fsubmit.json%3Furl%3Dhttp%253A%252F%252Fblog.gaslight.co%252Fblog%252Fwhy-i-chose-angularjs;
63
+ you should be redirected automatically. "
64
+ http_version:
65
+ recorded_at: Wed, 24 Jul 2013 18:11:12 GMT
66
+ - request:
67
+ method: get
68
+ uri: http://www.reddit.com/login.json?dest=http://www.reddit.com/submit.json?url=http%253A%252F%252Fblog.gaslight.co%252Fblog%252Fwhy-i-chose-angularjs
69
+ body:
70
+ encoding: US-ASCII
71
+ string: ''
72
+ headers:
73
+ User-Agent:
74
+ - Snoo ruby reddit api wrapper v0.1.2
75
+ response:
76
+ status:
77
+ code: 302
78
+ message: Moved Temporarily
79
+ headers:
80
+ Content-Length:
81
+ - '0'
82
+ Location:
83
+ - https://ssl.reddit.com/login.json?dest=http%3A%2F%2Fwww.reddit.com%2Fsubmit.json%3Furl%3Dhttp%253A%252F%252Fblog.gaslight.co%252Fblog%252Fwhy-i-chose-angularjs
84
+ Cache-Control:
85
+ - no-cache
86
+ Date:
87
+ - Wed, 24 Jul 2013 18:11:12 GMT
88
+ Connection:
89
+ - keep-alive
90
+ body:
91
+ encoding: UTF-8
92
+ string: ''
93
+ http_version:
94
+ recorded_at: Wed, 24 Jul 2013 18:11:12 GMT
95
+ - request:
96
+ method: get
97
+ uri: https://ssl.reddit.com/login.json?dest=http://www.reddit.com/submit.json?url=http%253A%252F%252Fblog.gaslight.co%252Fblog%252Fwhy-i-chose-angularjs
98
+ body:
99
+ encoding: US-ASCII
100
+ string: ''
101
+ headers:
102
+ User-Agent:
103
+ - Snoo ruby reddit api wrapper v0.1.2
104
+ response:
105
+ status:
106
+ code: 200
107
+ message: OK
108
+ headers:
109
+ Date:
110
+ - Wed, 24 Jul 2013 18:11:13 GMT
111
+ Connection:
112
+ - close
113
+ Content-Type:
114
+ - application/json; charset=UTF-8
115
+ Content-Length:
116
+ - '4'
117
+ Server:
118
+ - '''; DROP TABLE servertypes; --'
119
+ body:
120
+ encoding: UTF-8
121
+ string: '"{}"'
122
+ http_version:
123
+ recorded_at: Wed, 24 Jul 2013 18:11:13 GMT
124
+ recorded_with: VCR 2.5.0