bridge_api 0.3.2 → 0.3.3
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 +4 -4
- data/.github/pull_request_template.md +29 -0
- data/lib/bridge_api/client/sub_account.rb +4 -0
- data/lib/bridge_api/version.rb +1 -1
- data/spec/bridge_api/client/sub_account_spec.rb +13 -0
- data/spec/fixtures/custom_attribute_values.json +3 -0
- data/spec/support/fake_bridge.rb +4 -0
- metadata +57 -54
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88f17e825afd96df492d4be2c073dbe10eef3f97c6c835ffdcfaeb3d6819e82f
|
4
|
+
data.tar.gz: 3b79209eea1c6b981b09d7601026b1f4c68452cd14b8fe7e76cdde0cc193d706
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66eb8df82ecce9bf89f0a087b7f15eb105793137e91edce41d0c68829610a006fba0dc666fff77bf588763508ee26efabf54d2522f84181110cf0eb11eda6946
|
7
|
+
data.tar.gz: a418a116fd8ec3e290116e9ee16e0f63140159a65c278394d454a944e16e6e917275f7c51797c73ebf349cceca28dc547e9f516ef922cfa41ed415fb7860534e
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#### JIRA
|
2
|
+
-
|
3
|
+
|
4
|
+
#### Changes
|
5
|
+
-
|
6
|
+
|
7
|
+
#### Checklist
|
8
|
+
- - [ ] Feature Flag Required
|
9
|
+
- - [ ] Bug
|
10
|
+
|
11
|
+
#### Test plan
|
12
|
+
|
13
|
+
- - [ ] Walk-through
|
14
|
+
- - [ ] Peer review
|
15
|
+
- - [ ] Inspection
|
16
|
+
- Detailed steps and prerequisites for validating the change:
|
17
|
+
- <!-- Replace this with the bullet points about the steps how to execute the test -->
|
18
|
+
|
19
|
+
#### Risk Analysis - the risk of change is evaluated
|
20
|
+
|
21
|
+
- - [ ] Low - Majority of the changes are low risk which doesn’t require extra testing, only code review by 1 reviewer
|
22
|
+
- - [ ] 1 reviewer
|
23
|
+
- - [ ] Medium - Some portions of changes are medium risk which needs peer testing and review by 2 reviewers
|
24
|
+
- - [ ] 2 reviewers
|
25
|
+
- - [ ] peer testing
|
26
|
+
- - [ ] High - A very few breaking changes are high risk and need very throughout testing and review and also a coordinated release process.
|
27
|
+
- - [ ] 2 reviewers
|
28
|
+
- - [ ] peer testing
|
29
|
+
- - [ ] coordinated release
|
@@ -54,6 +54,10 @@ module BridgeAPI
|
|
54
54
|
def delete_lti_config(sub_account_id, lti_tool_id, params = {})
|
55
55
|
delete("#{API_PATH}#{SUPPORT_PATH}#{SUB_ACCOUNT_PATH}/#{sub_account_id}#{LTI_TOOLS_PATH}/#{lti_tool_id}", params)
|
56
56
|
end
|
57
|
+
|
58
|
+
def upsert_custom_attribute_values(sub_account_id, params = {})
|
59
|
+
put("#{API_PATH}#{ADMIN_PATH}#{SUB_ACCOUNT_PATH}/#{sub_account_id}/custom_attribute_values", params)
|
60
|
+
end
|
57
61
|
end
|
58
62
|
end
|
59
63
|
end
|
data/lib/bridge_api/version.rb
CHANGED
@@ -52,4 +52,17 @@ describe BridgeAPI::Client::SubAccount do
|
|
52
52
|
response = @client.delete_lti_config(2, 15)
|
53
53
|
expect(response.status).to(eq 204)
|
54
54
|
end
|
55
|
+
|
56
|
+
it 'should upsert the custom attribute values of a sub account' do
|
57
|
+
params = {
|
58
|
+
custom_attributes: [
|
59
|
+
{
|
60
|
+
product_type: 'YoooKey',
|
61
|
+
client_type: 'SomeKey'
|
62
|
+
},
|
63
|
+
]
|
64
|
+
}
|
65
|
+
response = @client.upsert_custom_attribute_values(2, params)
|
66
|
+
expect(response.status).to(eq 200)
|
67
|
+
end
|
55
68
|
end
|
data/spec/support/fake_bridge.rb
CHANGED
@@ -266,6 +266,10 @@ class FakeBridge < Sinatra::Base
|
|
266
266
|
get_json_data 204, 'sub_account_lti_config.json'
|
267
267
|
end
|
268
268
|
|
269
|
+
put %r{/api/admin/sub_accounts/\d+/custom_attribute_values} do
|
270
|
+
get_json_data 200, 'custom_attribute_values.json'
|
271
|
+
end
|
272
|
+
|
269
273
|
# Accounts
|
270
274
|
put %r{/api/support/accounts} do
|
271
275
|
get_json_data 200, 'accounts.json'
|
metadata
CHANGED
@@ -1,35 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bridge_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jay Shaffer
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 1.0.0
|
20
17
|
- - "~>"
|
21
18
|
- !ruby/object:Gem::Version
|
22
19
|
version: '1.0'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 1.0.0
|
23
23
|
type: :development
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- - ">="
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: 1.0.0
|
30
27
|
- - "~>"
|
31
28
|
- !ruby/object:Gem::Version
|
32
29
|
version: '1.0'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.0.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: byebug
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -104,22 +104,22 @@ dependencies:
|
|
104
104
|
name: tilt
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
|
-
- - "~>"
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '1.3'
|
110
107
|
- - ">="
|
111
108
|
- !ruby/object:Gem::Version
|
112
109
|
version: 1.3.4
|
110
|
+
- - "~>"
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '1.3'
|
113
113
|
type: :development
|
114
114
|
prerelease: false
|
115
115
|
version_requirements: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
|
-
- - "~>"
|
118
|
-
- !ruby/object:Gem::Version
|
119
|
-
version: '1.3'
|
120
117
|
- - ">="
|
121
118
|
- !ruby/object:Gem::Version
|
122
119
|
version: 1.3.4
|
120
|
+
- - "~>"
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '1.3'
|
123
123
|
- !ruby/object:Gem::Dependency
|
124
124
|
name: webmock
|
125
125
|
requirement: !ruby/object:Gem::Requirement
|
@@ -213,6 +213,7 @@ extra_rdoc_files: []
|
|
213
213
|
files:
|
214
214
|
- ".github/CODEOWNERS"
|
215
215
|
- ".github/dependabot.yml"
|
216
|
+
- ".github/pull_request_template.md"
|
216
217
|
- ".github/workflows/ci.yml"
|
217
218
|
- ".gitignore"
|
218
219
|
- Dockerfile
|
@@ -269,6 +270,7 @@ files:
|
|
269
270
|
- spec/fixtures/clone_objects.json
|
270
271
|
- spec/fixtures/course.json
|
271
272
|
- spec/fixtures/courses.json
|
273
|
+
- spec/fixtures/custom_attribute_values.json
|
272
274
|
- spec/fixtures/custom_fields.json
|
273
275
|
- spec/fixtures/data_dump.json
|
274
276
|
- spec/fixtures/data_dumps.json
|
@@ -300,7 +302,7 @@ homepage: https://getbridge.com
|
|
300
302
|
licenses:
|
301
303
|
- MIT
|
302
304
|
metadata: {}
|
303
|
-
post_install_message:
|
305
|
+
post_install_message:
|
304
306
|
rdoc_options: []
|
305
307
|
require_paths:
|
306
308
|
- lib
|
@@ -315,58 +317,59 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
315
317
|
- !ruby/object:Gem::Version
|
316
318
|
version: '0'
|
317
319
|
requirements: []
|
318
|
-
rubygems_version: 3.
|
319
|
-
signing_key:
|
320
|
+
rubygems_version: 3.4.10
|
321
|
+
signing_key:
|
320
322
|
specification_version: 4
|
321
323
|
summary: Bridge API
|
322
324
|
test_files:
|
323
|
-
- spec/bridge_api/client_spec.rb
|
324
|
-
- spec/bridge_api/client/enrollment_spec.rb
|
325
|
-
- spec/bridge_api/client/custom_field_spec.rb
|
326
325
|
- spec/bridge_api/client/account_spec.rb
|
327
|
-
- spec/bridge_api/client/
|
328
|
-
- spec/bridge_api/client/live_course_spec.rb
|
326
|
+
- spec/bridge_api/client/affiliations_spec.rb
|
329
327
|
- spec/bridge_api/client/clone_object_spec.rb
|
330
328
|
- spec/bridge_api/client/course_template_spec.rb
|
331
|
-
- spec/bridge_api/client/
|
332
|
-
- spec/bridge_api/client/
|
329
|
+
- spec/bridge_api/client/custom_field_spec.rb
|
330
|
+
- spec/bridge_api/client/data_dump_spec.rb
|
331
|
+
- spec/bridge_api/client/enrollment_spec.rb
|
333
332
|
- spec/bridge_api/client/group_spec.rb
|
333
|
+
- spec/bridge_api/client/learner_items_spec.rb
|
334
|
+
- spec/bridge_api/client/live_course_enrollments_spec.rb
|
334
335
|
- spec/bridge_api/client/live_course_session_spec.rb
|
336
|
+
- spec/bridge_api/client/live_course_spec.rb
|
337
|
+
- spec/bridge_api/client/manager_spec.rb
|
335
338
|
- spec/bridge_api/client/program_enrollment_spec.rb
|
336
|
-
- spec/bridge_api/client/user_spec.rb
|
337
339
|
- spec/bridge_api/client/role_spec.rb
|
338
|
-
- spec/bridge_api/client/
|
339
|
-
- spec/bridge_api/client/
|
340
|
-
- spec/bridge_api/
|
341
|
-
- spec/
|
342
|
-
- spec/fixtures/
|
343
|
-
- spec/fixtures/
|
344
|
-
- spec/fixtures/managers.json
|
345
|
-
- spec/fixtures/temporary_users.json
|
346
|
-
- spec/fixtures/program_enrollments.json
|
347
|
-
- spec/fixtures/enrollment.json
|
348
|
-
- spec/fixtures/sub_accounts.json
|
349
|
-
- spec/fixtures/user_roles_add.json
|
340
|
+
- spec/bridge_api/client/sub_account_spec.rb
|
341
|
+
- spec/bridge_api/client/user_spec.rb
|
342
|
+
- spec/bridge_api/client_spec.rb
|
343
|
+
- spec/fixtures/accounts.json
|
344
|
+
- spec/fixtures/affiliations.json
|
345
|
+
- spec/fixtures/clone_objects.json
|
350
346
|
- spec/fixtures/course.json
|
351
|
-
- spec/fixtures/live_course_sessions.json
|
352
|
-
- spec/fixtures/data_dumps.json
|
353
|
-
- spec/fixtures/users.json
|
354
|
-
- spec/fixtures/direct_reports.json
|
355
|
-
- spec/fixtures/sub_account_lti_config.json
|
356
|
-
- spec/fixtures/user.json
|
357
347
|
- spec/fixtures/courses.json
|
358
|
-
- spec/fixtures/
|
348
|
+
- spec/fixtures/custom_attribute_values.json
|
349
|
+
- spec/fixtures/custom_fields.json
|
350
|
+
- spec/fixtures/data_dump.json
|
351
|
+
- spec/fixtures/data_dumps.json
|
359
352
|
- spec/fixtures/default_web_conference.json
|
360
|
-
- spec/fixtures/
|
361
|
-
- spec/fixtures/
|
362
|
-
- spec/fixtures/sub_account_new_lti_config.json
|
353
|
+
- spec/fixtures/direct_reports.json
|
354
|
+
- spec/fixtures/enrollment.json
|
363
355
|
- spec/fixtures/enrollments.json
|
364
356
|
- spec/fixtures/group.json
|
365
|
-
- spec/fixtures/
|
366
|
-
- spec/fixtures/
|
367
|
-
- spec/fixtures/live_courses.json
|
368
|
-
- spec/fixtures/clone_objects.json
|
369
|
-
- spec/fixtures/data_dump.json
|
357
|
+
- spec/fixtures/learner_items.json
|
358
|
+
- spec/fixtures/live_course.json
|
370
359
|
- spec/fixtures/live_course_enrollments.json
|
371
|
-
- spec/fixtures/
|
360
|
+
- spec/fixtures/live_course_sessions.json
|
361
|
+
- spec/fixtures/live_courses.json
|
362
|
+
- spec/fixtures/managers.json
|
363
|
+
- spec/fixtures/program_enrollments.json
|
364
|
+
- spec/fixtures/programs.json
|
365
|
+
- spec/fixtures/roles.json
|
366
|
+
- spec/fixtures/sub_account_lti_config.json
|
367
|
+
- spec/fixtures/sub_account_lti_config_update.json
|
368
|
+
- spec/fixtures/sub_account_new_lti_config.json
|
369
|
+
- spec/fixtures/sub_accounts.json
|
370
|
+
- spec/fixtures/temporary_users.json
|
371
|
+
- spec/fixtures/user.json
|
372
|
+
- spec/fixtures/user_roles_add.json
|
373
|
+
- spec/fixtures/users.json
|
374
|
+
- spec/support/fake_bridge.rb
|
372
375
|
- spec/test_helper.rb
|