redditkit 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -4
- data/lib/redditkit.rb +4 -3
- data/lib/redditkit/client.rb +6 -8
- data/lib/redditkit/client/apps.rb +8 -8
- data/lib/redditkit/client/captcha.rb +2 -2
- data/lib/redditkit/client/comments.rb +2 -2
- data/lib/redditkit/client/flair.rb +10 -8
- data/lib/redditkit/client/links.rb +24 -20
- data/lib/redditkit/client/miscellaneous.rb +10 -10
- data/lib/redditkit/client/moderation.rb +23 -21
- data/lib/redditkit/client/multireddits.rb +4 -4
- data/lib/redditkit/client/private_messages.rb +6 -4
- data/lib/redditkit/client/search.rb +1 -1
- data/lib/redditkit/client/subreddits.rb +11 -7
- data/lib/redditkit/client/users.rb +17 -14
- data/lib/redditkit/client/utilities.rb +10 -8
- data/lib/redditkit/client/voting.rb +5 -5
- data/lib/redditkit/client/wiki.rb +4 -0
- data/lib/redditkit/comment.rb +4 -4
- data/lib/redditkit/error.rb +3 -3
- data/lib/redditkit/link.rb +14 -14
- data/lib/redditkit/moderator_action.rb +4 -4
- data/lib/redditkit/multireddit.rb +2 -2
- data/lib/redditkit/multireddit_description.rb +2 -2
- data/lib/redditkit/private_message.rb +2 -2
- data/lib/redditkit/response/parse_json.rb +7 -1
- data/lib/redditkit/response/raise_error.rb +4 -5
- data/lib/redditkit/subreddit.rb +13 -10
- data/lib/redditkit/thing.rb +1 -0
- data/lib/redditkit/user.rb +12 -8
- data/lib/redditkit/version.rb +1 -5
- data/lib/redditkit/votable.rb +2 -2
- data/redditkit.gemspec +1 -1
- data/spec/cassettes/RedditKit_Client_Flair/_flair_list/returns_the_list_of_flair.yml +51 -4
- data/spec/cassettes/RedditKit_Client_Moderation/_ban/requests_the_correct_resource.yml +70 -23
- data/spec/cassettes/RedditKit_Client_Moderation/_contributors_to_subreddit/requests_the_correct_resource.yml +52 -5
- data/spec/cassettes/RedditKit_Client_Moderation/_moderation_log/returns_RedditKit_ModeratorAction_objects.yml +150 -109
- data/spec/cassettes/RedditKit_Client_Moderation/_moderators_of_subreddit/requests_the_correct_resource.yml +53 -6
- data/spec/cassettes/RedditKit_Client_Moderation/_unban/requests_the_correct_resource.yml +61 -14
- data/spec/cassettes/RedditKit_Client_Multireddits/_multireddit/without_a_path/returns_a_multireddit.yml +49 -7
- data/spec/cassettes/RedditKit_Client_Multireddits/_multireddit_description/with_a_multireddit/returns_a_multireddit_description.yml +102 -11
- data/spec/cassettes/RedditKit_Client_Multireddits/_multireddit_description/with_a_username_and_multireddit_name/returns_a_multireddit_description.yml +54 -5
- data/spec/cassettes/RedditKit_Client_Search/_search/restricts_searches_to_a_specific_subreddit.yml +925 -0
- data/spec/cassettes/RedditKit_Client_Search/_search/returns_a_specific_number_of_results.yml +116 -0
- data/spec/cassettes/RedditKit_Client_Search/_search/returns_search_results.yml +884 -0
- data/spec/cassettes/RedditKit_Client_Wiki/_add_wiki_editor/requests_the_correct_resource.yml +58 -4
- data/spec/cassettes/RedditKit_Client_Wiki/_edit_wiki_page/requests_the_correct_resource.yml +58 -4
- data/spec/cassettes/RedditKit_Client_Wiki/_hide_wiki_revision/requests_the_correct_resource.yml +58 -4
- data/spec/cassettes/RedditKit_Client_Wiki/_remove_wiki_editor/requests_the_correct_resource.yml +58 -4
- data/spec/cassettes/RedditKit_Client_Wiki/_revert_to_revision/requests_the_correct_resource.yml +58 -4
- data/spec/redditkit/comment_spec.rb +6 -6
- data/spec/redditkit/link_spec.rb +38 -7
- data/spec/redditkit/thing_spec.rb +8 -0
- data/spec/redditkit/user_spec.rb +14 -0
- data/spec/spec_helper.rb +0 -4
- metadata +7 -11
data/spec/cassettes/RedditKit_Client_Wiki/_add_wiki_editor/requests_the_correct_resource.yml
CHANGED
@@ -18,7 +18,7 @@ http_interactions:
|
|
18
18
|
Accept-Encoding:
|
19
19
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
20
|
Accept:
|
21
|
-
-
|
21
|
+
- '*/*'
|
22
22
|
response:
|
23
23
|
status:
|
24
24
|
code: 404
|
@@ -33,14 +33,68 @@ http_interactions:
|
|
33
33
|
Content-Type:
|
34
34
|
- application/json; charset=UTF-8
|
35
35
|
Server:
|
36
|
-
-
|
36
|
+
- '''; DROP TABLE servertypes; --'
|
37
37
|
Date:
|
38
38
|
- Mon, 11 Nov 2013 06:08:03 GMT
|
39
39
|
Connection:
|
40
40
|
- close
|
41
41
|
body:
|
42
42
|
encoding: UTF-8
|
43
|
-
string:
|
43
|
+
string: '{"reason": "PAGE_NOT_FOUND"}'
|
44
44
|
http_version:
|
45
45
|
recorded_at: Mon, 11 Nov 2013 06:08:06 GMT
|
46
|
-
|
46
|
+
- request:
|
47
|
+
method: post
|
48
|
+
uri: http://www.reddit.com/r/<REDDIT_USERNAME>_testsub/api/wiki/alloweditor/add
|
49
|
+
body:
|
50
|
+
encoding: US-ASCII
|
51
|
+
string: page=some+page&username=samsymons
|
52
|
+
headers:
|
53
|
+
User-Agent:
|
54
|
+
- Faraday v0.8.8
|
55
|
+
Cookie:
|
56
|
+
- reddit_session=20332937,2013-11-10T11:35:59,2077074c26ccd8ec123c996b77eeb7afb6090af9
|
57
|
+
X-Modhash:
|
58
|
+
- 36zuxndsdf695692a68e32384990478663dadfc30f0a1dd959
|
59
|
+
Content-Type:
|
60
|
+
- application/x-www-form-urlencoded
|
61
|
+
Accept-Encoding:
|
62
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
63
|
+
Accept:
|
64
|
+
- '*/*'
|
65
|
+
response:
|
66
|
+
status:
|
67
|
+
code: 403
|
68
|
+
message: Forbidden
|
69
|
+
headers:
|
70
|
+
Content-Type:
|
71
|
+
- text/html; charset=UTF-8
|
72
|
+
Cache-Control:
|
73
|
+
- no-cache
|
74
|
+
Pragma:
|
75
|
+
- no-cache
|
76
|
+
X-Frame-Options:
|
77
|
+
- SAMEORIGIN
|
78
|
+
X-Content-Type-Options:
|
79
|
+
- nosniff
|
80
|
+
X-Xss-Protection:
|
81
|
+
- 1; mode=block
|
82
|
+
Server:
|
83
|
+
- '''; DROP TABLE servertypes; --'
|
84
|
+
Vary:
|
85
|
+
- accept-encoding
|
86
|
+
Date:
|
87
|
+
- Wed, 29 Jan 2014 23:31:52 GMT
|
88
|
+
Connection:
|
89
|
+
- close
|
90
|
+
body:
|
91
|
+
encoding: UTF-8
|
92
|
+
string: |-
|
93
|
+
<!doctype html><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" ><head><title><REDDIT_USERNAME>_testsub: this subreddit is private</title><meta name="keywords" content=" reddit, reddit.com, vote, comment, submit " /><meta name="description" content="reddit: the front page of the internet" /><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta name="viewport" content="width=1024"><link rel='icon' href="http://www.redditstatic.com/icon.png" sizes="256x256" type="image/png" /><link rel='shortcut icon' href="http://www.redditstatic.com/favicon.ico" type="image/x-icon" /><link rel='apple-touch-icon-precomposed' href="http://www.redditstatic.com/icon-touch.png" /><link rel="stylesheet" type="text/css" href="http://www.redditstatic.com/reddit.UlGbTiEmbr8.css" media="all"><!--[if lt IE 7]><link rel="stylesheet" href="http://www.redditstatic.com/reddit-ie6-hax.nzvIdaFFlC8.css" type="text/css" /><![endif]--><!--[if lt IE 8]><link rel="stylesheet" href="http://www.redditstatic.com/reddit-ie7-hax.OVwpXEcnYDU.css" type="text/css" /><![endif]--><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script><script type="text/javascript" src="http://www.redditstatic.com/reddit-init.en.-d9g8d2B9K8.js"></script><!--[if lt IE 9]><script type="text/javascript" src="http://www.redditstatic.com/html5shiv.n0ysDxgy3AI.js"></script><![endif]--><script type="text/javascript" id="config">r.setup({"static_root": "http://www.redditstatic.com", "ajax_domain": "www.reddit.com", "https_endpoint": "https://ssl.reddit.com", "server_time": 1391038311.0, "post_site": "<REDDIT_USERNAME>_testsub", "extension": "", "clicktracker_url": "//pixel.redditmedia.com/click", "fetch_trackers_url": "//tracker.redditmedia.com/fetch-trackers", "renderstyle": "html", "status_msg": {"fetching": "fetching title...", "loading": "loading...", "submitting": "submitting..."}, "modhash": "67jpv5zv0xeb65d8ff12f3881c3d857b5b8ea190b89d8cdbbf", "logged": "RedditKitTester", "is_fake": false, "store_visits": false, "cur_domain": "reddit.com", "over_18": true, "vote_hash": "", "debug": false, "send_logs": true, "adtracker_url": "//pixel.redditmedia.com/pixel/of_doom.png", "uitracker_url": "//pixel.redditmedia.com/pixel/of_discovery.png"})</script><script type="text/javascript">reddit.cur_site = "t5_301nt";</script><style type="text/css">/* Custom css: use this block to insert special translation-dependent css in the page header */</style></head><body class="loggedin" ><div id="header" role="banner"><a tabindex="1" href="#content" id="jumpToContent">jump to content</a><div id="sr-header-area"><div class="width-clip"><div class="dropdown srdrop " onclick="open_menu(this)" onmouseover="hover_open_menu(this)"><span class="selected title">my subreddits</span></div><div class="drop-choices srdrop "><a href="http://www.reddit.com/r/AdviceAnimals/" class="choice " >AdviceAnimals</a><a href="http://www.reddit.com/r/announcements/" class="choice " >announcements</a><a href="http://www.reddit.com/r/AskReddit/" class="choice " >AskReddit</a><a href="http://www.reddit.com/r/askscience/" class="choice " >askscience</a><a href="http://www.reddit.com/r/aww/" class="choice " >aww</a><a href="http://www.reddit.com/r/bestof/" class="choice " >bestof</a><a href="http://www.reddit.com/r/blog/" class="choice " >blog</a><a href="http://www.reddit.com/r/books/" class="choice " >books</a><a href="http://www.reddit.com/r/EarthPorn/" class="choice " >EarthPorn</a><a href="http://www.reddit.com/r/explainlikeimfive/" class="choice " >explainlikeimfive</a><a href="http://www.reddit.com/r/funny/" class="choice " >funny</a><a href="http://www.reddit.com/r/gaming/" class="choice " >gaming</a><a href="http://www.reddit.com/r/gifs/" class="choice " >gifs</a><a href="http://www.reddit.com/r/IAmA/" class="choice " >IAmA</a><a href="http://www.reddit.com/r/movies/" class="choice " >movies</a><a href="http://www.reddit.com/r/Music/" class="choice " >Music</a><a href="http://www.reddit.com/r/news/" class="choice " >news</a><a href="http://www.reddit.com/r/pics/" class="choice " >pics</a><a href="http://www.reddit.com/r/science/" class="choice " >science</a><a href="http://www.reddit.com/r/technology/" class="choice " >technology</a><a href="http://www.reddit.com/r/television/" class="choice " >television</a><a href="http://www.reddit.com/r/todayilearned/" class="choice " >todayilearned</a><a href="http://www.reddit.com/r/videos/" class="choice " >videos</a><a href="http://www.reddit.com/r/worldnews/" class="choice " >worldnews</a><a href="http://www.reddit.com/r/WTF/" class="choice " >WTF</a><a href="http://www.reddit.com/subreddits/" class="choice bottom-option" >edit subscriptions</a></div><div class="sr-list"><ul class="flat-list sr-bar hover" ><li ><a href="http://www.reddit.com/" >front</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/all/" >all</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/random/" class="random" >random</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/friends/" >friends</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/mod" >mod</a></li></ul><span class="separator"> | </span><ul class="flat-list sr-bar hover" ><li ><a href="http://www.reddit.com/r/pics/" >pics</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/funny/" >funny</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/gaming/" >gaming</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/AskReddit/" >AskReddit</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/worldnews/" >worldnews</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/news/" >news</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/videos/" >videos</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/IAmA/" >IAmA</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/todayilearned/" >todayilearned</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/aww/" >aww</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/technology/" >technology</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/AdviceAnimals/" >AdviceAnimals</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/science/" >science</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/Music/" >Music</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/movies/" >movies</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/bestof/" >bestof</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/books/" >books</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/EarthPorn/" >EarthPorn</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/explainlikeimfive/" >explainlikeimfive</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/gifs/" >gifs</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/television/" >television</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/askscience/" >askscience</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/WTF/" >WTF</a></li></ul><span class="separator"> – </span><ul class="flat-list sr-bar hover" id='sr-bar'><li ><a href="http://www.reddit.com/r/sports/" >sports</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/mildlyinteresting/" >mildlyinteresting</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/LifeProTips/" >LifeProTips</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/woahdude/" >woahdude</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/Unexpected/" >Unexpected</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/reactiongifs/" >reactiongifs</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/Showerthoughts/" >Showerthoughts</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/food/" >food</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/Jokes/" >Jokes</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/photoshopbattles/" >photoshopbattles</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/firstworldanarchists/" >firstworldanarchists</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/FoodPorn/" >FoodPorn</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/HistoryPorn/" >HistoryPorn</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/leagueoflegends/" >leagueoflegends</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/cringepics/" >cringepics</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/politics/" >politics</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/4chan/" >4chan</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/DotA2/" >DotA2</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/MakeupAddiction/" >MakeupAddiction</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/pokemon/" >pokemon</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/pcmasterrace/" >pcmasterrace</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/dogecoin/" >dogecoin</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/soccer/" >soccer</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/atheism/" >atheism</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/gentlemanboners/" >gentlemanboners</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/Minecraft/" >Minecraft</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/nfl/" >nfl</a></li></ul></div><a href="http://www.reddit.com/subreddits/" id="sr-more-link" >edit »</a></div></div><div id="header-bottom-left"><a href="http://www.reddit.com/" id="header-img-a" ><img id='header-img' src="http://b.thumbs.redditmedia.com/harEHsUUZVajabtC.png" width='120' height='40' alt="<REDDIT_USERNAME>_testsub"/></a> <span class="hover pagename redditname"><a href="http://www.reddit.com/r/<REDDIT_USERNAME>_testsub/" ><REDDIT_USERNAME>_testsub</a>: this subreddit is private</span></div><div id="header-bottom-right"><span class="user"><a href="http://www.reddit.com/user/RedditKitTester/" >RedditKitTester</a> (<span class="userkarma" title="link karma">1</span>)</span><span class="separator">|</span><a title="no new mail" href="http://www.reddit.com/message/inbox/" class="nohavemail" id="mail" >messages</a><span class="separator">|</span><a title="no new mod mail" href="http://www.reddit.com/message/moderator/" class="nohavemail" id="modmail" >mod messages</a><span class="separator">|</span><ul class="flat-list hover" ><li ><a href="http://www.reddit.com/prefs/" class="pref-lang" >preferences</a></li></ul><span class="separator">|</span><form method="post" action="http://www.reddit.com/logout" class="logout hover" ><input type="hidden" name="uh" value="67jpv5zv0xeb65d8ff12f3881c3d857b5b8ea190b89d8cdbbf"/><input type="hidden" name="top" value="off"/><input type="hidden" name="dest" value="/r/<REDDIT_USERNAME>_testsub/api/wiki/alloweditor/add"/><a href="javascript:void(0)" onclick="$(this).parent().submit()" >logout</a></form></div></div><a name="content"></a><div class="content" role="main"><div id="classy-error" class="content"><img src="http://www.redditstatic.com/subreddit-private.png" alt="" /><h1>this subreddit is private</h1><div class="errorpage-message"><p>the moderators of this subreddit have set it to private. you must be a moderator or approved submitter to view its contents.</p>
|
94
|
+
|
95
|
+
</div><div class="errorpage-message sr-description"><h2>a message from the moderators of /r/<REDDIT_USERNAME>_testsub</h2><p>A sub to test stuff.</p>
|
96
|
+
|
97
|
+
</div></div></div><div class="footer-parent"><div by-zero class="footer rounded"><div class="col"><ul class="flat-vert hover" ><li class="flat-vert title">about</li><li ><a href="http://www.reddit.com/blog/" >blog</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/about/" >about</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/about/team/" >team</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/code/" >source code</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/ad_inq/" >advertise</a></li></ul></div><div class="col"><ul class="flat-vert hover" ><li class="flat-vert title">help</li><li ><a href="http://www.reddit.com/wiki/" >wiki</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/wiki/faq" >FAQ</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/wiki/reddiquette" >reddiquette</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/rules/" >rules</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/contact/" >contact us</a></li></ul></div><div class="col"><ul class="flat-vert hover" ><li class="flat-vert title">tools</li><li ><a href="http://i.reddit.com" >mobile</a></li><li ><span class="separator"></span><a href="https://addons.mozilla.org/firefox/addon/socialite/" >firefox extension</a></li><li ><span class="separator"></span><a href="https://chrome.google.com/webstore/detail/algjnflpgoopkdijmkalfcifomdhmcbe" >chrome extension</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/r/<REDDIT_USERNAME>_testsub/buttons/" >buttons</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/r/<REDDIT_USERNAME>_testsub/widget/" >widget</a></li></ul></div><div class="col"><ul class="flat-vert hover" ><li class="flat-vert title"><3</li><li ><a href="http://www.reddit.com/gold/about/" class="buygold" >reddit gold</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/store/" >store</a></li><li ><span class="separator"></span><a href="http://redditgifts.com" >redditgifts</a></li><li ><span class="separator"></span><a href="http://reddit.tv" >reddit.tv</a></li><li ><span class="separator"></span><a href="http://radioreddit.com" >radio reddit</a></li></ul></div></div><p class="bottommenu">Use of this site constitutes acceptance of our <a href="http://www.reddit.com/help/useragreement" class="updated" >User Agreement (updated)</a> and <a href="http://www.reddit.com/help/privacypolicy" >Privacy Policy</a>. © 2014 reddit inc. All rights reserved.</p><p class="bottommenu">REDDIT and the ALIEN Logo are registered trademarks of reddit inc.</p></div><p class="debuginfo"><span class="icon">π</span> <span class="content">Rendered by PID 18449 on  app-52  at 2014-01-29 23:31:51.814091+00:00 running f70be73.</span></p><script type="text/javascript" src="http://www.redditstatic.com/reddit.en.3-2V-ykFTnw.js"></script></body></html>
|
98
|
+
http_version:
|
99
|
+
recorded_at: Wed, 29 Jan 2014 23:30:37 GMT
|
100
|
+
recorded_with: VCR 2.8.0
|
@@ -18,7 +18,7 @@ http_interactions:
|
|
18
18
|
Accept-Encoding:
|
19
19
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
20
|
Accept:
|
21
|
-
-
|
21
|
+
- '*/*'
|
22
22
|
response:
|
23
23
|
status:
|
24
24
|
code: 200
|
@@ -33,7 +33,7 @@ http_interactions:
|
|
33
33
|
Pragma:
|
34
34
|
- no-cache
|
35
35
|
Server:
|
36
|
-
-
|
36
|
+
- '''; DROP TABLE servertypes; --'
|
37
37
|
Vary:
|
38
38
|
- Accept-Encoding
|
39
39
|
Date:
|
@@ -42,7 +42,61 @@ http_interactions:
|
|
42
42
|
- keep-alive
|
43
43
|
body:
|
44
44
|
encoding: UTF-8
|
45
|
-
string:
|
45
|
+
string: '{}'
|
46
46
|
http_version:
|
47
47
|
recorded_at: Sun, 10 Nov 2013 22:21:30 GMT
|
48
|
-
|
48
|
+
- request:
|
49
|
+
method: post
|
50
|
+
uri: http://www.reddit.com/r/<REDDIT_USERNAME>_testsub/api/wiki/edit
|
51
|
+
body:
|
52
|
+
encoding: US-ASCII
|
53
|
+
string: page=fake-page&previous&content&reason
|
54
|
+
headers:
|
55
|
+
User-Agent:
|
56
|
+
- Faraday v0.8.8
|
57
|
+
Cookie:
|
58
|
+
- reddit_session=20332937,2013-11-10T11:35:59,2077074c26ccd8ec123c996b77eeb7afb6090af9
|
59
|
+
X-Modhash:
|
60
|
+
- 36zuxndsdf695692a68e32384990478663dadfc30f0a1dd959
|
61
|
+
Content-Type:
|
62
|
+
- application/x-www-form-urlencoded
|
63
|
+
Accept-Encoding:
|
64
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
65
|
+
Accept:
|
66
|
+
- '*/*'
|
67
|
+
response:
|
68
|
+
status:
|
69
|
+
code: 403
|
70
|
+
message: Forbidden
|
71
|
+
headers:
|
72
|
+
Content-Type:
|
73
|
+
- text/html; charset=UTF-8
|
74
|
+
Cache-Control:
|
75
|
+
- no-cache
|
76
|
+
Pragma:
|
77
|
+
- no-cache
|
78
|
+
X-Frame-Options:
|
79
|
+
- SAMEORIGIN
|
80
|
+
X-Content-Type-Options:
|
81
|
+
- nosniff
|
82
|
+
X-Xss-Protection:
|
83
|
+
- 1; mode=block
|
84
|
+
Server:
|
85
|
+
- '''; DROP TABLE servertypes; --'
|
86
|
+
Vary:
|
87
|
+
- accept-encoding
|
88
|
+
Date:
|
89
|
+
- Wed, 29 Jan 2014 23:31:53 GMT
|
90
|
+
Connection:
|
91
|
+
- close
|
92
|
+
body:
|
93
|
+
encoding: UTF-8
|
94
|
+
string: |-
|
95
|
+
<!doctype html><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" ><head><title><REDDIT_USERNAME>_testsub: this subreddit is private</title><meta name="keywords" content=" reddit, reddit.com, vote, comment, submit " /><meta name="description" content="reddit: the front page of the internet" /><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta name="viewport" content="width=1024"><link rel='icon' href="http://www.redditstatic.com/icon.png" sizes="256x256" type="image/png" /><link rel='shortcut icon' href="http://www.redditstatic.com/favicon.ico" type="image/x-icon" /><link rel='apple-touch-icon-precomposed' href="http://www.redditstatic.com/icon-touch.png" /><link rel="stylesheet" type="text/css" href="http://www.redditstatic.com/reddit.UlGbTiEmbr8.css" media="all"><!--[if lt IE 7]><link rel="stylesheet" href="http://www.redditstatic.com/reddit-ie6-hax.nzvIdaFFlC8.css" type="text/css" /><![endif]--><!--[if lt IE 8]><link rel="stylesheet" href="http://www.redditstatic.com/reddit-ie7-hax.OVwpXEcnYDU.css" type="text/css" /><![endif]--><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script><script type="text/javascript" src="http://www.redditstatic.com/reddit-init.en.-d9g8d2B9K8.js"></script><!--[if lt IE 9]><script type="text/javascript" src="http://www.redditstatic.com/html5shiv.n0ysDxgy3AI.js"></script><![endif]--><script type="text/javascript" id="config">r.setup({"static_root": "http://www.redditstatic.com", "ajax_domain": "www.reddit.com", "https_endpoint": "https://ssl.reddit.com", "server_time": 1391038313.0, "post_site": "<REDDIT_USERNAME>_testsub", "extension": "", "clicktracker_url": "//pixel.redditmedia.com/click", "fetch_trackers_url": "//tracker.redditmedia.com/fetch-trackers", "renderstyle": "html", "status_msg": {"fetching": "fetching title...", "loading": "loading...", "submitting": "submitting..."}, "modhash": "ux8t6weq7g0a03da4a25dcc5981b0e82189bb2c40178147ea6", "logged": "RedditKitTester", "is_fake": false, "store_visits": false, "cur_domain": "reddit.com", "over_18": true, "vote_hash": "", "debug": false, "send_logs": true, "adtracker_url": "//pixel.redditmedia.com/pixel/of_doom.png", "uitracker_url": "//pixel.redditmedia.com/pixel/of_discovery.png"})</script><script type="text/javascript">reddit.cur_site = "t5_301nt";</script><style type="text/css">/* Custom css: use this block to insert special translation-dependent css in the page header */</style></head><body class="loggedin" ><div id="header" role="banner"><a tabindex="1" href="#content" id="jumpToContent">jump to content</a><div id="sr-header-area"><div class="width-clip"><div class="dropdown srdrop " onclick="open_menu(this)" onmouseover="hover_open_menu(this)"><span class="selected title">my subreddits</span></div><div class="drop-choices srdrop "><a href="http://www.reddit.com/r/AdviceAnimals/" class="choice " >AdviceAnimals</a><a href="http://www.reddit.com/r/announcements/" class="choice " >announcements</a><a href="http://www.reddit.com/r/AskReddit/" class="choice " >AskReddit</a><a href="http://www.reddit.com/r/askscience/" class="choice " >askscience</a><a href="http://www.reddit.com/r/aww/" class="choice " >aww</a><a href="http://www.reddit.com/r/bestof/" class="choice " >bestof</a><a href="http://www.reddit.com/r/blog/" class="choice " >blog</a><a href="http://www.reddit.com/r/books/" class="choice " >books</a><a href="http://www.reddit.com/r/EarthPorn/" class="choice " >EarthPorn</a><a href="http://www.reddit.com/r/explainlikeimfive/" class="choice " >explainlikeimfive</a><a href="http://www.reddit.com/r/funny/" class="choice " >funny</a><a href="http://www.reddit.com/r/gaming/" class="choice " >gaming</a><a href="http://www.reddit.com/r/gifs/" class="choice " >gifs</a><a href="http://www.reddit.com/r/IAmA/" class="choice " >IAmA</a><a href="http://www.reddit.com/r/movies/" class="choice " >movies</a><a href="http://www.reddit.com/r/Music/" class="choice " >Music</a><a href="http://www.reddit.com/r/news/" class="choice " >news</a><a href="http://www.reddit.com/r/pics/" class="choice " >pics</a><a href="http://www.reddit.com/r/science/" class="choice " >science</a><a href="http://www.reddit.com/r/technology/" class="choice " >technology</a><a href="http://www.reddit.com/r/television/" class="choice " >television</a><a href="http://www.reddit.com/r/todayilearned/" class="choice " >todayilearned</a><a href="http://www.reddit.com/r/videos/" class="choice " >videos</a><a href="http://www.reddit.com/r/worldnews/" class="choice " >worldnews</a><a href="http://www.reddit.com/r/WTF/" class="choice " >WTF</a><a href="http://www.reddit.com/subreddits/" class="choice bottom-option" >edit subscriptions</a></div><div class="sr-list"><ul class="flat-list sr-bar hover" ><li ><a href="http://www.reddit.com/" >front</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/all/" >all</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/random/" class="random" >random</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/friends/" >friends</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/mod" >mod</a></li></ul><span class="separator"> | </span><ul class="flat-list sr-bar hover" ><li ><a href="http://www.reddit.com/r/pics/" >pics</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/funny/" >funny</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/gaming/" >gaming</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/AskReddit/" >AskReddit</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/worldnews/" >worldnews</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/news/" >news</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/videos/" >videos</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/IAmA/" >IAmA</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/todayilearned/" >todayilearned</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/aww/" >aww</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/technology/" >technology</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/AdviceAnimals/" >AdviceAnimals</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/science/" >science</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/Music/" >Music</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/movies/" >movies</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/bestof/" >bestof</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/books/" >books</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/EarthPorn/" >EarthPorn</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/explainlikeimfive/" >explainlikeimfive</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/gifs/" >gifs</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/television/" >television</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/askscience/" >askscience</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/WTF/" >WTF</a></li></ul><span class="separator"> – </span><ul class="flat-list sr-bar hover" id='sr-bar'><li ><a href="http://www.reddit.com/r/sports/" >sports</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/mildlyinteresting/" >mildlyinteresting</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/LifeProTips/" >LifeProTips</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/woahdude/" >woahdude</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/Unexpected/" >Unexpected</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/reactiongifs/" >reactiongifs</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/Showerthoughts/" >Showerthoughts</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/food/" >food</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/Jokes/" >Jokes</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/photoshopbattles/" >photoshopbattles</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/firstworldanarchists/" >firstworldanarchists</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/FoodPorn/" >FoodPorn</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/HistoryPorn/" >HistoryPorn</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/leagueoflegends/" >leagueoflegends</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/cringepics/" >cringepics</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/politics/" >politics</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/4chan/" >4chan</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/DotA2/" >DotA2</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/MakeupAddiction/" >MakeupAddiction</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/pokemon/" >pokemon</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/pcmasterrace/" >pcmasterrace</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/dogecoin/" >dogecoin</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/soccer/" >soccer</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/atheism/" >atheism</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/gentlemanboners/" >gentlemanboners</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/Minecraft/" >Minecraft</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/nfl/" >nfl</a></li></ul></div><a href="http://www.reddit.com/subreddits/" id="sr-more-link" >edit »</a></div></div><div id="header-bottom-left"><a href="http://www.reddit.com/" id="header-img-a" ><img id='header-img' src="http://b.thumbs.redditmedia.com/harEHsUUZVajabtC.png" width='120' height='40' alt="<REDDIT_USERNAME>_testsub"/></a> <span class="hover pagename redditname"><a href="http://www.reddit.com/r/<REDDIT_USERNAME>_testsub/" ><REDDIT_USERNAME>_testsub</a>: this subreddit is private</span></div><div id="header-bottom-right"><span class="user"><a href="http://www.reddit.com/user/RedditKitTester/" >RedditKitTester</a> (<span class="userkarma" title="link karma">1</span>)</span><span class="separator">|</span><a title="no new mail" href="http://www.reddit.com/message/inbox/" class="nohavemail" id="mail" >messages</a><span class="separator">|</span><a title="no new mod mail" href="http://www.reddit.com/message/moderator/" class="nohavemail" id="modmail" >mod messages</a><span class="separator">|</span><ul class="flat-list hover" ><li ><a href="http://www.reddit.com/prefs/" class="pref-lang" >preferences</a></li></ul><span class="separator">|</span><form method="post" action="http://www.reddit.com/logout" class="logout hover" ><input type="hidden" name="uh" value="ux8t6weq7g0a03da4a25dcc5981b0e82189bb2c40178147ea6"/><input type="hidden" name="top" value="off"/><input type="hidden" name="dest" value="/r/<REDDIT_USERNAME>_testsub/api/wiki/edit"/><a href="javascript:void(0)" onclick="$(this).parent().submit()" >logout</a></form></div></div><a name="content"></a><div class="content" role="main"><div id="classy-error" class="content"><img src="http://www.redditstatic.com/subreddit-private.png" alt="" /><h1>this subreddit is private</h1><div class="errorpage-message"><p>the moderators of this subreddit have set it to private. you must be a moderator or approved submitter to view its contents.</p>
|
96
|
+
|
97
|
+
</div><div class="errorpage-message sr-description"><h2>a message from the moderators of /r/<REDDIT_USERNAME>_testsub</h2><p>A sub to test stuff.</p>
|
98
|
+
|
99
|
+
</div></div></div><div class="footer-parent"><div by-zero class="footer rounded"><div class="col"><ul class="flat-vert hover" ><li class="flat-vert title">about</li><li ><a href="http://www.reddit.com/blog/" >blog</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/about/" >about</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/about/team/" >team</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/code/" >source code</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/ad_inq/" >advertise</a></li></ul></div><div class="col"><ul class="flat-vert hover" ><li class="flat-vert title">help</li><li ><a href="http://www.reddit.com/wiki/" >wiki</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/wiki/faq" >FAQ</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/wiki/reddiquette" >reddiquette</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/rules/" >rules</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/contact/" >contact us</a></li></ul></div><div class="col"><ul class="flat-vert hover" ><li class="flat-vert title">tools</li><li ><a href="http://i.reddit.com" >mobile</a></li><li ><span class="separator"></span><a href="https://addons.mozilla.org/firefox/addon/socialite/" >firefox extension</a></li><li ><span class="separator"></span><a href="https://chrome.google.com/webstore/detail/algjnflpgoopkdijmkalfcifomdhmcbe" >chrome extension</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/r/<REDDIT_USERNAME>_testsub/buttons/" >buttons</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/r/<REDDIT_USERNAME>_testsub/widget/" >widget</a></li></ul></div><div class="col"><ul class="flat-vert hover" ><li class="flat-vert title"><3</li><li ><a href="http://www.reddit.com/gold/about/" class="buygold" >reddit gold</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/store/" >store</a></li><li ><span class="separator"></span><a href="http://redditgifts.com" >redditgifts</a></li><li ><span class="separator"></span><a href="http://reddit.tv" >reddit.tv</a></li><li ><span class="separator"></span><a href="http://radioreddit.com" >radio reddit</a></li></ul></div></div><p class="bottommenu">Use of this site constitutes acceptance of our <a href="http://www.reddit.com/help/useragreement" class="updated" >User Agreement (updated)</a> and <a href="http://www.reddit.com/help/privacypolicy" >Privacy Policy</a>. © 2014 reddit inc. All rights reserved.</p><p class="bottommenu">REDDIT and the ALIEN Logo are registered trademarks of reddit inc.</p></div><p class="debuginfo"><span class="icon">π</span> <span class="content">Rendered by PID 18168 on  app-52  at 2014-01-29 23:31:53.830885+00:00 running f70be73.</span></p><script type="text/javascript" src="http://www.redditstatic.com/reddit.en.3-2V-ykFTnw.js"></script></body></html>
|
100
|
+
http_version:
|
101
|
+
recorded_at: Wed, 29 Jan 2014 23:30:39 GMT
|
102
|
+
recorded_with: VCR 2.8.0
|
data/spec/cassettes/RedditKit_Client_Wiki/_hide_wiki_revision/requests_the_correct_resource.yml
CHANGED
@@ -18,7 +18,7 @@ http_interactions:
|
|
18
18
|
Accept-Encoding:
|
19
19
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
20
|
Accept:
|
21
|
-
-
|
21
|
+
- '*/*'
|
22
22
|
response:
|
23
23
|
status:
|
24
24
|
code: 404
|
@@ -33,14 +33,68 @@ http_interactions:
|
|
33
33
|
Content-Type:
|
34
34
|
- application/json; charset=UTF-8
|
35
35
|
Server:
|
36
|
-
-
|
36
|
+
- '''; DROP TABLE servertypes; --'
|
37
37
|
Date:
|
38
38
|
- Sun, 10 Nov 2013 22:21:30 GMT
|
39
39
|
Connection:
|
40
40
|
- close
|
41
41
|
body:
|
42
42
|
encoding: UTF-8
|
43
|
-
string:
|
43
|
+
string: '{"reason": "INVALID_REVISION"}'
|
44
44
|
http_version:
|
45
45
|
recorded_at: Sun, 10 Nov 2013 22:21:29 GMT
|
46
|
-
|
46
|
+
- request:
|
47
|
+
method: post
|
48
|
+
uri: http://www.reddit.com/r/<REDDIT_USERNAME>_testsub/api/wiki/hide
|
49
|
+
body:
|
50
|
+
encoding: US-ASCII
|
51
|
+
string: page=fake-page&revision=12345
|
52
|
+
headers:
|
53
|
+
User-Agent:
|
54
|
+
- Faraday v0.8.8
|
55
|
+
Cookie:
|
56
|
+
- reddit_session=20332937,2013-11-10T11:35:59,2077074c26ccd8ec123c996b77eeb7afb6090af9
|
57
|
+
X-Modhash:
|
58
|
+
- 36zuxndsdf695692a68e32384990478663dadfc30f0a1dd959
|
59
|
+
Content-Type:
|
60
|
+
- application/x-www-form-urlencoded
|
61
|
+
Accept-Encoding:
|
62
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
63
|
+
Accept:
|
64
|
+
- '*/*'
|
65
|
+
response:
|
66
|
+
status:
|
67
|
+
code: 403
|
68
|
+
message: Forbidden
|
69
|
+
headers:
|
70
|
+
Content-Type:
|
71
|
+
- text/html; charset=UTF-8
|
72
|
+
Cache-Control:
|
73
|
+
- no-cache
|
74
|
+
Pragma:
|
75
|
+
- no-cache
|
76
|
+
X-Frame-Options:
|
77
|
+
- SAMEORIGIN
|
78
|
+
X-Content-Type-Options:
|
79
|
+
- nosniff
|
80
|
+
X-Xss-Protection:
|
81
|
+
- 1; mode=block
|
82
|
+
Server:
|
83
|
+
- '''; DROP TABLE servertypes; --'
|
84
|
+
Vary:
|
85
|
+
- accept-encoding
|
86
|
+
Date:
|
87
|
+
- Wed, 29 Jan 2014 23:31:54 GMT
|
88
|
+
Connection:
|
89
|
+
- close
|
90
|
+
body:
|
91
|
+
encoding: UTF-8
|
92
|
+
string: |-
|
93
|
+
<!doctype html><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" ><head><title><REDDIT_USERNAME>_testsub: this subreddit is private</title><meta name="keywords" content=" reddit, reddit.com, vote, comment, submit " /><meta name="description" content="reddit: the front page of the internet" /><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta name="viewport" content="width=1024"><link rel='icon' href="http://www.redditstatic.com/icon.png" sizes="256x256" type="image/png" /><link rel='shortcut icon' href="http://www.redditstatic.com/favicon.ico" type="image/x-icon" /><link rel='apple-touch-icon-precomposed' href="http://www.redditstatic.com/icon-touch.png" /><link rel="stylesheet" type="text/css" href="http://www.redditstatic.com/reddit.UlGbTiEmbr8.css" media="all"><!--[if lt IE 7]><link rel="stylesheet" href="http://www.redditstatic.com/reddit-ie6-hax.nzvIdaFFlC8.css" type="text/css" /><![endif]--><!--[if lt IE 8]><link rel="stylesheet" href="http://www.redditstatic.com/reddit-ie7-hax.OVwpXEcnYDU.css" type="text/css" /><![endif]--><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script><script type="text/javascript" src="http://www.redditstatic.com/reddit-init.en.-d9g8d2B9K8.js"></script><!--[if lt IE 9]><script type="text/javascript" src="http://www.redditstatic.com/html5shiv.n0ysDxgy3AI.js"></script><![endif]--><script type="text/javascript" id="config">r.setup({"static_root": "http://www.redditstatic.com", "ajax_domain": "www.reddit.com", "https_endpoint": "https://ssl.reddit.com", "server_time": 1391038314.0, "post_site": "<REDDIT_USERNAME>_testsub", "extension": "", "clicktracker_url": "//pixel.redditmedia.com/click", "fetch_trackers_url": "//tracker.redditmedia.com/fetch-trackers", "renderstyle": "html", "status_msg": {"fetching": "fetching title...", "loading": "loading...", "submitting": "submitting..."}, "modhash": "3izkah5224716007dc9a2e9cb6122c7d59552d86dc991def5a", "logged": "RedditKitTester", "is_fake": false, "store_visits": false, "cur_domain": "reddit.com", "over_18": true, "vote_hash": "", "debug": false, "send_logs": true, "adtracker_url": "//pixel.redditmedia.com/pixel/of_doom.png", "uitracker_url": "//pixel.redditmedia.com/pixel/of_discovery.png"})</script><script type="text/javascript">reddit.cur_site = "t5_301nt";</script><style type="text/css">/* Custom css: use this block to insert special translation-dependent css in the page header */</style></head><body class="loggedin" ><div id="header" role="banner"><a tabindex="1" href="#content" id="jumpToContent">jump to content</a><div id="sr-header-area"><div class="width-clip"><div class="dropdown srdrop " onclick="open_menu(this)" onmouseover="hover_open_menu(this)"><span class="selected title">my subreddits</span></div><div class="drop-choices srdrop "><a href="http://www.reddit.com/r/AdviceAnimals/" class="choice " >AdviceAnimals</a><a href="http://www.reddit.com/r/announcements/" class="choice " >announcements</a><a href="http://www.reddit.com/r/AskReddit/" class="choice " >AskReddit</a><a href="http://www.reddit.com/r/askscience/" class="choice " >askscience</a><a href="http://www.reddit.com/r/aww/" class="choice " >aww</a><a href="http://www.reddit.com/r/bestof/" class="choice " >bestof</a><a href="http://www.reddit.com/r/blog/" class="choice " >blog</a><a href="http://www.reddit.com/r/books/" class="choice " >books</a><a href="http://www.reddit.com/r/EarthPorn/" class="choice " >EarthPorn</a><a href="http://www.reddit.com/r/explainlikeimfive/" class="choice " >explainlikeimfive</a><a href="http://www.reddit.com/r/funny/" class="choice " >funny</a><a href="http://www.reddit.com/r/gaming/" class="choice " >gaming</a><a href="http://www.reddit.com/r/gifs/" class="choice " >gifs</a><a href="http://www.reddit.com/r/IAmA/" class="choice " >IAmA</a><a href="http://www.reddit.com/r/movies/" class="choice " >movies</a><a href="http://www.reddit.com/r/Music/" class="choice " >Music</a><a href="http://www.reddit.com/r/news/" class="choice " >news</a><a href="http://www.reddit.com/r/pics/" class="choice " >pics</a><a href="http://www.reddit.com/r/science/" class="choice " >science</a><a href="http://www.reddit.com/r/technology/" class="choice " >technology</a><a href="http://www.reddit.com/r/television/" class="choice " >television</a><a href="http://www.reddit.com/r/todayilearned/" class="choice " >todayilearned</a><a href="http://www.reddit.com/r/videos/" class="choice " >videos</a><a href="http://www.reddit.com/r/worldnews/" class="choice " >worldnews</a><a href="http://www.reddit.com/r/WTF/" class="choice " >WTF</a><a href="http://www.reddit.com/subreddits/" class="choice bottom-option" >edit subscriptions</a></div><div class="sr-list"><ul class="flat-list sr-bar hover" ><li ><a href="http://www.reddit.com/" >front</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/all/" >all</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/random/" class="random" >random</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/friends/" >friends</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/mod" >mod</a></li></ul><span class="separator"> | </span><ul class="flat-list sr-bar hover" ><li ><a href="http://www.reddit.com/r/pics/" >pics</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/funny/" >funny</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/gaming/" >gaming</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/AskReddit/" >AskReddit</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/worldnews/" >worldnews</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/news/" >news</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/videos/" >videos</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/IAmA/" >IAmA</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/todayilearned/" >todayilearned</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/aww/" >aww</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/technology/" >technology</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/AdviceAnimals/" >AdviceAnimals</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/science/" >science</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/Music/" >Music</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/movies/" >movies</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/bestof/" >bestof</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/books/" >books</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/EarthPorn/" >EarthPorn</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/explainlikeimfive/" >explainlikeimfive</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/gifs/" >gifs</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/television/" >television</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/askscience/" >askscience</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/WTF/" >WTF</a></li></ul><span class="separator"> – </span><ul class="flat-list sr-bar hover" id='sr-bar'><li ><a href="http://www.reddit.com/r/sports/" >sports</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/mildlyinteresting/" >mildlyinteresting</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/LifeProTips/" >LifeProTips</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/woahdude/" >woahdude</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/Unexpected/" >Unexpected</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/reactiongifs/" >reactiongifs</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/Showerthoughts/" >Showerthoughts</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/food/" >food</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/Jokes/" >Jokes</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/photoshopbattles/" >photoshopbattles</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/firstworldanarchists/" >firstworldanarchists</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/FoodPorn/" >FoodPorn</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/HistoryPorn/" >HistoryPorn</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/leagueoflegends/" >leagueoflegends</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/cringepics/" >cringepics</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/politics/" >politics</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/4chan/" >4chan</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/DotA2/" >DotA2</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/MakeupAddiction/" >MakeupAddiction</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/pokemon/" >pokemon</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/pcmasterrace/" >pcmasterrace</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/dogecoin/" >dogecoin</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/soccer/" >soccer</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/atheism/" >atheism</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/gentlemanboners/" >gentlemanboners</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/Minecraft/" >Minecraft</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/nfl/" >nfl</a></li></ul></div><a href="http://www.reddit.com/subreddits/" id="sr-more-link" >edit »</a></div></div><div id="header-bottom-left"><a href="http://www.reddit.com/" id="header-img-a" ><img id='header-img' src="http://b.thumbs.redditmedia.com/harEHsUUZVajabtC.png" width='120' height='40' alt="<REDDIT_USERNAME>_testsub"/></a> <span class="hover pagename redditname"><a href="http://www.reddit.com/r/<REDDIT_USERNAME>_testsub/" ><REDDIT_USERNAME>_testsub</a>: this subreddit is private</span></div><div id="header-bottom-right"><span class="user"><a href="http://www.reddit.com/user/RedditKitTester/" >RedditKitTester</a> (<span class="userkarma" title="link karma">1</span>)</span><span class="separator">|</span><a title="no new mail" href="http://www.reddit.com/message/inbox/" class="nohavemail" id="mail" >messages</a><span class="separator">|</span><a title="no new mod mail" href="http://www.reddit.com/message/moderator/" class="nohavemail" id="modmail" >mod messages</a><span class="separator">|</span><ul class="flat-list hover" ><li ><a href="http://www.reddit.com/prefs/" class="pref-lang" >preferences</a></li></ul><span class="separator">|</span><form method="post" action="http://www.reddit.com/logout" class="logout hover" ><input type="hidden" name="uh" value="3izkah5224716007dc9a2e9cb6122c7d59552d86dc991def5a"/><input type="hidden" name="top" value="off"/><input type="hidden" name="dest" value="/r/<REDDIT_USERNAME>_testsub/api/wiki/hide"/><a href="javascript:void(0)" onclick="$(this).parent().submit()" >logout</a></form></div></div><a name="content"></a><div class="content" role="main"><div id="classy-error" class="content"><img src="http://www.redditstatic.com/subreddit-private.png" alt="" /><h1>this subreddit is private</h1><div class="errorpage-message"><p>the moderators of this subreddit have set it to private. you must be a moderator or approved submitter to view its contents.</p>
|
94
|
+
|
95
|
+
</div><div class="errorpage-message sr-description"><h2>a message from the moderators of /r/<REDDIT_USERNAME>_testsub</h2><p>A sub to test stuff.</p>
|
96
|
+
|
97
|
+
</div></div></div><div class="footer-parent"><div by-zero class="footer rounded"><div class="col"><ul class="flat-vert hover" ><li class="flat-vert title">about</li><li ><a href="http://www.reddit.com/blog/" >blog</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/about/" >about</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/about/team/" >team</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/code/" >source code</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/ad_inq/" >advertise</a></li></ul></div><div class="col"><ul class="flat-vert hover" ><li class="flat-vert title">help</li><li ><a href="http://www.reddit.com/wiki/" >wiki</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/wiki/faq" >FAQ</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/wiki/reddiquette" >reddiquette</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/rules/" >rules</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/contact/" >contact us</a></li></ul></div><div class="col"><ul class="flat-vert hover" ><li class="flat-vert title">tools</li><li ><a href="http://i.reddit.com" >mobile</a></li><li ><span class="separator"></span><a href="https://addons.mozilla.org/firefox/addon/socialite/" >firefox extension</a></li><li ><span class="separator"></span><a href="https://chrome.google.com/webstore/detail/algjnflpgoopkdijmkalfcifomdhmcbe" >chrome extension</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/r/<REDDIT_USERNAME>_testsub/buttons/" >buttons</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/r/<REDDIT_USERNAME>_testsub/widget/" >widget</a></li></ul></div><div class="col"><ul class="flat-vert hover" ><li class="flat-vert title"><3</li><li ><a href="http://www.reddit.com/gold/about/" class="buygold" >reddit gold</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/store/" >store</a></li><li ><span class="separator"></span><a href="http://redditgifts.com" >redditgifts</a></li><li ><span class="separator"></span><a href="http://reddit.tv" >reddit.tv</a></li><li ><span class="separator"></span><a href="http://radioreddit.com" >radio reddit</a></li></ul></div></div><p class="bottommenu">Use of this site constitutes acceptance of our <a href="http://www.reddit.com/help/useragreement" class="updated" >User Agreement (updated)</a> and <a href="http://www.reddit.com/help/privacypolicy" >Privacy Policy</a>. © 2014 reddit inc. All rights reserved.</p><p class="bottommenu">REDDIT and the ALIEN Logo are registered trademarks of reddit inc.</p></div><p class="debuginfo"><span class="icon">π</span> <span class="content">Rendered by PID 17748 on  app-52  at 2014-01-29 23:31:54.316764+00:00 running f70be73.</span></p><script type="text/javascript" src="http://www.redditstatic.com/reddit.en.3-2V-ykFTnw.js"></script></body></html>
|
98
|
+
http_version:
|
99
|
+
recorded_at: Wed, 29 Jan 2014 23:30:39 GMT
|
100
|
+
recorded_with: VCR 2.8.0
|
data/spec/cassettes/RedditKit_Client_Wiki/_remove_wiki_editor/requests_the_correct_resource.yml
CHANGED
@@ -18,7 +18,7 @@ http_interactions:
|
|
18
18
|
Accept-Encoding:
|
19
19
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
20
|
Accept:
|
21
|
-
-
|
21
|
+
- '*/*'
|
22
22
|
response:
|
23
23
|
status:
|
24
24
|
code: 404
|
@@ -33,14 +33,68 @@ http_interactions:
|
|
33
33
|
Content-Type:
|
34
34
|
- application/json; charset=UTF-8
|
35
35
|
Server:
|
36
|
-
-
|
36
|
+
- '''; DROP TABLE servertypes; --'
|
37
37
|
Date:
|
38
38
|
- Mon, 11 Nov 2013 06:08:02 GMT
|
39
39
|
Connection:
|
40
40
|
- close
|
41
41
|
body:
|
42
42
|
encoding: UTF-8
|
43
|
-
string:
|
43
|
+
string: '{"reason": "PAGE_NOT_FOUND"}'
|
44
44
|
http_version:
|
45
45
|
recorded_at: Mon, 11 Nov 2013 06:08:06 GMT
|
46
|
-
|
46
|
+
- request:
|
47
|
+
method: post
|
48
|
+
uri: http://www.reddit.com/r/<REDDIT_USERNAME>_testsub/api/wiki/alloweditor/del
|
49
|
+
body:
|
50
|
+
encoding: US-ASCII
|
51
|
+
string: page=some+page&username=samsymons
|
52
|
+
headers:
|
53
|
+
User-Agent:
|
54
|
+
- Faraday v0.8.8
|
55
|
+
Cookie:
|
56
|
+
- reddit_session=20332937,2013-11-10T11:35:59,2077074c26ccd8ec123c996b77eeb7afb6090af9
|
57
|
+
X-Modhash:
|
58
|
+
- 36zuxndsdf695692a68e32384990478663dadfc30f0a1dd959
|
59
|
+
Content-Type:
|
60
|
+
- application/x-www-form-urlencoded
|
61
|
+
Accept-Encoding:
|
62
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
63
|
+
Accept:
|
64
|
+
- '*/*'
|
65
|
+
response:
|
66
|
+
status:
|
67
|
+
code: 403
|
68
|
+
message: Forbidden
|
69
|
+
headers:
|
70
|
+
Content-Type:
|
71
|
+
- text/html; charset=UTF-8
|
72
|
+
Cache-Control:
|
73
|
+
- no-cache
|
74
|
+
Pragma:
|
75
|
+
- no-cache
|
76
|
+
X-Frame-Options:
|
77
|
+
- SAMEORIGIN
|
78
|
+
X-Content-Type-Options:
|
79
|
+
- nosniff
|
80
|
+
X-Xss-Protection:
|
81
|
+
- 1; mode=block
|
82
|
+
Server:
|
83
|
+
- '''; DROP TABLE servertypes; --'
|
84
|
+
Vary:
|
85
|
+
- accept-encoding
|
86
|
+
Date:
|
87
|
+
- Wed, 29 Jan 2014 23:31:52 GMT
|
88
|
+
Connection:
|
89
|
+
- close
|
90
|
+
body:
|
91
|
+
encoding: UTF-8
|
92
|
+
string: |-
|
93
|
+
<!doctype html><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" ><head><title><REDDIT_USERNAME>_testsub: this subreddit is private</title><meta name="keywords" content=" reddit, reddit.com, vote, comment, submit " /><meta name="description" content="reddit: the front page of the internet" /><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta name="viewport" content="width=1024"><link rel='icon' href="http://www.redditstatic.com/icon.png" sizes="256x256" type="image/png" /><link rel='shortcut icon' href="http://www.redditstatic.com/favicon.ico" type="image/x-icon" /><link rel='apple-touch-icon-precomposed' href="http://www.redditstatic.com/icon-touch.png" /><link rel="stylesheet" type="text/css" href="http://www.redditstatic.com/reddit.UlGbTiEmbr8.css" media="all"><!--[if lt IE 7]><link rel="stylesheet" href="http://www.redditstatic.com/reddit-ie6-hax.nzvIdaFFlC8.css" type="text/css" /><![endif]--><!--[if lt IE 8]><link rel="stylesheet" href="http://www.redditstatic.com/reddit-ie7-hax.OVwpXEcnYDU.css" type="text/css" /><![endif]--><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script><script type="text/javascript" src="http://www.redditstatic.com/reddit-init.en.-d9g8d2B9K8.js"></script><!--[if lt IE 9]><script type="text/javascript" src="http://www.redditstatic.com/html5shiv.n0ysDxgy3AI.js"></script><![endif]--><script type="text/javascript" id="config">r.setup({"static_root": "http://www.redditstatic.com", "ajax_domain": "www.reddit.com", "https_endpoint": "https://ssl.reddit.com", "server_time": 1391038312.0, "post_site": "<REDDIT_USERNAME>_testsub", "extension": "", "clicktracker_url": "//pixel.redditmedia.com/click", "fetch_trackers_url": "//tracker.redditmedia.com/fetch-trackers", "renderstyle": "html", "status_msg": {"fetching": "fetching title...", "loading": "loading...", "submitting": "submitting..."}, "modhash": "5ufnxcz2qyba98311641208fcc997a6785a5c29f7e438caf18", "logged": "RedditKitTester", "is_fake": false, "store_visits": false, "cur_domain": "reddit.com", "over_18": true, "vote_hash": "", "debug": false, "send_logs": true, "adtracker_url": "//pixel.redditmedia.com/pixel/of_doom.png", "uitracker_url": "//pixel.redditmedia.com/pixel/of_discovery.png"})</script><script type="text/javascript">reddit.cur_site = "t5_301nt";</script><style type="text/css">/* Custom css: use this block to insert special translation-dependent css in the page header */</style></head><body class="loggedin" ><div id="header" role="banner"><a tabindex="1" href="#content" id="jumpToContent">jump to content</a><div id="sr-header-area"><div class="width-clip"><div class="dropdown srdrop " onclick="open_menu(this)" onmouseover="hover_open_menu(this)"><span class="selected title">my subreddits</span></div><div class="drop-choices srdrop "><a href="http://www.reddit.com/r/AdviceAnimals/" class="choice " >AdviceAnimals</a><a href="http://www.reddit.com/r/announcements/" class="choice " >announcements</a><a href="http://www.reddit.com/r/AskReddit/" class="choice " >AskReddit</a><a href="http://www.reddit.com/r/askscience/" class="choice " >askscience</a><a href="http://www.reddit.com/r/aww/" class="choice " >aww</a><a href="http://www.reddit.com/r/bestof/" class="choice " >bestof</a><a href="http://www.reddit.com/r/blog/" class="choice " >blog</a><a href="http://www.reddit.com/r/books/" class="choice " >books</a><a href="http://www.reddit.com/r/EarthPorn/" class="choice " >EarthPorn</a><a href="http://www.reddit.com/r/explainlikeimfive/" class="choice " >explainlikeimfive</a><a href="http://www.reddit.com/r/funny/" class="choice " >funny</a><a href="http://www.reddit.com/r/gaming/" class="choice " >gaming</a><a href="http://www.reddit.com/r/gifs/" class="choice " >gifs</a><a href="http://www.reddit.com/r/IAmA/" class="choice " >IAmA</a><a href="http://www.reddit.com/r/movies/" class="choice " >movies</a><a href="http://www.reddit.com/r/Music/" class="choice " >Music</a><a href="http://www.reddit.com/r/news/" class="choice " >news</a><a href="http://www.reddit.com/r/pics/" class="choice " >pics</a><a href="http://www.reddit.com/r/science/" class="choice " >science</a><a href="http://www.reddit.com/r/technology/" class="choice " >technology</a><a href="http://www.reddit.com/r/television/" class="choice " >television</a><a href="http://www.reddit.com/r/todayilearned/" class="choice " >todayilearned</a><a href="http://www.reddit.com/r/videos/" class="choice " >videos</a><a href="http://www.reddit.com/r/worldnews/" class="choice " >worldnews</a><a href="http://www.reddit.com/r/WTF/" class="choice " >WTF</a><a href="http://www.reddit.com/subreddits/" class="choice bottom-option" >edit subscriptions</a></div><div class="sr-list"><ul class="flat-list sr-bar hover" ><li ><a href="http://www.reddit.com/" >front</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/all/" >all</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/random/" class="random" >random</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/friends/" >friends</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/mod" >mod</a></li></ul><span class="separator"> | </span><ul class="flat-list sr-bar hover" ><li ><a href="http://www.reddit.com/r/pics/" >pics</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/funny/" >funny</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/gaming/" >gaming</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/AskReddit/" >AskReddit</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/worldnews/" >worldnews</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/news/" >news</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/videos/" >videos</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/IAmA/" >IAmA</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/todayilearned/" >todayilearned</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/aww/" >aww</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/technology/" >technology</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/AdviceAnimals/" >AdviceAnimals</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/science/" >science</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/Music/" >Music</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/movies/" >movies</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/bestof/" >bestof</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/books/" >books</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/EarthPorn/" >EarthPorn</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/explainlikeimfive/" >explainlikeimfive</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/gifs/" >gifs</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/television/" >television</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/askscience/" >askscience</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/WTF/" >WTF</a></li></ul><span class="separator"> – </span><ul class="flat-list sr-bar hover" id='sr-bar'><li ><a href="http://www.reddit.com/r/sports/" >sports</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/mildlyinteresting/" >mildlyinteresting</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/LifeProTips/" >LifeProTips</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/woahdude/" >woahdude</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/Unexpected/" >Unexpected</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/reactiongifs/" >reactiongifs</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/Showerthoughts/" >Showerthoughts</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/food/" >food</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/Jokes/" >Jokes</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/photoshopbattles/" >photoshopbattles</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/firstworldanarchists/" >firstworldanarchists</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/FoodPorn/" >FoodPorn</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/HistoryPorn/" >HistoryPorn</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/leagueoflegends/" >leagueoflegends</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/cringepics/" >cringepics</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/politics/" >politics</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/4chan/" >4chan</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/DotA2/" >DotA2</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/MakeupAddiction/" >MakeupAddiction</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/pokemon/" >pokemon</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/pcmasterrace/" >pcmasterrace</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/dogecoin/" >dogecoin</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/soccer/" >soccer</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/atheism/" >atheism</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/gentlemanboners/" >gentlemanboners</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/Minecraft/" >Minecraft</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/nfl/" >nfl</a></li></ul></div><a href="http://www.reddit.com/subreddits/" id="sr-more-link" >edit »</a></div></div><div id="header-bottom-left"><a href="http://www.reddit.com/" id="header-img-a" ><img id='header-img' src="http://b.thumbs.redditmedia.com/harEHsUUZVajabtC.png" width='120' height='40' alt="<REDDIT_USERNAME>_testsub"/></a> <span class="hover pagename redditname"><a href="http://www.reddit.com/r/<REDDIT_USERNAME>_testsub/" ><REDDIT_USERNAME>_testsub</a>: this subreddit is private</span></div><div id="header-bottom-right"><span class="user"><a href="http://www.reddit.com/user/RedditKitTester/" >RedditKitTester</a> (<span class="userkarma" title="link karma">1</span>)</span><span class="separator">|</span><a title="no new mail" href="http://www.reddit.com/message/inbox/" class="nohavemail" id="mail" >messages</a><span class="separator">|</span><a title="no new mod mail" href="http://www.reddit.com/message/moderator/" class="nohavemail" id="modmail" >mod messages</a><span class="separator">|</span><ul class="flat-list hover" ><li ><a href="http://www.reddit.com/prefs/" class="pref-lang" >preferences</a></li></ul><span class="separator">|</span><form method="post" action="http://www.reddit.com/logout" class="logout hover" ><input type="hidden" name="uh" value="5ufnxcz2qyba98311641208fcc997a6785a5c29f7e438caf18"/><input type="hidden" name="top" value="off"/><input type="hidden" name="dest" value="/r/<REDDIT_USERNAME>_testsub/api/wiki/alloweditor/del"/><a href="javascript:void(0)" onclick="$(this).parent().submit()" >logout</a></form></div></div><a name="content"></a><div class="content" role="main"><div id="classy-error" class="content"><img src="http://www.redditstatic.com/subreddit-private.png" alt="" /><h1>this subreddit is private</h1><div class="errorpage-message"><p>the moderators of this subreddit have set it to private. you must be a moderator or approved submitter to view its contents.</p>
|
94
|
+
|
95
|
+
</div><div class="errorpage-message sr-description"><h2>a message from the moderators of /r/<REDDIT_USERNAME>_testsub</h2><p>A sub to test stuff.</p>
|
96
|
+
|
97
|
+
</div></div></div><div class="footer-parent"><div by-zero class="footer rounded"><div class="col"><ul class="flat-vert hover" ><li class="flat-vert title">about</li><li ><a href="http://www.reddit.com/blog/" >blog</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/about/" >about</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/about/team/" >team</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/code/" >source code</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/ad_inq/" >advertise</a></li></ul></div><div class="col"><ul class="flat-vert hover" ><li class="flat-vert title">help</li><li ><a href="http://www.reddit.com/wiki/" >wiki</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/wiki/faq" >FAQ</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/wiki/reddiquette" >reddiquette</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/rules/" >rules</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/contact/" >contact us</a></li></ul></div><div class="col"><ul class="flat-vert hover" ><li class="flat-vert title">tools</li><li ><a href="http://i.reddit.com" >mobile</a></li><li ><span class="separator"></span><a href="https://addons.mozilla.org/firefox/addon/socialite/" >firefox extension</a></li><li ><span class="separator"></span><a href="https://chrome.google.com/webstore/detail/algjnflpgoopkdijmkalfcifomdhmcbe" >chrome extension</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/r/<REDDIT_USERNAME>_testsub/buttons/" >buttons</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/r/<REDDIT_USERNAME>_testsub/widget/" >widget</a></li></ul></div><div class="col"><ul class="flat-vert hover" ><li class="flat-vert title"><3</li><li ><a href="http://www.reddit.com/gold/about/" class="buygold" >reddit gold</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/store/" >store</a></li><li ><span class="separator"></span><a href="http://redditgifts.com" >redditgifts</a></li><li ><span class="separator"></span><a href="http://reddit.tv" >reddit.tv</a></li><li ><span class="separator"></span><a href="http://radioreddit.com" >radio reddit</a></li></ul></div></div><p class="bottommenu">Use of this site constitutes acceptance of our <a href="http://www.reddit.com/help/useragreement" class="updated" >User Agreement (updated)</a> and <a href="http://www.reddit.com/help/privacypolicy" >Privacy Policy</a>. © 2014 reddit inc. All rights reserved.</p><p class="bottommenu">REDDIT and the ALIEN Logo are registered trademarks of reddit inc.</p></div><p class="debuginfo"><span class="icon">π</span> <span class="content">Rendered by PID 22684 on  app-229  at 2014-01-29 23:31:52.537509+00:00 running f70be73.</span></p><script type="text/javascript" src="http://www.redditstatic.com/reddit.en.3-2V-ykFTnw.js"></script></body></html>
|
98
|
+
http_version:
|
99
|
+
recorded_at: Wed, 29 Jan 2014 23:30:38 GMT
|
100
|
+
recorded_with: VCR 2.8.0
|
data/spec/cassettes/RedditKit_Client_Wiki/_revert_to_revision/requests_the_correct_resource.yml
CHANGED
@@ -18,7 +18,7 @@ http_interactions:
|
|
18
18
|
Accept-Encoding:
|
19
19
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
20
|
Accept:
|
21
|
-
-
|
21
|
+
- '*/*'
|
22
22
|
response:
|
23
23
|
status:
|
24
24
|
code: 404
|
@@ -33,14 +33,68 @@ http_interactions:
|
|
33
33
|
Content-Type:
|
34
34
|
- application/json; charset=UTF-8
|
35
35
|
Server:
|
36
|
-
-
|
36
|
+
- '''; DROP TABLE servertypes; --'
|
37
37
|
Date:
|
38
38
|
- Sun, 10 Nov 2013 22:21:31 GMT
|
39
39
|
Connection:
|
40
40
|
- close
|
41
41
|
body:
|
42
42
|
encoding: UTF-8
|
43
|
-
string:
|
43
|
+
string: '{"reason": "INVALID_REVISION"}'
|
44
44
|
http_version:
|
45
45
|
recorded_at: Sun, 10 Nov 2013 22:21:29 GMT
|
46
|
-
|
46
|
+
- request:
|
47
|
+
method: post
|
48
|
+
uri: http://www.reddit.com/r/<REDDIT_USERNAME>_testsub/api/wiki/revert
|
49
|
+
body:
|
50
|
+
encoding: US-ASCII
|
51
|
+
string: page=fake-page&revision=12345
|
52
|
+
headers:
|
53
|
+
User-Agent:
|
54
|
+
- Faraday v0.8.8
|
55
|
+
Cookie:
|
56
|
+
- reddit_session=20332937,2013-11-10T11:35:59,2077074c26ccd8ec123c996b77eeb7afb6090af9
|
57
|
+
X-Modhash:
|
58
|
+
- 36zuxndsdf695692a68e32384990478663dadfc30f0a1dd959
|
59
|
+
Content-Type:
|
60
|
+
- application/x-www-form-urlencoded
|
61
|
+
Accept-Encoding:
|
62
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
63
|
+
Accept:
|
64
|
+
- '*/*'
|
65
|
+
response:
|
66
|
+
status:
|
67
|
+
code: 403
|
68
|
+
message: Forbidden
|
69
|
+
headers:
|
70
|
+
Content-Type:
|
71
|
+
- text/html; charset=UTF-8
|
72
|
+
Cache-Control:
|
73
|
+
- no-cache
|
74
|
+
Pragma:
|
75
|
+
- no-cache
|
76
|
+
X-Frame-Options:
|
77
|
+
- SAMEORIGIN
|
78
|
+
X-Content-Type-Options:
|
79
|
+
- nosniff
|
80
|
+
X-Xss-Protection:
|
81
|
+
- 1; mode=block
|
82
|
+
Server:
|
83
|
+
- '''; DROP TABLE servertypes; --'
|
84
|
+
Vary:
|
85
|
+
- accept-encoding
|
86
|
+
Date:
|
87
|
+
- Wed, 29 Jan 2014 23:31:55 GMT
|
88
|
+
Connection:
|
89
|
+
- close
|
90
|
+
body:
|
91
|
+
encoding: UTF-8
|
92
|
+
string: |-
|
93
|
+
<!doctype html><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" ><head><title><REDDIT_USERNAME>_testsub: this subreddit is private</title><meta name="keywords" content=" reddit, reddit.com, vote, comment, submit " /><meta name="description" content="reddit: the front page of the internet" /><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta name="viewport" content="width=1024"><link rel='icon' href="http://www.redditstatic.com/icon.png" sizes="256x256" type="image/png" /><link rel='shortcut icon' href="http://www.redditstatic.com/favicon.ico" type="image/x-icon" /><link rel='apple-touch-icon-precomposed' href="http://www.redditstatic.com/icon-touch.png" /><link rel="stylesheet" type="text/css" href="http://www.redditstatic.com/reddit.UlGbTiEmbr8.css" media="all"><!--[if lt IE 7]><link rel="stylesheet" href="http://www.redditstatic.com/reddit-ie6-hax.nzvIdaFFlC8.css" type="text/css" /><![endif]--><!--[if lt IE 8]><link rel="stylesheet" href="http://www.redditstatic.com/reddit-ie7-hax.OVwpXEcnYDU.css" type="text/css" /><![endif]--><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script><script type="text/javascript" src="http://www.redditstatic.com/reddit-init.en.-d9g8d2B9K8.js"></script><!--[if lt IE 9]><script type="text/javascript" src="http://www.redditstatic.com/html5shiv.n0ysDxgy3AI.js"></script><![endif]--><script type="text/javascript" id="config">r.setup({"static_root": "http://www.redditstatic.com", "ajax_domain": "www.reddit.com", "https_endpoint": "https://ssl.reddit.com", "server_time": 1391038314.0, "post_site": "<REDDIT_USERNAME>_testsub", "extension": "", "clicktracker_url": "//pixel.redditmedia.com/click", "fetch_trackers_url": "//tracker.redditmedia.com/fetch-trackers", "renderstyle": "html", "status_msg": {"fetching": "fetching title...", "loading": "loading...", "submitting": "submitting..."}, "modhash": "u4yrxndrsa5ab8635c33747c881cb610bc021bc56ee3dc6ac6", "logged": "RedditKitTester", "is_fake": false, "store_visits": false, "cur_domain": "reddit.com", "over_18": true, "vote_hash": "", "debug": false, "send_logs": true, "adtracker_url": "//pixel.redditmedia.com/pixel/of_doom.png", "uitracker_url": "//pixel.redditmedia.com/pixel/of_discovery.png"})</script><script type="text/javascript">reddit.cur_site = "t5_301nt";</script><style type="text/css">/* Custom css: use this block to insert special translation-dependent css in the page header */</style></head><body class="loggedin" ><div id="header" role="banner"><a tabindex="1" href="#content" id="jumpToContent">jump to content</a><div id="sr-header-area"><div class="width-clip"><div class="dropdown srdrop " onclick="open_menu(this)" onmouseover="hover_open_menu(this)"><span class="selected title">my subreddits</span></div><div class="drop-choices srdrop "><a href="http://www.reddit.com/r/AdviceAnimals/" class="choice " >AdviceAnimals</a><a href="http://www.reddit.com/r/announcements/" class="choice " >announcements</a><a href="http://www.reddit.com/r/AskReddit/" class="choice " >AskReddit</a><a href="http://www.reddit.com/r/askscience/" class="choice " >askscience</a><a href="http://www.reddit.com/r/aww/" class="choice " >aww</a><a href="http://www.reddit.com/r/bestof/" class="choice " >bestof</a><a href="http://www.reddit.com/r/blog/" class="choice " >blog</a><a href="http://www.reddit.com/r/books/" class="choice " >books</a><a href="http://www.reddit.com/r/EarthPorn/" class="choice " >EarthPorn</a><a href="http://www.reddit.com/r/explainlikeimfive/" class="choice " >explainlikeimfive</a><a href="http://www.reddit.com/r/funny/" class="choice " >funny</a><a href="http://www.reddit.com/r/gaming/" class="choice " >gaming</a><a href="http://www.reddit.com/r/gifs/" class="choice " >gifs</a><a href="http://www.reddit.com/r/IAmA/" class="choice " >IAmA</a><a href="http://www.reddit.com/r/movies/" class="choice " >movies</a><a href="http://www.reddit.com/r/Music/" class="choice " >Music</a><a href="http://www.reddit.com/r/news/" class="choice " >news</a><a href="http://www.reddit.com/r/pics/" class="choice " >pics</a><a href="http://www.reddit.com/r/science/" class="choice " >science</a><a href="http://www.reddit.com/r/technology/" class="choice " >technology</a><a href="http://www.reddit.com/r/television/" class="choice " >television</a><a href="http://www.reddit.com/r/todayilearned/" class="choice " >todayilearned</a><a href="http://www.reddit.com/r/videos/" class="choice " >videos</a><a href="http://www.reddit.com/r/worldnews/" class="choice " >worldnews</a><a href="http://www.reddit.com/r/WTF/" class="choice " >WTF</a><a href="http://www.reddit.com/subreddits/" class="choice bottom-option" >edit subscriptions</a></div><div class="sr-list"><ul class="flat-list sr-bar hover" ><li ><a href="http://www.reddit.com/" >front</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/all/" >all</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/random/" class="random" >random</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/friends/" >friends</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/mod" >mod</a></li></ul><span class="separator"> | </span><ul class="flat-list sr-bar hover" ><li ><a href="http://www.reddit.com/r/pics/" >pics</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/funny/" >funny</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/gaming/" >gaming</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/AskReddit/" >AskReddit</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/worldnews/" >worldnews</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/news/" >news</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/videos/" >videos</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/IAmA/" >IAmA</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/todayilearned/" >todayilearned</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/aww/" >aww</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/technology/" >technology</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/AdviceAnimals/" >AdviceAnimals</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/science/" >science</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/Music/" >Music</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/movies/" >movies</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/bestof/" >bestof</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/books/" >books</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/EarthPorn/" >EarthPorn</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/explainlikeimfive/" >explainlikeimfive</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/gifs/" >gifs</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/television/" >television</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/askscience/" >askscience</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/WTF/" >WTF</a></li></ul><span class="separator"> – </span><ul class="flat-list sr-bar hover" id='sr-bar'><li ><a href="http://www.reddit.com/r/sports/" >sports</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/mildlyinteresting/" >mildlyinteresting</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/LifeProTips/" >LifeProTips</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/woahdude/" >woahdude</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/Unexpected/" >Unexpected</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/reactiongifs/" >reactiongifs</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/Showerthoughts/" >Showerthoughts</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/food/" >food</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/Jokes/" >Jokes</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/photoshopbattles/" >photoshopbattles</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/firstworldanarchists/" >firstworldanarchists</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/FoodPorn/" >FoodPorn</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/HistoryPorn/" >HistoryPorn</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/leagueoflegends/" >leagueoflegends</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/cringepics/" >cringepics</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/politics/" >politics</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/4chan/" >4chan</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/DotA2/" >DotA2</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/MakeupAddiction/" >MakeupAddiction</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/pokemon/" >pokemon</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/pcmasterrace/" >pcmasterrace</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/dogecoin/" >dogecoin</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/soccer/" >soccer</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/atheism/" >atheism</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/gentlemanboners/" >gentlemanboners</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/Minecraft/" >Minecraft</a></li><li ><span class="separator">-</span><a href="http://www.reddit.com/r/nfl/" >nfl</a></li></ul></div><a href="http://www.reddit.com/subreddits/" id="sr-more-link" >edit »</a></div></div><div id="header-bottom-left"><a href="http://www.reddit.com/" id="header-img-a" ><img id='header-img' src="http://b.thumbs.redditmedia.com/harEHsUUZVajabtC.png" width='120' height='40' alt="<REDDIT_USERNAME>_testsub"/></a> <span class="hover pagename redditname"><a href="http://www.reddit.com/r/<REDDIT_USERNAME>_testsub/" ><REDDIT_USERNAME>_testsub</a>: this subreddit is private</span></div><div id="header-bottom-right"><span class="user"><a href="http://www.reddit.com/user/RedditKitTester/" >RedditKitTester</a> (<span class="userkarma" title="link karma">1</span>)</span><span class="separator">|</span><a title="no new mail" href="http://www.reddit.com/message/inbox/" class="nohavemail" id="mail" >messages</a><span class="separator">|</span><a title="no new mod mail" href="http://www.reddit.com/message/moderator/" class="nohavemail" id="modmail" >mod messages</a><span class="separator">|</span><ul class="flat-list hover" ><li ><a href="http://www.reddit.com/prefs/" class="pref-lang" >preferences</a></li></ul><span class="separator">|</span><form method="post" action="http://www.reddit.com/logout" class="logout hover" ><input type="hidden" name="uh" value="u4yrxndrsa5ab8635c33747c881cb610bc021bc56ee3dc6ac6"/><input type="hidden" name="top" value="off"/><input type="hidden" name="dest" value="/r/<REDDIT_USERNAME>_testsub/api/wiki/revert"/><a href="javascript:void(0)" onclick="$(this).parent().submit()" >logout</a></form></div></div><a name="content"></a><div class="content" role="main"><div id="classy-error" class="content"><img src="http://www.redditstatic.com/subreddit-private.png" alt="" /><h1>this subreddit is private</h1><div class="errorpage-message"><p>the moderators of this subreddit have set it to private. you must be a moderator or approved submitter to view its contents.</p>
|
94
|
+
|
95
|
+
</div><div class="errorpage-message sr-description"><h2>a message from the moderators of /r/<REDDIT_USERNAME>_testsub</h2><p>A sub to test stuff.</p>
|
96
|
+
|
97
|
+
</div></div></div><div class="footer-parent"><div by-zero class="footer rounded"><div class="col"><ul class="flat-vert hover" ><li class="flat-vert title">about</li><li ><a href="http://www.reddit.com/blog/" >blog</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/about/" >about</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/about/team/" >team</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/code/" >source code</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/ad_inq/" >advertise</a></li></ul></div><div class="col"><ul class="flat-vert hover" ><li class="flat-vert title">help</li><li ><a href="http://www.reddit.com/wiki/" >wiki</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/wiki/faq" >FAQ</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/wiki/reddiquette" >reddiquette</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/rules/" >rules</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/contact/" >contact us</a></li></ul></div><div class="col"><ul class="flat-vert hover" ><li class="flat-vert title">tools</li><li ><a href="http://i.reddit.com" >mobile</a></li><li ><span class="separator"></span><a href="https://addons.mozilla.org/firefox/addon/socialite/" >firefox extension</a></li><li ><span class="separator"></span><a href="https://chrome.google.com/webstore/detail/algjnflpgoopkdijmkalfcifomdhmcbe" >chrome extension</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/r/<REDDIT_USERNAME>_testsub/buttons/" >buttons</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/r/<REDDIT_USERNAME>_testsub/widget/" >widget</a></li></ul></div><div class="col"><ul class="flat-vert hover" ><li class="flat-vert title"><3</li><li ><a href="http://www.reddit.com/gold/about/" class="buygold" >reddit gold</a></li><li ><span class="separator"></span><a href="http://www.reddit.com/store/" >store</a></li><li ><span class="separator"></span><a href="http://redditgifts.com" >redditgifts</a></li><li ><span class="separator"></span><a href="http://reddit.tv" >reddit.tv</a></li><li ><span class="separator"></span><a href="http://radioreddit.com" >radio reddit</a></li></ul></div></div><p class="bottommenu">Use of this site constitutes acceptance of our <a href="http://www.reddit.com/help/useragreement" class="updated" >User Agreement (updated)</a> and <a href="http://www.reddit.com/help/privacypolicy" >Privacy Policy</a>. © 2014 reddit inc. All rights reserved.</p><p class="bottommenu">REDDIT and the ALIEN Logo are registered trademarks of reddit inc.</p></div><p class="debuginfo"><span class="icon">π</span> <span class="content">Rendered by PID 23158 on  app-229  at 2014-01-29 23:31:54.846411+00:00 running f70be73.</span></p><script type="text/javascript" src="http://www.redditstatic.com/reddit.en.3-2V-ykFTnw.js"></script></body></html>
|
98
|
+
http_version:
|
99
|
+
recorded_at: Wed, 29 Jan 2014 23:30:40 GMT
|
100
|
+
recorded_with: VCR 2.8.0
|
@@ -2,12 +2,12 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe RedditKit::Comment, :vcr do
|
4
4
|
|
5
|
-
it "should return replies" do
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
end
|
5
|
+
# it "should return replies" do
|
6
|
+
# comments = RedditKit.comments '1n002d'
|
7
|
+
# comment = comments.first
|
8
|
+
#
|
9
|
+
# expect(comment.replies?).to be true
|
10
|
+
# end
|
11
11
|
|
12
12
|
it "should be deleted if both author and comment attributes are set to '[deleted]'" do
|
13
13
|
attributes = { :data => { :author => '[deleted]', :body => '[deleted]' } }
|
data/spec/redditkit/link_spec.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
require 'spec_helper'
|
2
4
|
|
3
5
|
describe RedditKit::Link do
|
4
|
-
|
5
6
|
before :all do
|
6
7
|
attributes = { :data => { :id => '12345', :title => "&", :url => 'http://example.com/test.png', :permalink => 'permalink', :created_utc => Time.now.to_i } }
|
7
8
|
@link = RedditKit::Link.new attributes
|
@@ -11,10 +12,13 @@ describe RedditKit::Link do
|
|
11
12
|
|
12
13
|
parameter_link_attributes = { :data => { :id => '12345', :url => 'http://example.com/test?param=something&whatever=test', :created_utc => Time.new(2000, 1, 1).to_i } }
|
13
14
|
@link_with_parameters = RedditKit::Link.new parameter_link_attributes
|
15
|
+
|
16
|
+
unicode_link_attributes = { :data => { :id => '12345', :permalink => '이것은_웹_페이지입니', :created_utc => Time.new(2000, 1, 1).to_i } }
|
17
|
+
@link_with_unicode = RedditKit::Link.new unicode_link_attributes
|
14
18
|
end
|
15
19
|
|
16
20
|
it "decodes HTML entities in link titles" do
|
17
|
-
expect(@link.title).to eq '&'
|
21
|
+
expect(@link.title).to eq '&'
|
18
22
|
end
|
19
23
|
|
20
24
|
it "decodes HTML entities in link URLs" do
|
@@ -29,16 +33,43 @@ describe RedditKit::Link do
|
|
29
33
|
expect(@old_link.showing_link_score?).to be true
|
30
34
|
end
|
31
35
|
|
32
|
-
|
33
|
-
|
36
|
+
describe 'image_link?' do
|
37
|
+
it 'returns true if the link has an image extension' do
|
38
|
+
attributes = { :data => { :id => '12345', :url => 'http://example.com/test.png' } }
|
39
|
+
link = RedditKit::Link.new attributes
|
40
|
+
|
41
|
+
expect(link.image_link?).to be_truthy
|
42
|
+
end
|
43
|
+
|
44
|
+
it 'returns false if the link does not have an image extension' do
|
45
|
+
attributes = { :data => { :id => '12345', :url => 'http://example.com/' } }
|
46
|
+
link = RedditKit::Link.new attributes
|
47
|
+
|
48
|
+
expect(link.image_link?).to be_falsy
|
49
|
+
end
|
34
50
|
end
|
35
51
|
|
36
|
-
|
37
|
-
|
52
|
+
describe 'permalink' do
|
53
|
+
it "returns the link's permalink" do
|
54
|
+
attributes = { :data => { :id => '12345', :title => 'Permalink', :url => 'http://example.com/test.png', :permalink => 'permalink', :created_utc => Time.now.to_i } }
|
55
|
+
link = RedditKit::Link.new attributes
|
56
|
+
|
57
|
+
expect(link.permalink).to eq 'http://www.reddit.com/permalink'
|
58
|
+
end
|
59
|
+
|
60
|
+
it 'does not allow duplicate forward slashes' do
|
61
|
+
attributes = { :data => { :id => '12345', :title => 'Permalink', :url => 'http://example.com/test.png', :permalink => '/r/technology/comments/2lndtl/pirate_bay_is_still_online_even_though_all_of_its/', :created_utc => Time.now.to_i } }
|
62
|
+
link = RedditKit::Link.new attributes
|
63
|
+
|
64
|
+
expect(link.permalink).to eq 'http://www.reddit.com/r/technology/comments/2lndtl/pirate_bay_is_still_online_even_though_all_of_its/'
|
65
|
+
end
|
66
|
+
|
67
|
+
it "returns the link's encoded permalink" do
|
68
|
+
expect(@link_with_unicode.permalink).to eq 'http://www.reddit.com/%EC%9D%B4%EA%B2%83%EC%9D%80_%EC%9B%B9_%ED%8E%98%EC%9D%B4%EC%A7%80%EC%9E%85%EB%8B%88'
|
69
|
+
end
|
38
70
|
end
|
39
71
|
|
40
72
|
it "returns the link's short URL" do
|
41
73
|
expect(@link.short_link).to eq 'http://redd.it/12345'
|
42
74
|
end
|
43
|
-
|
44
75
|
end
|