mumukit-bridge 4.0.1 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mumukit/bridge/runner.rb +1 -1
- data/lib/mumukit/bridge/runner/response_type.rb +12 -4
- data/lib/mumukit/bridge/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: ea48a094ce4c303eb324bb69e9cf92ec14a6b5b895b1cea793508952e122da25
|
4
|
+
data.tar.gz: ce7a11e5fcf076e12e429a09aafba6e954e7f2870729b6d5aa648b9df53f397e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 365a672ada46fcb116e1e04a00c5486fc5d98ef5b3ce54411c732e72ed10f10ef7221cbd074c0bbd2e345c88e9e5f30613460d9e041360dc52439be4c56a167b
|
7
|
+
data.tar.gz: 8354d23d587b9ce2a02d0eb3e7a10b4ccde56ff1a383eaed8b99df4a837afd88fdae18c3f61ec9e0706a51211a654d86530453abdb82681ade8a63ccaacb48dc
|
@@ -18,7 +18,7 @@ module Mumukit
|
|
18
18
|
# {test: string, extra: string, content: string, expectations: [{binding:string, inspection: string})]}
|
19
19
|
# Returns a hash
|
20
20
|
# {result: string,
|
21
|
-
# test_results: [{title:string, status:symbol, result:string}],
|
21
|
+
# test_results: [{title:string, status:symbol, result:string, summary:hash}],
|
22
22
|
# status: :passed|:failed|:errored|:aborted|:passed_with_warnings,
|
23
23
|
# expectation_results: [{binding:string, inspection:string, result:symbol}],
|
24
24
|
# feedback: string}
|
@@ -39,10 +39,18 @@ module Mumukit::Bridge
|
|
39
39
|
private
|
40
40
|
|
41
41
|
def parse_test_results(results)
|
42
|
-
results.map
|
43
|
-
|
44
|
-
|
45
|
-
|
42
|
+
results.map do |it|
|
43
|
+
{ summary: safe_compact(it['summary'])&.symbolize_keys.presence }
|
44
|
+
.compact
|
45
|
+
.merge(
|
46
|
+
title: it['title'],
|
47
|
+
status: it['status'].to_sym,
|
48
|
+
result: it['result'])
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def safe_compact(hash)
|
53
|
+
hash.try { |it| it.transform_values(&:presence).compact rescue nil }
|
46
54
|
end
|
47
55
|
end
|
48
56
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumukit-bridge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0
|
4
|
+
version: 4.1.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:
|
11
|
+
date: 2020-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|