mumuki-gobstones-runner 2.15.0 → 2.16.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: a15ee12be9e4246c28713f50d1056af82fa89c4269a87607ff067cbb09eebe9f
4
- data.tar.gz: 6b815a6fd0c6504f10e7fe35ebbf45d6f6867e33f570d77b23a81f51d7c78977
3
+ metadata.gz: 2c8dbbf3e9c7faf42a7be9f831d0ecdcf75a50244743ac561bdf2b8c7d41eca8
4
+ data.tar.gz: 357e76f9f87efa812e09058e6d97acbea7835c9770e55d3e93e7170ef5da7005
5
5
  SHA512:
6
- metadata.gz: 1f4262bd784f1893ab2d54eedd4d3050b4ab1d8ea0fde55913c97706c57d56fc33750d946cc6e5211d32e813384a7e5a60b616d93feb4507a4a87a49c7f7db21
7
- data.tar.gz: 72ac755149cbb61b71df6dda5389af2846d82c6b3dc5a2cce554857149a225a4061291f5bb747b30ee8a4b87157d31b42c29defbb9ee924eca4158373b5a33ae
6
+ metadata.gz: ade9870485c271f3fac8da3c1b25fee6837665d0f7666f703f55b91962c09a205c576c04956b642d8799fff1ed2973cad24c9bdf007e1e9bb5e0c235b98070c4
7
+ data.tar.gz: 611a644fb38329177816ff0b535dbb7ea1dd2b91fdec9b01467b2136b4e0cbc8e785acd7d4d28eff6a1b65a9b2210cabb2658abd2e22c66b6266ee6643acc820
@@ -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)
@@ -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();
@@ -1,3 +1,3 @@
1
1
  module GobstonesVersionHook
2
- VERSION = '2.15.0'
2
+ VERSION = '2.16.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.15.0
4
+ version: 2.16.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-20 00:00:00.000000000 Z
12
+ date: 2021-01-27 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.38'
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.38'
69
+ version: '2.39'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: nokogiri
72
72
  requirement: !ruby/object:Gem::Requirement