bearcat 1.3.18 → 1.3.19

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: dade0838963ba54a089f6efb66af7a1b35b1c0d1
4
- data.tar.gz: 8ec6382f3142df575338e76e81625fd54b1f5054
3
+ metadata.gz: 7e219bc570a9199d353523b15a11e3d67c7763ab
4
+ data.tar.gz: 67ff7b8cee59f23d5b26d96f67e9a90b4f6075b3
5
5
  SHA512:
6
- metadata.gz: 290f5f0d84710573d7edf2ecce2b8a47c21d6630a761181fe792284cf8677789ab0f3c959fc419b0ddb290253399dd481ea3d990b897a6f10a925d7be45f042b
7
- data.tar.gz: 1f69900082c5fe0fd07a44e30786c68bba8f665cdf971b4d27ee0881160e103201d636570befd24707e6a20f3369cc3f9cca5d0a473f93a871baadb7cd1ac5f6
6
+ metadata.gz: 5ca760c1a9675b4e2d3680b9b3745bde4ff857bca914926d6ab072a94c3968df6d6403c7c29905170546986d1ef8ef6b628933b2406f7311c6b0861ad92e5fde
7
+ data.tar.gz: eb0823b7f22e7be129b0ec3c2190bfd6c152870ac72b493d69007278551790fb124b6d90f073e96abe1f40b45ffbbb2a102407d6c29348a303ab33215a6a8737
@@ -14,6 +14,10 @@ module Bearcat
14
14
  post("/api/v1/accounts/#{account.to_s}/users", params)
15
15
  end
16
16
 
17
+ def user_detail(user, params={})
18
+ get("/api/v1/users/#{user.to_s}", params)
19
+ end
20
+
17
21
  def user_profile(user, params={})
18
22
  get("/api/v1/users/#{user.to_s}/profile", params)
19
23
  end
@@ -1,3 +1,3 @@
1
1
  module Bearcat
2
- VERSION = '1.3.18' unless defined?(Bearcat::VERSION)
2
+ VERSION = '1.3.19' unless defined?(Bearcat::VERSION)
3
3
  end
@@ -31,6 +31,13 @@ describe Bearcat::Client::Users do
31
31
  user_avatars.first['type'].should == 'gravatar'
32
32
  end
33
33
 
34
+ it "returns the user details" do
35
+ stub_get(@client, "/api/v1/users/1").to_return(json_response("user_details.json"))
36
+ user_detail = @client.user_detail(1)
37
+ user_detail["id"].should == 1
38
+ user_detail["name"].should == "testuser@instructure.com"
39
+ end
40
+
34
41
  it "returns a users profile" do
35
42
  stub_get(@client, "/api/v1/users/1/profile").to_return(json_response("user_profile.json"))
36
43
  user_profile = @client.user_profile(1)
@@ -0,0 +1,16 @@
1
+ {
2
+ "id": 1,
3
+ "name": "testuser@instructure.com",
4
+ "sortable_name": "testuser@instructure.com",
5
+ "short_name": "testuser@instructure.com",
6
+ "sis_user_id": "testuser",
7
+ "integration_id": "",
8
+ "sis_login_id": "testuser@instructure.com",
9
+ "sis_import_id": "",
10
+ "login_id": "testuser@instructure.com",
11
+ "locale": "",
12
+ "permissions": {
13
+ "can_update_name": true,
14
+ "can_update_avatar": false
15
+ }
16
+ }
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.18
4
+ version: 1.3.19
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-09-25 00:00:00.000000000 Z
11
+ date: 2017-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -294,6 +294,7 @@ files:
294
294
  - spec/fixtures/update_section.json
295
295
  - spec/fixtures/updated_course.json
296
296
  - spec/fixtures/user_avatars.json
297
+ - spec/fixtures/user_details.json
297
298
  - spec/fixtures/user_enrollments.json
298
299
  - spec/fixtures/user_logins.json
299
300
  - spec/fixtures/user_page_views.json
@@ -318,7 +319,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
318
319
  version: '0'
319
320
  requirements: []
320
321
  rubyforge_project:
321
- rubygems_version: 2.4.8
322
+ rubygems_version: 2.6.13
322
323
  signing_key:
323
324
  specification_version: 4
324
325
  summary: Canvas API
@@ -477,6 +478,7 @@ test_files:
477
478
  - spec/fixtures/update_section.json
478
479
  - spec/fixtures/updated_course.json
479
480
  - spec/fixtures/user_avatars.json
481
+ - spec/fixtures/user_details.json
480
482
  - spec/fixtures/user_enrollments.json
481
483
  - spec/fixtures/user_logins.json
482
484
  - spec/fixtures/user_page_views.json