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,62 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://core.edools.com/school_products/170.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 17:22:31 GMT
34
+ Etag:
35
+ - '"05d17c3de1f58eb103b023ee1057ab5e"'
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
+ - 60805cd1-89f1-487a-b782-6c15aa941d3b
48
+ X-Runtime:
49
+ - '0.035443'
50
+ X-Xss-Protection:
51
+ - 1; mode=block
52
+ Content-Length:
53
+ - '616'
54
+ Connection:
55
+ - keep-alive
56
+ body:
57
+ encoding: UTF-8
58
+ string: '{"id":170,"title":"teste","subtitle":null,"description":null,"logo":null,"video_url":null,"video_title":null,"video_description":null,"published":false,"hidden":false,"restricted":false,"allowed_emails":[],"expire_date":null,"available_time_type":"indeterminate","available_time_length":null,"available_time_unit":null,"certification":false,"certification_min_progress":null,"meta_title":null,"meta_description":null,"classes_auto_generation":false,"created_at":"2014-07-30
59
+ 17:21:16 UTC","updated_at":"2014-07-30 17:21:16 UTC","categories":[{"id":471,"title":"Geral","order":1,"flag":false}],"library_resource":null}'
60
+ http_version:
61
+ recorded_at: Wed, 30 Jul 2014 17:22:31 GMT
62
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,118 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://core.edools.com/school_products/170.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 17:22:32 GMT
34
+ Etag:
35
+ - '"05d17c3de1f58eb103b023ee1057ab5e"'
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
+ - d662e79d-bc8f-4df8-8050-7ee107daab8a
48
+ X-Runtime:
49
+ - '0.025945'
50
+ X-Xss-Protection:
51
+ - 1; mode=block
52
+ Content-Length:
53
+ - '616'
54
+ Connection:
55
+ - keep-alive
56
+ body:
57
+ encoding: UTF-8
58
+ string: '{"id":170,"title":"teste","subtitle":null,"description":null,"logo":null,"video_url":null,"video_title":null,"video_description":null,"published":false,"hidden":false,"restricted":false,"allowed_emails":[],"expire_date":null,"available_time_type":"indeterminate","available_time_length":null,"available_time_unit":null,"certification":false,"certification_min_progress":null,"meta_title":null,"meta_description":null,"classes_auto_generation":false,"created_at":"2014-07-30
59
+ 17:21:16 UTC","updated_at":"2014-07-30 17:21:16 UTC","categories":[{"id":471,"title":"Geral","order":1,"flag":false}],"library_resource":null}'
60
+ http_version:
61
+ recorded_at: Wed, 30 Jul 2014 17:22:32 GMT
62
+ - request:
63
+ method: put
64
+ uri: https://core.edools.com/school_products/170.json
65
+ body:
66
+ encoding: UTF-8
67
+ string: '{"school_product":{"id":170,"title":"teste","subtitle":null,"description":"test
68
+ description","logo":null,"video_url":null,"video_title":null,"video_description":null,"published":false,"hidden":false,"restricted":false,"allowed_emails":[],"expire_date":null,"available_time_type":"indeterminate","available_time_length":null,"available_time_unit":null,"certification":false,"certification_min_progress":null,"meta_title":null,"meta_description":null,"classes_auto_generation":false,"created_at":"2014-07-30
69
+ 17:21:16 UTC","updated_at":"2014-07-30 17:21:16 UTC","categories":[{"id":471,"title":"Geral","order":1,"flag":false}],"library_resource":null}}'
70
+ headers:
71
+ Content-Type:
72
+ - application/json
73
+ Authorization:
74
+ - Token token=84cc0400cd52f62f2e12309b502889ab:2fee1e06d56ab6394ab9acd4c6a8c62f
75
+ Accept:
76
+ - application/vnd.edools.core.v1+json
77
+ Accept-Encoding:
78
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
79
+ User-Agent:
80
+ - Ruby
81
+ response:
82
+ status:
83
+ code: 204
84
+ message: No Content
85
+ headers:
86
+ Cache-Control:
87
+ - no-cache
88
+ Content-Security-Policy-Report-Only:
89
+ - default-src https://* 'self'; connect-src https://* 'self'; font-src https://*
90
+ 'self'; frame-src https://* 'self'; img-src https://* 'self' data:; media-src
91
+ https://* 'self'; object-src https://* 'self'; script-src https://* 'self';
92
+ style-src https://* 'self'; report-uri https://core.edools.com/uri-directive;
93
+ Date:
94
+ - Wed, 30 Jul 2014 17:22:32 GMT
95
+ Server:
96
+ - nginx/1.4.7
97
+ Status:
98
+ - 204 No Content
99
+ Strict-Transport-Security:
100
+ - max-age=631152000; includeSubdomains
101
+ X-Content-Type-Options:
102
+ - nosniff
103
+ X-Frame-Options:
104
+ - DENY
105
+ X-Request-Id:
106
+ - 45dda393-e014-4243-9240-53c8ada3d079
107
+ X-Runtime:
108
+ - '0.083557'
109
+ X-Xss-Protection:
110
+ - 1; mode=block
111
+ Connection:
112
+ - keep-alive
113
+ body:
114
+ encoding: UTF-8
115
+ string: ''
116
+ http_version:
117
+ recorded_at: Wed, 30 Jul 2014 17:22:32 GMT
118
+ recorded_with: VCR 2.9.2
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: edools-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vinicius Kastrup
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-29 00:00:00.000000000 Z
11
+ date: 2014-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeresource
@@ -160,12 +160,14 @@ extra_rdoc_files:
160
160
  - README.md
161
161
  files:
162
162
  - ".document"
163
+ - ".editorconfig"
163
164
  - Gemfile
164
165
  - Gemfile.lock
165
166
  - LICENSE.txt
166
167
  - README.md
167
168
  - Rakefile
168
169
  - VERSION
170
+ - edools-api.gemspec
169
171
  - lib/edools.rb
170
172
  - lib/edools/config.rb
171
173
  - lib/edools/core.rb
@@ -175,6 +177,7 @@ files:
175
177
  - lib/edools/core/paginated_collection.rb
176
178
  - lib/edools/core/registration.rb
177
179
  - lib/edools/core/school.rb
180
+ - lib/edools/core/school_class.rb
178
181
  - lib/edools/core/school_product.rb
179
182
  - lib/edools/core/student.rb
180
183
  - lib/edools/initialization.rb
@@ -182,9 +185,28 @@ files:
182
185
  - spec/edools/core/enrollment_spec.rb
183
186
  - spec/edools/core/organization_spec.rb
184
187
  - spec/edools/core/registration_spec.rb
188
+ - spec/edools/core/school_class_spec.rb
185
189
  - spec/edools/core/school_product_spec.rb
186
190
  - spec/edools/core/school_spec.rb
187
191
  - spec/edools/core/student_spec.rb
192
+ - spec/fixtures/vcr_cassettes/Edools_Core_Enrollment/create_the_enrollment.yml
193
+ - spec/fixtures/vcr_cassettes/Edools_Core_Enrollment/finds_all_enrollment.yml
194
+ - spec/fixtures/vcr_cassettes/Edools_Core_Enrollment/finds_the_enrollment.yml
195
+ - spec/fixtures/vcr_cassettes/Edools_Core_Enrollment/update_the_enrollment.yml
196
+ - spec/fixtures/vcr_cassettes/Edools_Core_School/create_the_school.yml
197
+ - spec/fixtures/vcr_cassettes/Edools_Core_School/finds_all_school.yml
198
+ - spec/fixtures/vcr_cassettes/Edools_Core_School/finds_the_school.yml
199
+ - spec/fixtures/vcr_cassettes/Edools_Core_School/update_the_school.yml
200
+ - spec/fixtures/vcr_cassettes/Edools_Core_SchoolClass/create_the_school_class.yml
201
+ - spec/fixtures/vcr_cassettes/Edools_Core_SchoolClass/destroy_the_school_class.yml
202
+ - spec/fixtures/vcr_cassettes/Edools_Core_SchoolClass/finds_all_school_class.yml
203
+ - spec/fixtures/vcr_cassettes/Edools_Core_SchoolClass/finds_the_school_class.yml
204
+ - spec/fixtures/vcr_cassettes/Edools_Core_SchoolClass/update_the_school_class.yml
205
+ - spec/fixtures/vcr_cassettes/Edools_Core_SchoolProduct/create_the_school_product.yml
206
+ - spec/fixtures/vcr_cassettes/Edools_Core_SchoolProduct/destroy_the_school_product.yml
207
+ - spec/fixtures/vcr_cassettes/Edools_Core_SchoolProduct/finds_all_school_product.yml
208
+ - spec/fixtures/vcr_cassettes/Edools_Core_SchoolProduct/finds_the_school_product.yml
209
+ - spec/fixtures/vcr_cassettes/Edools_Core_SchoolProduct/update_the_school_product.yml
188
210
  - spec/fixtures/vcr_cassettes/Edools_Core_Student/create_the_student.yml
189
211
  - spec/fixtures/vcr_cassettes/Edools_Core_Student/destroy_the_student.yml
190
212
  - spec/fixtures/vcr_cassettes/Edools_Core_Student/finds_all_student.yml