mumuki-gobstones-runner 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/assets_server.rb +1 -0
- data/lib/gobstones_runner.rb +1 -1
- data/lib/locales/pt.yml +17 -0
- data/lib/precompile_hook.rb +7 -2
- data/lib/render/html_renderer.rb +3 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3bc2d1290cae35da099fd7e91689d5ae3cf0a7bffd20f1e35b0c5c5c811d5119
|
4
|
+
data.tar.gz: 4006b96d27cd8ea4847a867a31328d4cc662f14beec8e224e627e6c913bc060d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3f58a1d6d5f5f4d7d717ed70bd910cf75d220a3d32e1843815b957a9d643e45b61de3205bf0de063108d2630e3ac353f06c451536762c1613211ca83718ddf0
|
7
|
+
data.tar.gz: af975fc874df88846613a5460b8f8be901065d3415f8cc0164f1d9b06ca4f4c1beba26b4a511ed15191c60257b9266b8ccb535ec1ea9438c5fe75bc9f724e1ae
|
data/lib/assets_server.rb
CHANGED
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:1.
|
8
|
+
config.docker_image = 'mumuki/mumuki-gobstones-worker:1.1'
|
9
9
|
config.content_type = 'html'
|
10
10
|
config.structured = true
|
11
11
|
end
|
data/lib/locales/pt.yml
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
pt:
|
2
|
+
actual_board: 'Tabuleiro final obtido'
|
3
|
+
check_failed_unexpected_boom: 'O programa fez BOOM.'
|
4
|
+
check_final_board_failed_different_boards: 'Um tabuleiro diferente foi obtido do que o esperado'
|
5
|
+
check_error_failed_expected_boom: 'Esperava-se que o programa fizesse BOOM, mas foi executado normalmente'
|
6
|
+
check_error_failed_another_reason: 'Esperava-se que o programa fosse BOOM para <strong>%{expected_code}</strong>, mas falhou por outro motivo'
|
7
|
+
check_return_failed_different_values: 'Esperava-se <strong>%{expected_value}</strong> mas foi obtido <strong>%{actual_value}</strong>.'
|
8
|
+
check_return_failed_no_return: 'Esperava-se <strong>%{expected_value}</strong> mas nenhum valor foi obtido.'
|
9
|
+
code_no_stones: 'sem bolas disponíveis'
|
10
|
+
code_out_of_board: 'queda do tabuleiro'
|
11
|
+
code_wrong_argument_type: 'problema de tipos nos argumentos'
|
12
|
+
code_unassigned_variable: 'variável não atribuída'
|
13
|
+
code_wrong_arguments_quantity: 'quantidade errada de argumentos'
|
14
|
+
expected_board: 'Tabuleiro final esperado'
|
15
|
+
final_board: 'Tabuleiro final'
|
16
|
+
initial_board: 'Tabuleiro inicial'
|
17
|
+
no_program_found: 'Nenhuma definição de programa foi encontrada'
|
data/lib/precompile_hook.rb
CHANGED
@@ -9,11 +9,16 @@ class GobstonesPrecompileHook < Mumukit::Templates::FileHook
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def command_line(filename)
|
12
|
-
"gobstones-cli --batch #{filename}"
|
12
|
+
"gobstones-cli --batch #{filename} #{locale_argument}"
|
13
|
+
end
|
14
|
+
|
15
|
+
def locale_argument
|
16
|
+
"--language #{@locale}" if @locale
|
13
17
|
end
|
14
18
|
|
15
19
|
def compile(request)
|
16
20
|
add_missing_headers! request
|
21
|
+
@locale = request[:locale]
|
17
22
|
file = super request
|
18
23
|
|
19
24
|
struct request.to_h.merge batch: @batch,
|
@@ -21,7 +26,7 @@ class GobstonesPrecompileHook < Mumukit::Templates::FileHook
|
|
21
26
|
end
|
22
27
|
|
23
28
|
def add_missing_headers!(request)
|
24
|
-
request.test.gsub! /(.*(initial_board|final_board)
|
29
|
+
request.test.gsub! /(.*(initial_board|final_board): \|.*\n)(?!.*GBB\/1\.0.*)/, "\\1 GBB/1.0\\3\n"
|
25
30
|
end
|
26
31
|
|
27
32
|
def compile_file_content(request)
|
data/lib/render/html_renderer.rb
CHANGED
@@ -8,7 +8,9 @@ module Gobstones
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def render_success(result)
|
11
|
-
|
11
|
+
boards = [:initial, :final]
|
12
|
+
boards.reject!{ |it| it === :initial } unless @options[:show_initial_board]
|
13
|
+
bind_result boards: prepare_boards(boards, result),
|
12
14
|
reason: prepare_reason(result[:reason])
|
13
15
|
end
|
14
16
|
|
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.5.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-02-
|
11
|
+
date: 2018-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mumukit
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
19
|
+
version: '2.20'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '2.
|
26
|
+
version: '2.20'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: sinatra-cross_origin
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -156,6 +156,7 @@ files:
|
|
156
156
|
- lib/gobstones_runner.rb
|
157
157
|
- lib/locales/en.yml
|
158
158
|
- lib/locales/es.yml
|
159
|
+
- lib/locales/pt.yml
|
159
160
|
- lib/metadata_hook.rb
|
160
161
|
- lib/multiple_executions_runner.rb
|
161
162
|
- lib/precompile_hook.rb
|