mumuki-gobstones-runner 2.3.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gobstones/batch.rb +8 -7
- data/lib/gobstones/example_code_builder.rb +1 -1
- data/lib/gobstones_runner.rb +1 -1
- data/lib/version_hook.rb +1 -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: 8bc4b18dd54af6689bd494200f05be7987c537025773a3c2b99dd95830888442
|
4
|
+
data.tar.gz: 44b3c91a9c6187bcf03f46e0da25c19e3c6065201d9f90985f5da209ee13e319
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27da2a4d30c136bad102c20e044d53fa6124f82696b06a5d318f92d2ea0f0dc8be2bf00caaedbb6385e03e1d3b1a3e67f5ffb1094ee08074dd3c3ca300c9898a
|
7
|
+
data.tar.gz: 3a5592b074f7d6d5c30a5e75174aba80487d003f87adc5fbfc095ce3d40821efeb8ab9cdbbb16236248e23406939d92281bface92f68253862cca9880347e060
|
data/lib/gobstones/batch.rb
CHANGED
@@ -15,7 +15,11 @@ class Gobstones::Batch
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def to_json
|
18
|
-
|
18
|
+
{
|
19
|
+
code: content,
|
20
|
+
extraCode: extra,
|
21
|
+
examples: examples.map { |example| example_json(example) }
|
22
|
+
}.to_json
|
19
23
|
end
|
20
24
|
|
21
25
|
private
|
@@ -27,12 +31,9 @@ class Gobstones::Batch
|
|
27
31
|
end
|
28
32
|
|
29
33
|
def example_base_json(example)
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
json[:originalCode] = content if json[:code] != content
|
35
|
-
json
|
34
|
+
example_code = example_code(example)
|
35
|
+
base = { initialBoard: example[:preconditions][:initial_board] }
|
36
|
+
example_code ? base.merge(generatedCode: example_code) : base
|
36
37
|
end
|
37
38
|
|
38
39
|
def example_code(example)
|
data/lib/gobstones_runner.rb
CHANGED
@@ -5,7 +5,7 @@ I18n.load_translations_path File.join(__dir__, 'locales', '*.yml')
|
|
5
5
|
|
6
6
|
Mumukit.runner_name = 'gobstones'
|
7
7
|
Mumukit.configure do |config|
|
8
|
-
config.docker_image = 'mumuki/mumuki-gobstones-worker:
|
8
|
+
config.docker_image = 'mumuki/mumuki-gobstones-worker:6.0'
|
9
9
|
config.content_type = 'html'
|
10
10
|
config.structured = true
|
11
11
|
end
|
data/lib/version_hook.rb
CHANGED
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.3.
|
4
|
+
version: 2.3.1
|
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-05-
|
11
|
+
date: 2019-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mumukit
|