bearcat 1.0.28 → 1.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7870ab5d1b84c2e69b265c8d30a5d05f64ee02d0
4
- data.tar.gz: 9782d19e66080adade28284c79d82f486e0a2ba2
3
+ metadata.gz: eecdfbfae3c8cbcb99c5b9567566965af7ca4944
4
+ data.tar.gz: 456a0504b1d1b587ec38af268bc37ebfdcb0422b
5
5
  SHA512:
6
- metadata.gz: 96c543098825ac7a94aad5d166c0993747d7bba84fe32636cc1c624e5a1febcb0a49e5f8386781a4ca895e3ea8d50bf98917d4345f6b0b4baaffeb5efb027974
7
- data.tar.gz: dabd4c5c19b4327b7523fe12805d7c9d5a304ba9ceaa1663da5336511313e565808c6aae69ac1dec1d10468f0355de21ed99498df503c5f72e32e1704ad324ff
6
+ metadata.gz: faea2e5d7090119ec7361f97486deba54c4d36c12a68e3c90a79da236d448cd9517f65af88f6ff931871382c6582e7cf793c56c31d6591831d70ec798d5aedb4
7
+ data.tar.gz: 890dc9dc6ea32c1bca3b417c8c22f5b0455c29114eff0f7e7e783cdc148bac5debb854fb4b53a62ba988320e0c338165f211daec6a726413e0cb48d000404c78
@@ -10,6 +10,10 @@ module Bearcat
10
10
  get("/api/v1/courses/#{course.to_s}/assignments/#{assignment}/submissions", params)
11
11
  end
12
12
 
13
+ def user_course_assignment_submission(course, assignment, user, params={})
14
+ get("/api/v1/courses/#{course.to_s}/assignments/#{assignment.to_s}/submissions/#{user.to_s}", params)
15
+ end
16
+
13
17
  def course_submission(course, assignment, params)
14
18
  post("/api/v1/courses/#{course}/assignments/#{assignment}/submissions", params)
15
19
  end
@@ -1,3 +1,3 @@
1
1
  module Bearcat
2
- VERSION = '1.0.28' unless defined?(Bearcat::VERSION)
2
+ VERSION = '1.1.0' unless defined?(Bearcat::VERSION)
3
3
  end
@@ -98,7 +98,7 @@ describe Bearcat::Client::Sections do
98
98
 
99
99
  it 'gets course belonging to user' do
100
100
  stub_get(@client, '/api/v1/courses?enrollment_type=teacher').to_return(json_response("course.json"))
101
- response = @client.list_users_courses({enrollment_type: 'teacher'})
101
+ response = @client.list_users_courses({'enrollment_type' => 'teacher'})
102
102
  expect(response['id']).to eql 3
103
103
  expect(response['workflow_state']).to eql 'available'
104
104
  end
@@ -21,6 +21,22 @@ describe Bearcat::Client::Submissions do
21
21
  submissions['workflow_state'].should =='unsubmitted'
22
22
  end
23
23
 
24
+ it "returns all submissions for a course, user, submission" do
25
+ stub_get(@client, "/api/v1/courses/3/assignments/2353405/submissions/682285").to_return(json_response('submissions', "submission.json"))
26
+ submissions = @client.user_course_assignment_submission(3, 2353405, 682285)
27
+ submissions['assignment_id'].should == 2353405
28
+ submissions['id'].should == 8444510
29
+ submissions['score'].should == 1
30
+ submissions['grade'].should == '1'
31
+ submissions['user_id'].should == 682285
32
+ submissions['workflow_state'].should =='unsubmitted'
33
+ submissions['late'].should == false
34
+ submissions['preview_url'].should =='https://canvas.instructure.com/courses/218274/assignments/2353405/submissions/682285?preview=1'
35
+ submissions['workflow_state'].should =='unsubmitted'
36
+ submissions['workflow_state'].should =='unsubmitted'
37
+ submissions['workflow_state'].should =='unsubmitted'
38
+ end
39
+
24
40
  context 'course' do
25
41
  it "submits a file" do
26
42
  @client.stub(:upload_file).and_return({})
@@ -40,4 +56,4 @@ describe Bearcat::Client::Submissions do
40
56
  end
41
57
 
42
58
 
43
- end
59
+ end
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.28
4
+ version: 1.1.0
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-10-08 00:00:00.000000000 Z
11
+ date: 2015-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -270,7 +270,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
270
270
  version: '0'
271
271
  requirements: []
272
272
  rubyforge_project:
273
- rubygems_version: 2.4.8
273
+ rubygems_version: 2.2.2
274
274
  signing_key:
275
275
  specification_version: 4
276
276
  summary: Canvas API