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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 07bca358458da7b0194a52d8c7ad208fbe4092cb
4
- data.tar.gz: f367a50d0244acb432d56507d197eec93bdb595b
3
+ metadata.gz: aa28a1e18b306c5bb70b2e4b954a68e271451283
4
+ data.tar.gz: 2174c689bd7434cfb409623a100d7a8a3da78bd2
5
5
  SHA512:
6
- metadata.gz: c5a4230efb4f2851eeb544e712f2a134ea155b1168f28038799fe09c6f073a5489d9bc6f29fcbf62e323fc94a6e1b57ff8ab78647eff106c612d980ab66f2bb3
7
- data.tar.gz: 657bacd57ac1d9d9467ab3e5c370738ffd900cdd240b75b6633455ad7217e8502afc9ea65f572c60c785f8f390b1f49b02b95ddc57a2f7b7933df13973eec3d1
6
+ metadata.gz: 602dd0d1b85e679784f05833f27c6a55dfa570aa72543d3d187d7fd7334a831b7f52d507f11b463a7d6902b7ff4c0b271700ab8f56ca92b6a520eb1b84aed799
7
+ data.tar.gz: 0b1919f47f2fca3c2de804166b9dd6e96ec0e7c0d3bf25bf753907a671c1572326d54f76a44684353a5807ae38c260e0784337f6153ce3654d711b70ad472de1
@@ -4,11 +4,11 @@ class CMetadataHook < Mumukit::Hook
4
4
  name: 'c',
5
5
  icon: {type: 'devicon', name: 'c'},
6
6
  extension: 'c',
7
- ace_mode: 'c'
7
+ ace_mode: 'c_cpp'
8
8
  },
9
9
  test_framework: {
10
10
  name: 'cspec',
11
11
  test_extension: 'c'
12
12
  }}
13
13
  end
14
- end
14
+ end
@@ -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.0.0
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-09-27 00:00:00.000000000 Z
11
+ date: 2016-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mumukit