bearcat 1.2.16 → 1.2.17

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: a735cca4046245a8ff2941513e3b59a28c69e9bd
4
- data.tar.gz: 6669f6cc25124370b761c55333c770596492b757
3
+ metadata.gz: 22801f2b7cc09ae175e9d8725062e5663b274fc1
4
+ data.tar.gz: 0574d5b028c1bbfa43a9c82db1c7be94ca340c3a
5
5
  SHA512:
6
- metadata.gz: 77ac5d5691916492b6a27dc2765bb90de21d2884562da58b301fb892127ea4dcfbce0af66d5cb3ea2479e927a2521171bc39d05990eb68293c9938883d424a7c
7
- data.tar.gz: 3cf804c76c228b94b63a94c5a6585b1ae8ee5490b078a9a3a21cccdd0b8f787369c4e126ff0729d5e35cc52ccafc14f2c8fe4865534c0b82d96db640270c968d
6
+ metadata.gz: 791645339faffb2ba329b5f6361d7c7c7759681bf09318dc05915254a5217584bf63a5726a2abd979b2b10ac355482b67c1330d052910ae23cd1d1727768f1c9
7
+ data.tar.gz: 1e1187283ccdf1f2cdc7d7fa1415304b51ac23af7e8989296388c8ae834fc4210e99945e2e5748bf190ea326b2a0095f41cee48bdb63b459007e854d8375e305
@@ -25,6 +25,10 @@ module Bearcat
25
25
  def edit_group(group_id, params={})
26
26
  put("/api/v1/groups/#{group_id}", params)
27
27
  end
28
+
29
+ def delete_group(group_id)
30
+ delete("/api/v1/groups/#{group_id}")
31
+ end
28
32
  end
29
33
  end
30
34
  end
@@ -1,3 +1,3 @@
1
1
  module Bearcat
2
- VERSION = '1.2.16' unless defined?(Bearcat::VERSION)
2
+ VERSION = '1.2.17' unless defined?(Bearcat::VERSION)
3
3
  end
@@ -53,4 +53,10 @@ describe Bearcat::Client::Groups do
53
53
  edited_group['name'] == name
54
54
  edited_group['description'] == description
55
55
  end
56
+
57
+ it 'deleted a group' do
58
+ stub_delete(@client, "/api/v1/groups/7").to_return(json_response("deleted_group.json"))
59
+ deleted_group = @client.delete_group(7)
60
+ deleted_group['id'] == 7
61
+ end
56
62
  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
+ ]
@@ -0,0 +1,37 @@
1
+ {
2
+ "id": 7,
3
+ "name": "created group 1",
4
+ "max_membership": null,
5
+ "is_public": false,
6
+ "join_level": "invitation_only",
7
+ "group_category_id": 2,
8
+ "description": null,
9
+ "members_count": 0,
10
+ "storage_quota_mb": 50,
11
+ "permissions": {
12
+ "create_discussion_topic": true,
13
+ "join": false,
14
+ "create_announcement": true
15
+ },
16
+ "context_type": "Course",
17
+ "course_id": 14,
18
+ "avatar_url": null,
19
+ "role": null,
20
+ "leader": null,
21
+ "users": [],
22
+ "group_category": {
23
+ "id": 2,
24
+ "name": "Group Category!!!!!",
25
+ "role": null,
26
+ "self_signup": null,
27
+ "group_limit": null,
28
+ "auto_leader": null,
29
+ "context_type": "Course",
30
+ "course_id": 14,
31
+ "protected": false,
32
+ "allows_multiple_memberships": false,
33
+ "is_member": false
34
+ },
35
+ "has_submission": false,
36
+ "concluded": false
37
+ }
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.16
4
+ version: 1.2.17
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-09-02 00:00:00.000000000 Z
11
+ date: 2016-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -173,6 +173,7 @@ 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
176
177
  - spec/fixtures/account_reports.json
177
178
  - spec/fixtures/account_reports_index.json
178
179
  - spec/fixtures/account_reports_result_success.json
@@ -223,6 +224,7 @@ files:
223
224
  - spec/fixtures/delete_custom_data_scope.json
224
225
  - spec/fixtures/delete_section.json
225
226
  - spec/fixtures/deleted_conversation.json
227
+ - spec/fixtures/deleted_group.json
226
228
  - spec/fixtures/department_level_participation.json
227
229
  - spec/fixtures/department_level_statistics.json
228
230
  - spec/fixtures/discussion_entries.json
@@ -295,7 +297,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
295
297
  version: '0'
296
298
  requirements: []
297
299
  rubyforge_project:
298
- rubygems_version: 2.4.5
300
+ rubygems_version: 2.4.8
299
301
  signing_key:
300
302
  specification_version: 4
301
303
  summary: Canvas API
@@ -335,6 +337,7 @@ test_files:
335
337
  - spec/fixtures/account_admins.json
336
338
  - spec/fixtures/account_courses.json
337
339
  - spec/fixtures/account_grading_standards.json
340
+ - spec/fixtures/account_groups.json
338
341
  - spec/fixtures/account_reports.json
339
342
  - spec/fixtures/account_reports_index.json
340
343
  - spec/fixtures/account_reports_result_success.json
@@ -385,6 +388,7 @@ test_files:
385
388
  - spec/fixtures/delete_custom_data_scope.json
386
389
  - spec/fixtures/delete_section.json
387
390
  - spec/fixtures/deleted_conversation.json
391
+ - spec/fixtures/deleted_group.json
388
392
  - spec/fixtures/department_level_participation.json
389
393
  - spec/fixtures/department_level_statistics.json
390
394
  - spec/fixtures/discussion_entries.json