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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0d829191bf6ddaa196f493fe2d919f47a8f6e43a
4
- data.tar.gz: 0f604717a3b5afa1a868dcdebf430675dd44fa1d
3
+ metadata.gz: 264261840156e52258e826010cd968481e370486
4
+ data.tar.gz: 918f478058b23d8cf89040c0d8227dd31c4430c7
5
5
  SHA512:
6
- metadata.gz: 5408023839d39f64a5895d3575f2299a2ee46d4e51c86087f6b521d4b4e69d1205732799701fa216200f83c7d3ea979cd71dc4bfd92b912c93ca48478b2485e1
7
- data.tar.gz: 6085b3a29a40d24d52e5da5469101bb978d606b9ea1edd44a1656306597aa2cf5eb778f0e5d01dfed6a82ebd13e4cd22d45b779926adab957c7da1560a24fc1e
6
+ metadata.gz: 85b2b222d57db38db87f1f59cb1f156b4f6e71e4f40edc5dfa00853af9bc90bfd4122ffbb6882bc63c644486646ee263c72083e2fd064444b32df769717a654a
7
+ data.tar.gz: dbaa177bdad6a2761e299fb5da7c7b80e16de9570d83fa465cc73fc4dd62ede48074ddbbf5752e8ca1643c3125049571f3849528d0e00172be9ffd918d905dc6
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Bearcat
2
- VERSION = '1.0.16' unless defined?(Bearcat::VERSION)
2
+ VERSION = '1.0.17' unless defined?(Bearcat::VERSION)
3
3
  end
@@ -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"}
@@ -0,0 +1,10 @@
1
+ [
2
+ {
3
+ "id": 1,
4
+ "position": 1,
5
+ "user_id": 1,
6
+ "workflow_state": "active",
7
+ "address": "brandonbr@instructure.com",
8
+ "type": "email"
9
+ }
10
+ ]
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.16
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-20 00:00:00.000000000 Z
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