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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f98c514029effaef38c244549744523c2317e834a1c8605157ae6ac064e91750
4
- data.tar.gz: 8bf1d50de903c8c3945d3d0c4e02b6b4e8868cf09e07d173cf66d5ee2e0aa727
3
+ metadata.gz: 8bc4b18dd54af6689bd494200f05be7987c537025773a3c2b99dd95830888442
4
+ data.tar.gz: 44b3c91a9c6187bcf03f46e0da25c19e3c6065201d9f90985f5da209ee13e319
5
5
  SHA512:
6
- metadata.gz: b3aa17c98f86f7ee976022935921d9355df7cd863d516c6d1b538783eea4a72021e4bec5d5e5f907a3c1a38db727c7e126c08c6db7fa60e526cd7fd75bb94940
7
- data.tar.gz: 0b777db903fd76952d7b994a68afc3645fa10120593af0de17341dfbf28e027d7ac51497c806de257a0c31f589c58feb1a42b30e54910eebf8e9128daacf644a
6
+ metadata.gz: 27da2a4d30c136bad102c20e044d53fa6124f82696b06a5d318f92d2ea0f0dc8be2bf00caaedbb6385e03e1d3b1a3e67f5ffb1094ee08074dd3c3ca300c9898a
7
+ data.tar.gz: 3a5592b074f7d6d5c30a5e75174aba80487d003f87adc5fbfc095ce3d40821efeb8ab9cdbbb16236248e23406939d92281bface92f68253862cca9880347e060
@@ -15,7 +15,11 @@ class Gobstones::Batch
15
15
  end
16
16
 
17
17
  def to_json
18
- examples.map { |example| example_json(example) }.to_json
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
- json = {initialBoard: example[:preconditions][:initial_board],
31
- code: example_code(example),
32
- extraCode: extra}
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)
@@ -6,7 +6,7 @@ class Gobstones::ExampleCodeBuilder
6
6
  end
7
7
 
8
8
  def build
9
- return @code unless subject
9
+ return nil unless subject
10
10
  <<GBS
11
11
  #{@code}
12
12
  program {
@@ -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:5.0'
8
+ config.docker_image = 'mumuki/mumuki-gobstones-worker:6.0'
9
9
  config.content_type = 'html'
10
10
  config.structured = true
11
11
  end
@@ -1,3 +1,3 @@
1
1
  module GobstonesVersionHook
2
- VERSION = '2.3.0'
2
+ VERSION = '2.3.1'
3
3
  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: 2.3.0
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-14 00:00:00.000000000 Z
11
+ date: 2019-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mumukit