mumuki-c-runner 1.0.0 → 1.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/metadata_hook.rb +2 -2
- data/lib/test_hook.rb +15 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa28a1e18b306c5bb70b2e4b954a68e271451283
|
4
|
+
data.tar.gz: 2174c689bd7434cfb409623a100d7a8a3da78bd2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 602dd0d1b85e679784f05833f27c6a55dfa570aa72543d3d187d7fd7334a831b7f52d507f11b463a7d6902b7ff4c0b271700ab8f56ca92b6a520eb1b84aed799
|
7
|
+
data.tar.gz: 0b1919f47f2fca3c2de804166b9dd6e96ec0e7c0d3bf25bf753907a671c1572326d54f76a44684353a5807ae38c260e0784337f6153ce3654d711b70ad472de1
|
data/lib/metadata_hook.rb
CHANGED
data/lib/test_hook.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
class CTestHook < Mumukit::Templates::FileHook
|
2
2
|
isolated true
|
3
|
+
structured true
|
3
4
|
|
4
5
|
def tempfile_extension
|
5
6
|
'.c'
|
@@ -21,6 +22,10 @@ class CTestHook < Mumukit::Templates::FileHook
|
|
21
22
|
<<EOF
|
22
23
|
#include <cspecs/cspec.h>
|
23
24
|
|
25
|
+
int main(void) {
|
26
|
+
return report(JSON);
|
27
|
+
}
|
28
|
+
|
24
29
|
context (mumuki_test) {
|
25
30
|
|
26
31
|
describe ("Mumuki test") {
|
@@ -36,4 +41,14 @@ context (mumuki_test) {
|
|
36
41
|
}
|
37
42
|
EOF
|
38
43
|
end
|
44
|
+
|
45
|
+
|
46
|
+
def to_structured_result(result)
|
47
|
+
result = result.split("===========\nJSON REPORT\n===========").last
|
48
|
+
transform(super(result)['examples'])
|
49
|
+
end
|
50
|
+
|
51
|
+
def transform(examples)
|
52
|
+
examples.map { |e| [e['title'], e['status'].to_sym, e['result']] }
|
53
|
+
end
|
39
54
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumuki-c-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.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: 2016-
|
11
|
+
date: 2016-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mumukit
|