bearcat 1.3.9 → 1.3.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bearcat/client/content_migrations.rb +1 -1
- data/lib/bearcat/client/users.rb +5 -0
- data/lib/bearcat/version.rb +1 -1
- data/spec/bearcat/client/users_spec.rb +9 -0
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2638ba0d30fa85c6877d987310f9bf59e7661f2c
|
4
|
+
data.tar.gz: d7538f4a870fe635eb6bd68bd8b3b204c8e5da91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9c8ca2a6573b456018a826791c5d8051c05bd74c2a7654ef172c57e018f8c536dccf0542efc9208df1dd165e5c5f9fb1fa4528fce42b637bf635f955eab6a6d
|
7
|
+
data.tar.gz: e1ca459229b2f15d92d3b3e564c2fc5f429a7c9c4e0133d8818a0c132fa3be41559df13d55d17e8f3c7064c622f175ebd8924417207eee91b2759d670de61a24
|
data/lib/bearcat/client/users.rb
CHANGED
@@ -55,6 +55,11 @@ module Bearcat
|
|
55
55
|
def user_merge(user, merge_into_user)
|
56
56
|
put("/api/v1/users/#{user}/merge_into/#{merge_into_user}")
|
57
57
|
end
|
58
|
+
|
59
|
+
def user_assignments(user, course, params = {})
|
60
|
+
get("/api/v1/users/#{user}/courses/#{course}/assignments", params)
|
61
|
+
end
|
62
|
+
|
58
63
|
end
|
59
64
|
end
|
60
65
|
end
|
data/lib/bearcat/version.rb
CHANGED
@@ -62,6 +62,15 @@ describe Bearcat::Client::Users do
|
|
62
62
|
com_channels.members.first['address'].should == 'brandonbr@instructure.com'
|
63
63
|
end
|
64
64
|
|
65
|
+
it 'returns assignments for a user' do
|
66
|
+
stub_get(@client, "/api/v1/users/1/courses/1/assignments").to_return(json_response("assignments.json"))
|
67
|
+
assignments = @client.user_assignments(1, 1)
|
68
|
+
assignments.count.should == 2
|
69
|
+
assignments.first["assignment_group_id"].should == 53
|
70
|
+
assignments.first["id"].should == 123
|
71
|
+
assignments.first["due_at"].should == nil
|
72
|
+
end
|
73
|
+
|
65
74
|
describe 'user custom data' do
|
66
75
|
before (:each) do
|
67
76
|
@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.3.
|
4
|
+
version: 1.3.10
|
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-
|
11
|
+
date: 2017-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -313,7 +313,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
313
313
|
version: '0'
|
314
314
|
requirements: []
|
315
315
|
rubyforge_project:
|
316
|
-
rubygems_version: 2.4.
|
316
|
+
rubygems_version: 2.4.8
|
317
317
|
signing_key:
|
318
318
|
specification_version: 4
|
319
319
|
summary: Canvas API
|
@@ -472,4 +472,3 @@ test_files:
|
|
472
472
|
- spec/fixtures/user_page_views.json
|
473
473
|
- spec/fixtures/user_profile.json
|
474
474
|
- spec/helper.rb
|
475
|
-
has_rdoc:
|