bearcat 1.2.11 → 1.2.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1fedf9fe9f4bcd702e30e35eba3d8e48554d92c2
4
- data.tar.gz: 100c379061c19a64f3d5c99439f2aa2e4a797bf8
3
+ metadata.gz: 73f5fc1d776a4b85e6a742cce69b48b381a10219
4
+ data.tar.gz: 1ca1b49c5e01a2012142f4f3b9bcb5ec74b33a83
5
5
  SHA512:
6
- metadata.gz: 74e3cde675504f52e9d61d1976740ec221fcdfaf64c2e1527b06a009be97ffd0193a303179aeaf71f0f93723c0a5ea2c90b3712584428702240a86089410e89e
7
- data.tar.gz: 97b034309fb261c0babfde01a180e9bf8f06f8b5ead1c9ae1ee9d66a71ed1be94c372f132bdb7531a6641c4761c132101767d4b0eb2239a9961de3a18e5ec984
6
+ metadata.gz: 1a5668f707972ab185f417b15835a1b7eb3af2b83461838cafb2f58172175815be6029cd00b2e1816ce8037dddfaf06232f954aa29c294b6bfd7411533b5481e
7
+ data.tar.gz: 69c4af329df6b2da3c9e448b783316cdf3e7b1f5d8542360a1f0344fd5bc14765cb688c17a4ebd4b9bb24b991d86cabb71f02b45e848d4d13bdce42d7dd4fdfa
@@ -25,6 +25,10 @@ module Bearcat
25
25
  def account_courses(account, params = {})
26
26
  get("/api/v1/accounts/#{account}/courses", params)
27
27
  end
28
+
29
+ def account_grading_standards(account, params={})
30
+ get("/api/v1/accounts/#{account}/grading_standards", params)
31
+ end
28
32
  end
29
33
  end
30
34
  end
@@ -45,6 +45,10 @@ module Bearcat
45
45
  def list_users_courses(params)
46
46
  get("api/v1/courses", params)
47
47
  end
48
+
49
+ def course_grading_standards(course, params={})
50
+ get("/api/v1/courses/#{course}/grading_standards", params)
51
+ end
48
52
  end
49
53
  end
50
54
  end
@@ -1,3 +1,3 @@
1
1
  module Bearcat
2
- VERSION = '1.2.11' unless defined?(Bearcat::VERSION)
2
+ VERSION = '1.2.12' unless defined?(Bearcat::VERSION)
3
3
  end
@@ -55,4 +55,11 @@ describe Bearcat::Client::Accounts do
55
55
  courses.first['name'].should == 'Sub1 Course1'
56
56
  end
57
57
 
58
+ it 'gets account grading_standards' do
59
+ stub_get(@client, "/api/v1/accounts/1/grading_standards").to_return(json_response("account_grading_standards.json"))
60
+ grading_standards = @client.account_grading_standards(1)
61
+ expect(grading_standards['id']).to eq 1
62
+ expect(grading_standards['title']).to eq 'account grading scheme'
63
+ end
64
+
58
65
  end
@@ -102,4 +102,11 @@ describe Bearcat::Client::Sections do
102
102
  expect(response['id']).to eql 3
103
103
  expect(response['workflow_state']).to eql 'available'
104
104
  end
105
+
106
+ it 'gets course grading_standards' do
107
+ stub_get(@client, "/api/v1/courses/1/grading_standards").to_return(json_response("course_grading_standards.json"))
108
+ grading_standards = @client.course_grading_standards(1)
109
+ expect(grading_standards['id']).to eq 2
110
+ expect(grading_standards['title']).to eq 'custom grading scheme'
111
+ end
105
112
  end
@@ -0,0 +1,20 @@
1
+ {
2
+ "id":1,
3
+ "title":"account grading scheme",
4
+ "context_id":1,
5
+ "context_type":"Account",
6
+ "grading_scheme":[
7
+ {"name":"A","value":0.94},
8
+ {"name":"A-","value":0.9},
9
+ {"name":"B+","value":0.87},
10
+ {"name":"B","value":0.84},
11
+ {"name":"B-","value":0.8},
12
+ {"name":"C+","value":0.77},
13
+ {"name":"C","value":0.74},
14
+ {"name":"C-","value":0.7},
15
+ {"name":"D+","value":0.67},
16
+ {"name":"D","value":0.64},
17
+ {"name":"D-","value":0.61},
18
+ {"name":"F","value":0.0}
19
+ ]
20
+ }
@@ -0,0 +1,42 @@
1
+ [
2
+ {
3
+ "id":2,
4
+ "name":"2010",
5
+ "max_membership":null,
6
+ "is_public":false,
7
+ "join_level":"invitation_only",
8
+ "group_category_id":2,
9
+ "description":null,
10
+ "members_count":0,
11
+ "storage_quota_mb":50,
12
+ "context_type":"Account",
13
+ "account_id":1,
14
+ "avatar_url":null,
15
+ "role":null,
16
+ "leader":null,
17
+ "sis_group_id":null,
18
+ "sis_import_id":null,
19
+ "has_submission":false,
20
+ "concluded":false
21
+ },
22
+ {
23
+ "id":3,
24
+ "name":"2014",
25
+ "max_membership":null,
26
+ "is_public":false,
27
+ "join_level":"invitation_only",
28
+ "group_category_id":3,
29
+ "description":null,
30
+ "members_count":2,
31
+ "storage_quota_mb":50,
32
+ "context_type":"Account",
33
+ "account_id":1,
34
+ "avatar_url":null,
35
+ "role":null,
36
+ "leader":null,
37
+ "sis_group_id":null,
38
+ "sis_import_id":null,
39
+ "has_submission":false,
40
+ "concluded":false
41
+ }
42
+ ]
@@ -0,0 +1,20 @@
1
+ {
2
+ "id":2,
3
+ "title":"custom grading scheme",
4
+ "context_id":69,
5
+ "context_type":"Course",
6
+ "grading_scheme":[
7
+ {"name":"A","value":0.94},
8
+ {"name":"A-","value":0.9},
9
+ {"name":"B+","value":0.87},
10
+ {"name":"B","value":0.84},
11
+ {"name":"B-","value":0.8},
12
+ {"name":"C+","value":0.77},
13
+ {"name":"C","value":0.74},
14
+ {"name":"C-","value":0.7},
15
+ {"name":"D+","value":0.67},
16
+ {"name":"D","value":0.64},
17
+ {"name":"D-","value":0.61},
18
+ {"name":"F","value":0.0}
19
+ ]
20
+ }
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.2.11
4
+ version: 1.2.12
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: 2016-08-12 00:00:00.000000000 Z
11
+ date: 2016-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -172,6 +172,8 @@ files:
172
172
  - spec/fixtures/access_token.json
173
173
  - spec/fixtures/account_admins.json
174
174
  - spec/fixtures/account_courses.json
175
+ - spec/fixtures/account_grading_standards.json
176
+ - spec/fixtures/account_groups.json
175
177
  - spec/fixtures/account_reports.json
176
178
  - spec/fixtures/account_reports_index.json
177
179
  - spec/fixtures/account_reports_result_success.json
@@ -203,6 +205,7 @@ files:
203
205
  - spec/fixtures/course_enrollments.json
204
206
  - spec/fixtures/course_files.json
205
207
  - spec/fixtures/course_folders.json
208
+ - spec/fixtures/course_grading_standards.json
206
209
  - spec/fixtures/course_groups.json
207
210
  - spec/fixtures/course_sections.json
208
211
  - spec/fixtures/course_students.json
@@ -287,7 +290,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
287
290
  version: '0'
288
291
  requirements: []
289
292
  rubyforge_project:
290
- rubygems_version: 2.4.5.1
293
+ rubygems_version: 2.4.8
291
294
  signing_key:
292
295
  specification_version: 4
293
296
  summary: Canvas API
@@ -326,6 +329,8 @@ test_files:
326
329
  - spec/fixtures/access_token.json
327
330
  - spec/fixtures/account_admins.json
328
331
  - spec/fixtures/account_courses.json
332
+ - spec/fixtures/account_grading_standards.json
333
+ - spec/fixtures/account_groups.json
329
334
  - spec/fixtures/account_reports.json
330
335
  - spec/fixtures/account_reports_index.json
331
336
  - spec/fixtures/account_reports_result_success.json
@@ -357,6 +362,7 @@ test_files:
357
362
  - spec/fixtures/course_enrollments.json
358
363
  - spec/fixtures/course_files.json
359
364
  - spec/fixtures/course_folders.json
365
+ - spec/fixtures/course_grading_standards.json
360
366
  - spec/fixtures/course_groups.json
361
367
  - spec/fixtures/course_sections.json
362
368
  - spec/fixtures/course_students.json
@@ -422,4 +428,3 @@ test_files:
422
428
  - spec/fixtures/user_page_views.json
423
429
  - spec/fixtures/user_profile.json
424
430
  - spec/helper.rb
425
- has_rdoc: