ruby-stackoverflow 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. data/.gitignore +17 -0
  2. data/.rake_tasks +4 -0
  3. data/Gemfile +9 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +50 -0
  6. data/Rakefile +6 -0
  7. data/lib/generators/ruby_stackoverflow/ruby_stackoverflow_generator.rb +31 -0
  8. data/lib/generators/ruby_stackoverflow/templates/ruby_stackoverflow.rb +1 -0
  9. data/lib/ruby-stackoverflow.rb +29 -0
  10. data/lib/ruby-stackoverflow/client.rb +68 -0
  11. data/lib/ruby-stackoverflow/client/.DS_Store +0 -0
  12. data/lib/ruby-stackoverflow/client/badges_helper.rb +50 -0
  13. data/lib/ruby-stackoverflow/client/comments_helper.rb +23 -0
  14. data/lib/ruby-stackoverflow/client/parse_options.rb +25 -0
  15. data/lib/ruby-stackoverflow/client/question_helper.rb +61 -0
  16. data/lib/ruby-stackoverflow/client/resource/answer.rb +7 -0
  17. data/lib/ruby-stackoverflow/client/resource/badge.rb +7 -0
  18. data/lib/ruby-stackoverflow/client/resource/comment.rb +8 -0
  19. data/lib/ruby-stackoverflow/client/resource/notification.rb +8 -0
  20. data/lib/ruby-stackoverflow/client/resource/permission.rb +8 -0
  21. data/lib/ruby-stackoverflow/client/resource/post.rb +7 -0
  22. data/lib/ruby-stackoverflow/client/resource/question.rb +66 -0
  23. data/lib/ruby-stackoverflow/client/resource/reputation.rb +8 -0
  24. data/lib/ruby-stackoverflow/client/resource/resource.rb +28 -0
  25. data/lib/ruby-stackoverflow/client/resource/stackoverflow_error.rb +13 -0
  26. data/lib/ruby-stackoverflow/client/resource/suggested_edit.rb +8 -0
  27. data/lib/ruby-stackoverflow/client/resource/tag.rb +19 -0
  28. data/lib/ruby-stackoverflow/client/resource/user.rb +125 -0
  29. data/lib/ruby-stackoverflow/client/response_data.rb +20 -0
  30. data/lib/ruby-stackoverflow/client/user_helper.rb +152 -0
  31. data/lib/ruby-stackoverflow/configuration.rb +10 -0
  32. data/lib/ruby-stackoverflow/ruby-stackoverflow_generator.rb +29 -0
  33. data/lib/ruby-stackoverflow/version.rb +4 -0
  34. data/ruby-stackoverflow.gemspec +28 -0
  35. data/spec/fixtures/error.json +5 -0
  36. data/spec/fixtures/questions.json +28 -0
  37. data/spec/fixtures/questions_answers.json +23 -0
  38. data/spec/fixtures/questions_comments.json +39 -0
  39. data/spec/fixtures/questions_timeline.json +200 -0
  40. data/spec/fixtures/users.json +32 -0
  41. data/spec/fixtures/vcr_cassettes/badges.yml +67 -0
  42. data/spec/fixtures/vcr_cassettes/badges_by_ids.yml +56 -0
  43. data/spec/fixtures/vcr_cassettes/badges_by_name.yml +55 -0
  44. data/spec/fixtures/vcr_cassettes/badges_by_recipients.yml +73 -0
  45. data/spec/fixtures/vcr_cassettes/badges_by_recipients_by_ids.yml +70 -0
  46. data/spec/fixtures/vcr_cassettes/badges_by_tags.yml +58 -0
  47. data/spec/fixtures/vcr_cassettes/comments.yml +104 -0
  48. data/spec/fixtures/vcr_cassettes/comments_by_ids.yml +60 -0
  49. data/spec/fixtures/vcr_cassettes/error.yml +53 -0
  50. data/spec/fixtures/vcr_cassettes/featured_questions.yml +62 -0
  51. data/spec/fixtures/vcr_cassettes/linked_questions.yml +53 -0
  52. data/spec/fixtures/vcr_cassettes/noanswered_questions.yml +62 -0
  53. data/spec/fixtures/vcr_cassettes/questions.yml +165 -0
  54. data/spec/fixtures/vcr_cassettes/questions_answers.yml +63 -0
  55. data/spec/fixtures/vcr_cassettes/questions_by_ids.yml +62 -0
  56. data/spec/fixtures/vcr_cassettes/questions_comments.yml +60 -0
  57. data/spec/fixtures/vcr_cassettes/related_questions.yml +94 -0
  58. data/spec/fixtures/vcr_cassettes/timeline_questions.yml +68 -0
  59. data/spec/fixtures/vcr_cassettes/unanswered_questions.yml +62 -0
  60. data/spec/fixtures/vcr_cassettes/user_timeline.yml +73 -0
  61. data/spec/fixtures/vcr_cassettes/user_top_answers_with_given_tags.yml +64 -0
  62. data/spec/fixtures/vcr_cassettes/user_top_questions_with_given_tags.yml +66 -0
  63. data/spec/fixtures/vcr_cassettes/user_top_tags_by_answers.yml +62 -0
  64. data/spec/fixtures/vcr_cassettes/user_top_tags_by_questions.yml +58 -0
  65. data/spec/fixtures/vcr_cassettes/user_write_permissions.yml +56 -0
  66. data/spec/fixtures/vcr_cassettes/users.yml +61 -0
  67. data/spec/fixtures/vcr_cassettes/users_answers.yml +65 -0
  68. data/spec/fixtures/vcr_cassettes/users_badges.yml +60 -0
  69. data/spec/fixtures/vcr_cassettes/users_by_ids.yml +61 -0
  70. data/spec/fixtures/vcr_cassettes/users_comments.yml +74 -0
  71. data/spec/fixtures/vcr_cassettes/users_favorites_questions.yml +74 -0
  72. data/spec/fixtures/vcr_cassettes/users_featured_questions.yml +53 -0
  73. data/spec/fixtures/vcr_cassettes/users_mentioned_questions.yml +97 -0
  74. data/spec/fixtures/vcr_cassettes/users_noanswerquestions.yml +60 -0
  75. data/spec/fixtures/vcr_cassettes/users_notifications.yml +80 -0
  76. data/spec/fixtures/vcr_cassettes/users_questions.yml +67 -0
  77. data/spec/fixtures/vcr_cassettes/users_replied_comments.yml +60 -0
  78. data/spec/fixtures/vcr_cassettes/users_reputation_questions.yml +59 -0
  79. data/spec/fixtures/vcr_cassettes/users_suggested_edits.yml +72 -0
  80. data/spec/fixtures/vcr_cassettes/users_tags.yml +60 -0
  81. data/spec/fixtures/vcr_cassettes/users_unaccepted_questions.yml +65 -0
  82. data/spec/fixtures/vcr_cassettes/users_unanswered_questions.yml +77 -0
  83. data/spec/fixtures/vcr_cassettes/users_unread_notifications.yml +53 -0
  84. data/spec/helper.rb +45 -0
  85. data/spec/ruby-stackoverflow/badges_spec.rb +63 -0
  86. data/spec/ruby-stackoverflow/comments_spec.rb +31 -0
  87. data/spec/ruby-stackoverflow/question_spec.rb +90 -0
  88. data/spec/ruby-stackoverflow/user_spec.rb +289 -0
  89. data/spec/spec_helper.rb +16 -0
  90. metadata +292 -0
@@ -0,0 +1,16 @@
1
+ $:.unshift File.join(File.dirname(__FILE__),'..','lib')
2
+
3
+ require 'bundler/setup'
4
+ require 'webmock/rspec'
5
+ require 'vcr'
6
+ require 'helper'
7
+ require 'ruby-stackoverflow'
8
+
9
+ RSpec.configure do |config|
10
+ #config.expect_with :rspec do |c|
11
+ #c.syntax = :expect
12
+ #end
13
+
14
+ config.fail_fast = true
15
+ config.order = 'random'
16
+ end
metadata ADDED
@@ -0,0 +1,292 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ruby-stackoverflow
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Rashmi Yadav
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-10-26 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: httparty
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 0.11.0
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 0.11.0
30
+ - !ruby/object:Gem::Dependency
31
+ name: json
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: webmock
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: 1.14.0
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 1.14.0
62
+ - !ruby/object:Gem::Dependency
63
+ name: vcr
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: 2.6.0
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: 2.6.0
78
+ - !ruby/object:Gem::Dependency
79
+ name: bundler
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ~>
84
+ - !ruby/object:Gem::Version
85
+ version: '1.3'
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: '1.3'
94
+ - !ruby/object:Gem::Dependency
95
+ name: rake
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ~>
100
+ - !ruby/object:Gem::Version
101
+ version: 10.1.0
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ~>
108
+ - !ruby/object:Gem::Version
109
+ version: 10.1.0
110
+ description: Ruby library for stackoverflow api
111
+ email:
112
+ - rays.rashmi@gmail.com
113
+ executables: []
114
+ extensions: []
115
+ extra_rdoc_files: []
116
+ files:
117
+ - .gitignore
118
+ - .rake_tasks
119
+ - Gemfile
120
+ - LICENSE.txt
121
+ - README.md
122
+ - Rakefile
123
+ - lib/generators/ruby_stackoverflow/ruby_stackoverflow_generator.rb
124
+ - lib/generators/ruby_stackoverflow/templates/ruby_stackoverflow.rb
125
+ - lib/ruby-stackoverflow.rb
126
+ - lib/ruby-stackoverflow/client.rb
127
+ - lib/ruby-stackoverflow/client/.DS_Store
128
+ - lib/ruby-stackoverflow/client/badges_helper.rb
129
+ - lib/ruby-stackoverflow/client/comments_helper.rb
130
+ - lib/ruby-stackoverflow/client/parse_options.rb
131
+ - lib/ruby-stackoverflow/client/question_helper.rb
132
+ - lib/ruby-stackoverflow/client/resource/answer.rb
133
+ - lib/ruby-stackoverflow/client/resource/badge.rb
134
+ - lib/ruby-stackoverflow/client/resource/comment.rb
135
+ - lib/ruby-stackoverflow/client/resource/notification.rb
136
+ - lib/ruby-stackoverflow/client/resource/permission.rb
137
+ - lib/ruby-stackoverflow/client/resource/post.rb
138
+ - lib/ruby-stackoverflow/client/resource/question.rb
139
+ - lib/ruby-stackoverflow/client/resource/reputation.rb
140
+ - lib/ruby-stackoverflow/client/resource/resource.rb
141
+ - lib/ruby-stackoverflow/client/resource/stackoverflow_error.rb
142
+ - lib/ruby-stackoverflow/client/resource/suggested_edit.rb
143
+ - lib/ruby-stackoverflow/client/resource/tag.rb
144
+ - lib/ruby-stackoverflow/client/resource/user.rb
145
+ - lib/ruby-stackoverflow/client/response_data.rb
146
+ - lib/ruby-stackoverflow/client/user_helper.rb
147
+ - lib/ruby-stackoverflow/configuration.rb
148
+ - lib/ruby-stackoverflow/ruby-stackoverflow_generator.rb
149
+ - lib/ruby-stackoverflow/version.rb
150
+ - ruby-stackoverflow.gemspec
151
+ - spec/fixtures/error.json
152
+ - spec/fixtures/questions.json
153
+ - spec/fixtures/questions_answers.json
154
+ - spec/fixtures/questions_comments.json
155
+ - spec/fixtures/questions_timeline.json
156
+ - spec/fixtures/users.json
157
+ - spec/fixtures/vcr_cassettes/badges.yml
158
+ - spec/fixtures/vcr_cassettes/badges_by_ids.yml
159
+ - spec/fixtures/vcr_cassettes/badges_by_name.yml
160
+ - spec/fixtures/vcr_cassettes/badges_by_recipients.yml
161
+ - spec/fixtures/vcr_cassettes/badges_by_recipients_by_ids.yml
162
+ - spec/fixtures/vcr_cassettes/badges_by_tags.yml
163
+ - spec/fixtures/vcr_cassettes/comments.yml
164
+ - spec/fixtures/vcr_cassettes/comments_by_ids.yml
165
+ - spec/fixtures/vcr_cassettes/error.yml
166
+ - spec/fixtures/vcr_cassettes/featured_questions.yml
167
+ - spec/fixtures/vcr_cassettes/linked_questions.yml
168
+ - spec/fixtures/vcr_cassettes/noanswered_questions.yml
169
+ - spec/fixtures/vcr_cassettes/questions.yml
170
+ - spec/fixtures/vcr_cassettes/questions_answers.yml
171
+ - spec/fixtures/vcr_cassettes/questions_by_ids.yml
172
+ - spec/fixtures/vcr_cassettes/questions_comments.yml
173
+ - spec/fixtures/vcr_cassettes/related_questions.yml
174
+ - spec/fixtures/vcr_cassettes/timeline_questions.yml
175
+ - spec/fixtures/vcr_cassettes/unanswered_questions.yml
176
+ - spec/fixtures/vcr_cassettes/user_timeline.yml
177
+ - spec/fixtures/vcr_cassettes/user_top_answers_with_given_tags.yml
178
+ - spec/fixtures/vcr_cassettes/user_top_questions_with_given_tags.yml
179
+ - spec/fixtures/vcr_cassettes/user_top_tags_by_answers.yml
180
+ - spec/fixtures/vcr_cassettes/user_top_tags_by_questions.yml
181
+ - spec/fixtures/vcr_cassettes/user_write_permissions.yml
182
+ - spec/fixtures/vcr_cassettes/users.yml
183
+ - spec/fixtures/vcr_cassettes/users_answers.yml
184
+ - spec/fixtures/vcr_cassettes/users_badges.yml
185
+ - spec/fixtures/vcr_cassettes/users_by_ids.yml
186
+ - spec/fixtures/vcr_cassettes/users_comments.yml
187
+ - spec/fixtures/vcr_cassettes/users_favorites_questions.yml
188
+ - spec/fixtures/vcr_cassettes/users_featured_questions.yml
189
+ - spec/fixtures/vcr_cassettes/users_mentioned_questions.yml
190
+ - spec/fixtures/vcr_cassettes/users_noanswerquestions.yml
191
+ - spec/fixtures/vcr_cassettes/users_notifications.yml
192
+ - spec/fixtures/vcr_cassettes/users_questions.yml
193
+ - spec/fixtures/vcr_cassettes/users_replied_comments.yml
194
+ - spec/fixtures/vcr_cassettes/users_reputation_questions.yml
195
+ - spec/fixtures/vcr_cassettes/users_suggested_edits.yml
196
+ - spec/fixtures/vcr_cassettes/users_tags.yml
197
+ - spec/fixtures/vcr_cassettes/users_unaccepted_questions.yml
198
+ - spec/fixtures/vcr_cassettes/users_unanswered_questions.yml
199
+ - spec/fixtures/vcr_cassettes/users_unread_notifications.yml
200
+ - spec/helper.rb
201
+ - spec/ruby-stackoverflow/badges_spec.rb
202
+ - spec/ruby-stackoverflow/comments_spec.rb
203
+ - spec/ruby-stackoverflow/question_spec.rb
204
+ - spec/ruby-stackoverflow/user_spec.rb
205
+ - spec/spec_helper.rb
206
+ homepage: https://github.com/raysrashmi/ruby-stackoverflow
207
+ licenses:
208
+ - MIT
209
+ post_install_message:
210
+ rdoc_options: []
211
+ require_paths:
212
+ - lib
213
+ required_ruby_version: !ruby/object:Gem::Requirement
214
+ none: false
215
+ requirements:
216
+ - - ! '>='
217
+ - !ruby/object:Gem::Version
218
+ version: '0'
219
+ segments:
220
+ - 0
221
+ hash: 3648489429190786940
222
+ required_rubygems_version: !ruby/object:Gem::Requirement
223
+ none: false
224
+ requirements:
225
+ - - ! '>='
226
+ - !ruby/object:Gem::Version
227
+ version: '0'
228
+ segments:
229
+ - 0
230
+ hash: 3648489429190786940
231
+ requirements: []
232
+ rubyforge_project:
233
+ rubygems_version: 1.8.25
234
+ signing_key:
235
+ specification_version: 3
236
+ summary: Interface for stackoverflow api
237
+ test_files:
238
+ - spec/fixtures/error.json
239
+ - spec/fixtures/questions.json
240
+ - spec/fixtures/questions_answers.json
241
+ - spec/fixtures/questions_comments.json
242
+ - spec/fixtures/questions_timeline.json
243
+ - spec/fixtures/users.json
244
+ - spec/fixtures/vcr_cassettes/badges.yml
245
+ - spec/fixtures/vcr_cassettes/badges_by_ids.yml
246
+ - spec/fixtures/vcr_cassettes/badges_by_name.yml
247
+ - spec/fixtures/vcr_cassettes/badges_by_recipients.yml
248
+ - spec/fixtures/vcr_cassettes/badges_by_recipients_by_ids.yml
249
+ - spec/fixtures/vcr_cassettes/badges_by_tags.yml
250
+ - spec/fixtures/vcr_cassettes/comments.yml
251
+ - spec/fixtures/vcr_cassettes/comments_by_ids.yml
252
+ - spec/fixtures/vcr_cassettes/error.yml
253
+ - spec/fixtures/vcr_cassettes/featured_questions.yml
254
+ - spec/fixtures/vcr_cassettes/linked_questions.yml
255
+ - spec/fixtures/vcr_cassettes/noanswered_questions.yml
256
+ - spec/fixtures/vcr_cassettes/questions.yml
257
+ - spec/fixtures/vcr_cassettes/questions_answers.yml
258
+ - spec/fixtures/vcr_cassettes/questions_by_ids.yml
259
+ - spec/fixtures/vcr_cassettes/questions_comments.yml
260
+ - spec/fixtures/vcr_cassettes/related_questions.yml
261
+ - spec/fixtures/vcr_cassettes/timeline_questions.yml
262
+ - spec/fixtures/vcr_cassettes/unanswered_questions.yml
263
+ - spec/fixtures/vcr_cassettes/user_timeline.yml
264
+ - spec/fixtures/vcr_cassettes/user_top_answers_with_given_tags.yml
265
+ - spec/fixtures/vcr_cassettes/user_top_questions_with_given_tags.yml
266
+ - spec/fixtures/vcr_cassettes/user_top_tags_by_answers.yml
267
+ - spec/fixtures/vcr_cassettes/user_top_tags_by_questions.yml
268
+ - spec/fixtures/vcr_cassettes/user_write_permissions.yml
269
+ - spec/fixtures/vcr_cassettes/users.yml
270
+ - spec/fixtures/vcr_cassettes/users_answers.yml
271
+ - spec/fixtures/vcr_cassettes/users_badges.yml
272
+ - spec/fixtures/vcr_cassettes/users_by_ids.yml
273
+ - spec/fixtures/vcr_cassettes/users_comments.yml
274
+ - spec/fixtures/vcr_cassettes/users_favorites_questions.yml
275
+ - spec/fixtures/vcr_cassettes/users_featured_questions.yml
276
+ - spec/fixtures/vcr_cassettes/users_mentioned_questions.yml
277
+ - spec/fixtures/vcr_cassettes/users_noanswerquestions.yml
278
+ - spec/fixtures/vcr_cassettes/users_notifications.yml
279
+ - spec/fixtures/vcr_cassettes/users_questions.yml
280
+ - spec/fixtures/vcr_cassettes/users_replied_comments.yml
281
+ - spec/fixtures/vcr_cassettes/users_reputation_questions.yml
282
+ - spec/fixtures/vcr_cassettes/users_suggested_edits.yml
283
+ - spec/fixtures/vcr_cassettes/users_tags.yml
284
+ - spec/fixtures/vcr_cassettes/users_unaccepted_questions.yml
285
+ - spec/fixtures/vcr_cassettes/users_unanswered_questions.yml
286
+ - spec/fixtures/vcr_cassettes/users_unread_notifications.yml
287
+ - spec/helper.rb
288
+ - spec/ruby-stackoverflow/badges_spec.rb
289
+ - spec/ruby-stackoverflow/comments_spec.rb
290
+ - spec/ruby-stackoverflow/question_spec.rb
291
+ - spec/ruby-stackoverflow/user_spec.rb
292
+ - spec/spec_helper.rb