bearcat 1.0.16 → 1.0.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 +4 -4
- data/lib/bearcat/client/users.rb +4 -0
- data/lib/bearcat/version.rb +1 -1
- data/spec/bearcat/client/users_spec.rb +7 -0
- data/spec/fixtures/communication_channels.json +10 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 264261840156e52258e826010cd968481e370486
|
|
4
|
+
data.tar.gz: 918f478058b23d8cf89040c0d8227dd31c4430c7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 85b2b222d57db38db87f1f59cb1f156b4f6e71e4f40edc5dfa00853af9bc90bfd4122ffbb6882bc63c644486646ee263c72083e2fd064444b32df769717a654a
|
|
7
|
+
data.tar.gz: dbaa177bdad6a2761e299fb5da7c7b80e16de9570d83fa465cc73fc4dd62ede48074ddbbf5752e8ca1643c3125049571f3849528d0e00172be9ffd918d905dc6
|
data/lib/bearcat/client/users.rb
CHANGED
|
@@ -22,6 +22,10 @@ module Bearcat
|
|
|
22
22
|
get("/api/v1/users/#{user.to_s}/logins")
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
+
def communication_channels(user)
|
|
26
|
+
get("/api/v1/users/#{user.to_s}/communication_channels")
|
|
27
|
+
end
|
|
28
|
+
|
|
25
29
|
# scope: food
|
|
26
30
|
# params: {ns: 'com.account-domain.canvas-app'}
|
|
27
31
|
# returns all custom user food scope data. If no scope returns all custom user data
|
data/lib/bearcat/version.rb
CHANGED
|
@@ -55,6 +55,13 @@ describe Bearcat::Client::Users do
|
|
|
55
55
|
'real_user'=>nil, 'account'=>1}
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
+
it 'returns communication channels for user' do
|
|
59
|
+
stub_get(@client, "/api/v1/users/1/communication_channels").to_return(json_response("communication_channels.json"))
|
|
60
|
+
com_channels = @client.communication_channels(1)
|
|
61
|
+
com_channels.members.count.should == 1
|
|
62
|
+
com_channels.members.first['address'].should == 'brandonbr@instructure.com'
|
|
63
|
+
end
|
|
64
|
+
|
|
58
65
|
describe 'user custom data' do
|
|
59
66
|
before (:each) do
|
|
60
67
|
@query = {"ns" => "com.test.app"}
|
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.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: 2015-05-
|
|
11
|
+
date: 2015-05-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -176,6 +176,7 @@ files:
|
|
|
176
176
|
- spec/fixtures/canvas_files/declare_file.json
|
|
177
177
|
- spec/fixtures/canvas_files/upload_success.json
|
|
178
178
|
- spec/fixtures/cc.imscc
|
|
179
|
+
- spec/fixtures/communication_channels.json
|
|
179
180
|
- spec/fixtures/conclude_enrollment.json
|
|
180
181
|
- spec/fixtures/content_migration_files/response.json
|
|
181
182
|
- spec/fixtures/content_migration_files/upload_success.json
|
|
@@ -302,6 +303,7 @@ test_files:
|
|
|
302
303
|
- spec/fixtures/canvas_files/declare_file.json
|
|
303
304
|
- spec/fixtures/canvas_files/upload_success.json
|
|
304
305
|
- spec/fixtures/cc.imscc
|
|
306
|
+
- spec/fixtures/communication_channels.json
|
|
305
307
|
- spec/fixtures/conclude_enrollment.json
|
|
306
308
|
- spec/fixtures/content_migration_files/response.json
|
|
307
309
|
- spec/fixtures/content_migration_files/upload_success.json
|