bearcat 1.2.3 → 1.2.4

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: 08ab17b30ec1fa3db24c64668a94fc9cdccf90f5
4
- data.tar.gz: 70cbafee7010df96e15628f2f8a25e958b495ee8
3
+ metadata.gz: d2846b04fbc3a3759468651a7835928438dea7fb
4
+ data.tar.gz: 3be35f3374c9d94d14cf863079e439bce7155d04
5
5
  SHA512:
6
- metadata.gz: 18415bbb8bc41c7f3770103a22bf2db4d44bf643a837d9d77d872c29866fe06784f5f4c58bb3eb2d9152bb29f5c13555ca4514ff379dee3df1a92e136d3962f5
7
- data.tar.gz: b79f477e3bd04834f3009577d817c489247a79c64db49b49465e05e192f94e4a7cd339eb3297028641effd90e3cf2b6cb4c54b8ddac48a3701db3cc6b82264db
6
+ metadata.gz: e72c9d4842373cb51dd05593ce6713df345f6065c581668ea8b6b5b4cb6fed5ef28c8360654e4d4a0ac05fe0b4b9f69ac72ac2164304247ee91ac33f31745d9e
7
+ data.tar.gz: 5d6bcfea7d9d1858181902966d7d2e0552fe44e368e9f8227b4c144b86fa8ad59cbc0d3e9d81fce766ada59ff2556bf494d81dbb0a26be588f5227d88d53b780
@@ -6,6 +6,10 @@ module Bearcat
6
6
  get("/api/v1/courses/#{course.to_s}/groups")
7
7
  end
8
8
 
9
+ def account_groups(account_id)
10
+ get("/api/v1/accounts/#{account_id}/groups")
11
+ end
12
+
9
13
  end
10
14
  end
11
15
  end
@@ -1,3 +1,3 @@
1
1
  module Bearcat
2
- VERSION = '1.2.3' unless defined?(Bearcat::VERSION)
2
+ VERSION = '1.2.4' unless defined?(Bearcat::VERSION)
3
3
  end
@@ -13,4 +13,11 @@ describe Bearcat::Client::Groups do
13
13
  groups.last['id'].should == 4
14
14
  end
15
15
 
16
+ it "returns account groups" do
17
+ stub_get(@client, "/api/v1/accounts/1/groups").to_return(json_response("account_groups.json"))
18
+ groups = @client.account_groups(1)
19
+ groups.count.should == 2
20
+ groups.first['name'].should == '2010'
21
+ groups.last['id'].should == 3
22
+ end
16
23
  end
@@ -0,0 +1,42 @@
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
+ ]
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.3
4
+ version: 1.2.4
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-03-08 00:00:00.000000000 Z
11
+ date: 2016-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -169,6 +169,7 @@ files:
169
169
  - spec/fixtures/access_token.json
170
170
  - spec/fixtures/account_admins.json
171
171
  - spec/fixtures/account_courses.json
172
+ - spec/fixtures/account_groups.json
172
173
  - spec/fixtures/account_reports.json
173
174
  - spec/fixtures/account_reports_index.json
174
175
  - spec/fixtures/account_reports_result_success.json
@@ -275,7 +276,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
275
276
  version: '0'
276
277
  requirements: []
277
278
  rubyforge_project:
278
- rubygems_version: 2.4.5
279
+ rubygems_version: 2.4.8
279
280
  signing_key:
280
281
  specification_version: 4
281
282
  summary: Canvas API
@@ -312,6 +313,7 @@ test_files:
312
313
  - spec/fixtures/access_token.json
313
314
  - spec/fixtures/account_admins.json
314
315
  - spec/fixtures/account_courses.json
316
+ - spec/fixtures/account_groups.json
315
317
  - spec/fixtures/account_reports.json
316
318
  - spec/fixtures/account_reports_index.json
317
319
  - spec/fixtures/account_reports_result_success.json