bearcat 0.9.6 → 0.9.7

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Y2FlZmQxM2UwY2JjZTMzMWU5Y2Y1NDI3ZjY2YTc4Y2I0MWVmZTI2YQ==
4
+ Njk3NWEyZjNjOWU0MjdkZmMwYjBkNWIxNzkwNDg2MDFmNjk5MDgxZg==
5
5
  data.tar.gz: !binary |-
6
- OWNmYTBiYjljMzM2YzVlN2E4NjMzMDUxZDAxZDFjMDVlYmM3YjViYg==
6
+ NDBiN2YwNDc3Njc0NDBiODhlNjcyZTk4YTQ1NzEzYWQyNjgxZTY1OQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ODU2ODM1Yjc4ZTU0MmZhYjE2ZWIyOTNjYzhkNGEwYjljN2ViNzkwYjA1YTNh
10
- N2U2NDJlN2VjNDdiODBhNDg5M2IyZDUxYzU5MzY3MDQ3MzcxOGZmZjdiZjQ5
11
- MjYxYThiY2Q0NmQwMTA4OGJkYzA2OTdlZTllMzE0ZDkwMTk3NWY=
9
+ ODExY2NlNGU0Yjk2MmE5Y2FiZTVmYWMyMzdkYjA4NzIxNTYxZTgxMTg1Zjhj
10
+ MGUxNDgxNTgxYmE3NjQwOWFkMzQ3OTU0MDRlNDQwMDQyZDM4NGQyMjg4MGRh
11
+ YmVkZDU3MmNmNzc1N2YyZjk1NTU3OTAwMDljYjk4OWYwMDAyM2M=
12
12
  data.tar.gz: !binary |-
13
- MWIxNGU1MmNhMGI3NjIyNmM5MDM4NTdiMWYzYjYxN2ViNjJjOWZkM2MwYWEx
14
- YWQ4MWE1YzhhNWU3MDhlNjNmMzU1ZGRlZmU4ZjE4YmQ2NzM1NzllZDRhMzdm
15
- MjQzNDFkNDMyODg0ZTdhNmM2OTAzM2ZiNjk1OTBmMjlmOWYxNTc=
13
+ MmZkNDdhZGU3MzMxNzZmYmFlNWY5MGYxZTBkMGE5YjlkZTk5Nzg4ZmQwNTk1
14
+ YzM4YTE0ZmZlMzgwNzEzNzg0MjMzNGZhMWQ4YWY5ODExYjA4YWViNTAxYTFi
15
+ OGZhMjA1MTA1NjA3OWI1YTJmMjRhMTU0OWJiYTEyMjRhOGIwMDk=
@@ -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_profile(user)
18
+ get("/api/v1/users/#{user.to_s}/profile")
19
+ end
20
+
17
21
  # scope: food
18
22
  # params: {ns: 'com.account-domain.canvas-app'}
19
23
  # 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 = '0.9.6' unless defined?(Bearcat::VERSION)
2
+ VERSION = '0.9.7' 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 a users profile" do
35
+ stub_get(@client, "/api/v1/users/1/profile").to_return(json_response("user_profile.json"))
36
+ user_profile = @client.user_profile(1)
37
+ user_profile["id"].should == 1
38
+ user_profile["time_zone"].should == "America/Denver"
39
+ end
40
+
34
41
  describe 'user custom data' do
35
42
  before (:each) do
36
43
  @query = {"ns" => "com.test.app"}
@@ -0,0 +1,15 @@
1
+ {
2
+ "id": 1,
3
+ "name": "test user",
4
+ "short_name": "test user",
5
+ "sortable_name": "user, test",
6
+ "login_id": "testuser@example.com",
7
+ "avatar_url": "http://localhost:3000/images/thumbnails/1/mBD6J4naPCw2eAwfVEgZM1HzUSELnkednRPdw7MM",
8
+ "title": null,
9
+ "bio": null,
10
+ "primary_email": "testuser@example.com",
11
+ "time_zone": "America/Denver",
12
+ "calendar": {
13
+ "ics": "http://localhost:3000/feeds/calendars/user_KprS56U315nwS9tky4ojbodAk7BoCAb6DdlVC4lh.ics"
14
+ }
15
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bearcat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.6
4
+ version: 0.9.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Mills, Jake Sorce
@@ -180,6 +180,7 @@ files:
180
180
  - spec/fixtures/update_section.json
181
181
  - spec/fixtures/user_avatars.json
182
182
  - spec/fixtures/user_enrollments.json
183
+ - spec/fixtures/user_profile.json
183
184
  - spec/helper.rb
184
185
  homepage:
185
186
  licenses: []
@@ -264,5 +265,6 @@ test_files:
264
265
  - spec/fixtures/update_section.json
265
266
  - spec/fixtures/user_avatars.json
266
267
  - spec/fixtures/user_enrollments.json
268
+ - spec/fixtures/user_profile.json
267
269
  - spec/helper.rb
268
270
  has_rdoc: