bearcat 0.9 → 0.9.1

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.
@@ -6,6 +6,10 @@ module Bearcat
6
6
  get("/api/v1/accounts/#{account.to_s}/users", params)
7
7
  end
8
8
 
9
+ def user_avatars(user, params={})
10
+ get("/api/v1/users/#{user.to_s}/avatars", params)
11
+ end
12
+
9
13
  end
10
14
  end
11
15
  end
@@ -1,3 +1,3 @@
1
1
  module Bearcat
2
- VERSION = '0.9' unless defined?(Bearcat::VERSION)
2
+ VERSION = '0.9.1' unless defined?(Bearcat::VERSION)
3
3
  end
@@ -22,4 +22,11 @@ describe Bearcat::Client::Users do
22
22
  user.first['sis_user_id'].should == 'testusersisid1'
23
23
  end
24
24
 
25
+ it "returns the possible user avatar options" do
26
+ stub_get(@client, "/api/v1/users/1/avatars").to_return(json_response("user_avatars.json"))
27
+ user_avatars = @client.user_avatars(1)
28
+ user_avatars.count.should == 2
29
+ user_avatars.first['type'].should == 'gravatar'
30
+ end
31
+
25
32
  end
@@ -0,0 +1,14 @@
1
+ [
2
+ {
3
+ "url": "https://secure.gravatar.com/avatar/1200cf8ad328a60559cf5e7c5f46ee6d?s=50&d=http%3A%2F%2Fcanvas.instructure.com%2Fimages%2Fdotted_pic.png",
4
+ "type": "gravatar",
5
+ "display_name": "gravatar pic",
6
+ "token": "be98b445a84fb78817868f53ef460f269730f795"
7
+ },
8
+ {
9
+ "url": "http://canvas.instructure.com/images/dotted_pic.png",
10
+ "type": "no_pic",
11
+ "display_name": "no pic",
12
+ "token": "b7ea73b10bba64d428cd2cec6cb42495f36da449"
13
+ }
14
+ ]
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'
4
+ version: 0.9.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-23 00:00:00.000000000 Z
12
+ date: 2014-02-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -178,6 +178,7 @@ files:
178
178
  - spec/fixtures/update_outcome.json
179
179
  - spec/fixtures/update_outcome_group.json
180
180
  - spec/fixtures/update_section.json
181
+ - spec/fixtures/user_avatars.json
181
182
  - spec/fixtures/user_enrollments.json
182
183
  - spec/helper.rb
183
184
  homepage:
@@ -252,6 +253,7 @@ test_files:
252
253
  - spec/fixtures/update_outcome.json
253
254
  - spec/fixtures/update_outcome_group.json
254
255
  - spec/fixtures/update_section.json
256
+ - spec/fixtures/user_avatars.json
255
257
  - spec/fixtures/user_enrollments.json
256
258
  - spec/helper.rb
257
259
  has_rdoc: