scorm_engine 0.5.0 → 0.5.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ff69517fb643c333ea401a1f4668c3a73fcc1523e2d5c561a344ca8ca7d719e1
4
- data.tar.gz: 8d4faf65f7c760ef302e0266da927feaf22c106fd3e1fcd28360bf5a248245ea
3
+ metadata.gz: 3246d59fdd0874244840cebb2288fe9d5ed8015ed2d681a93ed922af4eee2188
4
+ data.tar.gz: 729f776ad2eaf51a53c1c565a385270d89fd453ba58327c3ad5d89d11de99e12
5
5
  SHA512:
6
- metadata.gz: 29e6cf40320aa22f3d0c7615dfdd55454d8f66d8421ee7a6146e38a80d4007b887dc20ec17cd42b31c17f67c1b2a22e525f123bb8155882bfa5d5580bd869b30
7
- data.tar.gz: 78e6f7f1bcad9de552d7f340c64882bcaa194908a646613c5c897be9a24fc4c774c9cd390347afb8eadd482b4d7bd496efc4328adad76ca58eed9ecdb5cfc532
6
+ metadata.gz: d8e0ecc00812974568bc279b8695acc590e03e0a12eec68688e127bda3a47e41ef618e19f43da9dae298ffb27032c8b49df7dd93974b1d0762334011af5d2479
7
+ data.tar.gz: 7a3e8b88525c3a65110a8fef1c011f4a6945210b3840f343cb7de44a611f710d4ba17fc6c565b809fb14ae6f87d226e0195bf2adeb239706f539109745a021bd
@@ -224,9 +224,9 @@ module ScormEngine
224
224
  # of these settings are read from your configuration, so only specify
225
225
  # this if you need to control it on a per-registration basis.
226
226
  #
227
- # @option options [String] :post_back/:auth_type ("form")
227
+ # @option options [String] :post_back/:auth_type ("FORM")
228
228
  # Optional parameter to specify how to authorize against the given
229
- # postbackurl, can be 'form' or 'httpbasic'. If form authentication,
229
+ # postbackurl, can be 'FORM' or 'HTTPBASIC'. If form authentication,
230
230
  # the username and password for authentication are submitted as form
231
231
  # fields 'username' and 'password', and the registration data as the
232
232
  # form field 'data'. If HTTP Basic Authentication is used, the
@@ -17,6 +17,13 @@ module ScormEngine
17
17
  # @return [String] (SCORM_11, SCORM_12, SCORM_2004_2ND_EDITION, SCORM_2004_3RD_EDITION, SCORM_2004_4TH_EDITION, AICC, XAPI, CMI5)
18
18
  attr_accessor :course_learning_standard
19
19
 
20
+ # @attr
21
+ # The web path at which the course's contents is hosted. For AICC
22
+ # courses, refer to the href proprety of the child activities as this
23
+ # value will not be available.
24
+ # @return [String]
25
+ attr_accessor :web_path
26
+
20
27
  def self.new_from_api(options = {})
21
28
  this = new
22
29
 
@@ -29,6 +36,7 @@ module ScormEngine
29
36
  this.description = options.fetch("metadata", {})["description"]
30
37
  this.scaled_passing_score = get_scaled_passing_score_from_api(options)
31
38
  this.course_learning_standard = options["courseLearningStandard"]
39
+ this.web_path = options["webPath"]
32
40
 
33
41
  this
34
42
  end
@@ -1,3 +1,3 @@
1
1
  module ScormEngine
2
- VERSION = "0.5.0".freeze
2
+ VERSION = "0.5.1".freeze
3
3
  end
@@ -126,6 +126,8 @@ RSpec.describe ScormEngine::Api::Endpoints::Courses do
126
126
  expect(course.registration_count).to be >= 0
127
127
  expect(course.updated).to be_a Time
128
128
  expect(course.description).to eq nil
129
+ expect(course.course_learning_standard).to eq "SCORM_2004_3RD_EDITION"
130
+ expect(course.web_path).to eq "/courses/ScormEngineGemTesting-default/testing-golf-explained/0"
129
131
  end
130
132
  end
131
133
  end
@@ -97,5 +97,14 @@ RSpec.describe ScormEngine::Models::Course do
97
97
  expect(course.course_learning_standard).to eq "SCORM_2004_4TH_EDITION"
98
98
  end
99
99
  end
100
+
101
+ describe ":web_path" do
102
+ it "is set properly" do
103
+ course = described_class.new_from_api(
104
+ "webPath" => "/courses/tenant/courseid/0"
105
+ )
106
+ expect(course.course_learning_standard).to eq "/courses/tenant/courseid/0"
107
+ end
108
+ end
100
109
  end
101
110
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scorm_engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philip Hallstrom
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-21 00:00:00.000000000 Z
11
+ date: 2018-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday