bearcat 1.3.22 → 1.3.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bearcat/client/assignments.rb +12 -0
- data/lib/bearcat/version.rb +1 -1
- data/spec/bearcat/client/assignments_spec.rb +24 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: caf7aa9152ef1f7a136539438327eb8fc718f24b
|
4
|
+
data.tar.gz: d6ab062ddd16f068b8f49a3bba320b966983a6da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb7dd18c5acc8f7917fe07da220414c1e88dab38fe50badefb958eccc3ef058cb7ebe5af32e62f3b25194b90c41790e5818fee9d9c2c4a1e86a7d492280fc22d
|
7
|
+
data.tar.gz: 1f3d7c2ec9c7d06343a4ba0a5dabd7fbde1cb0032d2208cba7b3d1d62561f2912cd5cd3d83bf7485cb25694d383d0771fe56c3fad29c7be212f766fc31693db4
|
@@ -14,10 +14,22 @@ module Bearcat
|
|
14
14
|
get("/api/v1/courses/#{course}/assignments/#{assignment}/overrides")
|
15
15
|
end
|
16
16
|
|
17
|
+
def all_assignment_overrides(course_id)
|
18
|
+
get("/api/v1/courses/#{course_id}/assignments/overrides")
|
19
|
+
end
|
20
|
+
|
17
21
|
def create_assignment_override(course, assignment, params)
|
18
22
|
post("api/v1/courses/#{course}/assignments/#{assignment}/overrides", params)
|
19
23
|
end
|
20
24
|
|
25
|
+
def batch_create_assignment_overrides(course_id, params)
|
26
|
+
post("/api/v1/courses/#{course_id}/assignments/overrides", params)
|
27
|
+
end
|
28
|
+
|
29
|
+
def batch_update_assignment_overrides(course_id, params)
|
30
|
+
put("/api/v1/courses/#{course_id}/assignments/overrides", params)
|
31
|
+
end
|
32
|
+
|
21
33
|
def create_assignment(course, params={})
|
22
34
|
post("/api/v1/courses/#{course}/assignments", params)
|
23
35
|
end
|
data/lib/bearcat/version.rb
CHANGED
@@ -50,4 +50,28 @@ describe Bearcat::Client::Assignments do
|
|
50
50
|
assignment["id"].should == 1
|
51
51
|
end
|
52
52
|
|
53
|
+
it "allows batch retrieval of all overrides in a course" do
|
54
|
+
stub_get(@client, "/api/v1/courses/3/assignments/overrides").to_return(json_response("assignment_section_override.json"))
|
55
|
+
@client.all_assignment_overrides(3)
|
56
|
+
end
|
57
|
+
|
58
|
+
it "allows batch creation of assignment overrides" do
|
59
|
+
stub_post(@client, "/api/v1/courses/310/assignments/overrides")
|
60
|
+
.with(:body => {"assignment_override"=>{"course_section_id"=>"74", "due_at"=>"2013-06-27T21:08:46Z"}})
|
61
|
+
.to_return(json_response("assignment_section_override.json"))
|
62
|
+
@client.batch_create_assignment_overrides(310, {
|
63
|
+
"assignment_override[course_section_id]" => 74,
|
64
|
+
"assignment_override[due_at]" => "2013-06-27T21:08:46Z"
|
65
|
+
})
|
66
|
+
end
|
67
|
+
|
68
|
+
it "allows batch updating of assignment overrides" do
|
69
|
+
stub_put(@client, "/api/v1/courses/310/assignments/overrides")
|
70
|
+
.with(:body => {"assignment_override"=>{"course_section_id"=>"74", "due_at"=>"2013-06-27T21:08:46Z"}})
|
71
|
+
.to_return(json_response("assignment_section_override.json"))
|
72
|
+
@client.batch_update_assignment_overrides(310, {
|
73
|
+
"assignment_override[course_section_id]" => 74,
|
74
|
+
"assignment_override[due_at]" => "2013-06-27T21:08:46Z"
|
75
|
+
})
|
76
|
+
end
|
53
77
|
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.3.
|
4
|
+
version: 1.3.23
|
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: 2018-
|
11
|
+
date: 2018-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|