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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/test_hook.rb +11 -0
  3. data/lib/version_hook.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d47ec94e08c7d9c855d17bfedc35b1a7709d5d0e22682a2b129ad5425e14d17e
4
- data.tar.gz: 4ffe138556f5a890a71e3cdcd816fdf596917a40527472a07d15907013abac6c
3
+ metadata.gz: fd53507ebff39f0daa4369c29adbc3b7fa0650eccc2f3ef7abd6de296ffbbe00
4
+ data.tar.gz: ec8829a963f3cbb38b2d18b904a60aff7d54c10ba269fa19333121a89d5b5b52
5
5
  SHA512:
6
- metadata.gz: 558a62973b1078fc23e3ad1ddeb668cc1738d5560229b3c76c2d8b775a659df22192dd8534054a3ad7db50a49d208b5075b3f610c1b41459e5cc34a8041717e2
7
- data.tar.gz: '0187ab08320aa59793522521a3063f7aeb75ea18cc41684782d847249c11771d7aa28c452131b4562e3efbdef991c13ae07bc98088e2b84c1cb5d435782f91b1'
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
@@ -1,3 +1,3 @@
1
1
  module SqliteVersionHook
2
- VERSION = '3.3.3'
2
+ VERSION = '3.3.4'
3
3
  end
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.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-23 00:00:00.000000000 Z
11
+ date: 2021-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mumukit