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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6ec659c5d058360c8f6a8da5262423342511fd99d1dd53fd808c13b2501e7496
4
- data.tar.gz: fc89cc77bdd718c6b4f22f99c8cfbf4d9b79ea33f956e8c93ecaa70dbe08052f
3
+ metadata.gz: f82526f4a5824f6c8d3006f7539bff0bcd77300fe2d51c1c5d7244902a406225
4
+ data.tar.gz: d2dea8e130b4f881ba830f15b90493b56de9e8be4901f49278d81922c63ad6af
5
5
  SHA512:
6
- metadata.gz: 4a0b83afcf73c520bf0f18bd25c499693392d8d0923f1c1818884e986bfe662b2693ecdb942adad9bd3816d86d33a8d9e463f400f5bf8553b8dc3e0ae2eec16a
7
- data.tar.gz: 99e409d7c324fbb44913bec0bf6b7ab6eeb5eaa3652884979ae0bb3c5cfe9a05ece0b1ed200f4dcb4f87097cd95b712255b11b0d667f06acbc9f54a3c3fd43b8
6
+ metadata.gz: c0c1e8bef4c879972db7bf589634f33b58c649f5a3b3beacc4d061f864b01e849a1f3db2a71f81349e413df1fcf269610c15d13bcd5337b5150851c6d33a08dd
7
+ data.tar.gz: cf1eec4fbbe28c8456adfc681506d8daf9d671d5a9faa0957878462b1ea0202fe84275ba95b0bb74214f55fad523168a10984f7e5f3ad42fe6dee8ec1e6942f5
@@ -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
@@ -684,6 +684,7 @@
684
684
 
685
685
  if (isExpectedTimeout) return;
686
686
 
687
+ this._getBlockly().scrollToBlock(region);
687
688
  this._getBlockly().showBlockError(region, error.message);
688
689
  },
689
690
 
data/lib/version_hook.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module GobstonesVersionHook
2
- VERSION = '2.1.2'
2
+ VERSION = '2.1.3'
3
3
  end
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.2
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-16 00:00:00.000000000 Z
11
+ date: 2019-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mumukit