scorm_engine 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +3 -0
- data/Rakefile +13 -0
- data/lib/scorm_engine.rb +13 -0
- data/lib/scorm_engine/api/endpoints.rb +50 -0
- data/lib/scorm_engine/api/endpoints/about.rb +59 -0
- data/lib/scorm_engine/api/endpoints/courses.rb +136 -0
- data/lib/scorm_engine/api/endpoints/courses/configuration.rb +146 -0
- data/lib/scorm_engine/api/endpoints/courses/import.rb +83 -0
- data/lib/scorm_engine/api/endpoints/ping.rb +20 -0
- data/lib/scorm_engine/api/endpoints/registrations.rb +321 -0
- data/lib/scorm_engine/api/endpoints/registrations/configuration.rb +146 -0
- data/lib/scorm_engine/api/endpoints/registrations/launch_history.rb +47 -0
- data/lib/scorm_engine/client.rb +17 -0
- data/lib/scorm_engine/configuration.rb +43 -0
- data/lib/scorm_engine/faraday/connection.rb +35 -0
- data/lib/scorm_engine/faraday/request.rb +54 -0
- data/lib/scorm_engine/models.rb +9 -0
- data/lib/scorm_engine/models/course.rb +66 -0
- data/lib/scorm_engine/models/course_configuration.rb +37 -0
- data/lib/scorm_engine/models/course_import.rb +42 -0
- data/lib/scorm_engine/models/learner.rb +24 -0
- data/lib/scorm_engine/models/registration.rb +82 -0
- data/lib/scorm_engine/models/registration_activity_detail.rb +37 -0
- data/lib/scorm_engine/models/registration_configuration.rb +37 -0
- data/lib/scorm_engine/models/registration_launch_history.rb +92 -0
- data/lib/scorm_engine/models/registration_runtime_interaction.rb +52 -0
- data/lib/scorm_engine/response.rb +26 -0
- data/lib/scorm_engine/utils.rb +13 -0
- data/lib/scorm_engine/version.rb +3 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_About/_get_about/is_successful.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_About/_get_about/knows_the_platform.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_About/_get_about/knows_the_version.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_About/_get_about_user_count/accepts_before_option.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_About/_get_about_user_count/accepts_since_option.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_About/_get_about_user_count/is_successful.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_About/_get_about_user_count/tracks_combined_counts.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_About/_get_about_user_count/tracks_per_tenantcounts.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_delete_course/fails_when_id_is_invalid.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_delete_course/works.yml +32 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_course_detail/is_successful.yml +41 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_course_detail/results/sucessfully_creates_the_Course_attributes.yml +41 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_course_preview/fails_when_id_is_invalid.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_course_preview/is_successful.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_course_preview/results/returns_a_URL_string.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_courses/_course_id_option/fetches_a_single_course_but_perhaps_multiple_versions.yml +39 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_courses/_course_id_option/returns_404_when_ID_is_invalid.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_courses/_more_option_pagination_/returns_all_the_courses.yml +89 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_courses/_more_option_pagination_/returns_the_more_key_in_the_raw_response.yml +48 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_courses/_since_option/fails_when_passed_an_invalid_value.yml +37 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_courses/_since_option/works.yml +43 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_courses/is_successful.yml +43 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_courses/results/is_an_enumerator_of_Course_models.yml +43 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_courses/results/sucessfully_creates_the_Course_attributes.yml +43 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_get_course_configuration/fails_when_id_is_invalid.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_get_course_configuration/is_successful.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_get_course_configuration/results/makes_settings_available_as_key/value_pairs.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_get_course_configuration_setting/fails_when_course_id_is_invalid.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_get_course_configuration_setting/fails_when_setting_id_is_invalid.yml +36 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_get_course_configuration_setting/is_successful.yml +65 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_get_course_configuration_setting/results/returns_the_value_as_a_string.yml +65 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_post_course_configuration/fails_when_id_is_invalid.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_post_course_configuration/fails_when_settings_are_invalid.yml +36 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_post_course_configuration/is_successful.yml +32 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_post_course_configuration/persists_the_settings.yml +131 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_put_course_configuration_setting/fails_when_course_id_is_invalid.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_put_course_configuration_setting/fails_when_setting_id_is_invalid.yml +36 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_put_course_configuration_setting/is_successful.yml +65 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_put_course_configuration_setting/results/persists_the_changes.yml +98 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Import/_get_course_import/successful_imports/works.yml +147 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Import/_get_course_import/unsuccessful_imports/fails_to_import_given_an_invalid_url.yml +326 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Import/_post_course_import/successful_imports/works.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Import/_post_course_import/unsuccessful_imports/fails_to_import_a_previously_existing_course.yml +36 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Ping/_get_ping/is_successful.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Ping/_get_ping/reports_the_api_is_up.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Ping/_get_ping/with_invalid_password/is_unsuccessful.yml +41 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Ping/_get_ping/with_invalid_password/returns_status_403.yml +41 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_delete_registration/is_failure_when_registration_does_not_exist.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_delete_registration/is_successful_when_registration_exists.yml +32 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registration_exists/is_false_when_registration_does_not_exist.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registration_exists/is_true_when_registration_exists.yml +36 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registration_instances/includes_results_we_expect.yml +39 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registration_instances/is_successful.yml +39 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registration_instances/returns_an_array_of_registrations.yml +39 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registration_launch_link/fails_when_id_is_invalid.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registration_launch_link/is_successful.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registration_launch_link/results/returns_a_URL_string.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registration_progress/detail/does_not_return_activity_details_by_default.yml +39 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registration_progress/detail/returns_activity_details_if_requested.yml +41 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registration_progress/fails_when_registration_does_not_exist.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registration_progress/returns_a_registration_when_it_exists.yml +39 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registrations/filtering_by_course_id/excludes_results.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registrations/filtering_by_course_id/includes_results.yml +40 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registrations/filtering_by_learner_id/excludes_results.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registrations/filtering_by_learner_id/includes_results.yml +39 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registrations/includes_results_we_expect.yml +40 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registrations/is_successful.yml +40 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registrations/returns_an_array_of_registrations.yml +40 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_post_registration/fails_if_course_id_is_invalid.yml +36 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_post_registration/fails_if_registration_id_already_exists.yml +36 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_post_registration/is_successful.yml +61 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_get_registration_configuration/fails_when_id_is_invalid.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_get_registration_configuration/is_successful.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_get_registration_configuration/results/makes_settings_available_as_key/value_pairs.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_get_registration_configuration_setting/fails_when_registration_id_is_invalid.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_get_registration_configuration_setting/fails_when_setting_id_is_invalid.yml +36 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_get_registration_configuration_setting/is_successful.yml +65 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_get_registration_configuration_setting/results/returns_the_value_as_a_string.yml +65 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_post_registration_configuration/fails_when_id_is_invalid.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_post_registration_configuration/fails_when_settings_are_invalid.yml +36 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_post_registration_configuration/is_successful.yml +32 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_post_registration_configuration/persists_the_settings.yml +131 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_put_registration_configuration_setting/fails_when_registration_id_is_invalid.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_put_registration_configuration_setting/fails_when_setting_id_is_invalid.yml +36 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_put_registration_configuration_setting/is_successful.yml +65 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_put_registration_configuration_setting/results/persists_the_changes.yml +98 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_LaunchHistory/_get_registration_launch_history/fails_when_registration_does_not_exist.yml +38 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_LaunchHistory/_get_registration_launch_history/is_successful.yml +54 -0
- data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_LaunchHistory/_get_registration_launch_history/returns_an_array_of_registration_launch_histories.yml +54 -0
- data/spec/fixtures/zip/Non-working SCORM.zip +0 -0
- data/spec/fixtures/zip/RuntimeBasicCalls_SCORM20043rdEdition.zip +0 -0
- data/spec/scorm_engine/api/endpoints/about_spec.rb +59 -0
- data/spec/scorm_engine/api/endpoints/courses/configuration_spec.rb +143 -0
- data/spec/scorm_engine/api/endpoints/courses/import_spec.rb +92 -0
- data/spec/scorm_engine/api/endpoints/courses_spec.rb +155 -0
- data/spec/scorm_engine/api/endpoints/ping_spec.rb +27 -0
- data/spec/scorm_engine/api/endpoints/registrations/configuration_spec.rb +154 -0
- data/spec/scorm_engine/api/endpoints/registrations/launch_history_spec.rb +46 -0
- data/spec/scorm_engine/api/endpoints/registrations_spec.rb +201 -0
- data/spec/scorm_engine/configuration_spec.rb +29 -0
- data/spec/scorm_engine/models/course_configuration_spec.rb +16 -0
- data/spec/scorm_engine/models/course_import_spec.rb +86 -0
- data/spec/scorm_engine/models/course_spec.rb +92 -0
- data/spec/scorm_engine/models/learner_spec.rb +27 -0
- data/spec/scorm_engine/models/registration_activity_detail_spec.rb +101 -0
- data/spec/scorm_engine/models/registration_launch_history_spec.rb +86 -0
- data/spec/scorm_engine/models/registration_runtime_interaction_spec.rb +91 -0
- data/spec/scorm_engine/models/registration_spec.rb +82 -0
- data/spec/scorm_engine/utils_spec.rb +15 -0
- data/spec/scorm_engine/version_spec.rb +5 -0
- data/spec/scorm_engine_spec.rb +2 -0
- data/spec/spec_helper.rb +47 -0
- data/spec/support/scorm_engine.rb +72 -0
- data/spec/support/scorm_engine_client.rb +6 -0
- data/spec/support/scorm_engine_configuration.rb +7 -0
- data/spec/support/vcr.rb +53 -0
- metadata +329 -0
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://<SCORM_ENGINE_HOST>/ScormEngineInterface/api/v1/ScormEngineGemTesting-default/courses/importJobs?course=testing123&mayCreateNewVersion=true
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"url":"https://github.com/phallstrom/scorm_engine/raw/master/spec/fixtures/zip/RuntimeBasicCalls_SCORM20043rdEdition.zip","courseName":"testing123"}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- ScormEngine Ruby Gem 0.1.0
|
14
|
+
Authorization:
|
15
|
+
- Basic <BASIC_AUTH>
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: ''
|
20
|
+
headers:
|
21
|
+
content-type:
|
22
|
+
- application/json
|
23
|
+
date:
|
24
|
+
- Tue, 24 Jul 2018 20:36:59 GMT
|
25
|
+
server:
|
26
|
+
- nginx
|
27
|
+
vary:
|
28
|
+
- Accept-Encoding
|
29
|
+
content-length:
|
30
|
+
- '132'
|
31
|
+
connection:
|
32
|
+
- Close
|
33
|
+
body:
|
34
|
+
encoding: ASCII-8BIT
|
35
|
+
string: '{"result":"d06be176-49b7-4900-bf3c-91e5e26c71e2","importResult":{"status":"RUNNING","parserWarnings":[],"courseLanguages":[]}}'
|
36
|
+
http_version:
|
37
|
+
recorded_at: Tue, 24 Jul 2018 20:36:59 GMT
|
38
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,36 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://<SCORM_ENGINE_HOST>/ScormEngineInterface/api/v1/ScormEngineGemTesting-default/courses/importJobs?course=a-previously-existing-course&mayCreateNewVersion=false
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"url":"https://github.com/phallstrom/scorm_engine/raw/master/spec/fixtures/zip/RuntimeBasicCalls_SCORM20043rdEdition.zip","courseName":"a-previously-existing-course"}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- ScormEngine Ruby Gem 0.1.0
|
14
|
+
Authorization:
|
15
|
+
- Basic <BASIC_AUTH>
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 400
|
19
|
+
message: ''
|
20
|
+
headers:
|
21
|
+
content-type:
|
22
|
+
- application/json
|
23
|
+
date:
|
24
|
+
- Tue, 24 Jul 2018 20:36:56 GMT
|
25
|
+
server:
|
26
|
+
- nginx
|
27
|
+
content-length:
|
28
|
+
- '113'
|
29
|
+
connection:
|
30
|
+
- Close
|
31
|
+
body:
|
32
|
+
encoding: UTF-8
|
33
|
+
string: '{"message":"A course already exists with the specified id: ApiCourseId|a-previously-existing-course!VersionId|0"}'
|
34
|
+
http_version:
|
35
|
+
recorded_at: Tue, 24 Jul 2018 20:36:56 GMT
|
36
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://<SCORM_ENGINE_HOST>/ScormEngineInterface/api/v1/ScormEngineGemTesting-default/ping
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- ScormEngine Ruby Gem 0.1.0
|
14
|
+
Authorization:
|
15
|
+
- Basic <BASIC_AUTH>
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: ''
|
20
|
+
headers:
|
21
|
+
content-type:
|
22
|
+
- application/json
|
23
|
+
date:
|
24
|
+
- Tue, 24 Jul 2018 20:24:48 GMT
|
25
|
+
server:
|
26
|
+
- nginx
|
27
|
+
vary:
|
28
|
+
- Accept-Encoding
|
29
|
+
content-length:
|
30
|
+
- '44'
|
31
|
+
connection:
|
32
|
+
- Close
|
33
|
+
body:
|
34
|
+
encoding: ASCII-8BIT
|
35
|
+
string: '{"message":"API is up."}'
|
36
|
+
http_version:
|
37
|
+
recorded_at: Tue, 24 Jul 2018 20:24:48 GMT
|
38
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://<SCORM_ENGINE_HOST>/ScormEngineInterface/api/v1/ScormEngineGemTesting-default/ping
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- ScormEngine Ruby Gem 0.1.0
|
14
|
+
Authorization:
|
15
|
+
- Basic <BASIC_AUTH>
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: ''
|
20
|
+
headers:
|
21
|
+
content-type:
|
22
|
+
- application/json
|
23
|
+
date:
|
24
|
+
- Tue, 24 Jul 2018 20:24:47 GMT
|
25
|
+
server:
|
26
|
+
- nginx
|
27
|
+
vary:
|
28
|
+
- Accept-Encoding
|
29
|
+
content-length:
|
30
|
+
- '44'
|
31
|
+
connection:
|
32
|
+
- Close
|
33
|
+
body:
|
34
|
+
encoding: ASCII-8BIT
|
35
|
+
string: '{"message":"API is up."}'
|
36
|
+
http_version:
|
37
|
+
recorded_at: Tue, 24 Jul 2018 20:24:47 GMT
|
38
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,41 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://<SCORM_ENGINE_HOST>/ScormEngineInterface/api/v1/ScormEngineGemTesting-default/ping
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- ScormEngine Ruby Gem 0.1.0
|
14
|
+
Authorization:
|
15
|
+
- Basic UmUzaWpFWU1xcXBOZXZlUDNBNFlLNkc6aW52YWxpZA==
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 403
|
19
|
+
message: ''
|
20
|
+
headers:
|
21
|
+
content-language:
|
22
|
+
- en
|
23
|
+
content-type:
|
24
|
+
- text/html;charset=utf-8
|
25
|
+
date:
|
26
|
+
- Tue, 24 Jul 2018 20:24:48 GMT
|
27
|
+
server:
|
28
|
+
- nginx
|
29
|
+
vary:
|
30
|
+
- Accept-Encoding
|
31
|
+
content-length:
|
32
|
+
- '303'
|
33
|
+
connection:
|
34
|
+
- Close
|
35
|
+
body:
|
36
|
+
encoding: ASCII-8BIT
|
37
|
+
string: !binary |-
|
38
|
+
PCFkb2N0eXBlIGh0bWw+PGh0bWwgbGFuZz0iZW4iPjxoZWFkPjx0aXRsZT5IVFRQIFN0YXR1cyA0MDMg4oCTIEZvcmJpZGRlbjwvdGl0bGU+PHN0eWxlIHR5cGU9InRleHQvY3NzIj5oMSB7Zm9udC1mYW1pbHk6VGFob21hLEFyaWFsLHNhbnMtc2VyaWY7Y29sb3I6d2hpdGU7YmFja2dyb3VuZC1jb2xvcjojNTI1RDc2O2ZvbnQtc2l6ZToyMnB4O30gaDIge2ZvbnQtZmFtaWx5OlRhaG9tYSxBcmlhbCxzYW5zLXNlcmlmO2NvbG9yOndoaXRlO2JhY2tncm91bmQtY29sb3I6IzUyNUQ3Njtmb250LXNpemU6MTZweDt9IGgzIHtmb250LWZhbWlseTpUYWhvbWEsQXJpYWwsc2Fucy1zZXJpZjtjb2xvcjp3aGl0ZTtiYWNrZ3JvdW5kLWNvbG9yOiM1MjVENzY7Zm9udC1zaXplOjE0cHg7fSBib2R5IHtmb250LWZhbWlseTpUYWhvbWEsQXJpYWwsc2Fucy1zZXJpZjtjb2xvcjpibGFjaztiYWNrZ3JvdW5kLWNvbG9yOndoaXRlO30gYiB7Zm9udC1mYW1pbHk6VGFob21hLEFyaWFsLHNhbnMtc2VyaWY7Y29sb3I6d2hpdGU7YmFja2dyb3VuZC1jb2xvcjojNTI1RDc2O30gcCB7Zm9udC1mYW1pbHk6VGFob21hLEFyaWFsLHNhbnMtc2VyaWY7YmFja2dyb3VuZDp3aGl0ZTtjb2xvcjpibGFjaztmb250LXNpemU6MTJweDt9IGEge2NvbG9yOmJsYWNrO30gYS5uYW1lIHtjb2xvcjpibGFjazt9IC5saW5lIHtoZWlnaHQ6MXB4O2JhY2tncm91bmQtY29sb3I6IzUyNUQ3Njtib3JkZXI6bm9uZTt9PC9zdHlsZT48L2hlYWQ+PGJvZHk+PGgxPkhUVFAgU3RhdHVzIDQwMyDigJMgRm9yYmlkZGVuPC9oMT48L2JvZHk+PC9odG1sPg==
|
39
|
+
http_version:
|
40
|
+
recorded_at: Tue, 24 Jul 2018 20:24:48 GMT
|
41
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,41 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://<SCORM_ENGINE_HOST>/ScormEngineInterface/api/v1/ScormEngineGemTesting-default/ping
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- ScormEngine Ruby Gem 0.1.0
|
14
|
+
Authorization:
|
15
|
+
- Basic UmUzaWpFWU1xcXBOZXZlUDNBNFlLNkc6aW52YWxpZA==
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 403
|
19
|
+
message: ''
|
20
|
+
headers:
|
21
|
+
content-language:
|
22
|
+
- en
|
23
|
+
content-type:
|
24
|
+
- text/html;charset=utf-8
|
25
|
+
date:
|
26
|
+
- Tue, 24 Jul 2018 20:24:48 GMT
|
27
|
+
server:
|
28
|
+
- nginx
|
29
|
+
vary:
|
30
|
+
- Accept-Encoding
|
31
|
+
content-length:
|
32
|
+
- '303'
|
33
|
+
connection:
|
34
|
+
- Close
|
35
|
+
body:
|
36
|
+
encoding: ASCII-8BIT
|
37
|
+
string: !binary |-
|
38
|
+
PCFkb2N0eXBlIGh0bWw+PGh0bWwgbGFuZz0iZW4iPjxoZWFkPjx0aXRsZT5IVFRQIFN0YXR1cyA0MDMg4oCTIEZvcmJpZGRlbjwvdGl0bGU+PHN0eWxlIHR5cGU9InRleHQvY3NzIj5oMSB7Zm9udC1mYW1pbHk6VGFob21hLEFyaWFsLHNhbnMtc2VyaWY7Y29sb3I6d2hpdGU7YmFja2dyb3VuZC1jb2xvcjojNTI1RDc2O2ZvbnQtc2l6ZToyMnB4O30gaDIge2ZvbnQtZmFtaWx5OlRhaG9tYSxBcmlhbCxzYW5zLXNlcmlmO2NvbG9yOndoaXRlO2JhY2tncm91bmQtY29sb3I6IzUyNUQ3Njtmb250LXNpemU6MTZweDt9IGgzIHtmb250LWZhbWlseTpUYWhvbWEsQXJpYWwsc2Fucy1zZXJpZjtjb2xvcjp3aGl0ZTtiYWNrZ3JvdW5kLWNvbG9yOiM1MjVENzY7Zm9udC1zaXplOjE0cHg7fSBib2R5IHtmb250LWZhbWlseTpUYWhvbWEsQXJpYWwsc2Fucy1zZXJpZjtjb2xvcjpibGFjaztiYWNrZ3JvdW5kLWNvbG9yOndoaXRlO30gYiB7Zm9udC1mYW1pbHk6VGFob21hLEFyaWFsLHNhbnMtc2VyaWY7Y29sb3I6d2hpdGU7YmFja2dyb3VuZC1jb2xvcjojNTI1RDc2O30gcCB7Zm9udC1mYW1pbHk6VGFob21hLEFyaWFsLHNhbnMtc2VyaWY7YmFja2dyb3VuZDp3aGl0ZTtjb2xvcjpibGFjaztmb250LXNpemU6MTJweDt9IGEge2NvbG9yOmJsYWNrO30gYS5uYW1lIHtjb2xvcjpibGFjazt9IC5saW5lIHtoZWlnaHQ6MXB4O2JhY2tncm91bmQtY29sb3I6IzUyNUQ3Njtib3JkZXI6bm9uZTt9PC9zdHlsZT48L2hlYWQ+PGJvZHk+PGgxPkhUVFAgU3RhdHVzIDQwMyDigJMgRm9yYmlkZGVuPC9oMT48L2JvZHk+PC9odG1sPg==
|
39
|
+
http_version:
|
40
|
+
recorded_at: Tue, 24 Jul 2018 20:24:48 GMT
|
41
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: delete
|
5
|
+
uri: https://<SCORM_ENGINE_HOST>/ScormEngineInterface/api/v1/ScormEngineGemTesting-default/registrations/reg-does-not-exist
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- ScormEngine Ruby Gem 0.1.0
|
14
|
+
Authorization:
|
15
|
+
- Basic <BASIC_AUTH>
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 404
|
19
|
+
message: ''
|
20
|
+
headers:
|
21
|
+
content-type:
|
22
|
+
- application/json
|
23
|
+
date:
|
24
|
+
- Wed, 25 Jul 2018 19:35:31 GMT
|
25
|
+
server:
|
26
|
+
- nginx
|
27
|
+
vary:
|
28
|
+
- Accept-Encoding
|
29
|
+
content-length:
|
30
|
+
- '78'
|
31
|
+
connection:
|
32
|
+
- Close
|
33
|
+
body:
|
34
|
+
encoding: ASCII-8BIT
|
35
|
+
string: '{"message":"External Registration ID ''reg-does-not-exist''"}'
|
36
|
+
http_version:
|
37
|
+
recorded_at: Wed, 25 Jul 2018 19:35:31 GMT
|
38
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,32 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: delete
|
5
|
+
uri: https://<SCORM_ENGINE_HOST>/ScormEngineInterface/api/v1/ScormEngineGemTesting-default/registrations/testing-golf-explained-registration-1
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- ScormEngine Ruby Gem 0.1.0
|
14
|
+
Authorization:
|
15
|
+
- Basic <BASIC_AUTH>
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 204
|
19
|
+
message: ''
|
20
|
+
headers:
|
21
|
+
date:
|
22
|
+
- Wed, 25 Jul 2018 19:35:33 GMT
|
23
|
+
server:
|
24
|
+
- nginx
|
25
|
+
connection:
|
26
|
+
- Close
|
27
|
+
body:
|
28
|
+
encoding: UTF-8
|
29
|
+
string: ''
|
30
|
+
http_version:
|
31
|
+
recorded_at: Wed, 25 Jul 2018 19:35:33 GMT
|
32
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://<SCORM_ENGINE_HOST>/ScormEngineInterface/api/v1/ScormEngineGemTesting-default/registrations/reg-does-not-exist
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- ScormEngine Ruby Gem 0.1.0
|
14
|
+
Authorization:
|
15
|
+
- Basic <BASIC_AUTH>
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 404
|
19
|
+
message: ''
|
20
|
+
headers:
|
21
|
+
content-type:
|
22
|
+
- application/json
|
23
|
+
date:
|
24
|
+
- Wed, 25 Jul 2018 17:19:02 GMT
|
25
|
+
server:
|
26
|
+
- nginx
|
27
|
+
vary:
|
28
|
+
- Accept-Encoding
|
29
|
+
content-length:
|
30
|
+
- '78'
|
31
|
+
connection:
|
32
|
+
- Close
|
33
|
+
body:
|
34
|
+
encoding: ASCII-8BIT
|
35
|
+
string: '{"message":"External Registration ID ''reg-does-not-exist''"}'
|
36
|
+
http_version:
|
37
|
+
recorded_at: Wed, 25 Jul 2018 17:19:02 GMT
|
38
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,36 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://<SCORM_ENGINE_HOST>/ScormEngineInterface/api/v1/ScormEngineGemTesting-default/registrations/testing-golf-explained-registration-1
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- ScormEngine Ruby Gem 0.1.0
|
14
|
+
Authorization:
|
15
|
+
- Basic <BASIC_AUTH>
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: ''
|
20
|
+
headers:
|
21
|
+
content-type:
|
22
|
+
- application/json
|
23
|
+
date:
|
24
|
+
- Wed, 25 Jul 2018 17:19:03 GMT
|
25
|
+
server:
|
26
|
+
- nginx
|
27
|
+
content-length:
|
28
|
+
- '15'
|
29
|
+
connection:
|
30
|
+
- Close
|
31
|
+
body:
|
32
|
+
encoding: UTF-8
|
33
|
+
string: '{"exists":true}'
|
34
|
+
http_version:
|
35
|
+
recorded_at: Wed, 25 Jul 2018 17:19:03 GMT
|
36
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,39 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://<SCORM_ENGINE_HOST>/ScormEngineInterface/api/v1/ScormEngineGemTesting-default/registrations/testing-golf-explained-registration-1/instances
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- ScormEngine Ruby Gem 0.1.0
|
14
|
+
Authorization:
|
15
|
+
- Basic <BASIC_AUTH>
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: ''
|
20
|
+
headers:
|
21
|
+
content-type:
|
22
|
+
- application/json
|
23
|
+
date:
|
24
|
+
- Wed, 25 Jul 2018 18:06:55 GMT
|
25
|
+
server:
|
26
|
+
- nginx
|
27
|
+
vary:
|
28
|
+
- Accept-Encoding
|
29
|
+
content-length:
|
30
|
+
- '407'
|
31
|
+
connection:
|
32
|
+
- Close
|
33
|
+
body:
|
34
|
+
encoding: ASCII-8BIT
|
35
|
+
string: '{"registrations":[{"id":"testing-golf-explained-registration-1","xapiRegistrationId":"9bb62334-1985-495e-9c49-b0e50fdb60c8","instance":0,"updated":"2018-07-25T17:57:15.000Z","registrationCompletion":"UNKNOWN","registrationSuccess":"Unknown","totalSecondsTracked":0.0,"firstAccessDate":"2018-07-25T17:54:10.000Z","lastAccessDate":"2018-07-25T17:57:15.000Z","createdDate":"2018-07-25T17:18:56.000Z","course":{"id":"testing-golf-explained","version":0,"title":"Golf
|
36
|
+
Explained - Run-time Basic Calls","courseLearningStandard":"SCORM_2004_3RD_EDITION","registrationCount":2,"updated":"2018-07-24T20:22:19.000Z"},"learner":{"id":"testing-golf-explained-learner-1","firstName":"Arnold","lastName":"Palmer"},"globalObjectives":[],"sharedData":[]}]}'
|
37
|
+
http_version:
|
38
|
+
recorded_at: Wed, 25 Jul 2018 18:06:55 GMT
|
39
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,39 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://<SCORM_ENGINE_HOST>/ScormEngineInterface/api/v1/ScormEngineGemTesting-default/registrations/testing-golf-explained-registration-1/instances
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- ScormEngine Ruby Gem 0.1.0
|
14
|
+
Authorization:
|
15
|
+
- Basic <BASIC_AUTH>
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: ''
|
20
|
+
headers:
|
21
|
+
content-type:
|
22
|
+
- application/json
|
23
|
+
date:
|
24
|
+
- Wed, 25 Jul 2018 18:06:57 GMT
|
25
|
+
server:
|
26
|
+
- nginx
|
27
|
+
vary:
|
28
|
+
- Accept-Encoding
|
29
|
+
content-length:
|
30
|
+
- '407'
|
31
|
+
connection:
|
32
|
+
- Close
|
33
|
+
body:
|
34
|
+
encoding: ASCII-8BIT
|
35
|
+
string: '{"registrations":[{"id":"testing-golf-explained-registration-1","xapiRegistrationId":"9bb62334-1985-495e-9c49-b0e50fdb60c8","instance":0,"updated":"2018-07-25T17:57:15.000Z","registrationCompletion":"UNKNOWN","registrationSuccess":"Unknown","totalSecondsTracked":0.0,"firstAccessDate":"2018-07-25T17:54:10.000Z","lastAccessDate":"2018-07-25T17:57:15.000Z","createdDate":"2018-07-25T17:18:56.000Z","course":{"id":"testing-golf-explained","version":0,"title":"Golf
|
36
|
+
Explained - Run-time Basic Calls","courseLearningStandard":"SCORM_2004_3RD_EDITION","registrationCount":2,"updated":"2018-07-24T20:22:19.000Z"},"learner":{"id":"testing-golf-explained-learner-1","firstName":"Arnold","lastName":"Palmer"},"globalObjectives":[],"sharedData":[]}]}'
|
37
|
+
http_version:
|
38
|
+
recorded_at: Wed, 25 Jul 2018 18:06:58 GMT
|
39
|
+
recorded_with: VCR 4.0.0
|