edools-api 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.editorconfig +21 -0
  3. data/VERSION +1 -1
  4. data/edools-api.gemspec +121 -0
  5. data/lib/edools/core.rb +1 -0
  6. data/lib/edools/core/enrollment.rb +10 -0
  7. data/lib/edools/core/organization.rb +1 -1
  8. data/lib/edools/core/registration.rb +1 -1
  9. data/lib/edools/core/school.rb +1 -1
  10. data/lib/edools/core/school_class.rb +14 -0
  11. data/lib/edools/core/school_product.rb +7 -1
  12. data/lib/edools/core/student.rb +3 -0
  13. data/spec/edools/core/enrollment_spec.rb +19 -16
  14. data/spec/edools/core/school_class_spec.rb +35 -0
  15. data/spec/edools/core/school_product_spec.rb +18 -16
  16. data/spec/edools/core/school_spec.rb +17 -12
  17. data/spec/fixtures/vcr_cassettes/Edools_Core_Enrollment/create_the_enrollment.yml +183 -0
  18. data/spec/fixtures/vcr_cassettes/Edools_Core_Enrollment/finds_all_enrollment.yml +65 -0
  19. data/spec/fixtures/vcr_cassettes/Edools_Core_Enrollment/finds_the_enrollment.yml +63 -0
  20. data/spec/fixtures/vcr_cassettes/Edools_Core_Enrollment/update_the_enrollment.yml +119 -0
  21. data/spec/fixtures/vcr_cassettes/Edools_Core_School/create_the_school.yml +61 -0
  22. data/spec/fixtures/vcr_cassettes/Edools_Core_School/finds_all_school.yml +61 -0
  23. data/spec/fixtures/vcr_cassettes/Edools_Core_School/finds_the_school.yml +61 -0
  24. data/spec/fixtures/vcr_cassettes/Edools_Core_School/update_the_school.yml +115 -0
  25. data/spec/fixtures/vcr_cassettes/Edools_Core_SchoolClass/create_the_school_class.yml +65 -0
  26. data/spec/fixtures/vcr_cassettes/Edools_Core_SchoolClass/destroy_the_school_class.yml +113 -0
  27. data/spec/fixtures/vcr_cassettes/Edools_Core_SchoolClass/finds_all_school_class.yml +61 -0
  28. data/spec/fixtures/vcr_cassettes/Edools_Core_SchoolClass/finds_the_school_class.yml +61 -0
  29. data/spec/fixtures/vcr_cassettes/Edools_Core_SchoolClass/update_the_school_class.yml +116 -0
  30. data/spec/fixtures/vcr_cassettes/Edools_Core_SchoolProduct/create_the_school_product.yml +66 -0
  31. data/spec/fixtures/vcr_cassettes/Edools_Core_SchoolProduct/destroy_the_school_product.yml +114 -0
  32. data/spec/fixtures/vcr_cassettes/Edools_Core_SchoolProduct/finds_all_school_product.yml +186 -0
  33. data/spec/fixtures/vcr_cassettes/Edools_Core_SchoolProduct/finds_the_school_product.yml +62 -0
  34. data/spec/fixtures/vcr_cassettes/Edools_Core_SchoolProduct/update_the_school_product.yml +118 -0
  35. metadata +24 -2
@@ -0,0 +1,183 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://core.edools.com/students.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/vnd.edools.core.v1+json
12
+ Authorization:
13
+ - Token token=84cc0400cd52f62f2e12309b502889ab:2fee1e06d56ab6394ab9acd4c6a8c62f
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ User-Agent:
17
+ - Ruby
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Cache-Control:
24
+ - max-age=0, private, must-revalidate
25
+ Content-Security-Policy-Report-Only:
26
+ - default-src https://* 'self'; connect-src https://* 'self'; font-src https://*
27
+ 'self'; frame-src https://* 'self'; img-src https://* 'self' data:; media-src
28
+ https://* 'self'; object-src https://* 'self'; script-src https://* 'self';
29
+ style-src https://* 'self'; report-uri https://core.edools.com/uri-directive;
30
+ Content-Type:
31
+ - application/json; charset=utf-8
32
+ Date:
33
+ - Wed, 30 Jul 2014 18:32:16 GMT
34
+ Etag:
35
+ - '"a76f65067a4c11e65e0aebbb54bea01b"'
36
+ Server:
37
+ - nginx/1.4.7
38
+ Status:
39
+ - 200 OK
40
+ Strict-Transport-Security:
41
+ - max-age=631152000; includeSubdomains
42
+ X-Content-Type-Options:
43
+ - nosniff
44
+ X-Frame-Options:
45
+ - DENY
46
+ X-Request-Id:
47
+ - ad87f563-535f-4b7d-8e70-395ed2945e82
48
+ X-Runtime:
49
+ - '0.119756'
50
+ X-Xss-Protection:
51
+ - 1; mode=block
52
+ Transfer-Encoding:
53
+ - chunked
54
+ Connection:
55
+ - keep-alive
56
+ body:
57
+ encoding: UTF-8
58
+ string: '{"students":[{"id":1024,"first_name":"Denise","last_name":"Steiner","email":"denisesteiner@mail.com","cpf":null,"phone":null,"skype":null,"twitter":null,"facebook":null,"company_name":null,"company_position":null,"born_at":null,"biography":null,"cover_image_url":"http://infinite-woodland-5276.herokuapp.com/assets/demo/avatars/5.jpg","invitation_token":null,"registrations":[{"id":72,"code":"20140625164249158","school_id":224,"status":"Trial","enrollments":[{"id":1035,"unlimited":true,"available_until":null,"school_class":{"id":151,"code":null,"school_product":{"id":156,"title":"New
59
+ course"}}},{"id":1033,"unlimited":true,"available_until":null,"school_class":{"id":151,"code":null,"school_product":{"id":156,"title":"New
60
+ course"}}}]}]},{"id":1023,"first_name":"Denise","last_name":"Steiner","email":"denisesteiner@email.com","cpf":null,"phone":null,"skype":null,"twitter":null,"facebook":null,"company_name":null,"company_position":null,"born_at":null,"biography":null,"cover_image_url":"https://cdn.edools.com/assets/images/users/default.jpeg","invitation_token":null,"registrations":[{"id":71,"code":"20140625163503552","school_id":224,"status":"Trial","enrollments":[]}]},{"id":1628,"first_name":"Vinicius","last_name":null,"email":"vinicius@edools.com","cpf":null,"phone":null,"skype":null,"twitter":null,"facebook":null,"company_name":null,"company_position":null,"born_at":null,"biography":null,"cover_image_url":"https://cdn.edools.com/assets/images/users/default.jpeg","invitation_token":null,"registrations":[{"id":486,"code":"20140722122412235","school_id":224,"status":"Ativo","enrollments":[]}]},{"id":1246,"first_name":"Diogo","last_name":"","email":"diogo.beda@gmail.com","cpf":null,"phone":null,"skype":null,"twitter":null,"facebook":null,"company_name":null,"company_position":null,"born_at":null,"biography":null,"cover_image_url":"https://cdn.edools.com/assets/images/users/default.jpeg","invitation_token":null,"registrations":[{"id":133,"code":"20140717200254378","school_id":224,"status":"Trial","enrollments":[]}]},{"id":1636,"first_name":"Teste","last_name":null,"email":"teste123@edools.com","cpf":null,"phone":null,"skype":null,"twitter":null,"facebook":null,"company_name":null,"company_position":null,"born_at":null,"biography":null,"cover_image_url":"https://cdn.edools.com/assets/images/users/default.jpeg","invitation_token":null,"registrations":[{"id":495,"code":"20140725190116088","school_id":224,"status":"Trial","enrollments":[]}]},{"id":1637,"first_name":"Teste","last_name":null,"email":"teste1@edools.com","cpf":null,"phone":null,"skype":null,"twitter":null,"facebook":null,"company_name":null,"company_position":null,"born_at":null,"biography":null,"cover_image_url":"https://cdn.edools.com/assets/images/users/default.jpeg","invitation_token":null,"registrations":[{"id":496,"code":"20140725202653238","school_id":224,"status":"Trial","enrollments":[]}]},{"id":1658,"first_name":"Teste","last_name":null,"email":"teste2@edools.com","cpf":null,"phone":null,"skype":null,"twitter":null,"facebook":null,"company_name":null,"company_position":null,"born_at":null,"biography":null,"cover_image_url":"https://cdn.edools.com/assets/images/users/default.jpeg","invitation_token":null,"registrations":[{"id":498,"code":"20140728175322950","school_id":224,"status":"Trial","enrollments":[]}]},{"id":1668,"first_name":"Teste","last_name":null,"email":"teste3@edools.com","cpf":null,"phone":null,"skype":null,"twitter":null,"facebook":null,"company_name":null,"company_position":null,"born_at":null,"biography":null,"cover_image_url":"https://cdn.edools.com/assets/images/users/default.jpeg","invitation_token":null,"registrations":[{"id":500,"code":"20140729041857904","school_id":224,"status":"Trial","enrollments":[]}]},{"id":1669,"first_name":"Teste","last_name":null,"email":"teste4@edools.com","cpf":null,"phone":null,"skype":null,"twitter":null,"facebook":null,"company_name":null,"company_position":null,"born_at":null,"biography":null,"cover_image_url":"https://cdn.edools.com/assets/images/users/default.jpeg","invitation_token":null,"registrations":[{"id":501,"code":"20140729042807382","school_id":224,"status":"Trial","enrollments":[]}]},{"id":1667,"first_name":"Ali","last_name":null,"email":"ali@ismailov.info","cpf":null,"phone":null,"skype":null,"twitter":null,"facebook":null,"company_name":null,"company_position":null,"born_at":null,"biography":null,"cover_image_url":"https://cdn.edools.com/assets/images/users/default.jpeg","invitation_token":"c0996d5219f0d80a09f221e25ee3a9e808ff0366cc699fbdfc5a5dc9f3a82ca4","registrations":[{"id":499,"code":"20140728200528105","school_id":224,"status":"Ativo","enrollments":[]}]}],"current_page":1,"per_page":10,"total_pages":2,"total_count":11}'
61
+ http_version:
62
+ recorded_at: Wed, 30 Jul 2014 18:32:16 GMT
63
+ - request:
64
+ method: get
65
+ uri: https://core.edools.com/school_products/156/school_classes.json?school_product_id=156
66
+ body:
67
+ encoding: US-ASCII
68
+ string: ''
69
+ headers:
70
+ Accept:
71
+ - application/vnd.edools.core.v1+json
72
+ Authorization:
73
+ - Token token=84cc0400cd52f62f2e12309b502889ab:2fee1e06d56ab6394ab9acd4c6a8c62f
74
+ Accept-Encoding:
75
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
76
+ User-Agent:
77
+ - Ruby
78
+ response:
79
+ status:
80
+ code: 200
81
+ message: OK
82
+ headers:
83
+ Cache-Control:
84
+ - max-age=0, private, must-revalidate
85
+ Content-Security-Policy-Report-Only:
86
+ - default-src https://* 'self'; connect-src https://* 'self'; font-src https://*
87
+ 'self'; frame-src https://* 'self'; img-src https://* 'self' data:; media-src
88
+ https://* 'self'; object-src https://* 'self'; script-src https://* 'self';
89
+ style-src https://* 'self'; report-uri https://core.edools.com/uri-directive;
90
+ Content-Type:
91
+ - application/json; charset=utf-8
92
+ Date:
93
+ - Wed, 30 Jul 2014 18:32:18 GMT
94
+ Etag:
95
+ - '"220880d32e632e3ebbe98855e2e2ca3e"'
96
+ Server:
97
+ - nginx/1.4.7
98
+ Status:
99
+ - 200 OK
100
+ Strict-Transport-Security:
101
+ - max-age=631152000; includeSubdomains
102
+ X-Content-Type-Options:
103
+ - nosniff
104
+ X-Frame-Options:
105
+ - DENY
106
+ X-Request-Id:
107
+ - 57f183e7-7313-423e-aca6-12afb4d53727
108
+ X-Runtime:
109
+ - '0.038904'
110
+ X-Xss-Protection:
111
+ - 1; mode=block
112
+ Transfer-Encoding:
113
+ - chunked
114
+ Connection:
115
+ - keep-alive
116
+ body:
117
+ encoding: UTF-8
118
+ string: '{"school_classes":[{"id":151,"start_at":null,"end_at":null,"code":null,"school_product_id":156},{"id":151,"start_at":null,"end_at":null,"code":null,"school_product_id":156},{"id":151,"start_at":null,"end_at":null,"code":null,"school_product_id":156},{"id":168,"start_at":null,"end_at":null,"code":null,"school_product_id":156},{"id":168,"start_at":null,"end_at":null,"code":null,"school_product_id":156},{"id":168,"start_at":null,"end_at":null,"code":null,"school_product_id":156}]}'
119
+ http_version:
120
+ recorded_at: Wed, 30 Jul 2014 18:32:18 GMT
121
+ - request:
122
+ method: post
123
+ uri: https://core.edools.com/enrollments.json
124
+ body:
125
+ encoding: UTF-8
126
+ string: '{"enrollment":{"registration_id":72,"school_class_id":151,"unlimited":true,"status":"active"}}'
127
+ headers:
128
+ Content-Type:
129
+ - application/json
130
+ Authorization:
131
+ - Token token=84cc0400cd52f62f2e12309b502889ab:2fee1e06d56ab6394ab9acd4c6a8c62f
132
+ Accept:
133
+ - application/vnd.edools.core.v1+json
134
+ Accept-Encoding:
135
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
136
+ User-Agent:
137
+ - Ruby
138
+ response:
139
+ status:
140
+ code: 201
141
+ message: Created
142
+ headers:
143
+ Cache-Control:
144
+ - max-age=0, private, must-revalidate
145
+ Content-Security-Policy-Report-Only:
146
+ - default-src https://* 'self'; connect-src https://* 'self'; font-src https://*
147
+ 'self'; frame-src https://* 'self'; img-src https://* 'self' data:; media-src
148
+ https://* 'self'; object-src https://* 'self'; script-src https://* 'self';
149
+ style-src https://* 'self'; report-uri https://core.edools.com/uri-directive;
150
+ Content-Type:
151
+ - application/json; charset=utf-8
152
+ Date:
153
+ - Wed, 30 Jul 2014 18:32:18 GMT
154
+ Etag:
155
+ - '"c2709fd206bacab9c8cefdc3976257e3"'
156
+ Location:
157
+ - https://core.edools.com/enrollments/1060
158
+ Server:
159
+ - nginx/1.4.7
160
+ Status:
161
+ - 201 Created
162
+ Strict-Transport-Security:
163
+ - max-age=631152000; includeSubdomains
164
+ X-Content-Type-Options:
165
+ - nosniff
166
+ X-Frame-Options:
167
+ - DENY
168
+ X-Request-Id:
169
+ - 6473404f-bd9e-4325-ab01-a685bb14e4c3
170
+ X-Runtime:
171
+ - '0.050332'
172
+ X-Xss-Protection:
173
+ - 1; mode=block
174
+ Transfer-Encoding:
175
+ - chunked
176
+ Connection:
177
+ - keep-alive
178
+ body:
179
+ encoding: UTF-8
180
+ string: '{"id":1060,"status":"active","unlimited":true,"available_until":null,"school_class_id":151,"created_at":"2014-07-30T18:32:18.949Z","updated_at":"2014-07-30T18:32:18.949Z","code":null,"registration_id":72}'
181
+ http_version:
182
+ recorded_at: Wed, 30 Jul 2014 18:32:19 GMT
183
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,65 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://core.edools.com/students/1024/enrollments.json?student_id=1024
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/vnd.edools.core.v1+json
12
+ Authorization:
13
+ - Token token=84cc0400cd52f62f2e12309b502889ab:2fee1e06d56ab6394ab9acd4c6a8c62f
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ User-Agent:
17
+ - Ruby
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Cache-Control:
24
+ - max-age=0, private, must-revalidate
25
+ Content-Security-Policy-Report-Only:
26
+ - default-src https://* 'self'; connect-src https://* 'self'; font-src https://*
27
+ 'self'; frame-src https://* 'self'; img-src https://* 'self' data:; media-src
28
+ https://* 'self'; object-src https://* 'self'; script-src https://* 'self';
29
+ style-src https://* 'self'; report-uri https://core.edools.com/uri-directive;
30
+ Content-Type:
31
+ - application/json; charset=utf-8
32
+ Date:
33
+ - Wed, 30 Jul 2014 15:19:15 GMT
34
+ Etag:
35
+ - '"70ca0cf7a709fa8574d65781ae63a125"'
36
+ Server:
37
+ - nginx/1.4.7
38
+ Status:
39
+ - 200 OK
40
+ Strict-Transport-Security:
41
+ - max-age=631152000; includeSubdomains
42
+ X-Content-Type-Options:
43
+ - nosniff
44
+ X-Frame-Options:
45
+ - DENY
46
+ X-Request-Id:
47
+ - 5caa9eb6-cf0c-4e1a-8f36-1ab66dadf74f
48
+ X-Runtime:
49
+ - '0.059036'
50
+ X-Xss-Protection:
51
+ - 1; mode=block
52
+ Transfer-Encoding:
53
+ - chunked
54
+ Connection:
55
+ - keep-alive
56
+ body:
57
+ encoding: UTF-8
58
+ string: '{"enrollments":[{"id":1035,"code":null,"status":"expired","unlimited":true,"available_until":null,"lesson_progress_ids":[],"created_at":"2014-07-25
59
+ 17:11:29 UTC","registration":{"id":72,"status":"Trial","code":"20140625164249158"},"school_class":{"id":151,"start_at":null,"end_at":null,"code":null,"school_product":{"id":156,"title":"New
60
+ course","logo":null}}},{"id":1033,"code":null,"status":"active","unlimited":true,"available_until":null,"lesson_progress_ids":[],"created_at":"2014-07-25
61
+ 17:09:27 UTC","registration":{"id":72,"status":"Trial","code":"20140625164249158"},"school_class":{"id":151,"start_at":null,"end_at":null,"code":null,"school_product":{"id":156,"title":"New
62
+ course","logo":null}}}],"current_page":1,"per_page":10,"total_pages":1,"total_count":2}'
63
+ http_version:
64
+ recorded_at: Wed, 30 Jul 2014 15:19:15 GMT
65
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,63 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://core.edools.com/enrollments/1035.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/vnd.edools.core.v1+json
12
+ Authorization:
13
+ - Token token=84cc0400cd52f62f2e12309b502889ab:2fee1e06d56ab6394ab9acd4c6a8c62f
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ User-Agent:
17
+ - Ruby
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Cache-Control:
24
+ - max-age=0, private, must-revalidate
25
+ Content-Security-Policy-Report-Only:
26
+ - default-src https://* 'self'; connect-src https://* 'self'; font-src https://*
27
+ 'self'; frame-src https://* 'self'; img-src https://* 'self' data:; media-src
28
+ https://* 'self'; object-src https://* 'self'; script-src https://* 'self';
29
+ style-src https://* 'self'; report-uri https://core.edools.com/uri-directive;
30
+ Content-Type:
31
+ - application/json; charset=utf-8
32
+ Date:
33
+ - Wed, 30 Jul 2014 15:19:15 GMT
34
+ Etag:
35
+ - '"79d6d4a145113a8a3c0b65a7e8cac22d"'
36
+ Server:
37
+ - nginx/1.4.7
38
+ Status:
39
+ - 200 OK
40
+ Strict-Transport-Security:
41
+ - max-age=631152000; includeSubdomains
42
+ X-Content-Type-Options:
43
+ - nosniff
44
+ X-Frame-Options:
45
+ - DENY
46
+ X-Request-Id:
47
+ - 873d7f63-9b9d-4804-b7ae-399e9a4067b9
48
+ X-Runtime:
49
+ - '0.033650'
50
+ X-Xss-Protection:
51
+ - 1; mode=block
52
+ Transfer-Encoding:
53
+ - chunked
54
+ Connection:
55
+ - keep-alive
56
+ body:
57
+ encoding: UTF-8
58
+ string: '{"id":1035,"code":null,"status":"expired","unlimited":true,"available_until":null,"lesson_progress_ids":[],"created_at":"2014-07-25
59
+ 17:11:29 UTC","registration":{"id":72,"status":"Trial","code":"20140625164249158"},"school_class":{"id":151,"start_at":null,"end_at":null,"code":null,"school_product":{"id":156,"title":"New
60
+ course","logo":null}}}'
61
+ http_version:
62
+ recorded_at: Wed, 30 Jul 2014 15:19:15 GMT
63
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,119 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://core.edools.com/enrollments/1035.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/vnd.edools.core.v1+json
12
+ Authorization:
13
+ - Token token=84cc0400cd52f62f2e12309b502889ab:2fee1e06d56ab6394ab9acd4c6a8c62f
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ User-Agent:
17
+ - Ruby
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Cache-Control:
24
+ - max-age=0, private, must-revalidate
25
+ Content-Security-Policy-Report-Only:
26
+ - default-src https://* 'self'; connect-src https://* 'self'; font-src https://*
27
+ 'self'; frame-src https://* 'self'; img-src https://* 'self' data:; media-src
28
+ https://* 'self'; object-src https://* 'self'; script-src https://* 'self';
29
+ style-src https://* 'self'; report-uri https://core.edools.com/uri-directive;
30
+ Content-Type:
31
+ - application/json; charset=utf-8
32
+ Date:
33
+ - Wed, 30 Jul 2014 15:19:16 GMT
34
+ Etag:
35
+ - '"79d6d4a145113a8a3c0b65a7e8cac22d"'
36
+ Server:
37
+ - nginx/1.4.7
38
+ Status:
39
+ - 200 OK
40
+ Strict-Transport-Security:
41
+ - max-age=631152000; includeSubdomains
42
+ X-Content-Type-Options:
43
+ - nosniff
44
+ X-Frame-Options:
45
+ - DENY
46
+ X-Request-Id:
47
+ - a857605e-530f-4a2a-b3f7-92139e8012a0
48
+ X-Runtime:
49
+ - '0.048931'
50
+ X-Xss-Protection:
51
+ - 1; mode=block
52
+ Transfer-Encoding:
53
+ - chunked
54
+ Connection:
55
+ - keep-alive
56
+ body:
57
+ encoding: UTF-8
58
+ string: '{"id":1035,"code":null,"status":"expired","unlimited":true,"available_until":null,"lesson_progress_ids":[],"created_at":"2014-07-25
59
+ 17:11:29 UTC","registration":{"id":72,"status":"Trial","code":"20140625164249158"},"school_class":{"id":151,"start_at":null,"end_at":null,"code":null,"school_product":{"id":156,"title":"New
60
+ course","logo":null}}}'
61
+ http_version:
62
+ recorded_at: Wed, 30 Jul 2014 15:19:16 GMT
63
+ - request:
64
+ method: put
65
+ uri: https://core.edools.com/enrollments/1035.json
66
+ body:
67
+ encoding: UTF-8
68
+ string: '{"enrollment":{"id":1035,"code":null,"status":"expired","unlimited":true,"available_until":null,"lesson_progress_ids":[],"created_at":"2014-07-25
69
+ 17:11:29 UTC","registration":{"registration":{"id":72,"status":"Trial","code":"20140625164249158"}},"school_class":{"id":151,"start_at":null,"end_at":null,"code":null,"school_product":{"school_product":{"id":156,"title":"New
70
+ course","logo":null}}}}}'
71
+ headers:
72
+ Content-Type:
73
+ - application/json
74
+ Authorization:
75
+ - Token token=84cc0400cd52f62f2e12309b502889ab:2fee1e06d56ab6394ab9acd4c6a8c62f
76
+ Accept:
77
+ - application/vnd.edools.core.v1+json
78
+ Accept-Encoding:
79
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
80
+ User-Agent:
81
+ - Ruby
82
+ response:
83
+ status:
84
+ code: 204
85
+ message: No Content
86
+ headers:
87
+ Cache-Control:
88
+ - no-cache
89
+ Content-Security-Policy-Report-Only:
90
+ - default-src https://* 'self'; connect-src https://* 'self'; font-src https://*
91
+ 'self'; frame-src https://* 'self'; img-src https://* 'self' data:; media-src
92
+ https://* 'self'; object-src https://* 'self'; script-src https://* 'self';
93
+ style-src https://* 'self'; report-uri https://core.edools.com/uri-directive;
94
+ Date:
95
+ - Wed, 30 Jul 2014 15:19:17 GMT
96
+ Server:
97
+ - nginx/1.4.7
98
+ Status:
99
+ - 204 No Content
100
+ Strict-Transport-Security:
101
+ - max-age=631152000; includeSubdomains
102
+ X-Content-Type-Options:
103
+ - nosniff
104
+ X-Frame-Options:
105
+ - DENY
106
+ X-Request-Id:
107
+ - 2b6e43d8-3103-40c6-a628-2acb1c668b99
108
+ X-Runtime:
109
+ - '0.033693'
110
+ X-Xss-Protection:
111
+ - 1; mode=block
112
+ Connection:
113
+ - keep-alive
114
+ body:
115
+ encoding: UTF-8
116
+ string: ''
117
+ http_version:
118
+ recorded_at: Wed, 30 Jul 2014 15:19:17 GMT
119
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,61 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://core.edools.com/schools.json
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"school":{"name":"Teste","subdomain":"teste","status":"trial"}}'
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Authorization:
13
+ - Token token=84cc0400cd52f62f2e12309b502889ab:2fee1e06d56ab6394ab9acd4c6a8c62f
14
+ Accept:
15
+ - application/vnd.edools.core.v1+json
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ User-Agent:
19
+ - Ruby
20
+ response:
21
+ status:
22
+ code: 401
23
+ message: Unauthorized
24
+ headers:
25
+ Cache-Control:
26
+ - no-cache
27
+ Content-Security-Policy-Report-Only:
28
+ - default-src https://* 'self'; connect-src https://* 'self'; font-src https://*
29
+ 'self'; frame-src https://* 'self'; img-src https://* 'self' data:; media-src
30
+ https://* 'self'; object-src https://* 'self'; script-src https://* 'self';
31
+ style-src https://* 'self'; report-uri https://core.edools.com/uri-directive;
32
+ Content-Type:
33
+ - application/json; charset=utf-8
34
+ Date:
35
+ - Wed, 30 Jul 2014 16:51:27 GMT
36
+ Server:
37
+ - nginx/1.4.7
38
+ Status:
39
+ - 401 Unauthorized
40
+ Strict-Transport-Security:
41
+ - max-age=631152000; includeSubdomains
42
+ X-Content-Type-Options:
43
+ - nosniff
44
+ X-Frame-Options:
45
+ - DENY
46
+ X-Request-Id:
47
+ - a74d47d2-7071-4361-8918-ecefa6cfd032
48
+ X-Runtime:
49
+ - '0.036279'
50
+ X-Xss-Protection:
51
+ - 1; mode=block
52
+ Transfer-Encoding:
53
+ - chunked
54
+ Connection:
55
+ - keep-alive
56
+ body:
57
+ encoding: UTF-8
58
+ string: Resource not authorized
59
+ http_version:
60
+ recorded_at: Wed, 30 Jul 2014 16:51:28 GMT
61
+ recorded_with: VCR 2.9.2