bearcat 1.0.20 → 1.0.21
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07ee26b5b5644db55d1411270eee4fa65c72b7ec
|
4
|
+
data.tar.gz: 252d35246ec76da5b18d686d4b8b6e446d8be779
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c981f0dc5d187addef5f2f00a9019536808eba977c4dc1225a674d073529ebd7922ed815c7b2eed4706d59b097631a5d87950c54c3cc0059fb8461fc350706f8
|
7
|
+
data.tar.gz: ac6a668f73aab8ee4188d40b5eebe21fd9b920f0c38df4f4862caccc85c8104afdb7a161e9c08d175526052ea553fb4280d6c6ac4a84c58180ad6791551739b4
|
data/lib/bearcat/client.rb
CHANGED
@@ -11,6 +11,7 @@ module Bearcat
|
|
11
11
|
require 'bearcat/client/sections'
|
12
12
|
require 'bearcat/client/o_auth2'
|
13
13
|
require 'bearcat/client/groups'
|
14
|
+
require 'bearcat/client/group_categories'
|
14
15
|
require 'bearcat/client/group_memberships'
|
15
16
|
require 'bearcat/client/conferences'
|
16
17
|
require 'bearcat/client/users'
|
@@ -37,6 +38,7 @@ module Bearcat
|
|
37
38
|
include Sections
|
38
39
|
include OAuth2
|
39
40
|
include Groups
|
41
|
+
include GroupCategories
|
40
42
|
include GroupMemberships
|
41
43
|
include Conferences
|
42
44
|
include Users
|
data/lib/bearcat/client/users.rb
CHANGED
data/lib/bearcat/version.rb
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
describe Bearcat::Client::GroupCategories do
|
4
|
+
before do
|
5
|
+
@client = Bearcat::Client.new(prefix: "http://canvas.instructure.com", token: "test_token")
|
6
|
+
end
|
7
|
+
|
8
|
+
it "returns group categories" do
|
9
|
+
stub_get(@client, "/api/v1/courses/1809/group_categories").to_return(json_response("group_categories.json"))
|
10
|
+
categories = @client.list_group_categories('courses', 1809)
|
11
|
+
categories.count.should == 2
|
12
|
+
categories.first['name'].should == 'mark red'
|
13
|
+
categories.last['name'].should == 'test group'
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"auto_leader": "first",
|
4
|
+
"group_limit": null,
|
5
|
+
"id": 5,
|
6
|
+
"name": "mark red",
|
7
|
+
"role": null,
|
8
|
+
"self_signup": null,
|
9
|
+
"context_type": "Course",
|
10
|
+
"course_id": 1809,
|
11
|
+
"protected": false,
|
12
|
+
"allows_multiple_memberships": false,
|
13
|
+
"is_member": false
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"auto_leader": null,
|
17
|
+
"group_limit": null,
|
18
|
+
"id": 4,
|
19
|
+
"name": "test group",
|
20
|
+
"role": null,
|
21
|
+
"self_signup": null,
|
22
|
+
"context_type": "Course",
|
23
|
+
"course_id": 1809,
|
24
|
+
"protected": false,
|
25
|
+
"allows_multiple_memberships": false,
|
26
|
+
"is_member": false
|
27
|
+
}
|
28
|
+
]
|
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.
|
4
|
+
version: 1.0.21
|
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-07-
|
11
|
+
date: 2015-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -119,6 +119,7 @@ files:
|
|
119
119
|
- lib/bearcat/client/enrollments.rb
|
120
120
|
- lib/bearcat/client/file_helper.rb
|
121
121
|
- lib/bearcat/client/files.rb
|
122
|
+
- lib/bearcat/client/group_categories.rb
|
122
123
|
- lib/bearcat/client/group_memberships.rb
|
123
124
|
- lib/bearcat/client/groups.rb
|
124
125
|
- lib/bearcat/client/modules.rb
|
@@ -144,6 +145,7 @@ files:
|
|
144
145
|
- spec/bearcat/client/discussions_spec.rb
|
145
146
|
- spec/bearcat/client/enrollments_spec.rb
|
146
147
|
- spec/bearcat/client/files_spec.rb
|
148
|
+
- spec/bearcat/client/group_categories_spec.rb
|
147
149
|
- spec/bearcat/client/groups_spec.rb
|
148
150
|
- spec/bearcat/client/modules_spec.rb
|
149
151
|
- spec/bearcat/client/o_auth2_spec.rb
|
@@ -203,6 +205,7 @@ files:
|
|
203
205
|
- spec/fixtures/deleted_conversation.json
|
204
206
|
- spec/fixtures/enroll_student.json
|
205
207
|
- spec/fixtures/enrollment_terms.json
|
208
|
+
- spec/fixtures/group_categories.json
|
206
209
|
- spec/fixtures/group_conferences.json
|
207
210
|
- spec/fixtures/link_unlink_outcome.json
|
208
211
|
- spec/fixtures/module_item_sequence.json
|
@@ -273,6 +276,7 @@ test_files:
|
|
273
276
|
- spec/bearcat/client/discussions_spec.rb
|
274
277
|
- spec/bearcat/client/enrollments_spec.rb
|
275
278
|
- spec/bearcat/client/files_spec.rb
|
279
|
+
- spec/bearcat/client/group_categories_spec.rb
|
276
280
|
- spec/bearcat/client/groups_spec.rb
|
277
281
|
- spec/bearcat/client/modules_spec.rb
|
278
282
|
- spec/bearcat/client/o_auth2_spec.rb
|
@@ -332,6 +336,7 @@ test_files:
|
|
332
336
|
- spec/fixtures/deleted_conversation.json
|
333
337
|
- spec/fixtures/enroll_student.json
|
334
338
|
- spec/fixtures/enrollment_terms.json
|
339
|
+
- spec/fixtures/group_categories.json
|
335
340
|
- spec/fixtures/group_conferences.json
|
336
341
|
- spec/fixtures/link_unlink_outcome.json
|
337
342
|
- spec/fixtures/module_item_sequence.json
|
@@ -367,4 +372,3 @@ test_files:
|
|
367
372
|
- spec/fixtures/user_page_views.json
|
368
373
|
- spec/fixtures/user_profile.json
|
369
374
|
- spec/helper.rb
|
370
|
-
has_rdoc:
|