mumuki-sqlite-runner 3.3.3 → 3.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/test_hook.rb +11 -0
- data/lib/version_hook.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd53507ebff39f0daa4369c29adbc3b7fa0650eccc2f3ef7abd6de296ffbbe00
|
4
|
+
data.tar.gz: ec8829a963f3cbb38b2d18b904a60aff7d54c10ba269fa19333121a89d5b5b52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6283b043775cc86885562d72c8d81430d4b395945f124d9e79d27f542f9737f476eaef3c3aab389e616f9df942219285df8d028ae72d9ae5ccc0b1814d2861be
|
7
|
+
data.tar.gz: 69843d6ede2fdf6be2213afecadc4f2b171c816bd32003c60f03e21c61656fada03cb3ab645eb01f5d3ee1bcfe325c27f35cebd56f68f2451c28a4d87cb16d74
|
data/lib/test_hook.rb
CHANGED
@@ -49,9 +49,20 @@ class SqliteTestHook < Mumukit::Templates::FileHook
|
|
49
49
|
expected.map!.with_index do |expect, i|
|
50
50
|
@tests[i].choose_solution expect
|
51
51
|
end
|
52
|
+
student = normalize_headers(student)
|
53
|
+
expected = normalize_headers(expected)
|
52
54
|
diff(expected, student)
|
53
55
|
end
|
54
56
|
|
57
|
+
def normalize_headers(results)
|
58
|
+
results.map do |result|
|
59
|
+
headers, *rows = result.split("\n")
|
60
|
+
|
61
|
+
headers.downcase!
|
62
|
+
[headers, *rows].join("\n")
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
55
66
|
# Make diff between expected and student dataset result and mark each line one according comparision
|
56
67
|
def diff(expected, student)
|
57
68
|
zipped = expected.zip(student).map do |expected_i, student_i|
|
data/lib/version_hook.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumuki-sqlite-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leandro Di Lorenzo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-11-
|
11
|
+
date: 2021-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mumukit
|