qti 2.3.0 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,236 @@
1
+ PATH
2
+ remote: ../..
3
+ specs:
4
+ qti (2.2.0)
5
+ actionview (>= 5.1.7, < 6.1)
6
+ activesupport (>= 5.1.7, < 6.1)
7
+ dry-struct (~> 0.4.0)
8
+ dry-types (~> 0.12.3)
9
+ mathml2latex (~> 2.0)
10
+ nokogiri (~> 1.10)
11
+ rubyzip (~> 2.0)
12
+ sanitize (~> 5.1)
13
+
14
+ GEM
15
+ remote: https://rubygems.org/
16
+ specs:
17
+ actioncable (6.0.3)
18
+ actionpack (= 6.0.3)
19
+ nio4r (~> 2.0)
20
+ websocket-driver (>= 0.6.1)
21
+ actionmailbox (6.0.3)
22
+ actionpack (= 6.0.3)
23
+ activejob (= 6.0.3)
24
+ activerecord (= 6.0.3)
25
+ activestorage (= 6.0.3)
26
+ activesupport (= 6.0.3)
27
+ mail (>= 2.7.1)
28
+ actionmailer (6.0.3)
29
+ actionpack (= 6.0.3)
30
+ actionview (= 6.0.3)
31
+ activejob (= 6.0.3)
32
+ mail (~> 2.5, >= 2.5.4)
33
+ rails-dom-testing (~> 2.0)
34
+ actionpack (6.0.3)
35
+ actionview (= 6.0.3)
36
+ activesupport (= 6.0.3)
37
+ rack (~> 2.0, >= 2.0.8)
38
+ rack-test (>= 0.6.3)
39
+ rails-dom-testing (~> 2.0)
40
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
41
+ actiontext (6.0.3)
42
+ actionpack (= 6.0.3)
43
+ activerecord (= 6.0.3)
44
+ activestorage (= 6.0.3)
45
+ activesupport (= 6.0.3)
46
+ nokogiri (>= 1.8.5)
47
+ actionview (6.0.3)
48
+ activesupport (= 6.0.3)
49
+ builder (~> 3.1)
50
+ erubi (~> 1.4)
51
+ rails-dom-testing (~> 2.0)
52
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
53
+ activejob (6.0.3)
54
+ activesupport (= 6.0.3)
55
+ globalid (>= 0.3.6)
56
+ activemodel (6.0.3)
57
+ activesupport (= 6.0.3)
58
+ activerecord (6.0.3)
59
+ activemodel (= 6.0.3)
60
+ activesupport (= 6.0.3)
61
+ activestorage (6.0.3)
62
+ actionpack (= 6.0.3)
63
+ activejob (= 6.0.3)
64
+ activerecord (= 6.0.3)
65
+ marcel (~> 0.3.1)
66
+ activesupport (6.0.3)
67
+ concurrent-ruby (~> 1.0, >= 1.0.2)
68
+ i18n (>= 0.7, < 2)
69
+ minitest (~> 5.1)
70
+ tzinfo (~> 1.1)
71
+ zeitwerk (~> 2.2, >= 2.2.2)
72
+ ast (2.4.0)
73
+ builder (3.2.4)
74
+ byebug (11.1.3)
75
+ coderay (1.1.2)
76
+ concurrent-ruby (1.1.6)
77
+ crass (1.0.6)
78
+ diff-lcs (1.3)
79
+ docile (1.3.2)
80
+ dry-configurable (0.11.5)
81
+ concurrent-ruby (~> 1.0)
82
+ dry-core (~> 0.4, >= 0.4.7)
83
+ dry-equalizer (~> 0.2)
84
+ dry-container (0.7.2)
85
+ concurrent-ruby (~> 1.0)
86
+ dry-configurable (~> 0.1, >= 0.1.3)
87
+ dry-core (0.4.9)
88
+ concurrent-ruby (~> 1.0)
89
+ dry-equalizer (0.3.0)
90
+ dry-logic (0.6.1)
91
+ concurrent-ruby (~> 1.0)
92
+ dry-core (~> 0.2)
93
+ dry-equalizer (~> 0.2)
94
+ dry-struct (0.4.0)
95
+ dry-core (~> 0.4, >= 0.4.1)
96
+ dry-equalizer (~> 0.2)
97
+ dry-types (~> 0.12, >= 0.12.2)
98
+ ice_nine (~> 0.11)
99
+ dry-types (0.12.3)
100
+ concurrent-ruby (~> 1.0)
101
+ dry-configurable (~> 0.1)
102
+ dry-container (~> 0.3)
103
+ dry-core (~> 0.2, >= 0.2.1)
104
+ dry-equalizer (~> 0.2)
105
+ dry-logic (~> 0.4, >= 0.4.2)
106
+ inflecto (~> 0.0.0, >= 0.0.2)
107
+ erubi (1.9.0)
108
+ globalid (0.4.2)
109
+ activesupport (>= 4.2.0)
110
+ i18n (1.8.2)
111
+ concurrent-ruby (~> 1.0)
112
+ ice_nine (0.11.2)
113
+ inflecto (0.0.2)
114
+ jaro_winkler (1.5.4)
115
+ loofah (2.5.0)
116
+ crass (~> 1.0.2)
117
+ nokogiri (>= 1.5.9)
118
+ mail (2.7.1)
119
+ mini_mime (>= 0.1.1)
120
+ marcel (0.3.3)
121
+ mimemagic (~> 0.3.2)
122
+ mathml2latex (2.0.0)
123
+ nokogiri (~> 1.10)
124
+ method_source (1.0.0)
125
+ mimemagic (0.3.5)
126
+ mini_mime (1.0.2)
127
+ mini_portile2 (2.4.0)
128
+ minitest (5.14.0)
129
+ nio4r (2.5.2)
130
+ nokogiri (1.10.9)
131
+ mini_portile2 (~> 2.4.0)
132
+ nokogumbo (2.0.2)
133
+ nokogiri (~> 1.8, >= 1.8.4)
134
+ parallel (1.19.1)
135
+ parser (2.7.1.2)
136
+ ast (~> 2.4.0)
137
+ pry (0.13.1)
138
+ coderay (~> 1.1)
139
+ method_source (~> 1.0)
140
+ rack (2.2.2)
141
+ rack-test (1.1.0)
142
+ rack (>= 1.0, < 3)
143
+ rails (6.0.3)
144
+ actioncable (= 6.0.3)
145
+ actionmailbox (= 6.0.3)
146
+ actionmailer (= 6.0.3)
147
+ actionpack (= 6.0.3)
148
+ actiontext (= 6.0.3)
149
+ actionview (= 6.0.3)
150
+ activejob (= 6.0.3)
151
+ activemodel (= 6.0.3)
152
+ activerecord (= 6.0.3)
153
+ activestorage (= 6.0.3)
154
+ activesupport (= 6.0.3)
155
+ bundler (>= 1.3.0)
156
+ railties (= 6.0.3)
157
+ sprockets-rails (>= 2.0.0)
158
+ rails-dom-testing (2.0.3)
159
+ activesupport (>= 4.2.0)
160
+ nokogiri (>= 1.6)
161
+ rails-html-sanitizer (1.3.0)
162
+ loofah (~> 2.3)
163
+ railties (6.0.3)
164
+ actionpack (= 6.0.3)
165
+ activesupport (= 6.0.3)
166
+ method_source
167
+ rake (>= 0.8.7)
168
+ thor (>= 0.20.3, < 2.0)
169
+ rainbow (3.0.0)
170
+ rake (12.3.3)
171
+ rspec (3.9.0)
172
+ rspec-core (~> 3.9.0)
173
+ rspec-expectations (~> 3.9.0)
174
+ rspec-mocks (~> 3.9.0)
175
+ rspec-core (3.9.2)
176
+ rspec-support (~> 3.9.3)
177
+ rspec-expectations (3.9.2)
178
+ diff-lcs (>= 1.2.0, < 2.0)
179
+ rspec-support (~> 3.9.0)
180
+ rspec-mocks (3.9.1)
181
+ diff-lcs (>= 1.2.0, < 2.0)
182
+ rspec-support (~> 3.9.0)
183
+ rspec-support (3.9.3)
184
+ rubocop (0.74.0)
185
+ jaro_winkler (~> 1.5.1)
186
+ parallel (~> 1.10)
187
+ parser (>= 2.6)
188
+ rainbow (>= 2.2.2, < 4.0)
189
+ ruby-progressbar (~> 1.7)
190
+ unicode-display_width (>= 1.4.0, < 1.7)
191
+ ruby-progressbar (1.10.1)
192
+ rubyzip (2.3.0)
193
+ sanitize (5.1.0)
194
+ crass (~> 1.0.2)
195
+ nokogiri (>= 1.8.0)
196
+ nokogumbo (~> 2.0)
197
+ simplecov (0.18.5)
198
+ docile (~> 1.1)
199
+ simplecov-html (~> 0.11)
200
+ simplecov-html (0.12.2)
201
+ sprockets (4.0.0)
202
+ concurrent-ruby (~> 1.0)
203
+ rack (> 1, < 3)
204
+ sprockets-rails (3.2.1)
205
+ actionpack (>= 4.0)
206
+ activesupport (>= 4.0)
207
+ sprockets (>= 3.0.0)
208
+ thor (1.0.1)
209
+ thread_safe (0.3.6)
210
+ tzinfo (1.2.7)
211
+ thread_safe (~> 0.1)
212
+ unicode-display_width (1.6.1)
213
+ websocket-driver (0.7.1)
214
+ websocket-extensions (>= 0.1.0)
215
+ websocket-extensions (0.1.4)
216
+ wwtd (1.4.1)
217
+ zeitwerk (2.3.0)
218
+
219
+ PLATFORMS
220
+ ruby
221
+
222
+ DEPENDENCIES
223
+ bundler (~> 1.17)
224
+ byebug (~> 11.0)
225
+ pry
226
+ qti!
227
+ rails (~> 6.0.0)
228
+ rake (~> 12.3)
229
+ rspec (~> 3.8)
230
+ rspec-mocks (~> 3.8)
231
+ rubocop (~> 0.74.0)
232
+ simplecov
233
+ wwtd (~> 1.4)
234
+
235
+ BUNDLED WITH
236
+ 1.17.3
@@ -48,4 +48,18 @@ describe Qti::Models::Manifest do
48
48
  expect(assessment_test.assessment_items.first[:resource]).not_to eq(nil)
49
49
  end
50
50
  end
51
+
52
+ describe 'object banks' do
53
+ file = File.join(fixtures_path, 'with_banks/imsmanifest.xml')
54
+ manifest = described_class.from_path!(file)
55
+
56
+ it 'has associated content' do
57
+ expect(manifest.associated_content_list.count).to eq(4)
58
+ end
59
+
60
+ it 'loads objectbanks' do
61
+ expect(manifest.objectbanks.count).to eq(3)
62
+ expect(manifest.objectbanks.first).to be_kind_of(Qti::V1::Models::ObjectBank)
63
+ end
64
+ end
51
65
  end
@@ -0,0 +1,39 @@
1
+ describe Qti::V1::Models::ObjectBank do
2
+ describe 'bank loading' do
3
+ [
4
+ 'gf3edf8167be16b3a65a00ca923132b07.xml.qti',
5
+ 'g195e078fb6e3c4054e38e5c9226287ba.xml.qti',
6
+ 'gab22de457404cb5cf022078f1e4da75e.xml.qti'
7
+ ].each do |bankfile|
8
+ file = File.join('spec', 'fixtures', 'with_banks', 'non_cc_assessments', bankfile)
9
+ context "File: #{file}" do
10
+ it 'parses the objectbank without error' do
11
+ expect do
12
+ bank = described_class.from_path!(file)
13
+ expect(bank.assessment_items) # at least one
14
+ end.not_to raise_error
15
+ end
16
+ end
17
+ end
18
+ end
19
+
20
+ describe '#title' do
21
+ it 'missing bank_title defaults to filename' do
22
+ allow(File).to receive(:read).and_return(<<~XML)
23
+ <?xml version="1.0" encoding="UTF-8"?>
24
+ <questestinterop xmlns="http://www.imsglobal.org/xsd/ims_qtiasiv1p2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/ims_qtiasiv1p2 http://www.imsglobal.org/xsd/ims_qtiasiv1p2p1.xsd">
25
+ <objectbank ident="gooblegobble12345">
26
+ <qtimetadata>
27
+ <qtimetadatafield>
28
+ <fieldlabel>not_a_bank_title</fieldlabel>
29
+ <fieldentry>A different metadata entry</fieldentry>
30
+ </qtimetadatafield>
31
+ </qtimetadata>
32
+ </objectbank>
33
+ </questestinterop>
34
+ XML
35
+ objectbank = described_class.new path: '/etc/FakeBank007.xml'
36
+ expect(objectbank.title).to eq 'FakeBank007'
37
+ end
38
+ end
39
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qti
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hannah Bottalla
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-05-19 00:00:00.000000000 Z
12
+ date: 2020-05-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionview
@@ -312,6 +312,7 @@ files:
312
312
  - lib/qti/v1/models/numerics/scoring_data.rb
313
313
  - lib/qti/v1/models/numerics/scoring_node.rb
314
314
  - lib/qti/v1/models/numerics/within_range.rb
315
+ - lib/qti/v1/models/object_bank.rb
315
316
  - lib/qti/v1/models/question_group.rb
316
317
  - lib/qti/v1/models/scoring_data.rb
317
318
  - lib/qti/v1/models/stimulus_item.rb
@@ -604,9 +605,19 @@ files:
604
605
  - spec/fixtures/tests/tests/rtest26.xml
605
606
  - spec/fixtures/tests/tests/rtest27.xml
606
607
  - spec/fixtures/unsupported_version/imsmanifest.xml
608
+ - spec/fixtures/with_banks/g9a20cf3af178b54e4792cbe992f65790/assessment_meta.xml
609
+ - spec/fixtures/with_banks/g9a20cf3af178b54e4792cbe992f65790/assessment_qti.xml
610
+ - spec/fixtures/with_banks/imsmanifest.xml
611
+ - spec/fixtures/with_banks/non_cc_assessments/g195e078fb6e3c4054e38e5c9226287ba.xml.qti
612
+ - spec/fixtures/with_banks/non_cc_assessments/g9a20cf3af178b54e4792cbe992f65790.xml.qti
613
+ - spec/fixtures/with_banks/non_cc_assessments/gab22de457404cb5cf022078f1e4da75e.xml.qti
614
+ - spec/fixtures/with_banks/non_cc_assessments/gf3edf8167be16b3a65a00ca923132b07.xml.qti
607
615
  - spec/gemfiles/rails-5.1.gemfile
616
+ - spec/gemfiles/rails-5.1.gemfile.lock
608
617
  - spec/gemfiles/rails-5.2.gemfile
618
+ - spec/gemfiles/rails-5.2.gemfile.lock
609
619
  - spec/gemfiles/rails-6.0.gemfile
620
+ - spec/gemfiles/rails-6.0.gemfile.lock
610
621
  - spec/lib/qti/assessment_item_exporter_spec.rb
611
622
  - spec/lib/qti/exporter_spec.rb
612
623
  - spec/lib/qti/models/assessment_meta_spec.rb
@@ -635,6 +646,7 @@ files:
635
646
  - spec/lib/qti/v1/models/numerics/scoring_base_spec.rb
636
647
  - spec/lib/qti/v1/models/numerics/scoring_node_spec.rb
637
648
  - spec/lib/qti/v1/models/numerics/within_range_spec.rb
649
+ - spec/lib/qti/v1/models/object_bank_spec.rb
638
650
  - spec/lib/qti/v1/models/question_group_spec.rb
639
651
  - spec/lib/qti/v1/models/stimulus_item_spec.rb
640
652
  - spec/lib/qti/v2/models/assessment_item_spec.rb
@@ -674,7 +686,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
674
686
  - !ruby/object:Gem::Version
675
687
  version: '0'
676
688
  requirements: []
677
- rubygems_version: 3.0.4
689
+ rubyforge_project:
690
+ rubygems_version: 2.6.13
678
691
  signing_key:
679
692
  specification_version: 4
680
693
  summary: QTI 1.2 and 2.1 import and export models
@@ -946,9 +959,19 @@ test_files:
946
959
  - spec/fixtures/tests/tests/rtest26.xml
947
960
  - spec/fixtures/tests/tests/rtest27.xml
948
961
  - spec/fixtures/unsupported_version/imsmanifest.xml
962
+ - spec/fixtures/with_banks/g9a20cf3af178b54e4792cbe992f65790/assessment_meta.xml
963
+ - spec/fixtures/with_banks/g9a20cf3af178b54e4792cbe992f65790/assessment_qti.xml
964
+ - spec/fixtures/with_banks/imsmanifest.xml
965
+ - spec/fixtures/with_banks/non_cc_assessments/g195e078fb6e3c4054e38e5c9226287ba.xml.qti
966
+ - spec/fixtures/with_banks/non_cc_assessments/g9a20cf3af178b54e4792cbe992f65790.xml.qti
967
+ - spec/fixtures/with_banks/non_cc_assessments/gab22de457404cb5cf022078f1e4da75e.xml.qti
968
+ - spec/fixtures/with_banks/non_cc_assessments/gf3edf8167be16b3a65a00ca923132b07.xml.qti
949
969
  - spec/gemfiles/rails-5.1.gemfile
970
+ - spec/gemfiles/rails-5.1.gemfile.lock
950
971
  - spec/gemfiles/rails-5.2.gemfile
972
+ - spec/gemfiles/rails-5.2.gemfile.lock
951
973
  - spec/gemfiles/rails-6.0.gemfile
974
+ - spec/gemfiles/rails-6.0.gemfile.lock
952
975
  - spec/lib/qti/assessment_item_exporter_spec.rb
953
976
  - spec/lib/qti/exporter_spec.rb
954
977
  - spec/lib/qti/models/assessment_meta_spec.rb
@@ -977,6 +1000,7 @@ test_files:
977
1000
  - spec/lib/qti/v1/models/numerics/scoring_base_spec.rb
978
1001
  - spec/lib/qti/v1/models/numerics/scoring_node_spec.rb
979
1002
  - spec/lib/qti/v1/models/numerics/within_range_spec.rb
1003
+ - spec/lib/qti/v1/models/object_bank_spec.rb
980
1004
  - spec/lib/qti/v1/models/question_group_spec.rb
981
1005
  - spec/lib/qti/v1/models/stimulus_item_spec.rb
982
1006
  - spec/lib/qti/v2/models/assessment_item_spec.rb