bearcat 1.0.23 → 1.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/bearcat/client/accounts.rb +3 -0
- data/lib/bearcat/version.rb +1 -1
- data/spec/bearcat/client/accounts_spec.rb +10 -2
- data/spec/fixtures/account_courses.json +48 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e64f14373158a3c51b9c252c2a3ec11d4c09444
|
4
|
+
data.tar.gz: 539409fcc684429da22dcf7c90e253583bf16fd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ec0604c13c13a0114f5950fa238ad23097e5e566d569b302644d97671a1f4b5869df975c5dce21394447a3b34b322d4ffdebc214dc68c421ed0422e657c4f76
|
7
|
+
data.tar.gz: 68597dede4b368424af3b37d15ba3667948af00bbe4902ff68be607df8af544d2a6a70986291b090eace638570e2bc4e16e85e0ff16c8c50ab43527ab2b64ab5
|
data/lib/bearcat/version.rb
CHANGED
@@ -39,12 +39,20 @@ describe Bearcat::Client::Accounts do
|
|
39
39
|
it "returns the roles for an account" do
|
40
40
|
stub_get(@client, "/api/v1/accounts/1/roles").to_return(json_response("account_roles.json"))
|
41
41
|
account = @client.account_roles(1)
|
42
|
-
roles = account.members
|
42
|
+
roles = account.members
|
43
43
|
roles.count.should == 1
|
44
44
|
roles.first['id'].should == 1
|
45
45
|
roles.first['role'].should == 'AccountAdmin'
|
46
46
|
roles.first['permissions'].count.should == 4
|
47
47
|
roles.first['permissions']['manage_catalog']['enabled'].should == true
|
48
|
-
end
|
48
|
+
end
|
49
|
+
|
50
|
+
it 'returns courses for an account' do
|
51
|
+
stub_get(@client, "/api/v1/accounts/1/courses").to_return(json_response("account_courses.json"))
|
52
|
+
courses = @client.account_courses(1)
|
53
|
+
courses.count.should == 2
|
54
|
+
courses.first['id'].should == 1
|
55
|
+
courses.first['name'].should == 'Sub1 Course1'
|
56
|
+
end
|
49
57
|
|
50
58
|
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"account_id": 3,
|
4
|
+
"course_code": "sub1c1",
|
5
|
+
"default_view": "feed",
|
6
|
+
"enrollment_term_id": 3,
|
7
|
+
"grading_standard_id": null,
|
8
|
+
"id": 1,
|
9
|
+
"is_public": false,
|
10
|
+
"name": "Sub1 Course1",
|
11
|
+
"start_at": "2015-02-24T19:04:00Z",
|
12
|
+
"end_at": null,
|
13
|
+
"public_syllabus": false,
|
14
|
+
"storage_quota_mb": 500,
|
15
|
+
"is_public_to_auth_users": false,
|
16
|
+
"apply_assignment_group_weights": false,
|
17
|
+
"calendar": {
|
18
|
+
"ics": "http://localhost:3000/feeds/calendars/course_jknx1huncbUV3gQSIHfYjFO0uHyBBs53hBQb9RYA.ics"
|
19
|
+
},
|
20
|
+
"sis_course_id": "2015-TVY15-7006-21094202-832271",
|
21
|
+
"integration_id": null,
|
22
|
+
"hide_final_grades": false,
|
23
|
+
"workflow_state": "available"
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"account_id": 4,
|
27
|
+
"course_code": "sub2c1",
|
28
|
+
"default_view": "feed",
|
29
|
+
"enrollment_term_id": 1,
|
30
|
+
"grading_standard_id": null,
|
31
|
+
"id": 2,
|
32
|
+
"is_public": null,
|
33
|
+
"name": "Sub2 Cours1",
|
34
|
+
"start_at": "2015-02-24T19:05:03Z",
|
35
|
+
"end_at": null,
|
36
|
+
"public_syllabus": false,
|
37
|
+
"storage_quota_mb": 500,
|
38
|
+
"is_public_to_auth_users": false,
|
39
|
+
"apply_assignment_group_weights": false,
|
40
|
+
"calendar": {
|
41
|
+
"ics": "http://localhost:3000/feeds/calendars/course_ugQF3mnjRQ1k5XDGBr6WgUl3a087vUSQHwwzqeYZ.ics"
|
42
|
+
},
|
43
|
+
"sis_course_id": null,
|
44
|
+
"integration_id": null,
|
45
|
+
"hide_final_grades": false,
|
46
|
+
"workflow_state": "available"
|
47
|
+
}
|
48
|
+
]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bearcat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Mills, Jake Sorce
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -163,6 +163,7 @@ files:
|
|
163
163
|
- spec/bearcat/client_spec.rb
|
164
164
|
- spec/bearcat_spec.rb
|
165
165
|
- spec/fixtures/account_admins.json
|
166
|
+
- spec/fixtures/account_courses.json
|
166
167
|
- spec/fixtures/account_reports.json
|
167
168
|
- spec/fixtures/account_reports_index.json
|
168
169
|
- spec/fixtures/account_reports_result_success.json
|
@@ -264,7 +265,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
264
265
|
version: '0'
|
265
266
|
requirements: []
|
266
267
|
rubyforge_project:
|
267
|
-
rubygems_version: 2.4.
|
268
|
+
rubygems_version: 2.4.5
|
268
269
|
signing_key:
|
269
270
|
specification_version: 4
|
270
271
|
summary: Canvas API
|
@@ -297,6 +298,7 @@ test_files:
|
|
297
298
|
- spec/bearcat/client_spec.rb
|
298
299
|
- spec/bearcat_spec.rb
|
299
300
|
- spec/fixtures/account_admins.json
|
301
|
+
- spec/fixtures/account_courses.json
|
300
302
|
- spec/fixtures/account_reports.json
|
301
303
|
- spec/fixtures/account_reports_index.json
|
302
304
|
- spec/fixtures/account_reports_result_success.json
|