usaidwat 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +7 -2
- data/features/fixtures/user_mipadi.json +16 -0
- data/features/fixtures/user_testuser.json +3 -0
- data/features/log.feature +485 -0
- data/features/step_definitions/reddit_steps.rb +1 -1
- data/features/tally.feature +117 -0
- data/features/user.feature +33 -0
- data/lib/usaidwat/application.rb +88 -18
- data/lib/usaidwat/client.rb +32 -1
- data/lib/usaidwat/either.rb +41 -0
- data/lib/usaidwat/ext/time.rb +55 -4
- data/lib/usaidwat/formatter.rb +38 -14
- data/lib/usaidwat/service.rb +17 -9
- data/lib/usaidwat/version.rb +1 -1
- data/spec/usaidwat/client_spec.rb +92 -6
- data/spec/usaidwat/either_spec.rb +52 -0
- data/spec/usaidwat/formatter_spec.rb +94 -1
- data/spec/usaidwat/time_spec.rb +165 -1
- data/usaidwat.gemspec +5 -3
- metadata +34 -21
- data/features/browse.feature +0 -361
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cee5e3074ed0c1494df8b93773ddc846a169e2d0
|
4
|
+
data.tar.gz: 518e15089d071d24074726d811cb368726cc9f1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: caac90a393995ac867f4301875512d3f710de36badf79ce7d54d0cd890d5494936ee931d61ed9405f769c0ef9233e0bf43ed5a2aac3bacc5a4ab2ba020fce7b0
|
7
|
+
data.tar.gz: 83df727948a67445cec59a3f88c66e2a96d9ef01ec66104e3ebca83302c10399a73c76217afeda8c6c9e899ac2f517b238870bfa1b612cd8090f1a4b9fd43839
|
data/Rakefile
CHANGED
@@ -15,14 +15,19 @@ task :perms do
|
|
15
15
|
system "chmod", "-R", "a+rX", *`git ls-files`.chomp.split("\n")
|
16
16
|
end
|
17
17
|
|
18
|
+
desc "Tag the latest version of usaidwat"
|
19
|
+
task :tag do
|
20
|
+
system "git", "tag", "-s", "-m", "usaidwat v#{USaidWat::VERSION}", "v#{USaidWat::VERSION}"
|
21
|
+
end
|
22
|
+
|
18
23
|
desc "Install usaidwat.gem"
|
19
24
|
task :install => :build do
|
20
25
|
system "gem", "install", GEM
|
21
26
|
end
|
22
27
|
|
23
28
|
desc "Push gem to RubyGems"
|
24
|
-
task :release => :build do
|
25
|
-
|
29
|
+
task :release => [:tag, :build] do
|
30
|
+
fail 'Cannot release a dev version' if USaidWat::VERSION.end_with?('dev')
|
26
31
|
system "gem", "push", GEM
|
27
32
|
end
|
28
33
|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
{
|
2
|
+
"kind": "t2",
|
3
|
+
"data": {
|
4
|
+
"name": "mipadi",
|
5
|
+
"is_friend": false,
|
6
|
+
"created": 1207007726,
|
7
|
+
"hide_from_robots": true,
|
8
|
+
"created_utc": 1207004126,
|
9
|
+
"link_karma": 4892,
|
10
|
+
"comment_karma": 33440,
|
11
|
+
"is_gold": false,
|
12
|
+
"is_mod": true,
|
13
|
+
"has_verified_email": null,
|
14
|
+
"id": "34agu"
|
15
|
+
}
|
16
|
+
}
|
@@ -0,0 +1,485 @@
|
|
1
|
+
Feature: Browse comments
|
2
|
+
|
3
|
+
As a Redditor
|
4
|
+
I want to quickly be able to list another Redditor's comments
|
5
|
+
In order to see what they like to talk about
|
6
|
+
|
7
|
+
Scenario: List all comments
|
8
|
+
Given the Reddit service returns comments for the user "mipadi"
|
9
|
+
And time is frozen at Jun 24, 2015 11:05 AM
|
10
|
+
When I run `usaidwat log mipadi`
|
11
|
+
Then it should pass with:
|
12
|
+
"""
|
13
|
+
wikipedia
|
14
|
+
http://www.reddit.com/r/wikipedia/comments/142t4w/z/c79peed
|
15
|
+
Heisenbug: a software bug that seems to disappear or alter its behavior when one
|
16
|
+
over 2 years ago • +1
|
17
|
+
|
18
|
+
Yep. My first experience with a Heisenbug occurred in a C++ program, and disappeared when I tried to print a variable with printf (only to reappear when that call was removed).
|
19
|
+
|
20
|
+
|
21
|
+
nyc
|
22
|
+
http://www.reddit.com/r/nyc/comments/141zqc/z/c79dxg6
|
23
|
+
NYC taxi roof lights get overhaul - A light simply will mean the cab is availab
|
24
|
+
over 2 years ago • +2
|
25
|
+
|
26
|
+
It has a fare when the lights are off.
|
27
|
+
|
28
|
+
|
29
|
+
worldnews
|
30
|
+
http://www.reddit.com/r/worldnews/comments/140mra/z/c797jq4
|
31
|
+
Palestinians win upgraded UN status by wide margin
|
32
|
+
over 2 years ago • +1
|
33
|
+
|
34
|
+
The Judgment of Solomon Accords.
|
35
|
+
"""
|
36
|
+
|
37
|
+
Scenario: List a limited selection of comments
|
38
|
+
Given the Reddit service returns comments for the user "mipadi"
|
39
|
+
And time is frozen at Jun 24, 2015 11:05 AM
|
40
|
+
When I run `usaidwat log -n 2 mipadi`
|
41
|
+
Then it should pass with exactly:
|
42
|
+
"""
|
43
|
+
wikipedia
|
44
|
+
http://www.reddit.com/r/wikipedia/comments/142t4w/z/c79peed
|
45
|
+
Heisenbug: a software bug that seems to disappear or alter its behavior when one
|
46
|
+
over 2 years ago • +1
|
47
|
+
|
48
|
+
Yep. My first experience with a Heisenbug occurred in a C++ program, and disappeared when I tried to print a variable with printf (only to reappear when that call was removed).
|
49
|
+
|
50
|
+
|
51
|
+
nyc
|
52
|
+
http://www.reddit.com/r/nyc/comments/141zqc/z/c79dxg6
|
53
|
+
NYC taxi roof lights get overhaul - A light simply will mean the cab is availab
|
54
|
+
over 2 years ago • +2
|
55
|
+
|
56
|
+
It has a fare when the lights are off.
|
57
|
+
"""
|
58
|
+
|
59
|
+
Scenario: List all comments without relative dates
|
60
|
+
Given the Reddit service returns comments for the user "mipadi"
|
61
|
+
And time is frozen at Jun 24, 2015 11:05 AM
|
62
|
+
When I run `usaidwat log --date=absolute mipadi`
|
63
|
+
Then it should pass with:
|
64
|
+
"""
|
65
|
+
wikipedia
|
66
|
+
http://www.reddit.com/r/wikipedia/comments/142t4w/z/c79peed
|
67
|
+
Heisenbug: a software bug that seems to disappear or alter its behavior when one
|
68
|
+
1 Dec 2012 12:14 PM • +1
|
69
|
+
|
70
|
+
Yep. My first experience with a Heisenbug occurred in a C++ program, and disappeared when I tried to print a variable with printf (only to reappear when that call was removed).
|
71
|
+
|
72
|
+
|
73
|
+
nyc
|
74
|
+
http://www.reddit.com/r/nyc/comments/141zqc/z/c79dxg6
|
75
|
+
NYC taxi roof lights get overhaul - A light simply will mean the cab is availab
|
76
|
+
30 Nov 2012 4:44 PM • +2
|
77
|
+
|
78
|
+
It has a fare when the lights are off.
|
79
|
+
|
80
|
+
|
81
|
+
worldnews
|
82
|
+
http://www.reddit.com/r/worldnews/comments/140mra/z/c797jq4
|
83
|
+
Palestinians win upgraded UN status by wide margin
|
84
|
+
30 Nov 2012 10:09 AM • +1
|
85
|
+
|
86
|
+
The Judgment of Solomon Accords.
|
87
|
+
"""
|
88
|
+
|
89
|
+
Scenario: List all comments using relative dates explicitly
|
90
|
+
Given the Reddit service returns comments for the user "mipadi"
|
91
|
+
And time is frozen at Jun 24, 2015 11:05 AM
|
92
|
+
When I run `usaidwat log --date=relative mipadi`
|
93
|
+
Then it should pass with:
|
94
|
+
"""
|
95
|
+
wikipedia
|
96
|
+
http://www.reddit.com/r/wikipedia/comments/142t4w/z/c79peed
|
97
|
+
Heisenbug: a software bug that seems to disappear or alter its behavior when one
|
98
|
+
over 2 years ago • +1
|
99
|
+
|
100
|
+
Yep. My first experience with a Heisenbug occurred in a C++ program, and disappeared when I tried to print a variable with printf (only to reappear when that call was removed).
|
101
|
+
|
102
|
+
|
103
|
+
nyc
|
104
|
+
http://www.reddit.com/r/nyc/comments/141zqc/z/c79dxg6
|
105
|
+
NYC taxi roof lights get overhaul - A light simply will mean the cab is availab
|
106
|
+
over 2 years ago • +2
|
107
|
+
|
108
|
+
It has a fare when the lights are off.
|
109
|
+
|
110
|
+
|
111
|
+
worldnews
|
112
|
+
http://www.reddit.com/r/worldnews/comments/140mra/z/c797jq4
|
113
|
+
Palestinians win upgraded UN status by wide margin
|
114
|
+
over 2 years ago • +1
|
115
|
+
|
116
|
+
The Judgment of Solomon Accords.
|
117
|
+
"""
|
118
|
+
|
119
|
+
Scenario: List all comments with comment bodies unformatted
|
120
|
+
Given the Reddit service returns comments for the user "mipadi"
|
121
|
+
And time is frozen at Jun 24, 2015 11:05 AM
|
122
|
+
When I run `usaidwat log --raw mipadi`
|
123
|
+
Then it should pass with:
|
124
|
+
"""
|
125
|
+
wikipedia
|
126
|
+
http://www.reddit.com/r/wikipedia/comments/142t4w/z/c79peed
|
127
|
+
Heisenbug: a software bug that seems to disappear or alter its behavior when one
|
128
|
+
over 2 years ago • +1
|
129
|
+
|
130
|
+
Yep. My first experience with a Heisenbug occurred in a C++ program, and disappeared when I tried to print a variable with printf (only to reappear when that call was removed).
|
131
|
+
|
132
|
+
|
133
|
+
nyc
|
134
|
+
http://www.reddit.com/r/nyc/comments/141zqc/z/c79dxg6
|
135
|
+
NYC taxi roof lights get overhaul - A light simply will mean the cab is availab
|
136
|
+
over 2 years ago • +2
|
137
|
+
|
138
|
+
It has a fare when the lights are *off.*
|
139
|
+
|
140
|
+
|
141
|
+
worldnews
|
142
|
+
http://www.reddit.com/r/worldnews/comments/140mra/z/c797jq4
|
143
|
+
Palestinians win upgraded UN status by wide margin
|
144
|
+
over 2 years ago • +1
|
145
|
+
|
146
|
+
The Judgment of Solomon Accords.
|
147
|
+
"""
|
148
|
+
|
149
|
+
Scenario: List comments for multiple subreddits separated by commas
|
150
|
+
Given the Reddit service returns comments for the user "mipadi"
|
151
|
+
And time is frozen at Jun 24, 2015 11:05 AM
|
152
|
+
When I run `usaidwat log mipadi books,django,Games`
|
153
|
+
Then it should pass with:
|
154
|
+
"""
|
155
|
+
Games
|
156
|
+
http://www.reddit.com/r/Games/comments/13xc2o/z/c784qj8
|
157
|
+
The True Story of Battlefield 3, the Battlefield Franchise, Its Community, &
|
158
|
+
over 2 years ago • +2
|
159
|
+
|
160
|
+
That's exactly how I feel. There are times when I have a ton of fun playing BF3…but it always feels like it has so much more potential to be an awesome game.
|
161
|
+
|
162
|
+
And that feeling comes even when the game isn't completely fucking frustrating because some admin is kicking you for using some arbitrary weapon he doesn't like, or switching you to the losing team because he doesn't like getting his ass kicked. Or when the game is simply crashing.
|
163
|
+
|
164
|
+
|
165
|
+
books
|
166
|
+
http://www.reddit.com/r/books/comments/13vijv/z/c77stm8
|
167
|
+
I was saddened hearing this story on the Takeaway this morning- "Is literature n
|
168
|
+
over 2 years ago • +1
|
169
|
+
|
170
|
+
I went to a public school.
|
171
|
+
|
172
|
+
|
173
|
+
django
|
174
|
+
http://www.reddit.com/r/django/comments/13p9ez/z/c77n56i
|
175
|
+
I need a little help understanding billing and payment
|
176
|
+
over 2 years ago • +2
|
177
|
+
|
178
|
+
I have a lot of experience working with Satchmo. I don't recommend it. It's over-engineered, hard to adapt to your own needs, and, while buggy, it's rarely updated anymore.
|
179
|
+
|
180
|
+
|
181
|
+
books
|
182
|
+
http://www.reddit.com/r/books/comments/13vijv/z/c77n2hg
|
183
|
+
I was saddened hearing this story on the Takeaway this morning- "Is literature n
|
184
|
+
over 2 years ago • +11
|
185
|
+
|
186
|
+
Yeah, I'm disappointed that some people only enjoyed two books. I didn't like all of the stuff I read in high school, but I got to read great things like Animal Farm, 1984, Night, Raisin in the Sun, The Glass Menagerie, Shakespeare, King Arthur, A Doll's House, Death of a Salesman, and probably more.
|
187
|
+
"""
|
188
|
+
|
189
|
+
Scenario: List comments for multiple subreddits separated by commas
|
190
|
+
Given the Reddit service returns comments for the user "mipadi"
|
191
|
+
And time is frozen at Jun 24, 2015 11:05 AM
|
192
|
+
When I run `usaidwat log mipadi books+django+Games`
|
193
|
+
Then it should pass with:
|
194
|
+
"""
|
195
|
+
Games
|
196
|
+
http://www.reddit.com/r/Games/comments/13xc2o/z/c784qj8
|
197
|
+
The True Story of Battlefield 3, the Battlefield Franchise, Its Community, &
|
198
|
+
over 2 years ago • +2
|
199
|
+
|
200
|
+
That's exactly how I feel. There are times when I have a ton of fun playing BF3…but it always feels like it has so much more potential to be an awesome game.
|
201
|
+
|
202
|
+
And that feeling comes even when the game isn't completely fucking frustrating because some admin is kicking you for using some arbitrary weapon he doesn't like, or switching you to the losing team because he doesn't like getting his ass kicked. Or when the game is simply crashing.
|
203
|
+
|
204
|
+
|
205
|
+
books
|
206
|
+
http://www.reddit.com/r/books/comments/13vijv/z/c77stm8
|
207
|
+
I was saddened hearing this story on the Takeaway this morning- "Is literature n
|
208
|
+
over 2 years ago • +1
|
209
|
+
|
210
|
+
I went to a public school.
|
211
|
+
|
212
|
+
|
213
|
+
django
|
214
|
+
http://www.reddit.com/r/django/comments/13p9ez/z/c77n56i
|
215
|
+
I need a little help understanding billing and payment
|
216
|
+
over 2 years ago • +2
|
217
|
+
|
218
|
+
I have a lot of experience working with Satchmo. I don't recommend it. It's over-engineered, hard to adapt to your own needs, and, while buggy, it's rarely updated anymore.
|
219
|
+
|
220
|
+
|
221
|
+
books
|
222
|
+
http://www.reddit.com/r/books/comments/13vijv/z/c77n2hg
|
223
|
+
I was saddened hearing this story on the Takeaway this morning- "Is literature n
|
224
|
+
over 2 years ago • +11
|
225
|
+
|
226
|
+
Yeah, I'm disappointed that some people only enjoyed two books. I didn't like all of the stuff I read in high school, but I got to read great things like Animal Farm, 1984, Night, Raisin in the Sun, The Glass Menagerie, Shakespeare, King Arthur, A Doll's House, Death of a Salesman, and probably more.
|
227
|
+
"""
|
228
|
+
|
229
|
+
Scenario: List comments for multiple subreddits separated by commas
|
230
|
+
Given the Reddit service returns comments for the user "mipadi"
|
231
|
+
And time is frozen at Jun 24, 2015 11:05 AM
|
232
|
+
When I run `usaidwat log mipadi books django Games`
|
233
|
+
Then it should pass with:
|
234
|
+
"""
|
235
|
+
Games
|
236
|
+
http://www.reddit.com/r/Games/comments/13xc2o/z/c784qj8
|
237
|
+
The True Story of Battlefield 3, the Battlefield Franchise, Its Community, &
|
238
|
+
over 2 years ago • +2
|
239
|
+
|
240
|
+
That's exactly how I feel. There are times when I have a ton of fun playing BF3…but it always feels like it has so much more potential to be an awesome game.
|
241
|
+
|
242
|
+
And that feeling comes even when the game isn't completely fucking frustrating because some admin is kicking you for using some arbitrary weapon he doesn't like, or switching you to the losing team because he doesn't like getting his ass kicked. Or when the game is simply crashing.
|
243
|
+
|
244
|
+
|
245
|
+
books
|
246
|
+
http://www.reddit.com/r/books/comments/13vijv/z/c77stm8
|
247
|
+
I was saddened hearing this story on the Takeaway this morning- "Is literature n
|
248
|
+
over 2 years ago • +1
|
249
|
+
|
250
|
+
I went to a public school.
|
251
|
+
|
252
|
+
|
253
|
+
django
|
254
|
+
http://www.reddit.com/r/django/comments/13p9ez/z/c77n56i
|
255
|
+
I need a little help understanding billing and payment
|
256
|
+
over 2 years ago • +2
|
257
|
+
|
258
|
+
I have a lot of experience working with Satchmo. I don't recommend it. It's over-engineered, hard to adapt to your own needs, and, while buggy, it's rarely updated anymore.
|
259
|
+
|
260
|
+
|
261
|
+
books
|
262
|
+
http://www.reddit.com/r/books/comments/13vijv/z/c77n2hg
|
263
|
+
I was saddened hearing this story on the Takeaway this morning- "Is literature n
|
264
|
+
over 2 years ago • +11
|
265
|
+
|
266
|
+
Yeah, I'm disappointed that some people only enjoyed two books. I didn't like all of the stuff I read in high school, but I got to read great things like Animal Farm, 1984, Night, Raisin in the Sun, The Glass Menagerie, Shakespeare, King Arthur, A Doll's House, Death of a Salesman, and probably more.
|
267
|
+
"""
|
268
|
+
|
269
|
+
Scenario: Output comments on one line
|
270
|
+
Given the Reddit service returns comments for the user "mipadi"
|
271
|
+
And time is frozen at Jun 24, 2015 11:05 AM
|
272
|
+
When I run `usaidwat log --oneline mipadi`
|
273
|
+
Then it should pass with:
|
274
|
+
"""
|
275
|
+
wikipedia Heisenbug: a software bug that seems to disappear or alter its behavio
|
276
|
+
nyc NYC taxi roof lights get overhaul - A light simply will mean the cab is ava
|
277
|
+
worldnews Palestinians win upgraded UN status by wide margin
|
278
|
+
"""
|
279
|
+
|
280
|
+
Scenario: Output a limited number of comments on one line
|
281
|
+
Given the Reddit service returns comments for the user "mipadi"
|
282
|
+
And time is frozen at Jun 24, 2015 11:05 AM
|
283
|
+
When I run `usaidwat log --oneline -n 2 mipadi`
|
284
|
+
Then it should pass with:
|
285
|
+
"""
|
286
|
+
wikipedia Heisenbug: a software bug that seems to disappear or alter its behavio
|
287
|
+
nyc NYC taxi roof lights get overhaul - A light simply will mean the cab is ava
|
288
|
+
"""
|
289
|
+
|
290
|
+
Scenario: Search for a specific comment
|
291
|
+
Given the Reddit service returns comments for the user "mipadi"
|
292
|
+
And time is frozen at Jun 24, 2015 11:05 AM
|
293
|
+
When I run `usaidwat log --grep='Heisenbug' mipadi`
|
294
|
+
Then it should pass with:
|
295
|
+
"""
|
296
|
+
wikipedia
|
297
|
+
http://www.reddit.com/r/wikipedia/comments/142t4w/z/c79peed
|
298
|
+
Heisenbug: a software bug that seems to disappear or alter its behavior when one
|
299
|
+
over 2 years ago • +1
|
300
|
+
|
301
|
+
Yep. My first experience with a Heisenbug occurred in a C++ program, and disappeared when I tried to print a variable with printf (only to reappear when that call was removed).
|
302
|
+
"""
|
303
|
+
|
304
|
+
Scenario: Search for a specific comment with wrong case
|
305
|
+
Given the Reddit service returns comments for the user "mipadi"
|
306
|
+
And time is frozen at Jun 24, 2015 11:05 AM
|
307
|
+
When I run `usaidwat log --grep='heisenbug' mipadi`
|
308
|
+
Then it should pass with:
|
309
|
+
"""
|
310
|
+
wikipedia
|
311
|
+
http://www.reddit.com/r/wikipedia/comments/142t4w/z/c79peed
|
312
|
+
Heisenbug: a software bug that seems to disappear or alter its behavior when one
|
313
|
+
over 2 years ago • +1
|
314
|
+
|
315
|
+
Yep. My first experience with a Heisenbug occurred in a C++ program, and disappeared when I tried to print a variable with printf (only to reappear when that call was removed).
|
316
|
+
"""
|
317
|
+
|
318
|
+
Scenario: Search for a specific comment with no matches
|
319
|
+
Given the Reddit service returns comments for the user "mipadi"
|
320
|
+
And time is frozen at Jun 24, 2015 11:05 AM
|
321
|
+
When I run `usaidwat log --grep='oogabooga' mipadi`
|
322
|
+
Then it should pass with:
|
323
|
+
"""
|
324
|
+
mipadi has no comments matching /oogabooga/.
|
325
|
+
"""
|
326
|
+
|
327
|
+
Scenario: List all comments for a user that does not exist
|
328
|
+
Given the Reddit service does not have a user "testuser"
|
329
|
+
When I run `usaidwat log testuser`
|
330
|
+
Then it should fail with:
|
331
|
+
"""
|
332
|
+
No such user: testuser
|
333
|
+
"""
|
334
|
+
|
335
|
+
Scenario: List all comments when user has no comments
|
336
|
+
Given the Reddit service returns comments for the user "blank"
|
337
|
+
When I run `usaidwat log blank`
|
338
|
+
Then it should pass with:
|
339
|
+
"""
|
340
|
+
blank has no comments.
|
341
|
+
"""
|
342
|
+
|
343
|
+
Scenario: Search for a comment for a user that does not exist
|
344
|
+
Given the Reddit service does not have a user "testuser"
|
345
|
+
When I run `usaidwat log --grep='Heisenbug' testuser`
|
346
|
+
Then it should fail with:
|
347
|
+
"""
|
348
|
+
No such user: testuser
|
349
|
+
"""
|
350
|
+
|
351
|
+
Scenario: Search for a comment when user has no comments
|
352
|
+
Given the Reddit service returns comments for the user "blank"
|
353
|
+
When I run `usaidwat log --grep='Heisenbug' blank`
|
354
|
+
Then it should pass with:
|
355
|
+
"""
|
356
|
+
blank has no comments matching /Heisenbug/.
|
357
|
+
"""
|
358
|
+
|
359
|
+
Scenario: List comments for a particular subreddit
|
360
|
+
Given the Reddit service returns comments for the user "mipadi"
|
361
|
+
And time is frozen at Jun 24, 2015 11:05 AM
|
362
|
+
When I run `usaidwat log mipadi AskReddit`
|
363
|
+
Then it should pass with:
|
364
|
+
"""
|
365
|
+
AskReddit
|
366
|
+
http://www.reddit.com/r/AskReddit/comments/141kt9/z/c795rwz
|
367
|
+
Do colleges actually teach students how to think critically? Or even to think/qu
|
368
|
+
over 2 years ago • +1
|
369
|
+
|
370
|
+
I think it depends on where you go and what you study, but yes, I think they do teach you to think critically, especially in humanities courses and seminars. Maybe it's just because I went to a small, private liberal arts college rather than a huge school, but critical thinking was definitely a part of my education.
|
371
|
+
|
372
|
+
|
373
|
+
AskReddit
|
374
|
+
http://www.reddit.com/r/AskReddit/comments/140t5c/z/c795nw3
|
375
|
+
I'm from Tennessee and most of our jokes are geared toward Mississippi and Alaba
|
376
|
+
over 2 years ago • +1
|
377
|
+
|
378
|
+
You're from New Jersey? Which exit?
|
379
|
+
|
380
|
+
|
381
|
+
AskReddit
|
382
|
+
http://www.reddit.com/r/AskReddit/comments/140h3z/z/c795muo
|
383
|
+
Today I was going 80mph in a 55 when an unmarked police car pulled up next to me
|
384
|
+
over 2 years ago • +1
|
385
|
+
|
386
|
+
You didn't slow down for very long though, did you?
|
387
|
+
"""
|
388
|
+
|
389
|
+
Scenario: Search in comments for a particular subreddit
|
390
|
+
Given the Reddit service returns comments for the user "mipadi"
|
391
|
+
And time is frozen at Jun 24, 2015 11:05 AM
|
392
|
+
When I run `usaidwat log --grep='New Jersey' mipadi AskReddit`
|
393
|
+
Then it should pass with:
|
394
|
+
"""
|
395
|
+
AskReddit
|
396
|
+
http://www.reddit.com/r/AskReddit/comments/140t5c/z/c795nw3
|
397
|
+
I'm from Tennessee and most of our jokes are geared toward Mississippi and Alaba
|
398
|
+
over 2 years ago • +1
|
399
|
+
|
400
|
+
You're from New Jersey? Which exit?
|
401
|
+
"""
|
402
|
+
|
403
|
+
Scenario: Search in comments for a particular subreddit with wrong case
|
404
|
+
Given the Reddit service returns comments for the user "mipadi"
|
405
|
+
And time is frozen at Jun 24, 2015 11:05 AM
|
406
|
+
When I run `usaidwat log --grep='new jersey' mipadi AskReddit`
|
407
|
+
Then it should pass with:
|
408
|
+
"""
|
409
|
+
AskReddit
|
410
|
+
http://www.reddit.com/r/AskReddit/comments/140t5c/z/c795nw3
|
411
|
+
I'm from Tennessee and most of our jokes are geared toward Mississippi and Alaba
|
412
|
+
over 2 years ago • +1
|
413
|
+
|
414
|
+
You're from New Jersey? Which exit?
|
415
|
+
"""
|
416
|
+
|
417
|
+
Scenario: List comments for a particular subreddit specified with the wrong case
|
418
|
+
Given the Reddit service returns comments for the user "mipadi"
|
419
|
+
And time is frozen at Jun 24, 2015 11:05 AM
|
420
|
+
When I run `usaidwat log mipadi askreddit`
|
421
|
+
Then it should pass with:
|
422
|
+
"""
|
423
|
+
AskReddit
|
424
|
+
http://www.reddit.com/r/AskReddit/comments/141kt9/z/c795rwz
|
425
|
+
Do colleges actually teach students how to think critically? Or even to think/qu
|
426
|
+
over 2 years ago • +1
|
427
|
+
|
428
|
+
I think it depends on where you go and what you study, but yes, I think they do teach you to think critically, especially in humanities courses and seminars. Maybe it's just because I went to a small, private liberal arts college rather than a huge school, but critical thinking was definitely a part of my education.
|
429
|
+
|
430
|
+
|
431
|
+
AskReddit
|
432
|
+
http://www.reddit.com/r/AskReddit/comments/140t5c/z/c795nw3
|
433
|
+
I'm from Tennessee and most of our jokes are geared toward Mississippi and Alaba
|
434
|
+
over 2 years ago • +1
|
435
|
+
|
436
|
+
You're from New Jersey? Which exit?
|
437
|
+
|
438
|
+
|
439
|
+
AskReddit
|
440
|
+
http://www.reddit.com/r/AskReddit/comments/140h3z/z/c795muo
|
441
|
+
Today I was going 80mph in a 55 when an unmarked police car pulled up next to me
|
442
|
+
over 2 years ago • +1
|
443
|
+
|
444
|
+
You didn't slow down for very long though, did you?
|
445
|
+
"""
|
446
|
+
|
447
|
+
Scenario: List comments for a subreddit with no comments
|
448
|
+
Given the Reddit service returns comments for the user "mipadi"
|
449
|
+
When I run `usaidwat log mipadi nsfw`
|
450
|
+
Then it should pass with:
|
451
|
+
"""
|
452
|
+
No comments by mipadi for nsfw.
|
453
|
+
"""
|
454
|
+
|
455
|
+
Scenario: List comments for multiple comma-separated subreddits with no comments
|
456
|
+
Given the Reddit service returns comments for the user "mipadi"
|
457
|
+
When I run `usaidwat log mipadi nsfw,spacedicks`
|
458
|
+
Then it should pass with:
|
459
|
+
"""
|
460
|
+
No comments by mipadi for nsfw, spacedicks.
|
461
|
+
"""
|
462
|
+
|
463
|
+
Scenario: List comments for multiple plus-separated subreddits with no comments
|
464
|
+
Given the Reddit service returns comments for the user "mipadi"
|
465
|
+
When I run `usaidwat log mipadi nsfw+spacedicks`
|
466
|
+
Then it should pass with:
|
467
|
+
"""
|
468
|
+
No comments by mipadi for nsfw, spacedicks.
|
469
|
+
"""
|
470
|
+
|
471
|
+
Scenario: List comments for multiple subreddits with no comments
|
472
|
+
Given the Reddit service returns comments for the user "mipadi"
|
473
|
+
When I run `usaidwat log mipadi nsfw spacedicks`
|
474
|
+
Then it should pass with:
|
475
|
+
"""
|
476
|
+
No comments by mipadi for nsfw, spacedicks.
|
477
|
+
"""
|
478
|
+
|
479
|
+
Scenario: Pass no arguments when searching
|
480
|
+
Given the Reddit service returns comments for the user "mipadi"
|
481
|
+
When I run `usaidwat log --grep mipadi`
|
482
|
+
Then it should fail with:
|
483
|
+
"""
|
484
|
+
You must specify a username
|
485
|
+
"""
|
@@ -0,0 +1,117 @@
|
|
1
|
+
Feature: Tally comments
|
2
|
+
|
3
|
+
As a Redditor
|
4
|
+
I want to be able to tally another Redditor's comments
|
5
|
+
In order to see what they like to talk about
|
6
|
+
|
7
|
+
Scenario: Tally comments
|
8
|
+
Given the Reddit service returns comments for the user "mipadi"
|
9
|
+
When I run `usaidwat tally mipadi`
|
10
|
+
Then it should pass with:
|
11
|
+
"""
|
12
|
+
apple 6
|
13
|
+
AskReddit 61
|
14
|
+
battlefield3 2
|
15
|
+
books 2
|
16
|
+
django 1
|
17
|
+
Games 1
|
18
|
+
nyc 1
|
19
|
+
personalfinance 1
|
20
|
+
photography 1
|
21
|
+
programming 20
|
22
|
+
redditcasual 1
|
23
|
+
wikipedia 1
|
24
|
+
worldnews 2
|
25
|
+
"""
|
26
|
+
|
27
|
+
Scenario: Sort comments
|
28
|
+
Given the Reddit service returns comments for the user "mipadi"
|
29
|
+
When I run `usaidwat tally -c mipadi`
|
30
|
+
Then it should pass with:
|
31
|
+
"""
|
32
|
+
AskReddit 61
|
33
|
+
programming 20
|
34
|
+
apple 6
|
35
|
+
battlefield3 2
|
36
|
+
books 2
|
37
|
+
worldnews 2
|
38
|
+
django 1
|
39
|
+
Games 1
|
40
|
+
nyc 1
|
41
|
+
personalfinance 1
|
42
|
+
photography 1
|
43
|
+
redditcasual 1
|
44
|
+
wikipedia 1
|
45
|
+
"""
|
46
|
+
|
47
|
+
Scenario: Tally comments when user has no comments
|
48
|
+
Given the Reddit service returns comments for the user "blank"
|
49
|
+
When I run `usaidwat tally -c blank`
|
50
|
+
Then it should pass with:
|
51
|
+
"""
|
52
|
+
blank has no comments.
|
53
|
+
"""
|
54
|
+
|
55
|
+
Scenario: Sort comments when user has no comments
|
56
|
+
Given the Reddit service returns comments for the user "blank"
|
57
|
+
When I run `usaidwat tally -c blank`
|
58
|
+
Then it should pass with:
|
59
|
+
"""
|
60
|
+
blank has no comments.
|
61
|
+
"""
|
62
|
+
|
63
|
+
Scenario: Search for a comment when tallying
|
64
|
+
Given the Reddit service returns comments for the user "mipadi"
|
65
|
+
When I run `usaidwat tally --grep='Heisenbug' mipadi`
|
66
|
+
Then it should fail with:
|
67
|
+
"""
|
68
|
+
invalid option: --grep=Heisenbug
|
69
|
+
"""
|
70
|
+
|
71
|
+
Scenario: Search for a comment when sorting
|
72
|
+
Given the Reddit service returns comments for the user "mipadi"
|
73
|
+
When I run `usaidwat tally -c --grep='Heisenbug' mipadi`
|
74
|
+
Then it should fail with:
|
75
|
+
"""
|
76
|
+
invalid option: --grep=Heisenbug
|
77
|
+
"""
|
78
|
+
|
79
|
+
Scenario: Sort comments when a user does not exist
|
80
|
+
Given the Reddit service does not have a user "testuser"
|
81
|
+
When I run `usaidwat tally testuser`
|
82
|
+
Then it should fail with:
|
83
|
+
"""
|
84
|
+
No such user: testuser
|
85
|
+
"""
|
86
|
+
|
87
|
+
Scenario: Tally comments with subreddit
|
88
|
+
Given the Reddit service returns comments for the user "mipadi"
|
89
|
+
When I run `usaidwat tally mipadi AskReddit`
|
90
|
+
Then it should fail with:
|
91
|
+
"""
|
92
|
+
You cannot specify a subreddit when tallying comments
|
93
|
+
"""
|
94
|
+
|
95
|
+
Scenario: Sort comments with subreddit
|
96
|
+
Given the Reddit service returns comments for the user "mipadi"
|
97
|
+
When I run `usaidwat tally -c mipadi AskReddit`
|
98
|
+
Then it should fail with:
|
99
|
+
"""
|
100
|
+
You cannot specify a subreddit when tallying comments
|
101
|
+
"""
|
102
|
+
|
103
|
+
Scenario: Pass no arguments when tallying
|
104
|
+
Given the Reddit service returns comments for the user "mipadi"
|
105
|
+
When I run `usaidwat tally`
|
106
|
+
Then it should fail with:
|
107
|
+
"""
|
108
|
+
You must specify a username
|
109
|
+
"""
|
110
|
+
|
111
|
+
Scenario: Pass no arguments when sorting
|
112
|
+
Given the Reddit service returns comments for the user "mipadi"
|
113
|
+
When I run `usaidwat tally -c`
|
114
|
+
Then it should fail with:
|
115
|
+
"""
|
116
|
+
You must specify a username
|
117
|
+
"""
|