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: 9af22d07f8c93f261b7174d2e9e7c0718556931f7f09ec7e3efe91a20d6d6fa6
4
- data.tar.gz: 5414db57b6f4f3b6851fc6c1c5938cbe918dab54cbdc3e41666e135fa788f6b3
3
+ metadata.gz: bdb9ed6c9957df10e29f9f8fac0d5a303ac6ed5f962d78bb27af84be1255f61d
4
+ data.tar.gz: 361c1a5767d137ee50a99a191bb9906b1ca295bf6074e2c3568b80a5cf5121ce
5
5
  SHA512:
6
- metadata.gz: 5dbadb2c9cbbb1d501162bc3fd325aac8a9f2d44566a870942031fe7dba223292c4afe532a60a21a3eb2afa3393f9adb82277fb073ddb330c7cff8c6fb6482e0
7
- data.tar.gz: 8710df83e5839915c2792edb71c9dde22bfb21c52e6aa1ca4b11641e645ee409e30c81011a8b27220d7c84fed0bc4cacf4f34977b1b4272d08aba9ca04d927b4
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
@@ -1,3 +1,3 @@
1
1
  module PupilfirstXapi
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  end
@@ -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 nil
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.1
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-14 00:00:00.000000000 Z
11
+ date: 2021-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails