badgeapi 0.3.10 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/.rubocop.yml +147 -0
  4. data/README.md +44 -12
  5. data/Rakefile +24 -11
  6. data/badgeapi.gemspec +23 -22
  7. data/lib/badgeapi/badge.rb +24 -27
  8. data/lib/badgeapi/badgeapi_object.rb +160 -147
  9. data/lib/badgeapi/collection.rb +6 -9
  10. data/lib/badgeapi/errors/api_error.rb +3 -4
  11. data/lib/badgeapi/errors/badgeapi_error.rb +15 -15
  12. data/lib/badgeapi/errors/invalid_request_error.rb +3 -4
  13. data/lib/badgeapi/recipient.rb +13 -16
  14. data/lib/badgeapi/version.rb +1 -1
  15. data/lib/badgeapi.rb +13 -15
  16. data/test/badge/badge_test.rb +71 -150
  17. data/test/badgeapi_test.rb +4 -0
  18. data/test/collection/collection_test.rb +43 -77
  19. data/test/fixtures/badge_all.yml +113 -0
  20. data/test/fixtures/{bad_api_key.yml → badge_all_bad_user.yml} +14 -13
  21. data/test/fixtures/{all_badges_bad_user.yml → badge_all_badges_bad_user.yml} +16 -57
  22. data/test/fixtures/badge_all_expanded.yml +184 -0
  23. data/test/fixtures/badge_all_from_collection.yml +52 -0
  24. data/test/fixtures/badge_all_issued.yml +99 -0
  25. data/test/fixtures/{all_badges_limited.yml → badge_all_limited.yml} +10 -8
  26. data/test/fixtures/{create_badge.yml → badge_create.yml} +20 -16
  27. data/test/fixtures/{create_new_badge_failure.yml → badge_create_new.yml} +28 -22
  28. data/test/fixtures/badge_destroy.yml +147 -0
  29. data/test/fixtures/badge_destroy_error.yml +147 -0
  30. data/test/fixtures/badge_error.yml +54 -6
  31. data/test/fixtures/{issue_badge_to_bad_user.yml → badge_issue_to_bad_user.yml} +8 -6
  32. data/test/fixtures/badge_issue_to_user.yml +107 -0
  33. data/test/fixtures/{issue_badge_to_user_with_library_card.yml → badge_issue_to_user_with_library_card.yml} +21 -17
  34. data/test/fixtures/{one_badge.yml → badge_one.yml} +10 -8
  35. data/test/fixtures/{one_badge_expanded.yml → badge_one_expanded.yml} +11 -9
  36. data/test/fixtures/badge_requirements.yml +150 -105
  37. data/test/fixtures/badge_revoke_from_user.yml +107 -0
  38. data/test/fixtures/{update_badge_via_update.yml → badge_update_via_update.yml} +31 -25
  39. data/test/fixtures/{update_badge_via_update_slug_history.yml → badge_update_via_update_slug_history.yml} +41 -33
  40. data/test/fixtures/{all_collection.yml → collection_all.yml} +11 -9
  41. data/test/fixtures/collection_all_expanded.yml +123 -0
  42. data/test/fixtures/{all_collection_limit.yml → collection_all_limit.yml} +10 -8
  43. data/test/fixtures/{create_collection.yml → collection_create.yml} +20 -16
  44. data/test/fixtures/{create_new_collection_failure.yml → collection_create_new_failure.yml} +36 -28
  45. data/test/fixtures/{destroy_collection.yml → collection_destroy.yml} +36 -28
  46. data/test/fixtures/{destroy_collection_error.yml → collection_destroy_error.yml} +36 -28
  47. data/test/fixtures/collection_error.yml +108 -12
  48. data/test/fixtures/{one_collection.yml → collection_one.yml} +10 -8
  49. data/test/fixtures/collection_one_expanded.yml +106 -0
  50. data/test/fixtures/{update_collection.yml → collection_update.yml} +40 -32
  51. data/test/fixtures/{update_collection_via_update.yml → collection_update_via_update.yml} +30 -24
  52. data/test/fixtures/{bad_Recipietn_request.yml → recipient_bad_user_data.yml} +26 -22
  53. data/test/fixtures/recipient_with_badges.yml +20 -108
  54. data/test/fixtures/recipient_with_badges_unicard.yml +151 -8
  55. data/test/recipient/recipient_test.rb +11 -29
  56. metadata +69 -73
  57. data/test/fixtures/all_badges.yml +0 -121
  58. data/test/fixtures/all_badges_expanded.yml +0 -196
  59. data/test/fixtures/all_badges_from_collection.yml +0 -52
  60. data/test/fixtures/all_badges_issued.yml +0 -430
  61. data/test/fixtures/all_collection_expanded.yml +0 -131
  62. data/test/fixtures/bad_Recipient.yml +0 -183
  63. data/test/fixtures/destroy_badge.yml +0 -277
  64. data/test/fixtures/destroy_badge_error.yml +0 -231
  65. data/test/fixtures/issue_already_owned_badge.yml +0 -49
  66. data/test/fixtures/issue_badge_to_user.yml +0 -199
  67. data/test/fixtures/one_collection_expanded.yml +0 -104
  68. data/test/fixtures/revoke_badge_from_user.yml +0 -199
  69. data/test/fixtures/revoke_badge_not_issued.yml +0 -49
@@ -1,196 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://gamification-api.dev/v1/badges?expand=monkey
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v0.9.1
12
- Authorization:
13
- - Token token="c9cde524238644fa93393159e5e9ad87"
14
- Accept-Encoding:
15
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
- Accept:
17
- - "*/*"
18
- response:
19
- status:
20
- code: 400
21
- message: Bad Request
22
- headers:
23
- X-Frame-Options:
24
- - SAMEORIGIN
25
- X-Xss-Protection:
26
- - 1; mode=block
27
- X-Content-Type-Options:
28
- - nosniff
29
- Content-Type:
30
- - application/json; charset=utf-8
31
- Cache-Control:
32
- - no-cache
33
- X-Request-Id:
34
- - 844cbb1d-ca82-4d92-9341-db615d548303
35
- X-Runtime:
36
- - '0.012282'
37
- Date:
38
- - Thu, 03 Sep 2015 10:55:56 GMT
39
- Connection:
40
- - close
41
- body:
42
- encoding: UTF-8
43
- string: '{"error":{"type":"invalid_request_error","message":"Invalid expand
44
- parameter: monkey","status":400}}'
45
- http_version:
46
- recorded_at: Thu, 03 Sep 2015 10:55:56 GMT
47
- - request:
48
- method: get
49
- uri: http://gamification-api.dev/v1/badges?expand=collection
50
- body:
51
- encoding: US-ASCII
52
- string: ''
53
- headers:
54
- User-Agent:
55
- - Faraday v0.9.1
56
- Authorization:
57
- - Token token="c9cde524238644fa93393159e5e9ad87"
58
- Accept-Encoding:
59
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
60
- Accept:
61
- - "*/*"
62
- response:
63
- status:
64
- code: 200
65
- message: OK
66
- headers:
67
- X-Frame-Options:
68
- - SAMEORIGIN
69
- X-Xss-Protection:
70
- - 1; mode=block
71
- X-Content-Type-Options:
72
- - nosniff
73
- Content-Type:
74
- - application/json; charset=utf-8
75
- Etag:
76
- - '"8a58e441b1c60de491165ddf486671a1"'
77
- Cache-Control:
78
- - max-age=0, private, must-revalidate
79
- X-Request-Id:
80
- - 150f75a1-918b-4775-b86e-e2372d5025f0
81
- X-Runtime:
82
- - '0.037581'
83
- Date:
84
- - Thu, 03 Sep 2015 10:55:57 GMT
85
- Connection:
86
- - close
87
- body:
88
- encoding: ASCII-8BIT
89
- string: !binary |-
90
- W3sibmFtZSI6IkJvb2sgV29ybSIsImRlc2NyaXB0aW9uIjoiWW91IGhhdmUg
91
- bG9hbmVkIG91dCBvdmVyIDI1IGJvb2tzLiBOaWNlIGdvaW5nISIsInJlcXVp
92
- cmVtZW50cyI6IkxvYW4gb3V0IDI1IGJvb2tzIiwiaGludCI6IllvdSBtdXN0
93
- IGxpa2UgYm9va3MuLi4iLCJpbWFnZSI6Imh0dHA6Ly9nYW1pZmljYXRpb24t
94
- YXBpLmRldi9iYWRnZV9pbWFnZXMvYm9vay13b3JtL2JhZGdlLnBuZyIsImNv
95
- bGxlY3Rpb25faWQiOiJsaWJyYXJ5IiwiY3JlYXRlZF9hdCI6IjIwMTUtMDkt
96
- MDNUMTA6NTE6MDcuODMxWiIsInVwZGF0ZWRfYXQiOiIyMDE1LTA5LTAzVDEw
97
- OjUxOjA3LjgzMVoiLCJsZXZlbCI6ImJyb256ZSIsImF1dG9faXNzdWUiOmZh
98
- bHNlLCJzdGF0dXMiOiJsaXZlIiwicmVxdWlyZWRfYmFkZ2VzIjpbXSwicG9p
99
- bnRzIjoyNSwib2JqZWN0IjoiYmFkZ2UiLCJjb2xsZWN0aW9uIjp7ImlkIjoi
100
- bGlicmFyeSIsIm5hbWUiOiJMaWJyYXJ5IiwiZGVzY3JpcHRpb24iOiJVc2Ug
101
- eW91ciBsaWJyYXJ5IGFuZCBlYXJuIGJh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
184
- ZWF0ZWRfYXQiOiIyMDE1LTA5LTAzVDEwOjUxOjA4LjE1MFoiLCJ1cGRhdGVk
185
- X2F0IjoiMjAxNS0wOS0wM1QxMDo1MTowOC4xNTBaIiwibGV2ZWwiOiJnb2xk
186
- IiwiYXV0b19pc3N1ZSI6ZmFsc2UsInN0YXR1cyI6ImxpdmUiLCJyZXF1aXJl
187
- ZF9iYWRnZXMiOltdLCJwb2ludHMiOjc1LCJvYmplY3QiOiJiYWRnZSIsImNv
188
- bGxlY3Rpb24iOnsiaWQiOiJ0cmltLXRyYWlsIiwibmFtZSI6IlRyaW0gVHJh
189
- aWwiLCJkZXNjcmlwdGlvbiI6IkdldCBmaXQgYW5kIGhlYWx0aCBwbHVzIGVh
190
- cm4gc29tZSBiYWRnZXMiLCJjcmVhdGVkX2F0IjoiMjAxNS0wOS0wM1QxMDo1
191
- MTowNy43NzhaIiwidXBkYXRlZF9hdCI6IjIwMTUtMDktMDNUMTA6NTE6MDcu
192
- Nzc4WiIsInRvdGFsX3BvaW50c19hdmFpbGFibGUiOjEwMCwib2JqZWN0Ijoi
193
- Y29sbGVjdGlvbiJ9LCJpZCI6Im1hcmF0aG9uLW1hbiJ9XQ==
194
- http_version:
195
- recorded_at: Thu, 03 Sep 2015 10:55:57 GMT
196
- recorded_with: VCR 2.9.3
@@ -1,52 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://gamification-api.dev/v1/badges?collection_id=2
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v0.9.1
12
- Authorization:
13
- - Token token="c9cde524238644fa93393159e5e9ad87"
14
- Accept-Encoding:
15
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
- Accept:
17
- - "*/*"
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- X-Frame-Options:
24
- - SAMEORIGIN
25
- X-Xss-Protection:
26
- - 1; mode=block
27
- X-Content-Type-Options:
28
- - nosniff
29
- Content-Type:
30
- - application/json; charset=utf-8
31
- Etag:
32
- - '"b14fbdd7658f3d6f2536890583e79c84"'
33
- Cache-Control:
34
- - max-age=0, private, must-revalidate
35
- X-Request-Id:
36
- - 42ce7f7a-9911-423b-a3b6-9c06338c30db
37
- X-Runtime:
38
- - '0.018564'
39
- Date:
40
- - Tue, 14 Jul 2015 15:47:24 GMT
41
- Connection:
42
- - close
43
- body:
44
- encoding: UTF-8
45
- string: '[{"name":"You Trim Trailed!","description":"You ran one lap of the
46
- trim trail","requirements":"Complete one lap of the trim trail","hint":"Have
47
- to used the trim trail?","image":"http://gamification-api.dev/uploads/badge/image/5/seed.png","collection_id":"trim-trail","created_at":"2015-07-14T14:14:17.042Z","updated_at":"2015-07-14T14:14:17.042Z","level":"bronze","image_greyscale":"http://gamification-api.dev/uploads/badge/image/5/grey_seed.png","required_badges":[],"points":25,"id":"you-trim-trailed"},{"name":"Marathon
48
- Man","description":"You have run 10 laps of the trips trail that is 47 kilometers","requirements":"Complete
49
- 10 laps of the trim trail over any time","hint":"Keep going...","image":"http://gamification-api.dev/uploads/badge/image/6/seed.png","collection_id":"trim-trail","created_at":"2015-07-14T14:14:17.130Z","updated_at":"2015-07-14T14:14:17.130Z","level":"gold","image_greyscale":"http://gamification-api.dev/uploads/badge/image/6/grey_seed.png","required_badges":[],"points":25,"id":"marathon-man"}]'
50
- http_version:
51
- recorded_at: Tue, 14 Jul 2015 15:47:24 GMT
52
- recorded_with: VCR 2.9.3