bearcat 1.3.11 → 1.3.12

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: 867a8c613b078d0b370d683d195f09f9664771e3
4
- data.tar.gz: 6b3dcbf10b3d5af0086080adb1a06659c9e6a7d2
3
+ metadata.gz: b5b5f7a9d11d99b46ef1b1965c3b6afd82431522
4
+ data.tar.gz: fd23d4e219b7e0d4e63a80f693c499e15e3db0de
5
5
  SHA512:
6
- metadata.gz: 9e0c02e8102651d70fdc2f514178e3f93646b37c32487b3e701e8a54178ffb55a5f0feb9d5f1b622377d5d235a95093e0dc9d6db3977ffd090e96044074aaad8
7
- data.tar.gz: 0637013e221c6655a499db41df3b31235d604b281acf56b7e4b87e4b97d58aaa6a4b4b60dd3b6ae2a405df9c54cb67233445d0a294472a710c0f97809cbdae4f
6
+ metadata.gz: 0b7f07d44fd47770f1d5fd058c1f6446294e850b82ddc3c08cec85c8232eceb731ec7dc950b99977d730cd161e82262fdd00110928985bb2e89b2a12107f68f1
7
+ data.tar.gz: a5c8ed68c528143779983985dab5e05b5ed751566415e33ca18ac5408ab74970aff95640e91348f48bb98c8707f38b40f48dcdc20521a1139f509ddc42d7ee44
@@ -2,6 +2,10 @@ module Bearcat
2
2
  class Client < Footrest::Client
3
3
  module GroupMemberships
4
4
 
5
+ def group_membership(group, group_membership)
6
+ get("/api/v1/groups/#{group}/memberships/#{group_membership}")
7
+ end
8
+
5
9
  def list_group_memberships(group)
6
10
  get("/api/v1/groups/#{group.to_s}/memberships")
7
11
  end
@@ -15,4 +19,4 @@ module Bearcat
15
19
  end
16
20
  end
17
21
  end
18
- end
22
+ end
@@ -1,3 +1,3 @@
1
1
  module Bearcat
2
- VERSION = '1.3.11' unless defined?(Bearcat::VERSION)
2
+ VERSION = '1.3.12' unless defined?(Bearcat::VERSION)
3
3
  end
@@ -0,0 +1,14 @@
1
+ require 'helper'
2
+
3
+ describe Bearcat::Client::GroupMemberships do
4
+ before do
5
+ @client = Bearcat::Client.new(prefix: "http://canvas.instructure.com", token: "test_token")
6
+ end
7
+
8
+ it 'gets a single group membership' do
9
+ stub_get(@client, "/api/v1/groups/1/memberships/1").to_return(json_response('group_membership.json'))
10
+ group_membership = @client.group_membership(1, 1)
11
+ group_membership['user_id'].should == 26906
12
+ end
13
+
14
+ end
@@ -0,0 +1,7 @@
1
+ {
2
+ "id": 3799,
3
+ "group_id": 428,
4
+ "workflow_state": "accepted",
5
+ "user_id": 26906,
6
+ "moderator": false
7
+ }
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.3.11
4
+ version: 1.3.12
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: 2017-03-11 00:00:00.000000000 Z
11
+ date: 2017-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -158,6 +158,7 @@ files:
158
158
  - spec/bearcat/client/files_spec.rb
159
159
  - spec/bearcat/client/folders_spec.rb
160
160
  - spec/bearcat/client/group_categories_spec.rb
161
+ - spec/bearcat/client/group_membership_spec.rb
161
162
  - spec/bearcat/client/groups_spec.rb
162
163
  - spec/bearcat/client/module_items_spec.rb
163
164
  - spec/bearcat/client/modules_spec.rb
@@ -255,6 +256,7 @@ files:
255
256
  - spec/fixtures/group_category.json
256
257
  - spec/fixtures/group_category_groups.json
257
258
  - spec/fixtures/group_conferences.json
259
+ - spec/fixtures/group_membership.json
258
260
  - spec/fixtures/link_unlink_outcome.json
259
261
  - spec/fixtures/merge_user.json
260
262
  - spec/fixtures/module_item_sequence.json
@@ -314,7 +316,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
314
316
  version: '0'
315
317
  requirements: []
316
318
  rubyforge_project:
317
- rubygems_version: 2.4.5.1
319
+ rubygems_version: 2.4.8
318
320
  signing_key:
319
321
  specification_version: 4
320
322
  summary: Canvas API
@@ -337,6 +339,7 @@ test_files:
337
339
  - spec/bearcat/client/files_spec.rb
338
340
  - spec/bearcat/client/folders_spec.rb
339
341
  - spec/bearcat/client/group_categories_spec.rb
342
+ - spec/bearcat/client/group_membership_spec.rb
340
343
  - spec/bearcat/client/groups_spec.rb
341
344
  - spec/bearcat/client/module_items_spec.rb
342
345
  - spec/bearcat/client/modules_spec.rb
@@ -434,6 +437,7 @@ test_files:
434
437
  - spec/fixtures/group_category.json
435
438
  - spec/fixtures/group_category_groups.json
436
439
  - spec/fixtures/group_conferences.json
440
+ - spec/fixtures/group_membership.json
437
441
  - spec/fixtures/link_unlink_outcome.json
438
442
  - spec/fixtures/merge_user.json
439
443
  - spec/fixtures/module_item_sequence.json
@@ -474,4 +478,3 @@ test_files:
474
478
  - spec/fixtures/user_page_views.json
475
479
  - spec/fixtures/user_profile.json
476
480
  - spec/helper.rb
477
- has_rdoc: