scorm_engine 0.6.7 → 0.6.8
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8427213f1d3146144b07e07c72bd197f8dede2d4c203c8ed15615a341c4535ef
|
4
|
+
data.tar.gz: 054c0d302e3a6def37a5fd37b5dfa26822caa719a9a7753be21925d9da1cc881
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffaf83eda0604e1a89aa11018f43e5908d0c77fcfcfa4bfabfc61e17d5d4bdee3ff2025226fad20d26a85595119d26b582ca182e72bbad9e8e0ab2f12e5b62ce
|
7
|
+
data.tar.gz: cbe6c17083dc17ea4de1e4e313e7117fa991e0a69cac69e7b7baa6cf0daba5838b42f37dbd60ccd0b7fc9e6bbc24a252d7465024a6da9055c18de7e6dde9e468
|
@@ -36,6 +36,11 @@ module ScormEngine
|
|
36
36
|
# @return [Integer]
|
37
37
|
attr_accessor :registration_cap
|
38
38
|
|
39
|
+
# @attr
|
40
|
+
# The number of registrations created for this dispatch.
|
41
|
+
# @return [Integer]
|
42
|
+
attr_accessor :registration_count
|
43
|
+
|
39
44
|
# @attr
|
40
45
|
# The date after which this dispatch will be disabled as an ISO 8601
|
41
46
|
# string, or "none" for no expiration date.
|
@@ -62,6 +67,7 @@ module ScormEngine
|
|
62
67
|
this.allow_new_registrations = data["allowNewRegistrations"]
|
63
68
|
this.instanced = data["instanced"]
|
64
69
|
this.registration_cap = data["registrationCap"]&.to_i
|
70
|
+
this.registration_count = data["registrationCount"]&.to_i
|
65
71
|
this.expiration_date = get_expiration_date(data)
|
66
72
|
this.external_config = data["externalConfig"]
|
67
73
|
|
data/lib/scorm_engine/version.rb
CHANGED
@@ -126,6 +126,8 @@ RSpec.describe ScormEngine::Api::Endpoints::Dispatches do
|
|
126
126
|
expect(dispatch.id).to eq dispatch_options[:dispatch_id]
|
127
127
|
expect(dispatch.destination_id).to eq dispatch_options[:destination_id]
|
128
128
|
expect(dispatch.course_id).to eq dispatch_options[:course_id]
|
129
|
+
expect(dispatch.registration_cap).to be_a Integer
|
130
|
+
expect(dispatch.registration_count).to be_a Integer
|
129
131
|
end
|
130
132
|
end
|
131
133
|
end
|
@@ -53,6 +53,35 @@ RSpec.describe ScormEngine::Models::Dispatch do
|
|
53
53
|
)
|
54
54
|
expect(dispatch.registration_cap).to eq 123
|
55
55
|
end
|
56
|
+
|
57
|
+
it "is set to zero when not an integer" do
|
58
|
+
dispatch = described_class.new_from_api(
|
59
|
+
"data" => {
|
60
|
+
"registrationCap" => "oops"
|
61
|
+
}
|
62
|
+
)
|
63
|
+
expect(dispatch.registration_cap).to eq 0
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
describe ":registration_count" do
|
68
|
+
it "is set" do
|
69
|
+
dispatch = described_class.new_from_api(
|
70
|
+
"data" => {
|
71
|
+
"registrationCount" => "456"
|
72
|
+
}
|
73
|
+
)
|
74
|
+
expect(dispatch.registration_count).to eq 456
|
75
|
+
end
|
76
|
+
|
77
|
+
it "is set to zero when not an integer" do
|
78
|
+
dispatch = described_class.new_from_api(
|
79
|
+
"data" => {
|
80
|
+
"registrationCount" => "oops"
|
81
|
+
}
|
82
|
+
)
|
83
|
+
expect(dispatch.registration_count).to eq 0
|
84
|
+
end
|
56
85
|
end
|
57
86
|
|
58
87
|
describe ":expiration_date" do
|
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.6.
|
4
|
+
version: 0.6.8
|
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-09-
|
11
|
+
date: 2018-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|