quiz_api_client 4.16.0 → 4.17.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8956ccc8a8479d5daeeb2522f42581495c2e39934d221df99fbc4e697e6d13ca
4
- data.tar.gz: 8399e28b565d2f608d1315e78220fa49d6bade8c06483c88f396ebb802f850c3
3
+ metadata.gz: e23a84ac19d13092f5a3b444fb14ad9347a6b213823f76d59cf6bbcf416f1d45
4
+ data.tar.gz: b2c552afb96c01f953bbddfb6884ca89815a0ce41984ce303e8d577b8eacdc7b
5
5
  SHA512:
6
- metadata.gz: 5eaeeec5e0452e1c71aa4f3a9ea86228e73ab1fc7b9d82aa7eee73d94154dfb65af0d76468cb9d826c2bd22ff8b71ec6b39767dc0de1119fff6fa1b7b2be744b
7
- data.tar.gz: b045527ab2f0cc7114124d950bbcd4811cee1014fe93db94fe12e33beff083e986c0be38b67ec6a68cea334cdbc3e6e4c08738bc6b43bb1e65660d5abf731151
6
+ metadata.gz: f574041231c954f70acc74cc5f3f9ba142b6f9f9f289fc782839e3fbd4eedd116142850380af90707492dbccd8d9f5ff3370c915f76cb971068b5b9010892399
7
+ data.tar.gz: 492b05909f9bb60cd5994ee313dca258012b9706525e22fb7f48a2f536792fe9b75d3ac8098f55aa50787a0b6d54b7431e7b86d0a504007f27a2696e16cd5c81
@@ -1,6 +1,6 @@
1
1
  module QuizApiClient::Services
2
2
  class AccountService < BaseApiService
3
- def update(params, token: nil)
3
+ def update(params:, token: nil)
4
4
  patch_to_quiz_api(params: params, token: token)
5
5
  end
6
6
 
@@ -9,7 +9,7 @@ module QuizApiClient::Services
9
9
  def patch_to_quiz_api(params:, token:)
10
10
  client(token: token).patch(
11
11
  '/api/account',
12
- course: params
12
+ account: params
13
13
  )
14
14
  end
15
15
  end
@@ -10,7 +10,8 @@ module QuizApiClient::Services
10
10
  client(token: token).post(
11
11
  "/api/quizzes/#{params[:quiz_id]}/analyses",
12
12
  quiz_session_ids: params[:quiz_session_ids],
13
- filter: params[:filter]
13
+ filter: params[:filter],
14
+ analysis_type: params[:analysis_type]
14
15
  )
15
16
  end
16
17
  end
@@ -1,3 +1,3 @@
1
1
  module QuizApiClient
2
- VERSION = '4.16.0'.freeze
2
+ VERSION = '4.17.0'.freeze
3
3
  end
@@ -5,9 +5,7 @@ RSpec.describe QuizApiClient::Services::AccountService do
5
5
 
6
6
  describe '#update' do
7
7
  let(:params) do
8
- {
9
- account: { tenant_domain: 'foo.instructure.com' }
10
- }
8
+ { tenant_domain: 'foo.instructure.com' }
11
9
  end
12
10
 
13
11
  let(:response) do
@@ -21,7 +19,8 @@ RSpec.describe QuizApiClient::Services::AccountService do
21
19
  let(:expected_url) { "https://#{host}/api/account" }
22
20
 
23
21
  before do
24
- stub_request(:patch, 'https://api.host/api/account')
22
+ stub_request(:patch, expected_url)
23
+ .with(body: { account: params }.to_json)
25
24
  .to_return(
26
25
  status: 200,
27
26
  body: response.to_json,
@@ -5,14 +5,18 @@ describe QuizApiClient::Services::AnalysesService do
5
5
 
6
6
  describe '#create' do
7
7
  let(:params) do
8
- { quiz_id: 1, quiz_session_ids: [1, 5, 10], filter: :last_attempt }
8
+ { quiz_id: 1, quiz_session_ids: [1, 5, 10], filter: :last_attempt, analysis_type: 'student_analysis' }
9
9
  end
10
10
  let(:stubbed_response) { { 'job_id' => 1 } }
11
11
  let(:expected_url) { "https://#{host}/api/quizzes/#{params[:quiz_id]}/analyses" }
12
+ let(:expected_params) { { quiz_session_ids: [1, 5, 10], filter: :last_attempt, analysis_type: 'student_analysis' } }
12
13
  let(:status_code) { 200 }
13
14
 
14
15
  before do
15
16
  stub_request(:post, expected_url)
17
+ .with(
18
+ body: expected_params.to_json
19
+ )
16
20
  .to_return(
17
21
  status: status_code,
18
22
  body: stubbed_response.to_json,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quiz_api_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.16.0
4
+ version: 4.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Slaughter
@@ -15,7 +15,7 @@ authors:
15
15
  autorequire:
16
16
  bindir: exe
17
17
  cert_chain: []
18
- date: 2024-06-04 00:00:00.000000000 Z
18
+ date: 2024-11-13 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: httparty
@@ -167,6 +167,7 @@ email:
167
167
  - rkuss@instructure.com
168
168
  - rtaylor@instructure.com
169
169
  - dustin.cowles@instructure.com
170
+ - wdransfield@instructure.com
170
171
  executables: []
171
172
  extensions: []
172
173
  extra_rdoc_files: []