mumuki-gobstones-runner 2.7.0 → 2.8.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/lib/assets_server.rb +20 -1
  3. data/lib/checker.rb +2 -2
  4. data/lib/game_framework/default.gbs.erb +3 -0
  5. data/lib/game_framework/default.xml.erb +3 -0
  6. data/lib/game_framework/extra.gbs.erb +84 -0
  7. data/lib/game_framework/program.gbs.erb +5 -0
  8. data/lib/game_framework/program.xml.erb +17 -0
  9. data/lib/gobstones.rb +1 -0
  10. data/lib/gobstones/batch.rb +4 -2
  11. data/lib/gobstones/batch_parser.rb +5 -1
  12. data/lib/gobstones/compilation_mode.rb +60 -0
  13. data/lib/gobstones_runner.rb +3 -1
  14. data/lib/public/full-kindergarten-toolbox.xml +5 -0
  15. data/lib/public/local-media/bool-false.svg +24 -0
  16. data/lib/public/local-media/bool-true.svg +17 -0
  17. data/lib/public/local-media/clean.png +0 -0
  18. data/lib/public/local-media/color-azul.svg +44 -0
  19. data/lib/public/local-media/color-negro.svg +44 -0
  20. data/lib/public/local-media/color-rojo.svg +44 -0
  21. data/lib/public/local-media/color-verde.svg +44 -0
  22. data/lib/public/local-media/direccion-este.svg +38 -0
  23. data/lib/public/local-media/direccion-norte.svg +38 -0
  24. data/lib/public/local-media/direccion-oeste.svg +38 -0
  25. data/lib/public/local-media/direccion-sur.svg +38 -0
  26. data/lib/public/local-media/hand.png +0 -0
  27. data/lib/public/local-media/main-procedure.png +0 -0
  28. data/lib/public/local-media/minus.png +0 -0
  29. data/lib/public/local-media/plus.png +0 -0
  30. data/lib/public/local-media/program.png +0 -0
  31. data/lib/public/local-media/repeticion-simple.png +0 -0
  32. data/lib/public/media/1x1.gif +0 -0
  33. data/lib/public/media/ShiftDown.png +0 -0
  34. data/lib/public/media/ShiftLeft.png +0 -0
  35. data/lib/public/media/ShiftRight.png +0 -0
  36. data/lib/public/media/ShiftUp.png +0 -0
  37. data/lib/public/media/click.mp3 +0 -0
  38. data/lib/public/media/click.ogg +0 -0
  39. data/lib/public/media/click.wav +0 -0
  40. data/lib/public/media/delete.mp3 +0 -0
  41. data/lib/public/media/delete.ogg +0 -0
  42. data/lib/public/media/delete.wav +0 -0
  43. data/lib/public/media/disconnect.mp3 +0 -0
  44. data/lib/public/media/disconnect.ogg +0 -0
  45. data/lib/public/media/disconnect.wav +0 -0
  46. data/lib/public/media/quote0.png +0 -0
  47. data/lib/public/media/quote1.png +0 -0
  48. data/lib/public/media/sprites.png +0 -0
  49. data/lib/public/media/sprites.svg +74 -0
  50. data/lib/public/minimal-kindergarten-toolbox.xml +2 -0
  51. data/lib/render/boards.html.erb +4 -6
  52. data/lib/render/editor/editor.css +9 -0
  53. data/lib/render/editor/{editor.html → editor.html.erb} +143 -18
  54. data/lib/render/html_renderer.rb +2 -2
  55. data/lib/render/with_renderer.rb +6 -3
  56. data/lib/version_hook.rb +1 -1
  57. metadata +92 -36
@@ -49,7 +49,7 @@ module Gobstones
49
49
 
50
50
  def render_error_check_error_failed_another_reason(result)
51
51
  bind_result error: :check_error_failed_another_reason,
52
- expected_code: I18n.t("code_#{result[:expected_code]}"),
52
+ expected_code: result[:expected_code],
53
53
  reason: prepare_reason(result[:reason])
54
54
  end
55
55
 
@@ -77,7 +77,7 @@ module Gobstones
77
77
  def visible_board(result, board_types)
78
78
  board = result[board_types]
79
79
 
80
- if board == 'boom'
80
+ if board.like? :boom
81
81
  HtmlBoard.new(result[:initial], boom: true)
82
82
  else
83
83
  HtmlBoard.new(board)
@@ -8,9 +8,12 @@ module Gobstones
8
8
  reason: result[:finalBoardError]
9
9
  end
10
10
 
11
- def render_error_output(_output, error)
12
- report = error.parse_as_json
13
- renderer.send "render_error_#{report[:status]}", report[:result]
11
+ def build_error_output(builder, example, _, error)
12
+ error.details.deep_symbolize_keys!
13
+
14
+ builder.result = renderer.send "render_error_#{error.message}", error.details
15
+ builder.summary_type = error.message
16
+ builder.summary_message = I18n.t error.message, error.details
14
17
  end
15
18
 
16
19
  private
@@ -1,3 +1,3 @@
1
1
  module GobstonesVersionHook
2
- VERSION = '2.7.0'
2
+ VERSION = '2.8.3'
3
3
  end
metadata CHANGED
@@ -1,85 +1,99 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mumuki-gobstones-runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.0
4
+ version: 2.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Alfonso
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-29 00:00:00.000000000 Z
11
+ date: 2020-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: mumukit
14
+ name: gobstones-board
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.33'
19
+ version: '1.19'
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.33'
26
+ version: '1.19'
27
27
  - !ruby/object:Gem::Dependency
28
- name: sinatra-cross_origin
28
+ name: gobstones-code-runner
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.4'
33
+ version: '0.6'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0.4'
40
+ version: '0.6'
41
41
  - !ruby/object:Gem::Dependency
42
- name: gobstones-board
42
+ name: mumuki-gobstones-blockly
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.19'
47
+ version: 0.38.1
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '1.19'
54
+ version: 0.38.1
55
55
  - !ruby/object:Gem::Dependency
56
- name: gobstones-blockly
56
+ name: mumukit
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.24.0
61
+ version: '2.36'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.24.0
68
+ version: '2.36'
69
69
  - !ruby/object:Gem::Dependency
70
- name: gobstones-code-runner
70
+ name: nokogiri
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0.6'
75
+ version: '1.10'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0.6'
82
+ version: '1.10'
83
+ - !ruby/object:Gem::Dependency
84
+ name: sinatra-cross_origin
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '0.4'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '0.4'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: bundler
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -101,61 +115,61 @@ dependencies:
101
115
  - !ruby/object:Gem::Version
102
116
  version: '3'
103
117
  - !ruby/object:Gem::Dependency
104
- name: rake
118
+ name: codeclimate-test-reporter
105
119
  requirement: !ruby/object:Gem::Requirement
106
120
  requirements:
107
- - - "~>"
121
+ - - ">="
108
122
  - !ruby/object:Gem::Version
109
- version: '10.0'
123
+ version: '0'
110
124
  type: :development
111
125
  prerelease: false
112
126
  version_requirements: !ruby/object:Gem::Requirement
113
127
  requirements:
114
- - - "~>"
128
+ - - ">="
115
129
  - !ruby/object:Gem::Version
116
- version: '10.0'
130
+ version: '0'
117
131
  - !ruby/object:Gem::Dependency
118
- name: rspec
132
+ name: mumukit-bridge
119
133
  requirement: !ruby/object:Gem::Requirement
120
134
  requirements:
121
135
  - - "~>"
122
136
  - !ruby/object:Gem::Version
123
- version: '3.4'
137
+ version: '4.1'
124
138
  type: :development
125
139
  prerelease: false
126
140
  version_requirements: !ruby/object:Gem::Requirement
127
141
  requirements:
128
142
  - - "~>"
129
143
  - !ruby/object:Gem::Version
130
- version: '3.4'
144
+ version: '4.1'
131
145
  - !ruby/object:Gem::Dependency
132
- name: codeclimate-test-reporter
146
+ name: rake
133
147
  requirement: !ruby/object:Gem::Requirement
134
148
  requirements:
135
- - - ">="
149
+ - - "~>"
136
150
  - !ruby/object:Gem::Version
137
- version: '0'
151
+ version: '10.0'
138
152
  type: :development
139
153
  prerelease: false
140
154
  version_requirements: !ruby/object:Gem::Requirement
141
155
  requirements:
142
- - - ">="
156
+ - - "~>"
143
157
  - !ruby/object:Gem::Version
144
- version: '0'
158
+ version: '10.0'
145
159
  - !ruby/object:Gem::Dependency
146
- name: mumukit-bridge
160
+ name: rspec
147
161
  requirement: !ruby/object:Gem::Requirement
148
162
  requirements:
149
163
  - - "~>"
150
164
  - !ruby/object:Gem::Version
151
- version: '3.0'
165
+ version: '3.4'
152
166
  type: :development
153
167
  prerelease: false
154
168
  version_requirements: !ruby/object:Gem::Requirement
155
169
  requirements:
156
170
  - - "~>"
157
171
  - !ruby/object:Gem::Version
158
- version: '3.0'
172
+ version: '3.4'
159
173
  description:
160
174
  email:
161
175
  - rodri042@gmail.com
@@ -167,9 +181,15 @@ files:
167
181
  - lib/checker.rb
168
182
  - lib/expectations_hook.rb
169
183
  - lib/extensions/string.rb
184
+ - lib/game_framework/default.gbs.erb
185
+ - lib/game_framework/default.xml.erb
186
+ - lib/game_framework/extra.gbs.erb
187
+ - lib/game_framework/program.gbs.erb
188
+ - lib/game_framework/program.xml.erb
170
189
  - lib/gobstones.rb
171
190
  - lib/gobstones/batch.rb
172
191
  - lib/gobstones/batch_parser.rb
192
+ - lib/gobstones/compilation_mode.rb
173
193
  - lib/gobstones/error_builder.rb
174
194
  - lib/gobstones/example_code_builder.rb
175
195
  - lib/gobstones_runner.rb
@@ -184,11 +204,48 @@ files:
184
204
  - lib/public/black.svg
185
205
  - lib/public/blue.svg
186
206
  - lib/public/boom.png
207
+ - lib/public/full-kindergarten-toolbox.xml
187
208
  - lib/public/green.svg
209
+ - lib/public/local-media/bool-false.svg
210
+ - lib/public/local-media/bool-true.svg
211
+ - lib/public/local-media/clean.png
212
+ - lib/public/local-media/color-azul.svg
213
+ - lib/public/local-media/color-negro.svg
214
+ - lib/public/local-media/color-rojo.svg
215
+ - lib/public/local-media/color-verde.svg
216
+ - lib/public/local-media/direccion-este.svg
217
+ - lib/public/local-media/direccion-norte.svg
218
+ - lib/public/local-media/direccion-oeste.svg
219
+ - lib/public/local-media/direccion-sur.svg
220
+ - lib/public/local-media/hand.png
221
+ - lib/public/local-media/main-procedure.png
222
+ - lib/public/local-media/minus.png
223
+ - lib/public/local-media/plus.png
224
+ - lib/public/local-media/program.png
225
+ - lib/public/local-media/repeticion-simple.png
226
+ - lib/public/media/1x1.gif
227
+ - lib/public/media/ShiftDown.png
228
+ - lib/public/media/ShiftLeft.png
229
+ - lib/public/media/ShiftRight.png
230
+ - lib/public/media/ShiftUp.png
231
+ - lib/public/media/click.mp3
232
+ - lib/public/media/click.ogg
233
+ - lib/public/media/click.wav
234
+ - lib/public/media/delete.mp3
235
+ - lib/public/media/delete.ogg
236
+ - lib/public/media/delete.wav
237
+ - lib/public/media/disconnect.mp3
238
+ - lib/public/media/disconnect.ogg
239
+ - lib/public/media/disconnect.wav
240
+ - lib/public/media/quote0.png
241
+ - lib/public/media/quote1.png
242
+ - lib/public/media/sprites.png
243
+ - lib/public/media/sprites.svg
244
+ - lib/public/minimal-kindergarten-toolbox.xml
188
245
  - lib/public/red.svg
189
246
  - lib/render/boards.html.erb
190
247
  - lib/render/editor/editor.css
191
- - lib/render/editor/editor.html
248
+ - lib/render/editor/editor.html.erb
192
249
  - lib/render/editor/editor.js
193
250
  - lib/render/editor/hammer.min.js
194
251
  - lib/render/html_board.rb
@@ -216,8 +273,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
216
273
  - !ruby/object:Gem::Version
217
274
  version: '0'
218
275
  requirements: []
219
- rubyforge_project:
220
- rubygems_version: 2.7.7
276
+ rubygems_version: 3.0.8
221
277
  signing_key:
222
278
  specification_version: 4
223
279
  summary: Gobstones Runner for Mumuki