bearcat 1.2.12 → 1.2.13

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: 73f5fc1d776a4b85e6a742cce69b48b381a10219
4
- data.tar.gz: 1ca1b49c5e01a2012142f4f3b9bcb5ec74b33a83
3
+ metadata.gz: cecd449bbde0aee78b3aff9f809a73789598d2c1
4
+ data.tar.gz: 8dbc536c5a732deccbe9f5b3b355e97f92da9f50
5
5
  SHA512:
6
- metadata.gz: 1a5668f707972ab185f417b15835a1b7eb3af2b83461838cafb2f58172175815be6029cd00b2e1816ce8037dddfaf06232f954aa29c294b6bfd7411533b5481e
7
- data.tar.gz: 69c4af329df6b2da3c9e448b783316cdf3e7b1f5d8542360a1f0344fd5bc14765cb688c17a4ebd4b9bb24b991d86cabb71f02b45e848d4d13bdce42d7dd4fdfa
6
+ metadata.gz: 11317f4044fb795976c56190eb74af1b5d28a675745822b5f7bbac2ef9256798df395b421a1c2bae3d30a20a6a97a35c7c49c7b1db1c118c0ff7ea054ff5e1f0
7
+ data.tar.gz: 636050ce0b7518f855d79b87c3b2ad1919947763c751d8e0e576c07a6f01ea54b823f2cb7d752a12b85a7ab10cea88def23723e5775884900c9a7ed3c05af304
@@ -10,6 +10,10 @@ module Bearcat
10
10
  get("/api/v1/accounts/#{account_id}/groups")
11
11
  end
12
12
 
13
+ def category_groups(group_category_id)
14
+ get("/api/v1/group_categories/#{group_category_id}/groups")
15
+ end
16
+
13
17
  def group(id)
14
18
  get("/api/v1/groups/#{id}")
15
19
  end
@@ -1,3 +1,3 @@
1
1
  module Bearcat
2
- VERSION = '1.2.12' unless defined?(Bearcat::VERSION)
2
+ VERSION = '1.2.13' unless defined?(Bearcat::VERSION)
3
3
  end
@@ -21,6 +21,14 @@ describe Bearcat::Client::Groups do
21
21
  groups.last['id'].should == 3
22
22
  end
23
23
 
24
+ it "returns group category groups" do
25
+ stub_get(@client, "/api/v1/group_categories/1/groups").to_return(json_response("group_category_groups.json"))
26
+ groups = @client.category_groups(1)
27
+ groups.count.should == 1
28
+ groups.first['name'].should == 'test group in category'
29
+ groups.first['id'].should == 94
30
+ end
31
+
24
32
  it "returns a single group" do
25
33
  stub_get(@client, "/api/v1/groups/3").to_return(json_response("group.json"))
26
34
  group = @client.group(3)
@@ -0,0 +1,20 @@
1
+ [
2
+ {
3
+ "id": 94,
4
+ "name": "test group in category",
5
+ "max_membership": null,
6
+ "is_public": false,
7
+ "join_level": "invitation_only",
8
+ "group_category_id": 12,
9
+ "description": "A clone of a section with the same name",
10
+ "members_count": 13,
11
+ "storage_quota_mb": 50,
12
+ "context_type": "Course",
13
+ "course_id": 14,
14
+ "avatar_url": null,
15
+ "role": null,
16
+ "leader": null,
17
+ "has_submission": false,
18
+ "concluded": false
19
+ }
20
+ ]
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.2.12
4
+ version: 1.2.13
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: 2016-08-15 00:00:00.000000000 Z
11
+ date: 2016-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -173,7 +173,6 @@ files:
173
173
  - spec/fixtures/account_admins.json
174
174
  - spec/fixtures/account_courses.json
175
175
  - spec/fixtures/account_grading_standards.json
176
- - spec/fixtures/account_groups.json
177
176
  - spec/fixtures/account_reports.json
178
177
  - spec/fixtures/account_reports_index.json
179
178
  - spec/fixtures/account_reports_result_success.json
@@ -232,6 +231,7 @@ files:
232
231
  - spec/fixtures/group.json
233
232
  - spec/fixtures/group_categories.json
234
233
  - spec/fixtures/group_category.json
234
+ - spec/fixtures/group_category_groups.json
235
235
  - spec/fixtures/group_conferences.json
236
236
  - spec/fixtures/link_unlink_outcome.json
237
237
  - spec/fixtures/merge_user.json
@@ -290,7 +290,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
290
290
  version: '0'
291
291
  requirements: []
292
292
  rubyforge_project:
293
- rubygems_version: 2.4.8
293
+ rubygems_version: 2.4.5
294
294
  signing_key:
295
295
  specification_version: 4
296
296
  summary: Canvas API
@@ -330,7 +330,6 @@ test_files:
330
330
  - spec/fixtures/account_admins.json
331
331
  - spec/fixtures/account_courses.json
332
332
  - spec/fixtures/account_grading_standards.json
333
- - spec/fixtures/account_groups.json
334
333
  - spec/fixtures/account_reports.json
335
334
  - spec/fixtures/account_reports_index.json
336
335
  - spec/fixtures/account_reports_result_success.json
@@ -389,6 +388,7 @@ test_files:
389
388
  - spec/fixtures/group.json
390
389
  - spec/fixtures/group_categories.json
391
390
  - spec/fixtures/group_category.json
391
+ - spec/fixtures/group_category_groups.json
392
392
  - spec/fixtures/group_conferences.json
393
393
  - spec/fixtures/link_unlink_outcome.json
394
394
  - spec/fixtures/merge_user.json
@@ -1,42 +0,0 @@
1
- [
2
- {
3
- "id":2,
4
- "name":"2010",
5
- "max_membership":null,
6
- "is_public":false,
7
- "join_level":"invitation_only",
8
- "group_category_id":2,
9
- "description":null,
10
- "members_count":0,
11
- "storage_quota_mb":50,
12
- "context_type":"Account",
13
- "account_id":1,
14
- "avatar_url":null,
15
- "role":null,
16
- "leader":null,
17
- "sis_group_id":null,
18
- "sis_import_id":null,
19
- "has_submission":false,
20
- "concluded":false
21
- },
22
- {
23
- "id":3,
24
- "name":"2014",
25
- "max_membership":null,
26
- "is_public":false,
27
- "join_level":"invitation_only",
28
- "group_category_id":3,
29
- "description":null,
30
- "members_count":2,
31
- "storage_quota_mb":50,
32
- "context_type":"Account",
33
- "account_id":1,
34
- "avatar_url":null,
35
- "role":null,
36
- "leader":null,
37
- "sis_group_id":null,
38
- "sis_import_id":null,
39
- "has_submission":false,
40
- "concluded":false
41
- }
42
- ]