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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aa9b52569d8acc92b3996ab2797748cb26b04c8b424eabe47c8ea1fcd8f554a0
4
- data.tar.gz: 18a004a9b5ccf64c278952ac02ac3fc1f5942c3acbd06ed583c5623c8c422f49
3
+ metadata.gz: 14b2d5496f455caaf94529b6b558805e7dcd5a47b3a5d3995fbf025bf138b5ca
4
+ data.tar.gz: 0755adc216b5ac1b3d9915575b5460807cd5cfcb8ba92cfff6a1912c14567ee2
5
5
  SHA512:
6
- metadata.gz: 7c403421b59fde8fb7a27ca8448d43a1331b86d590199278b5bf26f7ae76c165220ab67d97bf6eff63c8a082aa1b3de59ab51e1b90968dbf7056c2db36182603
7
- data.tar.gz: a03dba8b04f49b4dfa4a0127db26021f47d6d9ca550ef8bd0ac30c2578c660ac990701622e887120293369c7c2efdebd290c87a2cf8c4b6763ab9abe2a7b44fb
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
@@ -1,3 +1,3 @@
1
1
  module Mumukit
2
- VERSION = '2.27.0'
2
+ VERSION = '2.28.1'
3
3
  end
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.27.0
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-10-02 00:00:00.000000000 Z
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.7
344
+ rubygems_version: 2.7.8
345
345
  signing_key:
346
346
  specification_version: 4
347
347
  summary: Mumuki Test Server Development Kit