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 +4 -4
- data/lib/expectations_hook.rb +19 -0
- data/lib/render/editor/editor.html.erb +14 -4
- data/lib/version_hook.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c8dbbf3e9c7faf42a7be9f831d0ecdcf75a50244743ac561bdf2b8c7d41eca8
|
4
|
+
data.tar.gz: 357e76f9f87efa812e09058e6d97acbea7835c9770e55d3e93e7170ef5da7005
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ade9870485c271f3fac8da3c1b25fee6837665d0f7666f703f55b91962c09a205c576c04956b642d8799fff1ed2973cad24c9bdf007e1e9bb5e0c235b98070c4
|
7
|
+
data.tar.gz: 611a644fb38329177816ff0b535dbb7ea1dd2b91fdec9b01467b2136b4e0cbc8e785acd7d4d28eff6a1b65a9b2210cabb2658abd2e22c66b6266ee6643acc820
|
data/lib/expectations_hook.rb
CHANGED
@@ -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
|
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.
|
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"
|
873
|
-
this.
|
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();
|
data/lib/version_hook.rb
CHANGED
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.
|
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-
|
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.
|
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.
|
69
|
+
version: '2.39'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: nokogiri
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|