mumukit 2.45.0 → 2.46.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/locales/en.yml +2 -2
- data/lib/locales/es-CL.yml +2 -2
- data/lib/locales/es.yml +2 -2
- data/lib/locales/pt.yml +2 -2
- data/lib/mumukit/metatest/interactive_checker.rb +16 -6
- data/lib/mumukit/version.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: 4373e0933cc618f5296133f601a28fc2a32497f072ebcef924bdb54757d54d5c
|
4
|
+
data.tar.gz: b31b3f50fa6e859b7815fc75d7da804b72146eceb35c3dff7c5b7558c5c61c23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e58de2ec660e81837568e02e13a1b2f7cb86f9fde5b607a761a130354df7bb7fa5acf364bb14a8819edc69c349f6a3c70a5e1ee98e627563d193935d7a7ff756
|
7
|
+
data.tar.gz: 8536f6834bc8c8d643084701c1cc509772b35780a9a3a89ea7c69ba57e23021a5961cf01fb9b13fd90bbcab0f105a6f6484b60ba18646916cbab63421f68da26
|
data/lib/locales/en.yml
CHANGED
@@ -15,5 +15,5 @@ en:
|
|
15
15
|
check_query_outputs: "query '%{query}' output should be '%{expected}' but was '%{actual}'"
|
16
16
|
check_query_passes: "query '%{query}' should pass but it failed"
|
17
17
|
goal_passed: "goal was met successfully"
|
18
|
-
check_queries_match: "All the required queries must be executed"
|
19
|
-
check_queries_equal: "All the required queries must be executed"
|
18
|
+
check_queries_match: "All the required queries must be executed. Executed %{all} but only %{matches} match the expectations"
|
19
|
+
check_queries_equal: "All the required queries must be executed. Executed %{all} but only %{matches} match the expectations"
|
data/lib/locales/es-CL.yml
CHANGED
@@ -15,5 +15,5 @@ es-CL:
|
|
15
15
|
check_query_outputs: "La consulta '%{query}' debería devolver '%{expected}' pero devolvió '%{actual}'"
|
16
16
|
check_query_passes: "La consulta '%{query}' debería pasar pero falló"
|
17
17
|
goal_passed: "El objetivo se cumplió exitosamente"
|
18
|
-
check_queries_match: "Se deben realizar todas las consultas solicitadas"
|
19
|
-
check_queries_equal: "Se deben realizar todas las consultas solicitadas"
|
18
|
+
check_queries_match: "Se deben realizar todas las consultas solicitadas. Se ejecutaron %{all} pero sólo %{matches} coinciden con las solicitadas"
|
19
|
+
check_queries_equal: "Se deben realizar todas las consultas solicitadas. Se ejecutaron %{all} pero sólo %{matches} coinciden con las solicitadas"
|
data/lib/locales/es.yml
CHANGED
@@ -15,5 +15,5 @@ es:
|
|
15
15
|
check_query_outputs: "La consulta '%{query}' debería devolver '%{expected}' pero devolvió '%{actual}'"
|
16
16
|
check_query_passes: "La consulta '%{query}' debería pasar pero falló"
|
17
17
|
goal_passed: "El objetivo se cumplió exitosamente"
|
18
|
-
check_queries_match: "Se deben realizar todas las consultas solicitadas"
|
19
|
-
check_queries_equal: "Se deben realizar todas las consultas solicitadas"
|
18
|
+
check_queries_match: "Se deben realizar todas las consultas solicitadas. Se ejecutaron %{all} pero sólo %{matches} coinciden con las solicitadas"
|
19
|
+
check_queries_equal: "Se deben realizar todas las consultas solicitadas. Se ejecutaron %{all} pero sólo %{matches} coinciden con las solicitadas"
|
data/lib/locales/pt.yml
CHANGED
@@ -14,6 +14,6 @@ pt:
|
|
14
14
|
check_query_fails: "a consulta '%{query}' deve falhar, mas passou"
|
15
15
|
check_query_outputs: "a consulta '%{query}' deve ser '%{expected}', mas foi '%{actual}'"
|
16
16
|
check_query_passes: "a consulta '%{query}' deve passar, mas falhou"
|
17
|
-
check_queries_match: "Todas as consultas solicitadas devem ser feitas"
|
18
|
-
check_queries_equal: "Todas as consultas solicitadas devem ser feitas"
|
17
|
+
check_queries_match: "Todas as consultas solicitadas devem ser feitas. %{all} foram feitas mas só %{matches} correspondem com as solicitadas"
|
18
|
+
check_queries_equal: "Todas as consultas solicitadas devem ser feitas. %{all} foram feitas mas só %{matches} correspondem com as solicitadas"
|
19
19
|
goal_passed: "O objetivo foi alcançado com sucesso"
|
@@ -24,15 +24,17 @@ module Mumukit::Metatest
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def check_queries_equal(result, goal)
|
27
|
-
|
28
|
-
queries.
|
29
|
-
end
|
27
|
+
matches = goal[:values].map do |value|
|
28
|
+
queries.find { |query| query == value }
|
29
|
+
end.compact
|
30
|
+
fail_queries_t :check_queries_equal, queries, matches, goal[:values]
|
30
31
|
end
|
31
32
|
|
32
33
|
def check_queries_match(result, goal)
|
33
|
-
|
34
|
-
queries.
|
35
|
-
end
|
34
|
+
matches = goal[:regexps].map do |regexp|
|
35
|
+
queries.find { |query| query.match? regexp }
|
36
|
+
end.compact
|
37
|
+
fail_queries_t :check_queries_match, queries, matches, goal[:regexps]
|
36
38
|
end
|
37
39
|
|
38
40
|
def check_last_query_outputs(result, goal)
|
@@ -90,6 +92,14 @@ module Mumukit::Metatest
|
|
90
92
|
|
91
93
|
private
|
92
94
|
|
95
|
+
def join_queries(queries)
|
96
|
+
queries.map { |it| "`#{it}`" }.join(", ").presence || '**∅**'
|
97
|
+
end
|
98
|
+
|
99
|
+
def fail_queries_t(key, queries, matches, expectations)
|
100
|
+
fail_t key, all: join_queries(queries), matches: join_queries(matches) unless matches.size == expectations.size
|
101
|
+
end
|
102
|
+
|
93
103
|
def query
|
94
104
|
strip @request.query.to_s
|
95
105
|
end
|
data/lib/mumukit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumukit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.46.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franco Leonardo Bulgarelli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|