mumuki-gobstones-runner 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/locales/en.yml +1 -0
- data/lib/locales/es.yml +1 -0
- data/lib/multiple_executions_runner.rb +22 -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: d1d964e4c022f3264576ae114f974368eb32edf3bbc605b52d0d5cccf17c77db
|
4
|
+
data.tar.gz: 71c8e90771bdec934232417488137d01fb4edaf6db64591075bc02713e0d2e1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f718c575eec8fca0f5eda49ddd8ba184e3474cf1c67d5776042d274cc2f6a000f36b0cfd345be3f7e60f703929757d7a5e9cd2ff46efd21867319b84acb0ef47
|
7
|
+
data.tar.gz: 67f6ea77587e96f9a7526cabf5309193bd6bf0864b5cbc2f3e271ce8dfc9ac4fc87c1731f047c99f2fc20321a5d09ca32880caf2425592f5608ade2cccc35deb
|
data/lib/locales/en.yml
CHANGED
data/lib/locales/es.yml
CHANGED
@@ -5,6 +5,7 @@ module Gobstones
|
|
5
5
|
execution[:status] = execution[:status].to_sym
|
6
6
|
|
7
7
|
convert_compilation_to_runtime_errors! execution if compilation_error?(execution)
|
8
|
+
convert_no_program_error! execution if no_program?(execution)
|
8
9
|
|
9
10
|
raise Mumukit::Metatest::Errored, error_message(execution) unless success?(execution)
|
10
11
|
execution
|
@@ -20,8 +21,12 @@ module Gobstones
|
|
20
21
|
execution[:status] == :compilation_error
|
21
22
|
end
|
22
23
|
|
24
|
+
def no_program?(execution)
|
25
|
+
execution[:status] == :no_program_found
|
26
|
+
end
|
27
|
+
|
23
28
|
def error_message(execution)
|
24
|
-
return format execution.except(:result).to_json
|
29
|
+
return format execution.except(:result).to_json unless compilation_error?(execution)
|
25
30
|
|
26
31
|
error = execution[:result][:finalBoardError]
|
27
32
|
format Gobstones.build_error(error)
|
@@ -33,6 +38,22 @@ module Gobstones
|
|
33
38
|
end
|
34
39
|
end
|
35
40
|
|
41
|
+
def convert_no_program_error!(execution)
|
42
|
+
execution[:status] = :compilation_error
|
43
|
+
execution[:result][:finalBoardError] = {
|
44
|
+
on: {
|
45
|
+
range: {
|
46
|
+
start: {
|
47
|
+
row: 0,
|
48
|
+
column: 0
|
49
|
+
}
|
50
|
+
}
|
51
|
+
},
|
52
|
+
reason: { code: 'no-program-found' },
|
53
|
+
message: I18n.t('no_program_found')
|
54
|
+
}
|
55
|
+
end
|
56
|
+
|
36
57
|
def format(error)
|
37
58
|
"<pre>#{error}</pre>"
|
38
59
|
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: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rodrigo Alfonso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01
|
11
|
+
date: 2018-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mumukit
|