pilha 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. data/lib/pilha.rb +18 -19
  2. data/lib/pilha/stack_overflow/answer.rb +0 -5
  3. data/lib/pilha/stack_overflow/badge.rb +1 -6
  4. data/lib/pilha/stack_overflow/base.rb +7 -4
  5. data/lib/pilha/stack_overflow/comment.rb +0 -5
  6. data/lib/pilha/stack_overflow/question.rb +20 -5
  7. data/lib/pilha/stack_overflow/statistics.rb +3 -10
  8. data/lib/pilha/stack_overflow/user.rb +0 -7
  9. data/pilha.gemspec +1 -1
  10. data/spec/fixtures/all_tags.json +287 -0
  11. data/spec/fixtures/all_tags.json.gz +0 -0
  12. data/spec/fixtures/favorite_questions_by_user_id.json +496 -0
  13. data/spec/fixtures/favorite_questions_by_user_id.json.gz +0 -0
  14. data/spec/fixtures/post_comments.json +6 -0
  15. data/spec/fixtures/questions_tagged_gwt_and_googleappengine.json +901 -0
  16. data/spec/fixtures/questions_tagged_gwt_and_googleappengine.json.gz +0 -0
  17. data/spec/fixtures/questions_tagged_ruby.json +877 -0
  18. data/spec/fixtures/questions_tagged_ruby.json.gz +0 -0
  19. data/spec/fixtures/questions_unanswered.json +845 -0
  20. data/spec/fixtures/questions_unanswered.json.gz +0 -0
  21. data/spec/fixtures/revisions_by_id.json +25 -0
  22. data/spec/fixtures/search_intitle_ruby.json +872 -0
  23. data/spec/fixtures/search_tagged_ruby_rails.json +877 -0
  24. data/spec/fixtures/tags_by_user_id.json +357 -0
  25. data/spec/fixtures/tags_by_user_id.json.gz +0 -0
  26. data/spec/fixtures/user_tags.json +357 -0
  27. data/spec/pilha/stack_overflow/badge_spec.rb +0 -4
  28. data/spec/pilha/stack_overflow/question_spec.rb +65 -0
  29. data/spec/pilha/stack_overflow/statistics_spec.rb +0 -4
  30. data/spec/spec_helper.rb +6 -0
  31. metadata +20 -3
Binary file
@@ -0,0 +1,496 @@
1
+ {
2
+ "total": 17,
3
+ "page": 1,
4
+ "pagesize": 30,
5
+ "questions": [
6
+ {
7
+ "tags": [
8
+ "nhibernate"
9
+ ],
10
+ "answer_count": 7,
11
+ "accepted_answer_id": 451707,
12
+ "favorite_count": 1,
13
+ "question_timeline_url": "/questions/451664/timeline",
14
+ "question_comments_url": "/questions/451664/comments",
15
+ "question_answers_url": "/questions/451664/answers",
16
+ "question_id": 451664,
17
+ "owner": {
18
+ "user_id": 52390,
19
+ "user_type": "registered",
20
+ "display_name": "Przemek",
21
+ "reputation": 360,
22
+ "email_hash": "46ee3f5f203756778eb8af634bbbfb7e"
23
+ },
24
+ "creation_date": 1232134747,
25
+ "last_activity_date": 1274935956,
26
+ "up_vote_count": 2,
27
+ "down_vote_count": 0,
28
+ "view_count": 886,
29
+ "score": 2,
30
+ "community_owned": false,
31
+ "title": "Is there any NHibernate book?"
32
+ },
33
+ {
34
+ "tags": [
35
+ "c#",
36
+ "templates",
37
+ "refactoring",
38
+ "resharper",
39
+ "r#"
40
+ ],
41
+ "answer_count": 22,
42
+ "favorite_count": 35,
43
+ "question_timeline_url": "/questions/186970/timeline",
44
+ "question_comments_url": "/questions/186970/comments",
45
+ "question_answers_url": "/questions/186970/answers",
46
+ "question_id": 186970,
47
+ "owner": {
48
+ "user_id": 23673,
49
+ "user_type": "registered",
50
+ "display_name": "Rinat Abdullin",
51
+ "reputation": 3490,
52
+ "email_hash": "29ca2f074401075260e60f42120e4428"
53
+ },
54
+ "creation_date": 1223554063,
55
+ "last_edit_date": 1224700333,
56
+ "last_activity_date": 1272721004,
57
+ "up_vote_count": 29,
58
+ "down_vote_count": 0,
59
+ "view_count": 2166,
60
+ "score": 29,
61
+ "community_owned": false,
62
+ "title": "What ReSharper 4.0 live templates for C# do you use?"
63
+ },
64
+ {
65
+ "tags": [
66
+ "continuous-integration",
67
+ "cruisecontrol.net",
68
+ "nant"
69
+ ],
70
+ "answer_count": 1,
71
+ "favorite_count": 1,
72
+ "question_timeline_url": "/questions/1158337/timeline",
73
+ "question_comments_url": "/questions/1158337/comments",
74
+ "question_answers_url": "/questions/1158337/answers",
75
+ "question_id": 1158337,
76
+ "owner": {
77
+ "user_id": 38940,
78
+ "user_type": "registered",
79
+ "display_name": "tomaszs",
80
+ "reputation": 1400,
81
+ "email_hash": "d28f6df3851ba5c8660b5c5d22d96d37"
82
+ },
83
+ "creation_date": 1248171301,
84
+ "last_edit_date": 1248173564,
85
+ "last_activity_date": 1265324408,
86
+ "up_vote_count": 1,
87
+ "down_vote_count": 0,
88
+ "view_count": 33,
89
+ "score": 1,
90
+ "community_owned": false,
91
+ "title": "How to display target task times in CruiseControl.NET?"
92
+ },
93
+ {
94
+ "tags": [
95
+ "asp.net",
96
+ "asp.net-3.5",
97
+ "asp.net-routing"
98
+ ],
99
+ "answer_count": 1,
100
+ "favorite_count": 1,
101
+ "question_timeline_url": "/questions/2087613/timeline",
102
+ "question_comments_url": "/questions/2087613/comments",
103
+ "question_answers_url": "/questions/2087613/answers",
104
+ "question_id": 2087613,
105
+ "owner": {
106
+ "user_id": 253350,
107
+ "user_type": "unregistered",
108
+ "display_name": "Cosmo",
109
+ "reputation": 11,
110
+ "email_hash": "98ad31076d41aba63fb4879954930314"
111
+ },
112
+ "creation_date": 1263832967,
113
+ "last_activity_date": 1263939625,
114
+ "up_vote_count": 2,
115
+ "down_vote_count": 0,
116
+ "view_count": 70,
117
+ "score": 2,
118
+ "community_owned": false,
119
+ "title": "ASP.NET Routing (3.5) - How to handle multiple TLD domains?"
120
+ },
121
+ {
122
+ "tags": [
123
+ ".net",
124
+ "refactoring",
125
+ "resharper",
126
+ "maintainability"
127
+ ],
128
+ "answer_count": 10,
129
+ "accepted_answer_id": 1511430,
130
+ "favorite_count": 3,
131
+ "question_timeline_url": "/questions/1511303/timeline",
132
+ "question_comments_url": "/questions/1511303/comments",
133
+ "question_answers_url": "/questions/1511303/answers",
134
+ "question_id": 1511303,
135
+ "owner": {
136
+ "user_id": 85623,
137
+ "user_type": "registered",
138
+ "display_name": "Modan",
139
+ "reputation": 378,
140
+ "email_hash": "22e9a1fa51755f487e54872d207ad26b"
141
+ },
142
+ "creation_date": 1254510682,
143
+ "last_edit_date": 1256045492,
144
+ "last_activity_date": 1256045820,
145
+ "up_vote_count": 8,
146
+ "down_vote_count": 0,
147
+ "view_count": 324,
148
+ "score": 8,
149
+ "community_owned": false,
150
+ "title": "Should I use Resharper to tidy up other peoples code?"
151
+ },
152
+ {
153
+ "tags": [
154
+ "c#",
155
+ ".net",
156
+ "books",
157
+ "dsl"
158
+ ],
159
+ "answer_count": 4,
160
+ "accepted_answer_id": 177408,
161
+ "favorite_count": 1,
162
+ "question_timeline_url": "/questions/177400/timeline",
163
+ "question_comments_url": "/questions/177400/comments",
164
+ "question_answers_url": "/questions/177400/answers",
165
+ "question_id": 177400,
166
+ "owner": {
167
+ "user_id": 11135,
168
+ "user_type": "registered",
169
+ "display_name": "bovium",
170
+ "reputation": 459,
171
+ "email_hash": "4337156f8a5f85a16c02aa02bcb1a8e4"
172
+ },
173
+ "creation_date": 1223361510,
174
+ "last_activity_date": 1253023383,
175
+ "up_vote_count": 2,
176
+ "down_vote_count": 0,
177
+ "view_count": 912,
178
+ "score": 2,
179
+ "community_owned": false,
180
+ "title": "Books on Domain Specific Languages (DSL) for C# .net"
181
+ },
182
+ {
183
+ "tags": [
184
+ "cruisecontrol.net"
185
+ ],
186
+ "answer_count": 2,
187
+ "accepted_answer_id": 1336540,
188
+ "favorite_count": 3,
189
+ "question_timeline_url": "/questions/1336502/timeline",
190
+ "question_comments_url": "/questions/1336502/comments",
191
+ "question_answers_url": "/questions/1336502/answers",
192
+ "question_id": 1336502,
193
+ "owner": {
194
+ "user_id": 16012,
195
+ "user_type": "registered",
196
+ "display_name": "JoelFan",
197
+ "reputation": 3259,
198
+ "email_hash": "a96d7d4f942af97c61081d92fa074ca3"
199
+ },
200
+ "creation_date": 1251309802,
201
+ "last_edit_date": 1251311662,
202
+ "last_activity_date": 1251311662,
203
+ "up_vote_count": 5,
204
+ "down_vote_count": 0,
205
+ "view_count": 222,
206
+ "score": 5,
207
+ "community_owned": false,
208
+ "title": "How can I prevent concurrent builds in CruiseControl.NET?"
209
+ },
210
+ {
211
+ "tags": [
212
+ "linux",
213
+ "svn",
214
+ "administration"
215
+ ],
216
+ "answer_count": 3,
217
+ "accepted_answer_id": 284966,
218
+ "favorite_count": 3,
219
+ "question_timeline_url": "/questions/284950/timeline",
220
+ "question_comments_url": "/questions/284950/comments",
221
+ "question_answers_url": "/questions/284950/answers",
222
+ "question_id": 284950,
223
+ "owner": {
224
+ "user_id": 37036,
225
+ "user_type": "registered",
226
+ "display_name": "Shane",
227
+ "reputation": 435,
228
+ "email_hash": "e44b54aced8e783222f7920d06cd757d"
229
+ },
230
+ "creation_date": 1226516031,
231
+ "last_edit_date": 1226517267,
232
+ "last_activity_date": 1248261809,
233
+ "up_vote_count": 10,
234
+ "down_vote_count": 0,
235
+ "view_count": 611,
236
+ "score": 10,
237
+ "community_owned": false,
238
+ "title": "Best way to see what files are Locked in Subversion"
239
+ },
240
+ {
241
+ "tags": [
242
+ "oracle",
243
+ "plsql"
244
+ ],
245
+ "answer_count": 4,
246
+ "accepted_answer_id": 1088233,
247
+ "favorite_count": 2,
248
+ "question_timeline_url": "/questions/1088156/timeline",
249
+ "question_comments_url": "/questions/1088156/comments",
250
+ "question_answers_url": "/questions/1088156/answers",
251
+ "question_id": 1088156,
252
+ "owner": {
253
+ "user_id": 549,
254
+ "user_type": "registered",
255
+ "display_name": "Josh Kodroff",
256
+ "reputation": 1542,
257
+ "email_hash": "9e7ef08258f04dab37b43842d261aea8"
258
+ },
259
+ "creation_date": 1246900512,
260
+ "last_activity_date": 1246955247,
261
+ "up_vote_count": 2,
262
+ "down_vote_count": 0,
263
+ "view_count": 794,
264
+ "score": 2,
265
+ "community_owned": false,
266
+ "title": "Quickest query to check for the existence of a row in Oracle?"
267
+ },
268
+ {
269
+ "tags": [
270
+ "podcast",
271
+ "time-management",
272
+ "deadline"
273
+ ],
274
+ "answer_count": 15,
275
+ "accepted_answer_id": 612911,
276
+ "favorite_count": 14,
277
+ "question_timeline_url": "/questions/612892/timeline",
278
+ "question_comments_url": "/questions/612892/comments",
279
+ "question_answers_url": "/questions/612892/answers",
280
+ "question_id": 612892,
281
+ "owner": {
282
+ "user_id": 21204,
283
+ "user_type": "registered",
284
+ "display_name": "J.J.",
285
+ "reputation": 2729,
286
+ "email_hash": "311a952915f46ae361492e7aa302e79d"
287
+ },
288
+ "creation_date": 1236207808,
289
+ "last_edit_date": 1242743785,
290
+ "last_activity_date": 1243055067,
291
+ "up_vote_count": 27,
292
+ "down_vote_count": 1,
293
+ "view_count": 1623,
294
+ "score": 26,
295
+ "community_owned": false,
296
+ "title": "How to Deal with chronic time issues?"
297
+ },
298
+ {
299
+ "tags": [
300
+ "visual-studio",
301
+ "visual-studio-2008",
302
+ "ide",
303
+ "tabs"
304
+ ],
305
+ "answer_count": 5,
306
+ "accepted_answer_id": 839020,
307
+ "favorite_count": 2,
308
+ "question_timeline_url": "/questions/172130/timeline",
309
+ "question_comments_url": "/questions/172130/comments",
310
+ "question_answers_url": "/questions/172130/answers",
311
+ "question_id": 172130,
312
+ "owner": {
313
+ "user_id": 4733,
314
+ "user_type": "registered",
315
+ "display_name": "Simon Forrest",
316
+ "reputation": 1638,
317
+ "email_hash": "0bca819197c04b9cd06a662bacd8ea1b"
318
+ },
319
+ "creation_date": 1223219943,
320
+ "last_edit_date": 1225588092,
321
+ "last_activity_date": 1241777216,
322
+ "up_vote_count": 1,
323
+ "down_vote_count": 0,
324
+ "view_count": 595,
325
+ "score": 1,
326
+ "community_owned": false,
327
+ "title": "How to remove paths from tabs in Visual Studio 2008?"
328
+ },
329
+ {
330
+ "tags": [
331
+ "c#",
332
+ ".net",
333
+ "error-handling"
334
+ ],
335
+ "answer_count": 7,
336
+ "accepted_answer_id": 22628,
337
+ "favorite_count": 11,
338
+ "question_timeline_url": "/questions/22623/timeline",
339
+ "question_comments_url": "/questions/22623/comments",
340
+ "question_answers_url": "/questions/22623/answers",
341
+ "question_id": 22623,
342
+ "owner": {
343
+ "user_id": 357,
344
+ "user_type": "registered",
345
+ "display_name": "Terrapin",
346
+ "reputation": 3991,
347
+ "email_hash": "ddb7b76223f7f55b1e8c30b2bebcdde9"
348
+ },
349
+ "creation_date": 1219417935,
350
+ "last_edit_date": 1219418319,
351
+ "last_activity_date": 1240400321,
352
+ "up_vote_count": 21,
353
+ "down_vote_count": 1,
354
+ "view_count": 1713,
355
+ "score": 20,
356
+ "community_owned": false,
357
+ "title": ".NET - Throwing Exceptions best practices"
358
+ },
359
+ {
360
+ "tags": [
361
+ "c#",
362
+ ".net",
363
+ "exception-handling"
364
+ ],
365
+ "answer_count": 9,
366
+ "accepted_answer_id": 178464,
367
+ "favorite_count": 8,
368
+ "question_timeline_url": "/questions/178456/timeline",
369
+ "question_comments_url": "/questions/178456/comments",
370
+ "question_answers_url": "/questions/178456/answers",
371
+ "question_id": 178456,
372
+ "owner": {
373
+ "user_id": 13913,
374
+ "user_type": "registered",
375
+ "display_name": "Daok",
376
+ "reputation": 16929,
377
+ "email_hash": "a147f48a1c8298c71d4bb425b2801224"
378
+ },
379
+ "creation_date": 1223386435,
380
+ "last_edit_date": 1231174170,
381
+ "last_activity_date": 1234282891,
382
+ "up_vote_count": 21,
383
+ "down_vote_count": 2,
384
+ "view_count": 3734,
385
+ "score": 19,
386
+ "community_owned": false,
387
+ "title": "What is the proper way to re-throw an exception in C#?"
388
+ },
389
+ {
390
+ "tags": [
391
+ "build-process",
392
+ "cruisecontrol.net"
393
+ ],
394
+ "answer_count": 3,
395
+ "accepted_answer_id": 303665,
396
+ "favorite_count": 4,
397
+ "question_timeline_url": "/questions/303511/timeline",
398
+ "question_comments_url": "/questions/303511/comments",
399
+ "question_answers_url": "/questions/303511/answers",
400
+ "question_id": 303511,
401
+ "creation_date": 1227131578,
402
+ "last_activity_date": 1227135475,
403
+ "up_vote_count": 3,
404
+ "down_vote_count": 0,
405
+ "view_count": 565,
406
+ "score": 3,
407
+ "community_owned": false,
408
+ "title": "CruiseControl.net -- How to checkin code during the build"
409
+ },
410
+ {
411
+ "tags": [
412
+ "environment",
413
+ "ergonomics",
414
+ "desk"
415
+ ],
416
+ "answer_count": 2,
417
+ "accepted_answer_id": 125032,
418
+ "favorite_count": 3,
419
+ "question_timeline_url": "/questions/125016/timeline",
420
+ "question_comments_url": "/questions/125016/comments",
421
+ "question_answers_url": "/questions/125016/answers",
422
+ "question_id": 125016,
423
+ "owner": {
424
+ "user_id": 15846,
425
+ "user_type": "registered",
426
+ "display_name": "rkalajian",
427
+ "reputation": 182,
428
+ "email_hash": "38fe33d06600bf9c6b19624e4d17b806"
429
+ },
430
+ "creation_date": 1222222158,
431
+ "last_edit_date": 1222949259,
432
+ "last_activity_date": 1224005993,
433
+ "up_vote_count": 5,
434
+ "down_vote_count": 0,
435
+ "view_count": 690,
436
+ "score": 5,
437
+ "community_owned": false,
438
+ "title": "Switching to a Standing Desk"
439
+ },
440
+ {
441
+ "tags": [
442
+ "c#",
443
+ "resharper"
444
+ ],
445
+ "answer_count": 10,
446
+ "accepted_answer_id": 119543,
447
+ "favorite_count": 15,
448
+ "question_timeline_url": "/questions/119506/timeline",
449
+ "question_comments_url": "/questions/119506/comments",
450
+ "question_answers_url": "/questions/119506/answers",
451
+ "question_id": 119506,
452
+ "owner": {
453
+ "user_id": 1865,
454
+ "user_type": "registered",
455
+ "display_name": "JasonS",
456
+ "reputation": 2281,
457
+ "email_hash": "f9eaa625e8f7f5f373874069153cd67f"
458
+ },
459
+ "creation_date": 1222153890,
460
+ "last_activity_date": 1222252239,
461
+ "up_vote_count": 37,
462
+ "down_vote_count": 0,
463
+ "view_count": 4523,
464
+ "score": 37,
465
+ "community_owned": false,
466
+ "title": "Virtual member call in a constructor"
467
+ },
468
+ {
469
+ "tags": [
470
+ "estimation"
471
+ ],
472
+ "answer_count": 13,
473
+ "accepted_answer_id": 23440,
474
+ "favorite_count": 2,
475
+ "question_timeline_url": "/questions/23388/timeline",
476
+ "question_comments_url": "/questions/23388/comments",
477
+ "question_answers_url": "/questions/23388/answers",
478
+ "question_id": 23388,
479
+ "owner": {
480
+ "user_id": 2430,
481
+ "user_type": "registered",
482
+ "display_name": "Keshi",
483
+ "reputation": 68,
484
+ "email_hash": "f528764d624db129b32c21fbca0cb8d6"
485
+ },
486
+ "creation_date": 1219436703,
487
+ "last_activity_date": 1219684908,
488
+ "up_vote_count": 7,
489
+ "down_vote_count": 0,
490
+ "view_count": 267,
491
+ "score": 7,
492
+ "community_owned": false,
493
+ "title": "What do you do when you have to give a time estimate on fixing a bug, when initial investigation/debugging proves inconclusive?"
494
+ }
495
+ ]
496
+ }