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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ccac864d8b79e76d68f46bc1cd2aa01669373d8a6968e55589ed3dfde7f994cd
4
- data.tar.gz: 397cf74627c7c06521714d4b780091d8472156467f8bd042301fe1ca3aa2b262
3
+ metadata.gz: ea48a094ce4c303eb324bb69e9cf92ec14a6b5b895b1cea793508952e122da25
4
+ data.tar.gz: ce7a11e5fcf076e12e429a09aafba6e954e7f2870729b6d5aa648b9df53f397e
5
5
  SHA512:
6
- metadata.gz: 594d5cf01ea684ba7aee0ccb06d390bedb1179625be3924716de887431efe91313bd14972b5fa38bb8d1eb4fdec67c7be80a88954a36df762f0807c4bd43ba0d
7
- data.tar.gz: f3d2c90010fbfb8c71b5677046db388adf5e4ec44709ce482d572608bed34ad68722ae36f9e822748e978201097cdbf5b6b5117e97a64403977120b628119480
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 { |it| {
43
- title: it['title'],
44
- status: it['status'].to_sym,
45
- result: it['result']} }
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
 
@@ -1,5 +1,5 @@
1
1
  module Mumukit
2
2
  module Bridge
3
- VERSION = '4.0.1'
3
+ VERSION = '4.1.0'
4
4
  end
5
5
  end
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.1
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: 2019-07-08 00:00:00.000000000 Z
11
+ date: 2020-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler