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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0b95690f2e8748eaf87696b6bcd4d578d73d5058
4
- data.tar.gz: 1205db10c3ad4f47be63dbe7949d7d7111d470cd
3
+ metadata.gz: caf7aa9152ef1f7a136539438327eb8fc718f24b
4
+ data.tar.gz: d6ab062ddd16f068b8f49a3bba320b966983a6da
5
5
  SHA512:
6
- metadata.gz: 025f100cd61306e6c7fc8b1d5e0272f4c0cafd570a09be0d70e684ccf774bc4fa3158b5db231a4e493b21cb02e301817530740e68fc3e4ef1c7fc0f6d7660545
7
- data.tar.gz: e9a699468d7006b9272a0291b793f93fb0b503a62b40f5c89ac51bee1da313a2928d121359a1d764a441166e7c4175e7bef0c3bcc6cf19d92f89cac2d1215386
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
@@ -1,3 +1,3 @@
1
1
  module Bearcat
2
- VERSION = '1.3.22' unless defined?(Bearcat::VERSION)
2
+ VERSION = '1.3.23' unless defined?(Bearcat::VERSION)
3
3
  end
@@ -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.22
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-04-27 00:00:00.000000000 Z
11
+ date: 2018-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake