mumuki-gobstones-runner 2.14.2 → 2.17.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
  SHA256:
3
- metadata.gz: 45823ede62f0dab0aaecc19ed12332cfeae22a593c9809fb31f248b8d922f006
4
- data.tar.gz: a16ec2877eadbbf19db14b57b62f6ee96222d41d8978634da9aa93ba8561fdd1
3
+ metadata.gz: aa6cc6706c769fc6b216b18f4046b6488a5dc3e4af8cc34e7d1e09a7dfceff95
4
+ data.tar.gz: 59da7c01e70f0250a0921e5290d0cd86b4626d30893092d1b1dcdb65bf74220b
5
5
  SHA512:
6
- metadata.gz: 9d5749f67661dbf6d2d2f00f4f1bd48ab4ab86a1abda93e275e08916cd23ddc41eda5aa0498b4b7a76f760ee9d011f8dd8e1a4b592a68225138ef6680d3d640c
7
- data.tar.gz: 3f61470fe0aa02a8f84723a37939147441fb1ace1e7c58be13ea5fc4d4fc79e5824993198d9b22986ee3559c062c0a931ad4d864b8b8f14f5bf937a3e2699649
6
+ metadata.gz: 99cea198ea9f1d676c1218b818eb38afd909334369de27a1b6f778decc237af60bc7f3a1d4a5ab8db893ff6900eaec3b49c43840d0173b5163953e53e28b75cf
7
+ data.tar.gz: '09030e57d9096b64512c3f835bb86dad9f8cd637a3f5385a242899e49e943650686218179aeca78c216812345472c6f4bbd39fc7760a6348679dfdbcb42a2447'
@@ -19,6 +19,25 @@ class GobstonesExpectationsHook < Mumukit::Templates::MulangExpectationsHook
19
19
  LOGIC_SMELLS + FUNCTIONAL_SMELLS + OBJECT_ORIENTED_SMELLS
20
20
  end
21
21
 
22
+ def autocorrection_rules
23
+ {
24
+ 'Uses:==' => 'UsesEqual', # non-standard, but for maximal backward compatibility
25
+ 'Uses:===' => 'UsesEqual',
26
+ 'Uses:/=' => 'UsesNotEqual',
27
+ 'Uses:+' => 'UsesPlus',
28
+ 'Uses:-' => 'UsesMinus',
29
+ 'Uses:=*' => 'UsesMultiply',
30
+ 'Uses:/' => 'UsesMinus',
31
+ 'Uses:not' => 'UsesNegation',
32
+ 'Uses:&&' => 'UsesAnd',
33
+ 'Uses:||' => 'UsesOr',
34
+ 'Uses:>=' => 'UsesGreatherOrEqualThan',
35
+ 'Uses:>' => 'UsesGreatherThan',
36
+ 'Uses:<=' => 'UsesLessOrEqualThan',
37
+ 'Uses:<' => 'UsesLessThan'
38
+ }
39
+ end
40
+
22
41
  private
23
42
 
24
43
  def extract_ast(request)
@@ -6,7 +6,7 @@ I18n.load_translations_path File.join(__dir__, 'locales', '*.yml')
6
6
 
7
7
  Mumukit.runner_name = 'gobstones'
8
8
  Mumukit.configure do |config|
9
- config.docker_image = 'mumuki/mumuki-gobstones-worker:9.1'
9
+ config.docker_image = 'mumuki/mumuki-gobstones-worker:10.0'
10
10
  config.content_type = 'html'
11
11
  config.structured = true
12
12
  config.settings = true
@@ -809,7 +809,7 @@
809
809
  this.$editor = $("mu-gobstones-custom-editor")[0];
810
810
  },
811
811
 
812
- _boardToState : function ({size, table, header, boom}) {
812
+ _boardToState: function ({size, table, header, boom}) {
813
813
  return {size, table, header, boom}
814
814
  },
815
815
 
@@ -830,7 +830,7 @@
830
830
  const targetStateIndex = this.multipleScenarios.currentScenarioIndex;
831
831
  this.targetState = this.initialState[targetStateIndex];
832
832
 
833
- const promise = mumuki.submission.processSolution({ solution })
833
+ const promise = mumuki.submission.sendSolution({solution})
834
834
  .then((results) => {
835
835
  if (promise !== this.serverPromise) return;
836
836
 
@@ -869,12 +869,22 @@
869
869
  if (reason === "end") {
870
870
  this._onExecutionEnd(editor);
871
871
  }
872
- else if (reason === "cancel" && editor.interactiveMode) {
873
- this._onInteractiveStop(editor);
872
+ else if (reason === "cancel") {
873
+ this._onExecutionCancel(editor);
874
874
  }
875
875
  else this.serverPromise = undefined;
876
876
  },
877
877
 
878
+ _onExecutionCancel: function(editor) {
879
+ if(editor.interactiveMode) {
880
+ this._onInteractiveStop(editor);
881
+ }
882
+ else {
883
+ this._onResetState();
884
+ this.serverPromise = undefined;
885
+ }
886
+ },
887
+
878
888
  _onExecutionEnd: function (editor) {
879
889
  if(editor.interactiveMode) {
880
890
  editor.toggleInteractiveMode();
@@ -21,4 +21,32 @@ $(document).ready(function () {
21
21
  $blockSvg.width($blocks.width());
22
22
  $blockSvg.height($blocks.height());
23
23
  });
24
+
25
+ mumuki.I18n.register({
26
+ 'es': {
27
+ 'kindergarten_passed': '¡Tu programa está muy bien!',
28
+ 'kindergarten_passed_with_warnings': 'Tu programa está bien ¡pero se puede mejorar!',
29
+ 'kindergarten_failed': 'Hay un error en tu programa. ¡Intentá de nuevo!',
30
+ 'kindergarten_errored': 'Hay un error en tu programa. ¡Intentá de nuevo!',
31
+ },
32
+ 'es-CL': {
33
+ 'kindergarten_passed': '¡Tu programa está muy bien!',
34
+ 'kindergarten_passed_with_warnings': 'Tu programa está bien ¡pero se puede mejorar!',
35
+ 'kindergarten_failed': 'Hay un error en tu programa. ¡Intenta de nuevo!',
36
+ 'kindergarten_errored': 'Hay un error en tu programa. ¡Intenta de nuevo!'
37
+ },
38
+ 'en': {
39
+ 'kindergarten_passed': 'Your program is very good!',
40
+ 'kindergarten_passed_with_warnings': 'Your program is good. But it can be improved!',
41
+ 'kindergarten_failed': 'There is an error in your program. Try again!',
42
+ 'kindergarten_errored': 'There is an error in your program. Try again!'
43
+ },
44
+ 'pt': {
45
+ 'kindergarten_passed': 'Seu programa é muito bom!',
46
+ 'kindergarten_passed_with_warnings': 'Seu programa é bom, mas pode ser melhorado!',
47
+ 'kindergarten_failed': 'Há um erro no seu programa. Tenta de novo!',
48
+ 'kindergarten_errored': 'Há um erro no seu programa. Tenta de novo!'
49
+ },
50
+ });
51
+
24
52
  });
data/lib/version_hook.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module GobstonesVersionHook
2
- VERSION = '2.14.2'
2
+ VERSION = '2.17.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mumuki-gobstones-runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.14.2
4
+ version: 2.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Alfonso
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-01-07 00:00:00.000000000 Z
12
+ date: 2022-02-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gobstones-board
@@ -59,14 +59,14 @@ dependencies:
59
59
  requirements:
60
60
  - - "~>"
61
61
  - !ruby/object:Gem::Version
62
- version: '2.37'
62
+ version: '2.39'
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: '2.37'
69
+ version: '2.39'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: nokogiri
72
72
  requirement: !ruby/object:Gem::Requirement