scorm_engine 0.8.2 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. checksums.yaml +4 -4
  2. data/lib/scorm_engine/api/endpoints/configuration.rb +31 -1
  3. data/lib/scorm_engine/version.rb +1 -1
  4. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_About/_get_about/is_successful.yml +6 -6
  5. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_About/_get_about/knows_the_platform.yml +6 -6
  6. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_About/_get_about/knows_the_version.yml +6 -6
  7. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_About/_get_about_user_count/accepts_before_option.yml +7 -7
  8. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_About/_get_about_user_count/accepts_since_option.yml +8 -8
  9. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_About/_get_about_user_count/is_successful.yml +7 -7
  10. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_About/_get_about_user_count/tracks_combined_counts.yml +7 -7
  11. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_About/_get_about_user_count/tracks_per_tenantcounts.yml +7 -7
  12. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Configuration/_delete_app_configuration/fails_when_settings_are_invalid.yml +46 -0
  13. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Configuration/_delete_app_configuration/is_successful.yml +42 -0
  14. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Configuration/_get_app_configuration/includeMetadata/is_successful.yml +931 -0
  15. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Configuration/_get_app_configuration/includeMetadata/returns_metadata_in_raw_response_when_included_in_options.yml +931 -0
  16. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Configuration/_get_app_configuration/is_successful.yml +16 -16
  17. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Configuration/_get_app_configuration/returns_settings_and_values.yml +16 -16
  18. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Configuration/_post_app_configuration/fails_when_settings_are_invalid.yml +6 -6
  19. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Configuration/_post_app_configuration/is_successful.yml +6 -6
  20. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Configuration/_post_app_configuration/persists_the_settings.yml +44 -44
  21. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_delete_course/fails_when_id_is_invalid.yml +5 -5
  22. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_delete_course/works.yml +5 -5
  23. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_course_detail/fails_when_id_is_invalid.yml +5 -5
  24. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_course_detail/is_successful.yml +6 -6
  25. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_course_detail/results/sucessfully_creates_the_Course_attributes.yml +6 -6
  26. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_course_preview/fails_when_id_is_invalid.yml +5 -5
  27. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_course_preview/is_successful.yml +7 -7
  28. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_course_preview/results/returns_a_URL_string.yml +7 -7
  29. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_courses/_course_id_option/fetches_a_single_course_but_perhaps_multiple_versions.yml +6 -6
  30. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_courses/_course_id_option/returns_404_when_ID_is_invalid.yml +5 -5
  31. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_courses/_more_option_pagination_/returns_all_the_courses.yml +35 -80
  32. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_courses/_more_option_pagination_/returns_the_more_key_in_the_raw_response.yml +16 -16
  33. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_courses/_since_option/fails_when_passed_an_invalid_value.yml +5 -5
  34. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_courses/_since_option/works.yml +26 -23
  35. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_courses/is_successful.yml +16 -16
  36. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_courses/results/is_an_enumerator_of_Course_models.yml +16 -16
  37. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_courses/results/sucessfully_creates_the_Course_attributes.yml +16 -16
  38. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_get_course_configuration/fails_when_id_is_invalid.yml +5 -5
  39. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_get_course_configuration/is_successful.yml +7 -7
  40. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_get_course_configuration/results/makes_settings_available_as_key/value_pairs.yml +7 -7
  41. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_get_course_configuration_setting/fails_when_course_id_is_invalid.yml +5 -5
  42. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_get_course_configuration_setting/fails_when_setting_id_is_invalid.yml +5 -5
  43. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_get_course_configuration_setting/is_successful.yml +10 -10
  44. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_get_course_configuration_setting/results/returns_the_value_as_a_string.yml +10 -10
  45. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_post_course_configuration/fails_when_id_is_invalid.yml +5 -5
  46. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_post_course_configuration/fails_when_settings_are_invalid.yml +5 -5
  47. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_post_course_configuration/is_successful.yml +5 -5
  48. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_post_course_configuration/persists_the_settings.yml +25 -25
  49. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_put_course_configuration_setting/fails_when_course_id_is_invalid.yml +5 -5
  50. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_put_course_configuration_setting/fails_when_setting_id_is_invalid.yml +5 -5
  51. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_put_course_configuration_setting/is_successful.yml +13 -13
  52. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Configuration/_put_course_configuration_setting/results/persists_the_changes.yml +20 -20
  53. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Import/_get_course_import/successful_imports/works.yml +31 -31
  54. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Import/_get_course_import/unsuccessful_imports/fails_to_import_given_an_invalid_url.yml +20 -63
  55. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses_Import/_post_course_import/unsuccessful_imports/fails_to_import_a_previously_existing_course.yml +5 -5
  56. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Destinations/_delete_destination/returns_success_even_when_id_is_invalid.yml +5 -5
  57. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Destinations/_delete_destination/works.yml +5 -5
  58. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Destinations/_get_destination/fails_when_id_is_invalid.yml +5 -5
  59. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Destinations/_get_destination/is_successful.yml +5 -5
  60. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Destinations/_get_destination/results/sucessfully_creates_the_destination_attributes.yml +5 -5
  61. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Destinations/_get_destination_dispatches_registration_count/fails_when_invalid.yml +5 -5
  62. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Destinations/_get_destination_dispatches_registration_count/works.yml +5 -5
  63. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Destinations/_get_destinations/_more_option_pagination_/returns_all_the_destinations.yml +14 -14
  64. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Destinations/_get_destinations/_more_option_pagination_/returns_the_more_key_in_the_raw_response.yml +7 -7
  65. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Destinations/_get_destinations/_since_option/fails_when_passed_an_invalid_value.yml +5 -5
  66. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Destinations/_get_destinations/_since_option/works.yml +7 -6
  67. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Destinations/_get_destinations/is_successful.yml +7 -7
  68. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Destinations/_get_destinations/results/is_an_enumerator_of_Destination_models.yml +7 -7
  69. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Destinations/_get_destinations/results/sucessfully_creates_the_Destination_attributes.yml +51 -7
  70. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Destinations/_post_destination/is_successful.yml +10 -10
  71. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Destinations/_post_destination/is_successful_even_if_the_destination_id_is_not_unique.yml +5 -5
  72. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Destinations/_post_destination_dispatches_enabled/fails_when_invalid.yml +5 -5
  73. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Destinations/_post_destination_dispatches_enabled/works_when_false.yml +5 -5
  74. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Destinations/_post_destination_dispatches_enabled/works_when_true.yml +4 -4
  75. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Destinations/_post_destination_dispatches_registration_instancing/fails_when_invalid.yml +5 -5
  76. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Destinations/_post_destination_dispatches_registration_instancing/works_when_false.yml +5 -5
  77. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Destinations/_post_destination_dispatches_registration_instancing/works_when_true.yml +5 -5
  78. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Destinations/_put_destination/is_successful.yml +5 -5
  79. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Destinations/_put_destination/results/sucessfully_creates_the_destination_attributes.yml +10 -10
  80. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_delete_dispatch/returns_success_even_when_id_is_invalid.yml +5 -5
  81. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_delete_dispatch/works.yml +5 -5
  82. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_delete_dispatch_registration_count/is_successful.yml +5 -5
  83. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_delete_dispatch_registration_count/succeeds_even_when_id_is_invalid.yml +5 -5
  84. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_get_dispatch/fails_when_id_is_invalid.yml +5 -5
  85. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_get_dispatch/is_successful.yml +7 -7
  86. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_get_dispatch/results/sucessfully_creates_the_dispatch_attributes.yml +6 -6
  87. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_get_dispatch_enabled/is_false_when_disabled.yml +10 -10
  88. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_get_dispatch_enabled/is_true_when_enabled.yml +10 -10
  89. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_get_dispatch_registration_count/fails_when_id_is_invalid.yml +10 -10
  90. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_get_dispatch_registration_count/is_successful.yml +11 -11
  91. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_get_dispatch_registration_count/results/sucessfully_creates_the_dispatch_attributes.yml +11 -11
  92. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_get_dispatch_zip/fails_given_an_invalid_id.yml +5 -5
  93. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_get_dispatch_zip/fails_given_an_invalid_type.yml +5 -5
  94. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_get_dispatch_zip/works.yml +8 -8
  95. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_get_dispatch_zip/works_when_type_is_AICC.yml +7 -7
  96. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_get_dispatch_zip/works_when_type_is_SCORM12.yml +6 -6
  97. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_get_dispatch_zip/works_when_type_is_SCORM2004-3RD.yml +8 -8
  98. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_get_dispatches/_more_option_pagination_/returns_all_the_dispatches.yml +17 -17
  99. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_get_dispatches/_more_option_pagination_/returns_the_more_key_in_the_raw_response.yml +7 -7
  100. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_get_dispatches/_since_option/fails_when_passed_an_invalid_value.yml +4 -4
  101. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_get_dispatches/_since_option/works.yml +7 -7
  102. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_get_dispatches/is_successful.yml +7 -7
  103. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_get_dispatches/results/is_an_enumerator_of_dispatch_models.yml +6 -6
  104. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_get_dispatches/results/sucessfully_creates_the_dispatch_attributes.yml +8 -8
  105. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_post_dispatch/is_successful.yml +10 -10
  106. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_post_dispatch/updates_if_same_dispatch_id.yml +19 -19
  107. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_put_dispatch/is_successful.yml +5 -5
  108. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_put_dispatch/results/sucessfully_creates_the_dispatch_attributes.yml +11 -11
  109. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_put_dispatch_enabled/fails_when_invalid.yml +5 -5
  110. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_put_dispatch_enabled/works_when_false.yml +5 -5
  111. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Dispatches/_put_dispatch_enabled/works_when_true.yml +5 -5
  112. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Ping/_get_ping/is_successful.yml +6 -6
  113. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Ping/_get_ping/reports_the_api_is_up.yml +6 -6
  114. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Ping/_get_ping/with_invalid_password/is_unsuccessful.yml +5 -5
  115. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Ping/_get_ping/with_invalid_password/returns_status_403.yml +4 -4
  116. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_delete_registration/is_failure_when_registration_does_not_exist.yml +5 -5
  117. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_delete_registration/is_successful_when_registration_exists.yml +5 -5
  118. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registration_exists/is_false_when_registration_does_not_exist.yml +5 -5
  119. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registration_exists/is_true_when_registration_exists.yml +5 -5
  120. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registration_instances/includes_results_we_expect.yml +7 -7
  121. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registration_instances/is_successful.yml +7 -7
  122. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registration_instances/returns_an_array_of_registrations.yml +7 -7
  123. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registration_launch_link/fails_when_id_is_invalid.yml +5 -5
  124. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registration_launch_link/is_successful.yml +5 -5
  125. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registration_launch_link/results/returns_a_URL_string.yml +5 -5
  126. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registration_progress/detail/does_not_return_activity_details_by_default.yml +7 -7
  127. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registration_progress/detail/returns_activity_details_if_requested.yml +7 -7
  128. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registration_progress/fails_when_registration_does_not_exist.yml +5 -5
  129. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registration_progress/returns_a_registration_when_it_exists.yml +7 -7
  130. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registrations/filtering_by_course_id/excludes_results.yml +5 -5
  131. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registrations/filtering_by_course_id/includes_results.yml +7 -7
  132. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registrations/filtering_by_learner_id/excludes_results.yml +5 -5
  133. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registrations/filtering_by_learner_id/includes_results.yml +7 -7
  134. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registrations/includes_results_we_expect.yml +7 -7
  135. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registrations/is_successful.yml +7 -7
  136. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_get_registrations/returns_an_array_of_registrations.yml +7 -7
  137. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_post_registration/fails_if_course_id_is_invalid.yml +5 -5
  138. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_post_registration/fails_if_registration_id_already_exists.yml +5 -5
  139. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_post_registration/is_successful.yml +10 -10
  140. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations/_post_registration/is_successful_even_when_given_a_UTF8/slashed_username.yml +10 -10
  141. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_get_registration_configuration/fails_when_id_is_invalid.yml +5 -5
  142. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_get_registration_configuration/is_successful.yml +8 -8
  143. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_get_registration_configuration/results/makes_settings_available_as_key/value_pairs.yml +7 -7
  144. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_get_registration_configuration_setting/fails_when_registration_id_is_invalid.yml +5 -5
  145. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_get_registration_configuration_setting/fails_when_setting_id_is_invalid.yml +5 -5
  146. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_get_registration_configuration_setting/is_successful.yml +10 -10
  147. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_get_registration_configuration_setting/results/returns_the_value_as_a_string.yml +10 -10
  148. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_post_registration_configuration/fails_when_id_is_invalid.yml +5 -5
  149. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_post_registration_configuration/fails_when_settings_are_invalid.yml +5 -5
  150. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_post_registration_configuration/is_successful.yml +5 -5
  151. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_post_registration_configuration/persists_the_settings.yml +24 -24
  152. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_put_registration_configuration_setting/fails_when_registration_id_is_invalid.yml +5 -5
  153. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_put_registration_configuration_setting/fails_when_setting_id_is_invalid.yml +5 -5
  154. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_put_registration_configuration_setting/is_successful.yml +12 -12
  155. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_Configuration/_put_registration_configuration_setting/results/persists_the_changes.yml +18 -18
  156. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_LaunchHistory/_get_registration_launch_history/fails_when_registration_does_not_exist.yml +5 -5
  157. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_LaunchHistory/_get_registration_launch_history/is_successful.yml +5 -5
  158. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Registrations_LaunchHistory/_get_registration_launch_history/returns_an_array_of_registration_launch_histories.yml +5 -5
  159. data/spec/scorm_engine/api/endpoints/about_spec.rb +1 -1
  160. data/spec/scorm_engine/api/endpoints/configuration_spec.rb +32 -1
  161. data/spec/scorm_engine/api/endpoints/courses_spec.rb +2 -3
  162. metadata +6 -3
  163. data/spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_course_preview/results/returns_a_URL_string_containing_a_signed_jwt.yml +0 -46
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: ''
9
9
  headers:
10
10
  User-Agent:
11
- - ScormEngine Ruby Gem 0.8.1
11
+ - ScormEngine Ruby Gem 0.8.2
12
12
  Authorization:
13
13
  - Basic <BASIC_AUTH>
14
14
  response:
@@ -23,7 +23,7 @@ http_interactions:
23
23
  connection:
24
24
  - close
25
25
  date:
26
- - Fri, 25 Sep 2020 23:08:41 GMT
26
+ - Tue, 10 Nov 2020 22:57:35 GMT
27
27
  p3p:
28
28
  - CP="NOI"
29
29
  server:
@@ -33,14 +33,14 @@ http_interactions:
33
33
  x-cache:
34
34
  - Miss from cloudfront
35
35
  via:
36
- - 1.1 a2a145b915c6e207f03377a67fbebd5f.cloudfront.net (CloudFront)
36
+ - 1.1 7a609f410daa3b15339ef0cc23dbb296.cloudfront.net (CloudFront)
37
37
  x-amz-cf-pop:
38
38
  - SLC50-C1
39
39
  x-amz-cf-id:
40
- - va28RY8VJARK-w3ZAFuIeMU2KPoiZJkbLkRWAvw31SKiVW5B88y4Ow==
40
+ - mGgWJgrKb-04tMZh0gamYF2jMpDDomnNG_RCoLwmz938XhnisInq_Q==
41
41
  body:
42
42
  encoding: UTF-8
43
43
  string: '{"launchHistory":[]}'
44
44
  http_version:
45
- recorded_at: Fri, 25 Sep 2020 23:08:41 GMT
45
+ recorded_at: Tue, 10 Nov 2020 22:57:36 GMT
46
46
  recorded_with: VCR 4.0.0
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: ''
9
9
  headers:
10
10
  User-Agent:
11
- - ScormEngine Ruby Gem 0.8.1
11
+ - ScormEngine Ruby Gem 0.8.2
12
12
  Authorization:
13
13
  - Basic <BASIC_AUTH>
14
14
  response:
@@ -23,7 +23,7 @@ http_interactions:
23
23
  connection:
24
24
  - close
25
25
  date:
26
- - Fri, 25 Sep 2020 23:08:41 GMT
26
+ - Tue, 10 Nov 2020 22:57:36 GMT
27
27
  p3p:
28
28
  - CP="NOI"
29
29
  server:
@@ -33,14 +33,14 @@ http_interactions:
33
33
  x-cache:
34
34
  - Miss from cloudfront
35
35
  via:
36
- - 1.1 dc6b456d2b062aa3de2642bc312fc394.cloudfront.net (CloudFront)
36
+ - 1.1 ec99de6a8df96b4e008b942ab98e6595.cloudfront.net (CloudFront)
37
37
  x-amz-cf-pop:
38
38
  - SLC50-C1
39
39
  x-amz-cf-id:
40
- - 908szj7kgyOwky3LzsWnkSHS5fmZ0ymujA16FCksVKqBWkdKztsspw==
40
+ - hYt9UJ6CvCcSUeM2YDx903U1mq8Do7gqevakWTL2RG8ue_pNLBCd6A==
41
41
  body:
42
42
  encoding: UTF-8
43
43
  string: '{"launchHistory":[]}'
44
44
  http_version:
45
- recorded_at: Fri, 25 Sep 2020 23:08:41 GMT
45
+ recorded_at: Tue, 10 Nov 2020 22:57:36 GMT
46
46
  recorded_with: VCR 4.0.0
@@ -7,7 +7,7 @@ RSpec.describe ScormEngine::Api::Endpoints::About do
7
7
  end
8
8
 
9
9
  it "knows the version" do
10
- expect(subject.result.version).to eq "20.1.11.284"
10
+ expect(subject.result.version).to eq "20.1.12.336"
11
11
  end
12
12
 
13
13
  it "knows the platform" do
@@ -10,6 +10,18 @@ RSpec.describe ScormEngine::Api::Endpoints::Configuration do
10
10
  expect(subject.result.UserCountReportLookBackDays).to be_truthy
11
11
  expect(subject.result["UserCountReportDaysBetweenReports"]).to be_truthy
12
12
  end
13
+
14
+ describe "includeMetadata" do
15
+ let(:subject) { scorm_engine_client.get_app_configuration(includeMetadata: true) }
16
+
17
+ it "is successful" do
18
+ expect(subject.success?).to eq true
19
+ end
20
+
21
+ it "returns metadata in raw_response when included in options" do
22
+ expect(subject.raw_response.body['settingItems'].first["metadata"]).to_not be_nil
23
+ end
24
+ end
13
25
  end
14
26
 
15
27
  describe "#post_app_configuration" do
@@ -31,11 +43,13 @@ RSpec.describe ScormEngine::Api::Endpoints::Configuration do
31
43
  expect(configuration["UserCountReportLookBackDays"]).to eq "90"
32
44
  expect(configuration["UserCountReportDaysBetweenReports"]).to eq "20"
33
45
 
34
- subject.post_app_configuration(
46
+ resp = subject.post_app_configuration(
35
47
  settings: { "UserCountReportLookBackDays" => "365",
36
48
  "UserCountReportDaysBetweenReports" => 30 }
37
49
  )
38
50
 
51
+ sleep 3 # there seems to be a delay between posting new values and when they're updated frd
52
+
39
53
  configuration = subject.get_app_configuration.result
40
54
  expect(configuration["UserCountReportLookBackDays"]).to eq "365"
41
55
  expect(configuration["UserCountReportDaysBetweenReports"]).to eq "30"
@@ -48,4 +62,21 @@ RSpec.describe ScormEngine::Api::Endpoints::Configuration do
48
62
  expect(response.message).to match(/NonExistentSettingTotesBogus is not a valid setting ID/)
49
63
  end
50
64
  end
65
+
66
+ describe "#delete_app_configuration" do
67
+ let(:subject) { scorm_engine_client }
68
+ let(:response) {
69
+ subject.delete_app_configuration(setting_id: "UserCountReportLookBackDays")
70
+ }
71
+
72
+ it "is successful" do
73
+ expect(response.success?).to eq true
74
+ end
75
+ it "fails when settings are invalid" do
76
+ response = subject.delete_app_configuration(setting_id: "NonExistentSettingTotesBogus")
77
+ expect(response.success?).to eq false
78
+ expect(response.status).to eq 400
79
+ expect(response.message).to match(/NonExistentSettingTotesBogus/)
80
+ end
81
+ end
51
82
  end
@@ -25,7 +25,6 @@ RSpec.describe ScormEngine::Api::Endpoints::Courses do
25
25
  course = courses.results.detect { |c| c.id == "testing-golf-explained" }
26
26
  expect(course.version).to be >= 0
27
27
  expect(course.title).to eq "Golf Explained - Run-time Basic Calls"
28
- expect(course.registration_count).to eq 1
29
28
  expect(course.updated).to be_a Time
30
29
  expect(course.description).to eq nil
31
30
  end
@@ -151,8 +150,8 @@ RSpec.describe ScormEngine::Api::Endpoints::Courses do
151
150
  describe "results" do
152
151
  it "returns a URL string" do
153
152
  url = response.result
154
- expect(url).to match(%r{/ScormEngineInterface/defaultui/launch.jsp\?jwt=.*})
155
- # expect(url).to match(%r{/defaultui/launch.jsp\?.*testing-golf-explained.*RedirectOnExitUrl=https%3A%2F%2Fexample.com})
153
+ # expect(url).to match(%r{/ScormEngineInterface/defaultui/launch.jsp\?jwt=.*})
154
+ expect(url).to match(%r{/defaultui/launch.jsp\?.*testing-golf-explained.*RedirectOnExitUrl=https%3A%2F%2Fexample.com})
156
155
  end
157
156
  end
158
157
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scorm_engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philip Hallstrom
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2020-09-28 00:00:00.000000000 Z
12
+ date: 2020-11-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
@@ -220,6 +220,10 @@ files:
220
220
  - spec/fixtures/vcr/ScormEngine_Api_Endpoints_About/_get_about_user_count/is_successful.yml
221
221
  - spec/fixtures/vcr/ScormEngine_Api_Endpoints_About/_get_about_user_count/tracks_combined_counts.yml
222
222
  - spec/fixtures/vcr/ScormEngine_Api_Endpoints_About/_get_about_user_count/tracks_per_tenantcounts.yml
223
+ - spec/fixtures/vcr/ScormEngine_Api_Endpoints_Configuration/_delete_app_configuration/fails_when_settings_are_invalid.yml
224
+ - spec/fixtures/vcr/ScormEngine_Api_Endpoints_Configuration/_delete_app_configuration/is_successful.yml
225
+ - spec/fixtures/vcr/ScormEngine_Api_Endpoints_Configuration/_get_app_configuration/includeMetadata/is_successful.yml
226
+ - spec/fixtures/vcr/ScormEngine_Api_Endpoints_Configuration/_get_app_configuration/includeMetadata/returns_metadata_in_raw_response_when_included_in_options.yml
223
227
  - spec/fixtures/vcr/ScormEngine_Api_Endpoints_Configuration/_get_app_configuration/is_successful.yml
224
228
  - spec/fixtures/vcr/ScormEngine_Api_Endpoints_Configuration/_get_app_configuration/returns_settings_and_values.yml
225
229
  - spec/fixtures/vcr/ScormEngine_Api_Endpoints_Configuration/_post_app_configuration/fails_when_settings_are_invalid.yml
@@ -233,7 +237,6 @@ files:
233
237
  - spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_course_preview/fails_when_id_is_invalid.yml
234
238
  - spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_course_preview/is_successful.yml
235
239
  - spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_course_preview/results/returns_a_URL_string.yml
236
- - spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_course_preview/results/returns_a_URL_string_containing_a_signed_jwt.yml
237
240
  - spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_courses/_course_id_option/fetches_a_single_course_but_perhaps_multiple_versions.yml
238
241
  - spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_courses/_course_id_option/returns_404_when_ID_is_invalid.yml
239
242
  - spec/fixtures/vcr/ScormEngine_Api_Endpoints_Courses/_get_courses/_more_option_pagination_/returns_all_the_courses.yml
@@ -1,46 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://<SCORM_ENGINE_HOST>/ScormEngineInterface/api/v1/ScormEngineGemTesting-default/courses/testing-golf-explained/preview?redirectOnExitUrl=https%3A%2F%2Fexample.com
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - ScormEngine Ruby Gem 0.8.1
12
- Authorization:
13
- - Basic <BASIC_AUTH>
14
- response:
15
- status:
16
- code: 200
17
- message: OK
18
- headers:
19
- content-type:
20
- - application/json
21
- content-length:
22
- - '241'
23
- connection:
24
- - close
25
- date:
26
- - Mon, 28 Sep 2020 20:29:44 GMT
27
- p3p:
28
- - CP="NOI"
29
- server:
30
- - Apache
31
- x-xss-protection:
32
- - 1; mode=block
33
- x-cache:
34
- - Miss from cloudfront
35
- via:
36
- - 1.1 b2e880ac67c1fba390623b9fc04bd63a.cloudfront.net (CloudFront)
37
- x-amz-cf-pop:
38
- - DEN50-C2
39
- x-amz-cf-id:
40
- - 2SEzzNJym9sJS_gDUElR4FiwiFxUwm78gpD2njfiu8Iw7sQAvpodzA==
41
- body:
42
- encoding: UTF-8
43
- string: '{"launchLink":"/ScormEngineInterface/defaultui/launch.jsp?package=ApiCourseId%7Ctesting-golf-explained%21VersionId%7C0&configuration=ScormEngineGemTesting-default&tracking=false&RedirectOnExitUrl=https%3A%2F%2Fexample.com&forceReview=false"}'
44
- http_version:
45
- recorded_at: Mon, 28 Sep 2020 20:29:44 GMT
46
- recorded_with: VCR 4.0.0