mumuki-gobstones-runner 2.12.1 → 2.15.0

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: 471512b781af57084f5a0aeef2422931db62ebba489e2988e696eb1d58f72a14
4
- data.tar.gz: 01bb5e8b9275e2b31c6fe658c8234ed03a1acf7fd476ba423862fbca36580903
3
+ metadata.gz: a15ee12be9e4246c28713f50d1056af82fa89c4269a87607ff067cbb09eebe9f
4
+ data.tar.gz: 6b815a6fd0c6504f10e7fe35ebbf45d6f6867e33f570d77b23a81f51d7c78977
5
5
  SHA512:
6
- metadata.gz: 236ee1be573d9baa4b852e085d8248d4e15c18e01d82c4f2c884d8be8b0bc5f52cfe694d1cd8eadf35a393ce24bc70faf4776006d15e26b76606572bace7464b
7
- data.tar.gz: 78b60bee1aa0fb52fd9dbd9e3da72ca609867665b548fa358ffbdbdd09a61a91e9d43175015f9474c14413a94ce42964e4a8334bd1144a29b640b2eadd1160fe
6
+ metadata.gz: 1f4262bd784f1893ab2d54eedd4d3050b4ab1d8ea0fde55913c97706c57d56fc33750d946cc6e5211d32e813384a7e5a60b616d93feb4507a4a87a49c7f7db21
7
+ data.tar.gz: 72ac755149cbb61b71df6dda5389af2846d82c6b3dc5a2cce554857149a225a4061291f5bb747b30ee8a4b87157d31b42c29defbb9ee924eca4158373b5a33ae
@@ -17,10 +17,10 @@ class Mumukit::Server::App < Sinatra::Base
17
17
  get_local_asset "#{asset_type}/#{name}.svg", "lib/public/#{name}.svg", 'image/svg+xml'
18
18
  end
19
19
 
20
- def self.get_media_assets(folder)
20
+ def self.get_media_assets(folder, content_type = nil)
21
21
  Dir.glob(File.join(__dir__,"../lib/public/#{folder}/*")).each do |path|
22
22
  relative_media_asset_path = "#{folder}/#{File.basename path}"
23
- get_local_asset relative_media_asset_path, "lib/public/#{relative_media_asset_path}"
23
+ get_local_asset relative_media_asset_path, "lib/public/#{relative_media_asset_path}", content_type
24
24
  end
25
25
  end
26
26
 
@@ -38,9 +38,13 @@ class Mumukit::Server::App < Sinatra::Base
38
38
  get_local_asset 'editor/editor.css', 'lib/render/editor/editor.css', 'text/css'
39
39
  get_local_asset 'editor/hammer.min.js', 'lib/render/editor/hammer.min.js', 'application/javascript'
40
40
  get_local_asset 'boom.png', 'lib/public/boom.png', 'image/png'
41
+
42
+ # Depracated, prefer toolbox path
41
43
  get_local_asset 'full-kindergarten-toolbox.xml', 'lib/public/full-kindergarten-toolbox.xml', 'text/plain'
42
44
  get_local_asset 'minimal-kindergarten-toolbox.xml', 'lib/public/minimal-kindergarten-toolbox.xml', 'text/plain'
43
45
 
46
+ get_media_assets 'toolbox', 'text/plain'
47
+
44
48
  get_media_assets 'media'
45
49
  get_media_assets 'local-media'
46
50
 
@@ -62,6 +62,26 @@ procedure ShiftDown() {
62
62
  ShiftTo(Sur)
63
63
  }
64
64
 
65
+ function one() {
66
+ return (1);
67
+ }
68
+
69
+ function two() {
70
+ return (2);
71
+ }
72
+
73
+ function three() {
74
+ return (3);
75
+ }
76
+
77
+ function four() {
78
+ return (4);
79
+ }
80
+
81
+ function five() {
82
+ return (5);
83
+ }
84
+
65
85
  procedure ShiftTo(dir) {
66
86
  if (puedeMover(dir)) {
67
87
  Sacar(Rojo)
@@ -6,7 +6,7 @@ I18n.load_translations_path File.join(__dir__, 'locales', '*.yml')
6
6
 
7
7
  Mumukit.runner_name = 'gobstones'
8
8
  Mumukit.configure do |config|
9
- config.docker_image = 'mumuki/mumuki-gobstones-worker:9.1'
9
+ config.docker_image = 'mumuki/mumuki-gobstones-worker:10.0'
10
10
  config.content_type = 'html'
11
11
  config.structured = true
12
12
  config.settings = true
Binary file
Binary file
Binary file
Binary file
@@ -1,2 +1 @@
1
1
  <category name="Procedimientos primitivos"></category>
2
- <category name="Funciones primitivas"></category>
@@ -0,0 +1,6 @@
1
+ <category name="Bloques de Gobstones">
2
+ <block type="RepeticionSimple"></block>
3
+ <block type="two"></block>
4
+ <block type="three"></block>
5
+ </category>
6
+ <category name="Procedimientos primitivos"></category>
@@ -0,0 +1,7 @@
1
+ <category name="Bloques de Gobstones">
2
+ <block type="RepeticionSimple"></block>
3
+ <block type="two"></block>
4
+ <block type="three"></block>
5
+ <block type="four"></block>
6
+ </category>
7
+ <category name="Procedimientos primitivos"></category>
@@ -0,0 +1,8 @@
1
+ <category name="Bloques de Gobstones">
2
+ <block type="RepeticionSimple"></block>
3
+ <block type="two"></block>
4
+ <block type="three"></block>
5
+ <block type="four"></block>
6
+ <block type="five"></block>
7
+ </category>
8
+ <category name="Procedimientos primitivos"></category>
@@ -0,0 +1,5 @@
1
+ <category name="Bloques de Gobstones">
2
+ <block type="RepeticionSimple"></block>
3
+ </category>
4
+ <category name="Funciones primitivas"></category>
5
+ <category name="Procedimientos primitivos"></category>
@@ -0,0 +1 @@
1
+ <category name="Procedimientos primitivos"></category>
@@ -133,3 +133,7 @@
133
133
  border: 1px solid #6D6E70 !important;
134
134
  border-radius: 4px;
135
135
  }
136
+
137
+ .mu-kids-exercise.mu-kindergarten .blocklyBubbleCanvas {
138
+ display: none;
139
+ }
@@ -428,11 +428,14 @@
428
428
  console.debug("Set game actions");
429
429
  const blockly = this._getBlockly();
430
430
 
431
- this._setPrimitiveProcedures((blockly.primitiveProcedures || []).concat([
432
- this._gamePrimitive('ShiftUp'),
433
- this._gamePrimitive('ShiftDown'),
434
- this._gamePrimitive('ShiftLeft'),
435
- this._gamePrimitive('ShiftRight')
431
+ this._setPrimitiveProcedures(
432
+ this._gamePrimitivesFor(blockly.primitiveProcedures, [
433
+ 'ShiftUp', 'ShiftDown', 'ShiftLeft', 'ShiftRight'
434
+ ]));
435
+
436
+ this._setPrimitiveFunctions(
437
+ this._gamePrimitivesFor(blockly.primitiveFunctions, [
438
+ 'one', 'two', 'three', 'four', 'five'
436
439
  ]));
437
440
  },
438
441
 
@@ -458,6 +461,10 @@
458
461
  return { alias: 'procedureDeclaration', name, attributes: {block_icon: `<%= @assets_url %>/media/${name}.png`} };
459
462
  },
460
463
 
464
+ _gamePrimitivesFor(base, names) {
465
+ return (base || []).concat(names.map(it => this._gamePrimitive(it)));
466
+ },
467
+
461
468
  _getBlockly() {
462
469
  return this.$.blocklyElement;
463
470
  },
@@ -823,15 +830,11 @@
823
830
  const targetStateIndex = this.multipleScenarios.currentScenarioIndex;
824
831
  this.targetState = this.initialState[targetStateIndex];
825
832
 
826
- const promise = new mumuki.bridge.Laboratory()
827
- .runTests(solution)
833
+ const promise = mumuki.submission.processSolution({ solution })
828
834
  .then((results) => {
829
835
  if (promise !== this.serverPromise) return;
830
836
 
831
837
  this._onRemoteExecutionStop(results);
832
- })
833
- .catch(() => {
834
- mumuki.kids.showResult({status: 'aborted'})
835
838
  });
836
839
  this.serverPromise = promise;
837
840
 
@@ -21,4 +21,32 @@ $(document).ready(function () {
21
21
  $blockSvg.width($blocks.width());
22
22
  $blockSvg.height($blocks.height());
23
23
  });
24
+
25
+ mumuki.I18n.register({
26
+ 'es': {
27
+ 'kindergarten_passed': '¡Tu programa está muy bien!',
28
+ 'kindergarten_passed_with_warnings': 'Tu programa está bien ¡pero se puede mejorar!',
29
+ 'kindergarten_failed': 'Hay un error en tu programa. ¡Intentá de nuevo!',
30
+ 'kindergarten_errored': 'Hay un error en tu programa. ¡Intentá de nuevo!',
31
+ },
32
+ 'es-CL': {
33
+ 'kindergarten_passed': '¡Tu programa está muy bien!',
34
+ 'kindergarten_passed_with_warnings': 'Tu programa está bien ¡pero se puede mejorar!',
35
+ 'kindergarten_failed': 'Hay un error en tu programa. ¡Intenta de nuevo!',
36
+ 'kindergarten_errored': 'Hay un error en tu programa. ¡Intenta de nuevo!'
37
+ },
38
+ 'en': {
39
+ 'kindergarten_passed': 'Your program is very good!',
40
+ 'kindergarten_passed_with_warnings': 'Your program is good. But it can be improved!',
41
+ 'kindergarten_failed': 'There is an error in your program. Try again!',
42
+ 'kindergarten_errored': 'There is an error in your program. Try again!'
43
+ },
44
+ 'pt': {
45
+ 'kindergarten_passed': 'Seu programa é muito bom!',
46
+ 'kindergarten_passed_with_warnings': 'Seu programa é bom, mas pode ser melhorado!',
47
+ 'kindergarten_failed': 'Há um erro no seu programa. Tenta de novo!',
48
+ 'kindergarten_errored': 'Há um erro no seu programa. Tenta de novo!'
49
+ },
50
+ });
51
+
24
52
  });
@@ -1,3 +1,3 @@
1
1
  module GobstonesVersionHook
2
- VERSION = '2.12.1'
2
+ VERSION = '2.15.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mumuki-gobstones-runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.12.1
4
+ version: 2.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Alfonso
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-11-16 00:00:00.000000000 Z
12
+ date: 2021-01-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gobstones-board
@@ -59,14 +59,14 @@ dependencies:
59
59
  requirements:
60
60
  - - "~>"
61
61
  - !ruby/object:Gem::Version
62
- version: '2.37'
62
+ version: '2.38'
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: '2.37'
69
+ version: '2.38'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: nokogiri
72
72
  requirement: !ruby/object:Gem::Requirement
@@ -240,12 +240,22 @@ files:
240
240
  - lib/public/media/disconnect.mp3
241
241
  - lib/public/media/disconnect.ogg
242
242
  - lib/public/media/disconnect.wav
243
+ - lib/public/media/five.png
244
+ - lib/public/media/four.png
245
+ - lib/public/media/one.png
243
246
  - lib/public/media/quote0.png
244
247
  - lib/public/media/quote1.png
245
248
  - lib/public/media/sprites.png
246
249
  - lib/public/media/sprites.svg
250
+ - lib/public/media/three.png
251
+ - lib/public/media/two.png
247
252
  - lib/public/minimal-kindergarten-toolbox.xml
248
253
  - lib/public/red.svg
254
+ - lib/public/toolbox/kindergarten-2-to-3.xml
255
+ - lib/public/toolbox/kindergarten-2-to-4.xml
256
+ - lib/public/toolbox/kindergarten-2-to-5.xml
257
+ - lib/public/toolbox/kindergarten-full.xml
258
+ - lib/public/toolbox/kindergarten-minimal.xml
249
259
  - lib/render/boards.html.erb
250
260
  - lib/render/editor/editor.css
251
261
  - lib/render/editor/editor.html.erb
@@ -276,7 +286,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
276
286
  - !ruby/object:Gem::Version
277
287
  version: '0'
278
288
  requirements: []
279
- rubygems_version: 3.0.8
289
+ rubygems_version: 3.0.3
280
290
  signing_key:
281
291
  specification_version: 4
282
292
  summary: Gobstones Runner for Mumuki