mumukit 2.27.0 → 2.28.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mumukit/server/response_builder.rb +10 -1
- data/lib/mumukit/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14b2d5496f455caaf94529b6b558805e7dcd5a47b3a5d3995fbf025bf138b5ca
|
4
|
+
data.tar.gz: 0755adc216b5ac1b3d9915575b5460807cd5cfcb8ba92cfff6a1912c14567ee2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b10d93420dc619acf65d42525acd7079c423a4c404a00894c3d7b2a4f6f719e0816470c2170df32fcaf0d9c13fcb03f93d36a65a6b3718ac0bc18d67a5999b3f
|
7
|
+
data.tar.gz: 8e3f3023b3a46aa4806f1094d668874d924385303400eef3fe9424c3c9cad0afa35606f57860bc1f4d48d90392551c3097167eee5a2232d318ec664d72ed46b6
|
@@ -38,8 +38,10 @@ class Mumukit::Server::ResponseBuilder
|
|
38
38
|
structured_base_response(test_results)
|
39
39
|
elsif unstructured_test_result?(test_results)
|
40
40
|
unstructured_base_response(test_results)
|
41
|
+
elsif mixed_test_result?(test_results)
|
42
|
+
mixed_base_response(test_results)
|
41
43
|
else
|
42
|
-
raise "Invalid test results format: #{test_results}. You must either return [results_array] or [results_string, status]"
|
44
|
+
raise "Invalid test results format: #{test_results}. You must either return [results_array], [results_string, status] or [results_array, results_string, status]"
|
43
45
|
end
|
44
46
|
end
|
45
47
|
|
@@ -51,6 +53,10 @@ class Mumukit::Server::ResponseBuilder
|
|
51
53
|
test_results.size == 2 && test_results[0].is_a?(String)
|
52
54
|
end
|
53
55
|
|
56
|
+
def mixed_test_result?(test_results)
|
57
|
+
test_results.size == 3 && test_results[0].is_a?(Array) && test_results[1].is_a?(String)
|
58
|
+
end
|
59
|
+
|
54
60
|
def structured_base_response(test_results)
|
55
61
|
{testResults: test_results[0].map { |title, status, result|
|
56
62
|
{title: title,
|
@@ -63,4 +69,7 @@ class Mumukit::Server::ResponseBuilder
|
|
63
69
|
out: test_results[0]}
|
64
70
|
end
|
65
71
|
|
72
|
+
def mixed_base_response(test_results)
|
73
|
+
structured_base_response(test_results).merge out: test_results[1], exit: test_results[2]
|
74
|
+
end
|
66
75
|
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.28.1
|
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: 2018-
|
11
|
+
date: 2018-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -341,7 +341,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
341
341
|
version: '0'
|
342
342
|
requirements: []
|
343
343
|
rubyforge_project:
|
344
|
-
rubygems_version: 2.7.
|
344
|
+
rubygems_version: 2.7.8
|
345
345
|
signing_key:
|
346
346
|
specification_version: 4
|
347
347
|
summary: Mumuki Test Server Development Kit
|