mumukit 2.11.0 → 2.12.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3c6c5d6b74f8b21e3beb004d5183f1a32d2d821
|
4
|
+
data.tar.gz: e45775cd49c2895d16ee557fa0f1b99f251b96a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2ee22f422659f65fc5c4e24e69d097fd008ac36468b282ec8d3b7233d034957a3bbad1c7f6826de7afdfda35b5aed083a123eb03f8ded91f38ea468ae3fca5a
|
7
|
+
data.tar.gz: 5bd87ea37423d2a920f570f0995506ab932b602e2388bc679b167f19b0b41a7c0ef554604efb677ce7313eb1a01b1d06f21e608464762a3febe943e8ff46350c
|
@@ -4,6 +4,7 @@ module Mumukit
|
|
4
4
|
|
5
5
|
attr_accessor :request
|
6
6
|
|
7
|
+
|
7
8
|
def compile(request)
|
8
9
|
self.request = request
|
9
10
|
write_tempfile! compile_file_content(request)
|
@@ -49,8 +50,9 @@ module Mumukit
|
|
49
50
|
end
|
50
51
|
end
|
51
52
|
|
52
|
-
def self.structured(value=true)
|
53
|
+
def self.structured(value=true, separator: nil)
|
53
54
|
if value
|
55
|
+
@@separator = separator
|
54
56
|
include Mumukit::Templates::WithStructuredResults
|
55
57
|
end
|
56
58
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
module Mumukit::Templates::WithStructuredResults
|
2
2
|
def post_process_file(file, result, status)
|
3
|
+
result = extract_result(result)
|
3
4
|
if [:passed, :failed].include? status
|
4
5
|
[to_structured_result(result)]
|
5
6
|
else
|
@@ -13,6 +14,12 @@ module Mumukit::Templates::WithStructuredResults
|
|
13
14
|
[result, status]
|
14
15
|
end
|
15
16
|
|
17
|
+
def extract_result(result)
|
18
|
+
separator = self.class.class_variable_get :@@separator
|
19
|
+
result = result.split(separator).last if separator.present?
|
20
|
+
result
|
21
|
+
end
|
22
|
+
|
16
23
|
def to_structured_result(result)
|
17
24
|
JSON.pretty_parse(result)
|
18
25
|
end
|
data/lib/mumukit/version.rb
CHANGED
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.
|
4
|
+
version: 2.12.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: 2017-08-
|
11
|
+
date: 2017-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|