badgeapi 0.3.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +14 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +31 -0
  6. data/Rakefile +15 -0
  7. data/badgeapi.gemspec +33 -0
  8. data/lib/badgeapi/badge.rb +29 -0
  9. data/lib/badgeapi/badgeapi_object.rb +149 -0
  10. data/lib/badgeapi/collection.rb +10 -0
  11. data/lib/badgeapi/errors/api_error.rb +5 -0
  12. data/lib/badgeapi/errors/badgeapi_error.rb +18 -0
  13. data/lib/badgeapi/errors/invalid_request_error.rb +5 -0
  14. data/lib/badgeapi/recipient.rb +18 -0
  15. data/lib/badgeapi/version.rb +3 -0
  16. data/lib/badgeapi.rb +36 -0
  17. data/test/badge/badge_test.rb +469 -0
  18. data/test/badgeapi_test.rb +20 -0
  19. data/test/collection/collection_test.rb +275 -0
  20. data/test/fixtures/all_badges.yml +121 -0
  21. data/test/fixtures/all_badges_bad_user.yml +138 -0
  22. data/test/fixtures/all_badges_expanded.yml +196 -0
  23. data/test/fixtures/all_badges_from_collection.yml +52 -0
  24. data/test/fixtures/all_badges_issued.yml +430 -0
  25. data/test/fixtures/all_badges_limited.yml +49 -0
  26. data/test/fixtures/all_collection.yml +50 -0
  27. data/test/fixtures/all_collection_expanded.yml +131 -0
  28. data/test/fixtures/all_collection_limit.yml +49 -0
  29. data/test/fixtures/bad_Recipient.yml +183 -0
  30. data/test/fixtures/bad_Recipietn_request.yml +93 -0
  31. data/test/fixtures/bad_api_key.yml +49 -0
  32. data/test/fixtures/badge_error.yml +47 -0
  33. data/test/fixtures/badge_requirements.yml +351 -0
  34. data/test/fixtures/collection_error.yml +91 -0
  35. data/test/fixtures/create_badge.yml +97 -0
  36. data/test/fixtures/create_collection.yml +97 -0
  37. data/test/fixtures/create_new_badge_failure.yml +143 -0
  38. data/test/fixtures/create_new_collection_failure.yml +189 -0
  39. data/test/fixtures/destroy_badge.yml +277 -0
  40. data/test/fixtures/destroy_badge_error.yml +231 -0
  41. data/test/fixtures/destroy_collection.yml +185 -0
  42. data/test/fixtures/destroy_collection_error.yml +185 -0
  43. data/test/fixtures/issue_already_owned_badge.yml +49 -0
  44. data/test/fixtures/issue_badge_to_bad_user.yml +50 -0
  45. data/test/fixtures/issue_badge_to_user.yml +199 -0
  46. data/test/fixtures/issue_badge_to_user_with_library_card.yml +103 -0
  47. data/test/fixtures/one_badge.yml +49 -0
  48. data/test/fixtures/one_badge_expanded.yml +50 -0
  49. data/test/fixtures/one_collection.yml +49 -0
  50. data/test/fixtures/one_collection_expanded.yml +104 -0
  51. data/test/fixtures/recipient_with_badges.yml +187 -0
  52. data/test/fixtures/recipient_with_badges_unicard.yml +50 -0
  53. data/test/fixtures/revoke_badge_from_user.yml +199 -0
  54. data/test/fixtures/revoke_badge_not_issued.yml +49 -0
  55. data/test/fixtures/update_badge_via_update.yml +145 -0
  56. data/test/fixtures/update_badge_via_update_slug_history.yml +191 -0
  57. data/test/fixtures/update_collection.yml +191 -0
  58. data/test/fixtures/update_collection_via_update.yml +145 -0
  59. data/test/recipient/recipient_test.rb +108 -0
  60. data/test/test_helper.rb +11 -0
  61. metadata +274 -0
metadata ADDED
@@ -0,0 +1,274 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: badgeapi
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.8
5
+ platform: ruby
6
+ authors:
7
+ - Tom Skarbek Wazynski
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-10-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: minitest
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '5.5'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '5.5'
27
+ - !ruby/object:Gem::Dependency
28
+ name: minitest-focus
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.1'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.1'
41
+ - !ruby/object:Gem::Dependency
42
+ name: vcr
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.9'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.9'
55
+ - !ruby/object:Gem::Dependency
56
+ name: webmock
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.20'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.20'
69
+ - !ruby/object:Gem::Dependency
70
+ name: activesupport
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.2'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.2'
83
+ - !ruby/object:Gem::Dependency
84
+ name: faraday
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '0.9'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '0.9'
97
+ - !ruby/object:Gem::Dependency
98
+ name: json
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '1.8'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '1.8'
111
+ - !ruby/object:Gem::Dependency
112
+ name: bundler
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '1.7'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '1.7'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rake
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '10.0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '10.0'
139
+ description: Allows you to connect to Lancaster University's Badge API to manipulate
140
+ badges, issue badges and display badges.
141
+ email:
142
+ - wazynski@gmail.com
143
+ executables: []
144
+ extensions: []
145
+ extra_rdoc_files: []
146
+ files:
147
+ - ".gitignore"
148
+ - Gemfile
149
+ - LICENSE.txt
150
+ - README.md
151
+ - Rakefile
152
+ - badgeapi.gemspec
153
+ - lib/badgeapi.rb
154
+ - lib/badgeapi/badge.rb
155
+ - lib/badgeapi/badgeapi_object.rb
156
+ - lib/badgeapi/collection.rb
157
+ - lib/badgeapi/errors/api_error.rb
158
+ - lib/badgeapi/errors/badgeapi_error.rb
159
+ - lib/badgeapi/errors/invalid_request_error.rb
160
+ - lib/badgeapi/recipient.rb
161
+ - lib/badgeapi/version.rb
162
+ - test/badge/badge_test.rb
163
+ - test/badgeapi_test.rb
164
+ - test/collection/collection_test.rb
165
+ - test/fixtures/all_badges.yml
166
+ - test/fixtures/all_badges_bad_user.yml
167
+ - test/fixtures/all_badges_expanded.yml
168
+ - test/fixtures/all_badges_from_collection.yml
169
+ - test/fixtures/all_badges_issued.yml
170
+ - test/fixtures/all_badges_limited.yml
171
+ - test/fixtures/all_collection.yml
172
+ - test/fixtures/all_collection_expanded.yml
173
+ - test/fixtures/all_collection_limit.yml
174
+ - test/fixtures/bad_Recipient.yml
175
+ - test/fixtures/bad_Recipietn_request.yml
176
+ - test/fixtures/bad_api_key.yml
177
+ - test/fixtures/badge_error.yml
178
+ - test/fixtures/badge_requirements.yml
179
+ - test/fixtures/collection_error.yml
180
+ - test/fixtures/create_badge.yml
181
+ - test/fixtures/create_collection.yml
182
+ - test/fixtures/create_new_badge_failure.yml
183
+ - test/fixtures/create_new_collection_failure.yml
184
+ - test/fixtures/destroy_badge.yml
185
+ - test/fixtures/destroy_badge_error.yml
186
+ - test/fixtures/destroy_collection.yml
187
+ - test/fixtures/destroy_collection_error.yml
188
+ - test/fixtures/issue_already_owned_badge.yml
189
+ - test/fixtures/issue_badge_to_bad_user.yml
190
+ - test/fixtures/issue_badge_to_user.yml
191
+ - test/fixtures/issue_badge_to_user_with_library_card.yml
192
+ - test/fixtures/one_badge.yml
193
+ - test/fixtures/one_badge_expanded.yml
194
+ - test/fixtures/one_collection.yml
195
+ - test/fixtures/one_collection_expanded.yml
196
+ - test/fixtures/recipient_with_badges.yml
197
+ - test/fixtures/recipient_with_badges_unicard.yml
198
+ - test/fixtures/revoke_badge_from_user.yml
199
+ - test/fixtures/revoke_badge_not_issued.yml
200
+ - test/fixtures/update_badge_via_update.yml
201
+ - test/fixtures/update_badge_via_update_slug_history.yml
202
+ - test/fixtures/update_collection.yml
203
+ - test/fixtures/update_collection_via_update.yml
204
+ - test/recipient/recipient_test.rb
205
+ - test/test_helper.rb
206
+ homepage: http://innovationhub.lancaster.ac.uk
207
+ licenses:
208
+ - MIT
209
+ metadata: {}
210
+ post_install_message:
211
+ rdoc_options: []
212
+ require_paths:
213
+ - lib
214
+ required_ruby_version: !ruby/object:Gem::Requirement
215
+ requirements:
216
+ - - ">="
217
+ - !ruby/object:Gem::Version
218
+ version: '0'
219
+ required_rubygems_version: !ruby/object:Gem::Requirement
220
+ requirements:
221
+ - - ">="
222
+ - !ruby/object:Gem::Version
223
+ version: '0'
224
+ requirements: []
225
+ rubyforge_project:
226
+ rubygems_version: 2.4.5
227
+ signing_key:
228
+ specification_version: 4
229
+ summary: A basic API wrapper for Lancaster University's Badge API.
230
+ test_files:
231
+ - test/badge/badge_test.rb
232
+ - test/badgeapi_test.rb
233
+ - test/collection/collection_test.rb
234
+ - test/fixtures/all_badges.yml
235
+ - test/fixtures/all_badges_bad_user.yml
236
+ - test/fixtures/all_badges_expanded.yml
237
+ - test/fixtures/all_badges_from_collection.yml
238
+ - test/fixtures/all_badges_issued.yml
239
+ - test/fixtures/all_badges_limited.yml
240
+ - test/fixtures/all_collection.yml
241
+ - test/fixtures/all_collection_expanded.yml
242
+ - test/fixtures/all_collection_limit.yml
243
+ - test/fixtures/bad_Recipient.yml
244
+ - test/fixtures/bad_Recipietn_request.yml
245
+ - test/fixtures/bad_api_key.yml
246
+ - test/fixtures/badge_error.yml
247
+ - test/fixtures/badge_requirements.yml
248
+ - test/fixtures/collection_error.yml
249
+ - test/fixtures/create_badge.yml
250
+ - test/fixtures/create_collection.yml
251
+ - test/fixtures/create_new_badge_failure.yml
252
+ - test/fixtures/create_new_collection_failure.yml
253
+ - test/fixtures/destroy_badge.yml
254
+ - test/fixtures/destroy_badge_error.yml
255
+ - test/fixtures/destroy_collection.yml
256
+ - test/fixtures/destroy_collection_error.yml
257
+ - test/fixtures/issue_already_owned_badge.yml
258
+ - test/fixtures/issue_badge_to_bad_user.yml
259
+ - test/fixtures/issue_badge_to_user.yml
260
+ - test/fixtures/issue_badge_to_user_with_library_card.yml
261
+ - test/fixtures/one_badge.yml
262
+ - test/fixtures/one_badge_expanded.yml
263
+ - test/fixtures/one_collection.yml
264
+ - test/fixtures/one_collection_expanded.yml
265
+ - test/fixtures/recipient_with_badges.yml
266
+ - test/fixtures/recipient_with_badges_unicard.yml
267
+ - test/fixtures/revoke_badge_from_user.yml
268
+ - test/fixtures/revoke_badge_not_issued.yml
269
+ - test/fixtures/update_badge_via_update.yml
270
+ - test/fixtures/update_badge_via_update_slug_history.yml
271
+ - test/fixtures/update_collection.yml
272
+ - test/fixtures/update_collection_via_update.yml
273
+ - test/recipient/recipient_test.rb
274
+ - test/test_helper.rb