bearcat 0.9.19 → 0.9.20
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/courses.rb +4 -0
- data/lib/bearcat/version.rb +1 -1
- data/spec/bearcat/client/courses_spec.rb +7 -0
- data/spec/fixtures/updated_course.json +7 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 63e74acb418fbfa4828a312c0c79e274182c0d65
|
|
4
|
+
data.tar.gz: 1ae08825aa244ce203f35cba6294c1bac1390824
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 370663de69889b8fb7cc550f26296bc04a3c41d1822b2cb4d408286f4be2b25421a45c1c310234dce0f9f277b2ca96571f3156682cfe11980cc7f17f81ffd917
|
|
7
|
+
data.tar.gz: bc8a5650bfae70c66c3adcb76bc45bc4dc6f00b246d4ea009ae6d04dacdb38104c916cafcb41640632800f3d273efa381383ebf72343e0e962d11bdf03f67ab6
|
|
@@ -10,6 +10,10 @@ module Bearcat
|
|
|
10
10
|
post("/api/v1/accounts/#{account_id}/courses", params)
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
+
def update_course(course, params={})
|
|
14
|
+
put("/api/v1/courses/#{course}", params)
|
|
15
|
+
end
|
|
16
|
+
|
|
13
17
|
def list_course_users(course, params={})
|
|
14
18
|
get("/api/v1/courses/#{course}/users", params)
|
|
15
19
|
end
|
data/lib/bearcat/version.rb
CHANGED
|
@@ -21,6 +21,13 @@ describe Bearcat::Client::Sections do
|
|
|
21
21
|
course['id'].should == 1
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
+
it "updates a course" do
|
|
25
|
+
name = "updated course"
|
|
26
|
+
stub_put(@client, "/api/v1/courses/1").with(body: {"course" => {"name" => name}}).to_return(json_response("updated_course.json"))
|
|
27
|
+
course = @client.update_course(1, {"course[name]" => name})
|
|
28
|
+
course['name'].should == name
|
|
29
|
+
end
|
|
30
|
+
|
|
24
31
|
it "lists all of the students in a course" do
|
|
25
32
|
stub_get(@client, "/api/v1/courses/1/users?enrollment_type=student").to_return(json_response("course_students.json"))
|
|
26
33
|
students = @client.list_course_users(1, {"enrollment_type" => "student"})
|
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: 0.9.
|
|
4
|
+
version: 0.9.20
|
|
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: 2014-09-
|
|
11
|
+
date: 2014-09-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -193,6 +193,7 @@ files:
|
|
|
193
193
|
- spec/fixtures/update_outcome.json
|
|
194
194
|
- spec/fixtures/update_outcome_group.json
|
|
195
195
|
- spec/fixtures/update_section.json
|
|
196
|
+
- spec/fixtures/updated_course.json
|
|
196
197
|
- spec/fixtures/user_avatars.json
|
|
197
198
|
- spec/fixtures/user_enrollments.json
|
|
198
199
|
- spec/fixtures/user_page_views.json
|
|
@@ -302,6 +303,7 @@ test_files:
|
|
|
302
303
|
- spec/fixtures/update_outcome.json
|
|
303
304
|
- spec/fixtures/update_outcome_group.json
|
|
304
305
|
- spec/fixtures/update_section.json
|
|
306
|
+
- spec/fixtures/updated_course.json
|
|
305
307
|
- spec/fixtures/user_avatars.json
|
|
306
308
|
- spec/fixtures/user_enrollments.json
|
|
307
309
|
- spec/fixtures/user_page_views.json
|