pupilfirst_xapi 0.3.1 → 0.3.2
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: bdb9ed6c9957df10e29f9f8fac0d5a303ac6ed5f962d78bb27af84be1255f61d
|
4
|
+
data.tar.gz: 361c1a5767d137ee50a99a191bb9906b1ca295bf6074e2c3568b80a5cf5121ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab2a1cba32a1cdc99afeabb7bffc99b022a695989817ac8fe27e7f11894635dedc7befa6a88308af5660ddae6cf9aec8a4d97270bf45e9fb17263eb710d8aa61
|
7
|
+
data.tar.gz: e58f22380039a0235534988affdaaa4f01b208b83e43857908d62e20c17d636b548b9a8da96a616e0bb9d1ed03a77b5627488d5c3d0e0bf8e560d658bcc2d24b
|
@@ -10,10 +10,10 @@ module PupilfirstXapi
|
|
10
10
|
name: course.name,
|
11
11
|
description: course.description
|
12
12
|
).tap do |obj|
|
13
|
+
obj.with_extension('http://id.tincanapi.com/extension/ending-position', course.targets.count)
|
13
14
|
if course.ends_at.present?
|
14
15
|
duration = ActiveSupport::Duration.build(course.ends_at - course.created_at).iso8601
|
15
16
|
obj.with_extension("http://id.tincanapi.com/extension/planned-duration", duration)
|
16
|
-
obj.with_extension('http://id.tincanapi.com/extension/ending-position', course.targets.count)
|
17
17
|
end
|
18
18
|
end.call
|
19
19
|
end
|
data/spec/integration_spec.rb
CHANGED
@@ -15,7 +15,12 @@ RSpec.describe "#xapi", type: :job, perform_jobs: true do
|
|
15
15
|
description: 'These guides are designed to make you immediately productive with Rails',
|
16
16
|
created_at: Time.new(2021,01,01),
|
17
17
|
ends_at: nil,
|
18
|
-
uri: 'https://guides.rubyonrails.org/'
|
18
|
+
uri: 'https://guides.rubyonrails.org/',
|
19
|
+
targets: [
|
20
|
+
double(:target, title: '1st target', description: 'Seems easy'),
|
21
|
+
double(:target, title: '2nd target', description: 'Seems not easy')
|
22
|
+
]
|
23
|
+
)
|
19
24
|
}
|
20
25
|
let(:getting_started) {
|
21
26
|
double(:target,
|
@@ -77,6 +82,7 @@ RSpec.describe "#xapi", type: :job, perform_jobs: true do
|
|
77
82
|
name: {'en-US' => 'Ruby on Rails Guides'},
|
78
83
|
description: {'en-US' => 'These guides are designed to make you immediately productive with Rails'},
|
79
84
|
type: 'http://adlnet.gov/expapi/activities/product',
|
85
|
+
extensions: {"http://id.tincanapi.com/extension/ending-position"=>2}
|
80
86
|
},
|
81
87
|
},
|
82
88
|
timestamp: timestamp.iso8601,
|
@@ -29,7 +29,9 @@ module PupilfirstXapi
|
|
29
29
|
expect(xapi.object.definition.type).to eq 'http://adlnet.gov/expapi/activities/product'
|
30
30
|
expect(xapi.object.definition.name).to eq({'en-US' => 'Rails for Begginers'})
|
31
31
|
expect(xapi.object.definition.description).to eq({'en-US' => 'Seems easy'})
|
32
|
-
expect(xapi.object.definition.extensions).to eq
|
32
|
+
expect(xapi.object.definition.extensions).to eq ({
|
33
|
+
"http://id.tincanapi.com/extension/ending-position" => 2
|
34
|
+
})
|
33
35
|
end
|
34
36
|
|
35
37
|
it do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pupilfirst_xapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GrowthTribe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-05-
|
11
|
+
date: 2021-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|