bearcat 1.0.3 → 1.0.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e34db19e81f12e7a327ce9d2b49740144fcdac13
|
4
|
+
data.tar.gz: 6d3b1e4a5e0b1b15594c865351a6733d714f7d46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f78d75cb2d1874f508a58229cba1f19cbf3bae4eab4f009182cdb7aabab999fff8fdc82cac745357798cff95fc9e5e0f9222547c1ed918f71b7e5e41d7df90ff
|
7
|
+
data.tar.gz: d3765ca4dd0d822767ed9289c391c40342809c746f2320c864c6708db5320de90a7bd23205a1f5a0fc0163bbddc5a2f09c4288f21bd623fab9b0ab2715f8a788
|
data/lib/bearcat/client.rb
CHANGED
@@ -21,6 +21,7 @@ module Bearcat
|
|
21
21
|
require 'bearcat/client/canvas_files'
|
22
22
|
require 'bearcat/client/calendar_events'
|
23
23
|
require 'bearcat/client/discussions'
|
24
|
+
require 'bearcat/client/search'
|
24
25
|
require 'bearcat/client/quizzes'
|
25
26
|
|
26
27
|
include Assignments
|
@@ -42,6 +43,7 @@ module Bearcat
|
|
42
43
|
include CalendarEvents
|
43
44
|
include Discussions
|
44
45
|
include FileHelper
|
46
|
+
include Search
|
45
47
|
include Quizzes
|
46
48
|
|
47
49
|
|
data/lib/bearcat/version.rb
CHANGED
@@ -14,9 +14,11 @@ describe Bearcat::Client::Accounts do
|
|
14
14
|
|
15
15
|
it "returns enrollment terms for an account" do
|
16
16
|
stub_get(@client, "/api/v1/accounts/1/terms").to_return(json_response("enrollment_terms.json"))
|
17
|
-
|
18
|
-
terms
|
19
|
-
terms
|
17
|
+
account = @client.terms(1)
|
18
|
+
terms = account.members
|
19
|
+
terms.count.should == 1
|
20
|
+
terms.first['id'].should == 4
|
21
|
+
terms.first['name'].should == 'Term 1'
|
20
22
|
end
|
21
23
|
|
22
24
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
describe Bearcat::Client::Search do
|
4
|
+
before do
|
5
|
+
@client = Bearcat::Client.new(prefix:"http://canvas.instructure.com", token: "test_token")
|
6
|
+
end
|
7
|
+
|
8
|
+
it "returns search results for recipients" do
|
9
|
+
stub_get(@client, "/api/v1/conversations/find_recipients?search=test").to_return(json_response("search_find_recipients.json"))
|
10
|
+
results = @client.find_recipients(:search => 'test')
|
11
|
+
results.first['name'].should == 'Test'
|
12
|
+
results.first['id'].should == 9
|
13
|
+
end
|
14
|
+
|
15
|
+
|
16
|
+
end
|
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: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Mills, Jake Sorce
|
@@ -122,6 +122,7 @@ files:
|
|
122
122
|
- lib/bearcat/client/outcomes.rb
|
123
123
|
- lib/bearcat/client/quizzes.rb
|
124
124
|
- lib/bearcat/client/reports.rb
|
125
|
+
- lib/bearcat/client/search.rb
|
125
126
|
- lib/bearcat/client/sections.rb
|
126
127
|
- lib/bearcat/client/submissions.rb
|
127
128
|
- lib/bearcat/client/users.rb
|
@@ -144,6 +145,7 @@ files:
|
|
144
145
|
- spec/bearcat/client/outcomes_spec.rb
|
145
146
|
- spec/bearcat/client/quizzes_spec.rb
|
146
147
|
- spec/bearcat/client/reports_spec.rb
|
148
|
+
- spec/bearcat/client/search_spec.rb
|
147
149
|
- spec/bearcat/client/sections_spec.rb
|
148
150
|
- spec/bearcat/client/submissions_spec.rb
|
149
151
|
- spec/bearcat/client/users_spec.rb
|
@@ -204,6 +206,7 @@ files:
|
|
204
206
|
- spec/fixtures/report_history.json
|
205
207
|
- spec/fixtures/report_list.json
|
206
208
|
- spec/fixtures/report_status.json
|
209
|
+
- spec/fixtures/search_find_recipients.json
|
207
210
|
- spec/fixtures/section.json
|
208
211
|
- spec/fixtures/section_enrollments.json
|
209
212
|
- spec/fixtures/single_account.json
|
@@ -258,6 +261,7 @@ test_files:
|
|
258
261
|
- spec/bearcat/client/outcomes_spec.rb
|
259
262
|
- spec/bearcat/client/quizzes_spec.rb
|
260
263
|
- spec/bearcat/client/reports_spec.rb
|
264
|
+
- spec/bearcat/client/search_spec.rb
|
261
265
|
- spec/bearcat/client/sections_spec.rb
|
262
266
|
- spec/bearcat/client/submissions_spec.rb
|
263
267
|
- spec/bearcat/client/users_spec.rb
|
@@ -318,6 +322,7 @@ test_files:
|
|
318
322
|
- spec/fixtures/report_history.json
|
319
323
|
- spec/fixtures/report_list.json
|
320
324
|
- spec/fixtures/report_status.json
|
325
|
+
- spec/fixtures/search_find_recipients.json
|
321
326
|
- spec/fixtures/section.json
|
322
327
|
- spec/fixtures/section_enrollments.json
|
323
328
|
- spec/fixtures/single_account.json
|