mumuki-gobstones-runner 2.1.2 → 2.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/expectations_hook.rb +12 -3
- data/lib/render/editor/editor.html +1 -0
- data/lib/version_hook.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: f82526f4a5824f6c8d3006f7539bff0bcd77300fe2d51c1c5d7244902a406225
|
4
|
+
data.tar.gz: d2dea8e130b4f881ba830f15b90493b56de9e8be4901f49278d81922c63ad6af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0c1e8bef4c879972db7bf589634f33b58c649f5a3b3beacc4d061f864b01e849a1f3db2a71f81349e413df1fcf269610c15d13bcd5337b5150851c6d33a08dd
|
7
|
+
data.tar.gz: cf1eec4fbbe28c8456adfc681506d8daf9d671d5a9faa0957878462b1ea0202fe84275ba95b0bb74214f55fad523168a10984f7e5f3ad42fe6dee8ec1e6942f5
|
data/lib/expectations_hook.rb
CHANGED
@@ -7,9 +7,7 @@ class GobstonesExpectationsHook < Mumukit::Templates::MulangExpectationsHook
|
|
7
7
|
|
8
8
|
def mulang_code(request)
|
9
9
|
output, status = request.result
|
10
|
-
|
11
|
-
ast = output.first[:result][:mulangAst]
|
12
|
-
Mulang::Code.new(mulang_language, ast)
|
10
|
+
Mulang::Code.new(mulang_language, extract_ast(output))
|
13
11
|
end
|
14
12
|
|
15
13
|
def compile_expectations(request)
|
@@ -23,4 +21,15 @@ class GobstonesExpectationsHook < Mumukit::Templates::MulangExpectationsHook
|
|
23
21
|
def default_smell_exceptions
|
24
22
|
LOGIC_SMELLS + FUNCTIONAL_SMELLS + OBJECT_ORIENTED_SMELLS
|
25
23
|
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
def extract_ast(precompiled_output)
|
28
|
+
if precompiled_output.is_a?(String)
|
29
|
+
logger.warn(precompiled_output)
|
30
|
+
{tag: :None} # this happens when gobstones cli miserably fails on parsing the submission or the extra code
|
31
|
+
else
|
32
|
+
precompiled_output.first[:result][:mulangAst]
|
33
|
+
end
|
34
|
+
end
|
26
35
|
end
|
data/lib/version_hook.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumuki-gobstones-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rodrigo Alfonso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mumukit
|