bearcat 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,6 +22,10 @@ module Bearcat
22
22
  post("/api/v1/courses/#{course}/quiz_extensions", params)
23
23
  end
24
24
 
25
+ def course_outcome_results(course, params={})
26
+ get("/api/v1/courses/#{course}/outcome_results", params)
27
+ end
28
+
25
29
  def create_content_migration(course, file_path, params={})
26
30
  response = post("/api/v1/courses/#{course}/content_migrations", params)
27
31
  pre_attachment = response['pre_attachment']
@@ -1,3 +1,3 @@
1
1
  module Bearcat
2
- VERSION = '1.0.5' unless defined?(Bearcat::VERSION)
2
+ VERSION = '1.0.6' unless defined?(Bearcat::VERSION)
3
3
  end
@@ -63,11 +63,23 @@ describe Bearcat::Client::Sections do
63
63
  expect { @client.create_content_migration('659', fixture('cc.imscc'), opts) }.to raise_exception
64
64
  end
65
65
 
66
- it 'sets extensions on a quiz' do
66
+ it 'sets extensions on a quiz' do
67
67
  stub_post(@client, "/api/v1/courses/1/quiz_extensions").to_return(json_response("quizzes/quiz_extension.json"))
68
68
  quiz_extension = @client.course_quiz_extensions('1', {quiz_extensions: [{user_id: 1}, {extra_time: 30}]})
69
69
  quiz_extension.class.should eq(Hash)
70
70
  quiz_extension['quiz_extensions'].first['extra_time'].should eq(30)
71
71
  end
72
72
 
73
+ it 'gets learning outcome results' do
74
+ stub_get(@client, "/api/v1/courses/1/outcome_results").to_return(json_response("outcome_result.json"))
75
+ outcome_result = @client.course_outcome_results('1')
76
+ outcome = outcome_result['outcome_results'].first
77
+ links = outcome['links']
78
+ expect(outcome['id']).to eq('1')
79
+ expect(outcome['score']).to eq(3)
80
+ expect(links['user']).to eq('101')
81
+ expect(links['learning_outcome']).to eq('1')
82
+ expect(links['alignment']).to eq('assignment_1')
83
+ end
84
+
73
85
  end
@@ -0,0 +1,13 @@
1
+ {
2
+ "outcome_results": [
3
+ {
4
+ "id": "1",
5
+ "score": 3,
6
+ "links": {
7
+ "user": "101",
8
+ "learning_outcome": "1",
9
+ "alignment": "assignment_1"
10
+ }
11
+ }
12
+ ]
13
+ }
metadata CHANGED
@@ -1,97 +1,110 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bearcat
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Nathan Mills, Jake Sorce
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2014-11-20 00:00:00.000000000 Z
12
+ date: 2014-12-04 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rake
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
- - - ">="
19
+ - - ! '>='
18
20
  - !ruby/object:Gem::Version
19
21
  version: '0'
20
22
  type: :development
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
- - - ">="
27
+ - - ! '>='
25
28
  - !ruby/object:Gem::Version
26
29
  version: '0'
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: bundler
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
- - - ">="
35
+ - - ! '>='
32
36
  - !ruby/object:Gem::Version
33
37
  version: 1.0.0
34
38
  type: :development
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
- - - ">="
43
+ - - ! '>='
39
44
  - !ruby/object:Gem::Version
40
45
  version: 1.0.0
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: rspec
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
- - - "~>"
51
+ - - ~>
46
52
  - !ruby/object:Gem::Version
47
53
  version: '2.6'
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
- - - "~>"
59
+ - - ~>
53
60
  - !ruby/object:Gem::Version
54
61
  version: '2.6'
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: webmock
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
- - - ">="
67
+ - - ! '>='
60
68
  - !ruby/object:Gem::Version
61
69
  version: '0'
62
70
  type: :development
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
- - - ">="
75
+ - - ! '>='
67
76
  - !ruby/object:Gem::Version
68
77
  version: '0'
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: pry
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
- - - ">="
83
+ - - ! '>='
74
84
  - !ruby/object:Gem::Version
75
85
  version: '0'
76
86
  type: :development
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
- - - ">="
91
+ - - ! '>='
81
92
  - !ruby/object:Gem::Version
82
93
  version: '0'
83
94
  - !ruby/object:Gem::Dependency
84
95
  name: footrest
85
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
86
98
  requirements:
87
- - - ">="
99
+ - - ! '>='
88
100
  - !ruby/object:Gem::Version
89
101
  version: 0.2.2
90
102
  type: :runtime
91
103
  prerelease: false
92
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
93
106
  requirements:
94
- - - ">="
107
+ - - ! '>='
95
108
  - !ruby/object:Gem::Version
96
109
  version: 0.2.2
97
110
  description: Ruby interface for interacting with the canvas API
@@ -103,9 +116,7 @@ extra_rdoc_files: []
103
116
  files:
104
117
  - Rakefile
105
118
  - bearcat.gemspec
106
- - lib/bearcat.rb
107
119
  - lib/bearcat/api_array.rb
108
- - lib/bearcat/client.rb
109
120
  - lib/bearcat/client/account_reports.rb
110
121
  - lib/bearcat/client/accounts.rb
111
122
  - lib/bearcat/client/assignments.rb
@@ -128,7 +139,9 @@ files:
128
139
  - lib/bearcat/client/sections.rb
129
140
  - lib/bearcat/client/submissions.rb
130
141
  - lib/bearcat/client/users.rb
142
+ - lib/bearcat/client.rb
131
143
  - lib/bearcat/version.rb
144
+ - lib/bearcat.rb
132
145
  - spec/bearcat/client/accounts_spec.rb
133
146
  - spec/bearcat/client/assignments_spec.rb
134
147
  - spec/bearcat/client/calendar_events_spec.rb
@@ -196,6 +209,7 @@ files:
196
209
  - spec/fixtures/no_custom_data.json
197
210
  - spec/fixtures/outcome_group_import.json
198
211
  - spec/fixtures/outcome_groups.json
212
+ - spec/fixtures/outcome_result.json
199
213
  - spec/fixtures/outcome_subgroup.json
200
214
  - spec/fixtures/outcome_subgroups.json
201
215
  - spec/fixtures/outcomes.json
@@ -223,26 +237,27 @@ files:
223
237
  - spec/helper.rb
224
238
  homepage:
225
239
  licenses: []
226
- metadata: {}
227
240
  post_install_message:
228
241
  rdoc_options: []
229
242
  require_paths:
230
243
  - lib
231
244
  required_ruby_version: !ruby/object:Gem::Requirement
245
+ none: false
232
246
  requirements:
233
- - - ">="
247
+ - - ! '>='
234
248
  - !ruby/object:Gem::Version
235
249
  version: '0'
236
250
  required_rubygems_version: !ruby/object:Gem::Requirement
251
+ none: false
237
252
  requirements:
238
- - - ">="
253
+ - - ! '>='
239
254
  - !ruby/object:Gem::Version
240
255
  version: '0'
241
256
  requirements: []
242
257
  rubyforge_project:
243
- rubygems_version: 2.2.2
258
+ rubygems_version: 1.8.23
244
259
  signing_key:
245
- specification_version: 4
260
+ specification_version: 3
246
261
  summary: Canvas API
247
262
  test_files:
248
263
  - spec/bearcat/client/accounts_spec.rb
@@ -312,6 +327,7 @@ test_files:
312
327
  - spec/fixtures/no_custom_data.json
313
328
  - spec/fixtures/outcome_group_import.json
314
329
  - spec/fixtures/outcome_groups.json
330
+ - spec/fixtures/outcome_result.json
315
331
  - spec/fixtures/outcome_subgroup.json
316
332
  - spec/fixtures/outcome_subgroups.json
317
333
  - spec/fixtures/outcomes.json
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 927ba11b6540e36486379436cab3eb24e001fcfd
4
- data.tar.gz: a41654bb92f23dda6046253788204a21874c803f
5
- SHA512:
6
- metadata.gz: 0f81b6c4243295895ab8e25591ec1540f1e935a2afabaf9e264fc3dd23064379634d53c9f533950ec51a2ef047cd80cb143189c5427c2aff46ad6922af63fbd9
7
- data.tar.gz: a4042ecb054ba99f47d74f964dcbc451ed99a6780cb75158dcb38c2d3afa567e8ea063ebc35bca2f5c13ee5ca22c2876c9c2a443d227cce13bb9160817eae08d